1 2008-10-30 Mark Probst <mark.probst@gmail.com>
3 * monitor.c (mono_monitor_get_fast_enter_method): If
4 CompareExchange is not available, don't create the fastpath
5 instead of asserting. (The method is missing in the 1.1 profile.)
7 2008-10-30 Mark Probst <mark.probst@gmail.com>
9 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
11 * monitor.c, monitor.h: Code for generating Monitor.Enter and
12 Monitor.Exit IL fastpaths.
14 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
16 * class.c (mono_class_create_from_typedef): Added Vector2ul.
18 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
20 * class.c (mono_class_create_from_typedef): Added Vector2l.
22 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
24 * class.c (mono_class_create_from_typedef): Added Vector2d.
26 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
28 * appdomain.c: translate \ into / for cache_path.
29 * domain-internals.h: new mono_is_shadow_copy_enabled().
30 * icall.c: (fill_reflection_assembly_name) do the same path
31 manipulations that get_code_base does.
32 (get_code_base) use mono_is_shadow_copy_enabled.
34 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
36 * appdomain.c: shadow-copied assemblies go to CachePath +
37 ApplicationName when both are set. DynamicBase has nothing to do with
41 2008-10-26 Zoltan Varga <vargaz@gmail.com>
43 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
46 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
47 standalone signatures.
49 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
50 comparison code: instead of comparing the signatures using a custom
51 equals function, transform them to a common signature and compare that. This
52 works better with AOT.
54 2008-10-25 Zoltan Varga <vargaz@gmail.com>
56 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
58 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
59 call for generic instances.
60 (mono_class_setup_properties): Call setup_properties () before accessing
63 * class.c (mono_class_get_virtual_methods): New helper function to iterate
64 over the virtual methods of a class using metadata if possible, avoiding the
65 creation of MonoMethod's for non-virtual methods.
67 * class.c (mono_class_setup_vtable_general): Rewrite this to use
68 get_virtual_methods () to iterate over the virtual methods of classes.
70 2008-10-25 Martin Baulig <martin@ximian.com>
72 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
74 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
76 * class.c (mono_class_create_from_typedef): Added Vector4i.
78 2008-10-24 Mark Probst <mark.probst@gmail.com>
80 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
81 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
82 special-casing applies to eliminate the call completely.
84 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
86 * class.c (mono_class_create_from_typedef): Added Vector8s.
88 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
90 * class.c (mono_class_create_from_typedef): Added Vector16sb.
92 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
94 * icall.c: get rid of annoying warning.
96 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
98 * threadpool.c: in 1.x, if you change the background status of the
99 threadpool thread, it's not reset.
100 Remove unnecessary calls to SetState.
102 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
104 * threadpool.c: asynchronously create a set of idle threads upon first
105 use of the threadpool. SetMinThreads will now start the appropriate
106 number of idle threads if they are not already running. The default is
107 1 threadpool thread per CPU. Increased the maximum number of threads
110 2008-10-22 Martin Baulig <martin@ximian.com>
112 Revert r116521 from Zoltan, it breaks the debugger:
114 * class.c (mono_class_get_virtual_methods): New helper function to iterate
115 over the virtual methods of a class using metadata if possible, avoiding the
116 creation of MonoMethod's for non-virtual methods.
118 * class.c (mono_class_setup_vtable_general): Rewrite this to use
119 get_virtual_methods () to iterate over the virtual methods of classes.
121 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
123 * threads.c: when creating a threadpool thread, set its state to
125 * threadpool.c: reset the background state of a threadpool thread
126 after finishing each work item
129 2008-10-22 Zoltan Varga <vargaz@gmail.com>
131 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
133 * class.c (mono_class_setup_vtable_general): Add an optimized version for
134 generic instances which works by inflating the methods in the container
137 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
138 variant which doesn't make a copy if no inflation was done.
139 (mono_class_setup_fields): Use it.
141 * metadata.c (mono_metadata_get_shared_type): New helper function to
142 return a shared instance of a given MonoType.
144 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
145 a copy of most non-generic types.
147 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
149 * threadpool.c: remove one more GetSystemInfo () call.
151 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
153 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
154 use the code in mono-proclib.h to get processor information.
156 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
158 * appdomain.c: fixed the logic that determines whether assemblies in a
159 directory are "shadow-copied" or not. Bug #433483 fixed.
161 2008-10-22 Zoltan Varga <vargaz@gmail.com>
163 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
166 2008-10-21 Zoltan Varga <vargaz@gmail.com>
168 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
171 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
172 reflection.c: Use mono_field_get_name () for accessing a field's name.
174 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
177 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
180 * loader.c (find_method_in_class): Reenable the metadata optimization by
181 not using it for generic instances.
183 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
184 data/def_type fields from MonoClassField into a separate structure.
185 (struct MonoClassField): Remove data/def_type fields.
186 (struct _MonoClass): Add a 'field_def_values' array to store the default
187 values/RVA for fields.
189 * class.c reflection.c: Update after the changes.
191 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
192 for accessing field->data.
194 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
196 * loader.c (find_method_in_class): Revert the last change for now as
197 it breaks Mono.C5 unit tests.
199 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
200 'field_generic_types' and 'field_objects' which contain the information
201 previously stored in MonoInflatedField.
202 (MonoInflatedField): Delete.
203 (struct _MonoClassField): Delete 'generic_info' field.
205 * reflection.c: Store the information which was previously in
206 field->generic_info in MonoDynamicGenericClass instead.
208 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
209 MonoClassField changes.
211 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
213 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
214 store the value inside the data array of the MonoMethodWrapper.
215 This saves memory, is faster and fixes the lifetime issues (methods
216 were never removed from the hash previously). May also fix bug#436996.
218 2008-10-21 Zoltan Varga <vargaz@gmail.com>
220 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
221 generic instances, compute the type from the generic definition instead of
222 looking in field->generic_info.
224 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
225 for inflated fields, the only user was get_fieldref_token () which no
228 * class.c (mono_class_init): Revert the last change as it seems to cause
231 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
232 bytes on 64 bit platforms.
234 * object.c (mono_class_create_runtime_vtable): Fix a warning.
236 * object.c (mono_class_create_runtime_vtable): Don't initalize
237 field->data/field->def_type here, it is done lazily by
238 mono_class_get_field_default_value ().
240 * icall.c (ves_icall_get_enum_info): Call
241 mono_class_get_field_default_value () instead of directly accessing
242 field->data and field->def_type.
244 * object.c (get_default_field_value): Ditto.
246 * class.c (mono_field_get_data): Ditto.
248 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
249 call for generic instances.
251 * loader.c (find_method_in_class): If klass != from_class, then inflate
252 the method with the context of from_class, since the caller assumes this.
254 2008-10-20 Zoltan Varga <vargaz@gmail.com>
256 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
257 for accessing method->slot.
259 2008-10-20 Cedric Vivier <cedricv@neonux.com>
261 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
263 2008-10-19 Zoltan Varga <vargaz@gmail.com>
265 * class.c (mono_method_get_vtable_index): Use
266 mono_method_get_vtable_slot () for accessing method->slot.
268 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
269 accessing klass->methods.
271 * class.c (mono_method_get_vtable_slot): New helper function.
272 (mono_class_get_vtable_entry): Ditto.
273 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
274 accessing method->slot.
276 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
277 method to get_inflated_method ().
279 * class.c (mono_class_get_inflated_method): New helper method to obtain
280 a method of an inflated class without calling setup_methods ().
281 (mono_class_get_cctor): Use get_inflated_method.
283 * generic-sharing.c (mono_class_get_method_generic): Ditto.
285 * marshal.c image.c: Lazily create all the marshal caches.
287 * image.c (mono_image_init): Move initialization of runtime_invoke
290 * marshal.c (get_cache): New helper function to lazily initialize a
292 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
294 * debug-helpers.c (mono_method_full_name): Include generic arguments.
296 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
298 * loader.c: fixed check for interface type.
300 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
302 * appdomain.c: check for NULL setup before it's referenced.
304 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
306 * class.c: remove the unused old vtable setup code.
308 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
310 * class.c: don't depend on interface order in
311 setup_interface_offsets (bug #435777).
312 * reflection.c: sort the InterfaceImpl table (patch from
313 Jb Evain <jbevain@novell.com>).
315 2008-10-13 Zoltan Varga <vargaz@gmail.com>
317 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
318 the low level assemblies lock.
320 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
322 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
323 object.c, reflection.c, socket-io.c, threads.c: introduced
324 mono_framework_version () to return the major framewrok version,
325 changed the code that was using more complex patterns to use it.
326 Return the correct value for PlatformID for OSX.
328 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
330 * icall-def.h, process.h, process.c: added an icall to get info about
331 processes using mono-proclib.
333 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
335 * mono-perfcounters.c: use the mono-proclib functions to
336 access process information.
338 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
340 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
341 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
342 reflection.c: remove rawbuffer usage: mmap support is more sanely
343 provided by utils/mono-mmap.
345 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
347 * gc.c: use posix semaphores when possible so that
348 mono_gc_finalize_notify() is signal safe.
350 2008-10-11 Zoltan Varga <vargaz@gmail.com>
352 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
353 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
354 be #ifdef-ed out, the linker will remove the rest.
356 * marshal.c: Implement DISABLE_COM.
358 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
360 2008-10-11 Miguel de Icaza <miguel@novell.com>
362 * locales.c (string_invariant_compare_char): Optimization: do not
363 call g_unichar_type unless we actually need the information.
365 2008-10-10 Mark Probst <mark.probst@gmail.com>
367 * object.c, class-internals.h: Also create remoting trampolines
368 for generic methods. Pass the domain to the remoting trampoline
369 creation function, too.
371 2008-10-10 Zoltan Varga <vargaz@gmail.com>
373 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
375 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
377 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
380 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
383 * locales.c: remove the use of g_strdown. Fixes bug #322313.
385 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
387 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
388 for the least possible amount of time (extending the fix in r113458).
390 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
392 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
394 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
396 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
397 as possible simd intrinsic types.
398 Optimized the test to check for the common prefix first.
400 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
402 * class.c: back out part of a broken optimization committed on
403 May 23th (bug #433908).
405 2008-10-09 Mark Probst <mark.probst@gmail.com>
407 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
408 Win32. Should fix #432388 for most cases until we have the new
411 2008-10-08 Zoltan Varga <vargaz@gmail.com>
413 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
414 instead of using inst->id so the hash is stable for AOT.
416 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
419 * icall.c: create a .ini file for shadow-copied assemblies that
420 contains the location of the original assembly. Use this to return the
421 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
422 Also fix the number of '/' for windows when returning the CodeBase.
425 2008-10-07 Bill Holmes <billholmes54@gmail.com>
427 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
429 Code is contributed under MIT/X11 license.
431 2008-10-07 Bill Holmes <billholmes54@gmail.com>
433 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
434 if if the class vtable needs initialized.
436 Code is contributed under MIT/X11 license.
438 2008-10-07 Bill Holmes <billholmes54@gmail.com>
440 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
441 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
442 STRING->BSTR, and CLASS->INTERFACE.
444 Code is contributed under MIT/X11 license.
446 2008-10-07 Marek Habersack <mhabersack@novell.com>
448 * sysmath.h: changed the declaration of the
449 ves_icall_System_Math_Round2 icall by adding an extra
450 away_from_zero parameter.
452 * sysmath.c (ves_icall_System_Math_Round2): added support for
453 away from zero rounding. The icall now takes an extra boolean
454 parameter to signal that away from zero operation is requested.
456 2008-10-06 Zoltan Varga <vargaz@gmail.com>
458 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
459 the delegate klass so it can work with full-aot.
460 (mono_marshal_get_delegate_end_invoke): Ditto.
461 (mono_marshal_get_delegate_invoke): Ditto.
463 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
465 * gc.c, attach.h, attach.c: remove a bad pattern:
466 add_finalizer_callback () is not implemented correctly, it can't
467 without adding more overhead to the finalizer loop and it's not
468 even needed, since we know exactly what we need to call, so there is
469 no need to do so through an expensive function pointer.
471 2008-10-04 Zoltan Varga <vargaz@gmail.com>
473 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
475 * attach.c (mono_attach_init): Remove the #ifdef.
477 2008-10-04 Andreas Färber <andreas.faerber@web.de>
479 * attach.c (mono_attach_init): Don't use
480 mono_gc_add_finalizer_thread_callback when compiling without GC.
483 Code is contributed under MIT/X11 license.
485 2008-10-03 Zoltan Varga <vargaz@gmail.com>
487 * class.c (mono_class_create_from_typedef): Remove the
488 #ifndef DISABLE_SIMD stuff.
490 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
492 * class-internals.h (MonoClass): Added simd_type bit field.
494 * class.c (mono_class_create_from_typedef): Check if type is a simd
497 2008-10-03 Mark Probst <mark.probst@gmail.com>
499 * object.c (mono_method_add_generic_virtual_invocation): Only add
500 instantiations to the thunk whose count is at least as large as
503 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
505 * icall.c: changed the Type of the exception thrown when trying to
506 invoke a constructor on an abstract class. Part of the fix for bug
509 2008-10-02 Mark Probst <mark.probst@gmail.com>
511 * class.c, class-internals.h (mono_method_get_vtable_index): New
512 function which returns the index into the vtable and properly
513 handles inflated virtual generic methods.
515 2008-10-01 Mark Probst <mark.probst@gmail.com>
517 * object.c, domain.c, object-internals.h, domain-internals.h:
518 Generalize IMT thunk machinery to also handle thunks for virtual
519 generic method invokes. When a virtual generic method is invoked
520 more than a number of times we insert it into the thunk so that it
521 can be called without lookup in unmanaged code.
523 * generic-sharing.c, class-internals.h: Fetching a
524 MonoGenericInst* for a method from an (M)RGCTX.
526 2008-10-01 Zoltan Varga <vargaz@gmail.com>
528 * marshal.c (emit_marshal_string): Applied a variant of a patch by
529 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
530 marshalling. Fixes #431304.
532 2008-10-01 Bill Holmes <billholmes54@gmail.com>
534 * marshal.c (emit_marshal_variant) : Change the attribute checks to
535 handle when ref is specified without In or Out.
537 Code is contributed under MIT/X11 license.
539 2008-09-30 Mark Probst <mark.probst@gmail.com>
541 * loader.c (mono_get_method_constrained): Don't expand method with
542 the class's context, because it's already a method of that class.
544 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
546 * attach.c : should be correct build fix.
548 2008-09-29 Zoltan Varga <vargaz@gmail.com>
550 * attach.c: Fix the previous change.
552 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
554 * attach.c : quick w32 build fix.
556 2008-09-27 Miguel de Icaza <miguel@novell.com>
558 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
559 crashes MonoDevelop: #430455.
561 2008-09-27 Zoltan Varga <vargaz@gmail.com>
563 * domain-internals.h (struct _MonoDomain): Move most fields used only by
564 the JIT do MonoJitDomainInfo in ../mini/mini.h.
566 * domain.c: Remove initialization/cleanup of the removed fields.
568 2008-09-27 Mark Probst <mark.probst@gmail.com>
570 * class.c (mono_class_generic_sharing_enabled): Enable generic
571 code sharing for PPC.
573 2008-09-26 Bill Holmes <billholmes54@gmail.com>
575 * attach.c : Fixing the Windows builds.
577 Code is contributed under MIT/X11 license.
579 2008-09-25 Zoltan Varga <vargaz@gmail.com>
581 * class.c (mono_class_generic_sharing_enabled): Experimentally change
582 the default generic sharing mode to 'all'.
584 2008-09-25 Mark Probst <mark.probst@gmail.com>
586 * generic-sharing.c, class-internals.h: New function for checking
587 whether a method needs a static RGCTX invoke wrapper. A few
588 funtions moved from mini/generic-sharing.c.
590 * icall.c: New function used.
592 2008-09-25 Mark Probst <mark.probst@gmail.com>
594 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
595 Static RGCTX invoke wrapping applies to value type methods, too.
597 * class.c (mono_class_setup_vtable_general): In generic-shared
598 value types, wrap methods with a static RGCTX invoke wrapper.
600 2008-09-25 Zoltan Varga <vargaz@gmail.com>
602 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
605 2008-09-24 Zoltan Varga <vargaz@gmail.com>
607 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
608 register a callback which is called when the finalizer thread is woken
610 (finalizer_thread): Call the callback if it exists.
612 * attach.h attach.c: New files, implementing the attach mechanism.
614 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
616 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
617 by the previous change.
619 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
621 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
622 loader.c, marshal.c, metadata-internals.h, metadata.c,
623 method-builder.c, object.c, reflection.c: introduced specific functions
624 to allocate from the domain and image mempools and cleaned up most of
625 the code to use them (still missing a few in reflection.c).
626 Keep the loader bytes counter updated.
628 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
630 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
631 loader-related counters.
633 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
635 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
636 added more MS-compatible counters.
638 2008-09-22 Zoltan Varga <vargaz@gmail.com>
640 * class.c (mono_class_setup_fields): Call setup_fields before accessing
641 class->blittable. Fixes #428217.
643 2008-09-21 Zoltan Varga <vargaz@gmail.com>
645 * reflection.c (mono_image_get_field_on_inst_token): Call
646 field_encode_signature () since that handles custom modifiers too.
649 2008-09-20 Zoltan Varga <vargaz@gmail.com>
651 * reflection.c (add_custom_modifiers): New helper function to merge custom
652 modifiers stored in objects to a MonoType.
653 (fieldref_encode_signature): Encode custom modifiers.
654 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
655 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
657 2008-09-19 Kornél Pál <kornelpal@gmail.com>
659 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
660 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
661 64-bit IL only images because imports are not resolved for IL only images.
662 Special thanks to Bill Holmes for finding this bug and testing the patch.
663 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
665 Contributed under MIT/X11 license.
667 2008-09-19 Miguel de Icaza <miguel@novell.com>
669 * mono-config.c (dllmap_start): Add support for the bits keyword
670 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
672 2008-09-19 Mark Probst <mark.probst@gmail.com>
674 * reflection.c (inflate_mono_method): When the class the method is
675 to be inflated for is itself not inflated, just return the method.
677 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
679 * mono-perfcounters.c: use more user friendly process instance names.
681 2008-09-18 Bill Holmes <billholmes54@gmail.com>
683 * marshal.c (emit_marshal_variant) : Change the attribute checks to
684 handle "[in] ref" and "[in][out] ref" cases.
686 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
687 to mono_mb_create_method. This was causing problems calling native to
688 managed passing Variants by value.
690 Code is contributed under MIT/X11 license.
692 2008-09-18 Zoltan Varga <vargaz@gmail.com>
694 * class.c (can_access_internals): Call mono_assembly_load_friends ()
695 before accessing the friend_assembly_names field.
697 * assembly.c (mono_assembly_load_friends): Make this callable multiple
699 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
700 called lazily when it is needed.
702 * metadata-internals.h (struct _MonoAssembly): Add
703 'friend_assembly_names_inited' flag.
705 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
707 * mono-perfcounters-def.h: fix the types of a few counters.
708 * mono-perfcounters.c: implemented the instance names getter
711 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
713 * culture-info-table.h : regenerated.
715 2008-09-17 Robert Jordan <robertj@gmx.net>
717 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
718 context bound objects. Fixes #415577.
720 Code is contributed under MIT/X11 license.
722 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
724 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
725 implementation (bug #423582).
727 2008-09-16 Zoltan Varga <vargaz@gmail.com>
729 * object.c (mono_object_get_virtual_method): Handle the case method->slot
730 is not set. Fixes #426309.
732 2008-09-16 Jb Evain <jbevain@novell.com>
734 * class.c (mono_class_from_name): fix the exported type look up
735 when the type is defined in a referenced assembly.
737 2008-09-16 Jb Evain <jbevain@novell.com>
739 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
740 increment the next index counter on each iteration to make that work
741 for more than one type forwarder. Unmanaged part to fix #422929.
743 2008-09-15 Mark Probst <mark.probst@gmail.com>
745 * object-internals.h: enum ComInterfaceType in
746 MonoInterfaceTypeAttribute is guint32, not guint16.
748 2008-09-12 Mark Probst <mark.probst@gmail.com>
750 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
753 2008-09-11 Mark Probst <mark.probst@gmail.com>
755 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
758 2008-09-11 Mark Probst <mark.probst@gmail.com>
760 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
761 Endianness fixes for MonoSymbolFileOffsetTable.
763 2008-09-10 Bill Holmes <billholmes54@gmail.com>
765 * process.c (complete_path) : Removing quotes from the
766 input path. The glib file routines do not handle file paths
767 that have quotes around them.
769 Code is contributed under MIT/X11 license.
771 2008-09-10 Bill Holmes <billholmes54@gmail.com>
773 * socket-io.h : Adding a comment to provide locations where
774 changes to MonoSocketAsyncResult need to be synced.
776 Code is contributed under MIT/X11 license.
778 2008-09-10 Zoltan Varga <vargaz@gmail.com>
780 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
781 parameters as well. Fixes #425001.
783 2008-09-08 Miguel de Icaza <miguel@novell.com>
785 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
788 2008-09-07 Miguel de Icaza <miguel@novell.com>
790 * console-io.c: Add support for tracking the window size if it
793 The setup is very simple: the TtySetup function will now return a
794 pointer to a location in memory that tracks the current console
795 size. The managed code checks its current value every time its
796 queried against the last value set, and updates accordingly.
798 With this setup we can work with multiple consoles, and we do not
799 require to poke into managed code from a signal handler.
801 Additionally, the environment for COLUMNS and LINES is now handled
804 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
806 2008-09-07 Mark Probst <mark.probst@gmail.com>
808 * marshal.c (mono_type_native_stack_size): Treat
809 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
811 2008-09-04 Jb Evain <jbevain@novell.com>
813 * class.c (mono_class_is_assignable_from): fix assignability of nullables
816 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
818 * verify.c (verify_type_compatibility_full): Revert change
819 to allow converting a native int to unmanaged pointer be verifiable
820 under non-strict mode.
821 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
823 * verify.c: Added some TODOs.
825 2008-09-02 Bill Holmes <billholmes54@gmail.com>
827 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
828 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
829 Changed to use GlobalAlloc for the memory returned on Windows platforms.
831 Code is contributed under MIT/X11 license.
833 2008-09-02 Jb Evain <jbevain@novell.com>
835 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
837 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
839 reflection.c (typebuilder_setup_fields): Handle classes with
842 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
844 class.c (mono_class_setup_events): Add memory barrier due to
845 double checked locking.
847 class.c (mono_class_setup_properties): Same.
849 2008-08-31 Zoltan Varga <vargaz@gmail.com>
851 * class.c (mono_class_is_assignable_from): Fix the build.
853 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
854 before accessing klass->interface_bitmap. Fixes #421744.
856 2008-08-28 Zoltan Varga <vargaz@gmail.com>
858 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
859 the runtime into no-exec mode, useful when running the AOT compiler.
861 * appdomain.c gc.c object.c: Avoid executing managed code when running
864 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
866 * reflection.c (_mono_reflection_get_type_from_info): Handle the
867 special case when the mono_assembly_loaded () returns NULL because the
868 search hook is not installed.
870 2008-08-25 Zoltan Varga <vargaz@gmail.com>
872 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
873 crashes in bstr marshalling on linux.
875 2008-08-24 Zoltan Varga <vargaz@gmail.com>
877 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
878 with more than one parameter.
880 2008-08-24 Miguel de Icaza <miguel@novell.com>
882 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
883 start/stop flow control as well when turning off ICANON (allows
884 C-s and C-q to be read by Console.ReadKey).
886 2008-08-24 Zoltan Varga <vargaz@gmail.com>
888 * class.c (mono_class_init): Move the initialization of nested classes
889 into mono_class_get_nested_types (). Fixes #418433.
891 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
894 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
895 iterating tough the nested classes of a class.
897 2008-08-23 Zoltan Varga <vargaz@gmail.com>
899 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
902 2008-08-22 Miguel de Icaza <miguel@novell.com>
904 * console-io.c (sigcont_handler): Support signal chaining for
907 (console_set_signal_handlers): Use best practices with sigaction,
908 clear the structure before using it.
910 2008-08-22 Robert Jordan <robertj@gmx.net>
912 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
913 Fix the Windows build.
915 2008-08-22 Zoltan Varga <vargaz@gmail.com>
917 * class.c (mono_class_generic_sharing_enabled): Make the default
918 sharing mode 'corlib'.
920 2008-08-21 Zoltan Varga <vargaz@gmail.com>
922 * console-io.c (console_set_signal_handlers): Fix a warning.
924 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
925 method normally, the JIT will take care of avoiding recursion.
927 2008-08-20 Bill Holmes <billholmes54@gmail.com>
929 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
931 Code is contributed under MIT/X11 license.
933 2008-08-20 Miguel de Icaza <miguel@novell.com>
935 * console-io.c (sigcont_handler): We need to restore the entire
936 termios state, not only the original settings, as things like echo
937 can be controlled after this (Booish exposes this issue with its
938 own ReadLine implementation).
940 Additionally, we need to set the terminal back into keypad_xmit
943 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
944 string as a paramter as well. Otherwise we get different
947 2008-08-20 Zoltan Varga <vargaz@gmail.com>
949 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
950 delegates with byref out parameter passing. Fixes #351520.
952 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
954 (mono_type_get_desc): Add the type arguments for GENERICINST.
955 (mono_method_full_name): Stringify the class name using mono_type_full_name
956 so it picks up generic arguments.
958 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
960 * console-io.c: Removed debug output.
962 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
964 reflection.c (mono_reflection_create_runtime_class): Alloc
965 the nested classes linked list using the dynamic image mempool.
966 Fixes leak in corlib compilation.
968 2008-08-19 Miguel de Icaza <miguel@novell.com>
970 * console-io.c: Fix incredibly annoying behavior on the console
971 after resuming execution after control-z. This affected every
974 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
976 * mempool-internals.h: Header for mono private mempool functions. The first
977 two function are for allocating glib linked lists using pools.
979 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
981 * Makefile.am: Added mempool-internals.h.
983 2008-08-16 Zoltan Varga <vargaz@gmail.com>
985 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
986 (mono_domain_free): Ditto.
988 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
989 be used by the JIT to store its domain-specific information, instead of putting
990 it directly into MonoDomain.
992 * domain.c (mono_install_create_domain_hook): New helper function to install
993 a hook which initializes domain->runtime_info.
995 * domain.c (mono_install_free_domain_hook): Ditto.
997 2008-08-15 Zoltan Varga <vargaz@gmail.com>
999 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
1000 asserting if the ares parameter is null.
1002 * mono-perfcounters.c: Fix warnings.
1004 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
1005 is not needed, don't check for interruptions either.
1006 (mono_marshal_get_delegate_end_invoke): Ditto.
1008 2008-08-15 Marek Habersack <mhabersack@novell.com>
1010 * mono-perfcounters.c (predef_readonly_counter): added support for
1011 reading the ASP.NET Requests Queued counter from another process.
1013 2008-08-12 Zoltan Varga <vargaz@gmail.com>
1015 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
1016 MonoImage to simplify the AOT code.
1018 2008-08-10 Zoltan Varga <vargaz@gmail.com>
1020 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
1021 marshalling. Fixes #416078.
1023 2008-08-08 Zoltan Varga <vargaz@gmail.com>
1025 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
1026 it is set, looking up the icall address is deferred to the JIT, since
1027 in embedded scenarios, the icall might not be registered in the runtime
1028 doing the AOT compilation. Backported from the 2.0 branch.
1030 2008-08-08 Zoltan Varga <vargaz@gmail.com>
1032 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
1035 2008-08-05 Marek Habersack <mhabersack@novell.com>
1037 * Makefile.am: added support for cross-compilation.
1039 2008-08-04 Zoltan Varga <vargaz@gmail.com>
1041 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
1043 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
1045 * mono-perfcounters.c: jitted methods and jitted bytes counters.
1047 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
1049 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
1050 mono-perfcounters.c: performance counters implementation.
1052 2008-07-31 Zoltan Varga <vargaz@gmail.com>
1054 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
1055 to gpointer, letting the AOT code decide what to store in it.
1057 2008-07-31 Bill Holmes <billholmes54@gmail.com>
1059 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
1060 mono_class_setup_methods if the methods are not initialized.
1062 Code is contributed under MIT/X11 license.
1064 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
1066 * verify.c: Remove some debug code I commited by accident.
1068 * verify.c (mono_method_is_valid_in_context): Change the return value
1069 to make possible to distinguish between invalid and unverifiable.
1071 * verify.c (verifier_load_method): Don't return NULL for unverifiable
1074 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
1076 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
1077 constraints. Fixes regression in gtest-253.
1079 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
1081 * verify.c (mono_verifier_verify_class): Don't allow generic types
1082 with explicit layout.
1084 * verify.c (mono_method_verify): Check locals and argument types.
1086 2008-07-29 Zoltan Varga <vargaz@gmail.com>
1088 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
1089 wait if the thread is in StopRequested state.
1091 * class.c (mono_class_from_name): Refactor the module searching code into
1092 a separate function so it can be reused in the AOT case too.
1094 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
1096 * verify.c (mono_type_is_valid_in_context): Improve the error message.
1097 Check both the type and it's generic type definition for loader errors.
1099 * verify.c (mono_method_is_valid_in_context): Don't generate another
1100 error when a type errors occur, this leads to the wrong exception been
1103 2008-07-28 Dick Porter <dick@ximian.com>
1107 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
1108 New internal calls to duplicate and close a process handle.
1110 2008-07-27 Andreas Färber <andreas.faerber@web.de>
1112 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
1114 2008-07-27 Zoltan Varga <vargaz@gmail.com>
1116 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
1118 2008-07-27 Robert Jordan <robertj@gmx.net>
1120 * class.c (mono_class_init): Don't compute class.has_finalize for
1121 valuetypes. Fixes #412477.
1123 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
1125 * verify.c: Implement constraint equivalence checking.
1126 This is required when a generic parameter is used as
1127 argument to a constrained one.
1131 2008-07-24 Zoltan Varga <vargaz@gmail.com>
1133 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1135 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
1137 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
1138 synch with managed object layout.
1140 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
1142 * verify.c (do_branch_op): Handle valuetypes and generic
1145 * verify.c (do_cmp_op): Same.
1149 2008-07-24 Mark Probst <mark.probst@gmail.com>
1151 * generic-sharing.c: Fix memory leaks.
1153 * class.c, class-internals.h: Make
1154 mono_class_inflate_generic_type_with_mempool() non-static.
1156 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
1158 * pedump.c (dump_verify_info): Dump full class name.
1160 2008-07-24 Mark Probst <mark.probst@gmail.com>
1162 * generic-sharing.c: Removed some old code that didn't do anything.
1164 2008-07-24 Massimiliano Mantione <massi@ximian.com>
1165 * profiler.c: Added runtime_initialized_event,
1166 mono_profiler_install_runtime_initialized and
1167 mono_profiler_runtime_initialized. This new hook tells the profiler
1168 when the runtime is sufficiently initialized to be able to call
1169 mono_thread_attach on the root appdomain.
1170 * profiler.h, profiler-private.h: Likewise.
1172 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
1174 * verify.c (do_cast): Do boxing for generic arguments as well.
1176 * class.c (is_nesting_type): Drop generic instantiations before
1177 checking for nesting.
1179 * class.c (can_access_instantiation): Allow access to generic
1182 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
1184 * verify.c (verify_class_for_overlapping_reference_fields):
1185 On some cases, the field size might be zero, guard against that.
1186 Fix the explicit layout check to work as expected.
1188 2008-07-23 Zoltan Varga <vargaz@gmail.com>
1190 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
1191 mono_thread_resume () during shutdown, since the thread we want to abort
1194 2008-07-22 Zoltan Varga <vargaz@gmail.com>
1196 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
1199 * debug-mono-symfile.c: Fix a warning.
1201 * mono-perfcounters.c (get_cpu_times): Fix a warning.
1203 * object.c (mono_class_vtable): Check if exception_type is set, and return
1204 NULL as defined by the function comments.
1206 2008-07-22 Mark Probst <mark.probst@gmail.com>
1208 * mempool.c: Use malloc for every single mempool allocation if the
1209 configure option is set. This makes it easier to track mempool
1210 allocations with tools like Valgrind.
1212 2008-07-22 Jb Evain <jbevain@novell.com>
1214 * reflection.c (create_dynamic_mono_image): emit the same
1215 metadata version that SL2 does when creating a SL2 image.
1217 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
1220 * icall.c: New icall System.Enum:get_hashcode. This function
1221 avoids the overhead of boxing the enum to the underlying type.
1223 2008-07-21 Mark Probst <mark.probst@gmail.com>
1225 * reflection.c (mono_method_get_object): Don't let static RGCTX
1226 invoke wrappers get into MonoReflectionMethods.
1228 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
1230 * object-internals.h:
1231 * object.c: New mono_runtime_class_init_full function
1232 that makes throwing the exception optinal.
1234 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
1235 for the case where the exception object is supplied.
1237 2008-07-16 Kornél Pál <kornelpal@gmail.com>
1239 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
1242 Contributed under MIT/X11 license.
1244 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
1246 * string-icalls.c (ves_icall_System_String_InternalSplit):
1247 Optimize array allocation by caching the MonoClass of the
1250 * icall.c (ves_icall_Type_GetMethodsByName): Same.
1252 * reflection.c (mono_param_get_objects): Same.
1254 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
1257 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
1258 It inflates the given type using the class context.
1260 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
1262 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
1263 the vtable if it already exists.
1265 * object-internals.h: Add mono_class_try_get_vtable as part of the
1268 * reflection.c (mono_type_get_object): Use the MonoObject from the
1269 vtable when possible. Reduces locking contention on reflection heavy
1272 2008-07-15 Zoltan Varga <vargaz@gmail.com>
1274 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
1275 g_bit_nth_msf () since that macro is not implemented in eglib.
1277 2008-07-13 Zoltan Varga <vargaz@gmail.com>
1279 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
1280 on platforms which do not support it.
1282 2008-07-12 Zoltan Varga <vargaz@gmail.com>
1284 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
1286 2008-07-11 Martin Baulig <martin@ximian.com>
1288 * mono-debug-debugger.h
1289 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
1291 * mono-debug-debugger.c
1292 (_mono_debugger_interruption_request): New global volatile variable.
1293 (mono_debugger_check_interruption): New public function.
1296 (mono_thread_current_check_pending_interrupt): Call
1297 mono_debugger_check_interruption().
1298 (mono_thread_interruption_checkpoint_request): Likewise.
1300 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
1302 * verify.c: Add more type checks for loaded types. Verify the result
1303 handle from ldtoken.
1305 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
1307 * loader.c (field_from_memberref): Don't crash if the field
1310 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
1312 * verify.c: Verify if type and method instantiations
1313 don't have invalid VAR or MVAR arguments.
1315 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
1317 * verify.c: Fix double free of function pointer list.
1319 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
1321 * object.c (mono_string_to_utf8): Comment the new code as it
1324 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
1326 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
1328 2008-07-07 Bill Holmes <billholmes54@gmail.com>
1330 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
1331 is not throw too many times.
1333 Code is contributed under MIT/X11 license.
1335 2008-07-07 Zoltan Varga <vargaz@gmail.com>
1337 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
1338 debugging is turned off.
1340 2008-07-06 Zoltan Varga <vargaz@gmail.com>
1342 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
1344 2008-07-04 Mark Probst <mark.probst@gmail.com>
1346 * class-internals.h, class.c: Added new generic sharing option:
1347 Share only stuff in System.Collections.Generic, which is now the
1350 2008-07-04 Mark Probst <mark.probst@gmail.com>
1352 * generic-sharing.c, class-internals.h: New function for getting a
1353 generic method in a generic class given the corresponding method
1354 for a different instantiation of the class. Partly refactored
1355 from mini-trampolines.c.
1357 * class.c: Make sure generic methods have a class_inst if they are
1358 part of a generic class.
1360 * metadata.c (mono_type_stack_size_internal): Handle type
1363 2008-07-04 Mark Probst <mark.probst@gmail.com>
1365 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
1366 Signifies whether information on the this/vtable/mrgctx variable
1369 2008-07-04 Mark Probst <mark.probst@gmail.com>
1371 * object.c, object-internals.h, icall.c: New function
1372 mono_delegate_ctor_with_method(), which does the same as
1373 mono_delegate_ctor(), but takes an explicit method argument
1374 instead of taking the method from the jit info.
1376 * marshal.c: When creating a delegate with an inflated method take
1377 the "this" argument as the target class for the castclass.
1379 2008-07-03 Mark Probst <mark.probst@gmail.com>
1381 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
1382 mono_jit_info_table_find() to perform very badly in some cases.
1384 2008-07-02 Zoltan Varga <vargaz@gmail.com>
1386 * icall.c (type_from_typename): Handle 'string'.
1388 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
1389 wrappers into the wrapper_hash, since the key is not a MonoMethod.
1391 2008-07-01 Zoltan Varga <vargaz@gmail.com>
1393 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
1395 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
1396 number of available managed allocator types.
1398 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
1399 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
1401 2008-06-30 Zoltan Varga <vargaz@gmail.com>
1403 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
1404 which is a low level lock protecting just the 'jit_code_hash' hash table.
1406 * domain.c: Initialize+cleanup jit_code_hash_lock.
1408 2008-06-30 Kornél Pál <kornelpal@gmail.com>
1410 * coree.c (mono_load_coree): Set coree_module_handle global variable only
1411 after initialization.
1413 * coree.h: Make MonoFixupExe internal.
1415 Contributed under MIT/X11 license.
1417 2008-06-30 Kornél Pál <kornelpal@gmail.com>
1419 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
1420 because that is platform independent. Check NumberOfRvaAndSizes in PE32
1422 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
1423 image being loaded is a CLI image and _CorValidateImage gets called.
1425 * coree.h: Add MonoLoadImage.
1427 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
1428 instead of LoadLibrary.
1430 Contributed under MIT/X11 license.
1432 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
1434 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
1435 for any primitive type.
1437 2008-06-29 Zoltan Varga <vargaz@gmail.com>
1439 * object.c (mono_array_new_specific): Optimize this and the other allocation
1442 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
1443 domains too if mono_dont_free_domains is set.
1445 * domain-internals.h (mono_dont_free_domains): New internal option controlling
1446 whenever to free appdomain data after it has been unloaded.
1448 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
1450 2008-06-28 Zoltan Varga <vargaz@gmail.com>
1452 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
1453 (mono_method_get_equivalent_method): Fix a warning.
1455 * object.c (mono_message_init): Avoid looking up array types for each call.
1457 2008-06-27 Zoltan Varga <vargaz@gmail.com>
1459 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
1462 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
1465 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
1468 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
1471 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
1473 * object.c (mono_value_box): Fix boxing of nullables.
1475 2008-06-26 Kornél Pál <kornelpal@gmail.com>
1477 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
1478 mono_module_handle that is defined by the linker; no initialization required.
1479 * coree.h: Remove mono_module_handle, add __ImageBase, update
1480 mono_image_open_from_module_handle.
1481 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
1482 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
1483 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
1484 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
1485 to 4 GB away from image base address. IA64 version is not tested but was very
1486 easy to implement and should work if we ever need it.
1487 * domain.c (mono_init_internal): Avoid system error message boxes.
1488 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
1489 with has_entry_point. Handle do_mono_image_load fauilre correctly.
1490 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
1491 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
1492 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
1494 Contributed under MIT/X11 license.
1496 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1498 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
1499 as part of the private mono API.
1501 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
1502 Do proper argument checking for methods that belong to generic classes.
1503 Do proper type resolution for GMFH/2.
1506 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1508 * verify.c (do_switch): Fix a memory corruption bug with
1509 the jump index is out of bound.
1511 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1513 * verify.c: Disable debug code.
1515 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
1517 * reflection.c (mono_image_get_methodbuilder_token): Use
1518 mono_image_get_methodspec_token_for_generic_method_definition
1519 instead of mono_image_get_memberref_token. We cache more memberef
1522 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1524 * verify.c: Inflate exception clause types.
1527 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1529 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
1532 * reflection.c (mono_image_get_ctorbuilder_token): Same.
1534 * reflection.c (mono_image_create_method_token): Same.
1536 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
1538 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
1539 It does the same as mono_image_get_methodref_token but works on
1542 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
1543 and always generate a methodspec. This follows the old behavior and fixes
1544 the regressions in System.Core.
1546 2008-06-24 Zoltan Varga <vargaz@gmail.com>
1548 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
1549 don't event mono_class_get () succeeds. Fixes #402182.
1551 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
1553 * metadata-internals.h: Added MonoDynamicImage::methodspec
1554 hashtable to store methodspec tokens created for MethodBuilders.
1556 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
1557 MethodBuilders as open instantiations if a methodspec was requested.
1559 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
1561 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
1563 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
1567 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
1569 * loader.c (method_from_methodspec): Avoid crashing if the
1570 method lookup fails.
1572 2008-06-20 Dick Porter <dick@ximian.com>
1574 * socket-io.c (get_socket_assembly): Cope with Moonlight network
1575 classes being in a different assembly. Fixes bug 399184.
1577 2008-06-20 Zoltan Varga <vargaz@gmail.com>
1579 * loader.c (mono_loader_init): Make this callable multiple times.
1580 (mono_dllmap_insert): Call mono_loader_init () so this works even before
1581 the runtime is initialized. Fixes #401755.
1583 2008-06-19 Dick Porter <dick@ximian.com>
1585 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
1588 2008-06-19 Dick Porter <dick@ximian.com>
1591 * icall-def.h: Implement Socket generic Send() and Receive()
1592 methods. Fixes bug 395168.
1594 2008-06-19 Kornél Pál <kornelpal@gmail.com>
1596 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
1598 Contributed under MIT/X11 license.
1600 2008-06-18 Martin Baulig <martin@ximian.com>
1602 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
1603 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
1604 set to 80.0. The debugger <-> runtime interface is now frozen as
1608 (mono_debug_debugger_version): Bump to 4.
1610 2008-06-18 Martin Baulig <martin@ximian.com>
1612 * debug-mono-symfile.c
1613 (load_symfile): Don't check the minor version.
1615 * debug-mono-symfile.h: Bump the version number to 50.0.
1617 2008-06-18 Martin Baulig <martin@ximian.com>
1619 * debug-mono-symfile.c
1620 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
1621 minimum required version.
1623 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
1625 * reflection.c (mono_custom_attrs_from_property): Fix support for
1626 retriveving cattrs of dynamic inflated generic types.
1628 * reflection.c (mono_custom_attrs_from_event): Same.
1630 * reflection.c (mono_custom_attrs_from_field): Same;
1632 * reflection.c (typebuilder_setup_events): Same cattrs of events.
1634 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
1635 Moved to metadata.c.
1637 * metadata.c: New functions to retrive the equivalent field, event
1638 of property from the generic type definition.
1640 * metadata-internals.h: Added new functions from metadata.c.
1642 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
1644 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
1645 to cached in a mempool is used.
1647 * metadata.c (free_generic_class): In some situations field generic_info type
1648 is not properly dup'ed and leads to double free'ing.
1652 2008-06-17 Mark Probst <mark.probst@gmail.com>
1654 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
1655 this arguments (will be needed later for generic methods).
1658 2008-06-17 Mark Probst <mark.probst@gmail.com>
1660 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
1661 Create a static RGCTX invoke wrapper for methods which require it.
1663 2008-06-17 Mark Probst <mark.probst@gmail.com>
1665 * object.c, class-internals.h: New function for checking whether
1666 an individual field is special static.
1668 2008-06-15 Zoltan Varga <vargaz@gmail.com>
1670 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
1671 linear search since the table is sorted.
1673 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
1676 2008-06-14 Zoltan Varga <vargaz@gmail.com>
1678 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
1679 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
1681 * gc.c (mono_domain_finalize): Allow an infinite timeout.
1683 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
1685 * threads.c (mono_thread_request_interruption): Get rid of locking, use
1686 InterlockedCompareExchange to query and modify
1687 thread->interruption_requested.
1689 * object-internals.h (struct _MonoThread): Change interruption_requested
1690 to a gint32 so it can be modified by atomic operations. Add
1691 'critical_region_level' from the managed side, change small_id to a guint32,
1692 add new set of 'unused' fields.
1694 * appdomain.c: Bump corlib version.
1696 2008-06-13 Zoltan Varga <vargaz@gmail.com>
1698 * class.c (mono_class_from_name): Search modules as well. Fixes
1701 2008-06-13 Mark Probst <mark.probst@gmail.com>
1703 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
1704 templates. Templates are generalized with an additional type_argc
1705 argument. RGCTX templates have type_argc==0, MRGCTX templates
1708 * domain-internals.h, domain.c: New hash table for looking up
1711 * metadata.c, metadata-internals.h: Rename hash and equal
1712 functions for MonoGenericInst's and make them public.
1714 * class-internals.h: New data structures for the MRGCTX. Macros
1715 for distinguishing slots in the RGCTX and the MRGCTX.
1717 2008-06-13 Mark Probst <mark.probst@gmail.com>
1719 * object.c (mono_method_get_imt_slot): Put the same methods of
1720 different instantiations of the same generic interface in the same
1721 IMT slots, to make generic sharing simpler.
1723 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
1725 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
1727 * metadata.c (mono_metadata_field_info_with_mempool): Added.
1728 This function works just like mono_metadata_field_info, but
1729 accept a mempool as argument to be used allocating memory.
1731 * marshal.c (mono_marshal_load_type_info): Use new function
1732 to load marshal data into image mempool.
1734 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
1736 * class.c (mono_class_inflate_generic_type_with_mempool):
1737 This function allows to inflate a generic type using
1740 * class.c (inflate_generic_type): Take a mempool as argument
1741 and use it to do type dup'ing.
1743 * class.c (mono_class_setup_fields): Field type for generic
1744 generic classes are allocated from the image mempool.
1746 * metadata.c (free_generic_class): Inflated field type is
1747 now allocated in the image mempool.
1749 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
1751 * threads.c (thread_cleanup): Free MonoThread::name.
1753 2008-06-12 Marek Habersack <mhabersack@novell.com>
1755 * appdomain.c (ensure_directory_exists): avoid unnecessary
1756 mkdir(2) calls when the shadow directory already exists.
1757 (mono_make_shadow_copy): copy also satellite assemblies from the
1758 private bin directories.
1760 2008-06-11 Zoltan Varga <vargaz@gmail.com>
1762 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
1764 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
1765 a page boundary. Fixes #396219.
1767 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
1769 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
1770 due to double-checked locking.
1772 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
1774 * assembly.c (build_assembly_name): Release memory on failure.
1776 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
1778 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
1780 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
1783 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
1785 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
1788 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
1790 * loader.c (field_from_memberref): Check if field signature type is equal
1791 to the non-inflated type of the field. Fixes #398980.
1793 2008-06-11 Zoltan Varga <vargaz@gmail.com>
1795 * assembly.c (mono_assembly_load_from_full): Call
1796 mono_assembly_load_friends () outside the assemblies lock, since it can
1797 acquire the loader lock. Fixes #323696.
1799 * reflection.c (resolve_object): Inflate the inst with the context for
1800 FieldOnTypeBuilderInst. Fixes #399010.
1802 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
1804 * reflection.c (mono_image_get_field_on_inst_token): Don't
1805 inflate the field to encode it's signature. If it's a
1806 VAR or MVAR it should stay that way in the signature.
1809 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
1811 * reflection.c (resolve_object): Release memory of inflated types.
1813 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
1815 * loader.c (mono_method_get_signature_full): Remove assert about
1816 loading a methodspec to a generic method. We have such methods, such as
1817 System.Threading.Interlocked::CompareExchange<T>.
1818 This assert was removed since it crashes the verifier when it checks
1819 methods calling CompareExchange<T>.
1821 2008-06-10 Marek Safar <marek.safar@gmail.com>
1823 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
1824 of Type array and not MonoType.
1826 2008-06-10 Marek Habersack <mhabersack@novell.com>
1828 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
1831 2008-06-10 Martin Baulig <martin@ximian.com>
1833 * debug-mono-symfile.h
1834 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
1835 changes to the file format, but we were generating incorrect
1836 source file indices in the line number table due to a bug, which
1837 made backtraces report an incorrect source file.
1839 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
1841 * mono-debug.c: Moved mono_debug_free_method_jit_info from
1842 mini/debug-mini.c to here.
1844 * mono-debug.c (il_offset_from_address): Free memory from find_method.
1846 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
1847 use it to release structs returned by mono_debug_find_method.
1849 2008-06-10 Zoltan Varga <vargaz@gmail.com>
1851 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
1852 since it needs to set method->slot for all interface methods.
1854 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
1856 * class-internals.h: Forgot to add.
1858 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
1860 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
1862 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
1863 Lookup the custom attributes from property_hash.
1865 * reflection.c (mono_save_custom_attrs): Save the custom attributes
1866 in property_hash. Allocate all data using the image mempool.
1868 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
1869 for dynamic_custom_attrs to checks if the image is dynamic.
1871 2008-06-09 Zoltan Varga <vargaz@gmail.com>
1873 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
1876 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
1877 runtime functions while holding the domain assemblies lock.
1879 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
1881 * verify.c: Reapplied the last bit of the reverted changes.
1883 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
1885 * verify.c: Reapplied more of the reverted changes.
1887 2008-06-09 Martin Baulig <martin@ximian.com>
1889 * debug-mono-symfile.c (load_symfile): Check the major version
1890 first; if it's wrong, don't print the minor version in the error message.
1892 2008-06-09 Zoltan Varga <vargaz@gmail.com>
1894 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
1895 lock instead of the domain lock to avoid deadlocks, since the thread might
1896 already hold the loader lock.
1898 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
1899 (mono_thread_attach): Ditto.
1901 * monitor.c: Use a TLS variable for holding the current thread id instead
1902 of calling pthread_self ().
1903 (mono_monitor_init_tls): New internal function to initialize the TLS
1905 (mono_monitor_try_enter_internal): Put the owner == id check after the
1908 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
1909 missed optimizations when using gcc-4.3.
1911 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
1913 * reflection.c (mono_dynamic_image_free): Free the memory
1914 used by MonoGenericParam in MonoDynamicImage::gen_param.
1916 * reflection.c (mono_reflection_setup_generic_class): Allocate
1917 container from mempool.
1919 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
1920 container from mempool.
1922 2008-06-07 Zoltan Varga <vargaz@gmail.com>
1924 * threads.c (mono_set_pending_exception): New internal function to set the
1925 pending exception of the current thread.
1926 (mono_thread_get_and_clear_pending_exception): Check for
1927 thread->pending_exception as well.
1929 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
1931 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
1932 it can trigger a collection.
1934 2008-06-06 Martin Baulig <martin@ximian.com>
1936 Merged the `debugger-kahalo' branch.
1939 (MONO_DEBUGGER_VERSION): Bumped to 72.
1941 * debug-mono-symfile.h
1942 (MonoSymbolFileMethodIndexEntry): Removed.
1943 (MonoSymbolFileMethodEntry): New public typedef.
1944 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
1945 (MonoSymbolFileSourceEntry): Remove everything except `index' and
1947 (MonoSymbolFileMethodEntry): Removed.
1948 (MonoSymbolFileLexicalBlockEntry): Removed.
1949 (MonoSymbolFileLineNumberEntry): Removed.
1950 (MonoDebugLexicalBlockEntry): Removed.
1951 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
1952 removed `num_il_offsets' and `il_offsets'.
1953 (MonoSymbolFile): Replace `version' with `major_version' and
1955 (MONO_SYMBOL_FILE_VERSION): Replace with
1956 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
1957 `MONO_SYMBOL_FILE_MINOR_VERSION'.
1959 * debug-mono-symfile.c
1960 (mono_debug_symfile_lookup_location): Add support for the new line
1961 number table format.
1963 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
1965 * metadata.c (free_generic_class): Release the inflated
1966 MonoClass of dynamic generic classes if it's not a generic
1969 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
1971 * verify.c: Reapplied more of the reverted changes.
1973 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
1975 * reflection.c (lookup_custom_attr): Clean the cached flag or
1976 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
1979 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
1981 * verify.c: Reapplied a small part of the reverted changes.
1983 2008-06-07 Zoltan Varga <vargaz@gmail.com>
1985 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1987 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
1988 previously in managed code.
1989 (mono_monitor_exit): Ditto.
1990 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
1992 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
1993 the managed definition.
1995 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
1997 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
1999 2008-06-06 Zoltan Varga <vargaz@gmail.com>
2001 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
2003 * monitor.c: Add some micro optimizations.
2005 * icall.c (type_from_typename): Handle 'bool'.
2007 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
2009 * verify.c: Implement constructor verification per P III 1.8.1.4.
2012 2008-06-06 Zoltan Varga <vargaz@gmail.com>
2014 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
2015 holding the assemblies lock here too.
2017 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2019 * verify.c: Kill stack_top function.
2021 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2023 * verify.c: Kill stack_get function.
2025 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2027 * verify.c (mono_method_verify): Last change broke the build. Fixed.
2029 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
2031 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
2034 * verify.c (mono_method_verify): Inflate params and locals to avoid
2035 mismatch when checking for compatibility.
2037 2008-06-05 Jonathan Chambers <joncham@gmail.com>
2039 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
2040 Length prefix should be size in bytes. Fix bug #339530.
2042 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
2043 Length prefix should be size in bytes. Fix bug #339530.
2045 Code is contributed under MIT/X11 license.
2047 2008-06-05 Bill Holmes <billholmes54@gmail.com>
2049 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
2051 Contributed under MIT/X11 license.
2053 2008-06-05 Martin Baulig <martin@ximian.com>
2055 * mono-debug-debugger.c
2056 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
2058 2008-06-05 Zoltan Varga <vargaz@gmail.com>
2060 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
2061 while holding the assemblies lock to prevent deadlocks. Handle the case
2062 where the search hook returns NULL but the assembly was still loaded.
2065 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
2066 modify domain state.
2068 2008-06-05 Andreas Färber <andreas.faerber@web.de>
2070 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
2071 * Makefile.am (pedump_LDADD): Post-process object files and
2072 add dtrace-generated object file, if necessary.
2074 Code is contributed under MIT/X11 license.
2076 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
2078 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
2080 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
2082 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
2084 2008-06-04 Mark Probst <mark.probst@gmail.com>
2086 * threads.c: Try to free everything from the delayed free table
2087 when shutting down threads, and set the variable to NULL after the
2088 table is freed so that calling
2089 mono_thread_hazardous_try_free_all() when shutting down the root
2090 domain doesn't crash.
2092 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
2094 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
2095 the caller if resulting type was inflated.
2097 * class.c (mono_class_create_from_typespec): Free the MonoType if it
2100 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
2103 2008-06-04 Zoltan Varga <vargaz@gmail.com>
2105 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
2106 class library tests.
2108 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
2109 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
2112 2008-06-04 Mark Probst <mark.probst@gmail.com>
2114 * domain.c, domain-internals.h: The JIT infos are now freed by the
2115 JIT info table code. They are freed immediately if there only a
2116 single JIT info table in circulation. If there is more, the free
2117 is delayed via a queue.
2119 * threads.c, threads-types.h: New hazard pointer function for
2120 freeing all freeable delayed items in one sitting.
2122 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2124 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
2126 * reflection.c (typebuilder_setup_properties): Same.
2128 * reflection.c (typebuilder_setup_events): Same.
2130 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2132 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
2133 and use it for allocating memory.
2135 * reflection.c (mono_marshal_spec_from_builder): Same.
2137 * reflection.c: Change code to use new signatures.
2139 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
2141 2008-06-03 Zoltan Varga <vargaz@gmail.com>
2143 * decimal.c (rescale128): Put back one line which was accidently commented
2146 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
2149 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2151 * reflection.c (mono_reflection_generic_class_initialize): Name must
2152 be always malloc'ed so we can free it later on. Do this for field, property
2155 * metadata.c (free_generic_class): Free field, property and event names.
2157 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2159 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
2160 instead of g_memdup.
2162 * reflection.c (typebuilder_setup_fields): Same.
2164 2008-06-03 Zoltan Varga <vargaz@gmail.com>
2166 * decimal.c (rescale128): Optimize this function a bit more.
2168 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2170 * metadata.c (free_generic_class): Release some memory from
2171 SRE generic classes.
2173 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
2175 * reflection.c (mono_image_get_generic_field_token): No reference
2176 to name is kept, free it.
2178 * reflection.c (mono_reflection_generic_class_initialize): Free
2179 more memory of the inflated field.
2181 2008-06-03 Zoltan Varga <vargaz@gmail.com>
2183 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
2186 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
2188 * reflection.c (mono_dynamic_image_free): Release memory used by
2189 MonoDynamicImage::array_methods elements.
2191 * reflection.c (assembly_add_win32_resources): Release memory after
2194 2008-06-02 Zoltan Varga <vargaz@gmail.com>
2196 * decimal.c (log2_32): Use an optimized version for this function too.
2198 * decimal.c (log2_64): Fix this on 32 bit machines.
2200 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
2202 * class.c (mono_dup_array_type): Implement allocation using a mempool.
2204 * class.c (mono_metadata_signature_deep_dup): Same.
2206 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
2209 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
2211 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
2213 * metadata-internals.h: Added mono_metadata_signature_dup_full.
2215 * class-internals.h: Update signatures to take a MonoMemPool.
2217 2008-06-02 Dick Porter <dick@ximian.com>
2219 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
2221 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
2222 FormatMessage API to get the error text. Fixes bug 321827.
2224 2008-06-02 Zoltan Varga <vargaz@gmail.com>
2226 * decimal.c: Add some micro optimizations to make decimal operations faster.
2228 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
2230 * reflection.c (method_encode_clauses): Take a mempool
2231 as parameter and use it to allocate the clause array.
2233 * reflection.c (mono_image_get_field_on_inst_token): Free
2234 the inflated type after encoding it.
2236 * reflection.c (mono_dynamic_image_free): Free each element
2237 of MonoDynamicImage::gen_params.
2239 * reflection.c (reflection_methodbuilder_to_mono_method):
2240 Allocate the generic param array from the mempool.
2241 Allocate signature params from the mempool.
2243 * reflection.c (mono_reflection_generic_class_initialize):
2244 Free inflated fields after been used.
2246 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
2248 * icall.c: Reapply the memory leak fixes as they no
2249 longer make mono crash.
2251 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
2253 * reflection.c (mono_type_get_object): Don't store the suplied
2254 MonoType with type_hash. A caller which pass a type that
2255 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
2256 might end with a pointer to freed memory.
2257 The solution is to use byval_arg or this_arg from the associated
2258 MonoClass of the supplied type.
2260 2008-05-29 Zoltan Varga <vargaz@gmail.com>
2262 * icall.c: Revert the rest of the last change as it breaks the build too.
2264 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2266 * icall.c: Revert a leak fix as it's breaking the build.
2268 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2270 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
2272 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2274 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
2276 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
2278 * icall.c: Fix some memory leaks.
2280 2008-05-29 Dick Porter <dick@ximian.com>
2282 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
2283 async socket operations from the pending list when a socket
2284 closes. Leaving it until the threadpool services the event
2285 exposes a race condition when a socket descriptor is reused.
2288 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2290 * object.c: Fix negative index check for array alocation.
2292 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2294 * icall.c, marshal.c: Delegate wrappers should skip visibility.
2295 This check is performed by the verifier for IL created delegates
2296 and by Delegate::CreateDelegate for programatically created ones.
2299 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2301 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
2302 Fix code to use mono_array_size_t instead of int.
2304 Based on patch by Luis F. Ortiz.
2305 Contributed under X11 license.
2306 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
2308 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2310 * icall.c: Added ves_icall_System_Array_GetLongLength and
2311 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
2314 * icall.h: Export both new functions.
2316 Based on patch by Luis F. Ortiz.
2317 Contributed under X11 license.
2318 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
2320 2008-05-28 Martin Baulig <martin@ximian.com>
2322 The debugger now requires exactly r103463.
2324 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
2325 This version is not supported by the debugger, wait for 72.
2327 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2329 * object.h: Changed array related functions to use
2330 mono_array_size_t instead of guint32. Forgot to commit this file.
2332 Patch by Luis F. Ortiz.
2333 Contributed under X11 license.
2334 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
2337 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2339 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
2340 don't define it. Use the number literal instead.
2342 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
2344 * icall.c: Changed array related functions to use
2345 mono_array_size_t instead of guint32.
2347 * icall.c (ves_icall_System_Array_GetLength): Check for length
2348 overflow under MONO_BIG_ARRAYS.
2350 Based on patch by Luis F. Ortiz.
2351 Contributed under X11 license.
2352 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
2354 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
2356 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
2358 Based on patch by Luis F. Ortiz.
2359 Contributed under X11 license.
2360 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
2362 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
2364 * object.c, object.h: Changed array related functions to use
2365 mono_array_size_t instead of guint32.
2367 Patch by Luis F. Ortiz.
2368 Contributed under X11 license.
2369 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
2371 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
2373 * object.h: Introduced mono_array_size_t typedef. This must be used
2374 in all places an array length is expected. This is 64bits wide if
2375 MONO_BIG_ARRAYS is enabled.
2377 Patch by Luis F. Ortiz.
2378 Contributed under X11 license.
2379 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
2381 2008-05-27 Zoltan Varga <vargaz@gmail.com>
2383 * security-manager.c class.c: Set the class exception info by calling
2384 mono_class_set_failure ().
2386 * class.c (mono_class_get_exception_data): New accessor function.
2387 (mono_class_set_failure): Store exception_data in the property hash.
2389 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
2390 the struct as a property.
2392 * loader.c (mono_get_method_full): Store the lookup result for method
2393 tokens in method_cache, the others in methodref_cache to decrease the memory
2394 usage of hash tables.
2396 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
2397 (mono_image_init): method_cache is lazy inited now.
2399 * metadata-internals.h (struct _MonoImage): Change method_cache to
2400 a MonoValueHashTable, add a separate methodref_cache.
2402 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
2404 * number-formatter.h: Fix tables to avoid arithemtic overflow in
2405 Double.ToString as exposed by Bug #383531.
2407 2008-05-26 Zoltan Varga <vargaz@gmail.com>
2409 * number-formatter.h: Make some tables static.
2411 * class.c (mono_method_set_generic_container): New accessor function.
2412 (mono_method_get_generic_container): Ditto.
2414 * class-internals.h (struct _MonoMethod): Remove rarely used
2415 'generic_container' field, store it in the property hash instead. Add
2416 'is_generic' boolean field instead.
2418 * image.c (mono_image_init): Initialize property_hash.
2419 (mono_image_close): Destroy property_hash.
2421 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
2422 hold rarely used fields of runtime structures belonging to this image.
2424 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
2425 to get/set method->generic_container.
2427 * loader.c (mono_get_method_from_token): Avoid loading the method header for
2430 2008-05-25 Zoltan Varga <vargaz@gmail.com>
2432 * class.c (mono_class_inflate_generic_method_full): Don't increase
2433 mono_stats.inflated_method_count for methods found in the cache.
2435 * threads.c (mono_thread_request_interruption): Add a comment about
2438 2008-05-24 Zoltan Varga <vargaz@gmail.com>
2440 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
2441 interface_offsets_packed table.
2443 * class.c (mono_class_init): Remove some dead code.
2445 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
2446 mono_class_setup_vtable () when CAS is active to detect security problems.
2448 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
2450 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
2452 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
2453 parameters as it's irrelevant for delegate checking.
2455 2008-05-23 Zoltan Varga <vargaz@gmail.com>
2457 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
2459 * class.c (mono_class_init): Control the creation of a generic vtable using
2460 a global which is true by default, but set to false by the runtime startup code.
2462 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
2463 Disabled for now since it breaks the embedding API.
2464 Move the setup of class->methods for arrays to mono_class_setup_methods ().
2465 (mono_class_setup_methods): Add a memory barrier.
2467 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
2468 when mono_class_init () doesn't compute the generic vtable.
2470 2008-05-23 Massimiliano Mantione <massi@ximian.com>
2471 * profiler.c: Added mono_profiler_install_statistical_call_chain,
2472 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
2473 to support call chains (backtrace) in the stat profiler.
2474 * profiler.c, profiler-private.h: Likewise.
2476 2008-05-22 Mark Probst <mark.probst@gmail.com>
2478 * generic-sharing.c: Init generic class when a method of it is
2479 requested via a runtime generic context.
2481 2008-05-22 Zoltan Varga <vargaz@gmail.com>
2483 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
2485 * reflection.c (mono_type_get_object): Add a FIXME.
2487 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
2489 * class.c (mono_class_get_method_by_index): New helper function, returning an
2490 entry in the class->methods array.
2492 2008-05-21 Zoltan Varga <vargaz@gmail.com>
2494 * class.c (mono_class_init): Only do the array optimization for szarrays.
2495 Avoid creating a generic vtable for generic instances as well.
2496 (mono_class_get_method_from_name_flags): Don't search in the metadata for
2499 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
2501 * loader.c (mono_get_method_constrained): Inflate the signature
2502 with class context. Fix #325283.
2504 2008-05-21 Zoltan Varga <vargaz@gmail.com>
2506 * object.c (mono_class_create_runtime_vtable): Add a comment.
2508 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
2510 (setup_interface_offsets): Handle the case when this is called twice for arrays.
2511 (mono_class_setup_vtable_general): Add an assert.
2512 (mono_class_init): Avoid creating a generic vtable for arrays.
2514 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
2515 here, let mono_class_init () do that.
2517 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
2518 interfaces in mscorlib.
2520 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
2521 interfaces. Add some comments.
2522 (mono_class_init): Call mono_class_setup_methods () here since it is no
2523 longer called by mono_class_setup_vtable ().
2525 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
2526 not set in class->vtable.
2527 (mono_class_create_runtime_vtable): Reenable the disabled code.
2529 * object.c (mono_class_create_runtime_vtable): Disable the last change for
2530 now as it causes some test failures.
2532 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
2533 if using the vtable trampoline. Also remove some strange code which put the
2534 generic methods themselves into the vtable slots. Remove the AOT init_vtable
2535 stuff as it is no longer needed.
2537 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
2539 * pedump.c: Give make --verify all option check code as well.
2540 Using --verify code won't check for metadata now.
2542 2008-05-19 Martin Baulig <martin@ximian.com>
2544 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
2547 (_mono_debug_using_mono_debugger): New global variable; it's set
2548 directly by the debugger, so mono_debug_using_mono_debugger() also
2549 works after attaching.
2551 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
2553 * object.c (mono_class_create_runtime_vtable): Use memory barriers
2554 as we do double checked locking on MonoClass::runtime_info and
2555 MonoClassRuntimeInfo::domain_vtables.
2557 2008-05-18 Zoltan Varga <vargaz@gmail.com>
2559 * debug-helpers.c (print_field_value): Fix a warning.
2561 2008-05-16 Zoltan Varga <vargaz@gmail.com>
2563 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
2564 set in the AOT case.
2566 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
2568 * class.c (mono_class_setup_vtable_general): Use memory barriers
2569 as we do double checked locking on MonoClass::vtable.
2571 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
2573 * reflection.c (resolve_object): Inflate only if the generic context
2574 is not null. Fixes #389886.
2576 2008-05-15 Jonathan Chambers <joncham@gmail.com>
2578 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
2581 Code is contributed under MIT/X11 license.
2583 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
2585 * class.c: Revert unrelated change.
2587 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
2589 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
2590 a generic instantiation, use mono_class_from_mono_type instead of playing
2591 with MonoType directly.
2593 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
2595 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
2596 checks must ignore generic instantiations, so mono_class_has_parent is not
2597 suitable. Fixes #390128.
2599 2008-05-14 Zoltan Varga <vargaz@gmail.com>
2601 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
2602 it to avoid registering tokens during metadata generation. Fixes #390023.
2604 2008-05-14 Kornél Pál <kornelpal@gmail.com>
2606 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
2609 Contributed under MIT/X11 license.
2611 2008-05-14 Kornél Pál <kornelpal@gmail.com>
2613 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
2614 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
2615 to fixup the EXE image.
2616 (mono_cleanup): Use mono_close_exe_image.
2617 (mono_close_exe_image): New function.
2618 * image.c: Include "marshal.h".
2619 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
2620 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
2621 counting when the image is loaded outside of mono_image_open_full. Set status
2622 based on GetLastError.
2623 * coree.c: Include required headers. Add init_from_coree.
2624 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
2625 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
2626 (_CorExeMain): Set init_from_coree.
2627 (CorExitProcess): Only call ExitProcess for now.
2628 (CorBindToRuntimeEx): New stub implementation.
2629 (CorBindToRuntime): New function.
2630 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
2631 (MonoFixupExe): ILONLY executables require no fixups.
2632 (mono_set_act_ctx): New function to set activation context.
2633 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
2634 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
2635 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
2636 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
2638 * domain-internals.h: Add mono_close_exe_image.
2640 Contributed under MIT/X11 license.
2642 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
2644 * metadata.c (mono_metadata_compute_size): Correctly calculate field
2645 size for generic param and event tables. Fixes #388977.
2647 2008-05-13 Zoltan Varga <vargaz@gmail.com>
2649 * loader.c (mono_method_signature): Use memory barriers because of the double
2650 checked locking pattern.
2652 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
2653 aborting or aborted as well. Fixes #376391.
2655 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
2656 existing runtime state in the Suspend handler during shutdown.
2658 2008-05-12 Zoltan Varga <vargaz@gmail.com>
2660 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
2662 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
2663 which are starting up or shutting down.
2665 * threads.c (mono_threads_set_shutting_down): Don't return a value since
2666 this function never returns if the runtime is already shutting down.
2668 * icall.c (ves_icall_System_Environment_Exit): Update after
2669 mono_threads_set_shutting_down () signature change.
2671 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
2673 * class.c: Added can_access_instantiation to verify if the instantiation
2674 is visible. Fix access check for nested types as they returned TRUE
2675 before doing type and generic instantiation visibility checks.
2677 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
2679 * reflection.c (mono_reflection_create_generic_class): The created type
2680 must have a different container from its TypeBuilder. Otherwise they
2681 will end sharing generic arguments, which is wrong.
2683 Due to the sharing, making a generic instance of the created type using
2684 the TypeBuider generic arguments resulted in the generic type definition
2685 been returned, which is wrong as well.
2687 As a bonus the code was leaking the type_params array. This memory should
2688 be allocated from the image mempool.
2690 This fixes bug #354047.
2692 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
2694 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
2695 to here as they are now used in assembly.c new code.
2696 Added a skipverification flag to MonoAssembly.
2697 New internal function mono_assembly_has_skip_verification.
2699 * assembly.c: New function mono_assembly_has_skip_verification. It checks
2700 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
2703 2008-05-07 Zoltan Varga <vargaz@gmail.com>
2705 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
2706 needed. Fixes #387034.
2708 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
2710 2008-05-06 Miguel de Icaza <miguel@novell.com>
2712 * assembly.c (mono_assembly_load_reference): Prevent crash while
2713 disassembling Silverlight 2.0 executables while we still do not
2714 have GACed libraries.
2716 2008-05-07 Zoltan Varga <vargaz@gmail.com>
2718 * reflection.c: Special case generic type definitions as well. Fixes #383444.
2720 2008-05-06 Zoltan Varga <vargaz@gmail.com>
2722 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
2723 of the dynamic case. Fixes #387404.
2725 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2727 *verify.c (mono_verifier_is_class_full_trust): If under
2728 verify_all and the verifier mode was not set, only
2729 gac and corlib types are fulltrust. This makes --verify-all
2730 usable to detect unverifiable code, which is the expected
2733 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2735 * verify.h: Ops, commited the header with debug
2738 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2740 * verify.c (merge_stack): Use the new value on unverifiable
2743 * verify.c (verify_type_compatibility_full): Comparison
2744 of nullable types can't use mono_class_is_assignable_from.
2746 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
2747 that makes all verification errors be reported.
2749 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
2752 2008-05-05 Robert Jordan <robertj@gmx.net>
2754 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
2755 support for value types. See #386415.
2757 * object.c: comments.
2759 Code is contributed under MIT/X11 license.
2761 2008-05-05 Martin Baulig <martin@ximian.com>
2763 * debug-mono-symfile.h
2764 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
2765 for old pre-terrania symbol files.
2767 2008-05-05 Andreas Färber <andreas.faerber@web.de>
2769 * mono-config.c: Add ppc64 architecture.
2771 Code is contributed under MIT/X11 license.
2773 2008-05-05 Andreas Färber <andreas.faerber@web.de>
2775 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
2776 PPC64 uses function descriptors as well.
2778 Code is contributed under MIT/X11 license.
2780 2008-05-04 Zoltan Varga <vargaz@gmail.com>
2782 * object.c (compute_class_bitmap): Ignore literal static fields.
2784 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
2785 var has an invalid format.
2786 (describe_ptr): Add some sanity checks for the vtable.
2787 (add_nursery_frag): Clear unused nursery fragments.
2788 (major_collection): Clear all remaining nursery fragments.
2790 2008-05-03 Robert Jordan <robertj@gmx.net>
2792 * image.c, metadata-internals.h: add thunk_invoke_cache.
2794 * marshal.c, marshal.h: implement
2795 mono_marshal_get_thunk_invoke_wrapper ().
2797 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
2799 Code is contributed under MIT/X11 license.
2801 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
2803 * verify.c (do_leave): Empty the stack.
2805 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
2807 * class.c (mono_class_is_assignable_from): Variance
2808 doesn't work between reference and value types. For example,
2809 given type C<T+>, C<int32> is not assignable to C<object>.
2810 Break the argument checking loop on first error.
2812 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
2814 * icall.c : base64_to_byte_array() needs some more strict
2815 check for sequence of '=' characters. Patch by Santa
2816 Marta (http://deee.g.hatena.ne.jp/santamarta).
2818 Contributed under MIT/X11 license.
2819 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
2821 2008-05-02 Jonathan Chambers <joncham@gmail.com>
2823 * domain.c: Disable LoadLibrary support to fix Win32 build.
2825 Code is contributed under MIT/X11 license.
2827 2008-05-02 Zoltan Varga <vargaz@gmail.com>
2829 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
2830 to help with cache behaviour.
2832 2008-05-01 Miguel de Icaza <miguel@novell.com>
2834 * appdomain.c (mono_domain_from_appdomain): Add new accessor
2837 2008-05-01 Zoltan Varga <vargaz@gmail.com>
2839 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
2841 2008-05-01 Dick Porter <dick@ximian.com>
2843 * process.c (process_get_fileversion): Only pass 16 bits of
2844 language ID to VerLanguageName. Fixes bug 381204.
2846 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2848 * verify.c (mono_method_verify): Fix the comparison
2849 operator for code bounds check.
2851 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
2853 * verify.c (mono_method_verify): Check the bounds of
2854 all access of the code array.
2856 2008-04-29 Kornél Pál <kornelpal@gmail.com>
2858 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
2860 2008-04-28 Zoltan Varga <vargaz@gmail.com>
2862 * image.c (mono_image_strong_name_position): Fix return value when the rva is
2865 2008-04-28 Kornél Pál <kornelpal@gmail.com>
2867 * loader.c (mono_get_method_from_token, mono_method_signature): Add
2868 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
2869 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
2870 fixup main EXE images when using mono.exe for mixed-mode assembly support.
2871 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
2873 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
2874 runtime initialization from metadata.
2875 * assembly.c: Remove obsolete ceGetModuleFileNameA.
2876 (mono_set_rootdir): Use mono_get_module_file_name.
2877 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
2879 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
2880 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
2881 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
2882 MonoCLIImageInfo. Add support for module handles.
2883 (load_cli_header): Update mono_cli_rva_image_map signature.
2884 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
2885 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
2886 (mono_image_rva_map): Add support for module handles.
2887 (mono_image_ensure_section_idx): Add support for module handles.
2888 (mono_image_close): Add support for module handles.
2889 (do_load_header): Add support for module handles.
2890 (mono_image_open_from_module_handle): New function for internal use.
2891 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
2892 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
2893 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
2895 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
2896 * image.h: Add mono_image_fixup_vtable.
2897 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
2899 * coree.h: New file.
2900 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
2901 unsupported native code.
2902 (mono_marshal_set_callconv_from_modopt): New function splitted from
2903 mono_marshal_get_managed_wrapper.
2904 (mono_marshal_get_managed_wrapper): Use
2905 mono_marshal_set_callconv_from_modopt.
2906 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
2907 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
2908 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
2909 that results in a deadlock when the runtime is loaded in _CorDllMain.
2910 * Makefile.am: Add coree.c and coree.h.
2912 Contributed under MIT/X11 license.
2914 2008-04-28 Mark Probst <mark.probst@gmail.com>
2916 * generic-sharing.c: Search for type arguments in array element
2919 2008-04-28 Mark Probst <mark.probst@gmail.com>
2921 * class-internals.h, generic-sharing.c: New, small runtime generic context.
2923 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
2925 * object.c: Don't setup the RGCTX when the vtable is created,
2926 because we're setting it up lazily now.
2928 2008-04-26 Zoltan Varga <vargaz@gmail.com>
2930 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
2933 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2935 * verify.c (verify_class_for_overlapping_reference_fields):
2936 If class is under fulltrust allow reference types to overllap
2937 if they have the same RVA.
2939 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
2941 * pedump.c: Added new flag valid-only, that makes the verifier
2942 behaves just like --security=validil. It won't fail type load
2943 due to unverifiable restrictions.
2945 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2947 * class-internals.h (struct MonoMethod): Added a verification_success
2948 field to cache verifier executions. Reduced MonoMethod:slot size by
2951 2008-04-23 Zoltan Varga <vargaz@gmail.com>
2953 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
2954 instead of a 'vt' argument to save an indirection and to allow these to be used
2956 (scan_vtype): New helper function to scan an area using a gc descriptor.
2957 (mono_gc_wbarrier_value_copy): Implement this.
2958 (handle_remset): Add support for REMSET_VTYPE.
2959 (find_in_remset_loc): Ditto.
2960 (mono_gc_base_init): Allow some debugging options to be controlled through the
2961 use of the MONO_GC_DEBUG env variable.
2962 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
2963 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
2965 2008-04-23 Martin Baulig <martin@ximian.com>
2967 * domain.c (mono_domain_create): Move the call to
2968 mono_debug_domain_create() down, after allocating the domain id.
2970 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2972 verify.c (verify_class_for_overlapping_reference_fields): Skip
2973 static fields while verifying for overlapping fields as they
2974 don't matter at all.
2976 2008-04-23 Marek Habersack <mhabersack@novell.com>
2978 * domain-internals.h: added a declaration of
2979 mono_make_shadow_copy.
2981 * assembly.c (mono_assembly_open_full): shadow copying of
2982 assemblies moved to here, so that all the assemblies within the
2983 application domain's private binary directories can be
2984 processed. Fixes bug #380546
2986 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
2987 mono_make_shadow_copy and made non-static. The decision whether
2988 to shadow-copy an assembly is made based on its location - it's
2989 copied if it's in one of the private application domain binary
2990 directories and its different to the target file in the shadow
2991 directory. Fixes bug #380546
2993 2008-04-22 Zoltan Varga <vargaz@gmail.com>
2995 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
2997 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
3000 * reflection.c (mono_image_create_token): Handle
3001 Method/ConstructorOnTypeBuilderInst.
3002 (resolve_object): Ditto.
3003 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
3004 so it can be called from resolve_object. Also handle the case when the inflated
3005 class already has its methods setup.
3007 2008-04-21 Martin Baulig <martin@ximian.com>
3009 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
3011 2008-04-20 Geoff Norton <gnorton@novell.com>
3013 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
3014 pointer dereference.
3016 2008-04-15 Marek Habersack <mhabersack@novell.com>
3018 * appdomain.c (try_load_from): if IOMAP is in effect, call the
3019 portability API to look up the assembly file. Fixes behavior in
3020 situations when the application has a bin/ directory, but the
3021 assembly search patch refers to Bin/ (and thus the requested file
3022 name is Bin/SomeLibrary.dll). Fixes bug #379888
3024 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
3026 verify.c (mono_type_is_generic_argument): Extracted this check
3027 from a dozen places to here.
3029 verify.c: Fixed all issues related to boxing generic arguments
3030 and their constraints.
3032 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
3034 verify.c (mono_class_interface_implements_interface): Fix win32 build.
3036 2008-04-14 Zoltan Varga <vargaz@gmail.com>
3038 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
3039 isn't finished yet. Fixes #363447.
3041 2008-04-13 Zoltan Varga <vargaz@gmail.com>
3043 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
3046 2008-04-13 Jb Evain <jbevain@novell.com>
3048 * domain.c: update the 2.1 profile versions.
3049 Merged from the Moonlight 2 branch.
3051 2008-04-12 Zoltan Varga <vargaz@gmail.com>
3053 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
3054 mscorlibs for the non-refonly case as well.
3056 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
3057 in mono_assembly_load_from_full (). Fixes #378924.
3059 2008-04-11 Geoff Norton <gnorton@novell.com>
3061 * icall.c: The global extern environ doesn't exist on Mac. We
3062 need to call NSGetEnviron instead.
3064 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
3066 verify.c: Add generic method constraint verification.
3068 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
3070 class.c (mono_class_inflate_generic_method_full): Add a long
3071 explanation to the is_mb_open hack. Remove the FIXME.
3073 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
3075 * verify.c (mono_method_verify): Mark all unknown opcodes
3076 as invalid. Mark jmp as unverifiable.
3078 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
3080 * verify.c: Add code to do type constraint verification on class instances.
3082 * verify.c (mono_verifier_verify_class): Use the type constraint
3085 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
3087 * class.c (mono_class_get_field_default_value): Don't pass cindex
3088 as hint to mono_metadata_get_constant_index. The local is not initialized
3089 and should contain garbage most of the time. This could only work
3092 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
3094 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
3096 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
3098 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
3100 * class.c (mono_class_from_generic_parameter): Save the token of the
3101 generic param in MonoClass::sizes.generic_param_token.
3103 * reflection.c (mono_custom_attrs_from_class): If the class type is
3104 VAR or MVAR retrieve the attributes of the generic param.
3106 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
3108 * class.c (mono_class_init): Do class verification if the verifier
3111 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
3113 * verify-internal.h: Added mono_verifier_verify_class.
3115 * verify.c: Added mono_verifier_verify_class. It checks for
3116 classes with explicit layout that have overlapping reference fields.
3118 * pedump.c: Init the verifier state prior to verification. Fixed
3119 command line arguments.
3121 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
3123 * Makefile.am: Added verify-internals.h, hopefully fix the build.
3125 2008-04-08 Zoltan Varga <vargaz@gmail.com>
3127 * verify-internals.h: Fix a warning.
3129 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
3131 * verify-internals.h: New header with the verifier configuration
3132 extracted from mini.c.
3134 * verify.c: Implemented the new functions exported by verify-internals.h.
3136 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
3138 * verify.c: Add proper verification of ckfinite.
3140 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
3142 * verify.c (do_conversion): Improved error message to something
3145 * verify.c (check_is_valid_type_for_field_ops): Fix to work
3146 with primitive types.
3148 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
3150 * verify.c: Added tail prefix checking. Marked icall
3153 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
3155 * verify.c: Fix the detection of branches to the middle
3158 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
3160 * verify.c: Implemented verification of volatile. and
3161 unaligned. prefix. Check if a type is valid after retrieving it.
3163 2008-04-01 Dick Porter <dick@ximian.com>
3165 * process.c (process_get_fileversion): If there's no string block,
3166 set the file language to en_US. Fixes the other new part of bug
3169 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
3171 * class.c: New functions mono_method_can_access_field_full and
3172 mono_method_can_access_method_full. They perform type visibility
3173 and type site check.
3175 * class-internal.h: Added exported functions.
3177 * verify.c: Use new functions to implement proper visibility checks.
3179 2008-03-29 Zoltan Varga <vargaz@gmail.com>
3181 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
3183 2008-03-28 Dick Porter <dick@ximian.com>
3185 * process.c (process_get_fileversion): Use the first language ID
3186 we see, rather than insisting on an invariant language. Fixes bug
3189 2008-03-28 Zoltan Varga <vargaz@gmail.com>
3191 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
3192 the streams to fix reading of invalid memory later.
3194 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
3197 2008-03-26 Zoltan Varga <vargaz@gmail.com>
3199 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
3200 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
3202 2008-03-26 Massimiliano Mantione <massi@ximian.com>
3203 * threads.h: Added MonoThreadManageCallback type and
3204 mono_thread_set_manage_callback prototype
3205 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
3206 (used to store the mono_thread_manage callback).
3207 * threads.c: Added mono_thread_set_manage_callback, and handle
3208 "MonoThread->manage_callback" in build_wait_tids.
3210 2008-03-26 Dick Porter <dick@ximian.com>
3212 * process.c (process_get_fileversion): Set FileVersionInfo strings
3213 to Empty when the resource doesn't have the particular info.
3216 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
3218 * verify.c (mono_method_verify): Proper prefix validation.
3220 2008-03-25 Zoltan Varga <vargaz@gmail.com>
3222 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
3223 itself in a separate argument instead of throwing them. Fixes #373448.
3225 * appdomain.c: Bump corlib version.
3227 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
3229 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
3231 2008-03-20 Kornél Pál <kornelpal@gmail.com>
3233 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
3236 2008-03-20 Mark Probst <mark.probst@gmail.com>
3238 * generic-sharing.c, class-internals.h: Code for putting
3239 reflection types into the runtime generic context.
3241 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
3243 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
3247 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
3249 * verify.c (VerifyContext): Added instruction prefix data to the struct.
3251 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
3253 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
3255 * verify.c (do_cast): Let the result value keep the boxed status.
3257 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
3259 2008-03-17 Jb Evain <jbevain@novell.com>
3261 * reflection.c: when running on a 2.0 runtime, emit
3262 unconditionally the #~ header version as 2.0, and the
3263 CLI header version as 2.5, for symmetry's sake with csc.
3265 2008-03-16 Zoltan Varga <vargaz@gmail.com>
3267 * class.c: Remove the unused cache_interface_offsets stuff.
3269 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
3270 profiler.c: Fix warnings.
3272 2008-03-16 Mark Probst <mark.probst@gmail.com>
3274 * generic-sharing.c, class-internals.h: Support for putting
3275 methods into the runtime generic context.
3277 2008-03-16 Zoltan Varga <vargaz@gmail.com>
3279 * class.c (mono_class_setup_fields): Ignore calls made to this function for
3280 classes which are generic instances of not-yet finished typebuilders. Fixes
3283 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
3285 2008-03-15 Zoltan Varga <vargaz@gmail.com>
3287 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
3289 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
3290 field, replace it with a hash table in MonoDynamicImage.
3292 * reflection.c (inflate_mono_method): Access the generic definition object from
3293 image->generic_def_objects instead of imethod->reflection_info.
3295 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
3297 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
3299 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
3300 function in reflection.c so it is easier to keep in sync with the dynamic image
3303 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
3304 mono_image_close ().
3306 2008-03-15 Mark Probst <mark.probst@gmail.com>
3308 * class.c (mono_class_generic_sharing_enabled): Disable generic
3309 sharing for all architectures except AMD64 and x86 to fix build.
3311 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
3313 * verify.c: Use the generic definition MonoGenericContext when available.
3314 Remove code for checking generics instance compatibility in favor of
3315 mono_class_is_assignable_from.
3317 2008-03-14 Mark Probst <mark.probst@gmail.com>
3319 * marshal.c, marshal.h, metadata-internals.h, image.c,
3320 wrapper-types.h: New wrapper for invoking a shared static method
3321 without having to pass the runtime generic context argument.
3323 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
3325 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
3327 2008-03-14 Zoltan Varga <vargaz@gmail.com>
3329 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
3331 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
3332 create a token from a FieldOnTypeBuilderInst.
3333 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
3334 (resolve_object): Ditto.
3336 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
3337 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
3339 2008-03-14 Martin Baulig <martin@ximian.com>
3341 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
3343 * debug-mono-symfile.h
3344 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
3345 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
3347 2008-03-10 Martin Baulig <martin@ximian.com>
3349 * debug-mono-symfile.h
3350 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
3351 `lexical_block_table_offset'.
3352 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
3354 (MonoSymbolFile): Added `version'.
3357 (MonoDebugLexicalBlockEntry): Removed.
3358 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
3361 * mono-debug.c (mono_debug_add_method): Don't compute lexical
3362 blocks here; the debugger now does this internally.
3364 2008-02-27 Martin Baulig <martin@ximian.com>
3366 * object.c (mono_runtime_exec_main): Call
3367 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
3368 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
3370 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
3372 * verify.c (verify_type_compatibility_full): Allow native int to be converted
3373 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
3375 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
3377 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
3378 ldftn with a virtual method.
3380 2008-03-13 Geoff Norton <gnorton@novell.com>
3382 * decimal.c: Only include memory.h if the platform has it.
3384 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
3386 * assembly.c, class.c, metadata-internals.h: make sure public key
3387 tokesns are compared in a case-insensitive way. Also, all
3388 the lookups in the GAC use a lowercase public key token
3389 (gaacutil already does the lowercasing on install). Fixes
3392 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
3394 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
3397 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
3399 * image.c: when someone loads a mscorlib from a file, return the
3400 currently loaded mscorlib (fixes bug #369253).
3402 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
3404 * class.c: handle types with no parents by forcing them to have
3405 System.Object as a parent and marking them as broken (this currently
3406 allows the first part of bug #369173 to work as well, likely because
3407 we don't check for typeload exceptions everywhere yet).
3409 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
3411 * class.c: more complete check that types belong to corlib
3412 (fixes second part of bug #369173).
3414 2007-03-10 Bill Holmes <billholmes54@gmail.com>
3416 * generic-sharing.c: Including glib.h for the MSVC builds to define
3417 "inline" to "__inline" before including mono-membar.h.
3419 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
3420 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
3423 Contributed under MIT/X11 license.
3425 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
3427 * verify.c (do_invoke_method): Remove return type validation.
3429 * verify.c (do_ret): Do return type validation at return site instead of
3432 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
3434 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
3436 * verify.c: Some todos cleaned and improved a few error messages.
3438 2008-03-08 Zoltan Varga <vargaz@gmail.com>
3440 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
3442 2008-03-07 Zoltan Varga <vargaz@gmail.com>
3444 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
3445 system types correctly.
3447 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
3450 2008-03-06 Zoltan Varga <vargaz@gmail.com>
3452 * assembly.c (build_assembly_name): Fix a warning.
3454 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
3456 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
3457 the called function takes an object type argument. Fixes storing or
3458 valuetypes across remoting as well as reducing memory usage.
3459 * image.c, metadata-internals.h: remove now unused ldfld_remote and
3460 stfld_remote wrapper caches.
3462 2008-03-06 Zoltan Varga <vargaz@gmail.com>
3464 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
3467 * reflection.c (mono_image_register_token): New helper function to save
3468 a token->object mapping.
3470 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
3473 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
3474 one dimension arrays. Fixes #367670.
3475 (mono_reflection_get_type_internal): Ditto.
3477 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
3479 * marshal.c: mono_load_remote_field_new() always returns object.
3480 so use the proper signature (fixes bug #366445).
3482 2008-03-04 Zoltan Varga <vargaz@gmail.com>
3484 * class-internals.h (MonoMethod): Remove unused uses_this flag,
3485 add an 'inline_failure' flag instead.
3487 2008-03-04 Mark Probst <mark.probst@gmail.com>
3489 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
3490 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
3491 contains the location of "this", used for exception handling.
3493 2008-03-04 Zoltan Varga <vargaz@gmail.com>
3495 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
3496 their size on all platforms for perf reasons.
3498 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
3500 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
3503 * object-internal.h: Same.
3505 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
3507 * reflection.h: Fix the build I just broke.
3509 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
3511 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
3512 Test if a token is valid, this remove explicit usage of
3513 MonoDynamicImage::tokens from the verifier code.
3515 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
3517 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
3518 instead of direct access to MonoDynamicImage::tokens.
3520 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
3522 * verify.c (token_bounds_check): Fix the build I just broke.
3524 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
3526 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
3528 * verify.c (verifier_load_method): Fixed the errors message.
3530 * verify.c (mono_method_verify): Fixed a debug message.
3532 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
3534 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
3535 mono-perfcounters.h, class-internals.h: support for predefined
3536 writable counters, query of categories and counters, bugfixes.
3538 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
3540 * verify.c (do_refanytype): Verify the refanytype opcode.
3542 * verify.c (mono_method_verify): Use do_refanytype.
3544 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
3546 * verify.c (do_mkrefany): Verify the mkrefany opcode.
3548 * verify.c (mono_method_verify): Use do_mkrefany.
3550 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
3552 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
3553 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
3556 2008-02-27 Zoltan Varga <vargaz@gmail.com>
3558 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
3559 the type load exception.
3561 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
3563 * verify.c: Added a few FIXME for method signatures
3565 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
3566 of mono_method_get_signature and get vararg call working. Removed unused
3567 checks for return value.
3569 * verify.c (do_refanyval): Verify the refanyval opcode.
3571 * verify.c (mono_method_verify): Implemented verification of arglist and
3574 2008-02-27 Zoltan Varga <vargaz@gmail.com>
3576 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
3577 vtypes to marshal.c.
3579 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
3580 it works for AOT as well.
3582 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
3584 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
3585 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
3586 the system time is adjusted.
3588 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
3590 * icall.c, icall-def.h: use the new time functions (fixes the
3591 non-monotonic behaviour of TickCount).
3593 2008-02-26 Zoltan Varga <vargaz@gmail.com>
3595 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
3596 it breaks the build.
3598 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
3599 cattr is not finished yet.
3601 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
3603 * verify.c: Proper token validation for field, method and type.
3605 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
3607 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
3609 * loader.c (method_from_memberref): Generate type load error instead of method missing
3610 if the type is not found.
3612 2008-02-23 Zoltan Varga <vargaz@gmail.com>
3614 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
3615 some of the conversions caused the generation of a marshal directive exception.
3617 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
3619 verify.c: Report which exception should be thrown by the JIT.
3620 Added a lot of FIXME notes.
3622 2008-02-22 Mark Probst <mark.probst@gmail.com>
3624 * generic-sharing.c: Runtime generic context slots are not
3625 instantiated on init anymore. Instead, provide function to do the
3626 instantiating on demand.
3628 * class-internals.h: Added vtable to runtime generic context.
3629 Macros for encoding direct and indirect slot offsets in one
3632 2008-02-21 Mark Probst <mark.probst@gmail.com>
3634 * object.c, generic-sharing.c: Moved some generic sharing code
3635 from object.c to generic-sharing.c.
3637 * generic-sharing.c: Added support for extensible runtime generic
3640 * metadata-internals.h: Two new hash tables in MonoImage for
3641 extensible runtime generic context support.
3643 * domain.c: Unregister generic vtables upon domain unloading.
3645 * image.c: Destroy new hash tables upon image unloading.
3647 * metadata.c: Unregister generic subclasses upon image unloading.
3649 * class-internals.h: New data structure for runtime generic
3650 context template. New fields in the runtime generic context for
3653 * Makefile.am: Added generic-sharing.c.
3655 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
3657 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
3658 there is a pending loader exception, raise it.
3660 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
3663 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
3668 2008-02-20 Zoltan Varga <vargaz@gmail.com>
3670 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
3672 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
3674 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
3675 ref-only requests for compatibility with MS.
3677 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
3679 * reflection.c (mono_custom_attrs_from_method): Don't silently
3680 return an empty list for generic method instances.
3681 (mono_custom_attrs_from_param): Likewise.
3683 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
3684 Raja R Harinath <harinath@hurrynot.org>
3687 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
3688 * class.c (mono_class_inflate_generic_method_full): Initialize it
3689 when a fully-open method is instantiated.
3690 * metadata.c (inflated_method_equal, inflated_method_hash): Update
3692 * reflection.c (inflate_mono_method): Don't create a temporary context.
3694 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
3696 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
3697 Compute correct value, to prepare for imethod->reflection_info going away.
3699 2008-02-19 Zoltan Varga <vargaz@gmail.com>
3701 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
3703 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
3705 * verify.c: Implement skip visibility flag.
3707 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
3709 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
3710 which contains an extra field to tell the kind of exception that should be thrown.
3712 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
3714 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
3716 * loader.c (mono_method_get_param_names): Initialize 'klass' after
3717 'method' is updated.
3719 2008-02-11 Zoltan Varga <vargaz@gmail.com>
3721 * class.c (mono_class_layout_fields): Set class->min_align for classes using
3722 explicit layout as well. Fixes #360375.
3724 2008-02-11 Geoff Norton <gnorton@novell.com>
3726 * loader.c: Guard and dereference against inflated generic methods
3728 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
3730 * class.c: Include Retargetable spec in assembly name.
3731 * assembly.c: Always include PublicKeyToken spec in assembly name
3732 (with value "null" if assembly is not signed), and include
3734 * icall-def.h: Added icall for Assembly.get_fullname.
3735 * icall.c: Added icall returning the fullname of an assembly.
3737 2008-02-09 Zoltan Varga <vargaz@gmail.com>
3739 * class.c (mono_class_setup_vtable_general): Add a missing call to
3740 mono_class_setup_methods () which is needed in the AOT case.
3742 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
3744 * verify.c (mono_type_get_stack_name): Added. Return the name for the
3745 stack type of the given MonoType.
3747 * verify.c (verify_type_compatibility_full): Handle the void type.
3749 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
3750 way stack merging works.
3752 * verify.c (store_local): Improved verification message.
3754 * verify.c (do_branch_op): If the merging is invalid, the method
3755 is unverifiable and not invalid. Improved error message.
3757 * verify.c (merge_stacks): Properly merge a boxed valuetype and
3758 a reference type diferent than System.Object. Improved error
3761 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
3763 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
3765 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
3766 type of an enum even if the argument is byref.
3768 * verify.c: Replace all explicit uses of enumtype and enum_basetype
3769 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
3771 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
3773 *verify.c (verify_type_compatibility_full): Make enum types
3774 compatible with their base types.
3776 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
3777 types are compatible for the special case of a boxed valuetype and
3780 * verify.c (verify_stack_type_compatibility): The function
3781 is_compatible_boxed_valuetype was extracted from here.
3783 * verify.c (push_arg): Only set ctx->has_this_store if the method
3786 * verify.c (do_ldelem): Fixed a typo in an error message and added
3787 strict check for mixing int32 and native int as the array type
3790 * verify.c (merge_stacks): Consider boxed valuetypes in the
3791 compatibility checks.
3793 2008-02-07 Massimiliano Mantione <massi@ximian.com>
3794 * profiler.h: (MonoGCEvent): Added start-stop the world events.
3796 2008-02-06 Massimiliano Mantione <massi@ximian.com>
3797 *class.c: use_new_interface_vtable_code: renamed the env var to have
3798 a "MONO_" prefix, and fix the logic to enable it by default.
3800 2008-02-06 Massimiliano Mantione <massi@ximian.com>
3802 mono_class_setup_vtable_general: rewrote the way in which interface
3803 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
3804 makes the code more maintainable.
3805 For now the old code is still there, and can be activated setting
3806 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
3808 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
3810 * verify.c: guarded some debug functions around and #ifdef.
3812 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
3814 2008-02-06 Zoltan Varga <vargaz@gmail.com>
3816 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
3817 changes for now since they seem to break too many things.
3819 2008-02-05 Mark Probst <mark.probst@gmail.com>
3821 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
3822 mono_marshal_find_nonzero_bit_offset): Added macro and function
3823 for finding the byte- and bit-offset of a bitfield within a
3826 2008-02-05 Zoltan Varga <vargaz@gmail.com>
3828 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
3829 (mono_marshal_get_struct_to_ptr): Ditto.
3831 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
3834 2008-02-03 Zoltan Varga <vargaz@gmail.com>
3836 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
3837 between methods for non-corlib types.
3839 2008-02-02 Geoff Norton <gnorton@novell.com>
3841 * loader.c (mono_method_get_param_names): Populate the parameter name for
3842 generic parameters as well. (Fixes #342536)
3844 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
3846 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
3848 * verify.c (do_invoke_method): Fix for calling with byref structs.
3850 * verify.c (do_cast): push a boxed value type based on the type token and not
3853 2008-01-31 William Holmes <billholmes54@gmail.com>
3855 * process.c (process_module_string_read): Check the size returned form
3856 VerQueryValue to avoid out of memory exception.
3858 2008-01-30 Zoltan Varga <vargaz@gmail.com>
3860 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
3861 Handle properly modules which are not in the moduleref table. Fixes
3864 2008-01-29 Zoltan Varga <vargaz@gmail.com>
3866 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
3867 the dynamic case which is now in managed code.
3868 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
3870 * marshal.c (mono_string_to_bstr): Fix a warning.
3871 (init_com_provider_ms): Ditto.
3873 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
3875 * exception.c (mono_get_exception_out_of_memory): New helper function.
3877 2008-01-28 Jonathan Chambers <joncham@gmail.com>
3879 * marshal.c: Add support for BSTR marshalling
3880 using other COM systems.
3882 Code is contributed under MIT/X11 license.
3884 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
3886 * object.c (mono_runtime_invoke_array): reverted previous
3887 commit as it breaks the build.
3889 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
3891 * object.c (mono_runtime_invoke_array): Verify arguments for
3892 invalid types. Fixes #348522.
3894 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
3896 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
3897 non-final virtual calls using call.
3899 * verify.c (do_invoke): fixed some TODOs.
3901 * verify.c (push_arg): set has_this_store for "ldarga 0".
3903 2008-01-27 Zoltan Varga <vargaz@gmail.com>
3905 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
3906 which belong to an inflated class. Fixes #356531.
3908 2008-01-26 Robert Jordan <robertj@gmx.net>
3910 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
3911 which resort to FindFirstFile when a certain error condition
3912 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
3913 Code is contributed under MIT/X11 license.
3915 2008-01-24 Jonathan Chambers <joncham@gmail.com>
3917 * marshal.c (emit_marshal_string): Fix out string marshalling
3918 to use specified encoding. Fixes #323900.
3920 Code is contributed under MIT/X11 license.
3922 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
3924 * class.c (mono_class_inflate_generic_method_full): Don't modify
3925 iresult->context after cache check.
3927 2008-01-23 Zoltan Varga <vargaz@gmail.com>
3929 * class.c (mono_class_inflate_generic_method_full): Change the
3930 struct assignments to memcpy for better visibility and add some comments.
3932 2008-01-23 Dick Porter <dick@ximian.com>
3934 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
3935 procedure, and make it work on windows.
3937 2008-01-22 Zoltan Varga <vargaz@gmail.com>
3939 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
3940 a MonoReflectionTypeBuilder since it is always of that type.
3942 * reflection.c (mono_type_get_object): Remove an unneccesary check.
3944 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
3946 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
3948 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
3950 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
3952 * reflection.c (mono_reflection_create_runtime_class): Remove already created
3953 instantiations from the type cache.
3955 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
3957 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
3959 * verify.c (do_unbox_value): push a controled mutability managed pointer.
3961 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
3963 * verify.c (do_ldstr): added, verifies if the #US token is valid.
3965 * verify.c (mono_method_verify): removed old TODO
3967 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
3969 * verify.c (do_newobj): add visibility check.
3971 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
3973 * verify.c (do_load_function_ptr): add visibility check.
3975 2008-01-21 Massimiliano Mantione <massi@ximian.com>
3977 mono_generic_class_get_class: hook profiler events.
3978 mono_field_get_offset: added to support heap-shot in the new profiler.
3979 *class.h: exported mono_field_get_offset.
3981 mono_reflection_setup_internal_class: hook profiler events.
3983 2008-01-20 Zoltan Varga <vargaz@gmail.com>
3985 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
3986 argument here too and use it to avoid checking for pending exceptions if
3989 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
3991 * assembly.c (build_assembly_name): add arg for passing the assembly
3992 flags. Do not consider a PublicKey with value "null" valid.
3993 (mono_assembly_name_parse_full): added boolean argument that will be
3994 set if the assembly name contains a PublicKeyToken spec. Added support
3995 for the Retargetable spec for which only Yes or No are allowed as valid
3996 value. Consider assembly name invalid if Retargetable spec is set, but
3997 either version, culture or public key (token) are not specified.
3998 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
3999 with implementation in assembly.c.
4000 * icall.c (fill_reflection_assembly_name): also copy assembly flags
4001 from MonoAssemblyName.
4002 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
4003 introduced argument for mono_assembly_name_parse_full to know if the
4004 assembly name has a PublicKeyToken spec, and if it has instruct
4005 fill_reflection_assembly_name to use default value for keyToken (if
4006 PublicKeyToken is null).
4008 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
4010 * verify.c (mono_method_verify): fixed ovf ops with
4011 float values. They are unverifiable now.
4013 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
4015 * class.c (set_failure_from_loader_error): add BadImageException to the
4016 list of exceptions that can cause a type to fail to load.
4018 * class.c (mono_class_get_exception_for_failure): same.
4020 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
4022 * verify.c (in_any_exception_block): added, check if offset
4023 is part of any exception handling clause.
4025 * verify.c (get_stack_type): added VAR and MVAR types.
4027 * verify.c (do_stobj): better error messages.
4029 * verify.c (do_cpobj): added, check cpobj.
4031 * verify.c (do_initobj): added, check initobj.
4033 * verify.c (do_sizeof): added, check sizeof.
4035 * verify.c (do_localloc): added, check localloc.
4037 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
4039 2008-01-17 Zoltan Varga <vargaz@gmail.com>
4041 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
4042 save_lmf/restore_lmf opcodes.
4044 * threads.c (mono_threads_install_notify_pending_exc): New function to
4045 install a callback notifying the JIT there is a pending exception on a thread.
4046 (mono_thread_request_interruption): Call the new callback.
4047 (mono_thread_get_and_clear_pending_exception): New function to return the
4048 exception pending on a thread.
4050 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
4051 to turn off checking for pending exceptions.
4052 (mono_marshal_get_native_wrapper): Ditto.
4054 2008-01-16 Zoltan Varga <vargaz@gmail.com>
4056 * threads-types.h: Get rid of the unnecessary extern declarations.
4058 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
4060 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
4061 return field from parent class if not private.
4062 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
4063 returns fields from parent class if they are not private.
4064 (method_nonpublic): added function to determine if a given method
4065 should be considered non-public. Returns false for private methods
4066 on parent class, and internal methods from parent on the 1.0 profile.
4067 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
4068 use method_nonpublic function to determine whether method should be
4070 (property_accessor_public): use newly introduced method_nonpublic
4071 function to determine whether accessor is non-public.
4072 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
4073 event from parent class if not private. Only return static event if
4074 Static flag is set, and only return static event from parent class if
4075 FlattenHierarchy flag is set.
4076 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
4077 include non-private events from parent class.
4079 2008-01-16 Zoltan Varga <vargaz@gmail.com>
4081 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
4084 2008-01-16 Wade Berrier <wberrier@novell.com>
4086 * security.c: Add assembly.h header to appease some warnings
4088 2008-01-16 Dick Porter <dick@ximian.com>
4090 * process.c (process_module_string_read): Remove trailing null
4093 2008-01-16 Mark Probst <mark.probst@gmail.com>
4095 * class-internals.h: A new data structure describing the layout of
4096 a runtime generic context (MonoRuntimeGenericContextTemplate).
4098 * metadata-internals.h: Added a hash table to MonoDomain that maps
4099 from open generic classes to their runtime generic context
4102 * object.c: Building of the runtime generic context, including
4103 proper handling of generic type arguments of superclasses.
4104 Building of the runtime generic context according to the template.
4106 2008-01-15 Zoltan Varga <vargaz@gmail.com>
4108 * class.c (mono_class_setup_fields): Set field.count for generic instances.
4111 * image.c (do_mono_image_open): Pass TRUE as last_exists to
4112 mono_portability_find_file (). Fixes #325466.
4113 (mono_image_get_public_key): Fix a warning.
4115 2008-01-14 Zoltan Varga <vargaz@gmail.com>
4117 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
4119 (mono_class_from_name_case): Ditto.
4121 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
4123 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
4124 common storage for the tables used in the System/NumberFormatter class.
4126 2008-01-13 Zoltan Varga <vargaz@gmail.com>
4128 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
4130 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
4132 * verify.c (get_boxable_mono_type): check if the token is valid.
4134 * verify.c (set_stack_value): changed to add an error if an
4135 invalid type is set on stack. Changed all callers due to signature change.
4137 * verify.c (do_stobj): implement stobj validation.
4139 2008-01-11 Zoltan Varga <vargaz@gmail.com>
4141 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
4142 set container->is_method, it was set earlier.
4144 * metadata.c (type_in_image): Handle MVARs which belong to not finished
4147 * reflection.c (mono_reflection_initialize_generic_parameter): Set
4148 is_method of the generic container to TRUE for methods.
4150 2008-01-10 Zoltan Varga <vargaz@gmail.com>
4152 * metadata.c (type_in_image): Handle type parameters properly.
4154 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
4155 memory ownership of this structure.
4157 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
4159 * verify.c (get_boxable_mono_type): make typedref types been just
4160 unverifiable. check for void type.
4162 * verify.c (do_unbox_any): added, verify opcode unbox.any.
4164 * verify.c (do_load_function_ptr): accept method spec tokens.
4166 2008-01-10 Zoltan Varga <vargaz@gmail.com>
4168 * marshal.c (mono_class_native_size): Always set *align even if this is called
4171 2008-01-09 Zoltan Varga <vargaz@gmail.com>
4173 * verify.c (mono_verify_corlib): Remove this as it was not used and was
4176 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
4178 * verify.c: removed some old unused tables. A huge bunch of small fixes
4179 to things found while testing the verifier with mono basic.
4181 * verify.c (dump_stack_value): dump null literal flag to.
4183 * verify.c (verify_type_compatibility_full): fix comparison
4184 for types that have a generic super type.
4186 * verify.c (verify_stack_type_compatibility): fix compatibility
4187 between null literals and reference types. fix compatibility between
4188 boxed valuetypes and object. fix corner case test for enums.
4190 * verify.c (do_cmp_op): proper verification of cgt.un in case
4193 * verify.c (do_invoke_method): fix error message.
4195 * verify.c (do_store_indirect
4197 * verify.c (check_is_valid_type_for_field_ops): proper verification
4198 of managed pointers to valuetypes and boxed valuetypes. proper verification
4201 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
4202 allow token to be a reference type.
4204 * verify.c (do_cast): proper handling of boxes valuetypes.
4206 * verify.c (do_stelem): proper handling of storing a boxed valuetype
4209 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
4210 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
4211 fixed the decoding of unbox_any
4213 2008-01-08 Zoltan Varga <vargaz@gmail.com>
4215 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
4217 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
4219 * verify.c (do_newobj): do delegate verification.
4221 * verify.c (verify_delegate_compatibility): perform delegate
4224 * verify.c (verify_ldftn_delegate): perform tests related to
4227 * verify.c (mono_delegate_signature_equal): perform the
4228 slightly diferent signature comparison required by delegates.
4230 * metadata.c (mono_metadata_type_equal_full): added and exported
4231 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
4232 allows signature only comparison.
4234 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
4237 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
4239 * verify.c: added a bunch of stack_slot_* functions to
4240 make access to stack slot type easier. This is required to
4241 allow optional flags, like null literal, boxed value and
4243 All access paths to IlStackDesc::stype have been changed
4244 to use these new funcions.
4245 Removed a bunch of unused functions and cleared all warnings.
4246 This patch introduces the usage of the this pointer and
4249 2008-01-07 Zoltan Varga <vargaz@gmail.com>
4251 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
4253 2008-01-06 Zoltan Varga <vargaz@gmail.com>
4255 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
4256 match managed version.
4258 * appdomain.c: Bump corlib version.
4260 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
4263 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
4265 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
4266 Set public key token to zero-length byte array if assembly is not
4269 2008-01-05 Zoltan Varga <vargaz@gmail.com>
4271 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
4272 writing a vtype array elem.
4274 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
4276 * assembly.c (build_assembly_name): return FALSE if length of token is
4277 not 16 (if not "null").
4278 (mono_assembly_name_parse_full): return FALSE if value of version,
4279 culture, token or key is 0.
4280 * icall.c (fill_reflection_assembly_name): add boolean arguments to
4281 specify whether public key and public key token must be set to default
4282 value (zero-length byte array) if not available. Set versioncompat to
4283 SameMachine. If public key is available or the default is set, then
4285 (ves_icall_System_Reflection_Assembly_FillName): if no public key
4286 is available, use empty byte array as default value. On the 2.0
4287 profile, use default value for public key token if not set.
4288 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
4289 profile, use default value for public key if not set. On the 2.0
4290 profile, use default value for public key token if not set.
4291 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
4292 default values for public key and public key token.
4294 2008-01-05 Zoltan Varga <vargaz@gmail.com>
4296 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
4297 field to keep it in synch with the managed object.
4299 * marshal.c (emit_marshal_object): Add support for byref marshalling of
4300 delegates. Fixes #351520.
4302 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
4303 contains defined memory.
4305 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
4307 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
4309 * sgen-gc.c (check_consistency): New helper function to do a consistency check
4310 of the GC data structures.
4312 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
4314 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
4316 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
4318 (mono_array_clone_in_domain): Ditto.
4319 (mono_array_clone_in_domain): Ditto.
4321 * threads.c (start_wrapper): Register the thread start argument as a GC root.
4322 (cache_culture): Use a write barrier.
4324 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
4325 (ves_icall_get_property_info): Ditto.
4327 * object.h (MONO_STRUCT_SETREF): New macro.
4329 * class-internals.h (MonoStats): Add some GC statistics.
4331 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
4333 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
4335 * exception.c (mono_exception_from_name_two_strings):
4336 Break from loop after method is found.
4338 2008-01-04 Dick Porter <dick@ximian.com>
4340 * process.c (process_module_string_read): Rename variable to
4341 reflect correct usage, after fixing bug 345972.
4343 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
4345 * verify.c (mono_type_create_fnptr_from_mono_method):
4346 created a MonoType function pointer instance to be used during
4347 verification. The verifier releases this memory at end.
4349 * verify.c (mono_method_is_constructor): extracted repeated
4350 checks for constructor into a single class.
4352 * verify.c (do_push_field): use new extracted method
4353 for constructor check.
4355 * verify.c (do_newobj): same.
4357 * verify.c (do_ldftn): renamed to do_load_function_ptr
4358 and make it verify ldvirtftn too.
4360 * verify.c (mono_method_verify: proper verification
4361 of ldvirtftn. release created MonoMethod instances.
4363 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
4365 * verify.c (token_bounds_check): added.
4367 * verify.c (do_ldftn): added.
4369 * verify.c (mono_method_verify): proper verificartion of ldftn.
4371 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
4373 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
4374 than the table row count. It's the resposibility of the caller to
4375 make the bounds check and raise the correct error.
4377 * metadata.c (mono_metadata_decode_row_col): Same.
4379 * loader.c (mono_get_method_from_token): perform bounds check
4380 on token for methoddef table.
4382 2007-12-29 Miguel de Icaza <miguel@novell.com>
4385 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
4386 assert into a negative result, the managed code already coped with
4389 Some folks on Windows reported this error.
4391 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
4393 * appdomain.c: Bump corlib version.
4395 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
4396 CultureInfo.CreateCulture to create CultureInfo for name.
4397 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
4398 create CultureInfo for name. Fixes bug #347174.
4400 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
4402 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
4405 * verify.c (is_valid_branch_instruction): allow branching to the
4406 first instruction of the protected block.
4408 * verify.c (is_valid_cmp_branch_instruction): same.
4410 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
4411 avoid double initialization.
4413 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
4414 detect which cases the eval stack should just be copied.
4416 * verify.c (mono_method_verify): check if the eval stack
4417 is empty when entering a protected block.
4419 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
4421 * verify.c: added is_clause_in_range, is_clause_inside_range,
4422 is_clause_nested and verify_clause_relationship. They perform
4423 the verifications stated in P1 12.4.2.7.
4425 * verify.c (mono_method_verify): remove some unused variables,
4426 add the new exception clause checks, add instruction border
4427 checks for protected block start/end, improved some error
4428 messages and fixed a bug in the way invalid instruction access
4431 2007-12-26 Zoltan Varga <vargaz@gmail.com>
4433 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
4434 from GC 7.0 if available.
4436 * object.c: Remove an unused define.
4438 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
4440 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
4442 * null-gc.c (mono_gc_make_descr_for_array): Implement.
4444 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
4446 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
4447 to take the same arguments as the other make_descr functions.
4449 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
4451 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
4454 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
4457 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
4460 * boehm-gc.c (mono_gc_register_root): Fix a warning.
4462 * null-gc.c (mono_gc_register_root): Fix a warning.
4464 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
4466 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
4467 (mono_gc_base_init): Call GC_init ().
4469 * null-gc.c: Define mono_gc_register_root () as a no-op.
4471 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
4473 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
4475 * verify.c: add prototype for merge_stacks at top
4477 * verify.c (do_switch): added.
4479 * verify.c (merge_stacks): on some cases the stack merging
4480 was not happening properly. Unequal stack sizes at merge
4481 points should be invalid.
4483 * verify.c (mono_method_verify): added more debug info on stack state.
4484 verify switch properly.
4486 2007-12-24 Zoltan Varga <vargaz@gmail.com>
4488 * method-builder.h: New file, moved the mono_mb_ declarations here from
4491 * boehm-gc.c marshal.c: Include method-builder.h.
4493 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
4495 * marshal.c: Remove some code which is now in method-builder.c.
4497 2007-12-23 Zoltan Varga <vargaz@gmail.com>
4499 * method-builder.c: New file, extraction of the method builder functionality
4502 * marshal.c: Move the mb functions into method-builder.c.
4504 * marshal.h marshal.c: Export some mono_mb_... functions.
4506 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
4508 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
4511 * class.c (mono_class_get_full): Check the token type in the dynamic case.
4513 * loader.c (mono_field_from_token): Ditto.
4515 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
4518 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
4521 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
4522 a helper function for setting it.
4524 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
4527 * assembly.c: Significally simplify code now that referenced assemblies are
4528 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
4530 * threads.h: Don't include the internal threads-types.h header file. Fixes
4533 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
4535 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
4536 instructions that were target of branches or are at protected block boundaries.
4538 * verify.c (in_same_block): handle filter clauses.
4540 * verify.c (is_valid_branch_instruction): added. checks the target of
4541 instructions br or brtrue/false.
4543 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
4544 binary branch instructions such as beq and bge.
4546 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
4547 and made it pin the instruction as been part of the exception block.
4549 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
4552 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
4555 * verify.c (do_ret): ret from a protected block is unverifiable and
4558 * verify.c (do_static_branch): verify br and br.s instructions.
4560 * verify.c (merge_stacks): add extra param to support detection
4561 of branches in the middle of instructions.
4563 * verify.c (mono_method_verify): verify branches and exception blocks
4564 that target the middle of instructions. Proper verification of br and br.s.
4566 2007-12-21 Zoltan Varga <vargaz@gmail.com>
4568 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
4569 skip_visibility field.
4570 (reflection_methodbuilder_from_dynamic_method): Ditto.
4572 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
4573 registrations. Fixes #348193.
4575 * threads.h: Move the internal mono_thread_get_pending_exception () to
4576 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
4578 2007-12-20 Zoltan Varga <vargaz@gmail.com>
4580 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
4581 icall registration. Fixes #348193.
4583 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
4584 for corlib classes into object. Fixes #349621.
4586 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
4588 * icall.c (property_accessor_nonpublic): new function to determine
4589 whether an accessor allows a property to be considered non-public.
4590 Returns false for private accessor(s) from parent class, and internal
4591 accessor(s) from parent on 2.0 profile (and higher).
4592 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
4593 to determine whether property should be included if NonPublic flag
4594 is set. Fixes bug #349078.
4596 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
4598 * verify.c (init_stack_with_value): added.
4600 * verify.c (mono_method_verify): extracted common
4601 code for exception initialization into init_stack_with_value.
4603 * verify.c (mono_method_verify): initialize the exception
4604 for handler clauses as well.
4606 * verify.c (mono_method_verify): fix the exception clause
4607 ordering rules, it should use handler end offset and not
4610 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
4612 * rawbuffer.c: remove useless warning.
4614 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
4616 * threads.h, threads-types.h: move functions to the correct header
4619 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
4621 * verify.c (mono_method_verify): proper verification
4622 of exception handling clauses ranges and fallthru in
4623 and out of protected blocks.
4625 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
4627 * verify.c (mono_method_verify): fixed compilation issue.
4629 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
4631 * verify.c (mono_method_verify): a printf slipped in, changed
4632 to use verifier debug macro.
4634 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
4636 * verify.c (is_correct_leave): check for filter clauses.
4638 * verify.c (do_filter): added.
4640 * verify.c (mono_method_verify): property verification of leave.
4643 2007-12-18 Mark Probst <mark.probst@gmail.com>
4645 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
4646 Win32 build, until we figure out how to do the proper thing on
4649 2007-12-17 Zoltan Varga <vargaz@gmail.com>
4651 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
4652 by the previous patch.
4654 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
4655 the assembly resolve handler for refonly assemblies.
4657 2007-12-17 Mark Probst <mark.probst@gmail.com>
4659 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
4660 Make sure only one thread is allowed to commence shutdown, and
4661 don't allow new threads to be started once shutdown is in
4664 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
4666 * verify.c (is_correct_endfilter): added.
4668 * verify.c (is_unverifiable_endfilter): added.
4670 * verify.c (do_endfilter): added.
4672 * verify.c (mono_method_verify): property verification of endfilter
4673 and fixed a corner case or endfinally.
4675 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
4677 * verify.h: new flags to support fail fast of unverifiable code and
4678 do non-strict verification. Non-strict verification is required to
4679 have MS runtime compatibility. There are a huge amount of unverifiable
4680 code that it accepts as verifiable. The strict mode verifies the code
4682 Non-strict mode will be required in cases where code needs to be
4683 accepted as verifiable but fails under strict mode.
4685 * pedump.c: added support to fail fast and non-strict verification.
4687 * verify.c: added support for both fail fast and non-strict verification.
4689 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
4691 * verify.c (is_correct_endfinally): added.
4693 * verify.c (mono_method_verify): property verification of endfinally.
4695 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
4697 * verify.c (in_any_block): check for filter clauses.
4699 * verify.c (is_correct_rethrow): added.
4701 * verify.c (mono_method_verify): property verification of rethrow.
4703 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
4705 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
4707 * verify.c (do_throw): added.
4709 * verify.c (mono_method_verify): property verification of throw
4711 2007-12-11 Zoltan Varga <vargaz@gmail.com>
4713 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
4714 assemblies. Fixes #346425.
4716 2007-12-10 Zoltan Varga <vargaz@gmail.com>
4718 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
4721 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
4723 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
4724 prevent asserts when this is called with a token which might not be valid.
4726 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
4727 lookup_dynamic_token_class with valid_token == FALSE.
4729 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
4731 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
4733 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
4735 2007-12-10 Mark Probst <mark.probst@gmail.com>
4737 * gc.c: Don't delay threadpool thread finalization unless Mono is
4740 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4742 * threads.c: turn an assert into a non-fatal warning.
4744 2007-12-09 Robert Jordan <robertj@gmx.net>
4746 * icall.c (GetVirtualMethod): Add missing argument validation.
4748 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
4750 * verify.c (do_cast): added.
4752 * verify.c (mono_method_verify): property verification of castclass and isinst.
4755 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
4757 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
4759 * verify.c (do_stelem): added.
4761 * verify.c (mono_method_verify): property verification of stelem.X.
4763 2007-12-07 Mark Probst <mark.probst@gmail.com>
4765 * class.c, class-internals.h: Introduce an environment variable
4766 (MONO_GENERIC_SHARING) through which the extent of generic code
4767 sharing can be controlled (share all classes, share only corlib
4768 classes, or share nothing).
4770 * object.c: Only create runtime generic context for classes for
4771 which sharing is enabled.
4773 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
4775 * verify.c (do_ldelem): refactor it to work with ldelem.any.
4777 * verify.c (mono_method_verify): property verification of ldelem.any.
4779 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
4781 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
4782 added ldelem.X opcodes.
4784 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
4786 * verify.c: proper verification of ldelem.X
4788 2007-12-06 Zoltan Varga <vargaz@gmail.com>
4790 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
4792 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
4794 * verify.c (mono_method_verify): null literal requires special handling,
4795 the value pushed on stack need to be flagged as so.
4797 * verify.c (do_ldelema): Verify ldelema properly.
4799 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
4801 * verify.c: Verify ldlen properly.
4803 2007-12-05 Zoltan Varga <vargaz@gmail.com>
4805 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
4806 to the target object's type. Fixes #346160.
4808 2007-12-05 Dick Porter <dick@ximian.com>
4810 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
4811 Solaris needs the same workaround as BSD-derived systems. Fixes
4812 bug 323524, patch by Burkhard Linke
4813 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
4815 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
4817 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
4818 handle to use when error dialog is shown; otherwise, update mask
4819 to show no error dialog when an error occurs.
4821 2007-12-03 Zoltan Varga <vargaz@gmail.com>
4823 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
4825 * class.c (mono_class_get_field_default_value): New helper function to initialize
4826 field->def_type and field->data.
4828 2007-11-30 Zoltan Varga <vargaz@gmail.com>
4830 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
4833 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
4835 * marshal.c: Avoid depending on delegate->method_info being set.
4837 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
4839 * object.c (mono_delegate_ctor): Set delegate->method.
4841 * object-internals.h (struct _MonoDelegate): Add 'method' field.
4843 * appdomain.c: Bump corlib version.
4845 2007-11-27 Raja R Harinath <harinath@gmail.com>
4847 * metadata.c (mono_generic_inst_equal_full): Short-circuit
4848 equality check if we're comparing canonicalized MonoGenericInsts.
4850 2007-11-23 Zoltan Varga <vargaz@gmail.com>
4852 * class.c (generic_array_methods): Call mono_class_setup_methods () before
4853 accessing class->methods.
4855 2007-11-22 Dick Porter <dick@ximian.com>
4857 * threads.c: Ensure that the synch_cs is set before trying to use
4860 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
4862 * profiler.c: r89126 broke the statistial profiler, unbreak.
4864 2007-11-22 Martin Baulig <martin@ximian.com>
4866 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
4869 (mono_debug_debugger_version): Bump to 3.
4870 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
4871 -> mono_debugger_class_initialized().
4873 * mono-debug-debugger.c
4874 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
4877 (mono_debugger_start_class_init_func): Removed.
4878 (mono_debugger_class_loaded_methods_func): Added.
4879 (mono_class_setup_methods): Call it here.
4881 2007-11-22 Martin Baulig <martin@ximian.com>
4884 (mono_debug_add_delegate_trampoline): New public method.
4885 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
4888 (MonoSymbolTable): Added `global_data_table'.
4889 (MonoDebuggerTypeKind): Removed.
4891 2007-11-21 Zoltan Varga <vargaz@gmail.com>
4893 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
4896 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4898 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
4900 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
4902 2007-11-20 Martin Baulig <martin@ximian.com>
4904 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
4906 * mono-debug-debugger.c
4907 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
4908 (mono_debugger_remove_breakpoint): Likewise.
4909 (mono_debugger_check_breakpoints): Likewise.
4910 (mono_debugger_register_class_init_callback): New public method.
4911 (mono_debugger_remove_class_init_callback): Likewise.
4912 (mono_debugger_add_type): Likewise.
4914 * mono-debug-debugger.h
4915 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
4917 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
4919 * class.c: more interface implementations needed for the
4920 array enumerator (fixes bug #341112).
4922 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
4924 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
4925 fix ParamName of ArgumentNullExceptions.
4927 2007-11-17 Miguel de Icaza <miguel@novell.com>
4929 * reflection.c (mono_reflection_encode_sighelper): Generate the
4930 modopts and modreqs. I have a useless test that crashes monodis,
4931 but that shows the code working.
4933 2007-11-17 Zoltan Varga <vargaz@gmail.com>
4935 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
4936 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
4938 2007-11-15 Dick Porter <dick@ximian.com>
4940 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
4941 When joining a thread, it's the thread that's calling Join that
4942 gets WaitSleepJoin state not the target. Fixes the standalone
4943 test case in bug 334740, and hopefully the whole bug too.
4945 2007-11-15 Dick Porter <dick@ximian.com>
4947 * process.c: Read file version info from the files pointed at by
4948 process modules, not the current process. Fixes bug 315969.
4950 Use windows typedef names in some places to fix warnings on the
4953 2007-11-15 Mark Probst <mark.probst@gmail.com>
4955 * image.c, metadata-internals.h: Added a generic_class_cache hash
4956 to MonoImage for looking up generic classes when sharing generics.
4958 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
4960 * sgen-gc.c: warning cleanups.
4962 2007-11-15 Zoltan Varga <vargaz@gmail.com>
4964 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
4965 inherited properties.
4967 2007-11-14 Mark Probst <mark.probst@gmail.com>
4969 * object.c, class-internals.h: Added more information to the
4970 runtime generic context.
4972 2007-11-13 Zoltan Varga <vargaz@gmail.com>
4974 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
4975 instead of just the target method. Generalize the abstract method handling to
4976 handle any non-static method.
4978 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
4979 mono_marshal_get_delegate_invoke () signature change.
4981 2007-11-13 Mark Probst <mark.probst@gmail.com>
4983 * class.c, class-internals.h: Made
4984 mono_type_get_basic_type_from_generic () public. Fixed member
4985 access check for shared generics.
4987 * loader.c: Don't insert field into field cache if it's part of a
4988 non-inflated generic class.
4990 * domain.c, domain-internals.h: The generic sharing context is now
4991 part of the jit info data structure. Added two accessor
4994 2007-11-12 Zoltan Varga <vargaz@gmail.com>
4996 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
4997 the array Get/Set/Address methods, since the JIT inlines them.
4999 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
5001 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
5002 (mono_image_init): Initialize runtime_invoke_direct_cache.
5004 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
5005 mono_marshal_get_delegate_invoke signature change.
5007 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
5008 an additional argument. Add support for invoking abstract methods.
5010 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
5012 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
5014 2007-11-09 Mark Probst <mark.probst@gmail.com>
5016 * class.c: Do field layout for open generic classes as well.
5018 2007-11-09 Mark Probst <mark.probst@gmail.com>
5020 * gc.c, gc-internal.h: Don't finalize threadpool threads with
5021 other objects, because the threadpool is still around. Put them
5022 in a list instead and after finalizing all other objects in the
5023 root domain shut down the thread pool and then finalize the
5024 threads. Fixes bug #337383.
5026 * threads.c, thread-types.h: New mono_thread_create_internal()
5027 function for marking a thread with the threadpool flag before it
5028 started. Set synch_cs to NULL after freeing it.
5030 * threadpool.c: Mark threadpool threads before they start.
5032 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
5034 * reflection.h, reflection.c: don't export random functions
5035 and lazy load dbnull and missing objects.
5037 2007-11-07 Jonathan Chambers <joncham@gmail.com>
5039 * class.c: Initialize COM types if COM interfaces
5040 are present (not just COM classes).
5042 Code is contributed under MIT/X11 license.
5044 2007-11-07 Massimiliano Mantione <massi@ximian.com>
5046 create_dynamic_mono_image: hook module profiler events (dynamic case).
5047 mono_image_basic_init: hook assembly profiler events (dynamic case).
5049 2007-11-07 Massimiliano Mantione <massi@ximian.com>
5051 simple_appdomain_unload: completely terminate the profiler
5052 instead of only processing the statistical samples.
5053 simple_shutdown: make sure this is really called exactly once,
5054 even in multithreaded applications, and always listen to
5056 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
5057 here, the "[un]load" functions will do it.
5058 Fixes bugs #333791 and #325261.
5060 2007-11-07 Geoff Norton <gnorton@novell.com>
5062 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
5063 rather than depend on __APPLE__.
5065 2007-11-07 Mark Probst <mark.probst@gmail.com>
5067 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
5069 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
5071 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
5072 UTF16 MonoString. Fix the crash from bug #335488
5074 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
5076 * marshal.c: Correct (for non-Win32 OS) length != size in
5077 mono_string_from_bstr. Fix #339530.
5079 2007-11-06 Geoff Norton <gnorton@novell.com>
5081 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
5084 2007-11-05 Kornél Pál <kornelpal@gmail.com>
5086 * process.c: Added run-time GetProcessId API detection for Windows.
5088 2007-11-04 Miguel de Icaza <miguel@novell.com>
5090 * reflection.c (mono_param_get_objects): If a parameter has the
5091 attribute [System.Runtime.InteropServices.Optional] we should
5092 set the DefaultValue of the ParameterInfo to be
5093 System.Reflection.Missing instead of DBNull.
5097 (mono_get_reflection_missing_object): New method,
5098 returns the System.Reflection.Missing.Value singleton instance.
5100 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
5102 * culture-info-table.h : regenerated.
5104 2007-11-02 Jonathan Chambers <joncham@gmail.com>
5106 * icall.c: Use GetEnvironmentStrings on windows
5107 so we are using the same environment block as
5108 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
5111 Code is contributed under MIT/X11 license.
5113 2007-10-31 Martin Baulig <martin@ximian.com>
5115 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
5117 * mono-debug-debugger.h
5118 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
5120 2007-10-30 Zoltan Varga <vargaz@gmail.com>
5122 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
5125 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
5127 * culture-info-table.h : regenerated.
5129 2007-10-30 Robert Jordan <robertj@gmx.net>
5131 * icall-def.h, icall.c:
5132 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
5134 Code is contributed under MIT/X11 license.
5136 2007-10-29 Zoltan Varga <vargaz@gmail.com>
5138 * class.c (mono_class_setup_vtable): Find the inflated methods in the
5139 inflated class instead of inflating them again.
5141 * class.c (mono_class_setup_vtable): Inflate the override methods in the
5144 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
5145 Call setup_supertypes () after klass->parent is set.
5146 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
5148 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
5149 for inflated instances of not yet created dynamic generic classes.
5150 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
5151 times from inflated_method.
5152 (methodbuilder_to_mono_method): Ditto.
5154 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
5156 * gc.c: code cleanup and removed old untested option of not creating the
5159 2007-10-29 Zoltan Varga <vargaz@gmail.com>
5161 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
5162 creating a jump trampoline for dynamic methods.
5164 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
5166 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
5167 generic TypeBuilders when called from another method of the same type (bug #335131).
5170 2007-10-27 Zoltan Varga <vargaz@gmail.com>
5172 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
5173 doesn't seem to work perfectly.
5175 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
5176 called multiple times.
5177 (methodbuilder_to_mono_method): Ditto.
5178 (resolve_object): Inflate FieldBuilder's.
5180 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
5182 * string-icalls.c, string-icalls.h, appdomain.c: patch from
5183 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
5184 RemoveEmptyEntries in the string.Split implementation (bug #322375).
5186 2007-10-26 Dick Porter <dick@ximian.com>
5188 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
5189 Thread initialisation changes
5191 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
5193 * verify.c: fix compatibility check between arrays and System.Array
5195 2007-10-26 Zoltan Varga <vargaz@gmail.com>
5197 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
5200 2007-10-25 Zoltan Varga <vargaz@gmail.com>
5202 * object.c (mono_value_box): Use typed allocation here.
5204 2007-10-23 Zoltan Varga <vargaz@gmail.com>
5206 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
5207 trampoline instead of compiling the method right away.
5209 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
5211 2007-10-21 Zoltan Varga <vargaz@gmail.com>
5213 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
5214 related fields for dynamic classes. Fixes #334493.
5216 2007-10-20 Zoltan Varga <vargaz@gmail.com>
5218 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
5220 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
5222 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
5223 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
5225 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
5227 * reflection.c (create_generic_typespec): Initialize klass->generic_container
5229 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
5231 2007-10-18 Jonathan Chambers <joncham@gmail.com>
5233 * marshal.c: Use correct key when removing item
5236 Code is contributed under MIT/X11 license.
5238 2007-10-17 William Holmes <billholmes54@gmail.com>
5240 *marshal.c: Adding a case to marshal booleans to U1
5242 Code is contributed under MIT/X11 license.
5244 2007-10-18 Zoltan Varga <vargaz@gmail.com>
5246 * class.c (mono_class_from_name): Search the modules compromising dynamic
5247 assemblies. Fixes #331601.
5249 2007-10-16 Zoltan Varga <vargaz@gmail.com>
5251 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
5252 exception if the type name contains an assembly component. Fixes #334203.
5254 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
5255 modules inside dynamic assemblies. Fixes #334200.
5257 * reflection.c: Set image->public_key and image->public_key_length;
5259 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
5262 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
5264 2007-10-16 Mark Probst <mark.probst@gmail.com>
5266 * metadata.c: Implemented correct comparing of generic classes.
5267 An inflated generic class can be equal to a non-inflated one if it
5268 is inflated with generic type variables as type arguments. Fixes
5271 2007-10-15 Dick Porter <dick@ximian.com>
5273 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
5274 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
5277 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
5278 instead of a monitor lock. This means that monitor_try_enter and
5279 co can set the thread state safely.
5280 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
5281 thread_interrupt_requested, so interrupt actually works.
5283 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
5284 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
5285 state accessor function
5287 2007-10-15 Martin Baulig <martin@ximian.com>
5290 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
5291 the debugger with the current runtime.
5293 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5295 * object.c, object-internals.h: added the ability to set a single
5296 trampoline for all the slots in a vtable.
5298 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5300 * marshal.c: deal with a possible race condition during multicast
5301 delegate invocation.
5303 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5305 * class.c: ensure value type methods don't have the synchronized
5308 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
5310 * string-icalls.c, string-icalls.h: reverted unapproved patch that
5313 2007-10-11 Joel Reed <joelwreed@comcast.com>
5315 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
5316 to take an options parameter so that empty entries can be removed during
5317 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
5319 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5321 * marshal.c: make sure we don't store the signature from a dynamic
5322 method into the runtime invoke cache (bug #327189).
5324 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
5326 * marshal.c: make sure the wrapper methods are properly initialized.
5328 2007-10-11 Mark Probst <mark.probst@gmail.com>
5330 * metadata.c, metadata-internals.h: Generalized
5331 mono_type_stack_size() to mono_type_stack_size_internal() which
5332 takes an additional argument specifying whether it allows open
5335 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
5337 * verify.c (do_invoke_method): handle typedbyref params
5338 correctly and check for unverifiable return values.
5340 * verify.c (do_newobj): fix a warning.
5342 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
5344 * verify.c: don't tread typedbyref as allways unverifable,
5345 so uses, like (ld/st)loc.0 are valid. verify for the cases
5346 that it matters, like boxing related operations.
5348 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
5350 * verify.c: add verification of the newobj opcode. verification
5351 of delegate instantation still missing due ldftn and virldftn not
5352 pushing the function type on stack
5354 2007-10-08 Mark Probst <mark.probst@gmail.com>
5356 * class-internals.h: Runtime generic context data structure
5359 * object.c: Initialization of runtime generic context at runtime
5360 vtable creation time.
5362 2007-10-08 Massimiliano Mantione <massi@ximian.com>
5363 * class.c (mono_class_create_from_typedef,
5364 mono_class_from_generic_parameter, mono_ptr_class_get,
5365 mono_fnptr_class_get, mono_bounded_array_class_get)
5366 * domain.c (mono_domain_create, mono_domain_free)
5367 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
5368 * image.c (do_mono_image_load, mono_image_close):
5369 Hooked up load-unload profiler events.
5371 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5373 * domain.c: track statistics about the actual amount of native code
5376 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5378 * class.c: the valuetype enumerators don't have the additional
5379 supertypes interfaces.
5381 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
5383 * class.c: need more interfaces setup for the IEnumerator<T>
5384 object created for arrays (tests/ienumerator-interfaces.2.cs).
5386 2007-10-05 Zoltan Varga <vargaz@gmail.com>
5388 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
5390 2007-10-05 Alp Toker <alp@atoker.com>
5392 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
5393 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
5396 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
5398 * verify.c (verify_type_compatibility_full): verification of
5399 compatibility improved, validates correctly non-strict checks between
5400 native int and I4 types different than (unsigned)int32.
5402 * verify.c (do_store_indirect): added, do all verification of
5405 * verify.c (get_load_indirect_mono_type): renamed to
5406 get_indirect_op_mono_type, as it now returns the MonoType for
5407 ldind.X and stind.X opcodes.
5409 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
5411 * reflection.c: Fix the encoding of generic type definition for
5414 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
5415 mono_image_typedef_or_ref but allows to specify if typespec lookups should
5416 be made. Typespec check is done prior to typeref cache lookup.
5418 * reflection.c (mono_image_typedef_or_ref): now just delegate to
5419 mono_image_typedef_or_ref_full.
5421 * reflection.c (encode_generic_class): encode the generic class
5422 directly instead of calling encode_type.
5424 * reflection.c (encode_type): encode the generic type definition
5425 MonoClass as a generic instantiation.
5427 * reflection.c (create_typespec): cache typespec tokens in
5428 the assembly->typespec cache. Don't create typespec for a generic
5429 instance MonoClass. Create typespec for the generic type defintion.
5431 * reflection.c (create_generic_typespec): encode the generic
5432 class directly instead of calling encode_type.
5434 * reflection.c (mono_image_create_token): encode the generic
5435 type definition not using a typespec for MonoType instances.
5438 2007-10-04 Raja R Harinath <rharinath@novell.com>
5441 * class.c (mono_image_init_name_cache): Don't return nested
5442 'protected internal' classes.
5443 (mono_class_from_name_case): Likewise.
5445 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
5447 * icall-def.h, icall.c : get_bundled_machine_config() is now the
5448 common function used by both DefaultConfig in System.dll and
5449 InternalConfigurationHost in System.Configuration.dll.
5451 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5453 * class.c: automatically add to vectors only a few essential explicit
5454 generic interfaces. The rest of the interfaces that arrays should
5455 provide are currently implicitly added (but still not lazily, see the
5456 design in the discussion of bug#325495 for the details of what is
5457 needed for that). Additionally, implicit interfaces are assigned the
5458 same vtable slot as the explicit interfaces (as they are compatible):
5459 this enables huge memory savings since we don't need to instantiate
5460 as many memthods and as large vtables anymore. Also, Since
5461 GetEnumerator<T> returns an instance of a type that is required to
5462 support a similarly large set of interfaces as arrays, we add
5463 implicit interfaces and interface offset sharing support to those
5464 types, too. This change adds all the required interfaces so that
5465 the anonarray.cs test case in the bug report works (we don't add
5466 all the interfaces to arrays of arrays 3-level deep and more because
5467 of the memory requirements explained in the bug and since they are much
5468 less common: the lazy-loading support will enabled them to work, too).
5470 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
5472 * verify.c (merge_stacks): major clean up, all type compatibility
5473 checks are done by verify_type_compatibility. This fix my earlier lack
5474 of understanding of the CLR type system and merge_stacks no longer looks
5477 * verify.c: fixed some bad spelling.
5479 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
5481 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
5482 a given stack slock.
5484 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
5485 verify_type_compatibility_full. This removed a near indentical function and fixed
5486 handling of Int32 and IntPtr across all opcodes.
5488 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5490 * class.c: only vectors have the additional generic interfaces.
5492 2007-10-01 Jonathan Chambers <joncham@gmail.com>
5494 * mono-config.c: Use g_strcasecmp instead of
5495 strcasecmp like everywhere else to fix
5496 compilation with MSVC.
5498 Code is contributed under MIT/X11 license.
5500 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5502 * object.c, object-internals.h: refactored the IMT code to enable
5503 building a single slot at a time and lazily creating the IMT trampolines
5506 2007-09-29 Zoltan Varga <vargaz@gmail.com>
5508 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
5510 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
5513 2007-09-29 Raja R Harinath <harinath@gmail.com>
5515 * loader.c (method_from_methodspec): Rearrange to avoid
5516 un-necessary exposition. Don't assert out if the method's
5517 declaring type is a generic type definition.
5519 2007-09-28 Martin Baulig <martin@ximian.com>
5521 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
5523 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
5525 * class-internals.h: optimize field layout of MonoClass to
5526 requires less cachelines at runtime and save a few bytes on 64 bit
5529 2007-09-28 Jb Evain <jbevain@novell.com>
5531 * reflection.c: when encoding type names in custom attributes,
5532 if the type is a closed generic type, its generic arguments
5533 have to be serialized as AssemblyQualifiedName, so that when
5534 they are deserialized, it's possible to re-create them properly.
5538 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5540 * object.c, class-internals.h: added delegate-creation counter.
5542 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5544 * class.c: cleanup of the code that synthetizes interfaces for
5545 arrays in 2.0: saves quit a bit of corlib mempool memory.
5546 Code to fix bug #325495 ifdeffed out for now until the issues
5547 with memory usage and O(n^2) behaviour are fixed.
5549 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
5551 * marshal.c: when possible, do not duplicate the name of the methods
5552 in the method builder and in the generated MonoMethod.
5554 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
5555 * verify.c: added support for type checking ldind_* opcodes.
5557 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
5559 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
5560 which is used to distinguish the fully open instantiation of a TypeBuilder
5561 with the rest. This temporary hack is required to restore the property that
5562 the fully open instantiation is the same type of the generic type definition.
5564 * class-internals.h (mono_generic_class_is_generic_type_definition):
5565 new function as part of the internal API.
5567 * class.c (inflate_generic_type): return NULL when the generic inst is
5568 fully open. The fully open generic type is now the same as the generic type
5569 definition for non TypeBuilder types.
5571 * class.c (mono_generic_class_get_class): removed assert since it is
5572 no longer valid, gklass->cached_class can point to the generic type definition.
5574 * class.c (mono_generic_class_is_generic_type_definition): new.
5576 * metadata.c (mono_generic_class_hash): added is_tb_open field
5577 to the hash calculation.
5579 * metadata.c (free_generic_class): if the generic class is associated
5580 with the generic type definition, its field will come from the mempool and
5583 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
5584 new, this function identifies the corner case of a TypeBuilder fully open
5587 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
5588 for lookup. Set gclass->cached_class to be the container class in case of
5589 the fully open instantiation of non TypeBuilder types.
5591 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
5592 to compare generic classes.
5594 * reflection.c (method_encode_methodspec): remove assert that
5597 * reflection.c (mono_reflection_generic_class_initialize): add
5598 an aditional assert to ensure the proper type is used.
5600 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
5602 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
5605 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
5607 * verify.c (push_arg): Fixed support for ldarga
5608 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
5609 MonoType used as first arg in case of instance calls.
5611 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
5613 * verify.c: Support for verifying VAR and MVAR types,
5615 2007-09-25 Zoltan Varga <vargaz@gmail.com>
5617 * icall.c (ves_icall_get_property_info): Set the reflected type of the
5618 accessors correctly.
5620 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5622 * threads.c: support OSX and other systems in
5623 mono_thread_get_stack_bounds (bug #328026).
5625 2007-09-25 Martin Baulig <martin@ximian.com>
5628 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
5630 2007-09-24 Martin Baulig <martin@ximian.com>
5633 (MonoDebugClassEntry): Moved the definition of this struct into
5634 mono-debug.c to make it private.
5637 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
5638 type table per symbol file, we don't need to store the symfile id
5641 2007-09-24 Martin Baulig <martin@ximian.com>
5643 Create one type table per symbol file, since a `MonoClass *' gets
5644 invalid when its image is unloaded.
5646 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
5647 (MonoDebugHandle): Added `type_table'.
5649 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5651 * mempool.c, mempool.h: added mono_mempool_new_size () API
5652 to be able to specify a smaller initial size for the pool.
5653 Adjusted the code to slowly increase pool size before using
5654 the previous default size.
5655 * image.c: use a small initial size for image mempools.
5657 2007-09-23 Zoltan Varga <vargaz@gmail.com>
5659 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
5662 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
5663 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
5665 2007-09-22 Zoltan Varga <vargaz@gmail.com>
5667 * metadata.c (mono_type_create_from_typespec): Remove an invalid
5668 free. Fixes #327438.
5670 2007-09-21 Raja R Harinath <harinath@gmail.com>
5672 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
5673 generic instantiations, etc.
5674 <MONO_TYPE_ARRAY>: Likewise.
5676 2007-09-21 Martin Baulig <martin@ximian.com>
5678 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
5679 these structs were never defined.
5680 (MonoDebugHandle): Removed the `_priv' field, it was never used.
5682 2007-09-21 Martin Baulig <martin@ximian.com>
5684 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
5686 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
5688 * image.c: removed the guid hash tables: we can get the same info
5689 without the additional memory usage hit (partially fixes also bug #327052).
5691 2007-09-10 Massimiliano Mantione <massi@ximian.com>
5693 * profiler.h, profiler-private.h, profiler.c: add a new profiler
5694 event to handle unloading methods. After the event is called, the
5695 corresponding MonoMethod* must be considered invalid.
5696 * loader.c (mono_free_method): call the new mono_profiler_method_free
5699 2007-09-20 Mark Probst <mark.probst@gmail.com>
5701 * domain-internals.h: New flag in MonoJitInfo which marks shared
5702 generic methods. New hash table (shared_generics_hash) in
5703 MonoDomain to keep track of shared generic methods. Prototypes
5704 for functions to register and lookup shared generic methods.
5706 * domain.c: Support for registering and looking up shared generic
5707 methods via a hash table (shared_generics_hash) in MonoDomain.
5709 * class-internals.h: New exception to signal failure of shared
5710 compilation of a generic method. New counters for generics
5711 sharing in MonoStats.
5713 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
5715 * image.c, metadata-internals.h: don't keep a file descriptor open
5716 for loaded assemblies (bug#325988).
5718 2007-09-19 Raja R Harinath <rharinath@novell.com>
5720 * metadata.c (signature_in_image): New. Carve out of type_in_image.
5721 (ginst_in_image, gclass_in_image): Simplify. Change signature to
5722 use the corresponding datatypes.
5723 (type_in_image): Update to changes.
5724 (CleanForImageUserData): Simplify.
5725 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
5726 Avoid quadratic behaviour in handling the "stolen" list by
5727 separating the filter predicate out, and by prepending the stolen
5728 items rather than appending them.
5729 (steal_ginst_in_image): Likewise.
5730 (mono_metadata_clean_for_image): Update to changes.
5732 2007-09-19 Martin Baulig <martin@ximian.com>
5734 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
5736 2007-09-19 Martin Baulig <martin@ximian.com>
5738 * mono-debug.c (mono_debug_cleanup): Don't call
5739 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
5741 2007-09-19 Raja R Harinath <harinath@gmail.com>
5743 Fix crash on 'make run-test' in mcs/errors
5744 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
5745 Avoid more potential allocations in mono_class_from_mono_type.
5746 (ginst_in_image): Update to changes.
5747 (gclass_in_image): Rearrange slightly.
5749 2007-09-18 Zoltan Varga <vargaz@gmail.com>
5751 * class.c (mono_class_init): Move the code that sets up class->methods to
5752 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
5754 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
5755 canonical instance of an inflated generic signature.
5756 (mono_type_create_from_typespec): Remove an invalid free.
5758 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
5760 2007-09-18 Marek Habersack <mhabersack@novell.com>
5762 * domain-internals.h: added a declaration of the
5763 mono_assembly_load_full_nosearch internal function.
5765 * assembly.c (mono_assembly_load_with_partial_name): use
5766 mono_try_assembly_resolve return value properly.
5767 (mono_assembly_load_full_nosearch): copied the function body from
5768 mono_assembly_load_full, without the code to invoke assembly
5770 (mono_assembly_load_full): calls the above new function and if the
5771 assembly is not resolved, invokes the search hooks.
5773 * appdomain.c (mono_runtime_init): restore the global postload
5774 assembly search handlers.
5776 2007-09-18 Zoltan Varga <vargaz@gmail.com>
5778 * class.c (mono_class_init): Make sure class->methods and class->properties
5779 are never NULL in the generics case.
5781 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
5783 2007-09-17 Zoltan Varga <vargaz@gmail.com>
5785 * metadata.c (free_generic_class): Disable some code to fix the build.
5787 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
5789 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
5790 from the image mempool.
5792 * metadata.c (free_generic_class): Free more data from the inflated class.
5794 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
5796 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
5798 (mono_type_create_from_typespec): Ditto.
5800 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
5801 MonoImage to the caller.
5802 (mono_init_internal): Save the opened image in a global variable.
5803 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
5805 * reflection.c (resolve_object): Fix a leak.
5807 * metadata.c: Fix the freeing of data in the generics caches.
5809 * metadata.c (free_generic_inst): Comment this out to fix the build.
5810 (free_generic_class): Ditto.
5812 * metadata.c: Free cached generic methods, instantinations and classes when
5813 they are removed from the caches.
5814 (mono_metadata_free_type): Free the type itself.
5816 * class.c: Free the result of mono_class_inflate_generic_type () in a few
5819 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
5821 * boehm-gc.c: restrict managed allocs to __thread supporting
5824 2007-09-16 Zoltan Varga <vargaz@gmail.com>
5826 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
5827 (mono_generic_class_get_class): Fix a leak.
5829 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
5830 mono_metadata_free_type ().
5831 (mono_metadata_inflate_generic_inst): Fix a leak.
5833 2007-09-14 Zoltan Varga <vargaz@gmail.com>
5835 * mono-debug.c (free_header_data): Fix a leak missed earlier.
5837 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
5840 * mono-debug.c (mono_debug_close_image): Fix call to
5841 g_hash_table_remove ().
5843 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
5845 * icall-def.h: redirect all the string ctor to the managed
5846 CreateString () methods.
5847 * string-icalls.c, string-icalls.h: removed dead code for string
5850 2007-09-14 Zoltan Varga <vargaz@gmail.com>
5852 * mono-debug.c: Fix memory leaks.
5854 2007-09-14 Jonathan Chambers <joncham@gmail.com>
5856 * threads-types.h: Implement mono_hazard_pointer_set and
5857 mono_hazard_pointer_clear macros using do/while(0) to fix
5858 compilation with MSVC.
5860 Code is contributed under MIT/X11 license.
5862 2007-09-14 Zoltan Varga <vargaz@gmail.com>
5864 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
5865 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
5867 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
5869 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
5872 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
5874 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
5875 managed-code allocated as well.
5877 2007-09-13 Zoltan Varga <vargaz@gmail.com>
5879 * class.c (mono_class_is_assignable_from): Add support for generic variance.
5881 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
5883 * boehm-gc.c: fixed the build after the AOT changes.
5885 2007-09-13 Zoltan Varga <vargaz@gmail.com>
5887 * wrapper-types.h: Add an ALLOC wrapper type.
5889 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
5890 reference managed allocator methods.
5892 2007-09-12 Marek Safar <marek.safar@gmail.com>
5894 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
5895 of Type array and not MonoType, a fix suggested by Hari.
5897 2007-09-12 Jonathan Chambers <joncham@gmail.com>
5899 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
5900 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
5902 Code is contributed under MIT/X11 license.
5904 2007-09-10 Massimiliano Mantione <massi@ximian.com>
5906 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
5908 2007-09-12 Marek Habersack <mhabersack@novell.com>
5910 * image.c (do_mono_image_open): if assembly file fails to open and
5911 MONO_IOMAP is in effect, try to find the path in a
5912 case-insensitive way.
5914 * appdomain.c (mono_runtime_init): do not install postload hooks -
5915 tests show that MS.NET doesn't use anything of that sort to
5916 trigger the AppDomain.AssemblyResolve event.
5917 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
5919 (mono_runtime_init): init portability helpers here.
5921 * assembly.c (mono_assembly_load_with_partial_name): if other
5922 attempts fail, trigger the AppDomain.AssemblyResolve event handler
5923 to resolve the assembly.
5925 * domain-internals.h: added mono_try_assembly_resolve and marked
5928 2007-09-11 Jb Evain <jbevain@novell.com>
5930 * object-internals.h (MonoReflectionDynamicMethod): add
5931 a `MonoReflectionType *owner` field. The owner is used
5933 (mono_reflection_create_dynamic_method): use the owner of the dynamic
5934 method as the class declaring the dynamic method.
5935 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
5936 dynamic method to the declaring type of the methodbuilder.
5938 2007-09-11 Mark Probst <mark.probst@gmail.com>
5940 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
5941 rules for calling methods via reflection.
5943 2007-09-11 Zoltan Varga <vargaz@gmail.com>
5945 * reflection.c (resolve_object): Add support for MonoGenericClass.
5948 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
5950 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
5951 provide a managed method that does fast allocations without needing
5952 a managed->unmanaged transition. Boehm GC implementation currently
5953 enabled for ptrfree objects on sane architectures.
5955 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
5957 * marshal.c, marshal.h: exported a couple of useful functions and
5958 added mono_mb_get_label () to easily handle backward branches.
5960 2007-09-10 Zoltan Varga <vargaz@gmail.com>
5962 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
5964 2007-09-10 Massimiliano Mantione <massi@ximian.com>
5966 * loader.c (find_method): Fixed the regression introduced while
5969 2007-09-09 Zoltan Varga <vargaz@gmail.com>
5971 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
5974 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
5975 icall.c reflection.c: Pass a MonoGenericContext argument to
5976 mono_lookup_dynamic_token ().
5978 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
5981 2007-09-09 Robert Jordan <robertj@gmx.net>
5983 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
5984 for generic methods.
5986 * object.c (mono_object_get_virtual_method): Handle generic methods.
5989 Code is contributed under MIT/X11 license.
5991 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
5993 * image.c: fix locking in mono_image_load_file_for_image ().
5995 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
5997 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
5998 used only as a cache: added an icall to fill it.
6000 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
6002 * reflection.h: exposed mono_reflection_free_type_info
6003 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
6004 since mono_reflection_bind_generic_parameters makes a copy of it.
6005 * reflection.c (free_type_info): subinfos should be freed.
6006 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
6008 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
6009 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
6010 this fixes #82695 and #81726.
6013 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
6015 * process.h, process.c: added support for user profile/info in
6016 ProcessStartInfo. For now only Windows works.
6018 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6020 * metadata.c: consider the generic arguments when comparing
6021 signatures (bug #82614).
6023 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6025 * cil-coff.h, image.c: updated assembly loader to cope with the
6026 PE32+ 64 bit file format.
6028 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6030 * assembly.c, class.c, domain.c, loader.c: remove useless
6031 inclusion of cil-coff.h.
6033 2007-08-29 Jonathan Chambers <joncham@gmail.com>
6035 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
6036 if interface is marked with CoClassAttribute.
6038 Code is contributed under MIT/X11 license.
6040 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
6042 * sgen-gc.c: ensure no object from the to space is copied again or finalized
6043 if it's seen twice in major collections.
6045 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6047 * sgen-gc.c: big objects are not copied to the gray area, but they
6048 need to be considered for scanning, too, if they are brought alive
6049 by an object ready for finalizations or a survived one.
6051 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6053 * sgen-gc.c: properly account the number of disappearing links when
6056 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
6058 * sgen-gc.c: share the code to scan the registered roots between the
6059 different types of collections.
6061 2007-08-28 Zoltan Varga <vargaz@gmail.com>
6063 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
6065 2007-08-28 Zoltan Varga <vargaz@gmail.com>
6067 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
6068 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
6070 2007-08-28 Mark Probst <mark.probst@gmail.com>
6072 * security-manager.c (mono_security_manager_get_methods):
6073 LinkDemandSecurityException now has 2 arguments instead of 3.
6075 2007-08-27 Zoltan Varga <vargaz@gmail.com>
6077 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
6078 platforms which need it.
6080 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6082 * sgen-gc.c: unregister thread data structures with a pthread_key_t
6085 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
6087 * threads.c: free the thread static data on thread exit.
6089 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
6091 * class.c: walk the hierarchy to find the generic definition for
6092 a class (fixes runtime part of bug #82498).
6094 2007-08-24 Zoltan Varga <vargaz@gmail.com>
6096 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
6099 * image.c (mono_image_close): Here. Hopefully fixes #82510.
6101 2007-08-24 Mark Probst <mark.probst@gmail.com>
6103 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
6105 2007-08-24 Robert Jordan <robertj@gmx.net>
6107 * appdomain.c: don't perform the ':'->';' substitution on Win32.
6109 2007-08-24 Jb Evain <jbevain@novell.com>
6111 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
6114 2007-08-24 Mark Probst <mark.probst@gmail.com>
6116 * threads.c: Make sure a thread gets cleaned up only once. Fixes
6119 2007-08-24 Zoltan Varga <vargaz@gmail.com>
6121 * assembly.c: Fix a warning.
6123 2007-08-23 Marek Habersack <mhabersack@novell.com>
6125 * appdomain.c: parse the <runtime> section looking for the probing
6126 element with the 'privatePath' attribute, which sets additional
6127 directories in which the runtime should look for assemblies.
6129 2007-08-23 Robert Jordan <robertj@gmx.net>
6131 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
6134 2007-08-23 Martin Baulig <martin@ximian.com>
6136 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
6137 _mono_debug_init_corlib() and remove it from the header file.
6139 2007-08-23 Martin Baulig <martin@ximian.com>
6141 * mono-debug-debugger.c
6142 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
6143 don't notify the debugger about it.
6145 * mono-debug-debugger.h
6146 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
6148 2007-08-23 Robert Jordan <robertj@gmx.net>
6150 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
6151 Code is contributed under MIT/X11 license.
6153 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6155 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
6157 2007-08-22 Martin Baulig <martin@ximian.com>
6159 * mono-debug.c: Store debugging info on a per-domain basis and
6160 free it on domain unload. Add support for unloading symbol files.
6163 (MonoDebugList): New typedef.
6165 - add `data_tables and `type_table'.
6166 - replace 'symbol_files' and `num_symbol_files' with a
6168 (mono_debug_data_table): Removed.
6169 (mono_debug_list_add): New public function.
6170 (mono_debug_list_remove): New public function.
6171 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
6172 (mono_debug_init_2_memory): Renamed into
6173 mono_debug_open_image_from_memory().
6174 (mono_debug_close_image): New public function.
6175 (mono_debug_domain_create): Likewise.
6176 (mono_debug_domain_unload): Likewise.
6177 (MONO_DEBUGGER_VERSION): Bump to 60.
6179 * mono-debug-debugger.h
6180 (MonoDebuggerEvent):
6181 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
6182 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
6183 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
6184 - rename `THREAD_CREATED' and `THREAD_EXITED' into
6185 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
6186 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
6188 (mono_debugger_add_symbol_file): Removed.
6189 (mono_debugger_add_type): Removed.
6190 (mono_debugger_lookup_type): Removed.
6191 (mono_debugger_lookup_assembly): Removed.
6194 (mono_domain_create): Call mono_debug_domain_create().
6195 (mono_init_internal): Call mono_debug_init_corlib().
6198 (mono_assembly_close): Call mono_debug_close_image().
6200 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
6202 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
6205 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
6207 * sgen-gc.c: ensure section->pin_queue_end is initialized
6208 correctly when non pinning objects in the section have been found.
6210 2007-08-22 Marek Habersack <mhabersack@novell.com>
6212 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
6213 containing a list of directories separated by ':'. MSDN docs say
6214 the directories should be separated with ';'. Part of a bugfix for
6217 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
6219 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
6220 it should MonoType and not MonoClass.
6222 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
6224 * culture-info-table.h : regenerated.
6226 2007-08-20 William Holmes <billholmes54@gmail.com>
6228 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
6229 to call ReplaceFile Kernel32 on windows or in io-layer.
6230 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
6231 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
6232 as an internal call.
6234 Code is contributed under MIT/X11 license.
6236 2007-08-20 Jb Evain <jbevain@novell.com>
6238 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
6239 and MONO_EXCEPTION_FIELD_ACCESS.
6241 * debug-helpers.[c|h]: new mono_field_full_name function.
6243 2007-08-20 Mark Probst <mark.probst@gmail.com>
6245 * class.c: Removed class_security_level() and moved it to
6246 security-core-clr.c.
6248 * security-core-clr.c, security-core-clr.h: class_security_level()
6249 is now public and renamed to mono_security_core_clr_class_level().
6250 It also looks for security attributes in the classes a class is
6253 2007-08-20 Mark Probst <mark.probst@gmail.com>
6255 * security-core-clr.c, security-core-clr.h: CoreCLR security
6258 * Makefile.am: Added security-core-clr.[ch].
6260 * security-manager.c, security-manager.h: Functions and enum for
6261 setting and getting the security mode.
6263 * class.c: CoreCLR security checks.
6265 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6267 * icall-def.h, process.c, process.h: implemented icall to get
6268 user/system processor times.
6270 2007-08-17 Mark Probst <mark.probst@gmail.com>
6272 * domain.c, threads.c, class-internals.h, domain-internals.h: New
6273 reader-lock-free jit_info_table.
6275 2007-08-17 Zoltan Varga <vargaz@gmail.com>
6277 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
6279 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
6281 * object-internals.h (MonoException): Add missing _data member.
6283 2007-08-08 Massimiliano Mantione <massi@ximian.com>
6285 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
6286 checking that only methods with matching qname or fqname are picked
6287 from implemented interfaces.
6289 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
6291 * verify.c (do_newarr):added, do type verification of
6292 newarr ops, push the right value on the eval stack.
6293 * verify.c (mono_method_verify): use do_newarr
6296 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
6298 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
6299 factored the common code into get_boxable_mono_type, which
6300 is now using mono_type_get_full, this fixed byref related tests.
6302 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
6304 * class.c: added mono_type_get_full, this function has the same
6305 behavior of mono_class_get_full but the returned MonoType has
6306 all metadata of the associated token in case of a typespec token.
6307 * class.c: added mono_type_retrieve_from_typespec, used by
6308 mono_type_get_full to retrieve the token type.
6309 * class.c (mono_class_create_from_typespec): changed to use
6310 mono_type_retrieve_from_typespec.
6311 * class.c (mono_ldtoken): changed to use mono_type_get_full
6312 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
6313 * class-internals.h: exported mono_type_get_full for internal use.
6315 2007-08-16 Jb Evain <jbevain@novell.com>
6317 * domain.c (supported_runtimes): add entry for
6318 the 'moonlight' runtime version.
6320 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
6322 * verify.c (mono_method_verify): small typo sliped in.
6324 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
6326 * verify.c (do_unbox_value): added, do type verification of
6328 * verify.c (mono_method_verify): use do_unbox_value
6331 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
6333 * verify.c (dump_stack_value): fixed typo, was printing string
6334 instead of object on stack.
6335 * verify.c (do_box_value): moved the byref check up as it leads
6336 to invalid code and should be done earlier.
6337 * verify.c: improved error messages for and ldobj
6339 2007-08-15 William Holmes <billholmes54@gmail.com>
6341 * marshal.c (emit_marshal_custom): Omit the call to
6342 marshal_native_to_managed when calling native to managed
6343 and the argument is specified as an out argument.
6345 Code is contributed under MIT/X11 license.
6347 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
6349 * verify.c: fixed the type checks for generics, function pointers and vectors.
6350 Added type verification for ldobj and ldtoken. The verifier
6351 would segfault if header or signature of a method contained references
6352 to non-existant types.
6354 2007-08-15 Jonathan Chambers <joncham@gmail.com>
6356 * marshal.c (cominterop_get_ccw): Patch from
6357 Bill Holmes to no walk up interface hierarchy.
6358 All parent methods should be present in the interface for COM.
6360 Code is contributed under MIT/X11 license.
6362 2007-08-15 Jonathan Chambers <joncham@gmail.com>
6364 * marshal.c (emit_marshal_com_interface): Patch from
6365 Bill Holmes to handle COM Interfaces as return values
6366 for native->managed calls.
6368 Code is contributed under MIT/X11 license.
6370 2007-08-14 Jonathan Chambers <joncham@gmail.com>
6372 * marshal.c (cominterop_get_idispatch_for_object): Implement
6373 for runtime callable wrappers.
6375 Code is contributed under MIT/X11 license.
6377 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
6379 * pedump.c (main): changed from mono_init to mono_init_from_assembly
6380 so 2.0 types are accessible
6383 2007-08-13 Miguel de Icaza <miguel@novell.com>
6385 * domain.c (mono_init_internal): Call mono_assembly_load_friends
6386 once we load mscorlib. Due to the order in which we initialize,
6387 the mono_assembly_load_full routine that loads mscorlib did not
6388 load friends. We now load it once we load the
6389 mono_defaults.internals_visible_class class.
6391 * assembly.c: Expose the mono_load_friend_assemblies method.
6393 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
6395 * verify.c: improved the handling of boxing, better
6396 type checking for unary ops and conversion. Fix bug
6397 regarding managed pointer compatibility checking
6399 2007-08-11 Zoltan Varga <vargaz@gmail.com>
6401 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
6403 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
6405 2007-08-09 Raja R Harinath <rharinath@novell.com>
6407 * reflection.c (dup_type): Remove.
6408 * class.c (dup_type): Remove.
6409 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
6410 instead of the dodgy 'dup_type'.
6411 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
6412 handle the case where 'dup_type' needed the second argument.
6414 2007-08-08 Zoltan Varga <vargaz@gmail.com>
6416 * domain.c: Fix a warning.
6418 2007-08-08 Massimiliano Mantione <massi@ximian.com>
6420 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
6421 checking that methods with the same fqname are not overridden
6422 with a method from an ancestor.
6424 2007-08-07 Zoltan Varga <vargaz@gmail.com>
6426 * threads.c (free_thread_static_data_helper): Avoid a crash if
6427 thread->static_data is not yet set.
6429 2007-08-07 Jonathan Chambers <joncham@gmail.com>
6431 * marshal.c: Use correct image when emitting
6432 native wrapper for COM calls.
6434 Code is contributed under MIT/X11 license.
6436 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
6438 * icall-def.h, security.c, security.h :
6439 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
6441 2007-08-07 Martin Baulig <martin@ximian.com>
6443 * mono-debug-debugger.h
6444 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
6446 * domain.c (mono_domain_free): Call
6447 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
6449 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
6451 * verify.c (check_underflow, check_overflow): error message now returns IL offset
6452 * verify.c (in_same_block): code should test if either offset is inside the clauses
6453 * verify.c (mono_method_verify): push the exception into the eval stack of exception
6456 2007-08-03 Zoltan Varga <vargaz@gmail.com>
6458 * image.c (mono_image_close): Fix a leak.
6460 * object.c (mono_runtime_invoke_array): Avoid using alloca.
6462 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
6464 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6466 * domain.c, threads.c, threads-types.h: fix memory retention issue
6467 with thread static variables not being cleared on domain unload.
6468 Reuse thread static slots after domain unload.
6470 2007-08-03 Zoltan Varga <vargaz@gmail.com>
6472 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
6475 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
6476 now done in mono_runtime_invoke_array.
6478 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
6479 receiver is a nullable type.
6481 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
6484 2007-08-03 Jonathan Chambers <joncham@gmail.com>
6486 * marshal.c: Implement COM Objects as return type for
6487 managed->unmanaged calls. Added Release calls for COM Object
6488 out/return values in managed->unmanaged calls.
6490 Code is contributed under MIT/X11 license.
6492 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
6494 * threads.h, threads-type.h: move the hazard pointer declarations
6495 to the private header.
6497 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6499 * file-io.c, appdomain.c: memory leak fixes.
6501 2007-08-02 Dick Porter <dick@ximian.com>
6504 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
6505 SO_REUSEADDR setting into io-layer/sockets.c.
6507 2007-08-01 Zoltan Varga <vargaz@gmail.com>
6509 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
6510 from Object when called on a generic parameter. Fixes #82211.
6512 2007-08-01 Dick Porter <dick@ximian.com>
6514 * file-io.c (convert_share): Test FileShare values bit-by-bit.
6515 Fixes bug 79250 yet again.
6517 2007-07-30 Martin Baulig <martin@ximian.com>
6519 Merged the `debugger-dublin' branch.
6522 (MonoDebugDataTable): New typedef.
6523 (MonoDebugMethodAddressList): New typedef.
6524 (MonoDebugWrapperData): Removed.
6525 (MonoDebugSymbolTable): Removed `current_data_table',
6526 `current_data_table_size', `current_data_table_offset'.
6527 (MonoDebugDataItemType): Moved into mono-debug.c.
6528 (MonoDebugMethodJitInfo): Remove `address'.
6529 (mono_debug_data_table): New global variable.
6530 (mono_debug_lookup_method_addresses): New public function.
6531 (mono_debug_find_method): Take a `MonoMethod *', not a
6532 `MonoDebugMethodInfo *'.
6534 * mono-debug.c: Drop support for the old symbol tables.
6536 2007-06-28 Martin Baulig <martin@ximian.com>
6538 * mono-debug.c (mono_debug_debugger_version): New public variable.
6540 2007-07-31 William Holmes <billholmes54@gmail.com>
6542 * metadata.c Changed mono_type_create_from_typespec to not insert
6543 the type into the hash map until after
6544 do_mono_metadata_parse_type has completed.
6546 Code is contributed under MIT/X11 license.
6548 2007-07-31 Zoltan Varga <vargaz@gmail.com>
6550 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
6551 generic parameter. Fixes #82211.
6553 2007-07-27 Jb Evain <jbevain@novell.com>
6555 * pedump.c (dump_metadata, dump_metadata_header): dump
6556 versions contained in the metadata header.
6558 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6560 * threads.c: register small_id_table with the GC.
6562 2007-07-27 Mark Probst <mark.probst@gmail.com>
6564 * threads.c, threads.h, class-internals.h, object-internals.h:
6565 Hazard pointers, to be used by lock-free parallel algorithms.
6567 2007-07-26 Dick Porter <dick@ximian.com>
6569 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
6570 routine on non-windows platforms, as I've not managed to think of
6571 a non-kludgy way of doing this. Finishes off bug 78739.
6573 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
6575 * object.c: properly setup interface_bitmap in proxy vtables.
6577 2007-07-25 Marek Habersack <mhabersack@novell.com>
6579 * appdomain.c (get_shadow_assembly_location): do not use TickCount
6580 to create unique shadow copy target directories, use the domain's
6581 serial number instead. Each domain gets a unique target directory
6584 * domain.c (mono_domain_create): added code to increment domain
6585 shadow copy serial number and cache the value in the current
6588 * domain-internals.h (struct _MonoDomain): added a new field -
6589 shadow_serial to hold the serial number used in generation of
6590 shadow-copy directories. This is to make sure that the directory
6591 name is unique for each and every domain created. We avoid a race
6592 condition with overriding assemblies already in use by other app
6595 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
6597 * class.c (mono_bounded_array_class_get): fixed memory leak when
6598 binding generic parameters.
6600 2007-07-24 Raja R Harinath <rharinath@novell.com>
6602 * metadata.c (do_mono_metadata_parse_generic_class): Use
6603 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
6606 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6608 * loader.c, class-internals.h, reflection.c: removed the per-method
6609 generics hashtable: we use the global one through the call of
6610 mono_class_inflate_generic_method ().
6612 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
6614 * class.c, metadata.c, class-internals.h: introduce yet another
6615 generics global cache for inflated methods (fixes 98% of the perf
6616 issue in bug #81806).
6618 2007-07-23 Raja R Harinath <rharinath@novell.com>
6620 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
6621 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
6622 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
6623 return a MonoGenericInst containing (a copy) of those types.
6624 (mono_metadata_inflate_generic_inst): Update to changes.
6625 (mono_metadata_parse_generic_inst): Likewise.
6626 (mono_get_shared_generic_inst): Likewise.
6627 * reflection.c (mono_class_bind_generic_parameters): Likewise.
6628 (mono_reflection_bind_generic_method_parameters): Likewise.
6629 * metadata-internals.h: Likewise.
6630 * icall.c (free_generic_context): Kill.
6631 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
6633 * reflection.c (reflection_methodbuilder_to_mono_method): Use
6634 mono_metadata_type_dup.
6635 * marshal.c (mono_mb_create_method): Likewise.
6637 * metadata.c (mono_metadata_type_dup): Rename from
6638 mono_metadata_type_dup_mp. Take an optional mempool instead of a
6639 MonoImage. Handle a few more cases, esp. when no mempool is given.
6640 * marshal.c, metadata-internals.h: Update to changes.
6642 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
6644 * class.c: fixed a small leak for array classes and removed warning.
6646 2007-07-22 Zoltan Varga <vargaz@gmail.com>
6648 * loader.c (mono_method_get_param_token): Make this work on generic methods.
6649 Return 0x8000000 for return parameters. Fixes #82161.
6651 2007-07-21 Marek Habersack <grendello@gmail.com>
6653 * appdomain.c (get_shadow_assembly_location): append the current
6654 ticks value to the path. Avoids overwriting the same assemblies by
6655 several threads at the same time.
6657 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
6658 and Raja R Harinath <rharinath@novell.com>
6660 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
6662 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
6663 property for testing if a method is a generic method definition.
6665 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
6667 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
6669 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
6671 * verify.c: used function from private branch, reverted to the one in class.h
6673 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
6675 * verify.c: a typo slipped in and the code wont compile
6677 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
6679 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
6680 disabled box instruction as it is doing the wrong thing
6681 improved stack dump messages, now it is easier to debug type related issues
6684 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
6686 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
6688 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
6690 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
6691 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
6692 grouped with class and valuetype. This change will simply
6693 the code as it should be handled just like unmanaged pointers.
6695 2007-07-19 Mark Probst <mark.probst@gmail.com>
6697 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
6699 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
6701 * verify.c: several stack merge issues fixed, reference comparisons now
6702 check the type size. strict type check now works correctly.
6703 added more uses of IS_MANAGED_POINTER macro.
6704 fixed issues pointed by running the test suite against .net.
6707 2007-07-19 Mark Probst <mark.probst@gmail.com>
6709 * class.c, loader.c, class-internals.h: Removed the
6710 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
6713 * icall.c: Better error checking in some internal reflection
6716 2007-07-18 William Holmes <billholmes54@gmail.com>
6718 * filewatcher.c : removed unused variable 'filename' in
6719 ves_icall_System_IO_FSW_SupportsFSW
6721 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6723 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
6726 2007-07-15 Zoltan Varga <vargaz@gmail.com>
6728 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
6730 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
6732 2007-07-14 Zoltan Varga <vargaz@gmail.com>
6734 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
6735 Implement generics support.
6736 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
6738 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
6739 type_args and method_args arguments.
6740 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
6741 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
6742 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
6744 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
6746 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
6747 It adds a rootimage parameter to mono_reflection_get_type_internal,
6748 adds new function mono_reflection_get_type_with_rootimage and use
6749 the rootimage to resolve the types instead of the current image
6751 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
6753 * culture-info-table.h: Forgot to update after r78304.
6755 2007-07-13 Raja R Harinath <rharinath@novell.com>
6757 * class.c (mono_class_is_open_constructed_type)
6758 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
6760 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
6762 * class.c (mono_bounded_array_class_get): method fails if used with
6763 an incomplete TypeBuilder enum (no basetype field), fixed it by
6764 avoiding calculating the size for such array as it cannot be instantiated.
6767 2007-07-12 Raja R Harinath <rharinath@novell.com>
6769 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
6771 * metadata.c, reflection.c: Update to changes.
6773 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
6775 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
6776 mono_class_is_valid_enum, they are used to valide a enum when loading.
6777 * reflection.c: used new functions to throw TypeLoadException when and
6778 invalid enum is build with TypeBuilder. Fixes #82018
6780 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
6782 * object.c: forgot commit of mono_class_setup_methods () to access
6784 * object-internals.h: added a few more handy fields to
6787 2007-07-11 Zoltan Varga <vargaz@gmail.com>
6789 * object.c (build_imt): Call mono_class_setup_methods () before accessing
6792 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
6794 * class-internals.h, object-internals.h, object.c: IMT-based
6795 interface invocation core from Massimiliano Mantione
6796 (massi@ximian.com) with a reworked arch-specific interface,
6797 bsearch implementation and a few bugfixes and memory savings by me.
6799 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
6801 * class.c (mono_class_create_from_typedef): mono would segfault if
6802 an enum did not have a __value field. It now throws a TypeLoadException
6803 for such cases. Fix bug #82022
6805 2007-07-10 Zoltan Varga <vargaz@gmail.com>
6807 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
6809 2007-07-09 Mark Probst <mark.probst@gmail.com>
6811 * class.c (mono_class_init): If a class is already inited but has
6812 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
6814 2007-07-09 Mark Probst <mark.probst@gmail.com>
6816 * class.c: Properly handle the case of an unimplemented interface
6817 method. Fixes: 81673.
6819 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6821 * class-internals.h, object.c: cleanup patch from massi: use
6822 MonoVTable->interface_bitmap since the vtable interfaces offset array
6825 2007-07-10 Zoltan Varga <vargaz@gmail.com>
6827 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
6828 GetMDStreamVersion icall instead.
6830 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
6832 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
6833 not use mono_dl_build_path() with a full library name: makes
6834 fallbacks to libgaim and libfam work.
6836 2007-07-06 William Holmes <billholmes54@gmail.com>
6838 * assembly.c: Added a continue statement in probe_for_partial_name when
6839 parse_assembly_directory_name fails. Fixes : 82002
6841 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
6843 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
6844 and added a verification for TYPEDBYREF.
6845 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
6846 make native int interchangeable with int32 and some small cleanup and formating.
6847 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
6848 handle byref of byref.
6849 * verify.c (push_local): handle byref of byref.
6850 * verify.c (do_binop): invalid mix of values is unverifiable
6851 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
6852 added visibility checks
6853 * verify.c (field related method): added visibility checks
6854 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
6856 2007-07-06 Zoltan Varga <vargaz@gmail.com>
6858 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
6861 2007-07-05 Zoltan Varga <vargaz@gmail.com>
6863 * profiler.c (mono_profiler_load): Fix an off-by-one error.
6865 * marshal.c (emit_marshal_string): When returning a string from managed code,
6866 allways make a copy even for unicode strings. Fixes #81990.
6868 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
6870 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
6871 of byref generic inst types (bug #81997).
6873 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
6875 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
6876 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
6878 2007-07-02 Zoltan Varga <vargaz@gmail.com>
6880 * marshal.c (emit_marshal_string): Add support for unicode strings in
6881 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
6883 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
6885 * verify.c: field load/store are now verified, missing only access checks now
6887 2007-06-28 Martin Baulig <martin@ximian.com>
6889 * mono-debug.c (mono_debug_debugger_version): New public variable.
6891 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
6893 * locales.c: When constructing DateTimeFormat or NumberFormat for
6894 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
6895 MonoCultureInfo contructed from the current locale is always
6896 read-only and has UseUserOverride set to true. All MonoCultureInfo
6897 instances returned for GetCultures have both IsReadOnly and
6898 UseUserOverride set to true. Fixes part of bug #81930.
6900 2007-06-22 Jonathan Chambers <joncham@gmail.com>
6902 * icall-def.h: Update System.__ComObject icalls
6903 * marshal.c: Avoid managed transition (and object creation)
6904 when looking up COM interface in RCW.
6907 Code is contributed under MIT/X11 license.
6909 2007-06-22 Zoltan Varga <vargaz@gmail.com>
6911 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
6912 to avoid crashes during assembly unloading.
6914 2007-06-22 Raja R Harinath <rharinath@novell.com>
6916 Fix MethodInfo.IsGenericMethodDefinition
6917 * reflection.c (mono_reflection_bind_generic_method_parameters):
6918 Rearrange code to ensure we always uses a generic method definition.
6919 * class.c (mono_class_inflate_generic_method_full): Set
6920 'generic_container' field only for generic method definitions.
6921 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
6922 Use presense of 'generic_container' field as indication of being a
6923 generic method definition.
6925 2007-06-21 Zoltan Varga <vargaz@gmail.com>
6927 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6929 * object-internals.h: Reflect changes in the layout of the managed Delegate
6932 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
6933 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
6934 runtime memory used by the dynamic method. Fixes #77146.
6936 2007-06-21 Dick Porter <dick@ximian.com>
6939 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
6940 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
6943 2007-06-21 Raja R Harinath <rharinath@novell.com>
6945 * reflection.c (method_encode_methodspec): Add a tripwire.
6946 * class.c (inflate_generic_type): The fully open generic type is
6947 not the same as the generic type definition.
6949 2007-06-21 Martin Baulig <martin@ximian.com>
6951 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
6953 * mono-debug-debugger.h
6954 (MonoDebuggerBreakpointInfo): Removed.
6955 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
6956 (mono_debugger_remove_breakpoint): Likewise.
6957 (mono_debugger_breakpoint_callback): Likewise.
6958 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
6960 2007-06-21 Raja R Harinath <rharinath@novell.com>
6962 * metadata.c (mono_metadata_lookup_generic_class): The fully open
6963 generic type is not the same as the generic type definition.
6964 * class.c (mono_generic_class_get_class): Likewise.
6966 2007-06-20 Geoff Norton <gnorton@customerdna.com>
6968 * icall.c: The second argument to
6969 System.Reflection.MethodBase.GetMethodFromHandleInternalType
6970 is a MonoType not a MonoClass.
6972 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
6974 * verify.c: support for function pointers in the verifier
6976 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
6978 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
6980 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6982 * assembly.c: removed Mono.Data.SqliteClient from the list of
6983 forward-compatible assemblies as it breaks the ABI (bug #81899).
6985 2007-06-19 Raja R Harinath <rharinath@novell.com>
6987 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
6988 lookup/update with the loader lock.
6989 * reflection.c (mono_class_bind_generic_parameters): No need to
6990 protect mono_metadata_lookup_* with the loader lock.
6991 * class.c (inflate_generic_type): Likewise.
6993 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
6994 on a generic instantiated type.
6996 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
6998 *verify.c: produce meanfull error messages on verification error
6999 *verify.c: fixed some cases of verification errors reported as validation errors
7000 *pedump.c: fixed the error name array, now it shows validation errors properly
7001 *verify.h: fixed the contant that should be used for verification errors
7003 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
7005 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
7006 for bug #77596, 81858 and 80743 (generics data structures on domain
7009 2007-06-15 Raja R Harinath <rharinath@novell.com>
7011 Avoid allocating 'MonoGenericContext' on the heap.
7012 * class-internals (_MonoMethodInflated::context): Make field
7013 inline, not a pointer.
7014 * loader.c (method_from_methodspec): Allocate 'new_context' on the
7015 stack. Use the context embedded within the inflated method as the
7016 hash key, rather than 'new_context'.
7017 * class.c (inflate_generic_context): Simplify. Return a struct
7018 rather than allocating on the heap.
7019 (mono_class_inflate_generic_method_full): Update to changes. Now,
7020 doesn't salt away a copy of the context -- simplifying the
7021 lifetime rules of a 'MonoGenericContext *'.
7022 (mono_method_get_context): Return pointer to embedded context.
7023 (setup_generic_array_ifaces): Allocate temporary context on stack.
7024 * reflection.c (inflate_mono_method): Likewise.
7025 (mono_reflection_bind_generic_method_parameters): Likewise.
7026 Use the context embedded within the inflated method as the hash key.
7028 Avoid a source of allocation of 'MonoGenericContext'.
7029 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
7030 and 'cached_context' fields into embedded 'MonoGenericContext' field.
7031 * class.c: Update to changes.
7032 (mono_generic_class_get_context): Simplify drastically. Now just
7033 returns a pointer to the field.
7034 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
7035 argument as a const pointer.
7036 (mono_metadata_generic_context_equal): Likewise.
7037 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
7040 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
7042 * verify.c improved the handling of brtrue/brfalse, factored out common code
7044 2007-06-14 Raja R Harinath <rharinath@novell.com>
7046 Kill MonoGenericMethod.
7047 * class-internals.h (MonoGenericContext::method_inst): Rename from
7048 'gmethod' and convert to a MonoGenericInst.
7049 (MonoGenericMethod): Remove.
7050 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
7051 * loader.c (method_from_methodspec): Update to changes. Use a
7052 MonoGenericContext as the key to the hashtable.
7053 * metadata.c (mono_metadata_generic_context_equal): Rename from
7054 'mono_metadata_generic_method_equal' and take MonoGenericContext.
7055 (mono_metadata_generic_context_hash): Likewise from
7056 'mono_metadata_generic_method_hash'. Change hash function.
7057 (mono_metadata_load_generic_params): Update to changes.
7058 (mono_get_shared_generic_method): Remove.
7059 * metadata-internals.h (mono_get_shared_generic_method): Remove.
7060 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
7061 (inflate_generic_context): Likewise.
7062 (mono_class_inflate_generic_method_full): Likewise.
7063 (setup_generic_array_ifaces): Likewise.
7064 (mono_class_create_from_typespec): Likewise.
7065 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
7066 (method_encode_methodspec): Update callsite.
7067 (reflection_methodbuilder_to_mono_method): Update to changes.
7068 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
7069 MonoGenericContext as the key to the hashtable.
7070 (inflate_mono_method): Update to changes.
7072 * class-internals.h (MonoGenericMethod::container): Remove.
7073 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
7075 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
7077 * profiler-private.h, profiler.c, profiler.h: added API to profile
7080 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
7082 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
7084 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
7086 * verify.c: method invocation is now validated, now we verify parameter types on stack.
7087 Fixed overflow and underflow not aborting the verification process.
7089 2007-06-13 Mark Probst <mark.probst@gmail.com>
7091 * class-internals.h (MonoStats): Added stats entries for dynamic
7094 2007-06-12 Zoltan Varga <vargaz@gmail.com>
7096 * loader.c (mono_free_method): Free header->locals and header->clauses.
7098 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
7101 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
7103 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
7105 2007-06-12 Raja R Harinath <rharinath@novell.com>
7107 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
7110 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
7112 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
7114 2007-06-11 Raja R Harinath <harinath@gmail.com>
7116 MonoGenericMethod on a diet
7117 * class-internals.h (_MonoMethodInflated::reflection_info): Move
7119 (_MonoGenericMethod::reflection_info): ... from here.
7120 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
7122 * reflection.c (inflate_mono_method): Likewise.
7123 (mono_reflection_bind_generic_method_parameters): Likewise.
7125 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
7127 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
7128 *verify.c: factored long ldarg forms to share code with short forms
7130 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
7132 *verify.c: fixed code formating factored some duplicate code
7135 *verify.h: fixed binary incompatibility introduced earlier
7137 *pedump.c: fixed formating
7139 2007-06-11 Raja R Harinath <harinath@gmail.com>
7141 Fix assertion when disassembling Mono.C5.dll
7142 * loader.c (method_from_methodspec): Avoid inflating a method
7143 twice with the same context. If the methodref is inflated, use
7144 the declaring method instead.
7146 * class.c (mono_class_from_generic_parameter): Fix case similar to
7147 bug #81830 handled below, but for method containers.
7149 2007-06-10 Raja R Harinath <harinath@gmail.com>
7151 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
7152 get_shared_generic_class. Directly inflate the instance.
7153 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
7154 (inflate_generic_class): Delete.
7155 (get_shared_generic_class): Delete. Move setting of
7156 'cached_class' and 'cached_context' ...
7157 * metadata.c (mono_metadata_lookup_generic_class): ... here.
7159 * metadata.c (mono_metadata_lookup_generic_class): Change
7160 signature to take the components of a MonoGenericClass rather than
7161 an allocated MonoGenericClass. Change semantics to be intern-like.
7162 * reflection.c (mono_class_bind_generic_parameters): Update to
7163 changes. Make locking region tighter.
7164 * class.c (inflate_generic_class): Update to changes.
7165 (get_shared_generic_class): Likewise.
7166 * metadata-internals.h: Likewise.
7168 * reflection.c (mono_class_bind_generic_parameters): Take and
7169 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
7170 (mono_reflection_bind_generic_parameters): Use
7171 'mono_class_bind_generic_parameters' rather than duplicate the code.
7172 * class.c (mono_bounded_array_class_get): Update to changes.
7173 * object-internals.h: Likewise.
7175 * reflection.c (mono_class_bind_generic_parameters): Only support
7176 parameterizing generic type definitions. Remove support for other
7179 2007-06-08 Zoltan Varga <vargaz@gmail.com>
7181 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
7183 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
7184 in the dynamic case.
7186 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
7188 * threads.c: When cleaning up thread, reset the Background bit.
7191 2007-06-08 Jonathan Chambers <joncham@gmail.com>
7193 * metadata.c: Move variable declarations to top of scope.
7194 * verify.c: Move variable declarations to top of scope.
7196 Code is contributed under MIT/X11 license.
7198 2007-06-08 Raja R Harinath <rharinath@novell.com>
7200 * reflection.c (mono_class_bind_generic_parameters): Replace
7201 open-coded loop with mono_metadata_inflate_generic_inst.
7203 * class.c (get_shared_generic_class): Don't call
7204 mono_get_shared_generic_inst. Use the container's own
7207 * metadata.c (mono_metadata_load_generic_params): Move
7208 initialization of 'context' field here from ...
7209 * class.c (mono_class_create_from_typedef): ... here, and ...
7210 * loader.c (mono_get_method_from_token): ... here.
7212 * class.c (get_shared_generic_class): Rename from
7213 mono_get_shared_generic_class and make static.
7214 (mono_get_shared_generic_inst): Move to metadata.c.
7215 * loader.c (mono_get_shared_generic_method): Likewise.
7216 * class-internals.h, metadata-internals.h: Update to changes.
7219 * class.c (mono_class_from_generic_parameter): Don't assume a
7220 generic container owner exists. Generic containers from monodis
7223 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
7225 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
7226 * verify.h: new typedefs to returns the non-verifiable status
7227 * verify.c: initial implementation of generics, stack merging and object compatibility check
7229 2007-06-06 Mark Probst <mark.probst@gmail.com>
7231 * class.c, image.c, class-internals.h (MonoImage): class_cache is
7232 a MonoInternalHashTable again (fixed bug in internal hash table
7235 2007-06-06 Mark Probst <mark.probst@gmail.com>
7237 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
7238 MonoInternalHashTable again (fixed bug in internal hash table
7241 2007-06-06 Mark Probst <mark.probst@gmail.com>
7243 * class.c, image.c, class-internals.h, domain.c,
7244 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
7245 changes. Have to figure out what makes them break the SWF
7248 2007-06-04 Mark Probst <mark.probst@gmail.com>
7250 * class.c, image.c, class-internals.h (MonoImage): class_cache is
7251 a MonoInternalHashTable now.
7253 2007-06-04 Mark Probst <mark.probst@gmail.com>
7255 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
7256 MonoInternalHashTable now.
7258 2007-05-31 Zoltan Varga <vargaz@gmail.com>
7260 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
7263 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
7265 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
7266 dependent trampoline.
7268 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
7270 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
7272 2007-05-29 Robert Jordan <robertj@gmx.net>
7274 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
7276 2007-05-28 Zoltan Varga <vargaz@gmail.com>
7278 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
7280 2007-05-25 Jonathan Chambers <joncham@gmail.com>
7282 * marshal.c: Fix interface lookup loops for
7283 cominterop_get_com_slot_for_method and
7284 cominterop_get_method_interface. Only need to lookup
7285 if type is a class, else use interface type method is on.
7287 Code is contributed under MIT/X11 license.
7289 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
7291 * reflection.c: HasSecurity can be present even if no specially
7292 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
7293 SecurityAttribute). Fix CAS regression tests on buildbot.
7295 2007-05-24 Jonathan Chambers <joncham@gmail.com>
7297 * appdomain.c: Add configure checks for header files.
7298 * image.c: Add configure checks for header files.
7299 * file-io.c: Add configure checks for header files.
7300 * debug-mono-symfile.c: Add configure checks for header files.
7301 * threadpool.c: Add configure checks for header files.
7302 * console-io.c: Add configure checks for header files.
7303 * profiler.c: Add configure checks for header files.
7304 * rawbuffer.c: Add configure checks for header files.
7305 * icall.c: Add configure checks for header files.
7306 * rand.c: Add configure checks for header files.
7307 * socket-io.c: Add configure checks for header files.
7309 Code is contributed under MIT/X11 license.
7311 2007-05-24 Zoltan Varga <vargaz@gmail.com>
7313 * reflection.c (mono_custom_attrs_from_builders): Remove the
7314 assertion as it breaks the build.
7316 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
7318 * reflection.c (lookup_custom_attr): Make a copy here too.
7320 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
7323 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
7326 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
7329 2007-05-22 Zoltan Varga <vargaz@gmail.com>
7331 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
7332 (load_cattr_value): Ditto.
7334 2007-05-20 Zoltan Varga <vargaz@gmail.com>
7336 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
7338 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
7340 * threads.c: In "start_wrapper", set apartment_state to MTA if
7341 apartment_state is Unknown and we're running on 2.0 profile or
7343 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
7344 to main method, then set apartment_state to Unknown on 1.0 profile,
7345 and MTA on 2.0 profile.
7347 2007-05-16 Jb Evain <jb@nurv.fr>
7349 * class-internals.h (MonoDefaults): Add an attribute_class and
7350 customattribute_data_class.
7351 * domain.c (mono_init_internal): Populate them.
7352 * reflection.c: Use them to remove duplicates. Make a vew
7353 MonoClass variables `static'.
7355 2007-05-15 Massimiliano Mantione <massi@ximian.com>
7357 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
7358 step in implementing IMT, so that all isinst checks now can go
7360 This was needed because vtables for TransparentProxy need to look
7361 like the vtable of the "target" class, so they need to point to
7362 its interface bitmap directly.
7364 * object.c: inside "mono_class_create_runtime_vtable" and
7365 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
7367 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
7369 * object-internals.h
7370 culture-info.h : added territory field in MonoCulture and
7371 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
7372 * locales.c : fill territory field above too.
7373 * culture-info-table.h : regenerated.
7375 2007-05-12 Zoltan Varga <vargaz@gmail.com>
7377 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
7380 2007-05-11 Jonathan Chambers <joncham@gmail.com>
7382 * object.c: Always initialize apartment, even if
7383 there is no custom attributes on entry point.
7385 Code is contributed under MIT/X11 license.
7387 2007-05-10 Jonathan Chambers <joncham@gmail.com>
7389 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
7390 * metadata.c: If no encoding is set, check for unicode
7393 Code is contributed under MIT/X11 license.
7395 2007-05-09 Jonathan Chambers <joncham@gmail.com>
7397 * threads.c: Handle if mono_thread_current returns NULL
7399 Code is contributed under MIT/X11 license.
7401 2007-05-09 Jonathan Chambers <joncham@gmail.com>
7403 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
7404 in start_wrapper. Added mono_thread_init_apartment_state and
7405 mono_thread_cleanup_apartment_state.
7406 * object.c: Initialize thread apartment state on main thread
7407 by checking for STAThreadAttribute on entry point.
7408 * object-internals.h: Add apartment_state field to MonoThread.
7409 * threads-types.h: Add unmanaged definition of
7410 System.Threading.ApartmentState, MonoThreadApartmentState.
7412 Code is contributed under MIT/X11 license.
7414 2007-05-08 Jonathan Chambers <joncham@gmail.com>
7416 * class.c: Fix windows build.
7417 * class-internals.h: Fix windows build.
7419 Code is contributed under MIT/X11 license.
7421 2007-05-08 Robert Jordan <robertj@gmx.net>
7423 * process.c (CreateProcess_internal):
7424 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
7425 .CreateNoWindow was specified. Fixes #81496.
7427 2007-05-08 Massimiliano Mantione <massi@ximian.com>
7429 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
7430 step in implementing IMT, replaced it with two compact arrays
7431 (interfaces_packed and interface_offsets_packed) and a bitmap that
7432 is used for isinst checks (interface_bitmap).
7434 * class.c: (compare_interface_ids): compare function to pass to
7435 bsearch when looking for an interface with a given id.
7436 (mono_class_interface_offset): reimplemented using bsearch on
7437 interfaces_packed, getting the offset from interface_offsets_packed.
7438 (print_implemented_interfaces): utility debugging function.
7439 (setup_interface_offsets): reworked to initialize interfaces_packed,
7440 interface_offsets_packed and interface_bitmap.
7442 * object.c: replaced all accesses to "MonoClass.interface_offsets"
7443 with uses of interfaces_packed and interface_offsets_packed.
7445 2007-05-08 Massimiliano Mantione <massi@ximian.com>
7447 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
7448 mono_class_interface_offset prototype to wrap all accesses to
7449 "MonoClass.interface_offsets".
7451 * class.c: Implemented mono_class_interface_offset, and wrapped all
7452 accesses to "MonoClass.interface_offsets".
7454 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
7455 "MonoClass.interface_offsets".
7457 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
7459 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
7460 GetMethodFromHandle overloads (bug #78637).
7462 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
7464 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
7465 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
7467 2007-05-01 Zoltan Varga <vargaz@gmail.com>
7469 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
7472 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
7474 (mono_custom_attrs_from_index): Ditto.
7476 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
7479 2007-04-30 Zoltan Varga <vargaz@gmail.com>
7481 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
7482 is now allocated from a mempool.
7484 2007-04-28 Zoltan Varga <vargaz@gmail.com>
7486 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
7487 caller holds threads_lock, leading to deadlocks. Fixes #81476.
7489 2007-04-26 Zoltan Varga <vargaz@gmail.com>
7491 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
7492 mono_loader_clear_error () too late. Fixes #81463.
7494 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
7496 * culture-info-table.h : regenerated.
7498 2007-04-25 Zoltan Varga <vargaz@gmail.com>
7500 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
7503 2007-04-25 Dick Porter <dick@ximian.com>
7505 * Makefile.am: Put the mingw enforced-optimisation back into the
7506 PLATFORM_WIN32 section.
7508 2007-04-24 Zoltan Varga <vargaz@gmail.com>
7510 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
7513 * image.c (mono_image_load_module): New API function to load a module reference.
7515 * image.c (load_modules): Load modules lazily. Fixes #80812.
7517 * class.c (mono_class_from_typeref): Use mono_image_load_module.
7519 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
7521 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
7522 to mono_image_load_module_dynamic.
7524 2007-04-23 Jonathan Chambers <joncham@gmail.com>
7526 * marshal.c: Fix calling convention for CCW on non-windows
7527 platforms. STDCALL on windows, CDECL everywhere else to work
7528 with XPCOM and MainWin COM.
7530 Code is contributed under MIT/X11 license.
7532 2007-04-23 Martin Baulig <martin@ximian.com>
7537 (method_from_memberref): Added `gboolean *used_context' argument.
7538 (mono_get_method_from_token): Likewise.
7539 (mono_get_method_full): Don't insert the method in the cache when
7540 `used_context' is true.
7542 2007-04-23 Raja R Harinath <rharinath@novell.com>
7544 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
7546 * reflection.c (mono_reflection_bind_generic_parameters): Don't
7547 create new MonoTypes for returned types.
7548 * class.c (mono_generic_class_get_class): Export mono-internal.
7549 * class-internals.h: Update to changes.
7551 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
7553 * threadpool.c, threadpool.h, icall-def.h: patch from
7554 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
7556 2007-04-18 Zoltan Varga <vargaz@gmail.com>
7558 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
7560 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
7562 * threads.c (mono_thread_get_stack_bounds): New helper function.
7564 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
7565 Correctly compute stack bounds when attaching. Fixes #81394.
7567 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
7569 * reflection.c: fix handling of doubles in custom attributes
7570 for the arm-fpa format (bug #81368).
7572 2007-04-18 Raja R Harinath <rharinath@novell.com>
7574 * reflection.c (assembly_add_win32_resources): Mildly relax an
7575 bounds check to let the end pointer point just past the end of the
7576 allocated buffer. (may fix #81384)
7578 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
7580 * culture-info-table.h : regenerated.
7582 2007-04-07 Zoltan Varga <vargaz@gmail.com>
7584 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
7585 the thread is aborted early.
7587 2007-04-05 Dick Porter <dick@ximian.com>
7589 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
7590 FindFirstFile()/FindNextFile() to find entries. This lets the
7591 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
7594 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
7596 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
7598 2007-04-04 Martin Baulig <martin@ximian.com>
7601 (mono_method_desc_full_match): Add support for nested classes.
7603 2007-04-02 Zoltan Varga <vargaz@gmail.com>
7605 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
7607 2007-04-01 Zoltan Varga <vargaz@gmail.com>
7609 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
7610 waiting for too many threads.
7612 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
7614 * environment.c: Fix return value check on uname so we can get the
7615 executing version on Solaris operating systems.
7617 2007-03-28 Jb Evain <jbevain@gmail.com>
7619 * class.c (mono_type_get_name_recurse): Complete the
7620 fix for the creation of assembly qualified names for
7621 pointer types. Fixes #81208.
7623 2007-03-27 Dick Porter <dick@ximian.com>
7625 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
7626 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
7630 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
7631 the value of ReleaseMutex().
7633 2007-03-27 Dick Porter <dick@ximian.com>
7635 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
7636 in little-endian order, not network endian, so must be converted
7637 to host endian here. Fixes bug 80593.
7639 2007-03-22 Jb Evain <jbevain@gmail.com>
7641 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
7642 qualified names for pointer types. Fixes #81208.
7644 2007-03-21 Jonathan Chambers <joncham@gmail.com>
7646 * marshal.c: Add support for PreserveSigAttribute.
7648 Code is contributed under MIT/X11 license.
7650 2007-03-14 Zoltan Varga <vargaz@gmail.com>
7652 * process.c: Fix endianness issues. Fixes #81126.
7654 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
7655 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
7657 * image.c (mono_image_lookup_resource): Make this work on big-endian
7658 machines.Change API contract so the caller needs to free the return value.
7660 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
7663 2007-03-14 Martin Baulig <martin@ximian.com>
7665 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
7666 mono_type_get_desc() as well.
7668 2007-03-13 Jonathan Chambers <joncham@gmail.com>
7670 * icall.c: Fix environ access in VS.
7672 2007-03-13 Alp Toker <alp@atoker.com>
7674 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
7675 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
7678 2007-03-12 Zoltan Varga <vargaz@gmail.com>
7680 * reflection.c (mono_reflection_create_dynamic_method): Add support for
7681 circular references among dynamic methods. Fixes #81091.
7683 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
7685 2007-03-09 Martin Baulig <martin@ximian.com>
7687 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
7689 2007-03-09 Jonathan Chambers <joncham@gmail.com>
7691 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
7692 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
7694 Code is contributed under MIT/X11 license.
7696 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
7698 * loader.c: Reapply patch for bug #79424.
7700 2007-03-06 Zoltan Varga <vargaz@gmail.com>
7702 * metadata.c (mono_type_to_unmanaged): Only convert object to
7703 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
7705 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
7707 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
7708 (and incorrectly set) is_reference field from MonoGenericInst.
7710 2007-03-06 Zoltan Varga <vargaz@gmail.com>
7712 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
7715 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
7717 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
7719 2007-03-05 Miguel de Icaza <miguel@novell.com>
7721 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
7722 FileOptions.1 value to mean "temporary", map that to
7723 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
7727 2007-03-03 Marek Habersack <mhabersack@novell.com>
7729 * appdomain.c: implement MS .Net style shadow copying. Copies of
7730 the assemblies are made in a subdirectory of the dynamic base
7731 directory, the assembly names are preserved.
7732 Copy .mdb and .config files along with the assemblies being shadowed.
7734 2007-02-28 Zoltan Varga <vargaz@gmail.com>
7736 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
7737 (emit_marshal_handleref): Ditto.
7739 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
7740 on Visual C++. Fixes #80671.
7742 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7744 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
7745 for clone operations.
7747 2007-02-28 Zoltan Varga <vargaz@gmail.com>
7749 * marshal.c: Fix warnings.
7751 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
7753 * loader.c: allow case-insensitive matching of the dll name
7754 in dllmap handling when prefixed with "i:".
7756 2007-02-20 Jonathan Chambers <joncham@gmail.com>
7758 * threads.c: Fix #ifdef for dummy_apc function for VS.
7760 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
7762 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
7764 2007-02-19 Massimiliano Mantione <massi@ximian.com>
7765 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
7766 giving precedence to the methods with a fully qualified name
7767 (InterfaceName.MethodName) when building the interface sections
7770 2007-02-16 Dick Porter <dick@ximian.com>
7772 * threadpool.c (append_job): Fix fast-path array handling, so it's
7773 less likely the array will grow exponentially when the load is
7776 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
7778 * metadata-internals.h, loader.c: fix dllmap lookup order
7779 for non-function maps, too, and prepare for fallback code.
7781 2007-02-12 Robert Jordan <robertj@gmx.net>
7783 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
7784 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
7785 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
7786 GlobalFree. Fixes a part of bug #77075.
7788 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
7790 * loader.c: implemented typedef parent in field memberref.
7792 2007-02-11 Jonathan Chambers <joncham@gmail.com>
7794 * marshal.c: Fix warnings and remember to call Release on
7797 Code is contributed under MIT/X11 license.
7799 2007-02-10 Miguel de Icaza <miguel@novell.com>
7801 * class-internals.h: Add MonoHandleRef definition, and
7802 handleref_class to mono_defaults.
7804 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
7805 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
7807 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
7808 (do nothing on this stage)
7809 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
7810 (emit_marshal_handleref): New method, used for argument handling
7813 2007-02-08 Jonathan Chambers <joncham@gmail.com>
7815 * class.c (mono_class_setup_parent): Lazily init com types.
7816 * domain.c (mono_init_internal, mono_init_com_types): Lazily
7818 * object.c (mono_remote_class_vtable): Lazily init com types.
7819 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
7820 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
7821 * domain-internals.h: Expose mono_init_com_types.
7822 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
7823 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
7824 Add support for COM Callable Wrapper marshalling.
7825 * marshal.h: Add icall definitions.
7826 * gc.c: Handle freeing of CCWs in finalizer code.
7828 Code is contributed under MIT/X11 license.
7830 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
7832 * reflection.c: changed all the signature encoding code to use
7833 a variable-sized buffer.
7835 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7837 * marshal.c: locking fixes: never take the loader lock
7838 or other runtime locks when holding the marshal lock
7841 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
7843 * marshal.c: make the delegate function pointer mapping
7844 work for the moving GC.
7846 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
7848 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
7851 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7853 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
7856 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7858 * threadpool.c: made the code moving-GC safe.
7860 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
7862 * assembly.c, boehm-gc.c, class-internals.h, class.c,
7863 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
7864 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
7866 * reflection.c: warning cleanup, some threading and moving GC fixes.
7868 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
7870 * class.c, loader.c: create the needed Set/Get/Address array methods
7871 as well as the .ctors in mono_class_init (), fixes bug #80567.
7873 2007-01-24 Zoltan Varga <vargaz@gmail.com>
7875 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
7876 we doesn't decrease its alignment. Should fix the sparc build.
7878 2007-01-24 Dick Porter <dick@ximian.com>
7881 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
7882 Create the returned object if we need to ignore an unsupported
7883 socket option. Fixes a segfault reported by Atsushi.
7885 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
7887 * class.c, object.c: restrict GC-tracked fields to
7888 UIntPtr fields used inside corlib, so we provide better
7889 type info to the GC and also allow broken packing as in
7892 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
7894 * sgen-gc.c: removed duplicated function.
7896 2007-01-19 Miguel de Icaza <miguel@novell.com>
7898 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
7899 value that means that the value is not supported, but that we
7900 should not return a failure, but instead report this as a
7901 successful operation.
7903 2007-01-19 Raja R Harinath <rharinath@novell.com>
7905 Fix tests/bug79956.2.il
7906 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
7907 (mono_generic_class_get_class): If the generic definition in an
7908 enum, copy over other fields related to it.
7910 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7912 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
7913 genericinst enums (bug #79215).
7915 2007-01-17 Massimiliano Mantione <massi@ximian.com>
7916 * class.c: Fix bug 80307.
7918 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
7920 * image.c: if the file table is not present, try to load
7921 all the modules, since we don't have info about them
7922 having or not metadata (bug #80517).
7923 * assembly.c: allow mono_assembly_load_references () to
7924 work for netmodules.
7926 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
7928 * image.c, metadata-internals.h, object.c: execute module
7929 cctors when running on the 2 runtime if present (bug #80487).
7931 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
7933 * icall.c: optimized InitializeArray() on bigendian.
7935 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
7937 * icall.c: fix for the broken ARM FPA double format.
7939 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7941 * icall.c: handle endian issues for r4 and r8 types, too, in
7942 the InitializeArray() icall.
7944 2007-01-15 Miguel de Icaza <miguel@novell.com>
7946 * loader.c (mono_loader_error_prepare_exception): Clear the error
7947 once we have extracted the information from it, do this before we
7948 call into the JIT's class loading mechanisms.
7950 * object.c (mono_class_create_runtime_vtable): Do not clear the
7951 loader error before calling mono_class_get_exception_for_failure
7952 as the loader error is needed inside
7953 mono_class_get_exception_for_failure to throw the error (thinko).
7957 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7959 * reflection.c: align fields rva data so it's faster to load at
7962 2007-01-12 Raja R Harinath <rharinath@novell.com>
7964 Prepare to simplify GenericMethod handling.
7965 * class-internals.h (mono_method_get_context): New accessor function.
7966 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
7967 rather than directly accessing '->context' field.
7969 * class-internals.h (_MonoGenericParam.method): Move ...
7970 (_MonoGenericContainer): ... here. Add into union with klass field.
7971 * class.c, icall.c, loader.c, metadata.c, reflection.c:
7974 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
7976 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
7977 the wrapper type enum and reduce relocations.
7979 2007-01-12 Raja R Harinath <rharinath@novell.com>
7981 * reflection.c (inflate_mono_method): Reuse method instantiation
7982 from the generic method, if available.
7984 2007-01-11 Jonathan Chambers <joncham@gmail.com>
7986 * marshal.c (emit_marshal_variant): Fix conv_arg
7987 type in last commit, based on whether parameter is byref.
7989 2007-01-11 Jonathan Chambers <joncham@gmail.com>
7991 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
7993 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
7994 MONO_TYPE_OBJECT back for VARIANT support.
7996 2007-01-11 Jonathan Chambers <joncham@gmail.com>
7998 * marshal.c, marshal.h, icall-def.h: Implement
7999 Marshal.ReAllocCoTaskMem.
8001 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
8003 * marshal.c: memory retention fixes: use the proper
8004 image cache for runtime_invoke method lookups.
8006 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
8008 * mempool.c: added code to help debug mempool allocations.
8010 2007-01-11 Dick Porter <dick@ximian.com>
8012 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
8013 support (experimenting with faking it with IP_MTU_DISCOVER for
8014 systems that don't have IP_DONTFRAGMENT.)
8015 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
8018 * icall-def.h: new System.Net.Sockets.Disconnect icall.
8020 * socket-io.h: Add new fields to MonoSocketAsyncResult
8021 corresponding to the new ones in Socket.cs.
8023 2007-01-11 Raja R Harinath <rharinath@novell.com>
8025 Fix IronPython regression mentioned in #80249
8026 * metadata.c (do_mono_metadata_parse_generic_class): Clear
8027 'cached_context' field, since it may have been initialized as a
8028 side-effect of metadata parsing.
8030 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
8031 (_MonoGenericClass.cached_class): Move here and rename from lone
8032 remaining field of ...
8033 (_MonoInflatedGenericClass): ... this. Remove.
8034 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
8037 Fix mcs/tests/test-128.cs regression.
8038 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
8039 2007-01-10 change below.
8040 [MONO_TYPE_OBJECT]: Recurse into array case.
8042 2007-01-11 Raja R Harinath <harinath@gmail.com>
8044 * class-internals.h (mono_get_inflated_generic_class): Remove.
8045 * class.c (mono_get_inflated_generic_class): Remove.
8046 (mono_generic_class_get_class): Rename from
8047 mono_class_create_generic.
8048 (mono_class_from_mono_type) [GENERICINST]: Use it.
8049 * reflection.c, metadata.c: Update to changes. Use
8050 'mono_class_from_mono_type'.
8052 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
8054 * reflection.c: use passed type when encoding an array element
8055 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
8057 2007-01-09 Robert Jordan <robertj@gmx.net>
8059 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
8060 result arguments (someDelegate.EndInvoke (unrelatedAres)).
8063 2007-01-09 Raja R Harinath <rharinath@novell.com>
8065 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
8067 * object.c (set_value): Avoid aliasing between type->data.klass
8068 and type->data.generic_class.
8070 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
8072 2007-01-08 Raja R Harinath <rharinath@novell.com>
8074 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
8075 between type->data.klass and type->data.generic_class.
8077 2007-01-08 Lluis Sanchez <lluis@ximian.com>
8079 * marshal.c: In MS.NET, StringBuilder objects are not copied by
8080 value in out parameters.
8082 2007-01-08 Raja R Harinath <rharinath@novell.com>
8084 Simplify invariant for MonoGenericClass::klass field.
8085 * class.c (mono_class_create_generic): Verify 'klass' is null.
8086 * metadata.c (do_mono_metadata_parse_generic_class): Don't
8087 initialize 'klass' field.
8089 2007-01-05 Raja R Harinath <rharinath@novell.com>
8091 Ongoing work to avoid redundant data and simplify invariants.
8092 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
8093 'generic_class', and change type to a GenericInst.
8094 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
8095 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
8097 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
8099 * class.c : skip io-layer under PLATFORM_WIN32.
8101 2007-01-03 Tor Lillqvist <tml@novell.com>
8103 Fix #80305: In a bundled executable, look in the bundled exe
8104 assembly to determine the runtime version. Add the possibility to
8105 bundle also the machine.config file.
8107 * assembly.c (mono_assembly_open_from_bundle): Make
8108 non-static. Allow being called even if we have no bundled
8109 assemblies, and return NULL right away in that case.
8111 * domain-internals.h: Declare mono_assembly_open_from_bundle()
8114 * domain.c (app_config_parse): Take an assembly exe file name as
8115 parameter instead of a config file name. Check for a bundled
8116 config file for that assembly by calling
8117 mono_config_string_for_assembly_file() (see below) before looking
8118 for one in the file system.
8119 (get_runtimes_from_exe): Corrsponding change to call of
8121 (get_runtimes_from_exe): Check for bundled assembly exe file first
8122 by calling mono_assembly_open_from_bundle(). If no bundled
8123 assembly exe file is found, call mono_image_open() as before to
8124 look it up in the file system.
8126 * mono-config.c: Add variable bundled_machinec_onfig.
8127 (mono_config_string_for_assembly_file): New function.
8128 (mono_config_for_assembly): Move code snippet that looks for a
8129 bundled assembly .config file into the above new function. Call
8131 (mono_register_machine_config, mono_get_machine_config): New
8132 functions to set and retrieve
8134 * assembly.h: Declare mono_register_machine_config().
8136 * mono-config.h: Declare mono_get_machine_config() and
8137 mono_config_string_for_assembly_file().
8139 * icall.c: No declaration of environ necessary on Win32. It is
8140 declared (as a macro expanding to a function call) in stdlib.h.
8141 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
8142 New internal mono function. Returns the value of
8143 mono_get_machine_config() as a Mono string.
8145 * icall-def.h: Add get_bundled_machine_config().
8147 2007-01-04 Raja R Harinath <rharinath@novell.com>
8149 Remove redundant field
8150 * class-internals.h (_MonoGenericContext.container): Remove field.
8151 * loader.c (mono_method_get_signature_full): Don't parse a
8152 "container" for a signature parse when the signature is inflated
8154 (method_from_methodspec): Likewise, for a generic_inst.
8155 * class.c, metadata.c, reflection.c: Update to changes.
8157 2006-01-04 Raja R Harinath <rharinath@novell.com>
8159 * class-internals.h (_MonoGenericClass): Rename 'context' field to
8160 'cached_context', and change semantics -- it starts off NULL, and
8161 is initialized on demand.
8162 * class.c (mono_generic_class_get_context): New accessor to
8163 replace 'context' field accesses.
8164 (mono_class_get_context): New helper.
8165 (*): Update to changes.
8166 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
8168 2007-01-03 Miguel de Icaza <miguel@novell.com>
8170 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
8171 before the memcpy. Fixes Marshal2 regression.
8173 2007-01-02 Jb Evain <jbevain@gmail.com>
8175 * blob.h: add a MONO_TYPE_ENUM definition
8176 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
8177 fix the encoding of arrays of enums in custom attributes.
8181 2007-01-01 Miguel de Icaza <miguel@novell.com>
8183 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
8184 string is null terminated, but only cut the string short if it
8185 overflows the buffer.
8187 (mono_string_to_byvalstr): Also fix this routine. The code here
8188 was not properly terminating a string (it was only terminated
8189 because of the previous catch-all memset).
8191 I left the memset, because I do not know if applications expect
8192 the runtime to clear this region.
8196 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
8197 Clear the error before returning to unmanaged code to prevent the
8198 runtime from being confused later on (fixes 80420).
8199 (ves_icall_type_from_name): Always call mono_loader_clear_error
8200 after parsing a type that could have failed.
8201 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
8203 * loader.c (mono_loader_clear_error): Fix indentation.
8205 2006-12-28 Martin Baulig <martin@ximian.com>
8207 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
8209 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8211 * reflection.c: patch from Rolf Bjarne Kvinge to fix
8212 getting a token for an EnumBuilder.
8214 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
8216 * reflection.c: be more careful in case resource generation
8217 fails to create the data array.
8219 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8221 * sgen-gc.c: write barrier for clone and fix unregister handles.
8223 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8225 * reflection.c: some fixes needed in the generics code for the moving GC.
8227 2006-12-22 Robert Jordan <robertj@gmx.net>
8229 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
8230 account. Fixes bug #80299.
8232 2006-12-21 Raja R Harinath <rharinath@novell.com>
8234 Fix WaitHandle usage in delegates.
8235 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
8236 * object.c (mono_wait_handle_new): Use the property set method to
8237 initialize the handle.
8238 (mono_wait_handle_get_handle): New.
8239 * threadpool.c (mono_async_invoke): Use it.
8240 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
8242 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
8244 2006-12-21 Jonathan Chambers <joncham@gmail.com>
8246 * marshal.c (emit_marshal): Call emit_marshal_variant and
8247 emit_marshal_com_interface when applicable.
8248 (emit_marshal_variant, emit_marshal_com_interface): Add
8249 methods for this case and remove if's from emit_marshal_object.
8251 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
8253 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
8255 2006-12-19 Jonathan Chambers <joncham@gmail.com>
8257 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
8258 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
8259 and GlobalFree on Windows. Remove FIXME.
8261 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8263 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
8264 implementation for managed objects.
8266 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
8268 * object.c: implemented code to be used for checking
8269 that no reference field overlaps with non-references.
8271 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8273 * threadpool.c: fix queue code to be compatible with the
8276 2006-12-18 Miguel de Icaza <miguel@novell.com>
8278 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
8279 in structures by throwing ArgumentNullException.
8281 (emit_marshal_safehandle): Also when they are null parameters.
8283 (emit_marshal_safehandle): Add support for ref
8284 SafeHandles parameters
8286 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8288 * profiler.c: updated to use the mono-dl API instead of
8291 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8293 * profiler.c: updated to use the mono-dl dynamic loading
8294 API instead of gmodule.
8296 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
8298 * profiler.c: use readlink, older versions of glib don't have
8299 g_file_read_link ().
8301 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
8303 * profiler.c: try to detect the path to mono if libc fails to provide
8304 a useful name (bug #80286).
8306 2006-12-16 Raja R Harinath <rharinath@novell.com>
8309 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
8310 instance, use the generic type definition instead.
8311 (ves_icall_Type_GetNestedTypes): Likewise.
8312 * class.c (mono_class_create_generic): Always set the
8313 nested_classes of a generic instance to NULL, even if the generic
8314 type definition has nested types.
8316 2006-12-15 Jonathan Chambers <joncham@gmail.com>
8318 * marshal.c (mono_string_from_bstr): Revert previous Windows change
8321 2006-12-15 Miguel de Icaza <miguel@novell.com>
8323 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
8324 my arguments were in the wrong order. I also fixed the Windows
8325 version which seems to have had the same issue.
8327 (mono_free_bstr): On Unix, this is g_free.
8328 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
8329 conversions (for the tests in corlib to pass).
8331 2006-12-14 Miguel de Icaza <miguel@novell.com>
8333 * marshal.c (emit_ptr_to_object_conv): For now, ignore
8334 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
8335 exception if a ref SafeHandle in a struct has changed).
8337 (emit_struct_conv): Do not perform layout checks for classes
8338 derived from SafeHandle, as those are specially handled.
8340 (emit_object_to_ptr_conv): Add support for
8341 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
8343 (emit_marshal_safehandle): Implement conversion of return values
8344 of safehandles (MARSHAL_ACTION_CONV_RESULT).
8346 * threads.c: WaitHandle now is compiled with two different handles
8347 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
8350 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
8351 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
8352 these routines to cope with both kinds of fields.
8354 2006-12-12 Miguel de Icaza <miguel@novell.com>
8356 * metadata.c (mono_type_to_unmanaged): Handle the case where
8357 type->data.klass is a SafeHandle, and in that case, return the
8358 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
8359 MONO_MARSHAL_CONV_SAFEHANDLE.
8361 2006-12-11 Miguel de Icaza <miguel@novell.com>
8363 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
8364 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
8365 calling emit_marshal_object.
8367 (emit_marshal_safehandle): Implement marshalling of
8368 SafeHandle parameters (no ref support yet).
8370 (MarshalAction): Document the defines as I implement
8371 them for SafeHandle.
8373 (emit_marshal_object): indentation police.
8375 * class-internals.h: Define MonoSafeHandle.
8376 Add safehandle_class to MonoDefaults type.
8378 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
8379 list of classes to check for fields.
8381 * domain.c (mono_init_internal): Add SafeHandle to the list of
8382 mono_defaults loaded.
8384 2006-12-15 Raja R Harinath <rharinath@novell.com>
8387 * reflection.c (mono_reflection_bind_generic_parameters): If the
8388 generic type definition is a type builder, ensure that it is fully
8389 initialized before instantiating it. Kill some dead code.
8391 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
8393 * object.c: clear the loader_error () before loading
8394 more metadata stuff (bug #80258).
8396 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
8398 * icall.c, icall-defs.h: type modifiers icalls for
8399 parameters and properties.
8401 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
8403 * object.c, icall.c: fixed warnings.
8405 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8407 * marshal.c: fixed a couple of leaks and coding style in a few places.
8409 2006-12-08 Dick Porter <dick@ximian.com>
8411 * process.c: Cope with NULL ProcessStartInfo arguments on windows
8412 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
8415 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8417 * process.c: ProcessStartInfo may have only filename set and
8418 arguments can be NULL.
8420 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
8422 * icall.c: fix leak found by Robert Jordan.
8424 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8426 * marshal.c, marshal.h: generate managed method to access an element
8427 of a multi-dimensional array.
8429 2006-11-30 Paolo Molaro (lupus@ximian.com)
8431 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
8433 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8435 * icall.c: back out GetFields () fix until the serialization code is
8436 fixed to not depend on the incorrect behaviour.
8438 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8440 * profiler.c: provide defaults if none are set.
8442 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8444 * Makefile.am, attrdefs.h: new public header file with
8445 constants for attributes for use by embedders.
8447 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8449 * icall.c: GetFields () fix for bug #80064.
8451 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
8453 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
8454 removed long unused icalls.
8456 2006-11-27 Jonathan Chambers <joncham@gmail.com>
8459 (mono_marshal_emit_managed_wrapper): Level of indirection for
8460 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
8461 can be generated without a delegate class.
8462 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
8464 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
8466 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8468 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
8471 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
8473 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
8474 icall-def.h: added icalls needed by System.GC.
8476 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
8478 * loader.c: ensure the class in catch clauses is handled
8479 correctly for generics methods (fixes bug#79980).
8481 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
8483 * monitor.h, monitor.c: added mono_locks_dump () function
8484 to help debug deadlocks involving managed locks.
8486 2006-11-13 Dick Porter <dick@ximian.com>
8488 * file-io.c (get_file_attributes): If the file is a symlink try
8489 and get the stat data for the target, but also add the
8490 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
8491 the specs for the windows symlink support, but will probably have
8492 to be reworked when I have test data from a vista machine. Fixes
8495 2006-11-13 Dick Porter <dick@ximian.com>
8497 * gc.c (mono_domain_finalize):
8498 * marshal.c (mono_delegate_begin_invoke):
8499 * threadpool.c (socket_io_init, mono_thread_pool_init)
8500 (mono_thread_pool_finish):
8501 * monitor.c (mono_monitor_try_enter_internal):
8502 * threads.c (mono_thread_resume, mono_thread_init)
8503 (mono_thread_suspend_all_other_threads)
8504 (mono_thread_execute_interruption):
8505 * appdomain.c (mono_domain_unload): Check for NULL error returns
8506 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
8509 2006-11-11 Miguel de Icaza <miguel@novell.com>
8512 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
8513 Only close the handle if the value of the handle is not
8514 INVALID_HANDLE_VALUE. This just makes the process a bit more
8517 Improvement for #75733, so that we do not run into this problem.
8520 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
8521 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
8522 internal variables. Fixes #79462
8525 2006-11-09 Dick Porter <dick@ximian.com>
8527 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
8528 Use poll() not select(). Fixes bug 79397.
8530 2006-11-09 Raja R Harinath <rharinath@novell.com>
8533 * assembly.c (mono_assembly_load_from_full): Check that the given
8534 image has an assembly manifest.
8536 2006-11-09 Ankit Jain <jankit@novell.com>
8538 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
8539 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
8540 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
8542 2006-11-07 Dick Porter <dick@ximian.com>
8544 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
8545 Put the old resolver behaviour back for pre-2.0 profiles.
8547 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
8549 * threadpool.c: precise GC and locking fixes.
8551 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
8553 * class.c: don't load types that have an explicit unaligned
8554 managed reference. Provide better info in the TypeLoad exception.
8555 Part of the fix for bug #79744.
8556 * object.c: use the correct check for class type load issues.
8558 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
8560 * class.c: enforce alignment of fields with managed references
8561 even when Pack=1 is forced by the user (bug #77788).
8563 2006-11-03 Dick Porter <dick@ximian.com>
8565 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
8566 If the address reverse lookup fails, return it as the hostname
8567 anyway. Fixes bug 79721.
8569 2006-11-03 Dick Porter <dick@ximian.com>
8571 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
8572 Fix build on Windows.
8574 2006-11-02 Dick Porter <dick@ximian.com>
8577 * object-internals.h:
8578 * exception.c (mono_get_exception_thread_interrupted):
8579 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
8582 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
8583 Check for pending Thread.Interrupt.
8585 2006-10-27 Massimiliano Mantione <massi@ximian.com>
8586 * loader.c: Fixed bug 79684.
8588 2006-10-27 Dick Porter <dick@ximian.com>
8590 * file-io.c (get_file_attributes): Force symlinks to directories
8591 to be returned as a regular file. Fixes bug 79733.
8592 2006-10-26 Dick Porter <dick@ximian.com>
8594 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
8595 CreateFile to open a directory then we need to set the
8596 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
8598 2006-10-23 Zoltan Varga <vargaz@gmail.com>
8600 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
8603 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
8605 * sgengc.c: small cleanup of timer code.
8607 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8609 * sgen-gc.c: fix some warnings and start adding support for
8610 complete object removal on domain unload.
8612 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
8614 * assembly.c: build_assembly_name should not consider a version
8615 number without build or revision number invalid. Fixes bug #79715.
8617 2006-10-18 Jonathan Chambers <joncham@gmail.com>
8619 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
8620 call kernel32 function OutputDebugString directly.
8622 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
8624 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
8626 * reflection.c: small cleanup, using a function to insert a MonoString
8629 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
8631 * reflection.c: moving GC fixes.
8633 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
8635 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
8636 all the objects with finalizers belonging to an unloading appdomain.
8638 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
8640 * sgen-gc.c: added ability to allocate even when the nursery is fully
8641 pinned and fixed a couple of bugs.
8643 2006-10-15 Zoltan Varga <vargaz@gmail.com>
8645 * threads.h: Revert the last change for now.
8647 * threads.h (mono_thread_get_pending_exception): Rename this to
8648 mono_thread_get_undeniable_exception ().
8650 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
8652 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
8653 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
8654 when fname does not refer to valid assembly. This result in a more
8655 meaningful error message.
8656 * exception.c: added mono_get_exception_bad_image_format2 which
8657 constructs a BadImageFormatException using the ctor taking a custom
8658 message and the file name. Passing in a NULL msg results in a default
8660 * exception.h: define mono_get_exception_bad_image_format2 function.
8661 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
8662 when file name pointed to an invalid IL image. Use
8663 mono_get_exception_file_not_found2 to construct FileNotFoundException,
8664 as this results in a more meaningful error message.
8666 2006-10-15 Zoltan Varga <vargaz@gmail.com>
8668 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
8671 2006-10-12 Zoltan Varga <vargaz@gmail.com>
8673 * metadata.c (mono_type_size): Change the align parameter to guint32 for
8674 consistency with the other _size functions.
8675 (mono_type_stack_size): Ditto.
8677 * class.c object.c icall.c: Fix warnings caused by the above change.
8679 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
8681 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
8683 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
8685 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
8687 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
8688 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
8689 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
8690 threadpool.h, threads-types.h: mark more internal functions.
8692 2006-10-11 Dick Porter <dick@ximian.com>
8694 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
8695 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
8696 reproduce the bug even before applying the fix.)
8698 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
8700 * reflection.c: allow retrieving attributes for arguments in generic
8701 methods (bug #79241).
8703 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
8705 * debug-mono-symfile.c: properly check fopen () result (found by
8708 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
8710 * reflection.c: make error message clearer and fixed two
8711 issuelets found by Coverity.
8713 2006-10-10 Zoltan Varga <vargaz@gmail.com>
8715 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
8717 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
8719 * object-internals.h, gc-internal.h, profiler-private.h:
8720 mark internal functions.
8722 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
8724 * reflection.c: put data in the text section.
8725 * icall.c: recognize more types in type_from_typename ().
8726 * process.c, marshal.c: added some GC FIXMEs.
8728 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
8730 * loader.c: check for NULL before initializing.
8732 2006-10-09 Zoltan Varga <vargaz@gmail.com>
8734 * gc.c (finalizer_thread): Use a non-alertable wait here.
8736 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
8737 until the correct solution is found.
8739 2006-10-06 Zoltan Varga <vargaz@gmail.com>
8741 * reflection.c (mono_module_get_object): Avoid an assert when operating on
8742 modules with no metadata. Fixes #79596.
8744 * image.c (load_metadata_ptrs): Put back the error message when
8745 the #- heap is encountered since the support is not complete yet.
8747 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
8749 * gc.c: do not allow the user to SuppressFinalize () a
8750 delegate because it would leak the trampoline if present.
8752 2006-10-06 Zoltan Varga <vargaz@gmail.com>
8754 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
8757 2006-10-05 Zoltan Varga <vargaz@gmail.com>
8759 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
8761 * metadata.c (mono_metadata_get_param_attrs): Ditto.
8763 * row-indexes.h: Add definitions for *Ptr tables.
8765 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
8767 * metadata.c (mono_metadata_translate_token_index): New helper function to
8768 translate table indexes used in uncompressed metadata.
8769 (mono_metadata_decode_table_row): Ditto.
8770 (mono_metadata_decode_table_row_col): Ditto.
8772 * metadata.c: Add table schema for *Ptr tables.
8774 * class.c loader.c: Use the new helper function to access the affected metadata
8777 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
8780 2006-10-04 Zoltan Varga <vargaz@gmail.com>
8782 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
8783 sequences which can be unbounded in size. Fixes #79583.
8785 2006-10-02 Zoltan Varga <vargaz@gmail.com>
8787 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
8788 static initialization.
8790 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
8792 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
8794 * domain.c (mono_domain_free): Free up type_init_exception_hash.
8796 * object.c (mono_runtime_class_init): Implement correct semantics when a static
8797 ctor fails, i.e. throw the same exception on subsequent accesses.
8799 2006-09-0 Jonathan Chambers <joncham@gmail.com>
8801 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
8802 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
8803 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
8804 Handle marshalling of interfaces and VARIANTs contained in structs.
8806 Code is contributed under MIT/X11 license.
8808 2006-09-30 Zoltan Varga <vargaz@gmail.com>
8810 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
8812 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
8815 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8817 * console-io.c: ignore previous SIGINT handler.
8819 2006-09-27 Zoltan Varga <vargaz@gmail.com>
8821 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
8822 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
8823 #79460, #79461, #79485.
8825 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
8827 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
8830 2006-09-26 Zoltan Varga <vargaz@gmail.com>
8832 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
8833 could be generated from it.
8835 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
8837 * rand.c: fix read loop to correctly handle EINTR.
8839 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
8841 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
8842 internal calls are defined to keep methods closer to the declaring
8843 type and allow a significant reduction in runtime relocations and
8846 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
8848 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
8849 exception message to have FileNotFoundException use the default
8850 assembly load error message. Fixes bug #79426.
8851 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
8853 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8855 * threadpool.c: (start_thread_or_queue) use the root domain when
8856 creating the thread instead of the async object one.
8858 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
8860 * class.c, object.c, class-internals.h, reflection.c:
8861 for arrays, store element_size inside MonoClass (speedup
8862 for array object creation).
8864 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
8866 * icall.c: fixed CodeBase to use the file name and not the module
8869 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
8871 * mono-debug.c, mono-debug.h: export find_method as
8872 mono_debug_find_method ().
8874 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
8876 * debug-helpers.c, class-internals.h: added a few functions useful
8877 when debugging under gdb.
8879 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8881 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
8882 characters that need special handling.
8884 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
8886 * mono-config.c: make the os/cpu specification more flexible,
8887 allowing lists and negation.
8889 2006-09-18 Jonathan Chambers <joncham@gmail.com>
8891 * marshal.c: COM Interop fixes. Handle case where method->klass.
8892 is interface. Handle BSTR/MonoString when null. Use CDECL as
8893 calling convention on non-windows platforms. This is for
8894 compatibility with XPCOM and MainWin COM.
8896 Code is contributed under MIT/X11 license.
8899 2006-09-18 Zoltan Varga <vargaz@gmail.com>
8901 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
8902 correctly. Fixes #79217.
8904 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
8906 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
8908 * mono-config.c: allow both an os and cpu attribute for dllmap
8909 and dllentry elemnets to enable a single config file to be used
8910 for multiple architectures.
8912 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
8914 * loader.c: MonoLoaderError was cleared too soon on load failure.
8917 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
8919 * icall.c: use the defining class vtable when accessing a
8920 static field, not a pobblibly derived class.
8922 2006-09-17 Zoltan Varga <vargaz@gmail.com>
8924 * icall.c string-icalls.c: Remove references to unicode.h.
8926 * unicode.h unicode.c Makefile.am: Remove these unused source files.
8928 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
8930 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
8931 indicating the image where custom marshaller types should be looked up.
8932 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
8933 custom marshallers, instead of corlib. Fixes #79425.
8935 2006-09-14 Zoltan Varga <vargaz@gmail.com>
8937 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
8939 2006-09-14 Jonathan Chambers <joncham@gmail.com>
8941 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
8942 Implement Environment.ProcessorCount.
8944 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
8945 Implement Environment.ProcessorCount.
8948 Add Environment.ProcessorCount icall.
8950 Patch by Jason McFall.
8952 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8954 * assembly.c: don't append .exe/.dll when the filename already contains
8955 one of those extensions.
8957 2006-09-12 Martin Baulig <martin@ximian.com>
8959 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
8960 to array interfaces.
8962 2006-09-11 Martin Baulig <martin@ximian.com>
8964 * reflection.c (mono_image_build_metadata): Create the
8965 MethodImpl's after emitting all types and methods, so we don't
8966 need another fixup pass for them.
8968 2006-09-11 Zoltan Varga <vargaz@gmail.com>
8970 * class.c (mono_class_from_name_case): Fix regression introduced by the last
8973 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
8975 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
8978 2006-09-10 Zoltan Varga <vargaz@gmail.com>
8980 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
8981 args is not set. Fixes #78926.
8983 2006-09-08 Zoltan Varga <vargaz@gmail.com>
8985 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
8987 * image.c (load_class_names): Move this to class.c, and rename it to
8988 'mono_image_init_name_cache'.
8989 (load_modules): Fix a warning.
8991 * class.c icall.c image.c: Initialize image->name_cache lazily.
8993 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
8994 on its name using information in the AOT file.
8996 * class.c (mono_class_from_name): Use the new hook function.
8998 2006-09-06 Zoltan Varga <vargaz@gmail.com>
9000 * reflection.c (mono_param_get_objects): Handle enum default parameter values
9003 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
9006 2006-09-06 Martin Baulig <martin@ximian.com>
9008 * icall.c (mono_lookup_internal_call): Small fix.
9010 2006-09-05 Raja R Harinath <rharinath@novell.com>
9012 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
9015 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
9017 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
9018 when --debug is specified.
9020 2006-09-04 Zoltan Varga <vargaz@gmail.com>
9022 * class.c (setup_generic_array_ifaces): Fix a warning.
9024 2006-09-04 Miguel de Icaza <miguel@novell.com>
9026 * Temporarily remove the patch to assemly.c that checks the
9027 assembly versions as it breaks our gacutil.
9029 2006-09-03 Zoltan Varga <vargaz@gmail.com>
9031 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
9033 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
9036 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
9037 created using the default ctor. Fixes #79152.
9038 (mono_string_builder_to_utf16): Ditto.
9040 2006-09-01 Martin Baulig <martin@ximian.com>
9042 Fix handling of the generic array interfaces.
9045 (MonoDefaults): Removed `generic_array_class' and added
9046 `generic_ilist' class.
9049 (mono_bounded_array_class_get): Add the new generic array interfaces.
9050 (setup_generic_array_ifaces): New static method; create vtable
9051 entries for each method in the generic array interfaces.
9054 (select_container): Allow "parent-less" generic methods.
9057 (mono_marshal_get_generic_array_helper): New public method.
9060 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
9061 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
9062 moved the interncall into System.Array.
9064 2006-09-01 Raja R Harinath <rharinath@novell.com>
9066 A few more cases of avoiding work on types with ->byref set.
9067 Has the real fix for #79238
9068 * icall.c (is_generic_parameter): New helper.
9069 (ves_icall_Type_GetGenericParameterPosition): Use it.
9070 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
9071 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
9072 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
9073 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
9075 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
9077 (ves_icall_Type_get_IsGenericInstance): Likewise.
9078 (ves_icall_Type_get_IsGenericType): Likewise.
9080 2006-09-01 Zoltan Varga <vargaz@gmail.com>
9082 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
9085 * mempool.h (mono_mempool_get_allocated): New helper function.
9087 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
9090 * mempool.c: Fix warnings and the calculation of stats.
9092 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
9094 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
9096 * loader.c (mono_get_method_from_token): Update method_count stat.
9098 * class-internals.h (MonoStats): Add some stats.
9100 2006-08-31 Robert Jordan <robertj@gmx.net>
9102 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
9103 with managed variants.
9104 All code is contributed under the MIT/X11 license.
9106 2006-08-31 Zoltan Varga <vargaz@gmail.com>
9108 * reflection.c (reflection_methodbuilder_to_mono_method): Set
9109 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
9111 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
9113 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
9114 with cycles in classes.
9116 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
9118 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
9119 missing a [MarshalAs] directive. Fixes #79203.
9121 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
9122 klass->marshal_info. Fixes #79217.
9124 2006-08-30 Martin Baulig <martin@ximian.com>
9126 Committing a patch from Joachim Ante <joe@otee.dk>:
9127 Add support for binary data symbol stores.
9129 * debug-mono-symfile.c
9130 (mono_debug_open_mono_symbol_file): Renamed into
9131 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
9135 (mono_debug_open_image): Added `raw_contents' and `size' args.
9136 (mono_debug_init_2_memory): New public function.
9138 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
9140 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
9142 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9144 * appdomain.c: implement support for ShadowCopyFiles.
9146 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
9148 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
9149 when value is NULL (and should remove CID #51).
9151 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9153 * image.c: moved 2 functions to ../utils.
9155 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
9157 * gc.c: cope with the target object of a GC handle being NULL
9160 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9162 * class.c: recursively check parent's explicit implementations
9163 of interface methods (fixes bug #79125).
9165 2006-08-19 Miguel de Icaza <miguel@novell.com>
9167 * filewatcher.c: Avoid warnings when building, do not redefine
9168 constants that are defined.
9172 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9174 * image.c: don't fail when the link points to an absolute path.
9176 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
9178 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
9181 2006-08-17 Miguel de Icaza <miguel@novell.com>
9183 * image.c (full_path): A new method used to obtain the actual path
9184 of an assembly even in the presence of symbolic links.
9186 This is necessary for the case where we are running a binary that
9187 has been GACed, but we are using the "published" path name
9188 ($prefix/mono/1.0/blah.exe) which happens to point to the real
9191 This was the source of the failure for the `xsp' command with the
9192 recent AppDomain changes, as far as the runtime was concerned,
9193 there were two different assemblies: $prefix/mono/1.0/blah.exe and
9194 $prefix/mono/gac/blah/version/blah.exe.
9196 (do_mono_image_open): use full path
9198 2006-08-17 Zoltan Varga <vargaz@gmail.com>
9200 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
9202 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
9204 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
9205 domain_id is supplied. Fix CID #241 and corlib's unit tests.
9207 2006-08-17 Zoltan Varga <vargaz@gmail.com>
9209 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
9210 small structures. Fixes #78990.
9212 2006-08-17 Zoltan Varga <vargaz@gmail.com>
9214 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
9216 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
9218 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9221 * marshal.c: don't load all the assemblies from a domain into newly
9222 created ones. The new domains might have different rules and load
9223 assemblies from different locations. Fixes bug #76757.
9225 Patch by Lluis. Conflicts resolved by Brian Crowell.
9227 2006-08-16 Alp Toker <alp@atoker.com>
9229 * socket-io.c: First half of the fix for #79084.
9230 Set sa_size to the length of the content, not that of the struct.
9231 Don't add NULL suffix to the content, this should be done in
9232 managed code if needed.
9234 2006-08-14 Raja R Harinath <rharinath@novell.com>
9237 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
9238 mono_metadata_parse_type returns NULL.
9240 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
9242 * normalization-tables.h : new file for string normalization data.
9243 * locales.c, locales.h, icall.c :
9244 added load_normalization_resource() for string normalization,
9246 * Makefile.am : added normalization-tables.h to the sources.
9248 2006-08-13 Zoltan Varga <vargaz@gmail.com>
9250 * marshal.c: Add more helper functions to reduce code duplication and use them
9253 2006-08-12 Zoltan Varga <vargaz@gmail.com>
9255 * marshal.c: Fix non-x86 stdcall warnings.
9257 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
9260 2006-08-11 Jonathan Chambers <joncham@gmail.com>
9262 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
9263 type check on multi-dimensional arrays. Fixes #79000.
9265 2006-08-10 Jonathan Chambers <joncham@gmail.com>
9267 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
9268 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
9269 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
9270 * class-internals.h: add is_com_object to class structure.
9271 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
9272 null checks to COM object marshalling. Fix .ctor call on RCW.
9273 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
9275 All code is contributed under the MIT/X11 license.
9277 2006-08-09 Dick Porter <dick@ximian.com>
9279 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
9280 racing mono_monitor_allocator_lock() somewhere, so don't delete
9281 the critical section for now. Found by running and exiting
9284 2006-08-10 Zoltan Varga <vargaz@gmail.com>
9286 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
9287 (ves_icall_System_ComObject_FindInterface): Ditto.
9288 (ves_icall_System_ComObject_CacheInterface): Ditto.
9290 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
9291 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
9293 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9295 * threadpool.c: treat pipes from process asynchronous reads as sockets
9296 when reading from them, so we get select/poll or epoll to wait for
9299 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
9301 * loader.c: Fix a typo (CID #233) in the null check.
9303 2006-08-07 Zoltan Varga <vargaz@gmail.com>
9305 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
9306 Hopefully fixes #78949.
9308 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
9309 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
9310 bytes. Fixes #78972.
9312 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9314 * filewatcher.c: we need to set errno here.
9316 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9318 * filewatcher.c: let Win32Exception get the error value.
9320 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9322 * filewatcher.c: translate errno into win32 errors for Win32Exception
9323 to know what happened.
9325 2006-08-01 Zoltan Varga <vargaz@gmail.com>
9327 * threadpool.c: Fix more warnings.
9329 * assembly.c (search_loaded): Fix warnings.
9331 * threadpool.c (mono_thread_pool_finish): Fix warnings.
9332 (mono_async_invoke): Ditto.
9334 2006-07-28 Jonathan Chambers <joncham@gmail.com>
9336 * object.c (mono_remote_class_vtable): Need to create proxy vtable
9337 entries for __ComObject type in addition to ComImport types.
9338 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
9341 All code is contributed under the MIT/X11 license.
9343 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
9345 * image.c: avoid tentative loading of modulerefs that contain
9346 no metadata (P/Invoke library names).
9348 2006-07-28 Dick Porter <dick@ximian.com>
9350 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
9351 mono_loader_lock() somewhere, so don't delete the critical section
9352 for now. Found by running and exiting monodevelop.
9354 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9356 * filewatcher.c: define the inotify syscalls when we're building on
9357 linux and have sys/syscall.h. The build system might not have support
9358 for inotify but the target system might have it.
9360 2006-07-26 Miguel de Icaza <miguel@novell.com>
9362 * domain.c: Documentation updates.
9364 * loader.c (mono_free_method): Do not release the method
9365 information if we are being profiled, as profilers will use this
9366 information at shut down to present some data to the user.
9368 This is needed so that the profiler does not crash, as the
9369 profiler tends to keep MonoMethods around, and they might become
9370 invalid if we free these.
9372 (mono_get_method_constrained): Return the original CIL stream
9373 method as well, so verification can be performed against it.
9375 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9377 * filewatcher.[ch]: support for inotify file system watcher.
9378 * icall.c: add new internal calls for the inotify file system watcher.
9380 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9382 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
9385 2006-07-20 Dick Porter <dick@ximian.com>
9387 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
9390 2006-07-20 Dick Porter <dick@ximian.com>
9392 * threads.c (start_wrapper): Do the thread cleanup while we still
9393 hold a reference to its object. Fixes bug 78123.
9395 2006-07-18 Kornél Pál <kornelpal@gmail.com>
9397 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
9398 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
9399 "managed-to-managed".
9400 * icall.c: Redirect string constructors that take sbyte* to
9401 ves_icall_System_String_ctor_RedirectToCreateString.
9402 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
9403 to CreateString () methods with matching signature.
9404 * reflection.c: Use original security informations for
9405 MONO_WRAPPER_MANAGED_TO_MANAGED.
9406 * security-manager.c: Use original security informations for
9407 MONO_WRAPPER_MANAGED_TO_MANAGED.
9408 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
9409 that is a placeholder and only its address should be used.
9410 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
9411 that is a placeholder and only its address should be used.
9413 2006-07-15 Jonathan Chambers <joncham@gmail.com>
9415 Begin implementing COM Interop.
9416 * appdomain.c: Increment corlib version.
9417 * class.c: Set ComImport classes' parent to __ComObject.
9418 * loader.c: Mark cominterop methods as such.
9419 * domain.c: Add __ComObject class to MonoDefaults structure.
9420 * image.c: Add 2 hashtables to the image for COM Interop related methods
9421 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
9422 using the mempool allocator
9424 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
9425 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
9426 declaration for mono_metadata_type_dup_mp.
9428 * debug-helpers.c: Added strings for two additional wrapper types
9429 * object.c: Create proxy objects for ComImport classes
9430 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
9431 and added __ComObject class to MonoDefaults structure.
9433 * object-internals.h: Finish MonoRealProxy definition, and add definition of
9434 MonoComInteropProxy and MonoComObject.
9436 * marshal.c: Added support for COM Interop
9437 (signature_cominterop): Converts managed signature to corresponding
9438 unmanaged COM signature.
9439 (cominterop_get_function_pointer): gets unmanaged function pointer via
9441 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
9442 (cominterop_get_method_interface): returns interface type that method is defined on
9443 (mono_mb_emit_cominterop_call): emits native call to function pointer
9445 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
9446 that matches signature of unmanaged function.
9447 (cominterop_get_native_wrapper): wrapper around adjusted method call.
9448 (cominterop_get_invoke): forwards call from proxy to __ComObject
9449 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
9450 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
9451 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
9453 * marshal.h: Added Marshal icall declarations.
9454 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
9455 so we can access them in finalizer
9457 2006-07-14 Dick Porter <dick@ximian.com>
9459 * object.c (mono_type_initialization_cleanup): Fix a race
9460 condition by temporarily commenting out the critical section
9463 2006-07-14 Zoltan Varga <vargaz@gmail.com>
9465 * reflection.c (create_custom_attr): Fix some warnings.
9466 (create_custom_attr_data): Ditto.
9467 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
9468 types. Fixes #78855.
9470 2006-07-11 Zoltan Varga <vargaz@gmail.com>
9472 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
9474 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
9476 2006-07-08 Zoltan Varga <vargaz@gmail.com>
9478 * reflection.c (resolve_object): Add support for DynamicMethod.
9480 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
9481 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
9483 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
9485 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
9486 don't leak GPtrArray's pdata has we have no use (nor free) for it.
9488 2006-07-01 Zoltan Varga <vargaz@gmail.com>
9490 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
9493 2006-06-30 Raja R Harinath <rharinath@novell.com>
9495 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
9496 slightly: remove a shadow local variable.
9498 2006-06-29 Raja R Harinath <rharinath@novell.com>
9500 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
9501 definition that introduces the virtual function slot.
9502 Also fix Coverity #105.
9504 2006-06-29 Zoltan Varga <vargaz@gmail.com>
9506 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
9507 for dynamic assemblies. Fixes #78724.
9509 2006-06-28 Zoltan Varga <vargaz@gmail.com>
9511 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
9514 2006-06-21 Martin Baulig <martin@ximian.com>
9517 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
9520 2006-06-21 Zoltan Varga <vargaz@gmail.com>
9522 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
9524 2006-06-20 Raja R Harinath <rharinath@novell.com>
9526 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
9528 * class.c (mono_class_create_from_typespec): Add 'context' argument.
9529 Inflate result if necessary.
9530 (mono_class_get_full): Remove old version. Rename from
9531 'mono_class_get' and add 'context' argument. Pass it to
9532 ..._create_from_typespec.
9533 (mono_class_get): New. Simple wrapper to mono_class_get_full.
9534 (mono_ldtoken): Revert change below.
9536 2006-06-20 Martin Baulig <martin@ximian.com>
9538 * class.c (mono_ldtoken): Don't pass the generic context to
9539 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
9541 2006-06-15 Zoltan Varga <vargaz@gmail.com>
9543 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
9544 and later freeing it. Fixes #78638.
9546 2006-06-15 Miguel de Icaza <miguel@novell.com>
9548 * icall.c (mono_class_get_throw): Revert over-zealous error
9549 throwing, the caller for mono_class_get_throw will cope with
9550 errors when classes are not properly initialized already.
9552 The code still copes with loader exceptions though.
9554 Fixes the regression in reftype1 and reftype3 from the CAS tests.
9556 2006-06-14 Miguel de Icaza <miguel@novell.com>
9558 Fixes the `make run1' version of RuntimeAbort (to be commited,
9559 source is in Bugzilla).
9561 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
9562 FALSE on class loading failure instead of returning true.
9564 * class.c (mono_class_create_from_typedef): It is possible for
9565 mono_metadata_interfaces_from_typedef_full to fail if a class is
9566 not found, cope with this.
9569 2006-06-14 Dick Porter <dick@ximian.com>
9572 * process.c: Fix a bunch of signed/unsigned warnings from gcc
9575 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
9577 * culture-info-table.h : oops, forgot to make it nsync with r61548.
9579 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
9581 * icall.c: Another fix for building mono in Visual Studio.
9583 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
9585 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
9587 2006-06-09 Martin Baulig <martin@ximian.com>
9589 * debug-mono-symfile.c: Put this back and really fix it this
9590 time. Sorry for all the trouble.
9592 2006-06-08 Zoltan Varga <vargaz@gmail.com>
9594 * icall.c (mono_class_get_throw): Fix a warning.
9595 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
9596 ReflectionTypeLoadException if needed. Fixes #78606.
9598 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
9599 (mono_class_init): Ditto.
9601 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
9602 ref_only exceptions.
9603 (mono_loader_clear_error): Make this work even if there is no error.
9605 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
9607 * object-internals.h marshal.c marshal.h icall.c: Implement method
9608 Marshal.GetComSlotForMethodInfo using internal call.
9610 2006-06-07 Zoltan Varga <vargaz@gmail.com>
9612 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
9613 a function for signalling it.
9615 * class.c (mono_class_from_typeref): Use the new kind of loader error when
9616 a referenced assembly is not found.
9618 * loader.c (mono_loader_error_prepare_exception): Add support for
9619 LOADER_ERROR_ASSEMBLY. Fix formatting.
9621 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
9623 * domain.c appdomain.c class-internals.h marshal.c: Add support
9624 for VARIANT marshalling on windows and increment corlib version
9625 since Variant struct was added.
9627 2006-06-03 Miguel de Icaza <miguel@novell.com>
9629 * debug-mono-symfile.c: Revert Martin's previous patch which broke
9630 stack trace line information:
9632 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
9633 (Martin) when looking up B which is between A and C, return A not C.
9637 Thanks to Alexander Olk for tracking this down.
9639 2006-06-02 Zoltan Varga <vargaz@gmail.com>
9641 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
9643 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
9644 avoid clobbering its value.
9645 (mono_string_to_lpstr): Fix a warning on windows.
9647 2006-05-31 Zoltan Varga <vargaz@gmail.com>
9649 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
9651 * reflection.c loader.c: Removed references to 'dummy' flag.
9653 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
9655 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
9656 it gets GC tracking.
9658 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
9661 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
9663 * marshal.c threadpool.c: Update callers of mono_async_result_new.
9665 * appdomain.c: Bump corlib version.
9667 2006-05-30 Zoltan Varga <vargaz@gmail.com>
9669 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
9670 CEE_STIND_REF when working with object references.
9672 2006-05-31 Zoltan Varga <vargaz@gmail.com>
9674 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
9677 2006-05-30 Miguel de Icaza <miguel@novell.com>
9679 * loader.c (method_from_memberref): Fix argument value for
9680 mono_loader_set_error_method_load (I was passing the MonoClass
9681 instead of the class name char *).
9683 2006-05-30 Zoltan Varga <vargaz@gmail.com>
9685 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
9686 CEE_STIND_REF when working with object references.
9688 2006-05-30 Martin Baulig <martin@ximian.com>
9690 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
9691 mono_method_full_name() change and replace the ':' with a '.'
9694 2006-05-30 Martin Baulig <martin@ximian.com>
9696 * debug-mono-symfile.c
9697 (mono_debug_symfile_lookup_location): Fix the algorithm:
9698 when looking up B which is between A and C, return A not C.
9700 2006-05-29 Martin Baulig <martin@ximian.com>
9703 (MonoDebugMethodInfo): Make the typedef public.
9704 (MonoDebugSourceLocation): New public struct.
9707 (mono_debug_source_location_from_address): Removed.
9708 (mono_debug_source_location_from_il_offset): Removed.
9709 (mono_debug_il_offset_from_address): Removed.
9710 (mono_debug_address_from_il_offset): Removed.
9711 (mono_debug_lookup_method): New public function.
9712 (mono_debug_lookup_source_location): New public function; replaces
9713 the old mono_debug_source_location_from_*() functions; see the
9714 inline documentation.
9715 (mono_debug_free_source_location): New public function.
9716 (mono_debug_print_stack_frame): New public function; see the
9717 inline documentation.
9719 * debug-mono-symfile.c
9720 (mono_debug_find_source_location): Renamed into
9721 mono_debug_symfile_lookup_location(); only take a
9722 `MonoDebugMethodInfo *' and an `offset' argument; added inline
9724 (mono_debug_find_method): Renamed into
9725 mono_debug_symfile_lookup_method().
9727 2006-05-27 Zoltan Varga <vargaz@gmail.com>
9729 * assembly.c (mono_assembly_open_full): Dont overwrite the status
9730 returned by mono_image_open_full ().
9732 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
9733 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
9736 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
9739 2006-05-27 Miguel de Icaza <miguel@novell.com>
9741 * class.c (mono_class_from_typeref): handle missing images
9742 earlier, deals with bug #78418. Refactor code;
9744 Fix a warning introduced in my previous commit (some stale code
9745 from before I revisited my patch).
9747 * class.c (mono_class_create_from_typedef): On failure, remove the
9748 class from the MonoImage->class_cache as the class is not
9749 initialized; Fixes the leak pointed out by Paolo.
9751 2006-05-25 Dick Porter <dick@ximian.com>
9753 * threads.c (mono_thread_cleanup): Build fix. Comment out the
9754 DeleteCriticalSections until I figure out which one may still be
9755 sometimes locked when mono_thread_cleanup is called.
9757 2006-05-24 Dick Porter <dick@ximian.com>
9759 * threads.c (mono_thread_cleanup): Move the threading cleanup out
9760 of mono_thread_manage and back into its own function, so it can be
9761 called after the finalizer thread has finished.
9763 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
9765 2006-05-24 Zoltan Varga <vargaz@gmail.com>
9767 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
9770 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
9771 with non-blittable elements.
9772 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
9774 2006-05-24 Martin Baulig <martin@ximian.com>
9776 * mono-debug-debugger.h (MonoDebuggerEvent): Added
9777 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
9779 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
9780 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
9781 `mono_debugger_event_handler' to NULL.
9783 2006-05-24 Martin Baulig <martin@ximian.com>
9785 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
9787 2006-05-24 Martin Baulig <martin@ximian.com>
9789 * mono-debug-debugger.h
9790 (mono_debugger_create_notification_function): Added
9791 `MonoCodeManager *' argument.
9793 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
9795 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
9797 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
9799 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
9800 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
9803 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
9805 * icall.c: precise GC support: objects can't be stored in unmanaged
9806 memory anymore, even if they are kept alive by other references: since
9807 they can move the GC needs to be able to always find them.
9809 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9811 * object.c: precise GC support for static fields. Support
9812 for moving GCs: write barriers and pinned allocation for interned
9815 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
9817 * domain.c, domain-internals.h: precise GC support for the MonoDomain
9820 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
9822 * class.c, gc.c: sgen and precise GC updates.
9824 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
9826 * marshal.h, marshal.c: added write barrier wrapper and precise type
9829 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
9831 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
9834 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
9836 * reflection.c: precise and sgen GC updates.
9838 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
9840 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
9842 2006-05-22 Zoltan Varga <vargaz@gmail.com>
9844 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
9846 2006-05-20 Zoltan Varga <vargaz@gmail.com>
9848 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
9849 MONO_TYPE_OBJECT. Fixes #78462.
9851 2006-05-18 Zoltan Varga <vargaz@gmail.com>
9853 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
9854 and blittable types.
9856 2006-05-17 Miguel de Icaza <miguel@novell.com>
9858 * class.c (mono_class_get_exception_for_failure): Implement parts
9859 of a TODO: if the loader error is set (instead of the class
9860 error), we return a Loader exception that can be properly thrown
9863 This was exposed by some Winforms 2.0 code that I tried to run
9864 (Atsushi pointed me to it).
9866 2006-05-17 Zoltan Varga <vargaz@gmail.com>
9868 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
9869 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
9871 * marshal.c (emit_marshal_vtype): Add limited support for
9872 UnmanagedType.LPStruct. Fixes #78427.
9874 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
9875 Applied a patch from kangaroo to fix #77523.
9877 2006-05-17 Martin Baulig <martin@ximian.com>
9880 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
9881 (debugger_thread_created): Removed.
9882 (debugger_thread_exited): Removed.
9884 2006-05-15 Zoltan Varga <vargaz@gmail.com>
9886 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9888 * object-internals.h (MonoReflectionResource): Sync with managed version.
9890 2006-05-12 Wade Berrier <wberrier@novell.com>
9892 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
9894 2006-05-12 Zoltan Varga <vargaz@gmail.com>
9896 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
9897 functions try to allocate from the image mempool.
9899 2006-05-12 Dick Porter <dick@ximian.com>
9901 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
9903 2006-05-12 Lluis Sanchez <lluis@ximian.com>
9905 * object.c: The FieldGetter and FieldSetter methods require the full
9906 name of the class, not only the name. Fixes bug #78277.
9908 2006-05-11 Miguel de Icaza <miguel@novell.com>
9910 * loader.c (method_from_memberref): Do not pass the NULL klass to
9911 mono_loader_set_error_() methods. Pass the non-NULL value
9914 2006-05-11 Zoltan Varga <vargaz@gmail.com>
9916 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
9917 (mono_assembly_close): Null out assembly->image->references after freeing it.
9919 * image.c (mono_image_close): Free image->references.
9921 * reflection.c (mono_image_basic_init): Fix a small memory leak.
9923 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
9925 * marshal.c: In function mono_mb_add_local don't use the mb pointer
9926 before checking if it's NULL (g_assert).
9928 2006-05-10 Martin Baulig <martin@ximian.com>
9930 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
9931 I thought I already killed that two months ago, but now it somehow reappeared.
9933 2006-05-10 Martin Baulig <martin@ximian.com>
9935 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
9937 2006-05-10 Zoltan Varga <vargaz@gmail.com>
9939 * reflection.c: Allocate memory for dynamically created methods in the image
9942 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
9944 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
9945 don't use the ad pointer before checking if it's NULL (g_assert).
9947 2006-05-09 Zoltan Varga <vargaz@gmail.com>
9949 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
9950 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
9952 * marshal.c: Allocate all signatures from mempools.
9954 * marshal.c: Allocate some more signatures from mempools.
9956 2006-05-09 Miguel de Icaza <miguel@novell.com>
9958 * object.c (mono_load_remote_field): The code used to provide a
9959 temporary variable for returning results if the user did not
9960 provide a result pointer. But our temporary variable was allocted
9963 Fix calling code to always pass a result area. Coverity ID 103.
9965 2006-05-06 Zoltan Varga <vargaz@gmail.com>
9967 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
9968 value, not the old. Fixes #78312.
9969 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
9971 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
9972 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
9975 * assembly.c (mono_assembly_close): Free image->references.
9977 * assembly.c (mono_assembly_names_equal): Fix a warning.
9978 (mono_assemblies_cleanup): Cleanup more global data.
9980 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
9982 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
9983 ptr_cache and image->modules.
9985 * image.c (mono_image_init): Allocate array_cache lazily.
9987 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9989 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
9990 behavior was changed recently and has bad side effects.
9992 2006-05-05 Zoltan Varga <vargaz@gmail.com>
9994 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
9996 * assembly.c (mono_assembly_close): Remove a debug printf.
9998 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
10000 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
10001 to also allow for temporary references between mono_image_open ()/close ().
10003 * domain.c (get_runtimes_from_exe): Add a FIXME.
10005 2006-05-04 Zoltan Varga <vargaz@gmail.com>
10007 * marshal.c: Fix support for dynamic methods.
10009 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
10011 * marshal.c (mono_marshal_cleanup): New cleanup function.
10013 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
10016 * class.c (mono_class_init): Fix leaking class->nested_classes.
10018 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
10020 * image.c (mono_image_init): Initialize the new cashes.
10022 * image.c (mono_image_close): Destroy the new cashes.
10024 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
10026 * mempool.c (mono_mempool_strdup): New helper function.
10028 * class-internals.h: Add prototype for mono_loader_unlock ().
10030 * domain.c (mono_jit_info_table_find): Fix a warning.
10031 (mono_debugger_check_runtime_version): Ditto.
10033 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
10034 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
10035 functions to these modules.
10037 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
10040 * marshal.c (mono_free_bstr): Fix a warning.
10042 * assembly.c (mono_assembly_open_full): Fix another small leak.
10044 * object.c: Fix some unload leaks in the remoting code.
10046 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
10049 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
10051 * reflection.c: Fix some unload leaks in dynamic assemblies.
10053 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
10055 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
10056 * marshal.h: Add BSTR support on Win32
10057 * icall.c: Add BSTR icalls
10058 * metadata.h: Add BSTR enums
10060 2006-04-28 Miguel de Icaza <miguel@novell.com>
10062 Work to catch the crash from #76795 and turn it into an
10063 exception. As I stubbed out pieces of the VisualBasic support,
10064 I found a number of places where the code was failing and I added
10065 checks to those places.
10067 * metadata.c (do_mono_metadata_parse_generic_class): Make this
10068 function return a status code. If we fail to parse the signature
10069 from mono_metadata_parse_generic_inst, return FALSE.
10071 * loader.c (mono_get_method_from_token): If we fail to load the
10072 method (mono_class_get) return NULL.
10074 * (method_from_memberref): Return NULL if we are unable to parse
10075 the method signature
10077 (mono_loader_error_prepare_exception): Since we now use the
10078 loader_error flag internally to stop processing, and obtaining
10079 exceptions that might be thrown will walk this code path the
10080 proper way of going from a MonoLoaderError into a
10081 MonoException was convoluted. This new routine encapsulates the
10082 process of turning the error into an exception and *clearing* the
10085 2006-04-27 Miguel de Icaza <miguel@novell.com>
10087 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
10088 with missing assemblies), and to cope with:
10090 * Missing fieldref from a non-existing assembly.
10091 * Missing methodref from a non-existing assembly.
10093 The first batch of work to address *some* of the issues from 76661.
10095 * object.c (mono_class_create_runtime_vtable): If we fail to
10096 initialize the class raise the exception here.
10098 * metadata.c (mono_class_get_overrides_full): If any methods fail
10099 to load return the failure to the caller.
10101 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
10102 flagging assemblies that failed to load.
10104 Do not crash if we are unable to load the assembly.
10106 (mono_assembly_close): Do nothing with REFERENCE_MISSING
10109 * loader.c (mono_loader_set_error_type_load): Change the
10110 convention to always pass unallocated strings, so we make our own
10111 copies (I know our own code had duplicated strings before, but
10112 this keeps the normal conventions).
10113 (method_from_memberref): Call mono_loader_set_error_method_load
10114 for all possible failures of loading the class.
10115 Remove assert, turn into a loader error.
10117 (mono_loader_error_to_exception): Move this routine from mini
10118 (mini_loader_error_to_exception) there was no need to have that in
10121 * class.c (mono_class_from_typeref): If we were not able to load
10122 the assembly with mono_assembly_load_reference, call the
10123 mono_loader_set_error_type_load to register the problem.
10125 (mono_class_setup_fields): If we fail to load the type from
10126 mono_metadata_parse_type_full, call mono_class_set_failure and
10127 break from the loop.
10129 If class->exception_type is set, we do not layout the fields as
10130 that might crash the runtime, and instead return (from breaking
10131 from the previous loop).
10133 (mono_class_setup_vtable): This now returns a boolean indicating
10134 whether the table was properly setup. The decision is driven by
10135 mono_class_get_overrides_full which might run into non-existing
10138 (mono_class_init): Returns TRUE on success or FALSE if there was a
10139 problem in loading the type (incorrect assemblies, missing
10140 assemblies, methods, etc).
10142 When we call mono_class_setup_fields we also check for a potential
10143 error inside this call (either a class exception or a general
10146 (mono_class_create_from_typedef): If the parent fails to load
10147 (calling mono_class_get_full) return NULL.
10151 calls to mono_metadata_parse_type_full should be checked
10152 everywhere and set the mono_class_set_failure
10153 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
10155 The current patch checks the places where my manually constructed
10156 tests show the errors are showing up, but we should do it
10161 mono_class_init return values should be tested everywhere, like
10162 the previous case this is something that we should audit
10163 everywhere and not only on the cases exposed by the tests I
10166 2006-04-26 Miguel de Icaza <miguel@novell.com>
10168 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
10169 boolean parameter and instead pass the information on `options'
10170 parameter (FileOptions).
10172 * icall.c: Register the new signature for MonoIO.Open.
10174 * debug-helpers.c (dis_one): Trying to understand how coverity
10175 works. Fix Run 5, item 78.
10177 2006-04-26 Dick Porter <dick@ximian.com>
10179 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
10182 2006-04-25 Martin Baulig <martin@ximian.com>
10184 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
10186 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
10187 debugger_thread_created().
10188 (debugger_gc_push_all_stacks): Don't handle the main thread in any
10190 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
10191 (mono_debugger_finalize_threads): New function; undo the effects
10192 of mono_debugger_init_threads().
10193 (mono_debugger_create_all_threads): Removed.
10195 2006-04-24 Zoltan Varga <vargaz@gmail.com>
10197 * image.c (mono_image_close): Tidy up trace messages.
10199 * assembly.c (mono_assembly_close): Ditto.
10201 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
10202 no longer references an already freed assembly. Fixes #78168.
10204 2006-04-21 Dick Porter <dick@ximian.com>
10206 * threads.c (mono_thread_detach): Fix reference counting when
10209 2006-04-21 Zoltan Varga <vargaz@gmail.com>
10211 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
10214 2006-04-19 Zoltan Varga <vargaz@gmail.com>
10216 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
10217 (mono_type_to_stind): Ditto.
10219 * marshal.c: Use the new helper functions to simplify code.
10221 * image.c (mono_image_close): Add some code for help debug assembly unloading
10224 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
10227 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
10228 assembly was already loaded in another appdomain. Fixes #78083.
10230 2006-04-13 Zoltan Varga <vargaz@gmail.com>
10232 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
10233 referenced assemblies.
10234 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
10236 * domain.c (mono_domain_free): Add a trace message.
10238 * appdomain.c (add_assemblies_to_domain): Ditto.
10240 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
10243 2006-04-12 Zoltan Varga <vargaz@gmail.com>
10245 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
10247 2006-04-12 Martin Baulig <martin@ximian.com>
10249 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
10250 `USE_INCLUDED_LIBGC'.
10252 2006-04-12 Zoltan Varga <vargaz@gmail.com>
10254 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
10255 the patch contains ../ and a small directory name later. Hopefully fixes
10258 2006-04-10 Martin Baulig <martin@ximian.com>
10260 Clean up the debugger's thread-handling code.
10262 The debugger's thread-handling code has been moved from
10263 ../mini/debug-debugger.c to threads.c. We now iterate directly
10264 over the `threads' hash, keep track of exiting threads and also
10265 use proper locking.
10267 We can now debug XSP and XSP based applications with the debugger.
10269 * object-internals.h (MonoThread): Added `gpointer end_stack'.
10272 (MonoThreadCallbacks): Removed; this was only used by the debugger.
10273 (mono_install_thread_callbacks): Likewise.
10275 * threads.c (mono_thread_callbacks): Removed.
10276 (debugger_thread_created, debugger_thread_exited): New static functions.
10277 (start_wrapper): Call debugger_thread_created().
10278 (thread_cleanup): Call debugger_thread_exited().
10279 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
10280 (mono_debugger_init_threads): New public function.
10281 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
10282 iterate directly over the `threads' hash and also use proper locking.
10284 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
10286 * mono-debug-debugger.h
10287 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
10289 2006-04-10 Zoltan Varga <vargaz@gmail.com>
10291 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
10292 argument type=array. Fixes #78057.
10294 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
10296 * culture-info-table.h : regenerated. Fixed bug #69652.
10298 2006-04-07 Zoltan Varga <vargaz@gmail.com>
10300 * loader.c metadata.c: Reapply a variant r59116.
10302 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
10304 * class.c (mono_class_setup_interface_offsets): New internal function.
10306 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
10307 interfaces too. Fixes #77398.
10309 * reflection.c (encode_cattr_value): Add support for
10310 parameter type=object, argument type=array.
10311 (load_cattr_value): Ditto. Fixes #77916.
10313 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
10314 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
10316 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
10317 a byval char array and CharSet is Ansi.
10319 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
10321 2006-04-06 Zoltan Varga <vargaz@gmail.com>
10323 * metadata.c: Add some locking comments.
10325 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
10327 (mono_metadata_free_method_signature): Don't free the signature itself.
10329 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
10331 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
10332 reference the same MonoImage.
10333 (mono_assembly_load_from_full): Add an assert.
10335 2006-04-05 Zoltan Varga <vargaz@gmail.com>
10337 * image.c (mono_image_close): Don't put the image we are about to free into the
10338 loaded_images_guid_hash.
10340 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
10341 to reduce code duplication.
10343 * marshal.c: Register the native functions called by this module as icalls, to
10344 somewhat centralize the creation of MonoMethodSignature's.
10346 * loader.c (mono_method_signature): Add a cache for method signatures.
10348 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
10349 the parameter attributes of a method.
10350 (mono_metadata_parse_method_signature_full): Refactored the computation of
10351 parameter attributes into a separate function. Also avoid one allocation in
10354 * assembly.c (mono_assembly_close): Ditto.
10356 * image.c (mono_image_close): Log trace messages with INFO level.
10358 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
10360 * image.c reflection.c: Correct reference counting of image modules.
10362 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
10363 of this function from the image mempool.
10365 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
10366 to allow more cached types to be used.
10368 * mono-debug.c (mono_debug_add_method): Appled patch from
10369 David S. Miller <davem@sunset.davemloft.net>: Access
10370 minfo->lexical_blocks[] entry elements using read32().
10372 2006-04-04 Zoltan Varga <vargaz@gmail.com>
10374 * loader.c (mono_free_method): No longer free the method header for non-dynamic
10375 methods as it is allocated from the mempool.
10377 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
10380 * metadata-internals.h: Add comments describing the reference counting scheme
10381 used for MonoImage and MonoAssembly.
10383 * image.c assembly.c reflection.c: Rework reference counting of images and
10384 assemblies so they are freed when the runtime is shut down. Free some
10385 additional memory structures when an image is unloaded.
10387 2006-04-03 Zoltan Varga <vargaz@gmail.com>
10389 * class.c loader.c reflection.c: Allocate more data structures in
10392 2006-03-31 Miguel de Icaza <miguel@novell.com>
10395 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
10396 build on pre glib 2.4 systems.
10398 2006-03-31 Zoltan Varga <vargaz@gmail.com>
10400 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
10402 * icall.c: Fix some warnings.
10404 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
10406 * culture-info-table.h : regenerated.
10408 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
10410 * threads.c, object-internals.h, verify.c: changed the culture caching
10411 code to use a normal MonoArray for storage so the GC can keep track of
10412 them easily. Fixed bits of the cache logic, too and simplified the
10415 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
10417 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
10418 thread for non-Boehm GCs.
10420 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
10422 * domain.c, object.c, domain-internals.h: reduce the amount of memory
10423 needed to keep track of the data for static fields.
10425 2006-03-29 Raja R Harinath <rharinath@novell.com>
10428 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
10429 for interface classes. Use 'num_methods' instead.
10430 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
10431 before using '->vtable_size' field.
10433 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10435 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
10436 doesn't contain managed pointers, so use a normal hashtable.
10438 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
10440 * reflection.c, class-internals.h, domain.c: fixed handling of types
10441 used as values for objects in custom attributes (bug #77915):
10443 2006-03-24 Martin Baulig <martin@ximian.com>
10445 * class.c (mono_class_setup_fields): Added support for generic
10446 instances; fixes #77580.
10448 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10450 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
10452 2006-03-24 Dick Porter <dick@ximian.com>
10454 * file-io.c (get_file_attributes): More stat macro breakage.
10457 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
10459 * profiler.c: added the file=filename option in the default profiler
10460 to output the profile data to filename.
10462 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10464 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
10467 2006-03-22 Martin Baulig <martin@ximian.com>
10469 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
10470 allocated `MonoClassField *' in `fb->handle'.
10472 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10474 * class.c, image.c, metadata-internals.h: implemented new mechanism to
10475 allocate interface ID to save memory and allow better ID reuse on
10476 appdomain unload. setup_generic_vtable () removal from Martin.
10478 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
10480 * object.h, appdomain.c, domain.c, exception.c, icall.c,
10481 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
10482 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
10483 write barriers for reference stores with managed objects accessed with
10484 C structures in the runtime and in embedding programs.
10486 2006-03-20 Raja R Harinath <rharinath@novell.com>
10488 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
10489 'interface_id' and 'max_interface_id' fields of MonoClasses
10490 representing open generic types.
10492 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
10494 * object.h, object.c, icall.c: added functions to deal with
10495 storing valuetypes that contain references in managed objects.
10496 * reflection.c, string-icalls.c, threads.c, marshal.c: small
10497 fixes and comments around uses of mono_array_addr ().
10499 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
10501 * object.h, icall.c, monitor.c: object.GetHashCode ()
10502 implementation that supports the moving garbage collector.
10504 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
10506 * icall.c, threads-types.h, threads.c: implemented finalizer for
10507 LocalDataStoreSlot.
10509 2006-03-15 Zoltan Varga <vargaz@gmail.com>
10511 * metadata.c (mono_type_size): Add a fixme.
10512 (mono_type_stack_size): Ditto.
10514 * object-internals.h (MonoReflectionAssemblyBuilder): Added
10515 'type_forwarders' field.
10517 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
10518 attribute from net 2.0.
10520 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
10523 * class.c (mono_class_setup_fields): Fix a warning.
10525 * class.c (mono_class_from_name): Add support for assemblyref entries
10526 in the EXPORTEDTYPE table.
10528 * reflection.c: Add support for handling type forwarders under net 2.0.
10530 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10532 2006-03-14 Zoltan Varga <vargaz@gmail.com>
10534 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
10535 overwriting entries in ModuleBuild->types, also clean up the code
10536 a little. Fixes #77774.
10538 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
10540 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
10541 load friend assembly info when present.
10543 2006-03-14 Raja R Harinath <rharinath@novell.com>
10545 Fix crasher on gtest-158.cs.
10546 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
10547 the return value if the MonoClass we want is yet in an
10548 inconsistent state.
10549 * class.c (mono_class_create_from_typedef): Add an comment
10550 explaining an order dependency between mono_class_setup_parent and
10551 mono_class_setup_mono_type.
10553 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
10555 * class.c: documentation updates and events bug fix.
10557 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
10559 * class.c: some cleanup, locking fixes.
10561 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
10563 * class.c: fix the generics code to setup nested
10564 type info to the instantiated type (bug #77770).
10566 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
10568 * marshal.c: fixed a few type correctness issues.
10570 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
10572 * loader.c: the Set/Get/Addrtess array methods should be public.
10574 2006-03-11 Zoltan Varga <vargaz@gmail.com>
10576 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
10578 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
10581 2006-03-10 Zoltan Varga <vargaz@gmail.com>
10583 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
10585 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
10587 * mempool.c (mono_mempool_alloc): Speed this up a bit.
10588 (mono_mempool_alloc0): Ditto.
10590 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10593 (create_object_from_sockaddr): it was allocating 4 extra bytes
10594 for the AF_UNIX data. Fixes bug #77747.
10596 2006-03-09 Zoltan Varga <vargaz@gmail.com>
10598 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
10600 2006-03-09 Dick Porter <dick@ximian.com>
10602 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
10603 Fixes bug 76966 again.
10605 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
10607 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
10609 * appdomain.c: Bumped corlib version to 48 (due to r57532)
10611 2006-03-07 Martin Baulig <martin@ximian.com>
10614 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
10616 2006-03-07 Martin Baulig <martin@ximian.com>
10619 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
10620 regression introduced in r56970; see gtest-252.cs.
10622 * loader.c (mono_get_method_constrained): Correctly handle generic
10623 methods; see gtest-253.cs.
10625 2006-03-04 Zoltan Varga <vargaz@gmail.com>
10627 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
10629 2006-03-04 Martin Baulig <martin@ximian.com>
10631 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
10632 compute the parent type at runtime, just like we're already doing
10636 (mono_reflection_bind_generic_parameters): Don't compute the
10637 parent type anymore.
10639 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
10641 2006-03-04 Martin Baulig <martin@ximian.com>
10643 * mono-debug-debugger.h
10644 (mono_debugger_create_notification_function): Allocate memory at
10645 runtime and return a pointer to it.
10647 2006-03-03 Zoltan Varga <vargaz@gmail.com>
10649 * assembly.c: Fix windows build.
10651 * assembly.c: Fix build.
10653 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
10655 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
10657 2006-03-03 Dick Porter <dick@ximian.com>
10660 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
10661 Check parameters before dereferencing them. Fixes Aaron's part of
10664 2006-03-03 Raja R Harinath <rharinath@novell.com>
10666 Fix performance regression.
10667 * loader.c (find_method_in_class): Add 'from_class' argument.
10668 Rename 'klass' argument to 'in_class'. The signature is compared
10669 against the method in 'in_class', and the corresponding method is
10670 returned from 'from_class'.
10671 (find_method): Walk both 'in_class' and 'from_class' in parallel.
10672 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
10673 type definition and generic instantiation in parallel.
10674 (mono_get_method_constrained): Update to changes.
10676 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
10678 * threads.c: make sure the domain is correct, too when doing
10679 mono_thread_attach ().
10681 2006-03-01 Zoltan Varga <vargaz@gmail.com>
10683 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
10684 windows. Fixes #77683.
10686 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
10688 * object.h, *: introduced specific way to set elements of an array
10689 of references to be used as write barrier. Still need to audit the
10690 uses of mono_array_addr.
10692 2006-03-01 Miguel de Icaza <miguel@novell.com>
10694 * object-internals.h: New field to cache the assmebly name, patch
10695 from Tambet Ingo (tambet@ximian.com)
10697 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
10699 * decimal.h, class-internals.h, metadata-internals.h,
10700 file-io.h: mark a few function declarations as internal, to
10701 reduce the number of PLT entries.
10703 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10705 * file-io.c: fix typo in warning message.
10707 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
10709 * loader.c: on unix, lookup the "*A" version of a function
10710 if charset is auto as a second option before failing.
10712 2006-02-28 Raja R Harinath <rharinath@novell.com>
10714 * class.h (mono_class_inflate_generic_method): Revert to two
10716 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
10717 (mono_class_inflate_generic_method_full): Add.
10718 * class.c (mono_class_inflate_generic_method_full): Rename from
10719 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
10720 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
10721 * loader.c, reflection.c: Update to changes.
10723 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
10725 * icall.c: const fixes and small improvements.
10727 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10729 * threadpool.c: for asynchronous connect(), enable the same workaround
10730 for BSD 6 as for the Mac. Fixes bug #77637.
10732 2006-02-24 Zoltan Varga <vargaz@gmail.com>
10734 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
10735 formatted classes. Fixes #77524.
10737 2006-02-24 Raja R Harinath <rharinath@novell.com>
10739 * class.c (inflate_generic_type): Add a couple more
10740 micro-optimizations.
10741 (inflate_generic_context): Don't use the 'gmethod' from
10743 (mono_class_inflate_generic_method): If the method has generic
10744 parameters, but the passed-in context doesn't have a 'gmethod',
10745 create one. Use the possibly simplified generic instantiation
10746 from the declaring class instead of the one passed in.
10748 2006-02-24 Raja R Harinath <harinath@gmail.com>
10750 Make generic method signature and method header handling lazy.
10751 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
10752 (inflate_generic_header): Likewise.
10753 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
10754 parameter to avoid inflating types.
10755 (mono_get_inflated_method): Empty out.
10756 * class.h (mono_class_inflate_generic_method): Update to changes.
10757 * loader.c (mono_get_method_from_token): Don't parse signature for
10758 generic methods, nor methods of generic classes.
10759 (mono_method_signature): Rename from 'mono_method_signature'.
10760 Inflate signature on demand.
10761 (mono_method_get_header): Inflate method header on demand.
10762 * reflection.c: Update to changes.
10764 2006-02-23 Raja R Harinath <rharinath@novell.com>
10766 * metadata.c (mono_metadata_inflate_generic_inst): If the
10767 instantiation is closed, don't bother expanding it in the new
10769 * class.c (inflate_generic_class): If the generic instantiation
10770 doesn't change after inflation, return the argument itself.
10771 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
10773 (inflate_generic_context): If neither the generic class nor the
10774 generic method instantiations change, return the original context.
10775 * reflection.c (mono_method_get_object): Do
10776 'mono_get_inflated_method' before accessing the ->klass field.
10777 (inflate_mono_method): Don't create a MonoGenericMethod unless
10779 (inflate_method): Don't pass a constructed type as the declaring
10780 type of a methodbuilder.
10782 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
10784 * object.c: fix memory overwrite.
10786 2006-02-22 Dick Porter <dick@ximian.com>
10788 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
10789 it doesn't work any more.
10790 (mono_threads_request_thread_dump): Fix unused variable warnings.
10792 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
10794 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
10795 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
10796 the public header file.
10798 2006-02-21 Zoltan Varga <vargaz@gmail.com>
10800 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
10802 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
10804 * class-internals.h, object.c: reduce the size of MonoVTable
10805 and store the interface_offsets array at negative offsets.
10807 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
10809 * metadata.c: tweak table descriptors data structures to reduce
10810 size and runtime relocations.
10812 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
10814 * marshal.c: fix some types and opcodes to be type-safe
10815 in marshaling wrappers.
10817 2006-02-21 Ankit Jain <jankit@novell.com>
10819 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
10821 2006-02-21 Raja R Harinath <rharinath@novell.com>
10823 * metadata.c (get_constraints): Relax debugging checks for monodis.
10825 2006-02-21 Ankit Jain <jankit@novell.com>
10827 * metadata.c (mono_metadata_load_generic_params): Move the code
10828 checking for ambiguous generic params from here to mono/dis/get.c
10829 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
10831 2006-02-21 Raja R Harinath <harinath@gmail.com>
10833 Fix assertion triggered when compiling nemerle.
10834 * class.c (mono_get_shared_generic_inst): Rename from
10835 get_shared_inst and make non-static.
10836 * loader.c (mono_get_shared_generic_method): New. Used to create
10837 the MonoGenericContext-equivalent of a MonoGenericContainer.
10838 (mono_get_method_from_token): Initialize the 'context' field of
10839 the created MonoGenericContainer.
10840 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
10841 * metadata.c (get_constraints): Add sanity check.
10842 * class-internals.h: Add new internal methods.
10844 * reflection.c (verify_safe_for_managed_space): New sanity check.
10845 Currently checks that owner-less generic parameters aren't allowed
10847 (mono_type_get_object): Use it.
10848 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
10849 that are now in mono_type_get_object.
10850 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
10852 2006-02-19 Raja R Harinath <harinath@gmail.com>
10854 * metadata.c (mono_type_create_from_typespec): Rename from
10855 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
10856 argument and caching of types in the generic container.
10857 (unwrap_arrays, find_generic_param): Remove.
10858 * metadata-internals.h: Update.
10859 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
10861 2006-02-18 Zoltan Varga <vargaz@gmail.com>
10863 * class.c (mono_class_get_exception_for_failure): Fix a warning.
10865 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
10866 return values. Fixes #77581.
10868 * class.c (mono_fnptr_class_get): Switch name and name_space.
10870 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
10871 classes and add support for [In, Out] attributes.
10872 (mono_marshal_free_asany): Ditto. Fixes #77524.
10874 2006-02-18 Raja R Harinath <harinath@gmail.com>
10876 * class.c (mono_class_from_generic_parameter): Make more robust to
10877 incomplete MonoGenericContainers from monodis.
10879 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
10881 * class-internals.h: added some more exception types.
10882 * class.c, metadata.c: added a few checks to handle missing
10885 2006-02-17 Raja R Harinath <rharinath@novell.com>
10887 Use owner-less generic-params some more.
10888 * class.c (my_mono_class_from_generic_parameter): Remove.
10889 (mono_class_from_generic_parameter): Handle null image,
10890 param->name and param->owner.
10891 (mono_class_from_mono_type): Update.
10892 (mono_class_create_from_typespec): Remove 'container' parameter.
10893 If that parameter is non-null, the result is always inflated by
10894 'mono_class_get_full' anyway.
10895 (mono_class_get): Rename from _mono_class_get. Remove 'container'
10897 (mono_class_get_full): Update.
10899 * class.c (inflate_generic_type) [GENERICINST]: If the generic
10900 instance is not open, don't bother inflating.
10901 (mono_class_setup_fields): Hoist some loop-invariants. Don't
10902 parse metadata for inflated classes.
10903 (_mono_class_get): Change GenericContext* parameter to
10905 (mono_class_create_from_typespec): Likewise. Simplify, and
10906 implement trivially. All the cases are handled in
10907 mono_class_from_mono_type. Don't inflate returned class.
10908 (mono_class_get_full): Delegate GENERICINST optimization to
10909 inflate_generic_type.
10910 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
10912 2006-02-16 Dick Porter <dick@ximian.com>
10914 * socket-io.c (create_object_from_sockaddr): Fix typo.
10915 (create_sockaddr_from_object): Check array lengths before
10916 potentially accessing items off the end.
10917 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
10918 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
10919 (ves_icall_System_Net_Sockets_Socket_Send_internal)
10920 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
10921 length checks to avoid wraparound overflows.
10922 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
10923 contents of the array of sockets
10924 (hostent_to_IPHostEntry2)
10925 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
10926 Check return value of inet_ntop ().
10927 (addrinfo_to_IPHostEntry): Fix typo
10929 2006-02-16 Raja R Harinath <rharinath@novell.com>
10931 Type metadata parsing doesn't use generic-instantiation information.
10932 * metadata.c (mono_metadata_parse_array_full): Change
10933 MonoGenericContext* parameter to MonoGenericContainer*.
10934 (mono_metadata_parse_type_full): Likewise.
10935 (mono_type_create_from_typespec_full): Likewise.
10936 (mono_metadata_parse_mh_full): Likewise.
10937 (mono_metadata_parse_generic_inst): Likewise.
10938 (do_mono_metadata_parse_generic_class): Likewise.
10939 (do_mono_metadata_parse_type): Likewise.
10940 * metadata-internals.h: Update to changes.
10941 * class.c (mono_class_find_enum_basetype): Likewise.
10942 (mono_class_setup_fields): Likewise.
10943 (mono_class_create_from_typespec): Likewise.
10944 * loader.c (method_from_methodspec): Likewise.
10945 (mono_get_method_from_token): Likewise.
10946 (mono_method_get_header): Likewise.
10948 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
10950 * marshal.c: handle additional GENERICINST case (patch from
10951 Thong Nguyen <tum@veridicus.com>).
10952 Fix a few cases where LDIND_I/STIND_I was used for references.
10954 2006-02-16 Raja R Harinath <rharinath@novell.com>
10956 * reflection.c (mono_reflection_get_token): Remove unused variable.
10958 2006-02-16 Martin Baulig <martin@ximian.com>
10960 * reflection.c (mono_reflection_get_token): Add support for fields
10961 in instantiated generic types.
10964 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
10966 2006-02-15 Martin Baulig <martin@ximian.com>
10969 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
10970 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
10971 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
10972 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
10974 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
10976 * class.c, metadata.c, metadata.h, object.c, icall.c,
10977 marshal.c: changed mono_type_get_underlying_type () to do
10978 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
10979 Fixed handling of instantiated generic valuetypes (bug #75479).
10981 2006-02-15 Raja R Harinath <rharinath@novell.com>
10983 * metadata.c (mono_metadata_decode_signed_value): Simplify.
10984 Delegate to mono_metadata_decode_value, and work on the returned value.
10986 * icall.c (ves_icall_MonoType_GetGenericArguments):
10987 Add consistency check here too.
10989 2006-02-15 Ankit Jain <jankit@novell.com>
10991 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
10994 2006-02-15 Ankit Jain <jankit@novell.com>
10996 * metadata.c (mono_metadata_decode_signed_value): New function to decode
10997 signed values, used only for representing lower bounds of arrays.
10998 (mono_metadata_parse_array_full): Use new
10999 mono_metadata_decode_signed_value to decode lower bounds.
11001 2006-02-14 Martin Baulig <martin@ximian.com>
11004 (mono_reflection_get_token): Support "MonoGenericMethod" and
11005 "MonoGenericCMethod" and allow generic instances / methods.
11007 2006-02-11 Zoltan Varga <vargaz@gmail.com>
11009 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
11010 to obtain the terminal size using an ioctl.
11012 * object.c (mono_nullable_init): Revert this as nullable reference
11013 types are not valid.
11014 (mono_nullable_box): Ditto.
11016 2006-02-09 Dick Porter <dick@ximian.com>
11018 * threads.c (mono_thread_detach): Drop a reference to the thread
11021 2006-02-09 Zoltan Varga <vargaz@gmail.com>
11023 * object.c (mono_nullable_init): Handle nullable reference types.
11024 (mono_nullable_box): Ditto. Fixes #77446.
11026 2006-02-07 Martin Baulig <martin@ximian.com>
11028 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
11030 2006-02-07 Ankit Jain <jankit@novell.com>
11032 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
11033 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
11034 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
11035 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
11036 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
11037 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
11039 2006-02-02 Zoltan Varga <vargaz@gmail.com>
11041 * class.c (mono_class_create_generic): Set type_token as well.
11043 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
11044 compatible with MS.
11046 2006-02-02 Martin Baulig <martin@ximian.com>
11048 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
11049 has never been used so far.
11051 2006-02-02 Martin Baulig <martin@ximian.com>
11053 * mono-debug-debugger.h: Changed comment at the top of this file;
11054 the header is not installed, but it's safe to #include it from
11057 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
11058 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
11060 2006-02-02 Martin Baulig <martin@ximian.com>
11063 (MonoSymbolTable): Removed the `metadata_info' field.
11066 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
11068 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
11069 (mono_debugger_add_builtin_types): Removed.
11070 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
11071 (mono_debugger_create_notification_function): We now operate on a
11072 pre-allocated area; take a `gpointer' and return `void'.
11074 * mono-debug-debugger.c
11075 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
11076 (mono_debugger_add_builtin_types): Removed.
11078 2006-02-02 Martin Baulig <martin@ximian.com>
11080 * threads.c (mono_debugger_create_all_threads): New public method.
11082 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
11084 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
11085 breaks on several platforms.
11087 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
11089 * assembly.c: the VS.NET build doesn't supply default values for
11090 MONO_ASSEMBLIES and MONO_CFG_DIR.
11092 2006-02-01 Zoltan Varga <vargaz@gmail.com>
11094 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
11097 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
11099 * loader.c (method_from_memberref): Fix a warning.
11101 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
11103 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
11104 with explicit layout. Fixes #77433.
11106 2006-01-31 Zoltan Varga <vargaz@gmail.com>
11108 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
11109 max_interface_id is initialized before using it. Fixes #77398.
11110 (ves_icall_Type_GetInterfaces): Ditto.
11112 2006-01-30 Raja R Harinath <rharinath@novell.com>
11114 * metadata.c (mono_metadata_parse_method_signature_full): Don't
11115 allocate memory for parameter attributes when parsing memberref
11117 * loader.c (mono_loader_set_error_method_load): Don't warn.
11118 (method_from_memberref): Ensure MissingMethodException gets thrown
11119 if method is not found. Make warning more informative.
11121 2006-01-29 Raja R Harinath <harinath@gmail.com>
11124 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
11125 return true if is byref.
11126 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
11127 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
11128 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
11130 2006-01-27 Raja R Harinath <rharinath@novell.com>
11132 Fix tests/find-method.2.il
11133 * loader.c (find_method, find_method_in_class): Remove is_inflated
11134 argument. Revert 2006-01-18 change.
11135 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
11136 is generic, search for method in its generic definition.
11137 * class.c (mono_class_setup_vtable_general): Print generic
11138 arguments of generic types in debugging printf.
11140 2006-01-26 Zoltan Varga <vargaz@gmail.com>
11142 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
11144 * threads.c (mono_threads_request_thread_dump): New helper function.
11146 2006-01-25 Raja R Harinath <rharinath@novell.com>
11148 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
11150 2006-01-25 Ankit Jain <jankit@novell.com>
11152 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
11153 move definition to ..
11154 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
11156 2006-01-25 Ankit Jain <jankit@novell.com>
11157 Raja R Harinath <rharinath@novell.com>
11159 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
11160 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
11163 2006-01-25 Martin Baulig <martin@ximian.com>
11165 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
11166 `MonoDebuggerThread' into debug-debugger.c.
11168 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11170 * profiler.c: fix printing of data.
11172 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
11174 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
11175 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
11177 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
11179 * object.c: fix deadlock related to string interning.
11181 2006-01-23 Martin Baulig <martin@ximian.com>
11183 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
11185 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
11187 2006-01-23 Martin Baulig <martin@ximian.com>
11189 * mono-debug.h: Moved the prototypes of some functions which are
11190 used by the JIT here from mono-debug-debugger.h.
11192 2006-01-21 Martin Baulig <martin@ximian.com>
11194 * Makefile.am: Don't install mono-debug-debugger.h.
11196 2006-01-21 Martin Baulig <martin@ximian.com>
11198 * mono-debug-debugger.h: Enforce the private status of this header
11199 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
11200 Moved some stuff from mono-debugger-jit-wrapper.h here.
11202 2006-01-20 Raja R Harinath <rharinath@novell.com>
11204 * class.c (mono_class_from_typeref): Add a sanity test to help
11205 catch lack of assembly load/search hooks.
11207 2006-01-19 Zoltan Varga <vargaz@gmail.com>
11209 * marshal.c (emit_struct_conv): Relax the fields with same offset
11210 check even more. Fixes #77230.
11212 2006-01-18 Martin Baulig <martin@ximian.com>
11214 * loader.c (find_method_in_class): Added `gboolean is_inflated'
11215 argument; if false, we compare the uninstantiated signatures.
11216 (method_from_memberref): Compare the uninstantiated signatures;
11219 2006-01-18 Robert Jordan <robertj@gmx.net>
11221 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
11222 Clear the weak link. Fixes bug #77170.
11224 * gc.c (mono_gchandle_free):
11225 Reflect *-gc.c changes (tiny optimization).
11227 2006-01-18 Zoltan Varga <vargaz@gmail.com>
11229 * metadata.c (mono_metadata_signature_dup): Applied patch from
11230 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
11233 2006-01-17 Zoltan Varga <vargaz@gmail.com>
11235 * marshal.c (emit_struct_conv): Allow fields with the same offset when
11236 marshalling from native to managed code. Fixes #77230.
11238 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11240 * threadpool.c: fix problem (Mac only) when more than one asynchronous
11241 connect. Fixes bug #77020.
11243 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
11245 * class.c: fixed id assignement for nested interfaces (bug #77275).
11246 Added also better info for --print-vtable debugging.
11248 2006-01-12 Martin Baulig <martin@ximian.com>
11250 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
11251 interfaces on-the-fly; fixes #76625.
11253 * class-internals.h
11254 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
11255 don't need that anymore.
11257 2006-01-12 Miguel de Icaza <miguel@novell.com>
11260 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
11261 To avoid initing the nested_classes when not needed I turned the
11262 PeerCredData as a toplevel internal class, as it has to be shared
11265 Fixes the CASA issue.
11267 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
11269 * domain.c: Accessors for MonoJitInfo
11271 * profiler-private.h: Add jitinfo to the end jit hook
11273 * profiler.[ch]: Define new hooks, called after jitting which give
11274 the MonoJitInfo that was compiled
11276 2006-01-10 Martin Baulig <martin@ximian.com>
11278 * class.c (mono_class_setup_events): Add support for generic
11279 classes; fixes #76440.
11281 2006-01-06 Raja R Harinath <rharinath@novell.com>
11284 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
11285 on passed-in method.
11287 2006-01-03 Zoltan Varga <vargaz@gmail.com>
11289 * object.c (mono_runtime_invoke_array): Add Nullable support.
11291 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
11293 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
11295 * file-io.c: Don't consider sockets as directory and avoid an endless
11296 loop. Fix bug #76966.
11298 2006-01-03 Zoltan Varga <vargaz@gmail.com>
11300 * object.c (mono_nullable_init): New helper function.
11301 (mono_nullable_box): Ditto.
11303 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
11305 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
11307 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
11309 2006-01-02 Zoltan Varga <vargaz@gmail.com>
11311 * class.c (mono_class_is_assignable_from): Make T assignable to
11314 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
11316 * appdomain.c: Bump corlib version to 46.
11317 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
11318 serialization purpose) and changed ves_icall_System_Reflection_
11319 Assembly_get_code_base signature to accept a boolean (to escape, or
11320 not, the assembly code base).
11322 2005-12-23 Dick Porter <dick@ximian.com>
11326 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
11327 CreateEvent icall now returns "created" boolean parameter.
11329 2005-12-22 Zoltan Varga <vargaz@gmail.com>
11331 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
11334 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
11335 when attr_klass is an interface. Fixes #77045.
11337 2005-12-20 Zoltan Varga <vargaz@gmail.com>
11339 * marshal.c (emit_struct_conv): Fix previous patch.
11341 * marshal.c (emit_struct_conv): Add a check for fields with the same
11344 2005-12-20 Raja R Harinath <rharinath@novell.com>
11346 Fix regression in Mono.C5.
11347 * class.c (mono_class_create_generic): If 'klass' is an interface
11348 set up the interface offsets.
11349 (mono_class_is_assignable_from): Don't throw away generic arguments.
11351 2005-12-19 Raja R Harinath <rharinath@novell.com>
11353 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
11356 2005-12-15 Raja R Harinath <rharinath@novell.com>
11358 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
11360 (do_mono_metadata_parse_generic_class): Don't pass the current
11361 generic context when parsing the type being instantiated: it
11362 cannot use it, anyway.
11364 * loader.c (method_from_memberref): Don't inflate a signature if
11365 it doesn't contain any type parameters.
11367 2005-12-15 Zoltan Varga <vargaz@gmail.com>
11369 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
11371 2005-12-14 Martin Baulig <martin@ximian.com>
11374 (mono_type_get_name_recurse): Don't return null for type
11375 parameters and open generic classes.
11376 (mono_class_setup_methods): Don't exclude generic instances.
11377 (mono_get_unique_iid): Use different IDs for different
11378 instantiations of the same generic type.
11379 (mono_class_setup_vtable): Only use setup_generic_vtable() for
11380 open generic instances; create a normal vtable for closed generic
11382 (mono_class_setup_vtable_general): We're now also called for
11383 closed generic instances.
11386 (mono_reflection_bind_generic_parameters): Correctly use
11387 mono_metadata_lookup_generic_inst() everywhere.
11389 2005-12-14 Zoltan Varga <vargaz@gmail.com>
11391 * object.c (mono_class_create_runtime_vtable): Call
11392 mono_class_setup_vtable ().
11394 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
11396 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
11399 * loader.c (mono_loader_set_error_type_load): Print the type load
11400 warnings to the console so they are more visible to the user.
11401 (mono_loader_set_error_method_load): Ditto.
11403 * reflection.c (ensure_runtime_vtable): Revert the last change as it
11406 * reflection.c (ensure_runtime_vtable): Fix build.
11408 * reflection.c (ensure_runtime_vtable): Disable an optimization which
11409 doesn't work in all cases.
11411 2005-12-13 Zoltan Varga <vargaz@gmail.com>
11413 * object.c (mono_array_new_full): Treat a single dimensional array
11414 with 0 lower bounds as an szarray. Fixes #76973.
11416 * reflection.c (custom_attr_visible): Really fix this.
11418 2005-12-12 Zoltan Varga <vargaz@gmail.com>
11420 * reflection.c (custom_attr_visible): Allow nested public attributes
11423 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
11426 2005-12-12 Raja R Harinath <harinath@gmail.com>
11428 * class.c (set_generic_param_owner): Delete.
11429 (mono_class_create_from_typedef): Don't set ->owner field of
11430 generic parameters to "param containers" of enclosing classes.
11431 * reflection.c (mono_reflection_initialize_generic_parameter):
11434 2005-12-11 Zoltan Varga <vargaz@gmail.com>
11436 * reflection.c (custom_attr_visible): Fix build.
11438 2005-12-10 Zoltan Varga <vargaz@gmail.com>
11440 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
11441 private attributes.
11443 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
11444 handling of null parameter defaults.
11446 2005-12-09 Raja R Harinath <rharinath@novell.com>
11448 * class.c (mono_class_from_generic_parameter): Don't set
11449 klass->generic_container.
11450 (my_mono_class_from_generic_parameter): Likewise.
11452 2005-12-07 Zoltan Varga <vargaz@gmail.com>
11454 * reflection.c (load_public_key): Fix a warning.
11455 (method_encode_code): Fix unaligned accesses.
11457 2005-12-07 Martin Baulig <martin@ximian.com>
11459 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
11462 (write_generic_param_entry): Encode our custom attrs.
11464 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
11466 2005-12-07 Martin Baulig <martin@ximian.com>
11468 * reflection.c (encode_new_constraint): Removed; we don't use the
11469 `NewConstraintAttribute' anymore.
11471 2005-12-06 Zoltan Varga <vargaz@gmail.com>
11473 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
11474 not fire a TypeResolve event when Assembly.GetType () is called.
11476 2005-12-05 Ben Maurer <bmaurer@ximian.com>
11478 Beginning of support for nullable types in the runtime. Parts of
11479 this patch are from Martin.
11481 * appdomain.c (MONO_CORLIB_VERSION): Bump
11483 * domain.c (mono_init_internal): get the nullable type
11485 * class.c (mono_class_is_nullable): New method
11486 (mono_class_get_nullable_param): New mehod
11487 (mono_class_create_generic): In types T? set cast_class to T
11489 * class-internals.h (MonoDefaults): new nullable default class
11490 (mono_class_get_nullable_param, mono_class_get_nullable_param):
11493 2005-12-05 Raja R Harinath <rharinath@novell.com>
11495 * metadata.c (select_container): New. Refactor code to select the
11496 appropriate GenericContainer given the type of generic parameter
11497 we are looking for.
11498 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
11499 not a MonoGenericContext. Use select_container. Update parameters.
11500 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
11501 and MONO_TYPE_MVAR.
11502 (unwrap_arrays): Remove duplicate tests.
11503 (find_generic_param): Rename from 'has_same_context'. Now walks a
11504 generic instantiated class to find any arguments that are generic
11506 (mono_type_create_from_typespec_full): Use find_generic_param to
11507 avoid evicting some generic instantiations from the typespec
11510 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
11512 * reflection.c: fixed writing of doubles on ARM FPA.
11514 2005-12-02 Robert Jordan <robertj@gmx.net>
11516 * icall.c: Fixed EventInfo.ReflectedType (#76829).
11518 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11520 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
11521 least on SUSE 10 they are not the same (on debian, they are just the
11524 2005-12-01 Raja R Harinath <rharinath@novell.com>
11526 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
11527 DeclaringType for VARs and MVARs.
11528 * class.c (set_generic_param_owner): Fix initialization of owner
11531 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
11533 * icall.c: fixed Enum.ToObject() to correctly convert the values.
11535 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11537 * threadpool.c: workaround for a bug that shows up on the Mac:
11538 select()+connect() on a blocking socket is not like it should
11539 be, so we proceed to connect() in that case, wasting the I/O
11540 threadpool thread until connect succeedes. Fixes bug #75436.
11542 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11544 * threadpool.c: fix typo when setting file descriptor states.
11546 2005-11-28 Raja R Harinath <rharinath@novell.com>
11548 * class-internals.h (MonoGenericContainer.is_signature): Remove.
11549 * metadata.c (mono_metadata_parse_method_signature_full): Don't
11550 create a temporary signature container.
11551 (mono_metadata_parse_generic_param): Update to changes.
11552 (mono_type_create_from_typespec_full): Update to changes.
11553 * loader.c (method_from_memberref): Don't use a
11554 MonoGenericContainer while parsing a memberref signature.
11555 (method_from_methodspec): Remove dead-store of the 'container'
11556 variable. It's overwritten before use.
11558 * metadata.c (mono_type_create_from_typespec_full): Make debugging
11560 (mono_metadata_parse_generic_param): Likewise.
11561 * loader.c (find_method_in_class): Does not need a
11562 MonoGenericContainer. Use 'mono_method_signature' rather than
11563 'mono_method_signature_full'.
11564 (find_method, mono_get_method_constrained, method_from_memberref):
11567 * metadata.c (mono_type_create_from_typespec_full): Ensure that
11568 owner-less generic-parameters are never evicted from the typespec
11571 * loader.c (method_from_memberref): Don't use the current context
11572 when parsing signatures.
11573 (method_from_methodspec, mono_get_method_from_token): Update to changes.
11575 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
11576 side-effects in g_assert.
11577 * loader.c (mono_get_method_from_token): Resolve klass earlier so
11578 that we don't potentially lose information.
11580 2005-11-26 Dick Porter <dick@ximian.com>
11583 * threads.c: icalls to implement basic (ie, not named)
11584 System.Threading.Semaphore.
11586 2005-11-24 Dick Porter <dick@ximian.com>
11589 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
11590 Use GetProcessId() if it's available.
11592 2005-11-23 Zoltan Varga <vargaz@gmail.com>
11594 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
11596 2005-11-23 Raja R Harinath <rharinath@novell.com>
11597 Ankit Jain <jankit@novell.com>
11599 * loader.c (mono_get_method_from_token): Initialize 'method' field
11600 of all generic parameters before parsing the signature. Remove
11601 code that "fixed"-up MVAR references.
11603 2005-11-23 Ankit Jain <jankit@novell.com>
11605 * metadata.c (mono_metadata_has_generic_params):
11606 (mono_metadata_load_generic_param_constraints):
11607 (mono_metadata_load_generic_params): Move duplicate code ...
11608 (mono_metadata_get_generic_param_row): ... here. Returns the
11609 first row-id in GenericParam table for a given owner (token).
11610 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
11613 2005-11-23 Raja R Harinath <rharinath@novell.com>
11614 Ankit Jain <jankit@novell.com>
11616 * metadata.c (mono_metadata_class_equal): Pass signature_only when
11617 comparing VARs too.
11618 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
11619 type->data.generic_param only if the type is an MVAR.
11620 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
11621 leak owner-less VARs and MVARs into managed space.
11623 2005-11-21 Martin Baulig <martin@ximian.com>
11625 * class-internals.h
11626 (MonoMethod): Moved the `generic_container' here from
11627 `MonoMethodNormal' since we now also need it for
11628 `MonoMethodPInvoke';
11629 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
11630 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
11631 an union containing both `MonoMethodNormal' and
11632 `MonoMethodPInvoke'.
11635 (mono_get_method_from_token): Allow implementing generic methods
11639 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
11642 2005-11-17 Dick Porter <dick@ximian.com>
11646 * process.c: Split the Process Start_internal icall into
11647 ShellExecuteEx_internal and CreateProcess_internal, which are
11648 called depending on whether UseShellExecute is true. Fixes bug
11651 * appdomain.c (MONO_CORLIB_VERSION): Incremented
11653 2005-11-17 Zoltan Varga <vargaz@gmail.com>
11655 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
11656 'msize' parameters, use the information in 'mspec' instead.
11657 (emit_object_to_ptr_conv): Ditto.
11659 * marshal.c (emit_struct_conv): Handle explicit layout structs with
11660 fields out of order. Fixes #76733.
11662 2005-11-17 Ankit Jain <jankit@novell.com>
11664 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
11666 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
11668 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
11671 2005-11-16 Zoltan Varga <vargaz@gmail.com>
11673 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
11674 for types with non-auto layout. Fixes #76717.
11676 2005-11-16 Ankit Jain <jankit@novell.com>
11678 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
11679 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
11680 if generic_context is null.
11681 (mono_metadata_generic_param_equal): param->owner can be null.
11682 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
11685 2005-11-16 Zoltan Varga <vargaz@gmail.com>
11687 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
11690 2005-11-15 Martin Baulig <martin@ximian.com>
11692 * object.c (set_value): Use mono_class_from_mono_type() instead of
11693 the hack for generic instances; fixes #76136.
11695 2005-11-15 Zoltan Varga <vargaz@gmail.com>
11697 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
11700 * image.c (load_metadata_ptrs): Initialize the new fields.
11702 * reflection.c (create_dynamic_mono_image): Ditto.
11704 * reflection.c (build_compressed_metadata): Use the new fields.
11706 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
11709 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
11712 2005-11-15 Ankit Jain <jankit@novell.com>
11713 Raja R Harinath <harinath@gmail.com>
11715 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
11716 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
11717 new per-generic_container cache if the cached MonoType's context matches
11718 the current context.
11719 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
11720 to the expected context.
11721 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
11723 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11725 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
11726 we changed the signature of an icall.
11727 * icall.c: Modify to mono_double_ParseImpl return true/false
11728 depending on the success, instead of throwing the exception. This will
11729 help us in Double.TryParse methods.
11731 2005-11-14 Zoltan Varga <vargaz@gmail.com>
11733 * marshal.c (emit_marshal_object): Throw an exception when
11734 marshalling 'object' instead of crashing. Fixes #76696.
11736 2005-11-11 Zoltan Varga <vargaz@gmail.com>
11738 * class-internals.h: Add prototype for mono_type_get_full_name ().
11740 2005-11-11 Dick Porter <dick@ximian.com>
11742 * threads.c (mono_thread_manage): Make sure the main thread has
11743 abandoned all its mutexes when cleaning up. Fixes bug 74680.
11745 2005-11-11 Zoltan Varga <vargaz@gmail.com>
11747 * loader.c (mono_loader_set_error_type_load): Log a warning to the
11748 console about the missing type.
11749 (mono_loader_set_error_method_load): Ditto.
11751 2005-11-09 Miguel de Icaza <miguel@novell.com>
11753 * mono-config.c (mono_get_config_dir): Set the system defaults if
11756 * assembly.c (mono_set_dirs): New API entry point to set the
11757 assembly and the config directory in one call
11759 2005-11-09 Zoltan Varga <vargaz@gmail.com>
11761 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
11762 the ftnptr was created from a delegate in a domain other than the
11763 current domain. Fixes #75377.
11765 * exception.h exception.c: Add mono_get_exception_not_supported ().
11767 2005-11-08 Martin Baulig <martin@ximian.com>
11769 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
11771 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
11773 * security-manager.h: Added definitions to deal with strongname key
11774 pairs bigger (and smaller) than 1024 bits.
11775 * reflection.c: Remove hardcoded strongname size (128 bytes) and
11776 adjust wrt the public key length being used.
11778 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
11780 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
11781 Windows build (r51396-51397).
11783 2005-11-03 Martin Baulig <martin@ximian.com>
11785 * class.c (mono_class_setup_vtable_general): Also add generic
11786 methods to the vtable; fixes #76581.
11788 2005-11-01 Miguel de Icaza <miguel@novell.com>
11790 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
11791 sure that we lookup GetString method from the System.Text.Encoding
11792 class, not the derived class or we get an empty method.
11794 Fixed class #76612.
11796 2005-10-25 Miguel de Icaza <miguel@novell.com>
11798 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
11799 if it has been previously set (embedders).
11801 Make mono_set_rootdir available also on Unix.
11803 005-10-24 Robert Jordan <robertj@gmx.net>
11805 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
11807 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
11809 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
11810 only calls which are made to native code use this flag.
11812 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
11814 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
11816 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
11817 Add support for FieldBuilders.
11819 2005-10-29 Martin Baulig <martin@ximian.com>
11822 (mono_debug_using_mono_debugger): New public method; returns
11823 whether we're running inside the debugger.
11825 2005-10-27 Zoltan Varga <vargaz@gmail.com>
11827 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
11828 for Method/Constructor/FieldBuilders.
11830 2005-10-26 Zoltan Varga <vargaz@gmail.com>
11832 * reflection.c (module_add_cattrs): Save custom attributes for global methods
11833 and fields as well.
11835 2005-10-26 Martin Baulig <martin@ximian.com>
11837 * mono-debug-debugger.c
11838 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
11840 2005-10-24 Raja R Harinath <harinath@gmail.com>
11842 * icall.c (base64_to_byte_array): Don't pass an out-of-range
11843 integer to isspace.
11845 2005-10-21 Zoltan Varga <vargaz@gmail.com>
11847 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
11848 when passing valuetypes byref. Fixes #76502.
11850 2005-10-19 Jackson Harper <jackson@ximian.com>
11852 * profiler.c: Don't put a . in front of types that are not in a
11855 2005-10-18 Zoltan Varga <vargaz@gmail.com>
11857 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
11859 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
11861 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
11863 (mono_marshal_get_ldflda_wrapper): Fix a warning.
11865 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
11867 * assembly.c metadata-internals.h icall.c: Define an additional
11868 parameter for mono_assembly_name_parse_full, so we can avoid creating
11869 S.R.AssemblyName.Version when no version info wasn't passed.
11871 2005-10-09 Miguel de Icaza <miguel@novell.com>
11873 * class.c (mono_type_get_full_name): Reimplement method that was
11876 * image.c: Some docs
11878 2005-10-10 Zoltan Varga <vargaz@gmail.com>
11880 * profiler.c (output_newobj_profile): Fix printing of Total memory
11883 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
11885 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
11887 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
11889 * threads.c: remove debug output.
11891 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
11893 * threads.c (mono_thread_manage): Fix crashes if more than 64
11894 threads need to be aborted. Hopefully fixes #75899.
11896 * assembly.c (mono_stringify_assembly_name): New helper function.
11898 * class.c: Use mono_stringify_assembly_name instead of the similar
11901 * assembly.h assembly.c: Add support for calling a postload search
11902 hook if an assembly cannot be loaded.
11904 * appdomain.c: Register new search hooks which call the AssemblyResolve
11905 events in AppDomain. Fixes #75231
11907 2005-10-07 Martin Baulig <martin@ximian.com>
11909 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
11910 methods without debug info.
11912 2005-10-07 Zoltan Varga <vargaz@gmail.com>
11914 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
11917 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11919 * file-io.c: now that we return symlinks, use lstat and, when the file
11920 is a symbolic link, stat, to get the file attributes. Also avoid the
11921 conversion to/from utf16/external.
11923 2005-10-06 Zoltan Varga <vargaz@gmail.com>
11925 * class.c (mono_class_layout_fields): Compute klass->has_references
11926 correctly if an embedded valuetype is not yet initialized. Fixes
11929 2005-10-04 Martin Baulig <martin@ximian.com>
11932 (mono_metadata_load_generic_param_constraints): New public
11933 function; splitted the constraints loading out from
11934 mono_metadata_load_generic_params().
11936 * class.c (mono_class_create_from_typedef): Call
11937 mono_metadata_load_generic_param_constraints() after setting up
11938 the type and creating our parent; fixes #75329.
11940 2005-10-04 Martin Baulig <martin@ximian.com>
11942 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
11943 non-dynamic parent classes.
11945 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
11947 * file-io.c : win32 build fix (ETXTBSY seems not found).
11949 2005-10-04 Martin Baulig <martin@ximian.com>
11952 (mono_image_get_methodspec_token): Make the cache actually work;
11955 2005-10-04 Martin Baulig <martin@ximian.com>
11957 * class.c (mono_class_name_from_token): Removed the unneccessary
11958 `MonoGenericContext *' argument.
11960 2005-10-04 Martin Baulig <martin@ximian.com>
11963 (method_from_methodspec): Make the caching work again; fixes the
11964 performance regression from #76262.
11966 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11970 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
11971 GetFileSystemEntries that performs the same work but without going
11972 into io-layer, locking, etc.
11974 2005-09-30 Zoltan Varga <vargaz@gmail.com>
11976 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
11977 ThreadState_Stopped as well. Fixes #76047.
11979 2005-09-29 Martin Baulig <martin@ximian.com>
11982 (inflate_generic_context): If the new context has a `gmethod', set
11983 its `container' that that gmethod's `container'.
11986 (mono_metadata_parse_generic_param): Simplify things;
11987 `generic_container = generic_context->container;' is just fine.
11989 * loader.c (method_from_methodspec): Code cleanups.
11991 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
11993 * decimal.c: fix warning (and let gcc generate correct
11994 code on ARM with optimizations).
11996 2005-09-28 Martin Baulig <martin@ximian.com>
11999 (method_from_memberref): Added `MonoGenericContext *class_context'
12000 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
12001 (method_from_methodspec): If we're a memberref, use the enclosing
12002 context when parsing its parent. Fixes #76262; see gtest-206.cs.
12004 2005-09-28 Martin Baulig <martin@ximian.com>
12006 * object.c (mono_runtime_invoke_array): Added support for
12007 MONO_TYPE_GENERICINST; fixes #75917.
12009 2005-09-27 Martin Baulig <martin@ximian.com>
12011 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
12012 `k->byval_arg.type' to determine the actual type.
12014 * loader.c (method_from_methodspec): Removed some hacks.
12016 2005-09-27 Ben Maurer <bmaurer@ximian.com>
12018 * class-internals.h (mono_field_is_deleted): Do the test for
12019 rtspecialname before we check the actual name of the field. This
12020 prevents us from dereferencing a pointer into the string table,
12021 saving us from accessing a few pages
12023 * *.c: Replace the use of {Enter,Leave}CriticalSection with
12024 macros. This will allow a deadlock debugger to easily be plugged
12027 2005-09-27 Martin Baulig <martin@ximian.com>
12029 * loader.c (method_from_methodspec): Create a "signature"
12030 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
12032 2005-09-27 Martin Baulig <martin@ximian.com>
12035 (inflate_generic_class): Correctly set the new context's
12039 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
12040 instead of a `MonoGenericContext *'.
12041 (mono_method_signature_full): Take a `MonoGenericContainer *'
12042 instead of a `MonoGenericContext *'.
12045 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
12046 instead of a `MonoGenericContext *'.
12047 (mono_metadata_parse_method_signature_full): Likewise.
12049 2005-09-26 Martin Baulig <martin@ximian.com>
12052 (mono_class_from_generic_parameter): Set `klass->generic_container'
12053 (mono_class_from_generic_parameter): Likewise.
12054 (mono_bounded_array_class_get): We inherit the generic container
12055 from the element class.
12058 (find_method, find_method_in_class): Take a `MonoGenericContext *'
12059 argument rather than computing it here.
12060 (method_from_memberref): Correctly set the generic context before
12061 parsing the signature. Fixes #75681.
12063 2005-09-26 Zoltan Varga <vargaz@gmail.com>
12065 * object.c (mono_class_has_special_static_fields): Fix warnings.
12067 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
12069 * assembly.c: Add parse_public_key function, to
12070 par the public keys. Also added mono_assembly_name_parse_full,
12071 to define it the parsed key should be freed or not.
12072 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
12073 to parse a long format assembly name.
12074 * metadata-internals.h: Keep mono_assembly_name_parse_full as
12075 private, since calling it to preserve the key requires
12076 freeing it manually.
12078 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
12080 * locales.c : removed HAVE_ICU part.
12082 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
12084 * object.c (mono_class_create_runtime_vtable): Avoid calling
12085 field_is_special_static if the klass has no special static fields.
12087 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
12088 (MonoCachedClassInfo): Likewise.
12090 * object.c (mono_class_has_special_static_fields): New helper function.
12092 2005-09-23 Zoltan Varga <vargaz@gmail.com>
12094 * class.c (mono_class_create_from_typedef): Don't call
12095 interfaces_from_typedef_full for enums.
12096 (mono_class_create_from_typedef): Compute the base types of enums directly
12097 without calling mono_class_setup_fields ().
12098 (mono_class_find_enum_basetype): New helper function.
12100 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
12101 one place inside the string heap.
12103 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
12105 * class.c: locking fixes, code cleanups, some docs added.
12106 Allocate some data structures in the image mempool.
12108 2005-09-23 Zoltan Varga <vargaz@gmail.com>
12110 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
12113 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
12115 * class-internals.h, class.c, reflection.c: reduce memory taken by
12118 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
12120 * metadata.c, metadata.h, loader.h: documentation updates, code and
12123 2005-09-23 Zoltan Varga <vargaz@gmail.com>
12125 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
12128 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
12129 page faults caused by the runtime while reading metadata.
12131 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12133 * socket-io.c: the field names were changed 3 months ago and no one
12134 realized until bug #76077 got filed!
12136 2005-09-20 Martin Baulig <martin@ximian.com>
12138 * icall.c (assembly_icalls): Removed some unused debugger icalls.
12140 2005-09-20 Martin Baulig <martin@ximian.com>
12142 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
12143 write the rank into the class entry.
12145 2005-09-20 Martin Baulig <martin@ximian.com>
12147 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
12149 2005-09-19 Zoltan Varga <vargaz@gmail.com>
12151 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12153 * icall.c (custom_attrs_defined_internal): New icall.
12155 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
12157 (mono_custom_attrs_construct_by_type): New helper function.
12159 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
12161 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
12162 terminate the resulting string. Fixes #76123.
12164 2005-09-16 Martin Baulig <martin@ximian.com>
12167 (mono_debug_add_method): Ignore inflated methods for the moment.
12169 2005-09-14 Martin Baulig <martin@ximian.com>
12171 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
12173 2005-09-13 Zoltan Varga <vargaz@gmail.com>
12175 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
12176 return a success/failure indication.
12177 (mono_metadata_interfaces_from_typedef_full): Ditto.
12178 (get_constraints): Ditto.
12180 2005-09-12 Zoltan Varga <vargaz@gmail.com>
12182 * marshal.c (emit_marshal_array): Fix handling of null arrays.
12184 * marshal.c (emit_marshal_array): Add support for returning string
12185 arrays from delegates. Fixes #76063.
12187 * marshal.c: Use the emit_ldloc/stloc macros where possible.
12189 2005-09-11 Zoltan Varga <vargaz@gmail.com>
12191 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
12194 2005-09-09 Zoltan Varga <vargaz@gmail.com>
12196 * reflection.c icall.c: Fix after mono_get_exception_type_load
12199 * assembly.c (mono_assembly_get_assemblyref): New helper function.
12200 (mono_assembly_load_reference): Use the new helper.
12202 * class-internals.h (MonoLoaderError): New structure containing
12203 information about type loading errors.
12205 * class-internals.h loader.c: Add APIs to store per-thread loader
12208 * loader.c class.c: Set the loader error if needed.
12210 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
12212 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
12214 * decimal.c: fixed to handle the broken ARM fp format.
12216 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
12218 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
12221 2005-09-06 Martin Baulig <martin@ximian.com>
12223 * domain.c (supported_runtimes): Added v2.0.50727.
12225 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
12227 * culture-info.h: reduce the size of some structures.
12229 2005-09-05 Martin Baulig <martin@ximian.com>
12231 Reflect latest API changes in the August CTP.
12234 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
12235 ("MonoType.HasGenericArguments"): Removed.
12236 ("MonoMethod.BindGenericParameters"): Renamed to
12237 "MakeGenericMethod".
12238 ("MethodBuilder.BindGenericParameters"): Renamed to
12239 "MakeGenericMethod".
12241 2005-09-05 Martin Baulig <martin@ximian.com>
12243 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
12245 2005-09-05 Martin Baulig <martin@ximian.com>
12247 Applying a patch from Michal Moskal <malekith@nemerle.org>.
12249 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
12250 generic_container is non-NULL.
12252 2005-09-05 Martin Baulig <martin@ximian.com>
12254 Applying a patch from Michal Moskal <malekith@nemerle.org>.
12256 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
12258 2005-08-29 Michal Moskal <malekith@nemerle.org>
12260 * reflection.c (encode_locals,
12261 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
12262 for large generic types.
12264 2005-09-05 Martin Baulig <martin@ximian.com>
12266 Applying a patch from Michal Moskal <malekith@nemerle.org>.
12268 * class.c (mono_dup_array_type): New public method.
12269 (mono_metadata_signature_deep_dup): New public method.
12270 (dup_type): Correctly duplicate array and function types.
12272 2005-09-05 Martin Baulig <martin@ximian.com>
12274 Applying a patch from Michal Moskal <malekith@nemerle.org>.
12276 * reflection.c (get_default_param_value_blobs): Handle generic types
12277 and generic methods.
12279 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
12281 * class.c: Fixed error reporting (method/class were inversed) for
12282 inheritance demands.
12283 * security-manager.c|h: Added the AppDomain when calling the managed
12284 System.Security.SecurityManager.InheritanceDemand method.
12286 2005-09-01 Raja R Harinath <rharinath@novell.com>
12288 * reflection.c (encode_marshal_blob): 'marshaltype' and
12289 'marshaltyperef' are alternate sources for the custom marshaler
12292 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
12294 * class.c: fix creation of array classes with rank == 1
12295 (patch by Ankit Jain <jankit@novell.com>).
12297 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
12299 * object.c: fix check for creating the bound data for arrays vs
12302 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12304 * object.c: configuration file name is now based on the executable name,
12305 not the image name. Fixes bug #75931.
12307 2005-08-29 Zoltan Varga <vargaz@gmail.com>
12309 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
12310 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
12312 2005-08-25 Zoltan Varga <vargaz@gmail.com>
12314 * rand.c: Use wincrypt.h instead of WinCrypt.h.
12316 2005-08-24 Ankit Jain <jankit@novell.com>
12317 Raja R Harinath <rharinath@novell.com>
12319 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
12320 called by it recursively.
12321 (mono_class_init): Remove special case in pending_init handling, since it's
12322 superseded by the fix to mono_class_from_typeref.
12324 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12326 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
12327 BROKEN_THREAD_START stuff.
12329 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
12331 * class-internals.h object.c: Add a new kind of trampoline called a delegate
12334 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
12336 * object.c (mono_delegate_ctor): Replace the original function address with
12337 a delegate trampoline.
12339 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
12341 * icall.c: add boolean argument to base64_to_byte_array and
12342 InternalFromBase64String to control whether a whitespace-only string
12343 is allowed (or should casue a FormatException to be thrown). We need
12344 this as the behavior has changed between MS.NET 1.x and 2.0, and we
12345 to match the MS behaviour in both profiles.
12346 * appdomain.c: Bump corlib version.
12348 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
12350 This patch implements a big portion of publisher policy
12351 support, used to bind assembly versions and redirect
12352 one assembly from version A to version B.
12355 New GSList loaded_assembly_bindings, for storing the cached
12357 (assembly_binding_maps_name): New static function for checking if a
12358 assembly binding information maps an assembly name.
12359 (mono_assembly_binding_info_free): New function for freeing
12360 assembly binding information resources.
12361 (get_publisher_policy_info): New static function for retrieving
12362 assembly binding information from a MonoImage.
12363 (compare_versions): New static function for comparing an assembly
12364 binding information data and the version of an assembly name.
12365 (check_policy_versions): New static function for checking if an
12366 assembly binding info mapping an assembly name is valid for it.
12367 (mono_assembly_load_publisher_policy): New static function for
12368 loading the 'policy.major.minor.MyAssembly' image for an assembly
12369 with an assembly name 'aname'.
12370 (mono_assembly_bind_version): New static function for updating
12371 assembly redirection.
12372 (mono_assembly_apply_binding): New static function for applying
12374 (search_binding_loaded): New static function for searching
12375 loaded assembly binding infos in the cache domain.
12376 (mono_assembly_load_full): Don't apply assembly binding for
12377 reflection only assemblies.
12379 * metadata-internals.h: Add MonoAssemblyBindingInfo,
12380 which contains information about assembly binding. Also
12381 declare signature for mono_config_parse_publisher_policy ()
12382 function, used to retrieve pub policy info.
12385 (publisher_policy_start): New static function used to parse publisher
12386 policy config files.
12387 (publisher_policy_parser): New static MonoParseHandler containing
12388 the functions used when parsing config files.
12389 (mono_config_parse_publisher_policy): New function for parsing
12390 publisher policy files.
12392 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
12394 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
12396 * marshal.c (mono_delegate_free_ftnptr): Ditto.
12398 * object.c (mono_get_addr_from_ftnptr): New helper function.
12400 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
12402 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12404 2005-08-19 Dick Porter <dick@ximian.com>
12406 * threads.c, threads.h, appdomain.c, appdomain.h,
12407 profiler-private.h, monitor.c, object.c, object-internals.h,
12408 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
12409 store the thread ID, so it can hold a 64 bit value if needed.
12411 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
12413 * reflection.c (mono_reflection_create_dynamic_method): Store the
12414 handle class into the method references as well so ldtoken works in
12417 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
12420 2005-08-19 Ankit Jain <jankit@novell.com>
12423 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
12424 here rather than using the method signature of a arbitrary function
12425 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
12427 Hack done with Harinath.
12429 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12431 * threadpool.c: disable printing stack traces when we get a exception
12432 in a threadpool thread. I need to do more testing to figure out which
12433 cases actually print this. Fixes bug #75828.
12435 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12437 * icall.c: there might be ignored whitespace after the last '='. This
12438 fixes length computation and bug #75840.
12440 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
12442 * assembly.c (mono_assembly_load_full): Consider .exe extension as
12443 well. Fixes #75809.
12445 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
12448 * reflection.c (create_custom_attr_data): Ditto.
12450 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
12452 * locales.c, culture-info.h : removed RegionLCIDMap.
12453 * culture-info-tables.h : regenerated.
12455 2005-08-16 Martin Baulig <martin@ximian.com>
12457 * class.c (mono_type_get_name_recurse): Small fix.
12459 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
12461 * locales.c : indentation fixie.
12463 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
12465 * object-internals.h,
12469 icall.c : added RegionInfo table support.
12470 * culture-info-table.h : regenerated for region support.
12472 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
12474 * reflection.c (resolve_object): handle all kinds of MonoMethod
12475 including generic ones
12477 2005-08-12 Ankit Jain <jankit@novell.com>
12479 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
12480 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
12482 2005-09-12 Lluis Sanchez <lluis@ximian.com>
12484 * process.c: Don't close a thread handle when it's NULL. This is a
12485 workaround for bug #75733.
12487 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
12489 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
12491 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
12493 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
12495 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12497 * threadpool.c: if a work item in the thread pool has a callback that
12498 catches a exception, don't propagate it after invoking the callback.
12501 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
12503 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
12505 * class-internals.h (MonoCachedClassInfo): Add some new fields.
12507 * class.c (mono_class_init): Load field info lazily in the AOT case.
12509 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
12511 2005-08-03 Ankit Jain <jankit@novell.com>
12514 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
12515 PInvoke calling convention is 0.
12517 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
12519 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
12520 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
12522 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
12524 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
12525 to handle threads not started by the GC (patch by Michael Meeks
12526 <michael.meeks@novell.com>).
12528 2005-07-31 Kamil Skalski <nazgul@omega.pl>
12530 * reflection.c: Make buffer used in emitting types larger for some
12531 big generic types (patch by Michal Moskal).
12533 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
12535 * mono-debug.c: Fix some (not all) alignment problems.
12537 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
12539 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
12540 Invoke mono_image_load_from_data_full passing the refonly
12544 (mono_assembly_open_from_bundle): Add the refonly argument,
12545 in order to pass it to other methods it calls to.
12546 (do_mono_assembly_open): Add the refonly argument, in order
12547 to pass it to other methods it calls to.
12548 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
12549 the refonly parameter to it.
12551 * image.c: Add loaded_images_refonly_hash and
12552 loaded_images_refonly_guid_hash to cache the reflection
12553 only loaded images.
12554 (mono_images_init): Initialize the hash tables used for
12555 caching the reflection only images.
12556 (load_modules): Invoke mono_image_open_full passing the refonly
12557 parameter to load the modules the correct way.
12558 (build_guid_table): Add the refonly argument, to re-build the
12559 correct hash table.
12560 (do_mono_image_open): Added the refonly argument, in order to
12561 define it for the loaded image.
12562 (mono_image_loaded_full): New function, which receives an
12563 additional parameter to look for the image in the refonly or
12564 non-refonly section.
12565 (mono_image_loaded): Updated, using mono_image_loaded_full.
12566 (mono_image_loaded_by_guid_full): The same case that happens
12567 with mono_image_loaded_full.
12568 (mono_image_loaded_by_guid): Likewise.
12569 (register_image): Use the ref_only variable inside MonoImage
12570 to decide in which hash table store the current image.
12571 (mono_image_open_from_data_full): Rename
12572 mono_image_open_from_data to mono_image_open_from_data_full,
12573 adding the refonly argument, to define the ref_only variable
12575 (mono_image_open_from_data): Return
12576 mono_image_open_from_data_full.
12577 (mono_image_open_full): Rename mono_image_open to
12578 mono_image_open_full, receiving the new refonly argument,
12579 to pass it to inner methods.
12580 (mono_pe_file_open): Update this function, to open
12581 a MonoImage as a non-refonly image.
12582 (mono_image_close): Use the refonly variable inside
12583 MonoImage to remove the image from the correct caches.
12585 * image.h: Add the signatures of mono_image_open_full,
12586 mono_image_open_from_data_full, mono_image_loaded_full,
12587 mono_image_loaded_by_guid_full.
12589 * metadata-internals.h: Add the ref_only field to
12592 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
12594 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
12595 Fix the last behavior, which used to load the assemblies and
12596 extract MonoReflectionAssemblyName information, instead of
12597 extract it from the metadata tables. Needed for Reflection
12600 2005-07-29 Martin Baulig <martin@ximian.com>
12602 * mono-debug-debugger.c
12603 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
12607 (mono_debug_address_from_il_offset): Check whether we have
12608 debugging support before attempting to take the lock.
12609 (mono_debug_source_location_from_address): Likewise.
12610 (mono_debug_source_location_from_il_offset): Likewise.
12611 (mono_debug_il_offset_from_address): Likewise.
12612 (mono_debug_address_from_il_offset): Likewise.
12614 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
12616 * class.c (mono_class_from_name_case): Add support for dynamic images.
12619 * object.c (mono_class_compute_gc_descriptor): Add a workaround
12622 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
12624 * reflection.c (mono_method_get_object): Fix warning.
12626 2005-07-28 Martin Baulig <martin@ximian.com>
12629 (mono_debug_add_wrapper): Also write the wrapper type.
12631 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
12633 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
12635 * class.c (mono_class_init): Avoid reading nested classes if the AOT
12636 data indicates the class has none.
12638 2005-07-26 Ben Maurer <bmaurer@ximian.com>
12640 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
12641 loader lock with the debugger lock. Prevents deadlocks for beagle.
12643 Beagle can now run on an smp box for a weekend without any
12646 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
12648 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
12649 in a module. Fixes #75629.
12651 2005-07-26 Martin Baulig <martin@ximian.com>
12653 * mono-debug.c (mono_debug_add_wrapper): New static method.
12654 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
12655 interncall or a wrapper.
12657 * mono-debug.h (MonoDebugWrapperData): New public typedef.
12658 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
12659 (MONO_DEBUGGER_VERSION): Bump to 51.
12661 * mono-debug-debugger.c
12662 (mono_debugger_add_type): Removed this empty function.
12663 (mono_debugger_add_method): Likewise.
12665 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
12667 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
12668 before accessing method->slot.
12670 2005-07-21 Jb Evain <jbevain@gmail.com>
12672 * reflection.c (method_encode_clauses/class): Handle filters clauses.
12675 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
12677 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
12680 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
12682 * image.h image.c: Add mono_image_get_guid () API function.
12684 2005-07-19 Ben Maurer <bmaurer@ximian.com>
12686 There were issues when multiple threads tried to load
12687 assemblies. A deadlock was created between assemblies_mutex and
12688 mono_domain_assemblies_lock. This fixes the issue by making the
12689 assembly ref counting be lock free. See bug 75586.
12691 * image.c (mono_image_close): The add ref function here was using
12692 Interlocked operations while the unref was using a mutex and a
12693 --. I don't think this was ever a bug that would be exposed in a
12694 non-pendantic way (ie, by an embedder doing a ref on one thread
12695 and an unref on another), but for the sake of correctness, this is
12698 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
12699 (mono_assembly_load_reference): Call mono_assembly_addref rather
12700 than touching the refcount ourselves.
12701 (mono_assembly_close): Use InterlockedDecrement to unref the
12702 assembly. Don't acquire the lock unless it is actually needed.
12704 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
12706 * class.c (mono_class_layout_fields): Fix calculation of has_references
12709 2005-07-12 Martin Baulig <martin@ximian.com>
12711 Applying a patch from Michal Moskal <malekith@nemerle.org>.
12714 (mono_type_hash): Provide better hashing for generic instances.
12715 (mono_generic_inst_hash): Improve hashing.
12716 (mono_generic_class_hash): Likewise.
12718 * reflection.c (mymono_metadata_type_hash): Improve hashing for
12721 2005-07-12 Martin Baulig <martin@ximian.com>
12723 * reflection.c (mono_reflection_create_runtime_class): Remove the
12724 hack for generic type definitions and non-`Run' assemblies.
12725 (mono_reflection_bind_generic_parameters): Also use
12726 `klass->wastypebuilder' to check for TypeBuilders.
12728 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
12730 * class.c (mono_class_layout_fields): Fix calculation of has_references
12733 * class.c (inflate_generic_class): Fix a leak.
12734 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
12737 2005-07-11 Martin Baulig <martin@ximian.com>
12739 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
12742 2005-07-11 Martin Baulig <martin@ximian.com>
12744 * loader.c (find_method): Also lookup in
12745 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
12747 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
12749 * appdomain.c (mono_domain_unload): Don't free the error message
12750 before passing it to mono_get_exception_...
12752 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
12754 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
12756 * threads.c: try to better guess an available RT signal (bug #75387).
12758 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
12760 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
12763 2005-07-07 Martin Baulig <martin@ximian.com>
12765 * class.c (mono_type_get_name_full): Return NULL for
12766 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
12769 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
12771 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
12772 exit the appdomain as well being aborted.
12774 * threadpool.c: Create all threadpool threads inside the root appdomain, and
12775 change back to the root domain after calling managed code. This enables
12776 appdomains using threadpools to be unloaded.
12778 2005-07-07 Martin Baulig <martin@ximian.com>
12780 * class-internals.h
12781 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
12782 into `MonoDynamicGenericClass' since we only need it for dynamic
12785 * reflection.c (mono_class_bind_generic_parameters): We don't need
12786 to compute the `parent' here.
12788 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
12790 * culture-info-table.h : regenerated.
12792 2005-07-06 Martin Baulig <martin@ximian.com>
12795 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
12797 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
12799 2005-07-06 Martin Baulig <martin@ximian.com>
12801 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
12802 we're doing a signature-only comparision; fixes #74945.
12804 2005-07-06 Martin Baulig <martin@ximian.com>
12806 * class-internals.h (MonoGenericClass): Moved some things out into
12807 a new `MonoInflatedGenericClass' type.
12808 (MonoInflatedGenericClass): New type; the `klass' of a
12809 `MonoGenericClass' is now computed lazyly in
12810 mono_get_inflated_generic_class().
12812 * class.c (mono_get_inflated_generic_class): New public function.
12813 (mono_class_inflate_generic_method): Removed the unused
12814 `MonoClass *' argument.
12815 (setup_generic_vtable): Don't call mono_get_inflated_method() on
12817 (mono_class_create_generic): Make this static and merge it with
12818 mono_class_create_generic_2(); we're now called automatically from
12819 mono_get_inflated_generic_class().
12821 * loader.c (mono_method_signature): Call
12822 mono_get_inflated_method() here.
12824 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
12826 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
12827 type of fields with RVA.
12829 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
12830 for this pseudo class.
12831 (my_mono_class_from_generic_parameter): Likewise.
12832 (mono_class_init): Allow interfaces to have cctors.
12834 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
12836 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
12837 lazily for AOT methods.
12839 2005-07-05 Martin Baulig <martin@ximian.com>
12841 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
12842 returns FALSE for a successful match, not TRUE.
12844 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
12846 * loader.c (mono_method_get_index): Optimize this a bit.
12848 2005-07-04 Martin Baulig <martin@ximian.com>
12851 (class_compute_field_layout): Move the check for generic type
12852 definitions into mono_class_layout_fields(). Fixes #74684.
12853 (mono_class_from_generic_parameter): Correctly compute
12854 `klass->parent'; fixes #75457.
12856 * reflection.c (register_assembly, register_module): Make sure
12857 `domain->rejobject_hash' is already created.
12859 2005-07-02 Martin Baulig <martin@ximian.com>
12861 * class-internals.h
12862 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
12863 `MonoDynamicGenericClass'.
12865 2005-07-01 Lluis Sanchez <lluis@ximian.com>
12867 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
12868 returned by a field getter is null, since null is a valid value.
12870 2005-07-01 Martin Baulig <martin@ximian.com>
12872 * reflection.c (mono_reflection_generic_class_initialize): Update
12873 the `dgclass->fields [i].parent' to the correct class.
12874 (mono_image_get_fieldref_token): Use the declaring type, not the
12877 2005-07-01 Martin Baulig <martin@ximian.com>
12879 * loader.c (find_method): Also look in the interfaces; fixes #75429.
12881 2005-06-30 Ben Maurer <bmaurer@ximian.com>
12883 * threads.c (thread_cleanup): assert that thread != NULL
12884 (wait_for_tids_or_state_change): We were using the wrong variable
12885 when accessing wait->threads. `i' was always out of the bounds of
12888 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12890 * loader.c: map user32 and kernel32 to libMonoSupportW
12892 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
12894 * appdomain.c (unload_thread_main): Mark this as WINAPI.
12896 2005-06-28 Martin Baulig <martin@ximian.com>
12898 * loader.c (method_from_methodspec): Fix #75334.
12900 2005-06-28 Martin Baulig <martin@ximian.com>
12902 Fix #74953 - Arrays now implement the generic IList<T> interface
12903 on the 2.0 platform.
12905 * class-internals.h (MonoDefaults): Added `generic_array_class'.
12907 * reflection.c (mono_class_bind_generic_parameters): New public
12908 function; similar to mono_reflection_bind_generic_parameters(),
12909 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
12911 * domain.c (mono_init_internal): Try to initialize.
12912 `mono_defaults.generic_array_class' here; this'll only succeed if
12913 we're using the 2.0 corlib.
12916 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
12917 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
12918 (mono_lookup_internal_call): Added support for nested classes.
12921 (mono_get_method_from_token): Set `result->signature->pinvoke' if
12922 we're an interncall and have generic arguments.
12925 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
12926 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
12927 instance of System.Array.InternalArray<T> for arrays, so they
12928 implement the generic IList<T> interface.
12930 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
12932 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
12933 (chastamar@yahoo.com). Fixes #75374.
12935 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
12937 * culture-info-table.h: regenerated.
12939 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12941 * icall.c: handle spaces correctly for base64 strings.
12943 2005-06-26 Ben Maurer <bmaurer@ximian.com>
12945 * *.c: Kill some warnings.
12947 2005-06-23 Duncan Mak <duncan@novell.com>
12949 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
12950 that this builds on Solaris 10 (x86).
12952 2005-06-23 Martin Baulig <martin@ximian.com>
12955 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
12956 generic type definitions.
12958 2005-06-23 Martin Baulig <martin@ximian.com>
12962 * metadata.c (mono_class_get_overrides): Renamed to
12963 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
12964 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
12965 pass it to mono_get_method_full().
12967 2005-06-22 Ben Maurer <bmaurer@ximian.com>
12969 * reflection.c (mono_reflection_create_runtime_class): take the
12970 mono_domain_lock in this method. Prevents deadlocks
12972 2005-06-22 Martin Baulig <martin@ximian.com>
12974 * loader.c (method_from_methodspec): Fix #75330.
12976 2005-06-22 Martin Baulig <martin@ximian.com>
12978 * reflection.c (type_get_qualified_name): Use
12979 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
12980 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
12981 argument; use it if we don't have an assembly name.
12983 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
12985 * object.c: In mono_message_init, set "copy out" flag for in
12986 parameters with the [Out] flag.
12988 2005-06-21 Martin Baulig <martin@ximian.com>
12991 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
12994 2005-06-21 Martin Baulig <martin@ximian.com>
12996 * class.c (mono_class_init): Don't initialize `class->fields' for
12997 generic instances since they're initialized again in
12998 compute_field_layout().
12999 (compute_field_layout): Set the field's `generic_info' here; fix
13002 2005-06-21 Martin Baulig <martin@ximian.com>
13004 * class-internals.h
13005 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
13007 * metadata.c (mono_metadata_generic_method_equal): Also
13008 distinguish the `generic_class'; fixes #75334.
13010 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13014 * domain-internals.h:
13015 * reflection.c: 'domain_assemblies' field is now protected by its own
13016 lock. Don't call into managed code to run the AssemblyLoad event if we
13017 now there are no registered delegates for it.
13019 2005-06-20 Martin Baulig <martin@ximian.com>
13021 * class.c (mono_class_is_assignable_from): Use a custom version of
13022 mono_class_has_parent() to make things work for generic instances;
13025 2005-06-20 Martin Baulig <martin@ximian.com>
13027 * loader.c (method_from_methodspec): Apply a patch from
13028 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
13030 2005-06-20 Martin Baulig <martin@ximian.com>
13032 * class.c (mono_class_init): Reverted Zoltan's last change; it
13035 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
13037 * threads.c (wait_for_tids_or_state_change): Add missing locking.
13039 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13041 * socket-io.c: fix the index in the socket array for writable/error
13042 sockets. Fixes bug #75306.
13044 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
13046 * class.c (mono_class_init): Allow interfaces to have static ctors.
13048 2005-06-17 Martin Baulig <martin@ximian.com>
13050 * loader.c (method_from_methodspec): Use `context->container' when
13051 parsing the `gmethod->inst'.
13053 2005-06-17 Martin Baulig <martin@ximian.com>
13055 * class.c (mono_type_get_name_recurse): Don't add the assembly
13056 name for type arguments.
13058 2005-06-15 Martin Baulig <martin@ximian.com>
13060 * reflection.c (mono_image_get_inflated_method_token): Encode
13061 correct klass; fixes #75260.
13063 2005-06-13 Michal Moskal <malekith@nemerle.org>
13065 * icall.c: Make GetCorrespondingMethod/Constructor take
13066 MonoReflectionMethod method not MonoMethod. Removed
13067 MonoType.GetCorrespondingField, and make
13068 MonoGenericType.GetCorrespondingField take name not
13071 2005-06-13 Michal Moskal <malekith@nemerle.org>
13073 * reflection.c (field_encode_signature, encode_locals):
13074 Make sizes of buffers for types larger (for big generic types).
13075 (create_generic_typespec,
13076 mono_reflection_sighelper_get_signature_local,
13077 mono_reflection_sighelper_get_signature_field):
13078 Add asserts for too small buffers.
13080 2005-06-15 Martin Baulig <martin@ximian.com>
13082 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
13083 if our parent is not a dynamic type.
13085 2005-06-15 Martin Baulig <martin@ximian.com>
13087 * class-internals.h (MonoTypeNameFormat): New enum.
13090 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
13091 (mono_type_get_full_name): Removed.
13092 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
13093 argument instead of the boolean's.
13095 * icall.c (ves_icall_System_MonoType_getFullName):
13096 Added `gboolean assembly_qualified'.
13099 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
13101 * reflection.c (mono_reflection_parse_type): Parse the new type
13104 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13106 * icall.c: no need to convert from utf16 to utf8 and then back again
13107 after the call to GetLogicalDrives.
13109 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13111 * icall.c: frombase64. Fix problems exposed by new tests.
13113 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13115 * icall.c: added internal calls for converting char [] and strings in
13116 base64 into byte [].
13118 2005-06-10 Martin Baulig <martin@ximian.com>
13120 * class.c (mono_class_create_generic_2): Read the nested classes
13121 from the metadata rather than from `gklass->nested_classes' since
13122 `gklass' might not be initialized yet.
13124 2005-06-09 Duncan Mak <duncan@novell.com>
13126 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
13127 all public headers. Fixes #74919.
13129 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
13131 * domain.c: The key for proxy_vtable_hash is now a pointer
13132 array. Added new GHashFunc and GCompareFunc functions for this.
13134 * class.h: The list of interfaces in MonoRemoteClass is known in
13135 advance and can't grow (we create a new MonoRemoteClass if needed),
13136 so now the interface array can be allocated together with
13139 * object.c: Added a new method create_remote_class_key.
13140 Fixed mono_remote_class so it does not depend on
13141 mono_upgrade_remote_class.
13142 Removed extend_interface_array.
13143 Added new method clone_remote_class(), which makes a copy of a remote
13144 class and adds a new interface or class to it.
13145 mono_upgrade_remote_class() now creates a new remote class (or gets
13146 it from the cache) if an vtable upgrade is needed. In this way
13147 we make sure that other objects sharing the same remote class
13148 don't get the new vtable with unwanted interfaces.
13150 * object-internals.h:
13151 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
13153 * marshal.c: Track changes in mono_upgrade_remote_class().
13155 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
13156 * icall.c: Add runtime methods for obtaining members of inflated
13157 class, which were created from supplied non-inflated members. It
13158 is used in internal Get{Method,Constructor,Field} methods in
13161 2005-06-09 Martin Baulig <martin@ximian.com>
13164 (mono_reflection_bind_generic_method_parameters): Fix #75169.
13166 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13167 * reflection.c (mono_image_basic_init): Define
13168 Version in MonoDynamicAssembly.
13170 2005-06-08 Martin Baulig <martin@ximian.com>
13175 (mono_method_signature_full): New public method; takes a
13176 `MonoGenericContext *'.
13177 (find_method): Use mono_method_signature_full() and pass the
13178 klass'es context to it.
13180 * class.c (mono_class_is_inflated_method): Use
13181 mono_method_signature_full() and pass the context to it.
13183 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
13185 * object.c: add proper locking in mono_remote_class_vtable(),
13186 fixes possible memory corruption.
13188 2005-06-08 Michael Meeks <michael.meeks@novell.com>
13190 * marshal.c (mono_remoting_marshal_init): set
13191 initialized after initialization.
13193 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
13195 * locales.c : hush.
13197 2005-06-06 Michael Meeks <michael.meeks@novell.com>
13199 * object.c (extend_interface_array): fix really silly
13200 memory corrupting / comparison bug.
13202 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13204 * reflection.c: Functions added to support the creation
13205 of CustomAttributeData, which includes Attribute data
13206 used by ReflectionOnly methods.
13208 * reflection.h: mono_reflection_get_custom_attrs_data and
13209 mono_custom_attrs_data_construct added (functions exposed).
13211 * icall.c: Added mono_reflection_get_custom_attrs_data
13214 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
13216 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
13219 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
13221 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
13223 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
13224 dynamic DllImportAttribute.
13226 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
13227 dynamic DllImportAttribute.
13229 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
13232 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13234 * threads.c: avoid segfault when an unstarted thread is aborted.
13236 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
13238 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
13239 Returns the name and version of the runtime for reporting.
13241 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13243 * appdomain.c: bump corlib version.
13244 * object-internals.h: new field in MonoReflectionAssembly.
13246 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13248 * object-internals.h: Carlos forgot to add this field.
13250 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
13252 * icall.c: Added create_version to create instances
13253 of Version of MonoReflectionAssemblyName. This change helps
13254 the AssemblyName tests to keep running fine.
13256 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
13258 * object.c (mono_method_return_message_restore): A somehow less
13259 intrusive fix for #75138.
13261 2005-06-03 Raja R Harinath <rharinath@novell.com>
13263 * object.c (mono_method_return_message_restore): Fix computation
13264 of expected number of out args.
13266 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
13268 * reflection.c (mono_image_get_method_info): Fix the case when the
13271 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
13273 * object.c: Added missing null check in
13274 mono_method_return_message_restore.
13276 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
13278 * reflection.c (mono_image_get_method_info): Handle the case when
13281 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
13283 * object.c: When creating the vtable for a proxy, take into account
13284 all inherited interfaces, not only the ones registered in
13285 iclass->interfaces. This fixs bug #74996.
13286 Also, in mono_method_return_message_restore, verify that the array
13287 of out args has the expected lengh.
13289 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13291 * socket-io.c: update the timeout in Poll when the call is interrupte.
13293 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13295 * socket-io.c: support abort/suspend in Select_internal after last
13298 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13300 * threadpool.c: remove warning.
13302 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13305 * socket-io.[ch]: Select_internal uses poll() now when available, thus
13306 removing the 1024 limit from select(). Runtime part of the fix for
13309 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13311 * socket-io.c: when resolving the addresses for the same
13312 host returned by gethostname(), get the local IPs from the interface
13313 list. Loopback addresses are discarded if the are interfaces up with
13314 non-loopback ones. Fixes bug #63265.
13316 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
13318 * appdomain.c, verify.c, object-internals.h, reflection.c:
13319 bumped corlib number to 36, and added new extra_flags field
13320 to ReflectionMethodBuilder and friends. Fixes #75060.
13322 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
13324 * gc.c: register a new weak link only if the object is non-null
13327 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
13329 * culture-info.h : short time pattern too.
13331 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
13333 * culture-info.h : expand long time pattern string length.
13335 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
13337 * culture-info-table.h : update (more French date format; #72788).
13339 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
13341 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
13342 the method is static. Fixes #75029.
13344 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
13346 * reflection.c: Update the table_idx field of method builders after
13347 saving the module, since it can change. This is a workaround for
13350 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
13352 * culture-info-table.h : update (additional French date format).
13354 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
13356 * icall.c (ves_icall_type_Equals): Revert last change.
13358 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
13360 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
13362 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
13364 * class-internals.h: Added executioncontext_class field to
13365 MonoDefaults structure.
13366 * domain.c: Cache System.Threading.ExecutionContext class in
13368 * object.c: Capture the ExecutionContext for asynchroneous calls in
13369 mono_async_result_new.
13370 * object-internals.h: Added execution_context and original_context
13371 fields to MonoAsyncResult. Added execution_context to MonoThread.
13372 * security-manager.c|.h: Added mono_get_context_capture_method to
13373 return the capture method (if required by the security manager or by
13374 the framework version used).
13375 * threadpool.c: Apply capture (if present) ExecutionContext in
13376 mono_async_invoke and revert to original context after it completes.
13378 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
13380 * culture-info-table.h : updated (real hacky solution for zh-CHT).
13382 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
13384 * culture-info-table.h : zh-CHT related workaround.
13386 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
13388 * marshal.c (emit_marshal_custom): Add some error checking and call the
13389 methods in the ICustomMarshaler interface. Fixes #74875.
13391 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
13392 native->managed wrappers.
13394 2005-05-12 Martin Baulig <martin@ximian.com>
13396 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
13397 here and use the loader lock.
13399 * mono-debug.c: Properly lock when the debugger is not attached.
13400 (mono_debug_init): Release the initial lock if we're not running
13403 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
13405 * marshal.c (emit_marshal_custom): Pass through NULL values without
13406 calling the custom marshalling routines.
13408 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
13409 conversion in structures. Fixes #74882.
13411 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
13413 * culture-info-table.h : zh-* cultures were missing.
13415 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
13417 * threads.c: Added a new event background_change_event which is signaled
13418 when a thread changes its background mode.
13419 Moved here several checks previously done in managed code. The checks
13420 require the thread lock, and using the thread lock in managed code
13421 can result in deadlocks.
13422 Merged Start_internal and Thread_internal into a single method. Now
13423 Thread_internal does all work of creating and starting a thread.
13424 Added icalls for setting and getting the state of the object. Moved from
13425 managed code to avoid locking there.
13426 Added wait_for_tids_or_state_change() which is called instad of
13427 wait_for_tids when waiting for non-backround threads to end. This method
13428 will return if one of the threads ends or the background_change_event
13430 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
13431 the background mode. This method signals the background_change_event
13434 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
13435 removed Start_internal.
13437 2005-05-11 Martin Baulig <martin@ximian.com>
13439 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
13440 to order of some fields to get proper alignment on 64-bit machines.
13442 2005-05-11 Martin Baulig <martin@ximian.com>
13444 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
13445 changes as they're broken and completely fuck up the debugger.
13447 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
13449 2005-05-10 Martin Baulig <martin@ximian.com>
13451 * reflection.c (mono_reflection_generic_class_initialize): Don't
13452 call mono_class_setup_parent() here.
13454 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13456 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
13457 send/receive timeout use an integer in milliseconds. We were using a
13460 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13463 (internal_get_cultures): reserve the first slot of the array for the
13464 InvariantCulture, which will be filled in managed code.
13466 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
13468 * reflection.c (mono_image_fill_module_table): Initialize the
13469 GENERATION field as well.
13471 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13473 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
13474 Monitor.Enter on the object.
13476 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
13478 * threads.c: Enable the wait for running threads when exiting.
13479 * icall.c: Suspend all threads before exiting.
13481 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
13483 * assembly.c (mono_assembly_load_reference): Fix warning.
13485 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13487 * threadpool.c: changed the default number of threads per cpu. From now
13488 on, the default will be 20 + (5 * number of cpus) instead of 50.
13490 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
13492 * loader.c (mono_method_get_signature_full): Add locking here.
13494 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
13496 * appdomain.c: Moved methods for parsing and freeing assembly
13497 names to assembly.c.
13498 * assembly.c, domain-internals.h: Created public methods for parsing
13499 assembly names. Fixed mono_assembly_load_with_partial_name:
13500 it now finds the best match, taking into account the version,
13501 token and culture specified in the partial name. Also return
13502 the latest version if no version information is specified.
13504 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
13506 * threadpool.c: replace check for SocketAsyncCall class.
13508 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13510 * threadpool-internals.h:
13511 * Makefile.am: added threadpool-internals.h
13513 * threadpool.c: call mono_unhandled_exception on exceptions not handled
13514 that happen in threadpool threads (tested on MS).
13515 (mono_thread_pool_remove_socket): new function that dispatch any pending
13516 AIO call on a socket that is closing. By now only epoll really needs it,
13517 as select/poll wake up when the socket closes.
13520 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
13522 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
13524 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
13526 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
13528 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
13530 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
13532 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
13533 has an abort request, convert it into a suspend request.
13535 2005-04-30 Ben Maurer <bmaurer@ximian.com>
13537 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
13538 warning for the usage of `UnmanagedFunctionPointerAttribute' which
13539 is not supported yet.
13541 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13543 * image.c: register assemblies loaded from data (bundles) in the loaded
13544 assemblies hash. Fixes bug #74772.
13546 2005-04-29 Martin Baulig <martin@ximian.com>
13548 * class.c (mono_type_get_name_recurse): Update to the new naming
13549 schema from the latest .NET 2.x beta2.
13550 (mono_class_setup_vtable_general): If we're a generic instance,
13551 copy the vtable from our generic type definition and inflate all
13554 * loader.c (find_method): Update to the new naming schema from the
13555 latest .NET 2.x beta2.
13557 2005-04-29 Raja R Harinath <harinath@gmail.com>
13559 * class.c (mono_class_init): Add a mono_loader_unlock to the
13562 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
13564 * icall.c (ves_icall_System_Environment_Exit): Remove the
13565 suspend_all_other_threads () call for the time being, since it can hang.
13567 * threads.c (mono_thread_manage): Similarly, disable the waiting for
13568 the background threads to exit, since it can also hang.
13570 * class.c (mono_class_init): Applied patch from Ankit Jain
13571 (radical@gmail.com). Avoid pending init errors when a field refers
13572 to a nested class using a typeref. Fixes #74734.
13574 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
13575 this for dynamic modules.
13577 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13579 * threads.c: don't wait for threads that are in the process of aborting
13580 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
13581 and waiting for background threads to finish. This makes xsp and
13582 mod-mono-server exit without random length delays and/or hangs.
13584 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13586 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
13588 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
13590 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
13591 dynamic types to prevent infinite loops. Fixes #74727.
13593 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
13594 ..._is_assignable_to.
13596 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
13598 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
13600 2005-04-25 Martin Baulig <martin@ximian.com>
13602 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
13605 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
13607 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
13609 * reflection.c (build_compressed_metadata): Set metadata header
13612 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
13614 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
13615 number into an integral and a decimal part. Fixes #70473.
13617 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
13619 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
13621 * culture-info-table.h : reflected the latest locale-builder output.
13623 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13625 * threadpool.c: check for SuspendRequested too when deciding if
13626 mono_thread_interruption_checkpoint should be called.
13628 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13630 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
13631 * threads.c: remove interruption_mutex and use Interlocked instead. When
13632 suspending all the threads, wait for all the suspended events at once.
13633 If we're shutting down and get an APC that is going to be queued,
13634 call mono_thread_execute_interruption immediately, as the thread might
13635 be sleeping on a pthread condition or mutex.
13637 * icall.c: call mono_runtime_set_shutting_down before suspending the
13640 Fixes bug #74693. And now xsp is happier when exiting.
13642 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
13644 * loader.c (mono_stack_walk): Fix #74690.
13646 2005-04-22 Martin Baulig <martin@ximian.com>
13648 * mono-debug.h (MonoDebugMethodJitInfo): Added
13649 `MonoDebugMethodJitInfo *jit'.
13651 * mono-debug.c (mono_debug_read_method): Cache the
13652 MonoDebugMethodJitInfo in `address->jit'.
13653 (mono_debug_free_method_jit_info): New public method.
13655 2005-04-22 Martin Baulig <martin@ximian.com>
13657 * class.c (mono_class_is_assignable_from): Disallow
13658 type parameter -> interface.
13660 2005-04-21 Dick Porter <dick@ximian.com>
13662 * threads.c (mono_thread_create): Turn an assertion into an error.
13664 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
13666 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
13668 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
13669 Fix some gcc 4.0 warnings.
13671 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
13673 * file-io.c: fix alt dir separator char on unix systems
13674 and cleanup (fixes bug #71214).
13676 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
13678 * marshal.c: Use CALLVIRT instead of CALL when dispatching
13679 a call to a remote domain, since the method may be an
13680 interface method in the client domain. This fixes bug #74192.
13682 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13684 * threadpool.c: recv/send are now performed before going back to managed
13685 code to save one transition.
13687 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13689 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
13691 * metadata/threadpool.c: removed hack to workaround the bug above.
13695 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
13697 * reflection.c reflection.h: Fix handling of parameter defaults in
13698 dynamic methods. Also fixes handling of parameter attributes.
13701 * mono-debug.c (mono_debug_close_image): Fix warning.
13703 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13705 * socket-io.h: replaced old unused field with new 'blocking'.
13706 * threadpool.c: restore socket blocking state on windows(tm).
13708 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
13710 * icall.c: don't return the codebase in the AssemblyName[] returned by
13711 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
13712 * object-internals.h: Removed FIXME (fields were presents) and fixed
13713 versioncompat declaration.
13715 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13717 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
13718 not closed, so don't cleanup when it happens.
13720 2005-04-13 Chris Toshok <toshok@ximian.com>
13722 * mono-debug-debugger.h: change prototype for
13723 mono_debugger_lookup_type.
13725 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
13726 this function, although it should probably be named
13727 mono_debugger_init_type.
13729 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13731 * threadpool.c: fix non-AIO case.
13733 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
13735 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
13736 the built-in profiler to measure just JIT compilation times.
13738 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13740 * threadpool.c: the epollfd might be closed by another thread at
13741 any time, so ignore EBADF at treat it as a "we're closing" sign.
13743 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13745 * threadpool.c: release the semaphores with a count equals to the number
13746 of working threads in both IO and regular pools. Fixed typo that messed
13747 up the count of IO pool threads. Don't initialize the pipe handles if
13750 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13752 * threadpool.c: some systems don't like a NULL when deleting the socket
13755 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13757 * threadpool.c: fix semaphore allocation.
13759 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13761 * threadpool.c: added epoll() based implementation for asynchronous IO
13762 that is used instead of the default poll() when available.
13763 It can be disabled by setting MONO_DISABLE_AIO.
13765 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13767 * threadpool.c: windows needs 'closesocket' and instead of returning
13768 0 when the stream is closed while in select, it returns -1. Fixes bug
13771 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
13773 * class.c (class_compute_field_layout): Fix the regression caused by
13776 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13778 * threadpool.c: separate pool for socket async. IO.
13779 * threadpool.h: mono_max_worker_threads is not a global any more.
13781 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
13783 * class.c (class_compute_field_layout): Fix #74549.
13785 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13787 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
13788 use 2 connected sockets instead.
13790 2005-04-08 Miguel de Icaza <miguel@novell.com>
13792 * mono-config.c: Add new entry point for mkbundle
13793 mono_config_parse_memory.
13795 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13797 * threadpool.c: removed another unused function.
13799 2005-04-08 Ankit Jain <radical@corewars.org>
13801 * reflection.c (get_default_param_value_blobs): Add 'types'
13802 parameter to get the types encoded in the constant table.
13803 (mono_param_get_objects): Use the type from the constant table,
13804 not the type of the parameter, when creating default values.
13805 Handle null default values correctly.
13807 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13814 * socket-io.c: removed dead code for async IO.
13816 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13818 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
13820 * threadpool.c: intercept socket async. calls and pass them to a thread
13821 that is polling and dispatching the job items to the threadpool as
13822 socket become ready. Fixes bugs #71217, #71933.
13824 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
13825 between char and short/ushort arrays.
13827 * socket-io.c: remove dead code.
13829 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
13832 icall.c : removed InternalToUpper_Comp() and
13833 InternalToLower_Comp().
13835 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
13837 * char-conversions.h : The tables were incorrectly generated. Should
13838 be generated against invariant culture.
13840 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
13842 * object.c (mono_runtime_invoke_array): Fix return value when
13843 passing pre-created valuetype objects to ctors.
13845 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
13846 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
13849 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
13851 * domain.c: removed g_assert for runtimesecurityframe_class. This is
13852 only used with --security and hides the wrong corlib version error.
13854 2005-03-30 Joshua Tauberer <tauberer@for.net>
13856 * class.c: Changed mono_class_name_from_token so that types
13857 outside of a namespace don't have an initial period. Improved
13858 the g_warning message used in _mono_class_get when loading
13860 * assembly.c: In mono_assembly_load_reference, when an assembly
13861 can't be found, "No such file or directory" is misleading and
13862 unhelpful because a few paths were checked for the presence of
13863 the assembly. When that happens (ENOENT), display a nicer
13864 message indicating the directories that were searched. In all
13865 cases, the warning is made easier to read for non-hackers.
13867 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
13869 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
13871 * appdomain.h|domain.c: Removed inline from functions.
13872 * appdomain.c: Reduced warnings when compiling on windows.
13873 * icall.c: Fixed output_debug declaration to gunichar2*.
13874 * mono-config.c: Reduced warnings when compiling on windows.
13875 * rand.c: Added missing "windows.h". Added missing return value.
13876 * rawbuffer.c: Added missing winsock2.h for windows.
13877 * sysmath.h: Added mono-compiler.h header to allow/ease
13878 compilation with non-GCC compilers.
13879 * threads.c: Fixed declarations to compile with VS.NET C compiler.
13880 Removed cast warnings.
13882 Adapted from the work of J Lothian (for VC6).
13884 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
13886 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
13889 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
13891 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
13894 2005-03-27 Raja R Harinath <harinath@gmail.com>
13896 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
13897 has to be in $(exec_prefix). $(prefix) is for arch-independent
13898 stuff, and it would probably use $(prefix)/share rather than
13901 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13903 * console-io.c: added 2 includes that might be missing.
13905 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
13907 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
13910 * reflection.c (create_custom_attr): Allocate the params array using
13911 alloca so it gets GC tracking.
13913 2005-03-23 Chris Toshok <toshok@ximian.com>
13915 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
13918 2005-03-24 Raja R Harinath <rharinath@novell.com>
13920 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
13921 changes to pick up any changes in prefix, etc.
13923 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
13925 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
13927 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
13928 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
13930 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
13932 * class-internals.h object-internals.h class.c reflection.c: Extend the
13933 mono_lookup_dynamic_token () function to return the class of the
13936 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
13937 well. Fixes #73848.
13939 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
13941 * security-manager.c: Skip inheritance checks for intra-corlib
13942 class inheritance and method overrides. This skips a lot of checks
13943 and (anyway) permissions cannot work until corlib is loaded.
13945 2005-03-23 Martin Baulig <martin@ximian.com>
13947 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
13948 MONO_TYPE_GENERICINST.
13950 2005-03-23 Martin Baulig <martin@ximian.com>
13952 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
13954 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13956 * class.c: added locking comments to some functions.
13957 Cache the interface offsets arrays (saves about 20 KB
13958 of runtime memory in a typical app).
13959 Reduce the time overhead in mono_class_setup_supertypes ().
13961 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
13963 * icall.c: speedup and fix leaks in GetMethodsByName and
13964 GetPropertiesByName.
13966 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
13968 * reflection.c: some locking fixes.
13970 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
13972 * metadata.c: added missing break in case statement.
13974 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
13976 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
13977 typedbyref return values. Fixes #73941.
13979 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
13981 * security-manager.c|h: Added demandunmanaged method and
13982 suppressunmanagedcodesecurity class to MonoSecurityManager.
13983 Renamed aptc class to allowpartiallytrustedcallers.
13985 2005-03-17 Martin Baulig <martin@ximian.com>
13987 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
13989 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13991 * file-io.c: disabled file async. IO using aio_*. It uses the
13992 threadpool now. Workaround for bug #73718.
13994 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
13996 * assembly.h, mono-config.c: added code to deal with bundled configs
13997 for bundled assemblies.
13999 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
14001 * *.c, private.h: cleanup, removing old private.h header file.
14003 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
14005 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
14006 and throw_on_unmappable_char attributes.
14008 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
14010 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
14011 _ProcessName_internal.
14013 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
14015 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
14018 * icall.c threads.c threads-types.h: Remove slothash icalls as they
14019 are no longer used.
14021 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
14023 * object.c (compute_class_bitmap): Add support for generics. Fixes
14026 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
14028 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
14030 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14032 * filewatcher.c: commented out the code for windows watcher, as we don't
14033 use it (we use the managed implementation instead).
14035 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
14037 * object-internals.h (MonoThread): Remove 'unused1' field.
14039 * appdomain.c: Bump corlib version.
14041 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
14043 * reflection.c (mono_reflection_create_runtime_class): Remove the
14044 AssemblyBuilder.Save optimization since it causes too many problems.
14046 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
14048 * exception.c|h: Added mono_get_exception_reflection_type_load to
14049 create a ReflectionTypeLoadException object.
14050 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
14051 to return NULL is a InheritanceDemand fails during reflection. Updated
14052 ves_icall_System_Reflection_Assembly_GetTypes to throw a
14053 ReflectionTypeLoadException if an InheritanceDemand fails during
14054 reflection. Added icall mapping for GetLinkDemandSecurity.
14055 * security-manager.c|h: Added ves_icall_System_Security_
14056 SecurityManager_GetLinkDemandSecurity internal call to return the
14057 class and methods permissions set for a LinkDemand. Removed unused
14058 fields in MonoSecurityManager.
14060 2005-03-10 Martin Baulig <martin@ximian.com>
14062 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
14063 it's a generic instance.
14065 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
14067 * reflection.c (mono_get_object_from_blob): Applied patch from
14068 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
14070 * class.c (mono_class_is_assignable_from): Another try at fixing
14071 #73469 without breaking anything.
14073 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
14075 * class.c: (mono_class_is_assignable_from): Revert the last changes
14076 since they don't work with generics.
14078 * class.c (mono_class_is_assignable_from): Fix build bustage.
14080 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
14081 the managed IsAssignableFrom method. Fixes #73469.
14083 * reflection.c (mono_reflection_call_is_assignable_from): New helper
14086 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
14088 * object.c (mono_load_remote_field_new): Fix returning uninitialized
14089 memory when the remoting callback does not sets the out arguments.
14092 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
14095 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
14097 * object-internals.h (MonoStackFrame): Sync with managed object layout.
14099 * appdomain.c: Bump corlib version.
14101 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
14103 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
14106 * threads.c (mono_thread_attach): Detect threads which are not started
14107 by the GC pthread wrappers.
14109 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
14111 * icall.c: Added new icall for RNG.
14112 * rand.c|h: Added new icall to open the RNG. This allows to share a
14113 single handle on Linux to access /dev/urandom and fix #73183.
14115 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
14117 * object.c: setting the new vtable in a transparent proxy object must
14118 not change the GC descriptor.
14120 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
14122 * object.c: fixed compilation without GCJ support.
14123 * reflection.c: for runtime-created types ensure klass->has_references
14124 is correct (bug #73215).
14126 2005-03-02 Martin Baulig <martin@ximian.com>
14128 * class.c (mono_class_is_assignable_from): Make this work if
14129 `oklass' is a generic instance; fixes #72831.
14131 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
14133 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
14136 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
14138 * marshal.c: Reorganize native->managed marshalling code to also use
14139 the emit_marshal_... functions.
14141 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
14143 * object.c: typed allocs have issues with bitmap sizes > 30,
14144 so check for max_set >= 30.
14146 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
14148 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
14149 managed code. Fixes #73012.
14151 * metadata.h (MonoMarshalSpec): Add elem_mult field.
14153 * metadata.c reflection.c: Load/Emit elem_mult as well.
14155 * metadata.h (MonoMarshalSpec): Add comment.
14157 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
14159 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
14160 num_elem to -1 if not given.
14162 * object-internals.h (MonoReflectionMarshal): Add has_size field.
14164 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
14167 2005-03-01 Marek Safar <marek.safar@seznam.cz>
14169 * null-gc.c (mono_gc_free_fixed): Was not compilable.
14171 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
14173 * reflection.c (encode_marshal_blob): Encode param_num field as well.
14175 * object-internals.h (MonoReflectionMarshal): Add param_num field.
14177 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
14179 * object.c: generalized the reference bitmap creation
14180 and added hooks for the new GC.
14181 * class-internals.c: removed the gc_bitmap field from MonoClass.
14183 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
14185 * domain.c: help the compiler to produce better code
14186 in mono_jit_info_table_find ().
14188 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
14190 * object.c: make all allocations look typed.
14192 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
14194 * socket-io.c: load Mono.Posix if it's not loaded already
14197 2005-02-24 Martin Baulig <martin@ximian.com>
14199 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
14200 * reflection.c (dup_type): Likewise.
14202 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
14204 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
14205 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
14207 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
14209 * domain.c, threads.c, object-internals.h: make the critical thread
14210 local vars use the fast access mode (even when we're compiled in
14211 a lib). Provide accessors to be used by the jit during codegen.
14213 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
14215 * appdomain.c: Changed hook functios behavior to include
14216 support for the reflection only assemblies. Some icalls were changed
14217 to support the mentioned assemblies too. Signatures of static methods
14218 try_assembly_resolve and real_load now have an additional parameter:
14221 * assembly.c: General changes to mono_assembly_ methods to support
14222 reflection only api. Functions mono_assembly_open, mono_assembly_load,
14223 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
14224 suffix, to support an additional gbool parameter to specify whether
14225 the assembli is reflection only or not. Created some new hook functions
14226 to add support for reflection only assemblies. Signatures of static
14227 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
14228 have now an additional parameter: refonly.
14230 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
14231 indicating whether the assembly is reflection only or not.
14233 * exception.c: Add mono_get_exception_invalid_operation.
14235 * icall.c: Throw an InvalidOperationException when trying to invoke
14236 a property/method/event, or trying to set/get the value of a field.
14237 Also add an icall to retrieve the ref_only flag to the
14238 MonoReflectionAssembly.
14240 2005-02-23 Chris Toshok <toshok@ximian.com>
14242 Part of fix for #72827.
14243 * mono-debug.c (mono_debug_add_method): add lexical block data to
14244 the info we write. Kind of a hack at the moment - we copy the
14245 lexical block info from the MonoDebugMethodInfo to the
14246 MonoDebugMethodJitInfo here, before writing it.
14247 (mono_debug_read_method): read the lexical block info.
14249 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
14251 * debug-mono-symfile.h: add lexical block support.
14253 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
14256 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
14258 * loader.c (mono_lookup_pinvoke_call): Fix warning.
14260 * object.c (mono_runtime_free_method): Call mono_free_method () and
14261 put the TODOs there.
14263 * loader.c (mono_free_method): Free up most memory allocated for
14266 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
14268 * reflection.c: properly flag a Type argument to a
14269 named custom attr value (bug #72248).
14271 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
14273 * reflection.c: reduce code duplication in named custom
14274 attribute encoding.
14276 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
14278 * reflection.c: properly encode custom attrs of type object
14281 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
14283 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
14285 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
14287 * socket-io.c: load System.dll if it's not loaded already
14288 (bug #72850 and #70477).
14290 2005-02-21 Martin Baulig <martin@ximian.com>
14292 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
14295 2005-02-21 Martin Baulig <martin@ximian.com>
14297 * reflection.c (mono_image_build_metadata): We also need to
14298 "fixup" the MethodImpl table after we computed the final method
14299 indices. Call fixup_methodimpl() to do that.
14300 (fixup_methodimpl): New private method.
14302 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
14304 * assembly.c: special case mscorlib.dll (bug#72536),
14305 patch from Carlos Alberto Cortez.
14307 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
14309 * threads-types.h threads.c: Fix build bustage.
14311 * threads.c: Use a union for long<->double conversions.
14313 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
14314 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
14316 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
14317 containing the checkpoint call with NOT_TAKEN.
14319 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
14320 checkpoint before pushing the arguments, so they won't have to be
14323 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
14325 * domain.c, assembly.c, domain-internals.h: make some data
14326 const and relocation-free.
14328 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
14330 * object.c, appdomain.c, class-internals.h: introduce the
14331 MonoClassRuntimeInfo structure to hold the info needed to
14332 use a class at runtime. Made mono_class_vtable() lock-free
14333 for all the appdomains.
14335 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
14337 * metadata-internals.h, image.c: introduce a per-image mempool to
14338 be used for memory that has the same lifetime as the image.
14340 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
14342 * domain.c: In mono_init_internal(), instead of selecting the first
14343 runtime version supported by an executable, get a list of all
14344 supported versions and select the one for which an mscorlib exists
14345 (since even if the runtime supports a given version, it doesn't mean
14346 that the framework for that version is installed).
14347 Modified get_runtimes_from_exe to support this behavior.
14348 In supported_runtimes, added information about additional system
14351 * assembly.c: Added support for more than one system assembly version
14352 per runtime version. Updated the assembly list.
14353 In mono_assembly_remap_version, removed the initial version check,
14354 since we don't know to which version we need to compare until we
14355 get the version set on which the assembly is based.
14356 Moved the code for loading corlib into the new method
14357 mono_assembly_load_corlib(), so it can be used by the initialization
14360 * domain-internals.h: Updated data structures and added declaration
14361 for mono_assembly_load_corlib.
14363 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
14365 * reflection.c (resolve_object): Fix the creation of the signature in
14366 the SignatureHelper case.
14368 * assembly.c (mono_assembly_remap_version): Fix binary search.
14370 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
14372 * class.c: Added inheritance check when a method is overloaded (from a
14373 virtual method or when implementing an interface) and when a class is
14374 inherited. Added functions to set a failure for a class and to
14375 retreive the exception from a failure.
14376 * class-internals.h: Added fields to MonoClass to keep the exception
14377 information status for inheritance (or other exceptions) to be thrown
14378 later (i.e. not at load time).
14379 * object.c: Throw the inheritance SecurityException when a type is to
14380 be created with either class or method inheritance violations.
14381 * reflection.c|h: Fix when getting declsec from a class. Removed
14382 unrequired code for class. Improved sanity in parameter naming.
14383 * security-manager.c|h: Added functions to check for class and method
14386 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
14388 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
14389 and has_finalize in dynamic types as well.
14391 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
14393 * culture-info-table.h : fixed currency format for en-GB (and so on).
14395 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
14397 * gc.c: ensure the GC handles never have 0 as a value.
14399 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
14401 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
14402 a pointer to a struct to unmanaged code. Fixes #72625.
14404 2005-02-16 Martin Baulig <martin@ximian.com>
14406 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
14408 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
14410 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
14412 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
14414 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
14416 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
14417 UnmanagedFunctionPointerAttribute, use it for determining calling convention
14420 * reflection.c (mono_custom_attrs_get_attr): New helper function.
14422 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
14424 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
14426 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
14427 changes to make the current context a field in MonoThread.
14429 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
14431 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
14434 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
14435 extracted from mono_marshal_get_native_wrapper.
14437 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
14438 to create wrappers around native functions.
14440 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
14441 delegates for arbitrary function pointers. Fixes #71472.
14443 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
14445 * threads.c: cleaned up the code a little.
14447 2005-02-15 Martin Baulig <martin@ximian.com>
14449 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
14452 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
14453 allocate larger chunks if needed.
14455 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
14457 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
14460 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
14462 * domain.c: keep the domains in an array and ensure the domain ids
14463 are kept small, so they can be used as indexes to domain-specific data
14464 with a small memory overhead.
14466 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
14468 * icall.c: Handle byref types in Type icalls. Fixes #72544.
14470 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
14472 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
14474 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
14476 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
14478 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
14481 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
14483 2005-02-12 Ben Maurer <bmaurer@ximian.com>
14485 * domain-internals.h: add the hashtable here.
14487 * class-internals.h: Remove `info' from MonoMethod
14489 * domain.c: Add a new hashtable, jit_trampoline_hash
14491 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
14493 * object.c: don't set the value of static fields
14496 2005-02-11 Martin Baulig <martin@ximian.com>
14498 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
14499 (mono_debug_add_method): Silently ignore the method if it's too big.
14500 (mono_debug_add_type): Likewise.
14502 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
14504 * threads.c, appdomain.c: remove #ifdefs from the code.
14506 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
14508 * metadata-internals.h: Added flags to MonoAssembly to cache the most
14509 common security informations. This allows us to stay in unmanaged code
14510 when doing LinkDemand and it's special cases (except for the first
14511 time for initialization). The flags a very much used with --security.
14512 * reflection.c|h: Added code to get declarative security attributes
14513 for LinkDemand and InheritanceDemand. This required to refactor the
14514 existing code for Demand.
14515 * security-manager.c|h: Added new method fields for the special cases
14518 2005-02-10 Martin Baulig <martin@ximian.com>
14520 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
14521 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
14523 2005-02-10 Martin Baulig <martin@ximian.com>
14525 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
14526 debugging code; this is almost a complete rewrite.
14528 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
14530 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
14532 * domain.c, object.h: expose mono_string_equal () and
14533 mono_string_hash ().
14534 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
14535 it's implemented in managed code.
14537 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
14539 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
14540 lo leak objects between appdomains.
14542 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
14544 * assembly.c: old compilers compilation fix from
14545 robertj@gmx.net (Robert Jordan).
14547 2005-02-09 Ben Maurer <bmaurer@ximian.com>
14549 * class-internals.h: Little reminder for the future.
14551 * debug-helpers.c: Fix up wrapper_type_names
14553 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
14555 * image.c, metadata-internals.h: when loading an image from a file,
14556 mmap all of it and use the same codepaths as when using a
14557 in-memory image: the code is simpler and we use less memory
14558 (both writable and readonly).
14560 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
14562 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
14563 API to alloc runtime data structures that need to be tracked by the
14564 GC and contain pointers.
14565 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
14566 make the code more readable and eventually use a different GC.
14568 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
14570 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
14573 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
14575 * object.c: In release_type_locks(), don't release the cctor lock
14576 if it has already been released. This fixes a crash in the
14579 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
14581 * gc.c, marshal.c, icall.c: register a delegate for finalization
14582 only when the native function pointer has been allocated for it.
14584 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
14586 * object.c: cleaned up some code, allocate objects that are
14587 pointer free with the atomic malloc variant. Allocate memory
14588 for static data from the mempool if it's pointer-free.
14589 Allocate the bounds array at the end of the array data, when needed.
14590 * object-internals.h, object.h: move a private function in a private
14592 * class.c: handle missing case in tracking references in fields.
14594 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
14596 * class.c, class-internals.h: keep track if a type has
14597 reference fields in either the instance or static fields.
14599 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
14601 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
14602 and renamed to MonoRuntimeInfo. Added fields to store the expected
14603 framework assembly version. Changed mono_get_framework_version and
14604 mono_get_runtime_version for a single mono_get_runtime_info method.
14606 * assembly.c: Added method to remap system assembly versions to the
14607 current executing runtime version. Removed old mapping code.
14608 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
14610 * icall.c, reflection.c: Track api changes.
14612 2005-02-06 Miguel de Icaza <miguel@novell.com>
14614 * loader.c (method_from_memberref): Improve error reporting,
14615 produce the class name instead of the typeref/typedef index.
14617 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
14619 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
14621 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
14623 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
14624 stdcall and charset name mangling. Reorganize the code and add
14625 some tracing stuff.
14627 2005-02-05 Ben Maurer <bmaurer@ximian.com>
14629 * monodiet.c: More iters!
14631 * marshal.c: Iter usage.
14633 * icall.c: Iter usage.
14635 * object.c: Use iters.
14637 * debug-helpers.c: More iters
14639 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
14641 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
14644 2005-02-05 Ben Maurer <bmaurer@ximian.com>
14646 * mono-debug-debugger.c: use iters
14648 * class.c, class-internals.h: mono_class_setup_events is static
14651 * All callers: use iters
14653 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
14655 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
14656 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
14658 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
14660 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
14662 * marshal.h: Add prototypes for ldfld/stfld_remote.
14664 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
14665 this is called during startup.
14667 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
14669 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
14670 MonoThreadsSync struct private in monitor.c. Changed the way
14671 MonoThreadsSync is allocated so it's faster and there is no
14672 need to keep track of it with a finalizer and it uses less memory.
14673 This also finally allows us to allocate mono objects as ptrfree when
14674 there are no reference fields.
14676 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
14678 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
14679 disappearing link to the GC interface and use them to simplify
14680 the gchandles code.
14682 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
14684 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
14685 stfld_remote which call mono_load/store_field_new. This allows methods
14686 calling ldfld/stfld wrappers to be AOTed.
14688 * console-io.c: Include sys/filio.h under solaris.
14690 * console-io.c: Include curses.h if needed correctly.
14692 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
14694 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
14695 method->klass as well.
14697 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
14699 * class.c (mono_class_init): Switch on lazy initialization of
14702 * class.c (mono_class_get_finalizer): Handle the case when the
14703 finalizer is inherited.
14705 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14707 * console-io.c: <curses.h> is needed by term.h on solaris.
14709 2005-02-03 Ben Maurer <bmaurer@ximian.com>
14711 * icall.c, class-internals.h, monodiet.c, class.c: Remove
14712 mono_class_setup_properties where possible. Remove this ftn from
14713 the header file, and make it static.
14715 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
14717 * loader.c: Add missing setup_... call.
14719 * class.c: Add missing setup_... calls.
14721 * class.c (mono_class_init): Switch on lazy initialization of
14722 the generic vtable.
14724 * class.c (mono_class_init): Fix generics broken by the recent changes.
14726 * monodiet.c (handle_type): Add missing setup_... calls.
14728 * class.c: Back out garbage in previous patch.
14730 * class.c: Add missing setup_... calls.
14732 * class.c (mono_class_get_method_from_name_flags): Avoid calling
14733 mono_class_setup_methods () if possible.
14735 * class-internals.h (MonoClass): Add 'has_cctor' flag.
14737 * class-internals.h (MonoCachedClassInfo): New structure.
14739 * class.c: Initialize properties and events fields of MonoClass lazily.
14741 * class.c: Add infrastructure for lazily initializing the methods and
14742 vtable fields of MonoClass. Not yet used.
14744 * class.c (mono_class_get_finalizer): New helper function.
14746 * class.c: Add infrastructure for loading some class related data from
14749 * object.c: Add infrastructure for initializing the vtable from data
14752 * gc.c (run_finalize): Use mono_class_get_finalizer ().
14754 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
14755 appropriate initialization function before accessing parts of the
14756 MonoClass structure.
14758 * marshal.c: Fix warnings.
14760 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
14762 * mono-debug-debugger.c (get_exception_message): Use
14763 mono_class_get_method_from_name_flags ().
14765 2005-02-02 Ben Maurer <bmaurer@ximian.com>
14767 * reflection.c, appdomain.c: Replace a few manual searches that
14768 Zoltan missed. (Paolo approved this part of my initial patch).
14770 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
14772 * profiler.c: disable recording statistical events at report time.
14774 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
14776 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
14777 to byteswap arrays of enum values, too (bug #72080).
14779 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
14781 * appdomain.c (set_domain_search_path): Allow this to be called if
14782 domain->setup is not yet set.
14784 * loader.c (mono_method_get_index): New helper function.
14786 * loader.c reflection.c: Use mono_method_get_index ().
14788 * class.c (mono_class_get_method_from_name_flags): New helper method.
14790 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
14793 * class.c (mono_class_get_cctor): New helper method.
14795 * string-icalls.c object.c class.c marshal.c reflection.c: Use
14796 mono_class_get_method () to look up methods.
14798 2005-02-01 Miguel de Icaza <miguel@novell.com>
14800 * console-io.c: Fix the build, this should work on Windows.
14802 2005-01-31 Ben Maurer <bmaurer@ximian.com>
14804 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
14805 be set to null to keep things valid
14807 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14809 * icall.c: added Console 2.0 icalls.
14810 * Makefile.am: added console-io.[ch]
14811 * console-io.[ch]: internal calls for Console 2.0 API.
14813 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
14815 * class.c: make sure we consider all the interfaces
14816 when calculating max_interface_id (bug found by
14817 Jeroen Frijters running ikvm).
14819 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
14821 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
14822 valuetype fields to null.
14824 * object.c (set_value): Ditto. Fixes #71669.
14826 2005-01-31 Martin Baulig <martin@ximian.com>
14828 * metadata.c (mono_metadata_has_generic_params): New public
14829 function; checks whether something is a generic method.
14831 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
14833 * appdomain.c: fix infinite recursion when adding assemblies.
14835 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
14837 * object.c: Fix small typo to return all items for Environment.
14838 GetCommandLineArgs.
14840 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
14842 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
14843 reflection.c: more domain and assembly-unload related fixes
14844 and memory leaks plugs.
14846 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
14848 * 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.
14850 2005-01-29 Ben Maurer <bmaurer@ximian.com>
14852 * loader.c (mono_method_signature): Make this method lazy
14853 (mono_get_method_from_token): Don't computate the signature here.
14855 Doing this saves quite a bit of memory. I got 90 kb on starting up
14856 monodoc. It should also save some disk reads on startup.
14858 * *: MonoMethod->signature might be NULL now. You *MUST* use
14859 mono_method_signature.
14861 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
14863 * object.c (mono_runtime_get_main_args): Return an array from the
14864 current domain here. Fixes #71938.
14866 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
14868 * monitor.c: formatting changes to comply with the
14869 mono coding style and remove #ifdefs from the code.
14871 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
14873 * metadata.c, private.h: remove some unneeded data
14874 and use a more compact representation for table schemas.
14876 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
14878 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
14879 to get a better distribution in hash tables.
14880 * *.c: use mono_aligned_addr_hash() where appropriate.
14881 * assembly.c: make var static.
14883 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
14885 * domain-internals.h: Put MonoJitInfo on a diet.
14887 * domain.c: Fix a warning.
14889 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
14891 * gc.c: rework the gc handles code to reuse handles
14894 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
14896 * domain.c: fixed long standing bug in mono_string_equal() which
14897 was brought to light with the ldstr changes.
14899 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
14901 * reflection.c: Remove warning by adding missing include for marshal.h
14903 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
14905 * domain.c, object.c: change the ldstr_table to hold
14906 MonoString* as keys: makes the runtime isinterned lookup
14907 faster and simplifies memory management.
14909 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
14911 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
14912 possible to add imperative security checks before calling the icall.
14913 * reflection.c: Return security attributes on the original MonoMethod
14914 (and not the wrapped one). This fix permissions on icalls.
14916 2005-01-25 Dick Porter <dick@ximian.com>
14918 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
14919 the check for mktime() support actually test the mktime() return
14920 value. "Fixes" bug 71682, though the output is still different to
14923 2005-01-25 Martin Baulig <martin@ximian.com>
14925 * class.c (mono_class_is_assignable_from): Make this work for
14928 2005-01-24 Ben Maurer <bmaurer@ximian.com>
14930 * marshal.c (mono_string_utf8_to_builder)
14931 (mono_string_builder_to_utf16): We might not have ownership of the
14932 string. In thise case, we need to create a new buffer.
14934 * object-internals.h (mono_stringbuilder_capacity): sb->str might
14935 be null, in which case, use the default capacity.
14937 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
14939 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
14940 GC events to the profiler.
14942 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
14944 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
14945 if you don't want the GC to run.
14947 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
14949 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
14950 start providing a GC API and keeping different implementations in
14952 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
14954 2005-01-22 Ben Maurer <bmaurer@ximian.com>
14956 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
14957 mmap rather than allocating a huge buffer.
14958 (mono_debug_close_mono_symbol_file): Free the buffer allocated
14961 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
14963 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
14964 and CheckExecutionRights.
14965 * reflection.c|h: Keep the index of the declarative security to be
14966 used, instead of the pointer, when AOT compiler is used. Also add
14967 class initialization when requesting demands.
14968 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
14969 CheckExecutionRights. Both properties are now FALSE by default, and
14970 unmodifiable, unless the --security option is used.
14972 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
14974 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
14975 reflection.c: properly refcount images and assemblies, many leaks fixed.
14977 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14979 * threadpool.c: increase the timeout for threads in the thread pool to
14980 10s. Fixes bug #67159.
14982 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
14984 * class-internals.h: Sun's compiler insists on explicit
14985 signed on bit fields to handle then correctly.
14987 2005-01-19 Miguel de Icaza <miguel@ximian.com>
14989 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
14990 Make the size of the array fit only the number of invalid path
14991 chars that we have.
14993 * class.c (_mono_class_get): Improve the error reporting when a
14994 class referenced is not found, to assist debugging.
14996 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
14998 * threads.c: fix off-by-one error.
14999 * domain.c: free data allocated in the domain.
15001 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
15003 * reflection.c (mono_method_body_get_object): Fill out exception info
15006 * object-internals.h: Add MonoReflectionExceptionHandlingClause
15009 2005-01-19 Martin Baulig <martin@ximian.com>
15011 * loader.c (mono_get_method_constrained): Make this work again.
15013 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
15015 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
15016 guint16 to match the managed side.
15018 * reflection.c (mono_reflection_body_get_object): Fill out local
15021 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
15024 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
15025 'local_var_sig_token'.
15027 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
15029 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
15032 * reflection.c (mono_method_body_get_object): Handle abstract and
15035 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
15037 * marshal.c, loader.c, class-internals.h, reflection.c:
15038 store the emthod data for a wrapper in an array instead of a list.
15040 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
15042 * marshal.c: change the code to allocate memory more
15043 conservatively for method wrappers.
15045 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
15047 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
15048 fields from MonoClass to the marshal info structure where they belong.
15050 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
15052 * class.c, object.c, class-internals.h, marshal.c: rearrange
15053 some fields and tweak some types to lower memory usage.
15055 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
15057 * threads.c (signal_thread_state_change): Handle the case when the
15058 target thread is the current thread.
15060 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
15062 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
15063 emit_ptr_to_object_conv.
15065 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
15066 marshalling. Fixes #71352.
15068 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
15070 * metadata.h, blob.h: move table enum to blob.h so it can be included
15072 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
15073 cut the size of MonoImage/MonoDynamicImage.
15075 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
15077 * profiler.c (mono_profiler_install_simple): Fix default arguments.
15079 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
15081 * reflection.c, reflection.h, icall.c: add a function to check
15082 if an attribute type is defined for a metadata object.
15084 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
15086 * object-internals.h: Added some needed fields from StringBuilder class.
15087 * marshal.c: Set the maxCapacity when creating a StringBuilder.
15089 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
15091 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
15092 threads before shutting down the runtime.
15094 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
15096 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
15098 * object-internal.h, threads.c: implement stacksize and
15099 parameterized thread start functionality (requires
15100 matching corlib). Marked broken code for later removal.
15102 2005-01-12 Martin Baulig <martin@ximian.com>
15104 * class-internals.h (MonoGenericClass): Moved the `initialized'
15105 flag to MonoDynamicGenericClass, removed `init_pending'.
15106 (MonoGenericInst): Added `is_reference' flag.
15108 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
15110 * reflection.c (mono_image_create_pefile): Only set the pe_offset
15111 inside the MSDOS header. Fixes #71201.
15113 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
15115 (mono_domain_finalize): Ditto.
15117 2005-01-12 Martin Baulig <martin@ximian.com>
15119 * class.c (mono_get_shared_generic_class): Use the cache for
15120 non-dynamic generic classes.
15122 * class-internals.h (mono_class_create_generic_2): Removed
15123 function prototype, this function is now static inside class.c.
15125 * class.c (mono_class_create_generic_2): Made this static, only
15126 call it from mono_class_init() and mono_class_setup_parent().
15127 (collect_implemented_interfaces_aux): Call mono_class_init() on
15128 the interfaces we collect.
15129 (mono_class_setup_vtable): Call mono_class_init (class->parent).
15131 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
15133 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
15134 it a real thread handle.
15136 * domain-internals.h: Move exvar_offset from MonoJitInfo to
15137 MonoJitExceptionInfo, since each catch clause needs its own variable.
15139 2005-01-11 Dick Porter <dick@ximian.com>
15141 * image.c (mono_pe_file_open): New variant on mono_image_open()
15142 that does not set up the CLI metadata; used for FileVersionInfo so
15143 it can get the data for windows binaries too.
15145 * process.c (process_read_string_block): Don't read off the end of
15146 the StringTable block.
15148 These both fix bug 70766.
15150 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
15152 * gc.c: set some fields to NULL at GC cleanup time.
15153 * threads.c: if we quit the main thread, call exit ().
15155 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
15157 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
15159 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
15161 * threads.h, threads.c, object.c: added accessor and settor for
15162 main_thread. Handle it specially when exiting from it: wait
15163 for other foreground threads to exit.
15165 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
15167 * process.c, verify.c: remove some bloat.
15169 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
15171 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
15172 the calling convention to cdecl under win32.
15174 2005-01-08 Ben Maurer <bmaurer@ximian.com>
15176 * object.c (mono_object_get_size): New function to get the size of
15177 an object instance.
15179 * profiler.c (simple_allocation): Use above.
15181 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
15183 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
15184 ves_icall_System_AppDomain_getRootDomain (as it's not required to
15185 get an appdomain by it's id and we can't assume the root's id is 0).
15186 * domain-internals.h: Change the function prototype to match.
15187 * icall.c: Change the icall table for AppDomain.
15189 2005-01-08 Miguel de Icaza <miguel@ximian.com>
15191 * locales.c (string_invariant_compare_char): Only compute
15192 GUnicodeTypes in the case where we need them. Test for ordinality
15193 first and return if so.
15198 * FIXME: here we must use the information from c1type and c2type
15199 * to find out the proper collation, even on the InvariantCulture, the
15200 * sorting is not done by computing the unicode values, but their
15201 * actual sort order.
15204 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
15206 * loader.c: for P/Invoke methods, allow the "Internal" shared
15207 library name to refer to the calling process symbol namespace.
15209 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
15211 * Makefile.am: Add the security manager to the build.
15212 * security-manager.c|h: New. Initialization of the security manager.
15214 2005-01-07 Dick Porter <dick@ximian.com>
15217 * monitor.c: Update thread state during Monitor and WaitHandle
15218 waits. Fixes bug 71031.
15220 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
15222 * reflection.c (property_encode_signature): Correctly handle when the
15223 property has no methods.
15225 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
15227 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
15229 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
15230 fields from mb, not rmb. Fixes #71017.
15232 * marshal.c (emit_ptr_to_str_conv): Add support for
15233 ByValTStr -> string conversion. Fixes #71015.
15235 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
15237 * mempool.c (mono_mempool_contains_addr): New helper function.
15239 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
15241 * metadata.c (mono_metadata_compute_size): Fix size calculation of
15242 HasSematics encoded fields.
15244 * metadata.c (mono_type_to_unmanaged): Improve error message for
15245 invalid string marshalling.
15247 * metadata.c: Fix warnings.
15249 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
15251 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
15254 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
15256 * domain.c object.c domain-internals.h: Revert part of r38077 since the
15257 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
15260 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
15262 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
15263 so methods containing these can be AOTed.
15265 2005-01-03 Martin Baulig <martin@ximian.com>
15267 * loader.c (find_method): Removed the hack for generic instances.
15268 (method_from_memberref): If our parent is a generic instance, pass
15269 its generic type definition to find_method() and then inflate the
15271 (mono_get_method_constrained): Pass the generic type definition to
15272 find_method() and inflate the method later.
15274 * class-internals.h (MonoStats): Added `generic_class_count'.
15276 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
15277 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
15279 * reflection.c (mono_custom_attrs_from_params): Don't ignore
15280 generic type definitions.
15282 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
15284 * loader.c icall.c: Fix warnings.
15286 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
15288 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
15289 blittable types. Fixes #70864.
15291 2004-12-29 Martin Baulig <martin@ximian.com>
15294 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
15296 * reflection.c (mono_method_get_object): Create a
15297 "System.Reflection.MonoGenericMethod" for inflated methods; don't
15298 call mono_get_inflated_method().
15300 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
15302 2004-12-27 Martin Baulig <martin@ximian.com>
15304 * class-internals.h (MonoMethod): Added `is_inflated' flag.
15305 (MonoMethodInflated): Added `inflated' field.
15307 * class.c (mono_class_inflate_generic_method): Don't really
15308 inflate the method here; just set the `is_inflated' flag in the
15310 (mono_class_get_inflated_method): Actually inflate the method here
15311 if it's not already inflated; we use the MonoMethodInflated's new
15312 `inflated' field as a cache.
15314 2004-12-26 Martin Baulig <martin@ximian.com>
15317 (inflate_generic_class): Moved some code out of inflate_generic_type().
15318 (mono_class_inflate_generic_method): If we're already inflated,
15319 inflate the context and use the declaring method; ie. make sure
15320 the declaring method of an inflated method is always the generic
15322 (mono_class_create_from_typedef): Create
15323 `class->generic_container->context->gclass'.
15325 2004-12-24 Ben Maurer <bmaurer@ximian.com>
15327 * metadata-internals.h, marshal.c, reflection.c: More
15328 MonoGHashTable->GHashTable.
15330 * domain-internals.h, class.c: Change MonoGHashTable's into
15331 GHashTables for some cases where no gc stuff is used
15333 All users: update apis
15335 2004-12-23 Ben Maurer <bmaurer@ximian.com>
15337 * metadata.c (builtin_types): Make this `const'. Makes this get
15338 put into the shareable section.
15339 (mono_metadata_init): Casts to make gcc happy.
15341 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
15343 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
15345 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
15347 * icall.c: Added an internal call to retrieve the position and length
15348 of assembly-level declarative security attributes (RequestMinimum,
15349 RequestOptional and RequestRefuse). This is used by the Assembly class
15350 to re-create the corresponding permission sets.
15352 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
15354 * marshal.c: fix the stelemref wrapper to be type correct
15357 2004-12-20 Ben Maurer <bmaurer@ximian.com>
15359 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
15360 to do key & 0x7fffffff. Hashtable already does this. It just
15361 results in longer code.
15363 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
15365 * appdomain.c: Bump corlib version.
15366 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
15367 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
15368 * reflection.c|h: Add functions to get declarative security infos
15369 (blob position and length) for assemblies, classes and methods.
15371 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
15373 * reflection.c: sort the constant table (bug #70693).
15375 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
15377 * object-internals.h, threads.c, domain.c: add accessors for
15378 the MonoThread and MonoDomain tls keys.
15380 2004-12-18 Martin Baulig <martin@ximian.com>
15382 * class.c (inflate_generic_type): If we're inflating a generic
15383 instance, set `ngclass->context->container = context->container';
15384 ie. the container we inflated into.
15386 * metadata.c (mono_metadata_parse_generic_param): Reflect above
15387 inflate_generic_type() changes.
15389 2004-12-17 Martin Baulig <martin@ximian.com>
15391 * class-internals.h
15392 (MonoGenericClass): Replaced `MonoType *generic_type' with
15393 `MonoClass *generic_class'. Removed `dynamic_info'; if
15394 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
15395 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
15397 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
15399 * exception.c (mono_exception_from_token): New helper function.
15401 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
15403 * assembly.c (mono_assembly_load_with_partial_name): Call
15404 mono_assembly_loaded before invoking the preload hooks. Fixes
15407 * object-internals.h (MonoThread): Change culture_info and
15408 ui_culture_info into an array.
15410 * threads.c: Cache culture info objects from more than one appdomain.
15412 * threads.c threads-types.h icall.c: Add icalls for manipulating the
15413 current UI culture.
15415 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
15417 * threads.h threads.c appdomain.c: Clear the culture_info field of
15418 all threads during unloading if they point to an object in the dying
15421 2004-12-13 Ben Maurer <bmaurer@ximian.com>
15423 * culture-info.h (TextInfoEntry): New struct
15424 * object-internals.h: sync with managed
15425 * locales.c: fill the `text_info_data' field
15426 * culture-info-tables.h: update
15428 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
15430 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
15433 2004-12-12 Ben Maurer <bmaurer@ximian.com>
15435 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
15436 (ves_icall_ModuleBuilder_getMethodToken): Ditto
15438 2004-12-12 Martin Baulig <martin@ximian.com>
15440 * mono-debug-debugger.c (write_type): If we're an enum and the
15441 builtin types have already been initialized, call mono_class_init().
15443 2004-12-11 Martin Baulig <martin@ximian.com>
15445 * metadata.c (mono_metadata_load_generic_params): Added
15446 `MonoGenericContainer *parent_container' argument; automatically
15447 compute `container->is_method'; pass the correct owner to
15450 * reflection.c (compare_genericparam): Sort the GenericParam table
15451 according to increasing owners.
15453 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
15455 * profiler.c: allow disabling the default profiler.
15457 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
15459 * decimal.c, icall.c: allow disabling System.Decimal support.
15461 2004-12-09 Marek Safar <marek.safar@seznam.cz>
15463 * reflection.c: Add support for null attribute arguments.
15465 2004-12-09 Martin Baulig <martin@ximian.com>
15467 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
15468 names to get rid of compiler warnings.
15470 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
15472 * marshal.c (mono_marshal_get_struct_to_ptr): Call
15473 mono_marshal_load_type_info (). Fixes #69625.
15474 (mono_marshal_get_ptr_to_struct): Likewise.
15476 2004-12-08 Martin Baulig <martin@ximian.com>
15478 * mono-debug.h: Bumped version number to 47.
15480 * mono-debug-debugger.c
15481 (mono_debugger_event_handler, mono_debugger_event): Take two
15482 guint64 arguments insteed of a gpointer and a guint32.
15484 2004-12-08 Martin Baulig <martin@ximian.com>
15486 * debug-mono-symfile.h
15487 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
15488 `address' to `native_offset'.
15490 2004-12-08 Martin Baulig <martin@ximian.com>
15492 * class.c (mono_class_create_from_typespec): Only inflate if we
15493 either have `context->gclass' or `context->gmethod'.
15495 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
15497 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
15499 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
15501 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
15503 * reflection.c (mono_assembly_get_object): Remove the workaround put
15504 in for the release.
15506 * appdomain.c: Use the corlib_internal field from MonoAssembly.
15508 * appdomain.c: Bump corlib version.
15510 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
15511 be visible in other appdomains.
15513 2004-12-07 Ben Maurer <bmaurer@ximian.com>
15515 * threads.c: Interlocked inc and dec for longs were messed up,
15516 use a KISS based impl for this. Fixes 70234
15518 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
15520 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
15522 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
15524 * icall.c: fix to follow policy not to allow struct
15525 arguments in icalls.
15527 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15529 * process.c: make the patch that handles spaces in file paths work
15530 on mono/windows too.
15532 2004-12-06 Martin Baulig <martin@ximian.com>
15534 * class.c (mono_class_create_generic): Call
15535 mono_class_setup_supertypes() if we're dynamic.
15536 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
15538 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
15540 * object-internals.h: Add new fields to MonoThread.
15542 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15544 * icall.c threads-types.h threads.c: Add new icalls.
15546 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
15548 * object-internals.h (MonoReflectionAssembly): Sync object layout with
15551 * appdomain.c: Bump corlib version.
15553 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
15554 internal assemblies. Fixes #69181.
15556 2004-12-05 Martin Baulig <martin@ximian.com>
15558 * class.c (mono_class_inflate_generic_signature): Make this a
15559 no-op if `context' is NULL or we don't have any type parameters;
15560 also copy `sentinelpos'.
15562 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
15564 * image.c: Add unbox_wrapper_cache.
15566 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
15568 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
15569 function generator.
15571 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
15574 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
15576 2004-12-04 Martin Baulig <martin@ximian.com>
15578 * loader.c (mono_method_get_signature_full): New public function;
15579 like mono_method_get_signature(), but with an additional
15580 `MonoGenericContext *' argument.
15582 * class.c (mono_class_inflate_generic_signature): Formerly known
15583 as inflate_generic_signature(); make this public.
15585 2004-12-04 Martin Baulig <martin@ximian.com>
15588 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
15589 instead of a `MonoGenericContainer *'.
15590 (mono_metadata_parse_array_full): Likewise.
15591 (mono_metadata_parse_signature_full): Likewise.
15592 (mono_metadata_parse_method_signature_full): Likewise.
15593 (mono_metadata_parse_generic_inst): Likewise.
15594 (mono_metadata_parse_generic_param): Likewise.
15595 (mono_metadata_parse_mh_full): Likewise.
15596 (mono_type_create_from_typespec_full): Likewise.
15598 2004-12-03 Martin Baulig <martin@ximian.com>
15600 * class-internals.h (MonoGenericContainer): Replaced the
15601 `MonoGenericContext * pointer with a `MonoGenericContext'
15602 structure and made it the first element.
15604 2004-12-03 Martin Baulig <martin@ximian.com>
15607 (inflate_generic_type): Set the `context->container' when creating
15608 a new MonoGenericContext.
15609 (mono_class_inflate_generic_method): Likewise.
15610 (mono_class_create_from_typespec): Just use `context->container'
15611 to get the container.
15613 * loader.c (method_from_methodspec): Set `context->parent' from
15614 `context->container' - and if that's a method container, use its
15615 parent. Also set the `context->container' when creating a new
15616 MonoGenericContext.
15617 (mono_get_method_from_token): Use just `context->container' to get
15620 * metadata.c (do_mono_metadata_parse_generic_class): Also set
15621 `gclass->context->container'.
15623 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
15624 the `context->container' when creating a new MonoGenericContext.
15626 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
15628 * reflection.c (compare_genericparam): Sort params with identical
15629 owner by their number. Fixes gen-111 on sparc.
15631 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
15633 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
15634 around the domain changes.
15636 * appdomain.c (mono_domain_unload): Handle the case when the thread
15637 calling Unload is itself being aborted during unloading. Fixes #70022.
15639 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
15641 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
15642 checkpoint_func as an icall so it gets a wrapper.
15643 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
15644 in the cross-appdomain wrappers too.
15646 * threads.c (mono_thread_has_appdomain_ref): Make this public.
15648 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
15650 * reflection.c: Fix some memory leaks.
15652 2004-12-02 Martin Baulig <martin@ximian.com>
15654 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
15656 * metadata.c (generic_class_cache): New static hashtable.
15657 (mono_metadata_lookup_generic_class): New public method.
15659 2004-12-02 Martin Baulig <martin@ximian.com>
15661 * class.c (mono_class_create_from_typedef): Call
15662 mono_class_setup_parent() and mono_class_create_mono_type() before
15663 parsing the interfaces.
15665 2004-12-02 Martin Baulig <martin@ximian.com>
15667 * metadata.c (generic_inst_cache): New static hashtable.
15668 (mono_metadata_lookup_generic_inst): New public function.
15669 (mono_metadata_inflate_generic_inst): New public function.
15670 (mono_metadata_parse_generic_inst): New public function.
15671 (do_mono_metadata_parse_generic_class): Use the new
15672 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
15673 since this'll also use the cache.
15675 * reflection.c (mono_reflection_bind_generic_method_parameters):
15676 Use mono_metadata_lookup_generic_inst() to use the new cache.
15678 * class.c (inflate_mono_type): Use
15679 mono_metadata_inflate_generic_inst() to inflate a generic
15680 instance; this'll also use the new cache.
15682 * loader.c (method_from_methodspec): Use
15683 mono_metadata_parse_generic_inst() and
15684 mono_metadata_inflate_generic_inst() rather than parsing it
15685 manually, so we can use the new cache.
15687 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
15689 * threads.c (wait_for_tids): Do not incorrectly free threads when
15690 the wait times out.
15692 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15694 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
15695 iter->args based on whether parameters are passed in registers (i.e.
15696 MONO_ARCH_REGPARMS is defined)
15698 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
15700 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
15701 the exception message. Fixes #70070.
15702 (method_from_methodspec): Fix warnings.
15704 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15706 * process.c: (complete_path) return the path quoted
15708 2004-12-01 Martin Baulig <martin@ximian.com>
15710 * class-internals.h (MonoGenericInst): New structure.
15711 (MonoGenericClass): Replaced `type_argc', `type_argv' and
15712 `is_open' with `MonoGenericInst *inst'.
15713 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
15714 `is_open' with `MonoGenericInst *inst'.
15716 2004-11-30 Martin Baulig <martin@ximian.com>
15718 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
15720 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
15721 to `generic_class_cache'.
15724 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
15725 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
15726 (mono_generic_inst_is_valuetype): Renamed to
15727 mono_generic_class_is_valuetype().
15729 * class-internals.h
15730 (MonoGenericInst): Renamed to MonoGenericClass.
15731 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
15732 (MonoClass): Renamed `generic_inst' to `generic_class'.
15733 (MonoGenericContext): Renamed `ginst' to `gclass'.
15735 * object-internals.h
15736 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
15738 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
15739 mono_reflection_generic_class_initialize().
15741 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
15742 now known as "System.Reflection.MonoGenericClass".
15743 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
15745 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
15747 * class-internals.h: Added a flag field to MonoClass to cache the
15748 declarative security attributes actions associated with the class.
15749 * domain-internals.h: Added booleans to MonoJitInfo to cache the
15750 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
15751 applicable to the JITted method.
15752 * reflection.c|h: Added functions to extract (as flags) which security
15753 actions are available (declaratively) for a method, class or assembly.
15754 * metadata.c|h: Added functions to search the declarative security
15755 table in the metadata.
15757 2004-11-29 Ben Maurer <bmaurer@ximian.com>
15759 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
15760 EXPORTEDTYPES are already in the class name cache, so there is no
15761 need to add extra code here to look at them. Just removes a bit of
15764 (ves_icall_System_Environment_get_TickCount): No need for #if
15765 WINDOWS. We already have the code in io-layer.
15767 2004-11-28 Martin Baulig <martin@ximian.com>
15770 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
15773 2004-11-27 Miguel de Icaza <miguel@ximian.com>
15775 * assembly.c (do_mono_assembly_open): Instead of having a
15776 conditional WITH_BUNDLE, incorporate support for bundles here, by
15777 having a global `bundles' variable holding a pointer to the actual
15780 (mono_register_bundled_assemblies): New API call used by the
15783 See mkbundle.1 for details.
15785 2004-11-27 Martin Baulig <martin@ximian.com>
15787 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
15788 the vtable for generic methods.
15790 2004-11-26 Martin Baulig <martin@ximian.com>
15793 (mono_metadata_generic_method_hash): New public function.
15794 (mono_metadata_generic_method_equal): Likewise.
15796 * class-internals.h
15797 (MonoGenericContainer): Added `GHashTable *method_hash'.
15799 * reflection.c (ReflectionMethodBuilder): Added
15800 `MonoGenericContainer *generic_container'.
15801 (reflection_methodbuilder_to_mono_method): Don't create a new
15802 MonoGenericContainer each time we're called.
15803 (mono_reflection_bind_generic_method_parameters): Use
15804 `container->method_hash' to cache the results so we don't create a
15805 different method if we're called several times with the same
15808 * loader.c (method_from_methodspec): Use the new
15809 `container->method_hash' here, too.
15811 2004-11-26 Martin Baulig <martin@ximian.com>
15813 * class.c (inflate_generic_signature): Correctly compute
15814 `res->has_type_parameters'.
15815 (mono_class_vtable): Use the `has_type_parameters' flag to
15816 determine whether we're a generic method.
15818 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
15820 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
15822 * object.c (mono_runtime_run_main): Fix a small memory leak.
15824 2004-11-25 Martin Baulig <martin@ximian.com>
15826 * class.c (set_generic_param_owner): Fixed the loop.
15828 2004-11-25 Martin Baulig <martin@ximian.com>
15830 * object.c (mono_class_vtable): Don't create any JIT wrappers for
15833 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
15835 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
15836 names. Fixes #69787.
15838 2004-11-24 Martin Baulig <martin@ximian.com>
15840 * class.c (mono_class_create_generic_2): If we don't have a
15841 `ginst->parent', inflate `gklass->parent' to get our parent.
15843 2004-11-24 Martin Baulig <martin@ximian.com>
15845 * reflection.c (compare_genericparam): Correctly sort the
15846 GenericParam table; fixes #69779.
15848 2004-11-23 Ben Maurer <bmaurer@ximian.com>
15850 * reflection.c: When writing a PE file, don't create a huge
15851 buffer in memory. Just write the arrays we have to the file.
15852 This reduces memory usage.
15854 * metadata-internals.h: MonoDynamicStream pefile is no longer used
15857 2004-11-17 Martin Baulig <martin@ximian.com>
15859 * class.c (mono_class_init): Don't setup `class->parent' for
15860 dynamic instances; moved this to mono_class_generic_2().
15861 (mono_class_create_generic): Also set `klass->inited' for dynamic
15863 (mono_class_create_generic_2): Don't do anything for dynamic
15864 generic instances. Set `klass->parent' here and also call
15865 mono_class_setup_parent() here.
15867 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
15868 `MonoType *parent' argument; set `ginst->parent' before calling
15869 mono_class_create_generic_2(), so we set the correct parent.
15871 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
15873 * reflection.c: allow getting attributes from ModuleBuilder
15876 2004-11-17 Martin Baulig <martin@ximian.com>
15878 * class.c (mono_class_create_from_typedef): If a type parameter is
15879 inherited from an outer class, set its owner to that class.
15881 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
15883 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
15884 for (int*) written size. This fixes bug #69592.
15886 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
15888 * icall.c: Added IsAuthenticodePresnet internal call.
15889 * image.c|h: New function that check a MonoImage for an Authenticode
15890 signature in the certificate PE data directory.
15891 * security.c|h: New internal call to ask the runtime if an
15892 Authenticode signature seems referenced in the PE header.
15894 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
15896 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
15898 * reflection.c (mono_image_create_pefile): Free the assembly streams
15899 after writing out the assembly file.
15901 * object.c (mono_runtime_run_main): Fix small memory leak.
15903 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
15904 property access modifiers. Fixes #69389.
15906 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
15908 * domain.c, object.c, object-internals.h, domain-internals.h,
15909 object.h, marshal.c: keep dynamic code info per domain.
15911 2004-11-15 Martin Baulig <martin@ximian.com>
15913 * class.c (mono_type_get_name_recurse): Put type arguments in
15914 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
15917 2004-11-15 Martin Baulig <martin@ximian.com>
15919 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
15920 (mono_class_setup_vtable): When computing `the_cname' for a
15921 generic instance, don't include the namespace since we'd otherwise
15924 2004-11-15 Martin Baulig <martin@ximian.com>
15926 * class.c (mono_class_create_generic): Changed return type to void.
15927 (mono_class_create_generic_2): New public function; setup
15928 `class->method', `class->field' and `class->interfaces' here
15929 instead of in mono_class_init().
15931 * class.h (mono_class_create_generic): Moved to class-internals.h.
15933 2004-11-14 Ben Maurer <bmaurer@ximian.com>
15935 * reflection.c (mono_image_create_pefile): take a file HANDLE.
15936 rather than writing to memory, write to this file. Right now,
15937 we are just writting into a buffer, and copying that. However
15938 we can avoid the buffer later.
15940 (mono_dynamic_stream_reset): new function
15942 * icall.c, object-internals.h: update for the above.
15944 2004-11-13 Ben Maurer <bmaurer@ximian.com>
15946 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
15947 have been using gc'd memory. First it is slower, unlikely
15948 the comment in the source code said, secondly, it increases
15949 our footprint to do it in the gc.
15951 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
15952 the method so that it does not have to copy to managed code.
15954 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
15956 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
15958 2004-11-12 Martin Baulig <martin@localhost>
15960 * reflection.c (mono_image_create_token): Allow generic method
15961 definitions here, since they may appear in an `.override'; see
15962 gen-98/gen-99 for an example.
15964 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
15966 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
15969 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
15972 2004-11-11 Martin Baulig <martin@ximian.com>
15974 * class.c (mono_class_setup_vtable): In an explicit interface
15975 implementation, the method name now includes the arity.
15977 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
15979 * object.c (mono_array_full_copy): Fix warning.
15981 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
15983 * appdomain.c: Removed look_for_method_by_name(). Use the new method
15984 mono_class_get_method_from_name() instead.
15986 * class-internals.h: Added two new types of wrappers.
15987 Added MonoRemotingTarget enum. Added new trampoline function type, which
15988 takes an additional MonoRemotingTarget value as parameter, so it is
15989 possible to request a trampoline for a specific target.
15991 * class.c: Added new mono_class_get_method_from_name() method.
15993 * class.h: In MonoRemoteClass, we can have now to vtables, one for
15994 general remoting sinks and one specific for cross domain calls.
15996 * debug-helpers.c: Added new wrapper names.
15998 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
16001 * image.c: Porperly delete value objects form the remoting invoke hashtable.
16003 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
16004 with several other methods (mono_marshal_get_xappdomain_dispatch,
16005 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
16006 and others) can generate a fast remoting wrapper for cross domain calls.
16007 More information can be found in docs/remoting.
16008 Other changes: Removed mono_find_method_by_name, and used
16009 mono_class_get_method_from_name instead.
16010 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
16011 is stored in the remoting invoke hashtable.
16013 * marshal.h: published the new method for getting the xdomain wrapper,
16014 and also added a method for getting the adequate wrapper for a given
16017 * object-internals.h, object.c: Added a couple of methods for capying and
16019 Modified mono_install_remoting_trampoline, which takes the new remoting
16020 trampoline that has a remoting target as parameter.
16021 mono_class_proxy_vtable now also takes a remoting target as parameter, and
16022 will return the most suitable vtable for the target.
16023 Added mono_remote_class_vtable, which returns the vtable of a remote class
16024 (which can be the normal remoting vtable or the xdomain vtable).
16026 * threads.c: the xdomain invoke and dispatch wrappers must also be
16027 protected against interruptions.
16029 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16031 * icall.c: use memmove in BlockCopyInternal when the source and
16032 destination arrays are the same.
16034 2004-11-09 Martin Baulig <martin@ximian.com>
16036 * class-internals.h (MonoGenericContainer): Removed `method' and
16037 `signature', replaced them with `is_method' and `is_signature'
16038 flags. Added `context'.
16040 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
16041 instead of a `MonoGenericContainer *'.
16043 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
16044 for dynamic type parameters.
16045 (mono_metadata_load_generic_params): Setup `container->context'.
16047 * reflection.c (mono_reflection_setup_generic_class): Setup
16048 `tb->generic_container->context'.
16049 (do_mono_reflection_bind_generic_parameters): Use
16050 mono_class_inflate_generic_type() to correctly inflate types,
16051 rather than using our own hack just for MONO_TYPE_VAR.
16053 2004-11-09 Martin Baulig <martin@ximian.com>
16055 * class.c (mono_class_inflate_generic_method): Small fix; don't
16059 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
16060 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
16061 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
16062 (ves_icall_Type_BindGenericParameters): Likewise.
16063 (ves_icall_Type_get_IsGenericInstance): Likewise.
16064 (ves_icall_Type_GetGenericParameterPosition): Likewise.
16065 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
16066 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
16067 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
16069 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
16071 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
16072 assembly versions and public key tokens. Fixes #69113.
16074 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
16076 * metadata.c: fix bug introduced with the type cache changes
16079 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
16081 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
16082 the MonoClass pointer instead of the token in exception clauses.
16083 * reflection.c: updates for the above and make the code not depend
16084 on the structure of MonoExceptionClause.
16086 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
16088 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
16089 Add support for dynamic assemblies. Fixes #69114.
16091 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
16093 2004-11-07 Ben Maurer <bmaurer@ximian.com>
16095 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
16096 since most only those methods use it. the code member of
16097 MonoMethodPInvoke was dead, so that can be removed too. Also,
16098 remove inline_count (again, not used), and move slot so that it
16099 can share bits with some other flags. This saves 8 bytes in the
16100 structure and gives us about 50 kb back for mcs helloworld.cs
16102 * *.[ch]: Do naming changes for the above.
16104 * loader.c (mono_method_get_header): Lazily init the header
16106 (mono_get_method_from_token): don't init the header here
16107 (mono_free_method): the header may never be allocated
16109 Overall, this saves 150 kb of unmanaged allocations
16110 for mcs helloworld.cs. That accounts for 10% of the unmanaged
16113 * loader.c, loader.h (mono_method_get_header): new accessor.
16115 * *.[ch]: use the above method. Prepares us to lazily load
16118 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
16119 three warnings, which are actual bugs (see 69206).
16121 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
16122 unused. Saves a cool 4 bytes / method.
16124 2004-11-06 Ben Maurer <bmaurer@ximian.com>
16126 * metadata.c (builtin_types): Add types for System.Object here.
16127 (mono_metadata_parse_type_full): Cache MonoType*'s that are
16128 for a class or valuetype from klass->this_arg or klass->byval_arg.
16130 On mcs for a hello world, this gets us down from 21836 MonoType's
16133 (mono_metadata_free_type): Account for the above change.
16135 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
16137 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
16138 exception instead of asserting if name is null.
16139 (ves_icall_System_AppDomain_GetData): Ditto.
16141 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
16143 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
16146 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
16147 Return NULL when the domain does not have entry_assembly set.
16149 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
16150 Add a 'resource_modules' argument.
16151 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
16153 * reflection.c (mono_reflection_create_runtime_class): Move setting
16154 of wastypebuilder here, so mono_get_type_object () returns a MonoType
16157 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
16158 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
16159 Throw an ArgumentNullException if 'ptr' is null.
16161 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
16162 assemblies here. Fixes #69020.
16164 2004-11-05 Geoff Norton <gnorton@customerdna.com>
16166 * reflection.c (build_compressed_metadata): Fix the previous patch for
16167 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
16170 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
16172 * assembly.c (mono_assembly_names_equal): Allow a match if one of
16173 the cultures is false. Fixes #69090.
16175 * reflection.c (build_compressed_metadata): Fix invalid memory read
16176 detected by valgrind.
16178 * reflection.c (mono_reflection_get_type): Avoid triggering a
16179 TypeResolve multiple times for the same type. Fixes #65577.
16181 2004-11-04 Ben Maurer <bmaurer@ximian.com>
16183 * marshal.c: Avoid using ldftn to call managed functions. It is
16184 much slower than just a call.
16186 * reflection.c (mono_module_get_object): free the basename we
16187 allocate here from glib.
16189 * reflection.c (ensure_runtime_vtable): make sure to free
16190 overrides. Also, we were allocating an array of MonoMethod not an
16191 array of MonoMethod*.
16193 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
16195 * image.c (mono_image_close): free image->guid here.
16197 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
16199 * reflection.c: Fix some spec conformance issues with the PE file
16200 structures so mcs compiled apps run on the Net 2.0 beta.
16202 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
16204 * string-icalls.c (ves_icall_System_String_ctor_encoding):
16205 Implement this. Fixes #67264.
16207 * debug-helpers.h debug-helpers.c marshal.c: Move
16208 mono_find_method_by_name to debug-helpers.c.
16210 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
16212 * object.c (mono_release_type_locks): type_initialization_hash is
16215 * reflection.c object.c object-internals.h: Fix warnings.
16217 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
16218 without accessors. Fixes #61561.
16220 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
16221 application base from the root domain if not set. Fixes #65641.
16222 (mono_runtime_init): Fix warning.
16224 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16226 * appdomain.c: call mono_thread_pool_init.
16227 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
16228 of worker threads based on the number of CPUs and the environment
16229 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
16230 for non-windows (windows) systems.
16232 2004-10-27 Chris Toshok <toshok@ximian.com>
16234 * mono-debug-debugger.c (write_class): don't call mono_class_init
16235 here, as even with the check for (!klass->init_pending), we get
16236 into a situation where we're hitting cycles in class
16237 initialization. Fixes #68816.
16239 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
16241 * image.c: Avoid overwriting values in the loaded_images_hash when an
16242 assembly is loaded multiple times. Fixes #61152.
16244 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
16245 so multiple satellite assemblies for the same name can be loaded.
16248 * mono_domain_assembly_preload: Actually return the loaded assembly,
16251 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
16252 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
16254 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
16255 pending finalizers are not invoked after the appdomain has been
16256 unloaded. Fixes #67862.
16258 2004-10-22 Martin Baulig <martin@ximian.com>
16260 * mono-debug-debugger.c
16261 (mono_debugger_runtime_invoke): Don't box valuetypes.
16263 2004-10-22 Chris Toshok <toshok@ximian.com>
16265 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
16266 don't hide private methods.
16268 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
16270 * icall.c: Allows the runtime to "share" (when known) the public key
16271 token of an assembly. This avoid the need to recalculate the token
16272 (from the public key) in managed code.
16274 2004-10-21 Chris Toshok <toshok@ximian.com>
16276 * debug-helpers.c (append_class_name): argh, revert last patch.
16278 2004-10-21 Chris Toshok <toshok@ximian.com>
16280 * debug-helpers.c (append_class_name): use '+' as the delimiter,
16281 not '/', so that it matches what the debugger uses to look up
16284 2004-10-21 Martin Baulig <martin@ximian.com>
16286 * mono-debug-debugger.c (mono_debugger_throw_exception): New
16287 public method; this is called each time an exception is thrown and
16288 allows the debugger to use exception catch points.
16290 2004-10-21 Martin Baulig <martin@ximian.com>
16292 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
16293 the stack pointer and the exception object in some struct and pass
16294 that to the debugger.
16296 2004-10-21 Chris Toshok <toshok@ximian.com>
16298 * mono-debug-debugger.c (do_write_class): add instance/static
16299 event support. We don't expose "raise" or "other" yet.
16300 (event_is_static): new method.
16302 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
16304 * mono-debug-debugger.c
16305 (mono_debugger_handle_exception): Remove
16306 bogus return value for fussy compilers.
16308 2004-10-20 Martin Baulig <martin@ximian.com>
16310 * mono-debug-debugger.c
16311 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
16312 (mono_debugger_handled_exception): Likewise.
16314 2004-10-20 Martin Baulig <martin@ximian.com>
16316 * mono-debug-debugger.h (MonoDebuggerEvent): Added
16317 MONO_DEBUGGER_EVENT_EXCEPTION.
16319 * mono-debug-debugger.c (mono_debugger_handle_exception): New
16320 public function to send the debugger a notification for an
16321 exception and inform it about a catch/finally clause.
16323 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
16325 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
16326 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
16329 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
16331 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
16333 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
16334 marshalled as [In,Out]. Fixes #58325.
16336 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
16338 * reflection.c (mono_method_body_get_object): Implement some fields.
16340 2004-10-12 Martin Baulig <martin@ximian.com>
16342 * reflection.c (mono_reflection_bind_generic_parameters): Small
16343 fix, correctly retrieve our parent from a generic instance.
16345 2004-10-12 Martin Baulig <martin@ximian.com>
16347 * metadata.c (mono_metadata_generic_param_equal): We always have
16351 (mono_class_from_generic_parameter): We need to have an owner.
16352 (my_mono_class_from_generic_parameter): Likewise.
16354 * reflection.c (mono_reflection_setup_generic_class): Renamed to
16355 mono_reflection_create_generic_class() and added a new
16356 mono_reflection_setup_generic_class().
16357 (mono_reflection_initialize_generic_param): If we're a nested
16358 generic type and inherited from the containing class, set our
16359 owner to the outer class.
16361 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
16363 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
16365 * reflection.c (mono_method_body_get_object): New function to create
16366 a MethodBody object.
16368 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
16370 2004-10-11 Martin Baulig <martin@ximian.com>
16372 * metadata.c (_mono_metadata_type_equal): Renamed to
16373 do_mono_metadata_type_equal() and made static.
16375 2004-10-11 Martin Baulig <martin@ximian.com>
16377 * appdomain.c: Bump corlib version number to 28.
16379 2004-10-10 Martin Baulig <martin@ximian.com>
16381 * class-internals.h
16382 (MonoGenericInst): Added `MonoGenericContainer *container'.
16383 (MonoGenericMethod): Likewise.
16384 (MonoGenericContext): Likewise.
16385 (MonoGenericParam): Added `MonoGenericContainer *owner'.
16388 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
16389 (do_mono_metadata_parse_generic_inst): Likewise.
16390 (mono_metadata_parse_type_full): New public method. This is the actual
16391 mono_metadata_parse_type() implementation - with an additional
16392 `MonoGenericContainer *' argument.
16393 (mono_metadata_parse_array_full): Likewise.
16394 (mono_metadata_parse_signature_full): Likewise.
16395 (mono_metadata_parse_method_signature_full): Likewise.
16396 (mono_metadata_parse_mh_full): Likewise.
16397 (mono_type_create_from_typespec): Likewise.
16398 (mono_metadata_interfaces_from_typedef_full): New public method;
16399 this is similar to the other _full() methods, but we take a
16400 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
16401 (mono_metadata_parse_generic_param): Take an additional
16402 `MonoGenericContainer *' argument and lookup the MonoGenericParam
16403 from that container.
16404 (mono_metadata_generic_param_equal): New static method to compare
16405 two type parameters.
16406 (_mono_metadata_type_equal): New static method; takes an
16407 additional `gboolean signature_only' argument - if true, we don't
16408 compare the owners of generic parameters.
16409 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
16410 with a TRUE argument - do a signature-only comparision.
16412 * loader.c: Use the new _full() methods and pass the
16413 MonoGenericContainer to them.
16415 * object-internals.h (MonoReflectionTypeBuilder): Added
16416 `MonoGenericContainer *generic_container' field.
16417 (MonoReflectionMethodBuilder): Likewise.
16419 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
16421 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
16422 case initial images of dynamic assemblies.
16424 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
16426 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
16428 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
16429 length of event->other array.
16430 (typebuilder_setup_events): Ditto.
16432 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
16433 'assembly_by_name' and add an 'assemblies' list.
16435 * assembly.h assembly.c: Add a new search hook for determining whenever
16436 an assembly is already loaded. Use this instead of searching in the
16437 loaded_assemblies list.
16439 * domain.c appdomain.c: Implement the new search hook so loaded
16440 assemblies are now scoped by appdomain. Fixes #67727.
16442 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
16444 * threads.c (mono_thread_attach): Initialize synch_lock field so
16445 mono_thread_detach works again.
16447 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
16448 'lib' too. Fixes #63130.
16450 2004-10-06 Jackson Harper <jackson@ximian.com>
16452 * culture-info-tables.h: regenerated.
16454 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
16456 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
16457 implemented by other interfaces in the result. Fixes #65764.
16459 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
16460 Handle unloadable modules without crashing.
16462 * image.c (load_modules): Revert the previous patch since modules must
16463 have a fixed index inside the array.
16465 * image.c (load_modules): Don't include native modules in the modules
16468 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
16470 * reflection.h: Add param_defaults field.
16472 * reflection.c: Add support for parameter defaults in dynamic methods.
16475 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
16476 an empty string when a type has no namespace. Fixes #64230.
16478 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
16480 * tabledefs.h: Added "internal" security actions to support non-CAS
16481 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
16482 Note: they do not seems to be used anymore in 2.0 (new metadata format)
16484 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
16486 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
16487 constructor of abstract class. Fixes #61689.
16489 2004-10-04 Martin Baulig <martin@ximian.com>
16491 * class-internals.h (MonoGenericContainer): New type.
16492 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
16493 `MonoGenericContainer *generic_container'.
16494 (MonoClass): Replaced `gen_params' and `num_gen_params' with
16495 `MonoGenericContainer *generic_container'.
16497 * metadata.c (mono_metadata_load_generic_params): Return a
16498 `MonoGenericContainer *' instead of a `MonoGenericParam *';
16499 removed the `num' argument.
16501 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
16503 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
16504 for dynamic images.
16506 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
16509 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
16511 * reflection.c: Save pe_kind and machine values into the generated
16514 * appdomain.c: Bump corlib version number.
16516 * object-internals.h: Reorganize layout of LocalBuilder.
16518 * class-internals.h class.c (mono_class_get_implemented_interfaces):
16519 New helper function.
16521 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
16522 created MonoType for dynamic types. Fixes #66180.
16524 2004-10-02 Ben Maurer <bmaurer@ximian.com>
16526 * threadpool.c: the ares hashtable needs a critical section around it.
16527 this prevents some nasty segfaults
16529 2004-10-02 Massimiliano Mantione <massi@ximian.com>
16531 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
16532 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
16535 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
16537 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
16539 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
16541 * image.c: Always canonicalize image file names, to avoid loading
16542 the same assembly twice when referenced using a relative path.
16544 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
16546 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
16548 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
16550 * marshal.c: Fix warnings.
16552 2004-09-29 Geoff Norton <gnorton@customerdna.com>
16554 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
16555 attempting to marshal the delegate_trampoline as the method_addr.
16556 This patch has a static hashtable of marshalled delegates so that
16557 we can map delegate_trampoline addresses back to delegates. This
16558 allows a delegate passed to managed code to be passed back into native
16561 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
16563 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
16565 * reflection.c (method_encode_code): Align method headers properly.
16568 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
16570 * marshal.c: In the runtime invoke wrapper, reset the abort
16571 exception if it is cached. This avoids the automatic rethrowal of
16572 the exception after the catch of the wrapper. Also check for pending
16573 interruptions before calling the managed method. This is done using
16574 the new method emit_thread_force_interrupt_checkpoint, since the
16575 normal checkpoint method is ignored when running the invoke wrapper.
16576 * object.c: If the abort exception is rethrown, set the abort_exc
16577 field of the thread, so it will be rethrown aftere every catch.
16578 * threadpool.c: Only run an interruption checkpoint if what has been
16579 requested is a stop of the thread (aborts will be ignored).
16580 * threads.c: By default, a thread will now never be interrumped while
16581 running the runtime invoke wrapper (this ensures that runtime_invoke
16582 will always return to the caller if an exception pointer is provided).
16583 There is a new special method mono_thread_force_interruption_checkpoint()
16584 to force an interruption checkpoint even if running a protected
16585 wrapper, which is used by the same runtime invoke wrapper to do a check
16588 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
16590 * object.c, object-internals.h: Implemented mono_release_type_locks,
16591 which releases the cctor locks held by a thread.
16592 * threads.c, threads.h: In thread_cleanup, release cctor locks held
16593 by a thread. Added mono_thread_exit() method to be used to safely stop
16596 2004-09-28 Raja R Harinath <rharinath@novell.com>
16598 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
16599 Move null check before dereference. Avoid indexing beyond the end
16600 of the 'modules' array.
16602 2004-09-28 Raja R Harinath <rharinath@novell.com>
16604 * metadata-internals.h (MonoImage): Add module_count field.
16605 * image.c (load_modules): Set image->module_count.
16606 (mono_image_load_file_for_image): Use image->module_count.
16607 * reflection.c (mono_image_load_module): Append to image->modules array
16608 of dynamic assembly.
16609 (mono_module_get_object): Fix loop to actually increment index.
16610 Use image->module_count.
16611 * assembly.c (mono_assembly_load_references): Use image->module_count.
16612 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
16615 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
16617 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
16618 Avoid assert on generic types.
16620 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
16622 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
16624 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
16626 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
16627 function to convert a MarshalSpec structure to its managed counterpart.
16629 * reflection.c: Fix warnings.
16631 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
16634 * icall.c (mono_create_icall_signature): Fix build.
16636 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
16638 * icall.c: Add MakePointType icall.
16640 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
16643 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16645 * threadpool.c: reuse allocated slots in the queue.
16647 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
16649 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
16651 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
16653 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
16656 * tabledefs.h: Add constants for pinvoke attributes BestFit and
16657 ThrowOnUnmappableChar.
16659 * icall.c (ves_icall_Type_GetPacking): New icall.
16661 2004-09-24 Martin Baulig <martin@ximian.com>
16663 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
16665 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16668 (mono_domain_set): allow setting a domain that is being unloaded.
16669 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
16672 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
16674 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
16675 the GetCustomAttributes icall.
16677 2004-09-23 Martin Baulig <martin@ximian.com>
16679 * object-internals.h (MonoReflectionGenericParam): Replaced
16680 'has_ctor_constraint', `has_reference_type' and `has_value_type'
16681 with `guint32 attrs'.
16683 2004-09-23 Martin Baulig <martin@ximian.com>
16685 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
16687 2004-09-23 Martin Baulig <martin@ximian.com>
16689 * object-internals.h (GenericParameterAttributes): New enum.
16691 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
16693 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
16695 * class.c (init_events): Fill out event->other field.
16697 * class.c: Fix warnings.
16699 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
16701 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
16703 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
16704 walk which doesn't supply the IL offset.
16706 2004-09-22 Martin Baulig <martin@ximian.com>
16708 * reflection.c (mono_reflection_setup_internal_class): If we're
16709 System.ValueType, System.Object or System.Enum, set
16710 `klass->instance_size' and create the vtable.
16711 (mono_reflection_create_internal_class): If we're an enum type,
16712 get the base class from our current corlib.
16714 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
16716 * reflection.h (MonoResolveTokenError): New type.
16718 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
16721 * icall.c: Add an 'error' argument to the ResolveToken icalls.
16723 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
16725 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
16726 Support also calling constructors, but only for already allocated objects.
16728 2004-09-17 Geoff Norton <gnorton@customerdna.com>
16730 * reflection.c (type_get_qualified_name): If the klass is null
16731 return the typename to avoid a NullRefEx.
16732 (encode_cattr_value): Get the qualified name of the boxed type,
16733 not the underlying enumtype. Fixes #62984.
16735 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
16737 * marshal.c: Fix problems with previous checkin.
16739 2004-09-21 <vargaz@freemail.hu>
16741 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
16742 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
16744 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
16746 2004-09-21 Geoff Norton <gnorton@customerdna.com>
16748 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
16749 should only return a type for pointers, arrays, and passbyref types.
16752 2004-09-21 Martin Baulig <martin@ximian.com>
16754 * domain.c (mono_debugger_check_runtime_version): New public
16757 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
16759 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
16761 * reflection.c: Added missing sort to the declarative security
16762 attributes table. MS implementation stops seeing the attributes if the
16763 token number regress in the table (as shown by ildasm and permview).
16765 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
16767 * object-internals.h (MonoReflectionModule): Add 'token' field.
16769 * reflection.c (mono_reflection_get_token): Add support for Module
16771 (mono_module_get_object): Set 'token' field.
16772 (mono_module_file_get_object): Set 'token' field.
16774 * icall.c: Add new Assembly and Module icalls.
16776 * appdomain.c: Bump corlib version.
16778 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
16780 * loader.h loader.c class.h class.c: Add helper functions for obtaining
16781 tokens of metadata objects.
16783 * reflection.h reflection.c (mono_reflection_get_token): New function
16784 to obtain the token of a metadata object.
16786 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
16788 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
16790 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
16792 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
16794 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
16796 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
16797 * object-internals.h: Added 3 MonoArray* members to MonoReflection
16798 AssemblyBuilder to access the permissions set in the class lib.
16799 * reflection.c: Added security attributes encoding step in
16800 mono_image_build_metadata.
16801 * tabledefs.h: Added new security actions defined in 2.0:
16802 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
16804 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
16806 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
16809 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
16811 * locales.c: nullify the ICU_collator member of CompareInfo when it is
16812 finalized. There where random SIGSEVs at program termination, when
16813 an object being finalized was trying to do a string comparison and
16814 the current culture was already finalized.
16816 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16818 * threads.c: call thread_cleanup before finishing the thread if we get
16821 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
16823 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
16824 assemblies from the parent. Fixes #65665.
16826 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
16828 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
16831 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
16833 * reflection.h: add prototype for mono_get_dbnull_object
16834 * reflection.c: add prototypes for get_default_param_value_blobs
16835 and mono_get_object_from_blob for fussier compilers
16837 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
16839 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
16840 false deadlock checks in class initialization.
16842 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
16844 * image.c (mono_image_addref): Fix comment.
16846 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
16849 2004-09-12 Jambunathan K <kjambunathan@novell.com>
16851 * reflection.c (mono_param_get_objects): Modified to return
16852 ParameterInfo.DefaultValue object.
16854 (get_default_param_value_blobs):
16855 (mono_get_object_from_blob):
16856 (mono_get_dbnull_object): New helper routines.
16858 * object.c (mono_get_constant_value_from_blob): New helper routine
16859 carved out from get_default_field_value ()
16861 * object-internals.h (mono_get_constant_value_from_blob): Added
16862 function declaration.
16864 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
16866 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
16867 referenced assemblies. Fixes #62135.
16869 * exception.h exception.c (mono_get_exception_file_not_found2): New
16872 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
16874 * class.h class.c: Add mono_type_get_underlying_type ().
16876 2004-09-09 Geoff Norton <gnorton@customerndna.com>
16878 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
16879 Fix GetTypes() to support dynamically created assemblies.
16881 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
16883 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
16885 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
16888 * reflection.h reflection.c loader.c: Allow dynamic construction of
16889 pinvoke methods. Fixes #65571.
16891 * reflection.c (mono_reflection_get_type): Revert previous change since
16892 it causes regressions.
16894 2004-09-08 Martin Baulig <martin@ximian.com>
16896 * class.c (class_compute_field_layout): Don't call
16897 mono_class_layout_fields() for open generic instances.
16899 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
16900 * threads.c appdomain.c: fix typo in GC macro
16902 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16904 * threads.c: don't call mono_thread_detach() in start_wrapper(),
16905 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
16907 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
16909 * image.c (mono_image_close): Applied patch from
16910 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
16911 assembly is loaded multiple times from data.
16913 * image.c (mono_image_open): Fix warning.
16915 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
16917 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
16918 once. Fixes #58334.
16920 * reflection.c (mono_reflection_create_runtime_class): Initialize
16921 klass->nested_classes. Fixes #61224.
16923 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
16925 * threads.c: sched_yield() on exit, to allow threads to quit.
16927 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
16929 * object.c (mono_unhandled_exception): Remove leftover debug code.
16931 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
16933 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
16935 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
16937 * marshal.c (emit_marshal_array): Really null terminate string arrays.
16939 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
16941 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
16943 * marshal.c (emit_marshal_array): Null terminate string arrays.
16945 * marshal.c (raise_auto_layout_exception): Fix warning.
16947 * reflection.c (mono_param_get_objects): Initialize the default value
16948 with DBNull.Value, not null. Fixes #62123.
16950 2004-09-01 Miguel de Icaza <miguel@ximian.com>
16952 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
16953 throw an exception with a cute explanation.
16955 2004-09-06 Dick Porter <dick@ximian.com>
16957 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
16958 Close the new process's thread handle, as we don't use it. The
16959 handle stays around forever otherwise.
16961 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
16963 * object.c (arith_overflow): Fix warning.
16965 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
16966 calling conventions in method refs. Fixes #65352.
16968 * reflection.c: Fix warnings.
16970 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
16972 * icall.c: Add a new icall for Array.Clear
16974 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
16976 * object.c: When allocating an array, we have to throw
16977 an overflow exception if any of the lengths are < 0.
16979 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
16981 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
16982 properly. Also move implementation of string array marshalling to
16983 managed code. Fixes #42316.
16985 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16987 * assembly.c: provide more information when loading an assembly fails.
16989 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16991 * filewatcher.c: don't expect the development fam package to be
16994 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
16996 * marshal.c: Make a copy of the signature cookie since it will be
16997 freed by the caller.
16999 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
17001 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
17003 * metadata.c (mono_metadata_free_marshal_spec): New function to free
17006 * marshal.c: More refactoring.
17008 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
17011 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
17013 * object.c: In mono_message_invoke, fill the output parameter array after
17014 calling the managed method (it was done before the call). This fixes
17017 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
17019 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
17022 2004-09-02 Martin Baulig <martin@ximian.com>
17024 * class.c (mono_class_instance_size): Don't allow generic type
17025 definitions or open generic instances.
17026 (mono_class_array_element_size): If we're a value type, call
17027 mono_class_instance_size() on the original class.
17029 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
17030 handle generic instances.
17032 * mono-debug-debugger.c (write_type): Handle generic instances
17035 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
17037 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
17038 the allocation request fails. Fixes #65089.
17040 * object.c (mono_runtime_free_method): Do not call mono_free_method.
17042 * object.c (mono_runtime_free_method): New function to free a dynamic
17045 * marshal.c (mono_delegate_free_ftnptr): New function to free the
17046 delegate trampoline.
17048 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
17049 with hasthis as dynamic,
17051 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
17053 * domain.c (mono_jit_info_table_remove): New function to remove an
17054 entry from the jit info table.
17056 * class-internals.h (MonoMethod): Add 'dynamic' field.
17058 * loader.c: Fix warnings.
17060 2004-09-01 Martin Baulig <martin@ximian.com>
17062 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
17063 instead of mono_debugger_lock() because the latter one is a no-op
17064 unless running in the debugger.
17066 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
17068 * class.c (class_compute_field_layout): Classes with auto-layout or
17069 reference fields are not blittable.
17071 2004-09-01 Dick Porter <dick@ximian.com>
17073 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
17074 mono_image_get_filename() to get the assembly location.
17077 * metadata.h: Fix compile warnings
17079 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
17081 * class.c (class_compute_field_layout): System.Object is blittable.
17083 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
17084 as in/out. Fixes #59909.
17086 2004-09-01 Martin Baulig <martin@ximian.com>
17088 * metadata.h (MONO_TYPE_ISREFERENCE): Call
17089 mono_metadata_generic_inst_is_valuetype() if we're a generic
17090 instance to check whether our underlying type is a reference type.
17092 2004-09-01 Martin Baulig <martin@ximian.com>
17094 * metadata.c (mono_type_size): If we're a generic instance, call
17095 mono_class_value_size() for value types.
17097 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
17099 * marshal.c: Implement more custom marshalling functionality. Fixes
17102 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
17104 * mono-debug.c, debug-mono-symfile.c: add some locking love.
17106 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
17108 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
17110 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
17112 * icall.c: Fix some warnings.
17114 * threads.c (abort_appdomain_thread): Fix unref errors.
17115 (mono_thread_current): Fix THREAD_DEBUG define.
17117 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
17119 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
17121 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
17123 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
17125 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
17128 2004-08-28 Martin Baulig <martin@ximian.com>
17131 (mono_metadata_generic_inst_is_valuetype): New public function.
17133 * metadata.h (MONO_TYPE_ISSTRUCT): Call
17134 mono_metadata_generic_inst_is_valuetype() if we're a generic
17135 instance to check whether our underlying type is a valuetype.
17137 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
17139 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
17142 2004-08-25 Martin Baulig <martin@ximian.com>
17144 * loader.c (mono_get_method_from_token): Abstract methods can also
17145 be generic and thus have type parameters.
17147 * metadata-internals.h
17148 (MonoDynamicImage): Added `GPtrArray *gen_params'.
17150 * reflection.c (mono_image_get_generic_param_info): Don't create a
17151 metadata row, just add an entry to the `gen_params' array.
17152 (build_compressed_metadata): Sort the `gen_params' array and then
17153 actually create the metadata.
17155 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17157 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
17159 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
17161 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
17163 2004-08-24 Martin Baulig <martin@ximian.com>
17165 * class.cs (mono_class_is_subclass_of): Like an interface, a
17166 generic instance also derives from System.Object.
17168 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
17170 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
17171 custom modifiers to be in any order. Fixes #61990.
17173 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
17175 * object.c: Register mono_object_new_fast icall.
17177 * object.c (mono_class_get_allocation_ftn): Return to calling
17178 mono_object_new_fast, since it seems faster to compute the object
17179 size in unmanaged code than passing it as a parameter.
17181 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
17183 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
17184 this function with Boehm as the oom handler, so we don't have to check
17185 the result of GC_malloc.
17187 * object.c: Remove checks for oom.
17189 * object.h object.c (mono_class_get_allocation_ftn): New function to
17190 return the icall which can be used to allocate an instance of a given
17193 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
17195 * class-internals.h: Add 'enabled' field.
17197 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
17199 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
17201 2004-08-18 Jambunathan K <kjambunathan@novell.com>
17202 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
17205 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
17207 * appdomain.c: use the Tls function for appdomain too,
17208 at Zoltan's request. Actually return in mono_context_get
17210 * appdomain.c, profiler.c, threads.c: use __thread
17212 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
17214 * appdomain.c threads.c: Call GC_CreateThread on windows.
17216 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
17217 multiple libraries since this don't work on windows.
17219 2004-08-18 Martin Baulig <martin@ximian.com>
17221 * class-internals.h
17222 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
17225 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
17226 MonoMethodNormal since we also need it for abstract and interface
17230 (build_compressed_metadata): Sort the GenericParam table.
17231 (mono_image_create_token): Added `gboolean create_methodspec'
17232 argument; this is false when generating a MethodImpl token.
17233 (reflection_methodbuilder_to_mono_method): Abstract and interface
17234 methods may also have generic parameters.
17236 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
17238 * appdomain.c: thread local alloc
17240 2004-08-17 Martin Baulig <martin@ximian.com>
17242 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
17245 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
17248 * class.c (mono_type_get_full_name): New public function.
17249 (mono_type_get_name): Don't include the type arguments.
17251 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
17253 * Makefile.am: Build static versions of libmetadata and libmonoruntime
17254 for inclusion into the mono executable.
17256 2004-08-16 Martin Baulig <martin@ximian.com>
17258 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
17259 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
17261 2004-08-14 Martin Baulig <martin@ximian.com>
17263 * class.c (dup_type): Also copy the `byref' field.
17265 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
17267 * reflection.c (create_dynamic_mono_image): Revert the last change
17268 since it breaks bootstrap.
17270 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
17272 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
17274 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
17275 not free them with g_free.
17277 2004-08-11 Martin Baulig <martin@ximian.com>
17279 * reflection.c (mono_reflection_setup_internal_class): Also call
17280 mono_class_setup_mono_type() if we already have a `tb->type.type'.
17282 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
17284 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
17285 called during default (first) AppDomain creation. Keep track of
17286 Evidence when loading assemblies.
17288 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
17290 * opcodes.c, opcodes.h: reduce runtime relocations.
17292 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
17294 * culture-info.h, locales.c: fixes and chages to sue the new
17295 optimized format of the locale data.
17296 * culture-info-tables.h: regenerated.
17298 2004-08-06 Geoff Norton <gnorton@customerdna.com>
17300 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
17302 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
17304 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
17305 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
17306 * domain-internals.h: icall declaration.
17307 * icall.c: icall registration.
17308 * object-internals.h: New fields in MonoAssembly for CAS.
17310 2004-08-05 Duncan Mak <duncan@ximian.com>
17312 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
17315 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
17317 * reflection.c: fix to deal with object[] arrays in custom ctors
17320 2004-08-05 Martin Baulig <martin@ximian.com>
17322 * class.c (mono_class_array_element_size): Added support for
17323 generic instances and correctly handle "recursive" types.
17325 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
17327 * assembly.c: Fix warnings.
17329 2004-08-04 Martin Baulig <martin@ximian.com>
17332 (mono_type_get_name_recurse): Added `gboolean include_arity'
17333 argument specifying whether or not we should include the generic
17334 arity in the type name.
17335 (_mono_type_get_name): New static function.
17336 (mono_class_setup_vtable): If we're a generic instance, don't
17337 include the generic arity in the names of explicit method
17340 2004-08-03 Martin Baulig <martin@ximian.com>
17342 * class.c (mono_type_get_name_recurse): Enclose the generic type
17343 arguments in `<', '>'.
17345 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
17347 * gc.c: make GC warning messages use the trace API, they are just
17348 noise to most of the users.
17350 2004-08-03 Martin Baulig <martin@ximian.com>
17352 * debug-mono-symfile.c (read_string): Correctly read the string.
17354 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
17356 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
17358 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
17360 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
17362 2004-07-30 Martin Baulig <martin@ximian.com>
17364 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
17365 Reflect latest symbol writer changes.
17367 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
17369 * object.c: always create an object if null is passed
17370 to Invoke() where a valuetype is expected.
17372 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
17374 * marshal.c (mono_marshal_init): make managed
17375 signatures match native ones better for 64bits.
17377 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17379 * appdomain.c: hack to build correctly the private bin path on windows.
17382 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
17384 * assembly.c: Load mscorlib from the correct framework directory
17385 (mono/<version>/mscorlib.dll).
17386 * appdomain.h: Added prototypes for new functions.
17387 * internals.h: Added some prototypes.
17388 * domain.c: When initializing the runtime, get from the executable and
17389 the configuration files the runtime version that the app supports.
17390 Added support methods for reading app.exe.config. Added list of versions
17391 supported by the JIT. Added two new methods: mono_init_from_assembly,
17392 which initializes the runtime and determines the required version from
17393 the provided exe file, and mono_init_version, which initializes
17394 the runtime using the provided version.
17395 * icall.c: Get machine.config from version-specific directory.
17396 * reflection.c: When generating an image, embed the version number
17397 of the current runtime.
17399 2004-07-28 Dick Porter <dick@ximian.com>
17402 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
17403 returned sockaddr size before creating the remote address object.
17404 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
17407 2004-07-28 Dick Porter <dick@ximian.com>
17409 * locales.c (string_invariant_compare_char): Fix invariant char
17410 compares between upper and lower cases. Fixes bug 61458.
17412 2004-07-27 Ben Maurer <bmaurer@ximain.com>
17414 * marshal.c: actually cache stelem.ref wrappers.
17416 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
17418 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
17419 sections and remove the mono_cli_rva_map () function.
17421 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
17423 * debug-mono-symfile.c: fix one more endianess issue, from a patch
17424 by Geoff Norton (<gnorton@customerdna.com>).
17426 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
17428 * class.c: fix class loads for pointer types (typeof(int) !=
17431 2004-07-27 Martin Baulig <martin@ximian.com>
17433 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
17434 reading the debugging information from an external ".mdb" file.
17436 2004-07-24 Martin Baulig <martin@ximian.com>
17438 * reflection.c (mono_image_get_type_info): Only write a class
17439 layout entry if we actually have a size or a packing size.
17441 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
17443 * reflection.c (type_get_fully_qualified_name):
17444 insert cast to get type checking of ?: with non-gcc compilers
17446 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
17448 * rand.c: use g_getenv for both lookups of
17451 2004-07-17 Martin Baulig <martin@ximian.com>
17453 * reflection.c (mono_reflection_bind_generic_method_parameters):
17454 Set `gmethod->reflection_info'.
17456 2004-07-17 Martin Baulig <martin@ximian.com>
17458 * class.c (mono_class_create_from_typedef): Insert the newly
17459 created class into the hash table before computing the interfaces
17460 since we could be called recursively.
17462 2004-07-16 Ben Maurer <bmaurer@ximain.com>
17464 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
17465 function to implement stelem.ref in managed code
17466 * class-internals.h, debug-helpers.c: a new wrapper type
17469 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
17471 * gc.c: allow GC handles to work even when no GC is compiled in.
17472 Fix part of bug #61134 (GetAddrOfPinnedObject).
17474 2004-07-13 Peter Williams <peter@newton.cx>
17476 * process.c (complete_path): Make sure we don't attempt to execute
17479 2004-07-12 Geoff Norton <gnorton@customerdna.com>
17481 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
17482 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
17483 and will add/subtract the hour if needed
17485 2004-07-12 Martin Baulig <martin@ximian.com>
17487 * reflection.c (mono_field_get_object): If we have
17488 `field->generic_info', take the attributes from
17489 `field->generic_info->generic_type'.
17491 2004-07-12 Martin Baulig <martin@ximian.com>
17493 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
17494 This function must be called before initializing the runtime.
17495 (mono_debug_init_1): New function; call this after initializing
17496 the runtime, but before loading the assembly. It tells the
17497 debugger to load corlib and the builtin types.
17499 * mono-debug-debugger.c: Did some larger changes in the debugging
17500 code; support recursive class declarations, make sure we actually
17503 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17505 * debug-helpers.c: undo my previous patch and fixed the real issue in
17506 ../mini/exceptions-x86.c
17508 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17510 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
17511 when no HOME env. variable was set and a NullRef was thrown in a .cctor
17512 called from other .cctors.
17514 2004-07-09 Miguel de Icaza <miguel@ximian.com>
17516 * loader.c: Removed the mono_loader_wine_init hack now that we are
17517 doing a managed version of Windows.Forms.
17519 2004-07-09 Ben Maurer <bmaurer@ximian.com>
17521 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
17522 threadpool.c, threads.c: remove static data from rootset.
17524 2004-07-09 Dick Porter <dick@ximian.com>
17526 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
17527 Don't do any more processing if the matched length was 0. It was
17528 increasing the size of the string before. Fixes bug 61167.
17530 2004-07-09 Dick Porter <dick@ximian.com>
17534 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
17535 Add support for SO_PEERCRED if its available.
17537 2004-07-09 Peter Bartok <pbartok@novell.com>
17538 * loader.c: winelib.exe.so error message is now only displayed if
17539 MONO_DEBUG is set. To help us avoid questions when people are trying
17540 out the new Managed.Windows.Forms.
17542 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
17544 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
17545 for isinst and castclass wrappers.
17547 * class-internals.h icall.c: Move registration and lookup of JIT icalls
17548 to libmetadata from the JIT, so they could be used by the marshalling
17549 code and the interpreter.
17551 * marshal.c: Register marshalling related JIT icalls here instead of
17552 in mini.c. Use CEE_MONO_ICALL instead of the family of
17553 CEE_MONO_PROC<x> opcodes to call marshalling functions.
17555 * metadata.h: Remove unneeded marshalling conversions.
17557 * opcodes.c: Update for new opcodes.
17559 2004-07-08 Martin Baulig <martin@ximian.com>
17561 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
17562 (mono_debug_get_domain_data): Make this function static.
17564 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
17566 * gc.c, object.h: add nice GC handle API for embedders.
17568 2004-07-06 Ben Maurer <bmaurer@ximian.com>
17570 * reflection.c: more changes for the new api
17572 * object.c: When we reflect on a field w/ a constant value, it
17573 will not have a memory location, so we must access metadata. Also,
17574 allow easier reading of strings so that we can read them from
17577 * class.c (mono_class_layout_fields): no need for literal fields here.
17579 * class-internals.h: api changes for const fields
17581 * icall.c (ves_icall_get_enum_info): use new apis for const fields
17583 2004-07-06 Martin Baulig <martin@ximian.com>
17585 * mono-debug.h: Increment version number to 44.
17587 * mono-debug.c (mono_debug_add_wrapper): The second argument is
17588 now a gpointer, rewrote this whole method.
17590 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
17591 function. Add information about the wrapper in a new "misc table".
17593 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
17594 for the new misc table.
17596 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
17598 * metadata-internals.h image.c: Add a cache for helper signatures.
17600 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
17602 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
17604 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
17605 delegates from a delegate. Fixes #61033.
17607 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
17608 marshalling of stringbuilder arrays. Fixes #59900.
17610 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
17612 * icall.c: Add EnumBuilder:setup_enum_type icall.
17614 2004-06-30 Ben Maurer <bmaurer@ximian.com>
17616 * icall.c: Added a new icall for the property version of
17617 OffsetOfStringData.
17619 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
17621 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
17622 it has a constant size across platforms.
17624 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
17627 2004-06-29 Martin Baulig <martin@ximian.com>
17629 * mono-debug.c (mono_debug_add_method): Protect the whole function
17630 in mono_debugger_lock(), not just parts of it.
17632 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
17634 * reflection.c: make sure padding bytes in heaps are zeroed.
17636 2004-06-24 David Waite <mass@akuma.org>
17638 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
17639 image.c, loader.c, locales.c, marshal.c, metadata.c,
17640 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
17641 string-icalls.c, threads.c: change to C90-style comments from C99 /
17644 2004-06-24 Dick Porter <dick@ximian.com>
17647 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
17648 return createdNew. Fixes bug 60412.
17651 * icall.c: Add createdNew parameter to CreateMutex icall
17653 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
17655 * reflection.c, object-internals.h: save default value in params.
17657 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17659 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
17660 no need to build a new path combining that with the application base.
17663 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
17665 * reflection.c: fixed minor standard compliance issues.
17667 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
17669 * reflection.c: fixed issue with encoding some custom attributes
17670 (arrays in properties and fields, bug #60411).
17672 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17674 * reflection.c: fix start address when copying the public key token.
17676 2004-06-23 Martin Baulig <martin@ximian.com>
17678 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
17679 the `exc' object in a static object to put it into the GC's root set.
17681 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
17683 * reflection.c: make mono_reflection_setup_internal_class ()
17684 callable a second time to setup a new parent class.
17686 2004-06-23 Dick Porter <dick@ximian.com>
17688 * threads.c: Check for WAIT_IO_COMPLETION return values.
17690 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
17692 * appdomain.c: Removed the g_free on the public key token. Now copy
17693 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
17694 * assembly.c: Added public key token string value when loading
17695 assemblies. Fix bug #60439.
17696 * icall.c: Added missing informations (like public key) in
17697 GetReferencedAssemblies. Fix #60519.
17698 * image.h: Changed definition for public key token from const char*
17699 public_tok_value to guchar public_key_token [17];
17700 * reflection.c: Updated for changes to public key token.
17702 2004-06-22 Lluis Sanchez Gual
17704 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
17705 for the field in base classes.
17707 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
17709 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
17710 mark headers as not supported, they are installed only for use by the
17713 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
17715 * *.c, *.h: avoid namespace pollution in public headers.
17717 2004-06-21 Martin Baulig <martin@ximian.com>
17719 * exception.c (mono_get_exception_security): It's in
17720 "System.Security", not in "System".
17722 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
17723 the exception classes.
17725 2004-06-21 Martin Baulig <martin@ximian.com>
17727 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
17728 Protect the exception object from being finalized.
17730 2004-06-21 Martin Baulig <martin@ximian.com>
17732 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
17735 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
17737 * reflection.c: Load the assembly in mono_reflection_type_from_name,
17738 if it was not loaded before. Fix parts of #60439.
17740 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
17742 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
17743 code that was broken since Ben's change: wrappers are now
17744 dependent on the method signature only again.
17746 2004-06-21 Martin Baulig <martin@ximian.com>
17748 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
17749 added interface support.
17751 2004-06-21 Martin Baulig <martin@ximian.com>
17753 * class.c (mono_vtable_get_static_field_data): New public method.
17755 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
17757 * filewatcher.c : Windows build fix to be compliant with API changes.
17759 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
17761 * class.h, class.c: more accessors.
17762 * metadata.h, metadata.c: prepare for hiding MonoType and
17763 MonoMethodSignature: people should use the accessors from now on
17764 outside of the tree.
17766 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
17768 * *.c, *.h: more API cleanups.
17770 2004-06-18 Jackson Harper <jackson@ximian.com>
17772 * assembly.c: Trace loading assemblies.
17773 * loader.c: Trace loading native libraries.
17774 * mono-config.c: Trace loading config files.
17776 2004-06-18 Dick Porter <dick@ximian.com>
17778 * locales.c: Tell ICU the lengths of strings, it can cope with
17779 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
17781 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
17783 * image.c: swapped name/filename;
17785 2004-06-18 Martin Baulig <martin@ximian.com>
17787 * mono-debug-debugger.c (write_class): Write the parent class at
17788 the end of the header.
17790 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
17792 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
17794 2004-06-17 Raja R Harinath <rharinath@novell.com>
17796 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
17797 (bundle_obj): New conditional define.
17798 (BUILT_SOURCES): Remove.
17799 ($(bundle_srcs)): Make parallel-make safe.
17800 (libmonoruntime_la_LIBADD): Make unconditional.
17801 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
17802 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
17804 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
17806 * culture-info-tables.h: It was inconsistent with the latest
17809 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
17811 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
17814 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
17817 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
17819 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
17820 cleaned up public header threads.h.
17822 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
17824 * Makefile.am, *.c, *.h: more API cleanups.
17826 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
17828 * Makefile.am: removed monosn from compilation.
17829 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
17830 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
17831 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
17832 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
17833 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
17834 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
17836 2004-06-15 Jackson Harper <jackson@ximian.com>
17838 * assembly.c: Make locales lower case when searching the GAC for
17839 assemblies. gacutil will always make locales lowercase when
17840 installing so this effectively makes them case insensitive.
17842 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
17844 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
17845 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
17846 parameter which allows to choose whether the wait can be interrupted or
17847 not. Also added the method mono_monitor_enter(), which locks the monitor
17848 using an infinite wait and without allowing interruption.
17849 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
17851 * object.h: Added new fields in MonoThread. suspend_event holds the event
17852 used to susped/resume the thread. synch_lock is the lock object to use for
17853 modifying the thread state.
17854 * threads.c: Use the new synch_lock object for locking, instead of "this",
17855 which can generate deadlocks.
17856 Moved thread state change in Thread.Sleep and Thread.Join from managed
17857 to unmanaged code. This avoids a deadlock when the thread was suspended
17858 just after acquiring the thread lock.
17859 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
17860 Implemented Thread.Suspend using an event instead of ThreadSuspend,
17861 which is not fully implemented in the io-layer.
17862 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
17864 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
17866 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
17867 threads-types.h: more API cleanups.
17869 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
17871 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
17872 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
17873 threadpool.c, threads.c: first pass at the exported API cleanup.
17875 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
17877 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
17879 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17881 * icall.c: added internalGetHome.
17883 2004-06-14 Dick Porter <dick@ximian.com>
17885 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
17886 possible to return successfully when '.' or '..' were the only
17887 entries in a directory, but were skipped. The MonoIOStat was not
17888 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
17891 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
17893 * reflection.c: make binaries run on .Net 1.1 by default.
17895 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
17897 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
17899 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
17901 * marshal.c: keep track of struct size with explicit layout
17904 2004-06-12 Martin Baulig <martin@ximian.com>
17906 * mono-debug-debugger.c: Comment out a debugging g_message().
17908 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
17910 * reflection.c, reflection.h: do not free custom attrs that are cached.
17911 * icall.c: use braces to make code clearer.
17913 2004-06-11 Martin Baulig <martin@ximian.com>
17915 * class.h (MonoInflatedField): New type.
17916 (MonoClassField): Replaced `MonoType *generic_type' with
17917 `MonoInflatedField *generic_info'.
17920 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
17922 2004-06-11 Martin Baulig <martin@ximian.com>
17924 * reflection.c (mono_image_create_method_token): Correctly encode
17927 2004-06-11 Martin Baulig <martin@ximian.com>
17929 * metadata.c (mono_metadata_parse_method_signature): When parsing
17930 a MethodDef which has VarArgs, also set sentinelpos if we don't
17931 have any parameters.
17933 2004-06-11 Martin Baulig <martin@ximian.com>
17935 * verify.c (mono_method_verify): In CEE_CALL, use
17936 mono_method_get_signature() to get the method's signature, unless
17937 we're a PInvoke method.
17939 2004-06-10 Jackson Harper <jackson@ximian.com>
17941 * assembly.c: Use <path>/lib/mono/gac for the extra paths
17942 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
17943 logical name as the supplied path is just a prefix to the gac not
17944 the direct path to it.
17946 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
17948 * reflection.c: make the token for a created method match
17949 the token of the MethodBuilder it was created from
17950 (IKVM requires this behaviour now).
17952 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
17954 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
17955 reflection.c, socket-io.c: leak fixes.
17957 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
17959 * icall.c: handle sentinel pos in vararg methods in position different
17962 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17964 * culture-info-tables.h: freshly generated.
17966 2004-06-09 Martin Baulig <martin@ximian.com>
17968 * loader.c (mono_get_method_constrained): Call `mono_class_init
17969 (constrained_class)'.
17971 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
17973 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
17974 any methods. Fixes #59629.
17976 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
17978 * culture-info-tables.h: reflecting locale-builder updates.
17980 2004-06-08 Dick Porter <dick@ximian.com>
17983 * locales.c: Fixed compile warnings, including a real bug in
17984 CompareInfo_internal_compare.
17986 2004-06-08 Dick Porter <dick@ximian.com>
17989 (ves_icall_System_Globalization_CompareInfo_internal_index):
17990 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
17991 Double-check the resuls of usearches, because ICU currently
17992 ignores most of the collator settings here. Fixes bug 59720.
17994 2004-06-08 Dick Porter <dick@ximian.com>
17997 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
17998 Fix memory leak and segfault-causing typo. No idea how this one
17999 lasted so long without being noticed.
18001 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
18003 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
18004 any methods. Fixes #59629.
18006 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18009 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
18010 own the critical section before). Removed dead code (that's done
18011 in the preload hook).
18013 (mono_assembly_load_with_partial_name): call the preload hook.
18015 2004-06-08 Martin Baulig <martin@ximian.com>
18017 * metadata.c (mono_metadata_signature_alloc): Default
18018 `sentinelpos' to -1.
18020 * reflection.c (mono_image_get_array_token): Likewise.
18022 2004-06-08 Martin Baulig <martin@ximian.com>
18024 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
18026 * metadata.c (mono_metadata_parse_method_signature): When parsing
18027 a MethodDef which has VarArgs, set sentinelpos.
18029 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
18030 `gint16' since we're using -1 for non-varargs methods.
18033 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
18034 (method_encode_signature): Added varargs support.
18035 (method_builder_encode_signature): Likewise.
18036 (mono_image_get_varargs_method_token): New static method.
18037 (mono_image_create_method_token): New public method; this is
18038 called via an icall instead of mono_image_create_token() when
18039 calling a varargs method.
18041 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
18043 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
18045 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
18047 * culture-info-tables.h : Reflecting the latest locale-builder that
18048 fixed empty array representation ({} to {0}).
18050 2004-06-07 Jackson Harper <jackson@ximian.com>
18052 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
18053 looking up extra gac paths. This allows MONO_GAC_PATH to act
18054 exactly like a prefix.
18056 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
18058 * reflection.c (mono_reflection_type_from_name): Make a copy of the
18059 type name before modifying it. Fixes #59405.
18061 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
18063 * culture-info.h: added fields for "all datetime patterns".
18064 * locales.c: ( ves_icall_System_Globalization_CultureInfo
18065 _construct_datetime_format ()): fill xxx_patterns fields.
18066 * object.h: added fields for "all datetime patterns" to
18067 MonoDateTimeFormatInfo.
18068 * culture-info-tables.h: reflecting locale-builder updates.
18070 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
18072 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
18073 the event has no add and remove methods. Fixes #59629.
18075 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
18077 * object.c: Fixed possible integer overflow when allocating large
18080 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
18082 * culture-info-tables.h: reflecting locale-builder updates.
18084 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
18086 * culture-info-tables.h: reflecting locale-builder updates.
18088 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
18090 * culture-info-tables.h: reflecting locale-builder updates.
18092 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
18094 * threads.c: Made Thread.Sleep abortable.
18096 2004-06-02 Martin Baulig <martin@ximian.com>
18098 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
18100 * debug-mono-symfile.h: Bumped symbol file version number to 37.
18102 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
18104 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
18106 2004-05-30 Jackson Harper <jackson@ximian.com>
18108 * reflection.c: Do not hardcode assembly versions or public key
18109 tokens anymore. All of this except the corlib section was dead
18112 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
18114 * object.c (mono_runtime_invoke_array): Automatically create boxed
18115 objects for byref valuetypes if needed. Fixes #59300.
18117 * object.c (mono_method_return_message_restore): Handle
18118 MONO_TYPE_OBJECT as well.
18120 2004-05-28 Jackson Harper <jackson@ximian.com>
18122 * reflection.c: The modified type encoding was causing build
18123 problems. Reverted for now.
18125 2004-05-28 Jackson Harper <jackson@ximian.com>
18127 * reflection.c/h: Take an assembly ref so that we dont create
18128 fully qualified names when encoding types in the same assembly as
18129 the custom attribute being emitted.
18130 * appdomain.c: Increment version number.
18132 2004-05-26 Duncan Mak <duncan@ximian.com>
18135 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
18136 Set the full version number (major, minor, build, revision).
18138 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
18140 * marshal.c (emit_struct_conv): increment src/dst after blit
18141 (mono_marshal_get_managed_wrapper,
18142 mono_marshal_get_native_wrapper): make sure we have marshalling
18143 info before marshalling params (info computation affects
18146 * class.c (class_compute_field_layout): correctly deal with
18148 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
18149 value types (as per what windows dows by default)
18150 (mono_class_setup_mono_type): System.ValueType is blittable
18151 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
18154 * marshal.c (mono_marshal_load_type_info): flag types as
18155 non-blittable if the native layout doesn't match the managed
18158 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18160 * appdomain.c: don't add stuff in the private search path that is
18161 above the application base. If application base is not set, there's
18162 no private search path.
18164 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
18166 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
18167 byref struct arguments in native->managed marshalling.
18169 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
18171 * marshal.c (mono_marshal_get_runtime_invoke): correctly
18172 cache methods using signature (special case for methods
18173 that are value type or string class)
18175 * image.c (mono_image_close): clean up allocated GSList's
18176 in runtime_invoke_cache.
18178 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18180 * mono-config.c: set the correct path for mono_cfg_dir on windows when
18181 there's no MONO_CFG_DIR environment variable defined.
18183 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18185 * threads.c: windows version must be >= 0x0500 to include OpenThread.
18187 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
18189 * threadpool.c: Really wait for 500ms after the async call, even if the wait
18191 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
18192 before waiting for it, and call CloseHandle after the wait to unref it.
18193 This will make sure that handles are not disposed too early.
18195 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18200 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
18203 * object.c: se the application_base only for the domain that runs
18204 Main. Fixes bug #59216,
18206 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18209 * object.c: only the domain in which Main is run have
18210 SetupInformation.ConfigurationFile set, so moved a few lines from
18211 appdomain.c to object.c.
18213 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18215 * appdomain.c: we tried to load [name].(dll|exe), but according
18216 to bug #57710, we must also try [culture]/[name].(dll|exe) and
18217 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
18218 There's a test case attached to bug #58922.
18220 2004-05-27 Dick Porter <dick@ximian.com>
18223 * file-io.c: Implemented icalls for locking and unlocking regions
18225 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
18226 FALSE on error (fixes both compiler warning and real bug.)
18228 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
18230 * culture-info-tables.h: reflecting locale-builder updates.
18232 (Added missing ChangeLog entry for 05/26)
18234 2004-05-27 Jackson Harper <jackson@ximian.com>
18236 * locales.c: Fix some cut and paste errors.
18238 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18240 * mono-config.c: set the correct path for config. directory on windows.
18242 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
18244 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
18247 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
18249 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
18250 from pinvoke functions.
18252 * marshal.c (mono_ftnptr_to_delegate): Implement this.
18254 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
18256 * culture-info-tables.h: reflecting locale-builder updates.
18258 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
18260 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
18263 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
18265 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
18266 * icall.c: Modified icalls for RNG.
18267 * rand.c|h: Changed RNG interface to allow thread-safe usage under
18268 Windows (CryptoAPI).
18270 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
18272 * locales.c: Fix build.
18274 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
18276 * culture-info-tables.h: reflecting locale-builder updates.
18278 2004-05-25 Jackson Harper <jackson@ximian.com>
18280 * locales.c: When creating the current culture use the $LANGs
18281 specific culture. So DateTimeFormat and NumberFormat entries are created.
18283 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
18285 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
18286 a char array as parameter.
18288 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
18290 * image.c: In mono_image_open(), always use an absolute path name to
18291 look for already loaded images.
18293 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
18295 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
18296 missing in the windows build (like older cygwin include files).
18298 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
18300 * icall.c: Fixed check for possible integer overflow in Buffer_
18301 BlockCopy icall. Replaced comments style // by /* */.
18303 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
18305 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
18307 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
18308 check after MONO_VTADDR. Fixes pinvoke2.exe.
18310 * marshal.h marshal.c metadata.h: Add beginnings of support for
18311 ftnptr -> delegate marshalling.
18313 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
18315 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
18316 * threads.c: Fix warnings.
18318 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
18320 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
18321 * icall.c: Registered icalls for Suspend and Resume.
18322 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
18324 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
18325 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
18326 * process.c: Use WaitForSingleObjectEx.
18327 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
18329 * threads.c, threads.h: Make use of new Ex wait methods. Improved
18330 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
18331 for Suspend and Resume. Added new mono_thread_stop, used for stoping
18332 background threads. Added basic support for Abort in Windows.
18333 Start new threads using a managed delegate invoke wrapper. This wrapper
18334 has an interruption checkpoint that is needed since an interruption
18335 can be requested before the thread leaves the unmanaged code that starts
18337 * marshal.c: Added interruption checkpoint after every native call, and
18338 also before managed calls for wrappers called from unmanaged code to
18339 go into managed code.
18340 * object.h: Added new field in MonoThread to keep track of interruption
18343 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
18345 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
18348 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18355 * rand.c: getenv -> g_getenv (windows!)
18357 * process.c: complete_path is also used on non-windows platforms.
18359 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18361 * icall.c: new signature for Process_Start.
18363 * process.[ch]: new signature for Process_Start. If we're on windows
18364 and UseShellExecute is false, we have to search for the program by
18365 ourselves if we don't get a full path.
18367 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
18369 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
18370 marshalling and call CleanUpNativeData if needed. Fixes #58646.
18372 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18374 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
18377 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18379 * process.c: use double quotes to quote program name and arguments on
18380 windows. Fixes bug #58575.
18382 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18384 * file-io.c: don't return "." and ".." when using windows Find*File.
18386 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
18388 * marshal.c: Don't pass wrappers to message init because method
18389 addressed used to lookup metadata. part of remoting[2|3] fix.
18391 2004-05-15 Jackson Harper <jackson@ximian.com>
18393 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
18394 path is essentially the same as MONO_PATH except that it points to
18395 GACs instead of lib directories.
18396 * loader.h: The user gac is gone so we dont need function to
18398 * mono-config.c: user gac option is now gone.
18400 2004-05-15 Jackson Harper <jackson@ximian.com>
18402 * culture-info.h: Make defines more consistent, add calendar data
18403 to the culture info table.
18404 * culture-info-tables.h: Add basic calendar data. Basically
18405 everyone gets default gregorian until all the data is
18407 * locales.c: Use the new consistent defines. Set calendar data for
18408 culture info objects.
18409 * object.h: add a field for calendar data to CultureInfo
18411 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
18413 * image.c: image->runtime_invoke_cache is keyed on signatures now.
18414 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
18416 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
18417 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
18418 an extra param that is the pointer of the method to invoke. The IL for
18419 the invoke method is no longer specific to the method, but to the
18420 signature of the method. Thus, we can share the same code for multiple
18421 methods. This reduces the number of methods that have to be compiled.
18423 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
18425 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
18427 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18429 * icall.c: Optimize Buffer.BlockCopy.
18431 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18433 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
18434 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
18435 quote). Changed them to "MMMM yyyy".
18437 2004-05-12 Miguel de Icaza <miguel@ximian.com>
18440 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
18442 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
18444 * reflection.h: Updated after changes to managed structures.
18446 * appdomain.c: Bump corlib version.
18448 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18450 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
18453 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18455 * Makefile.am: link to ../os/libmonoos.la on windows.
18458 -If MONO_DEBUG, warn about non-existing directories in
18460 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
18461 compile time variable.
18462 -Removed init_default_path and call mono_set_rootdir from
18463 libmonoos.a instead (windows only).
18465 * assembly.h: declare mono_assembly_getrootdir().
18468 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
18470 * loader.c: s/getenv/g_getenv/
18472 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
18474 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
18476 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
18478 * metadata.h: Add new marshalling conversions.
18480 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
18483 * reflection.c (mono_reflection_get_type): Lookup the type in all
18484 modules of a multi-module assembly. Fixes #58291.
18486 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
18488 * threads.c: Before aborting a background, set the StopRequested
18489 state. This avoids throwing the Abort exception.
18490 In mono_thread_manage, don't continue with the shutdown until all
18491 aborted threads have actually stopped.
18493 2004-05-10 Jackson Harper <jackson@ximian.com>
18495 * locales.c: Remove the modifier from culture names.
18497 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18499 * Makefile.am: monosn is not installed any more. It has been deprecated
18502 2004-05-07 Jackson Harper <jackson@ximian.com>
18505 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
18506 Fix array construction, add bailout if the length is 0.
18508 2004-05-07 Dick Porter <dick@ximian.com>
18510 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
18511 machine doesn't have a DNS entry. Patch by Urs Muff
18512 (umuff@quark.com), fixes bug 57928.
18514 2004-05-06 Jackson Harper <jackson@ximian.com>
18516 * reflection.c: Handle null PublicTokens properly. alloc mem for
18517 assembly names culture so we dont crash when freeing it.
18519 2004-05-06 Jackson Harper <jackson@ximian.com>
18521 * assembly.c: Check the usergac when loading with partial names.
18523 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
18525 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
18526 does nothing for now (not required for Linux/Windows) but the class
18527 library can call it (and a newer or modified runtime could need it).
18528 * icall.c: Registred icall.
18530 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18532 * loader.c: prints a message on module loading error we set MONO_DEBUG
18533 environment variable.
18535 2004-05-05 Jackson Harper <jackson@ximian.com>
18537 * appdomain.c: Handle PublicKeyToken=null properly.
18539 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
18541 * environment.c|h: Added icall ves_icall_System_Environment_
18542 GetOSVersionString to get the current OS version as a string.
18543 * icall.c: Registred icall.
18545 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
18547 * object.c: in mono_object_get_virtual_method(), take into account that
18548 non-virtual methods don't have a slot in the vtable. Check needed when
18549 the object is a proxy.
18551 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
18553 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
18554 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
18556 * object.c (mono_class_compute_gc_descriptor): Fix warning.
18558 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
18559 passed when a valuetype is expected.
18561 * object.c (mono_unhandled_exception): Only set the exit code if the
18562 exception happens in the main thread. Fixes thread5.exe.
18564 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
18565 invalid names. Fixes #58047.
18567 2004-05-03 Jackson Harper <jackson@ximian.com>
18569 * assembly.c: This line was committed accidently and is unneeded.
18571 2004-05-03 Jackson Harper <jackson@ximian.com>
18573 * icall.c: Add new icall for Assembly::LoadWithPartialName
18574 * assembly.c/.h: new function that probes the GAC to load partial
18575 assembly names by Paolo Molaro.
18577 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18579 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
18580 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
18581 (type_get_fully_qualified_name): Added PublicKeyToken when building a
18584 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18586 * appdomain.c: fixed check for 'neutral' culture and removed warning.
18587 * reflection.c: fix bug when parsing a full type name and Version is not
18588 the last thing in the string.
18590 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
18592 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
18593 crashes when it is freed.
18595 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18597 * assembly.c: print the compat warning to stderr.
18599 2004-05-01 Miguel de Icaza <miguel@ximian.com>
18601 * assembly.c (mono_assembly_load_references): Add a compatibility
18602 hack to run old applications that might be still referencing the
18603 3300-based assemblies, only do this for System.xxx.
18605 2004-05-01 Jackson Harper <jackson@ximian.com>
18607 * appdomain.c: If the culture is neutral we set it to "".
18609 2004-04-29 Jackson Harper <jackson@ximian.com>
18611 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
18613 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
18615 * string-icalls.c: added low overhead function for copying chars
18616 * icall.c: added needed icall for the above function
18618 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18620 * icall.c: fix return value of get_global_assembly_cache. Implemented
18621 Environment.GetLogicalDrives.
18623 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
18625 * rand.c: try and talk to egd or prngd
18626 for random bytes if opening devices fail.
18628 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
18630 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
18631 alignment for the type using the native alignment of its members
18632 instead of using klass->min_align.
18634 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
18636 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18639 * socket-io.c: added check for sys/aio.h.
18641 2004-04-28 Dick Porter <dick@ximian.com>
18643 * threads.c: Don't abort a thread thats already aborting, when
18644 terminating everything.
18646 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18648 * icall.c: added 2 new async calls for Socket.
18650 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
18651 IO on *nix systems.
18653 * threadpool.c: removed unused variable.
18655 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
18657 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
18659 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
18661 * locales.c: put back string_invariant_tolower () and
18662 string_invariant_toupper ().
18664 2004-04-26 David Waite <mass@akuma.org>
18669 * unicode.h: remove comma from end of enumeration declarations
18671 2004-04-26 David Waite <mass@akuma.org>
18673 * debug-mono-symfile.h:
18676 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
18679 2004-04-26 Jackson Harper <jackson@ximian.com>
18681 * appdomain.c: Increment version number.
18683 2004-04-26 Jackson Harper <jackson@ximian.com>
18685 * appdomain.c: Set assembly references public token value when
18686 PublicKeyToken is specified, not the hash_value. Free public token
18687 values when free assembly name data. Previously the public key
18688 token was hex decoded, however we are using hex encoded public key
18689 tokens, so this is not neccasary.
18690 * assembly.c: Lookup assemblies in the gac if their public token
18691 value is set. Add function to allow enabling user gac
18692 lookups. Specify whether or not the assembly was loaded from the
18693 GAC. Compare full assembly names when checking the cache for
18694 assemblies (Temporarily disabled see comment in code). Remove
18695 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
18696 specifies trace-loader they get extra info to stdout on the
18697 loading of assemblies.
18698 * image.h: Add a field for an assembly references public token
18699 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
18700 whether an assembly has been loaded from the GAC.
18701 * image.c: Remove a corlib -> mscorlib name mapping.
18702 * loader.h: Add function to enable/disable the user gac.
18703 * mono-config.c: Check if the usergac is enabled in the config
18705 * icall.c: New icall to determine whether or not an assembly has
18706 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
18707 * tabldefs.h: Add constant for assemblyref flag that specifies a
18708 full public key is used instead of a public token.
18709 * reflection.c: Remove mscorlib -> corlib mappings. Set
18710 PublicTokenValue instead of hash value. This value is a hex
18711 string so it does not need to be expanded.
18713 2004-04-26 Martin Baulig <martin@ximian.com>
18715 * mono-debug-debugger.c (mono_debugger_initialize): Set
18716 `mono_debugger_initialized' before calling mono_debug_lock().
18718 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
18720 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
18721 InternalToUpper/InternalToLower.
18722 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
18723 removed invariant culture shortcut. This is now done in managed code.
18724 * locales.c: (string_invariant_toupper/tolower) removed.
18726 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18728 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
18729 Added Poll internal call.
18731 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
18732 call for Poll. Select was too heavy for polling a single socket.
18734 * threadpool.[ch]: added mono_threadpool_cleanup.
18735 * threads.c: use it. Don't use Thread_Abort on windows.
18737 2004-04-23 Martin Baulig <martin@ximian.com>
18739 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
18741 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
18743 * icall.c: Registred new icalls for key pair protection and added an
18744 icall for Environment.GetFolderPath on Windows.
18745 * security.c|h: Added new icalls for key pair protection.
18747 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18749 * socket-io.c: don't display the non-supported family warning for known
18750 families. Now this is not displayed on windows when checking support
18753 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18755 * class.c: don't display the layout warning for static fields.
18757 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
18759 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
18760 * locales.c, locales.h: Added new icalls for culture-specific
18761 Char.ToLower and Char.ToUpper.
18763 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18765 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
18768 2004-04-20 Martin Baulig <martin@ximian.com>
18770 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
18771 of the type name before passing it to mono_reflection_type_from_name().
18773 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
18775 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
18776 encodings here. Fixes #56965.
18778 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
18780 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
18781 fix test on strstr result not that I can see anything that
18782 relies on the result.
18784 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
18786 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
18789 * marshal.c (mono_marshal_get_string_encoding): New helper function.
18791 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
18792 function to determine which marshalling to use for strings. Fixes
18795 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
18797 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
18799 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
18801 * icall.c: #include mono-config.h
18803 2004-04-15 Jackson Harper <jackson@ximian.com>
18805 * culture-info-tables.h: Fix date formats for en-US culture.
18807 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
18809 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
18810 ThreadPool.SetMinThreads.
18811 * threadpool.c: Implemented ThreadPool.GetMinThreads and
18812 ThreadPool.SetMinThreads.
18814 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
18816 * mono-config.c: also load the .config file in the directory
18817 where the assembly was found.
18819 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
18821 * assembly.c: load per-assembly config files.
18822 * icall.c: decrapified code to get the config dir and moved to
18824 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
18825 per-assembly config files. When doing a dll map lookup give precedence
18826 to the per-assembly data.
18828 2004-04-14 Martin Baulig <martin@ximian.com>
18830 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
18831 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
18832 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
18834 * mono-debugger-debugger.c: While the debugger is locked, remember
18835 whether the symbol tables have changes and send one single
18836 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
18838 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
18840 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
18842 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
18845 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
18846 account when marshalling string arrays. Fixes #56965.
18848 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
18850 * icall.c: Add new icalls mapping for security.
18851 * security.c|h: Add internal calls for WindowsIdentity,
18852 WindowsImpersonationContext and WindowsPrincipal.
18854 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
18856 * class.c: Added comment to ensure the System.MonoDummy class
18857 is removed when no longer necessary
18859 2004-04-13 Miguel de Icaza <miguel@ximian.com>
18861 * appdomain.c: Pass arguments to the bootstraping exceptions to
18862 minimize JITed methods at boot
18864 * metadata.c (mono_exception_from_name_two_strings): Allow for the
18865 second string to be null.
18867 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
18868 Change the protocol to minimize the JIT methods at startup. Now
18869 it Returns the internal codepage, if the value of "int_code_page"
18870 is 1 at entry, and we can not compute a suitable code page
18871 number, returns the code page as a string.
18873 2004-04-13 Jackson Harper <jackson@ximian.com>
18875 * culture-info-tables.h: Fix number of decimal digits for all
18878 2004-04-13 Jackson Harper <jackson@ximian.com>
18880 * icall.c: Clairfy out of sync error message. It is not always
18881 your corlib that is out of sync.
18883 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
18885 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
18886 properties when only the set accessor is overriden. Fixes #55874.
18888 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
18890 * assembly.c (mono_assembly_load_references): Make this thread safe.
18893 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
18895 * monosn.c: Add missing initialization calls.
18897 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
18900 ves_icall_System_Globalization_CultureInfo_construct_number_format
18901 Fix g_assert so it compiles on fussier compilers re int/ptr
18904 2004-04-08 Dick Porter <dick@ximian.com>
18907 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
18908 53992. Also rearrange the code so that the internal calls return
18909 an error value and exceptions are thrown from managed code.
18911 * icall.c: Add type info to the socket icalls.
18913 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18915 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
18918 2004-04-07 Martin Baulig <martin@ximian.com>
18920 * class.c (mono_class_from_generic_parameter): Don't default
18921 `klass->parent' to `mono_defaults.object_type'.
18923 2004-04-07 Martin Baulig <martin@ximian.com>
18925 * reflection.c (mono_reflection_initialize_generic_parameter): Set
18926 `param->pklass->reflection_info'.
18928 2004-04-07 Jackson Harper <jackson@ximian.com>
18930 * culture-info-tables.h: Fix date separator symbol.
18932 2004-04-07 Martin Baulig <martin@ximian.com>
18934 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
18935 from System.Type to System.MonoType.
18937 2004-04-07 Martin Baulig <martin@ximian.com>
18940 (MonoReflectionGenericParam): Added `has_reference_type' and
18941 `has_value_type' fields.
18943 * reflection.c (mono_image_get_generic_param_info): Encode the
18944 correct flags if we have the `class' or `struct' constraint.
18946 2004-04-07 Martin Baulig <martin@ximian.com>
18949 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
18951 2004-04-07 Jackson Harper <jackson@ximian.com>
18953 * appdomain.c: Revert extra patches, just wanted to bump the
18956 2004-04-07 Jackson Harper <jackson@ximian.com>
18958 * Makefile.am: Add culture-info private headers.
18959 * icall.c: Add new icalls for contructing locales.
18960 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
18961 * locales.h: Declare new culture info construction methods.
18962 * object.h: Add new fields used to avoid the CultureMap to
18964 * culture-info.h: Definition of structs used in the culture info
18966 * culture-info-tables.h: Autogenerated tables that contain culture
18967 info data. This file was generated with the locale-builder tool.
18968 * appdomain.c: Incement corlib version number.
18970 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
18972 * appdomain.c: (mono_runtime_init) move mono_thread_init
18973 to before mono_object_new calls so critical sections
18974 are initialized before use.
18976 2004-04-07 Martin Baulig <martin@ximian.com>
18979 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
18980 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
18981 (ves_icall_MonoGenericParam_initialize): Removed.
18982 (monogenericparam_icalls): Removed.
18983 (generictypeparambuilder_icalls): Added new table for
18984 System.Reflection.Emit.GenericTypeParameterBuilder.
18987 (mono_reflection_define_generic_parameter): Removed.
18988 (mono_reflection_initialize_generic_parameter): This is now called
18989 from GenericTypeParameterBuilder's .ctor.
18991 2004-04-06 Martin Baulig <martin@ximian.com>
18993 * class.c (mono_class_init): Don't inflate nested classes in a
18995 (mono_type_get_name_recurse): Include the generic arguments for
18996 generic instances and generic type declarations.
18997 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
18998 (_mono_class_get_instantiation_name): Removed.
18999 (mono_class_create_generic): Always use `gklass->name' as our name.
19001 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
19003 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
19004 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
19005 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
19006 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
19007 closed generic methods here.
19010 (mono_reflection_generic_inst_get_nested_types): Removed.
19011 (inflate_mono_method): Copy the generic parameters from the
19012 MonoMethodHeader into out MonoGenericMethod.
19014 2004-04-06 Martin Baulig <martin@ximian.com>
19017 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
19019 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
19021 * reflection.c (build_compressed_metadata): If we have any entries
19022 in the GenericParam, MethodSpec or GenericParamConstraint tables,
19023 set the header version to 1.1.
19025 2004-04-06 Martin Baulig <martin@ximian.com>
19027 * class.c (mono_class_init): If we're a generic instance,
19028 initialize our nested classes, too.
19029 (_mono_class_get_instantiation_name): Deal with the new `!%d'
19032 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19034 * process.c: quote the argument passed to the shell on windows.
19036 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
19038 * threads.c (mono_alloc_special_static_data): Allow this to be
19039 called during startup.
19041 2004-04-02 Martin Baulig <martin@ximian.com>
19044 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
19046 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
19048 * icall.c: Fix build.
19050 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
19052 * Makefile.am: Added security.c|h.
19053 * icall.c: Added icall for get_UserName;
19054 * security.c: New file for security related icalls. Added function
19055 get_UserName for System.Environment (fix #56144).
19056 * security.h: New. Header file for security.c
19058 2004-04-02 Dick Porter <dick@ximian.com>
19060 * icall.c: Deleted the icalls that were obsoleted some time ago
19061 by the ICU string code, and which were mixed into the icall
19062 rearranging. Fixes bug 55969.
19065 * string-icalls.c: Deleted the code that those icalls reference.
19067 2004-04-01 Martin Baulig <martin@ximian.com>
19069 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
19071 * class.c (mono_class_from_generic_parameter): Don't set
19072 TYPE_ATTRIBUTE_INTERFACE.
19073 (my_mono_class_from_generic_parameter): Likewise.
19075 2004-04-01 Martin Baulig <martin@ximian.com>
19077 * loader.c (find_method): Added an optional `MonoClass *ic'
19078 argument to search in a specific interface.
19079 (mono_get_method_constrained): New public function.
19081 2004-04-01 Martin Baulig <martin@ximian.com>
19083 * reflection.c (mono_image_get_generic_field_token): Use the
19084 `handleref' cache here.
19086 2004-04-01 Martin Baulig <martin@ximian.com>
19088 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
19090 * reflection.c (create_generic_typespec): Use the `typespec' hash
19091 here, not the `typeref' one.
19093 2004-04-01 Martin Baulig <martin@ximian.com>
19095 * class.c (mono_class_inflate_generic_type): Moved the
19096 functionality into a new static inflate_generic_type() which
19097 returns NULL if it didn't do anything. Only increment the
19098 `mono_stats.inflated_type_count' if we actually inflated
19100 (mono_class_get_full): Check the classes type to see whether we
19101 need to inflate it; also inflate MONO_TYPE_(M)VAR.
19103 2004-04-01 Jackson Harper <jackson@ximian.com>
19105 * reflection.c: Set culture for assembly references.
19107 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
19109 * reflection.[ch], icall.[ch], Fix support for pinning variables.
19111 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19114 (do_mono_assembly_open): the critical section also covers
19115 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
19117 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19120 (mono_manage_threads): abort the background threads when finishing.
19123 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19125 * gc.c: only close the done_event handle if there was no timeout.
19128 2004-03-30 Martin Baulig <martin@ximian.com>
19130 * icall.c (icall_entries): It's called "System.Activator", not
19131 "System.Activation".
19133 2004-03-30 Martin Baulig <martin@ximian.com>
19135 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
19136 (mono_class_create_from_typespec): Likewise.
19138 2004-03-30 Martin Baulig <martin@ximian.com>
19140 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
19141 `has_ctor_constraint' and `initialized'.
19143 2004-03-30 Martin Baulig <martin@ximian.com>
19145 * reflection.c (encode_new_constraint): New static function to add
19146 the constructor constraint attribute to a type parameter.
19147 (encode_constraints): Call encode_new_constraint() if necessary.
19150 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
19152 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
19154 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
19156 * reflection.c, icall.c: add support for pinning variables.
19158 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
19160 * marshal.c (mono_marshal_get_managed_wrapper):
19161 init bool local with zero rather than null.
19163 2004-03-29 Martin Baulig <martin@ximian.com>
19165 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
19166 the "official" behavior here.
19167 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
19169 2004-03-29 Martin Baulig <martin@ximian.com>
19171 * icall.c: Reflect latest API changes.
19173 2004-03-29 Martin Baulig <martin@ximian.com>
19175 * loader.c (mono_get_method_from_token): Also call
19176 mono_metadata_load_generic_params () for abstract and interface
19177 methods; replace the type arguments in the method signature with
19178 the ones which are loaded from the metadata.
19180 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
19182 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
19183 of the lock is not the current thread. MS.NET don't do it, in spite of
19184 what the documentation says. See bug #56157.
19186 2004-03-28 Martin Baulig <martin@ximian.com>
19188 * class.c (mono_class_init): Don't call init_properties() and
19189 init_events() for generic instances; set `prop->parent' when
19190 inflating properties.
19192 * reflection.c (mono_generic_inst_get_object): Call
19193 `mono_class_init (ginst->klass)'.
19194 (mono_type_get_object): Only create a MonoGenericInst if your
19195 generic type is a TypeBuilder.
19196 (do_mono_reflection_bind_generic_parameters): Only set
19197 `ginst->is_dynamic' if our generic type is a TypeBuilder.
19199 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
19201 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
19204 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19206 * icall.c: added Kill_internal icall.
19207 * process.[ch]: added Kill_internal icall.
19209 2004-03-25 Martin Baulig <martin@ximian.com>
19211 * class.h (MonoStats): Added `generic_instance_count',
19212 `inflated_method_count', `inflated_type_count' and
19213 `generics_metadata_size'.
19215 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19217 * reflection.c: no warnings now.
19219 2004-03-25 Martin Baulig <martin@ximian.com>
19221 * class.c (mono_class_get_full): New public function; does a
19222 mono_class_get(), but also takes a `MonoGenericContext *'.
19224 * loader.c (mono_field_from_memberref): Renamed to
19225 `field_from_memberref', made static and added `MonoGenericContext *'
19227 (mono_field_from_token): Added `MonoGenericInst *' argument.
19228 (method_from_memberef): Likewise.
19229 (mono_get_method_from_token): Likewise.
19230 (mono_get_method_full): New public function; does a
19231 mono_get_method(), but also takes a `MonoGenericContext *'.
19233 * verify.c (mono_method_verify): Get the method's generic context
19234 and pass it to mono_field_from_token(), mono_get_method_full() and
19235 mono_class_get_full().
19237 2004-03-25 Martin Baulig <martin@ximian.com>
19239 * class.c (mono_class_inflate_generic_type): Take a
19240 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
19241 `MonoGenericMethod *'.
19243 2004-03-25 Martin Baulig <martin@ximian.com>
19245 * loader.h (MonoMethodInflated): Store the MonoGenericContext
19246 instead of the MonoGenericMethod here.
19248 2004-03-25 Martin Baulig <martin@ximian.com>
19250 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
19251 each time we create a new MonoGenericInst, we also create a new
19252 context which points back to us.
19254 * class.c (inflate_method): Use `ginst->context' instead of
19255 creating a new context.
19257 * loader.c (method_from_memberref): Use
19258 `klass->generic_inst->context' instead of creating a new context.
19260 2004-03-25 Martin Baulig <martin@ximian.com>
19262 * class.h (MonoGenericContext): New struct.
19263 (MonoGenericMethod): Removed `generic_inst'.
19265 * class.c (mono_class_inflate_generic_method): Take a
19266 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
19268 2004-03-25 Martin Baulig <martin@ximian.com>
19270 * loader.h (MonoMethodInflated): New typedef.
19272 * metadata.h (MonoMethodSignature): Removed `gen_method', make
19273 `generic_param_count' consume just 30 bits, added `is_inflated'
19274 and `has_type_parameters' flags (one bit each).
19276 * class.c (mono_class_inflate_generic_method): Create a
19277 MonoMethodInflated instead of a MonoMethodNormal and set
19278 `is_inflated' in the method signature.
19280 * class.h (MonoGenericMethod): Removed `generic_method'.
19282 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
19284 * image.c: Make sure the name of a MonoImage is always an absolute path.
19285 This fixes bug #54415.
19287 2004-03-24 Martin Baulig <martin@ximian.com>
19289 * class.c (mono_class_setup_vtable): If we're a generic instance,
19290 use our generic type's vtable size.
19292 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
19294 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
19295 MONO_NO_UNLOAD env var as a temporary workaround for unloading
19298 2004-03-23 Martin Baulig <martin@ximian.com>
19300 * class.h (MonoDynamicGenericInst): Added `int count_events' and
19301 `MonoEvent *events'.
19303 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
19304 (typebuilder_icalls): Added "get_event_info"; calls
19305 mono_reflection_event_builder_get_event_info().
19307 * reflection.c (mono_reflection_generic_inst_initialize): Added
19308 `MonoArray *events'.
19309 (mono_reflection_event_builder_get_event_info): New function.
19311 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
19313 * object.h: add mono_type_initialization_init
19315 * object.c (mono_runtime_class_init):
19316 implement class constructor synchronization rules
19317 to cope with threading issues.
19318 add mono_type_initialization_init
19320 * appdomain.c (mono_runtime_init): call
19321 mono_type_initialization_init
19323 * class.h: removing initializing field from MonoVTable
19325 2004-03-23 Martin Baulig <martin@ximian.com>
19327 * class.c (my_mono_class_from_generic_parameter): Use
19328 `param->name' if it's not NULL.
19330 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
19332 * class.c: do not insert non-virtual methods in the vtable.
19333 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
19334 that means the method is non-virtual. This never would have
19337 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
19339 * profiler.c: Added lock for accessing coverage_hash.
19341 2004-03-22 Martin Baulig <martin@ximian.com>
19343 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
19344 `method->method->signature->generic_param_count != 0' to make it
19345 work for interface methods.
19347 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19349 * process.c: quote the string passed to the shell using g_shell_quote.
19351 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19354 (mono_threads_manage): don't remove the finalizer thread and self
19355 from the threads hash table so that mono_thread_manage can be called
19358 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19360 * process.c: quote the arguments when UseShellExecute is true. Fixes
19363 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19365 * threads.c: set mono_thread_detach as a cleanup routine for every
19366 thread. This way it's always executed upon thread termination, either
19367 aborted or finished normally. No more xsp hangs!
19369 2004-03-17 Martin Baulig <martin@ximian.com>
19371 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
19372 `int count_nested' and a `MonoType **nested'.
19374 * reflection.c (mono_reflection_bind_generic_parameters): Moved
19375 most of the functionality into a new static
19376 do_mono_reflection_bind_generic_parameters() and don't take a
19377 `MonoType *nested_in' argument any more. Don't compute nested
19379 (mono_reflection_generic_inst_get_nested_types): New public method
19380 to get nested types.
19382 * class.c (mono_class_create_generic): Set `klass->nested_in' if
19383 we're a nested class.
19385 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
19386 mono_reflection_generic_inst_get_nested_types() to compute the
19389 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
19391 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
19392 descriptive error message under windows.
19394 2004-03-17 Martin Baulig <martin@ximian.com>
19396 * class.c (dup_type): Added `const MonoType *original' argument;
19397 copy the attrs from the original type.
19399 2004-03-17 Martin Baulig <martin@ximian.com>
19401 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
19402 `m->generic_inst_cache' here.
19404 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
19406 * exception.h exception.c: Add stack_overflow_exception.
19408 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19411 (overlapped_callback): call SetEvent *after* invoking the callback.
19412 No need to call CloseHandle.
19414 2004-03-16 Martin Baulig <martin@ximian.com>
19416 * reflection.c (mono_image_get_fieldref_token): Take a
19417 `MonoReflectionField *' instead of a `MonoClassField *' and a
19418 `MonoClass *'; store the `MonoReflectionField *' in the hash.
19420 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19422 * appdomain.c: don't add the culture to the filename we're looking for
19423 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
19425 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19427 * locales.c: don't ignore symbols when doing case insensitive compares.
19428 Thanks Dick! Fixes bug #54046.
19430 * threads.c: surround 'threads' usage with enter/leave in
19431 mono_thread_manage.
19433 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
19435 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
19436 implicitly marshalled as [Out]. Fixes #55450.
19438 (mono_marshal_get_runtime_invoke): Zero out the result if there is
19441 2004-03-16 Martin Baulig <martin@ximian.com>
19443 * class.c (mono_class_from_generic_parameter): Use the actual
19446 2004-03-16 Martin Baulig <martin@ximian.com>
19448 * reflection.c (type_get_signature_size): New static function.
19449 Compues the size of the type in a method signature.
19450 (method_get_signature_size): New static function; calls
19451 type_get_signature_size() to compute the actual size of the
19452 method's signature.
19453 (method_encode_signature): Use method_get_signature_size() to get
19454 the signature's size rather than using `nparams * 10'.
19456 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19458 * file-io.h: define here WapiOverlapped on windows. I don't want the
19459 regular OVERLAPPED one.
19462 * threadpool.c: somehow, BindIoCompletionCallback is not found.
19463 Disabling AIO on windows.
19465 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19467 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
19470 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19472 * appdomain.c: upgraded corlib version.
19474 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
19475 and BeginWrite. Allow opening files for asynchrnous operations.
19477 * file-io.h: new struct that maps FileStreamAsyncResult.
19478 * icall.c: added new icalls.
19479 * process.[ch]: support setting child process environment variables
19480 and use the SHELL or COMSPEC when UseShellExecute is true.
19482 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
19483 callback for async. IO is here and also BindHandle.
19485 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
19488 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
19490 * reflection.c (create_custom_attr): Allow len == 0.
19492 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
19493 computation on big-endian machines.
19495 2004-03-13 Martin Baulig <martin@ximian.com>
19497 * class.h (MonoGenericInst): Added `int count_ifaces'.
19499 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
19500 `ginst->count_ifaces' instead `klass->interface_count' since we
19501 may get called before the vtable is created.
19503 * loader.c (mono_method_get_param_names): If we're a generic
19504 instance, return and don't initialize the class.
19506 * reflection.c (mono_reflection_setup_generic_class): Don't call
19507 ensure_runtime_vtable().
19508 (mono_reflection_bind_generic_parameters): Set
19509 `ginst->count_ifaces'.
19511 2004-03-11 Jackson Harper <jackson@ximian.com>
19515 * unicode.h: Remove unused System.Char icalls.
19517 2004-03-11 Miguel de Icaza <miguel@ximian.com>
19519 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
19520 code when we P/Invoke the first library in Windows.Forms, instead
19521 of when we first open the assembly.
19523 * assembly.c: Drop the lookup from here.
19525 2004-03-10 Martin Baulig <martin@ximian.com>
19527 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
19528 class for properties, fields and events. Finally fixes #54945.
19530 2004-03-10 Martin Baulig <martin@ximian.com>
19532 * metadata.c (mono_metadata_class_equal): New static function;
19533 checks whether two generic instances or two generic parameters are
19535 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
19538 2004-03-10 Martin Baulig <martin@ximian.com>
19540 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
19542 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
19543 argument and write it into the `reflection_info' field.
19546 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
19547 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
19549 2004-03-09 Jackson Harper <jackson@ximian.com>
19551 * char-conversions.h: use 8 bits for numeric data its all we need
19552 * icall.c: numeric data is only 8 bits now.
19554 2004-03-09 Martin Baulig <martin@ximian.com>
19556 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
19558 * class.c (init_properties, init_events): Initialize the new
19561 * reflection.c (typebuilder_setup_properties): Likewise.
19562 (typebuilder_setup_events): Likewise.
19564 * reflection.h (MonoEventInfo): Replaced `parent with
19565 `declaring_type' and `reflected_type'.
19567 * icall.c (ves_icall_get_property_info): Distinguish between
19568 declaring and reflected type.
19569 (ves_icall_get_event_info): Likewise.
19571 2004-03-09 Martin Baulig <martin@ximian.com>
19573 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
19574 (ves_icall_Type_GetField): Correctly set field->klass.
19576 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
19578 * loader.h: Fix warning.
19580 2004-03-08 Miguel de Icaza <miguel@ximian.com>
19582 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
19583 library routine if present. Notice that it will still continue
19584 executing even if its missing, for those working on the Gtk#
19585 edition of Windows.Forms.
19587 * assembly.c (do_mono_assembly_open): If loading the
19588 System.Windows.Forms call mono_loader_wini_init.
19590 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
19592 * class.h: Added MonoRemoteClass struct.
19593 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
19594 function for MonoStrings.
19595 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
19596 Added internal call for getting the proxy type.
19597 * marshal.c: Get the type of transparent proxies from its remote_class.
19598 Added methods that generate the IL for type checks and casts:
19599 mono_marshal_get_isinst, mono_marshal_get_castclass,
19600 mono_marshal_get_proxy_cancast.
19601 * marshal.h: Declaration of the previous new methods.
19602 * object.c: Added new moethods for creating and updating MonoRemoteClass
19603 instances: mono_remote_class, mono_upgrade_remote_class,
19604 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
19605 * verify.c: FIx transparent_proxy_fields layout.
19606 * appdomain.c: Bump corlib version.
19608 2004-03-04 Jackson Harper <jackson@ximian.com>
19610 * icall.c: Add icall to access char conversion tables.
19611 * char-conversions.h: Character conversion tables.
19612 * Makefile.am: Add char-conversions.h private header file.
19614 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
19616 * appdomain.c (unload_thread_main): Increase unloading timeout to
19617 10 sec as a temporary workaround for Nant problems.
19619 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
19621 * gc.c: Add checks for GC_enable and GC_disable.
19623 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
19624 (jaak@zd.com.pl). Fix memory corruption in String.Replace
19627 2004-02-27 Martin Baulig <martin@ximian.com>
19629 * reflection.c (mono_reflection_bind_generic_parameters): Take a
19630 `MonoReflectionType *' instead of a `MonoType *'.
19632 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
19634 * gc.c (run_finalize): Avoid finalizing the object representing the
19636 (finalizer_thread): Fix warning.
19638 2004-02-25 Martin Baulig <martin@ximian.com>
19640 * class.c (_mono_class_get_instantiation_name): Added `int offset'
19641 argument for nested types.
19642 (mono_class_create_generic): Added support for nested generictypes.
19644 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
19647 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
19649 * reflection.c (method_encode_signature): Increase the minimum
19650 value of `size' from 10 to 11.
19651 (mono_reflection_bind_generic_parameters): Take `int type_argc'
19652 and `MonoType **types' arguments instead of the `MonoArray
19653 *types'; added `MonoType *nested_in'. Recursively instantiate
19656 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
19658 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
19659 stack_overflow_ex members which are used by exception handling.
19661 * appdomain.c (mono_runtime_init): Initialize the new members.
19663 * gc.c (mono_gc_enable): New helper function.
19664 * gc.c (mono_gc_disable): New helper function.
19666 2004-02-23 Martin Baulig <martin@ximian.com>
19668 * icall.c: I must have been really stupid - make it actually work
19671 2004-02-23 Martin Baulig <martin@ximian.com>
19673 * loader.c (method_from_memberref): Only inflate the method if
19674 it's in another klass.
19676 2004-02-23 Martin Baulig <martin@ximian.com>
19678 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
19679 (mono_class_init): If we're a generic instance and an interface,
19680 compute `class->interface_id'; also create `class->interfaces'
19681 here and inflate them.
19683 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
19685 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
19687 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
19689 2004-02-15 Miguel de Icaza <miguel@ximian.com>
19691 * reflection.c (method_encode_code): Improved the error message
19692 generated by the exception.
19694 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19696 * icall.c: Martin did not do what he said in the ChangeLog for
19697 2004-02-18, but put back the changes for properties and events.
19698 Commenting those changes out again and adding comment to bug #54518.
19700 * process.c: removed warning.
19702 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
19704 * marshal.c (emit_struct_conv): Print an error message instead of
19705 asserting when a type does not have the StructLayout attribute.
19707 2004-02-20 Martin Baulig <martin@ximian.com>
19709 * reflection.c (mono_type_get_object): Also use the cache for
19711 (mono_reflection_bind_generic_parameters): Always compute
19714 2004-02-20 Martin Baulig <martin@ximian.com>
19716 * class.h (MonoGenericMethod): Removed `klass'.
19718 * class.c (mono_class_inflate_generic_method): Added `MonoClass
19721 2004-02-20 Martin Baulig <martin@ximian.com>
19723 * reflection.c (method_encode_methodspec): Actually use the
19724 uninflated signature for the memberref.
19726 2004-02-20 Martin Baulig <martin@ximian.com>
19728 * class.h (MonoGenericMethod): Removed `declaring'.
19730 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
19731 is NULL, compute it here.
19733 2004-02-20 Martin Baulig <martin@ximian.com>
19735 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
19737 * metadata.c (mono_metadata_generic_inst_hash): New method.
19738 (mono_metadata_generic_inst_equal): New method.
19740 * reflection.c (mono_reflection_bind_generic_parameters): Use the
19741 `klass->image->generic_inst_cache' cache to avoid creating
19742 duplicate MonoGenericInst's.
19744 * class.c (mono_class_inflate_generic_type): Use the cache.
19746 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
19748 * object.c: fixed gc descriptor calculation for embedded valuetypes.
19750 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19752 * icall.c: added Socket.WSAIoctl icall.
19754 * socket-io.[ch]: implemented
19755 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
19757 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
19759 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
19761 2004-02-18 Urs C Muff <umuff@quark.com>
19763 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
19764 this work on PPC and other big-endian architectures.
19766 * debug-mono-symfile.h: Prepended the names of all the `guint32'
19767 fields with an underscore to make sure they're only accessed by
19768 the read32() macro.
19770 2004-02-18 Martin Baulig <martin@ximian.com>
19772 * icall.c: Put the klass->refclass changes back for methods and
19773 fields, but not for properties and events. We're currently not
19774 distinguishing between DeclaringType and ReflectedType for
19775 properties and events, that's what caused the regressions.
19777 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19780 (mono_async_result_new): the handle can be NULL.
19782 * threadpool.c: Use an event instead of a semaphore, don't initialize
19783 it until needed. This saves quite a few semaphores from being created
19784 when using the threadpool.
19786 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
19788 * object.c (mono_string_is_interned_lookup): Fix interning of long
19789 strings. Fixes #54473.
19791 * domain.c (ldstr_equal): Optimize if the two strings are equal.
19793 * icall.c: Revert the klass->refclass changes since they introduce
19794 regressions (bug #54518).
19796 2004-02-18 Martin Baulig <martin@ximian.com>
19798 * class.c (mono_class_init): If we're a generic instance and don't
19799 come from a TypeBuilder, inflate our members here.
19800 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
19801 (mono_class_create_generic): New public method.
19802 (mono_class_initialize_generic): Removed.
19803 (get_instantiation_name): Renamed to
19804 _mono_class_get_instantiation_name() and made it public.
19806 2004-02-18 Martin Baulig <martin@ximian.com>
19808 * class.c (mono_class_inflate_generic_type): Clear the new
19809 instance's `nginst->klass' when inflating a generic instance.
19810 (mono_class_is_subclass_of): Added (basic) support for generic
19813 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
19815 * appdomain.h, domain.c: use a MonoCodeManager instead of a
19816 MonoMempool to hold compiled native code.
19818 2004-02-17 Martin Baulig <martin@ximian.com>
19820 * class.h (MonoDynamicGenericInst): Added `count_properties' and
19823 * reflection.c (mono_reflection_generic_inst_initialize): Added
19824 `MonoArray *properties' argument.
19826 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
19828 2004-02-17 Martin Baulig <martin@ximian.com>
19830 * icall.c (ves_icall_Type_GetFields): Renamed to
19831 ves_icall_Type_GetFields_internal() and added a
19832 `MonoReflectionType *rtype' argument; pass it to
19833 mono_field_get_object() to set the field's "reflected" type.
19834 (ves_icall_Type_GetConstructors): Likewise.
19835 (ves_icall_Type_GetEvents): Likewise.
19836 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
19837 argument; pass it to mono_method_get_object() to set the method's
19840 2004-02-17 Martin Baulig <martin@ximian.com>
19842 * class.h (MonoDynamicGenericInst): New type.
19843 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
19845 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
19846 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
19847 (ves_icall_MonoGenericInst_GetFields): New interncall.
19849 * class.c (mono_class_from_generic): Don't call
19850 mono_class_initialize_generic() if this is a dynamic instance;
19851 ie. it's being created from a TypeBuilder.
19852 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
19853 `class->byval_arg.type'.
19855 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
19856 to `inflate_method' and made static.
19857 (mono_reflection_inflate_field): Removed.
19858 (mono_reflection_generic_inst_initialize): New public method.
19860 * reflection.h (MonoReflectionGenericInst): Removed `methods',
19861 `ctors' and `fields'; added `initialized'.
19863 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
19865 * debug-helpers.c (mono_method_full_name): Fix output for empty
19868 2004-02-12 Martin Baulig <martin@ximian.com>
19870 * class.h (MonoClassField): Added `MonoType *generic_type'.
19872 * reflection.c (mono_image_get_fieldref_token): Added support for
19873 instantiated generic types.
19874 (field_encode_inflated_field): Removed.
19875 (mono_image_get_inflated_field_token): Removed.
19876 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
19878 * reflection.h (MonoReflectionInflatedField): Removed.
19880 2004-02-12 Martin Baulig <martin@ximian.com>
19882 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
19883 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
19885 * reflection.c (mono_image_get_methodspec_token): Take a
19886 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
19887 (mono_image_create_token): Check whether we have a
19888 `method->signature->gen_method' and call
19889 mono_image_get_methodspec_token() if appropriate.
19890 (inflated_method_get_object): Removed.
19891 (mono_reflection_bind_generic_method_parameters): Return a
19892 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
19893 (mono_reflection_inflate_method_or_ctor): Likewise.
19895 * reflection.h (MonoReflectionInflatedMethod): Removed.
19897 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
19899 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
19900 for custom valuetype marshalling.
19902 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
19904 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19906 * icall.c: fixed WSAGetLastError_internal name.
19908 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
19910 * threads.c (mono_thread_attach): Allow this to be called multiple
19911 times for a thread.
19913 * threads.c (build_wait_tids): Do not wait for ourselves.
19915 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
19916 appdomain list is empty.
19918 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
19919 memory returned by mono_string_builder_to_utf16, since it points into
19920 managed memory. Thanks to Bernie Solomon for noticing this.
19922 * icall.c: Add AppDomainSetup icalls.
19924 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
19926 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
19929 * reflection.c (reflection_methodbuilder_to_mono_method): Save
19930 custom attributes to the method_aux struct. Also fix array indexes etc.
19932 * loader.c (mono_method_get_param_names): Make dynamic case work again.
19934 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
19936 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
19937 (both static and runtime) and reduce startup time.
19939 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
19941 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
19942 AsAny marshalling conversion instead of crashing.
19944 * marshal.c: Fix warnings.
19946 2004-02-09 Martin Baulig <martin@ximian.com>
19948 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
19950 * reflection.h (MonoReflectionInflatedMethod): Removed the
19951 `declaring' field, it's now in the unmanaged MonoGenericMethod.
19953 * reflection.c (method_encode_methodspec): Removed the `method'
19954 argument; we get it from `gmethod->declaring'.
19955 (inflated_method_get_object): Removed the `declaring' argument.
19957 2004-02-09 Martin Baulig <martin@ximian.com>
19959 * class.h (MonoGenericMethod): New type.
19960 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
19963 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
19964 a `MonoGenericMethod *gen_method' one.
19966 * class.c (mono_class_inflate_generic_type): Take an additional
19967 `MonoGenericMethod * argument. This is only non-NULL if we're
19968 inflating types for a generic method.
19969 (mono_class_inflate_generic_signature): Renamed to
19970 inflate_generic_signature() and made static; take a
19971 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
19972 (inflate_generic_header): Take a `MonoGenericMethod *' argument
19973 instead of a `MonoGenericInst *' one.
19974 (mono_class_inflate_generic_method): Likewise.
19976 * reflection.c (encode_generic_method_sig): Take a
19977 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
19978 (method_encode_methodspec): Likewise.
19979 (inflated_method_get_object): Likewise.
19981 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
19982 field with a `MonoGenericMethod *gmethod' one.
19984 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
19986 * class.h (mono_class_has_parent): add parens to expansion
19989 2004-02-08 Martin Baulig <martin@ximian.com>
19991 * image.h (MonoImage): Removed `generics_cache'.
19993 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
19994 instead of a `MonoType *' argument; removed the `inflate_methods'
19995 argument. Don't inflate methods here.
19997 * loader.c (find_method): If it's a generic instance, call
19998 mono_class_init() on the `sclass->generic_inst->generic_type'.
20000 * metadata.c (mono_type_size): Make this work on uninitialized
20001 generic instances; call it on the `ginst->generic_type's class.
20003 * reflection.c (mono_reflection_bind_generic_parameters): Call
20004 mono_class_from_generic() to create the `ginst->klass'.
20006 2004-02-08 Martin Baulig <martin@ximian.com>
20008 * class.h (MonoClass): Changed type of `generic_inst' from
20009 `MonoType *' to `MonoGenericInst *'.
20011 2004-02-08 Martin Baulig <martin@ximian.com>
20013 * icall.c (ves_icall_Type_BindGenericParameters): Just call
20014 mono_type_get_object(), this is now creating a `MonoGenericInst'
20015 for MONO_TYPE_GENERICINST.
20016 (ves_icall_MonoGenericInst_GetParentType): Likewise.
20017 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
20019 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
20020 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
20021 (inflated_method_get_object): Added `MonoClass *refclass' argument.
20022 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
20023 and reflected type.
20025 * reflection.h (MonoReflectionInflatedMethod): Removed
20026 `declaring_type' and `reflected_type'.
20028 2004-02-08 Martin Baulig <martin@ximian.com>
20030 * class.h (MonoGenericInst): Added `MonoType *parent' and
20031 `MonoType **ifaces'.
20033 * reflection.h (MonoReflectionGenericInst): Removed `klass',
20034 `parent' and `interfaces'.
20036 * reflection.c (mono_reflection_bind_generic_parameters): Take a
20037 `MonoType *' argument and return a `MonoType *'.
20040 (ves_icall_MonoGenericInst_GetParentType): New interncall.
20041 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
20043 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
20045 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
20046 valuetype marshalling.
20048 2004-02-06 Martin Baulig <martin@ximian.com>
20051 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
20052 (my_mono_class_from_generic_parameter): Likewise.
20054 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
20056 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
20057 contents of the symbol files lazily.
20059 * object.h (MonoThread): Add 'name' and 'name_len' fields.
20061 * threads.h threads.c icall.c: New icalls for getting and setting the
20064 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
20066 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
20067 Raise an exception when the domain is not found.
20069 2004-02-03 Martin Baulig <martin@ximian.com>
20071 * reflection.c (mono_image_get_methodspec_token): Use the
20072 uninflated signature; fixes gen-33.
20074 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
20076 * gc.c threads.c: Make the finalizer thread a normal managed thread so
20077 the finalizer code can use thread functionality.
20079 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
20080 the finalizer thread.
20082 * threads.c: Make some functions more robust.
20084 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
20086 * metadata.h: Add new marshalling conventions.
20088 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
20089 stringbuilder marshalling. Fixes #53700.
20091 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
20093 * reflection.c (mono_image_get_type_info): Save declarative security
20096 * reflection.c (mono_image_get_field_info): Handle uninitialized
20097 unmanaged fields as well.
20099 * appdomain.c: Bump corlib version.
20101 2004-02-01 Martin Baulig <martin@ximian.com>
20103 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
20104 method type arguments.
20106 2004-01-30 Duncan Mak <duncan@ximian.com>
20108 * marshal.h: Add prototype for
20109 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
20111 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
20114 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
20116 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
20117 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
20119 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
20121 * marshal.c (mono_marshal_get_native_wrapper): Add support for
20122 custom marshalling of valuetypes.
20124 * marshal.c: Fix some warnings.
20126 2004-01-29 Martin Baulig <martin@ximian.com>
20128 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
20129 for generic method parameters.
20131 * reflection.c (method_encode_methodspec): Write the uninflated
20132 signature into the methodspec table.
20133 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
20134 is always the uninflated method.
20135 (reflection_methodbuilder_to_mono_method): Copy the generic
20136 parameters from the MethodBuilder into `header->gen_params'.
20138 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
20140 * class.c (mono_class_from_generic_parameter): Fix warning.
20142 2004-01-27 Martin Baulig <martin@ximian.com>
20144 * class.c (mono_class_from_generic_parameter): Don't create
20145 `klass->methods' here.
20147 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
20149 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
20150 extension since it does not work with libraries named lib<FOO>.dll.so.
20152 2004-01-25 Martin Baulig <martin@ximian.com>
20154 * class.c (mono_class_inflate_generic_type): Added support for
20155 MONO_TYPE_GENERICINST.
20157 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
20158 inflate methods on open constructed types.
20160 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20162 * object.c: fire ProcessExit event in the root AppDomain after running
20163 Main. Fixes bug #53299.
20165 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
20167 * socket-io.c: include the new socket-wrappers.h header.
20168 Use the wrappers instead of the unix socket functions to make the code
20171 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
20173 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
20175 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
20178 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
20180 * reflection.c (mono_image_create_pefile): Handle the case when the
20181 entry point is not a MethodBuilder.
20183 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
20184 field to ReflectionMethod since it is not allways a builder.
20186 * reflection.c (type_get_fully_qualified_name): New helper function to
20187 return the fully qualified name of a type.
20189 * reflection.c (encode_marshal_blob): Always emit the fully qualified
20190 type name for custom marshallers.
20192 * reflection.c (mono_marshal_spec_from_builder): Ditto.
20194 * class.c (mono_class_setup_vtable): If a parent class already
20195 implements an interface, use the implementing methods from that class.
20198 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20200 * threadpool.c: just return instead of ExitThread to allow for thread
20203 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
20205 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
20206 when closing resource modules.
20208 * reflection.c (mono_image_create_pefile): Handle the case when the
20209 entry point is not a MethodBuilder.
20211 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
20212 field to ReflectionMethod since it is not allways a builder.
20214 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
20216 * marshal.c (mono_marshal_get_managed_wrapper):
20217 mono_marshal_alloc takes native int so CONV_I
20218 the arg for 64bits.
20220 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
20222 * reflection.c (fixup_cattrs): New function to fixup the methoddef
20223 tokens in the cattr table. Fixes #53108.
20225 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20227 * loader.c: don't trim ".dll" before looking up in the config file.
20228 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
20230 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
20232 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
20233 Return the module which contains the resource as well.
20234 (ves_icall_System_Reflection_Module_Close): New icall.
20236 * appdomain.c: Bump corlib version number.
20238 * image.c (mono_image_addref): New public function.
20240 * assembly.c: Call mono_image_addref.
20242 * reflection.c (mono_module_get_object): Increase reference count of
20245 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
20248 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
20249 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
20250 proper exceptions on DllImport problems.
20252 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
20254 * class.c, metadata.c: eliminate CSIZE macro.
20256 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
20258 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
20259 * object.h: Added async_callback field in MonoAsyncResult.
20260 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
20261 * verify.c: Added async_callback in MonoAsyncResult layout.
20263 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
20265 * reflection.c (mono_reflection_get_custom_attrs): Add support
20268 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
20270 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
20272 (mono_marshal_method_from_wrapper): Add null pointer check.
20274 2004-01-16 Martin Baulig <martin@ximian.com>
20276 * debug-mono-symfile.h: Set version number to 36 and reflect
20277 latest symbol writer changes.
20279 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
20281 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
20282 multi-dimensional arrays.
20283 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
20284 (mono_class_from_mono_type): Use bounded_array_class_get.
20286 * class.c (mono_bounded_array_class_get): New function which takes
20287 a 'bounded' bool argument to distinguish vectors from one dimensional
20290 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
20291 bounded_array_class_get if the array has bounds.
20293 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
20294 Search modules loaded using AssemblyBuilder:AddModule as well.
20296 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20298 * appdomain.c: increased corlib version.
20299 * filewatcher.c: removed g_print.
20301 (get_property_info): only allocate what is actually requested.
20302 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
20304 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20306 * Makefile.am: added filewatcher.[ch]
20307 * filewatcher.[ch]: FileSystemWatcher runtime support.
20308 * icall.c: added new FSW icalls.
20310 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
20312 * string-icalls.c: fix stringbuilder regression as suggested by
20313 Iain McCoy <iain@mccoy.id.au>.
20315 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
20317 * process.c (process_read_stringtable_block): Recognize '007f' as
20318 a language neutral stringtable block.
20320 2004-01-12 Patrik Torstensson
20322 * object.h (MonoStringBuilder) : Changed layout to support our
20323 new stringbuilder class.
20324 * marshal.c: Change marshalling to support the new layout of
20326 * appdomain.c: increased version number because new layout of
20329 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
20331 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
20332 assembly name as an string instead of an AssemblyName, since it is
20333 easier to extract info from it.
20335 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
20336 the culture subdirectories too. Fixes #52231.
20338 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20340 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
20341 It takes 2 new parameters with an optional name for the method to look
20342 for and case ignoring info.
20344 * threadpool.c: removed unused variable.
20346 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20348 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
20349 It takes 2 new parameters with an optional name for the property to look
20350 for and case ignoring info.
20353 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
20355 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
20358 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20361 * assembly.c: escape the uri before passing it to g_filename_from_uri.
20364 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
20366 * reflection.c: Add support for more than one unmanaged resource.
20368 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
20369 in field->def_value, as done in all other cases.
20371 * reflection.c (mono_reflection_get_custom_attrs): Add support for
20374 * reflection.c (mono_reflection_create_runtime_class): Remove
20375 errorneous assignment to klass->element_class, since it is already
20376 done in mono_reflection_setup_internal_class.
20378 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20380 * gc.c: added missing LeaveCriticalSection.
20381 * icall.c: indented a couple of lines.
20382 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
20383 if we call EndInvoke inside a callback. Fixes bug #52601.
20385 2004-01-07 Martin Baulig <martin@ximian.com>
20387 * mono-debug-debugger.h
20388 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
20390 2004-01-06 Miguel de Icaza <miguel@ximian.com>
20392 * appdomain.c: Use messages in NotImplementedException.
20394 * exception.c (mono_get_exception_not_implemented): Now this takes
20395 a message argument.
20397 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
20398 exception instead of g_asserting an aborting when something is not
20401 Add some inline docs.
20403 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
20405 * reflection.h: Update after changes to object layout.
20407 * reflection.c: Implement saving of unmanaged aka win32 resources.
20409 * appdomain.c: Bump version number.
20411 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
20412 Handle missing domains gracefully.
20414 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
20416 * file-io.c : On Windows, there are much more invalid_path_chars.
20418 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
20420 * class.h, object.c: prepare for GetType () speedup.
20422 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
20424 * profiler.c: workaround for --profile null reference exception on
20425 cygwin. Patch by Patrik Torstensson.
20427 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
20429 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
20430 make work for unaligned access.
20432 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
20434 * class.c: small cleanup (class->fields [i] -> field).
20435 * image.c: check address of metadata is valid.
20437 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
20439 * assembly.h assembly.c (mono_assembly_loaded): New public function to
20440 search the list of loaded assemblies.
20442 * reflection.c (mono_reflection_type_from_name): Use
20443 mono_assembly_loaded instead of mono_image_loaded.
20445 * reflection.c: Fix warnings.
20447 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
20449 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
20450 is dynamic. This is needed since an assembly can contain both dynamic and
20451 non-dynamic images.
20453 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
20456 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
20458 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
20459 to store modules loaded using AddModule.
20461 * reflection.c (mono_image_fill_file_table): Generalize this so it works
20464 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
20466 * reflection.c (mono_image_fill_export_table_from_module): New function to
20467 fill out the EXPORTEDTYPES table from a module.
20469 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
20470 into a separate function. Also handle loaded non-dynamic modules.
20472 * reflection.c (mono_image_basic_init): Fix memory allocation.
20474 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20476 * assembly.c (mono_assembly_load_references): Make this public.
20478 2003-12-19 Martin Baulig <martin@ximian.com>
20480 * class.c (mono_class_initialize_generic): Made this static, take
20481 a `MonoGenericInst *' instead of a `MonoClass *'.
20482 (mono_class_from_generic): Call mono_class_initialize_generic()
20483 unless we're already initialized or being called from
20484 do_mono_metadata_parse_generic_inst().
20486 * class.h (MonoGenericInst): Added `initialized' and
20487 `init_pending' flags.
20489 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
20490 `mono_class_init (gklass)' or mono_class_initialize_generic()
20491 here; set `generic_inst->init_pending' while parsing the
20494 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
20496 * locales.c: include string.h for memxxx prototypes
20498 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
20500 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
20501 constructor when accessing literal fields.
20503 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
20505 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20507 * reflection.c (assembly_add_resource_manifest): New function to fill
20508 the MANIFESTRESOURCE table.
20510 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
20512 * reflection.h: Update to changes in class layout.
20514 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
20515 Reenable call to mono_runtime_is_shutting_down ().
20517 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
20518 determine if the runtime is shutting down.
20520 2003-12-16 Jackson Harper <jackson@ximian.com>
20522 * icall.c: comment out call to mono_runtime_is_shutting_down to
20525 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
20527 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
20528 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
20530 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
20532 * reflection.c: move definition of swap_with_size
20533 to before its first call
20535 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
20537 * appdomain.c (mono_runtime_is_shutting_down): New public function.
20539 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
20542 * object.c: Fix warnings.
20544 * icall.c (ves_icall_Type_Get...): Only consider inherited static
20545 members if FlattenHierarchy is set.
20547 * reflection.c (mono_image_add_decl_security): New function to emit
20548 declarative security.
20550 * reflection.h reflection.c: Add support for declarative security.
20552 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
20554 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
20556 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
20558 * appdomain.c verify.c: Moved corlib version checking into its own
20559 function in appdomain.c since it needs to create vtables etc.
20561 2003-12-13 Patrik Torstensson <p@rxc.se>
20563 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
20564 instead of unwrapped server.
20566 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
20568 * verify.c (check_corlib): Fix field index.
20570 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
20572 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
20575 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
20577 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
20578 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
20579 cope with sizeof(size_t) != sizeof(guint32).
20581 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20583 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
20584 in case of failure.
20586 2003-12-10 Mark Crichton <crichton@gimp.org>
20588 * icall.c: removed the GetNonZeroBytes. We now handle this case
20591 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
20593 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
20595 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
20598 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
20600 * verify.c (check_corlib): Handle the case when the version field is
20601 initialized by a static constructor.
20603 2003-12-08 Patrik Torstensson <p@rxc.se>
20605 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
20607 2003-12-08 Martin Baulig <martin@ximian.com>
20609 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
20610 a MonoReflectionGenericParameter, also take the parameter index
20611 and name as arguments.
20612 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
20613 (ves_icall_MonoGenericParam_initialize): New interncall.
20614 (ves_icall_Type_make_byref_type): New interncall.
20616 * reflection.h (MonoReflectionGenericParam): Derive from
20617 MonoReflectionType, not just from MonoObject. Added `refobj' and
20620 * reflection.c (mono_reflection_define_generic_parameter): Create
20621 and return a new MonoReflectionGenericParam; don't initialize the
20623 (mono_reflection_initialize_generic_parameter): New public method;
20624 initializes the constraints and creates the `param->pklass'.
20626 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
20628 * reflection.h reflection.c: Use the new fields 'num_types',
20629 'num_fields' and 'num_methods' to track the number of types etc.
20631 * verify.c (check_corlib): Check corlib version number.
20633 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
20635 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
20636 function works on all methods.
20638 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
20640 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
20641 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
20642 the custom_type_info flag of the transparent proxy.
20643 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
20644 objects that supports IRemotingTypeInfo.
20645 * object.h: Added custom_type_info field in transparent proxy.
20647 2003-12-06 Martin Baulig <martin@ximian.com>
20649 * class.c (mono_class_create_from_generic): Removed.
20650 (mono_class_from_generic): Check `ginst->klass' before doing
20651 anything else. This is important to fully support "recursive"
20654 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
20655 empty `generic_inst->klass' before doing anything else.
20657 2003-12-06 Dick Porter <dick@ximian.com>
20662 * locales.c: Use C structs to access class fields. Don't do a
20663 conversion between MonoString and UChar because both are
20664 platform-endian UTF-16. Compare now takes startindex and count
20665 parameters. Add a char overload for IndexOf. Speed up the
20666 invariant string IndexOf.
20668 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
20670 * Makefile.am (monosn_LDADD): Fix parallel build.
20672 2003-12-04 Martin Baulig <martin@ximian.com>
20675 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
20676 (ves_icall_Type_make_array_type): New interncall.
20678 2003-12-04 Martin Baulig <martin@ximian.com>
20680 * locales.c: also change it in the !HAVE_ICU case.
20682 2003-12-04 Dick Porter <dick@ximian.com>
20685 * locales.c: construct_compareinfo is now in CompareInfo, not
20688 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
20690 * image.c (mono_image_load_file_for_image): Cache loaded images in the
20691 image->files array.
20693 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
20696 * assembly.c (mono_assembly_load_references): Only load references
20699 * class.c (mono_class_from_name): Avoid linear search of the
20700 EXPORTEDTYPE table.
20702 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
20704 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
20706 * image.h (MonoImage): Add 'field_cache' field.
20708 * loader.c (mono_field_from_token): Cache field lookups.
20710 * reflection.c (mono_module_get_object): Fix name property.
20712 * icall.c (ves_icall_get_enum_info): Update after changes to
20713 mono_metadata_get_constant_index ().
20715 * icall.c: Get rid of get_type_info icall, use a separate icall for
20716 each type property to avoid needless memory allocations. Fixes #51514.
20718 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
20719 to avoid needless binary searches.
20721 * class.c (class_compute_field_layout): Move the initialization of
20722 field->def_value to mono_class_vtable ().
20724 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
20727 * object.c (mono_object_allocate): Make it inline.
20729 * object.c (mono_object_allocate_spec): Make it inline.
20731 2003-12-02 Dick Porter <dick@ximian.com>
20733 * locales.c (create_NumberFormat): NumberFormatInfo construction.
20734 Patch by Mohammad DAMT (mdamt@cdl2000.com).
20736 2003-12-01 Dick Porter <dick@ximian.com>
20738 * threads.c: Fix signature and call in CreateMutex and
20741 2003-12-01 Dick Porter <dick@ximian.com>
20744 * locales.c: Implement string compares and searching
20746 * object.h: Add extra Thread field
20748 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
20750 * reflection.c (fixup_method): Add support for MonoCMethod.
20752 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
20754 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
20756 * reflection.c (assembly_name_to_aname): Allow extra characters in
20757 assembly names. Fixes #51468.
20759 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
20761 * exception.c (mono_exception_from_name_domain): New helper function.
20763 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
20764 exception object in the correct domain.
20766 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
20767 formatting + make a copy a the input data.
20769 * loader.c (mono_get_method_from_token): Methods which contain
20770 native code do not have entries in the ImplMap.
20772 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
20773 Thanks to Gonzalo for spotting this.
20775 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
20776 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
20778 * assembly.h (mono_assembly_load_from): Split the second part of
20779 assembly loading into a new public function.
20781 * exception.h (mono_get_exception_bad_image_format): New function.
20783 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
20785 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
20786 Enumerate all modules inside a dynamic assembly. Fixes #51293.
20788 * icall.c: Add new icall for creating dynamic methods.
20790 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
20792 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
20794 * reflection.c (mono_reflection_create_dynamic_method): New icall to
20795 create a dynamic method.
20797 * reflection.c (resolve_object): New helper function.
20799 * reflection.c: Generalize ReflectionMethodBuilder and the functions
20800 which manipulate it so they can also work on dynamic methods.
20802 * reflection.c (reflection_method_builder_to_mono_method): Avoid
20803 creating the MonoReflectionMethodAux structure if it is not needed.
20805 * reflection.h verify.c: Update after changes to object layout.
20807 * reflection.c (method_builder_encode_signature): Fix compilation on
20810 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
20812 * appdomain.h: Added support for context static fields. Added static_data
20813 field to MonoAppContext and renamed thread_static_fields to a more
20814 generic special_static_fields in MonoAppDomain, since it can now contain
20815 context static fields.
20816 * domain.c: Updated hashtable name.
20817 * object.c: Replaced field_is_thread_static() for a more generic
20818 field_is_special_static() which also checks for context static attribute.
20819 In mono_class_vtable(), added support for static context fields.
20820 * threads.c: Changed methods that manage thread static fields to more
20821 generic methods so they can be reused both for thread and context static
20823 * threads.h: Declared some new methods.
20825 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
20827 * reflection.h: Update after changes to the managed types.
20829 * reflection.c (encode_custom_modifiers): New helper function.
20831 * reflection.c (method_encode_signature): Emit custom modifiers.
20833 * reflection.c (field_encode_signature): Emit custom modifiers.
20835 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
20837 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
20839 * icall.c (ves_icall_System_ValueType_Equals): New optimized
20842 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
20845 * object.c (mono_field_get_value_object): New function.
20847 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
20850 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
20852 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
20853 return a preallocated out-of-memory exception instance.
20855 * object.c (out_of_memory): Use the new function.
20857 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
20858 flag is before the custom modifiers. Fixes #49802.
20860 2003-11-16 Martin Baulig <martin@ximian.com>
20862 * class.c (mono_class_is_open_constructed_type): Implemented the
20863 MONO_TYPE_GENERICINST case.
20865 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
20867 * assembly.c (mono_assembly_fill_assembly_name): New function to
20868 fill out the MonoAssemblyName structure.
20869 (mono_assembly_open): Use the new function.
20871 * icall.c (fill_reflection_assembly_name): New helper function.
20873 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
20876 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
20878 2003-11-15 Martin Baulig <martin@ximian.com>
20880 * class.c (mono_class_is_open_constructed_type): New public
20881 function; checks whether a type is an open constructed type,
20882 ie. whether it still contains type parameters.
20883 (mono_class_inflate_generic_type): If we're a type parameter and
20884 the inflated type is also a MONO_TYPE_(M)VAR, return the original
20887 * class.h (MonoGenericInst): Added `guint32 is_open'.
20889 * loader.c (method_from_methodspec): Check whether we're an open
20890 or closed constructed type and set `ginst->is_open'.
20892 * reflection.c (mono_reflection_bind_generic_parameters): Check
20893 whether we're an open or closed constructed type and set
20895 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
20896 from open constructed types.
20898 2003-11-15 Martin Baulig <martin@ximian.com>
20900 * reflection.c (mono_reflection_bind_generic_parameters): If we're
20901 a generic instance (instead of a generic type declaration) with
20902 unbound generic parameters, bind them to our actual types.
20904 2003-11-14 Martin Baulig <martin@ximian.com>
20906 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
20908 * reflection.c (mono_reflection_bind_generic_parameters): If we're
20909 an interface type, populate `res->interfaces' with instantiated
20910 versions of all the interfaces we inherit.
20912 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
20914 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
20915 when MONO_PATH is set but doesn't contain the install dir.
20917 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20920 (ves_icall_Type_GetInterfaces): don't return an interface twice when
20921 it's also implemented in base classes. Fixes bug #50927.
20923 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
20925 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
20926 if this method is called from a finalizer. Fixes #50913.
20928 2003-11-12 Miguel de Icaza <miguel@ximian.com>
20930 * threads.c: Implement VolatileRead/VolatileWrite
20932 * icall.c: Add new icalls for VolatileRead/VolatileWrite
20934 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
20936 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
20937 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
20940 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
20941 from Peter Ross (pro@missioncriticalit.com).
20943 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
20945 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
20947 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
20949 * assembly.c (mono_assembly_load_references): Disable check because it
20950 triggers on older corlibs which lots of people have.
20952 2003-11-12 Jackson Harper <jackson@ximian.com>
20954 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
20955 load corlib.dll if mscorlib.dll is not found.
20956 * assembly.h: Remove corlib name define.
20959 * image.c: Change corlib name to mscorlib.
20961 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
20963 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
20965 2003-11-11 Miguel de Icaza <miguel@ximian.com>
20967 * appdomain.h: Added loader_optimization here to sync with the C#
20968 code, and add disallow_binding_redirects field.
20970 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
20972 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
20974 * reflection.c (mono_image_build_metadata): Fix crash on modules
20977 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
20979 * icall.c (ves_icall_get_method_info): Return callingConvention as
20982 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
20983 namespaces from the EXPORTEDTYPE table as well.
20985 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
20986 from all modules inside the assembly.
20988 2003-11-11 Martin Baulig <martin@ximian.com>
20990 * reflection.c (mono_reflection_bind_generic_parameters): Make
20991 this work for interfaces.
20993 2003-11-11 Martin Baulig <martin@ximian.com>
20995 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
20997 2003-11-11 Martin Baulig <martin@ximian.com>
20999 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
21000 "MonoInflatedMethod" and "MonoInflatedCtor".
21002 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
21004 * reflection.c (resolution_scope_from_image): Use the assembly table
21005 from the manifest module, since other modules don't have it.
21007 * debug-helpers.c (mono_type_full_name): New helper function.
21009 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
21011 * image.c (mono_image_load_file_for_image): New public function which
21012 is a replacement for the load_file_for_image in class.c.
21014 * assembly.c (mono_assembly_load_module): A wrapper for the function
21015 above which does assembly association and reference loading too.
21017 * class.c (mono_class_from_name): Call mono_assembly_load_module.
21019 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21021 * appdomain.c: not all of the attributes for the full assembly name
21022 are required and the order doesn't matter. Fixes bug #50787.
21024 2003-11-10 Dick Porter <dick@ximian.com>
21026 * locales.c: Use platform-endian UTF16
21028 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
21030 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
21032 2003-11-10 Martin Baulig <martin@ximian.com>
21035 (mono_metadata_load_generic_params): Make this actually work.
21037 * reflection.c (mono_reflection_bind_generic_parameters): If our
21038 parent is a generic instance, pass all the `types' to it, no
21039 matter whether it has the same number of type parameters or not.
21041 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
21043 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
21045 * assembly.c (mono_assembly_load_references): Move the image<->assembly
21046 assignment code to this function so it gets called recursively for all
21049 * image.c (load_modules): Remove the assembly assignment since it is
21050 now done by mono_assembly_load_references.
21052 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
21053 Add 'module' argument.
21054 (mono_module_get_types): New helper function.
21055 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
21057 2003-11-08 Martin Baulig <martin@ximian.com>
21059 * class.c (mono_class_inflate_generic_method): Interface method
21060 don't have a header.
21062 * reflection.c (mono_image_get_methodspec_token): Take an
21063 additional `MonoGenericInst *' argument instead of reading it from
21064 the header; this is necessary to support interfaces.
21065 (mono_image_create_token): Pass the `MonoGenericInst *' from the
21066 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
21067 (inflated_method_get_object): Take an additional `MonoGenericInst *'
21070 * reflection.h (MonoReflectionInflatedMethod): Added
21071 `MonoGenericInst *ginst'.
21073 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
21075 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
21077 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
21079 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
21081 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
21084 (reflection_methodbuilder_from_method_builder):
21085 (reflection_methodbuilder_from_ctor_builder): New helper functions to
21086 initialize a ReflectionMethodBuilder structure.
21087 (mono_image_get_methodbuilder_token):
21088 (mono_image_get_ctorbuilder_token): New functions to emit memberref
21089 tokens which point to types in another module inside the same assembly.
21091 * reflection.c: Use the new helper functions.
21093 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
21095 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
21096 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
21098 * reflection.c (resolution_scope_from_image): Emit a moduleref if
21101 * reflection.c (mono_image_build_metadata): Emit metadata only for the
21102 current module. Emit the manifest only for the main module.
21104 * reflection.c (mono_image_create_token): Add assertion when a
21105 memberref needs to be created.
21107 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
21109 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
21110 larger buffer for the custom attribute blob. Fixes #50637.
21112 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21114 * threadpool.c: notify listener on async processing handles after
21115 invoking the async callback. Thanks to Zoltan.
21117 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
21119 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
21120 avoid code duplication.
21122 * reflection.h (MonoDynamicImage): New type which is currently unused,
21123 but will be used through the ref.emit code in place of
21124 MonoDynamicAssembly.
21126 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
21129 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
21130 a MonoDynamicImage instead of just a MonoImage.
21132 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
21133 icalls to ModuleBuilder but keep their semantics, so they will work
21134 with moduleb->assemblyb. This will change later.
21136 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
21138 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
21141 * reflection.c (mono_image_build_metadata): Avoid creation of a default
21142 main module, since it is now done by the managed code.
21144 2003-11-03 Martin Baulig <martin@ximian.com>
21146 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
21147 `ginst->klass' here.
21148 (method_encode_methodspec): Don't use the `ginst->generic_method's
21149 klass if it's a generic instance, use `ginst->klass' in this case.
21151 2003-11-03 Martin Baulig <martin@ximian.com>
21153 * reflection.c (mono_image_get_generic_method_param_info):
21154 Removed, use mono_image_get_generic_param_info() instead.
21155 (mono_image_get_type_info): Write the GenericParam table before
21156 the Method table. This is neccessary because in the GenericParam
21157 table, type parameters of the class (ie. '!0' etc.) must come
21158 before the ones from its generic methods (ie. '!!0' etc).
21160 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
21162 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
21164 2003-11-02 Martin Baulig <martin@ximian.com>
21166 * reflection.c (create_generic_typespec): Take a
21167 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
21168 the generic parameters from it.
21170 2003-11-02 Martin Baulig <martin@ximian.com>
21172 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
21173 instead of a `MonoClassField *' since we just need the type.
21174 (create_generic_typespec): New static function. Creates a
21175 TypeSpec token for a generic type declaration.
21176 (mono_image_get_generic_field_token): New static function.
21177 (mono_image_create_token): If we're a FieldBuilder in a generic
21178 type declaration, call mono_image_get_generic_field_token() to get
21181 2003-11-02 Martin Baulig <martin@ximian.com>
21184 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
21185 `MonoReflectionGenericInst *declaring_type' and
21186 `MonoReflectionGenericInst *reflected_type' fields.
21188 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
21189 `MonoReflectionGenericInst *declaring_type' and a
21190 `MonoReflectionGenericInst *reflected_type' argument instead of a
21191 single `MonoReflectionGenericInst *type' one. Set
21192 `res->declaring_type' and `res->reflected_type' from them.
21193 (mono_reflection_inflate_field): Likewise.
21195 2003-11-02 Martin Baulig <martin@ximian.com>
21197 * class.c (mono_class_setup_vtable): Don't store generic methods
21200 2003-11-02 Martin Baulig <martin@ximian.com>
21202 * reflection.h (MonoReflectionGenericInst): Added
21203 `MonoReflectionType *declaring_type'.
21205 * reflection.c (mono_reflection_bind_generic_parameters): Use
21206 `if (tb->parent)' instead of `klass->parent'.
21208 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
21210 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
21211 with an empty ASSEMBLY table.
21213 * reflection.c (mono_image_build_metadata): Avoid using the same loop
21214 variable in the inner and outer loops.
21216 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
21218 * metadata.h (mono_metadata_make_token): Put parentheses around macro
21221 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
21223 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
21224 icalls. Instead, do everything in managed code. This is needed since
21225 it is hard to restore the original domain etc. in unmanaged code in the
21226 presence of undeniable exceptions.
21228 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
21229 New icalls to push and pop appdomain refs.
21231 2003-10-31 Martin Baulig <martin@ximian.com>
21233 * class.c (inflate_generic_type): Renamed to
21234 mono_class_inflate_generic_type() and made it public.
21236 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
21239 * loader.c (mono_field_from_memberref): Also set the retklass for
21242 * fielder.c (mono_image_get_inflated_field_token): New static
21243 method; creates a metadata token for an inflated field.
21244 (mono_image_create_token, fixup_method): Added support for
21245 "MonoInflatedField".
21246 (fieldbuilder_to_mono_class_field): New static function.
21247 (mono_reflection_inflate_field): New public function.
21250 (MonoReflectionGenericInst): Added `MonoArray *fields'.
21251 (MonoReflectionInflatedField): New typedef.
21253 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
21255 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
21256 for Solaris and other platforms without s6_addr16
21258 2003-10-30 Martin Baulig <martin@ximian.com>
21260 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
21261 argument instead of two.
21262 (mono_class_inflate_generic_signature): Likewise.
21263 (inflate_generic_header): Likewise.
21264 (mono_class_inflate_generic_method): Likewise. In addition, if
21265 `ginst->klass' is set, it becomes the new `method->klass'.
21267 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
21270 * reflection.c (encode_generic_method_sig): Write a 0xa as the
21271 first byte. [FIXME]
21272 (method_encode_methodspec): If we have generic parameters, create
21273 a MethodSpec instead of a MethodRef.
21274 (fixup_method): Added support for "MonoInflatedMethod" and
21275 "MonoInflatedCtor".
21276 (mono_image_create_token): Added support for "MonoInflatedMethod"
21277 and "MonoInflatedCtor".
21278 (inflated_method_get_object): New static function; returns a
21279 managed "System.Reflection.MonoInflatedMethod" object.
21280 (mono_reflection_bind_generic_method_parameters): Return a
21281 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
21282 (mono_reflection_inflate_method_or_ctor): Likewise.
21283 (mono_image_get_generic_method_param_info): Initialize unused
21285 (mono_image_get_generic_param_info): Likewise.
21287 * reflection.h (MonoReflectionInflatedMethod): New public
21288 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
21289 "S.R.MonoInflatedCtor" classes.
21291 * loader.c (method_from_memberref): If we're a TypeSpec and it
21292 resolves to a generic instance, inflate the method.
21294 2003-10-28 Dick Porter <dick@ximian.com>
21296 * object.c (mono_runtime_run_main): Convert command-line arguments
21297 into utf8, falling back to the user's locale encoding to do so.
21299 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
21301 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
21304 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
21306 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
21307 up icalls at method definition time. Partially fixes #33569.
21309 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
21311 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
21312 marshalling of arrays. Fixes #50116.
21314 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
21316 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
21317 points to a vtable in the dying appdomain.
21319 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
21320 listeners into unmanaged code inside the lock.
21322 * object.c (mono_class_vtable): Turn off typed allocation in non-root
21323 domains and add some comments.
21325 2003-10-25 Martin Baulig <martin@ximian.com>
21327 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
21329 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
21331 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
21332 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
21333 currently parsing. Create the generic class and store it in
21334 `generic_inst->klass' before parsing the type arguments. This is
21335 required to support "recursive" definitions; see mcs/tests/gen-23.cs
21337 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
21338 to support recursive typespec entries.
21340 * class.c (mono_class_setup_parent): If our parent is a generic
21341 instance, we may get called before it has its name set.
21342 (mono_class_from_generic): Splitted into
21343 mono_class_create_from_generic() and mono_class_initialize_generic().
21345 2003-10-25 Martin Baulig <martin@ximian.com>
21347 * icall.c (ves_icall_Type_BindGenericParameters): Return a
21348 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
21349 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
21350 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
21352 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
21353 (create_typespec): Likewise.
21354 (mono_reflection_bind_generic_parameters): Return a
21355 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
21356 (mono_reflection_inflate_method_or_ctor): New public function.
21358 * reflection.h (MonoReflectionGenericInst): New typedef.
21360 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
21362 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
21363 inside the domain lock. Fixes #49993.
21365 * object.c (mono_class_vtable): When typed allocation is used,
21366 allocate vtables in the GC heap instead of in the mempool, since the
21367 vtables contain GC descriptors which are used by the collector even
21368 after the domain owning the mempool is unloaded.
21370 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
21372 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
21373 reflect what it does. Also invalidate mempools instead of freeing
21374 them if a define is set.
21376 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
21379 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
21380 hold the finalizable objects in this domain.
21382 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
21385 * appdomain.c (mono_domain_set): New function to set the current
21386 appdomain, but only if it is not being unloaded.
21388 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
21389 appdomain which is being unloaded.
21391 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
21392 unloading of the root appdomain.
21394 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
21395 icall to execute a method in another appdomain. Intended as a
21396 replacement for InternalSetDomain, which can confuse the code
21397 generation in the JIT.
21399 * appdomain.c (mono_domain_is_unloading): New function to determine
21400 whenever an appdomain is unloading.
21402 * appdomain.c (mono_domain_unload): New function to correctly unload
21405 * assembly.c (mono_assembly_load_references): Check that an assembly
21406 does not references itself.
21408 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
21409 domain manually, it asks the finalizer thread to do it, then waits for
21410 the result. Also added a timeout.
21412 * icall.c: Register the new icalls.
21414 * threads.h threads.c: Export the mono_gc_stop_world and
21415 mono_gc_start_world functions.
21417 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
21418 function to fill out the mempool with 0x2a.
21420 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
21422 * reflection.h (MonoReflectionMethodAux): New structure to store
21423 information which is rarely used, thus is not in the MonoMethod
21426 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
21427 store the aux info.
21429 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
21430 and marshalling info into the aux structure.
21432 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
21433 from the aux structure.
21435 * loader.c (mono_method_get_param_names): Retrieve the param names from
21438 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
21440 * exception.h exception.c: Add AppDomainUnloadedException && fix
21443 2003-10-21 Dick Porter <dick@ximian.com>
21446 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
21447 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
21449 2003-10-21 Martin Baulig <martin@ximian.com>
21451 * reflection.c (mono_reflection_bind_generic_parameters):
21452 `klass->parent' is NULL for interfaces.
21454 2003-10-21 Martin Baulig <martin@ximian.com>
21456 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
21458 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
21460 * exception.c (mono_exception_from_name_msg): New helper function for
21461 creating exceptions and initializing their message field.
21463 * exception.c: Simplify functions using the new helper.
21465 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
21468 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
21469 mono_raise_exception, since otherwise gcc doesn't generate the function
21470 epilog for raise_exception, confusing the stack unwinding in the JIT.
21473 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
21474 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
21477 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21479 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
21482 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
21484 * icall.c: Removed GetUninitializedObject method because
21485 AllocateUninitializedClassInstance does the same.
21487 2003-10-18 Martin Baulig <martin@ximian.com>
21489 * class.c (inflate_generic_signature): Renamed to
21490 mono_class_inflate_generic_signature() and made it public.
21491 (my_mono_class_from_generic_parameter): New static function; if we
21492 don't already have the generic parameter's MonoClass, create a
21493 very simple one which is just used internally in the runtime and
21494 not passed back to managed code.
21496 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
21498 * metadata.h (MonoMethodSignature): Moved the
21499 `MonoGenericParam *gen_params' to the MonoMethodHeader.
21500 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
21502 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
21503 ves_icall_MonoMethod_GetGenericArguments(); this is now an
21504 interncall on the MonoMethod class, not on MethodInfo.
21505 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
21506 calling mono_reflection_bind_generic_method_parameters() directly.
21508 * loader.c (mono_method_get_signature): If this is a MethodSpec;
21509 return the already computed `method->signature'.
21510 (method_from_methodspec): New static function to load a method
21511 from a MethodSpec entry.
21512 (mono_get_method_from_token): Call the new method_from_methodspec()
21513 for MethodSpec tokens.
21514 (mono_get_method_from_token): If we're a generic method, load the
21517 * reflection.c (mono_image_get_memberref_token): Allow
21518 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
21520 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
21521 (mono_image_create_token): First check whether it's a generic
21522 method (so we'd need to create a MethodSpec), then do the other
21524 (mono_reflection_bind_generic_method_parameters): Return a
21525 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
21526 called directly from the interncall.
21528 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
21530 * reflection.c (load_public_key): Move loading of the public key
21533 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
21535 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
21538 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
21539 culture, hash_alg and public_key. Fixes #49555.
21541 2003-10-17 Martin Baulig <martin@ximian.com>
21543 * class.h (MonoGenericInst): Moved this declaration here and added
21544 `MonoMethod *generic_method'.
21547 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
21548 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
21550 * metadata.c (mono_metadata_type_equal): Two types of
21551 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
21552 index; ie. don't compare the address of the `MonoGenericParam'
21554 (mono_metadata_load_generic_params): Removed the `MonoMethod
21557 * metadata.h (MonoGenericInst): Moved declaration to class.h.
21558 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
21560 * reflection.c (method_encode_signature): Encode the number of
21561 generic parameters.
21562 (encode_generic_method_sig): New static function.
21563 (method_encode_methodspec): New static function; creates an entry
21564 in the MethodSpec table for a generic method.
21565 (mono_image_get_methodspec_token): New static function.
21566 (mono_image_create_token): Call mono_image_get_methodspec_token()
21567 for generic methods.
21568 (mono_reflection_bind_generic_method_parameters): New public
21569 function. Instantiates a generic method.
21571 2003-10-16 Martin Baulig <martin@ximian.com>
21573 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
21574 *gen_params' here from MonoMethodHeader.
21576 * metadata.c (mono_metadata_parse_method_signature): If we have
21577 generic parameters, initialize `method->gen_params' and then set
21578 the correct `type->data.generic_param' in all the parameters.
21580 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
21582 * threads.c (mono_threads_get_default_stacksize): New function to
21583 return the default stacksize.
21585 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
21586 termination of the finalizer thread, since the previous method had
21587 race conditions. Fixes #49628.
21589 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
21590 as for the other managed threads.
21592 2003-10-16 Martin Baulig <martin@ximian.com>
21594 * class.c (inflate_generic_signature): Copy `generic_param_count'
21597 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
21600 * metadata.c (mono_metadata_parse_method_signature): Actually set
21601 the `method->generic_param_count' here.
21602 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
21604 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
21606 * object.h: Add a new field to TypedRef to simplify the implementation
21607 of the REFANY opcodes in the JIT.
21609 * icall.c: Make use of the new field.
21611 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
21614 2003-10-15 Martin Baulig <martin@ximian.com>
21616 * class.c (mono_class_from_gen_param): Renamed to
21617 mono_class_from_generic_parameter() and moved most of the
21618 functionality from mono_reflection_define_generic_parameter()
21619 here; ie. we create a "real" class here.
21620 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
21621 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
21622 previously been called.
21624 * class.h (MonoGenericParam): Moved the declaration of this struct
21625 here from metadata.h and added `MonoMethod *method'.
21627 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
21630 * loader.c (mono_get_method_from_token): If we have any generic
21631 parameters, call mono_metadata_load_generic_params() to read them
21632 from the MONO_TABLE_GENERICPAR.
21634 * metadata.c (mono_metadata_load_generic_params): Added
21635 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
21637 * metadata.h (MonoMethodSignature): Replaced
21638 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
21639 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
21641 * reflection.c (mono_reflection_define_generic_parameter): Moved
21642 most of the functionality into the new
21643 mono_class_from_generic_parameter(); set the `method' field if
21644 we're a method parameter.
21646 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
21648 * marshal.c (emit_struct_conv): if native size is 0
21651 2003-10-14 Martin Baulig <martin@ximian.com>
21653 * icall.c: The generics API has changed in the spec since it was
21654 added to System.Type; these modifications make it match the spec
21656 (ves_icall_Type_GetGenericParameters): Renamed to
21657 `ves_icall_Type_GetGenericArguments'.
21658 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
21659 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
21660 `ves_icall_MonoType_get_HasGenericArguments'.
21661 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
21662 `ves_icall_MonoType_get_IsGenericParameter'.
21663 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
21664 this is no interncall anymore.
21665 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
21666 `ves_icall_TypeBuilder_get_IsGenericParameter'.
21668 2003-10-14 Martin Baulig <martin@ximian.com>
21670 * reflection.c (mono_reflection_bind_generic_parameters): Also
21671 inflate generic methods if we're reading the class from IL.
21673 2003-10-13 Martin Baulig <martin@ximian.com>
21675 * reflection.c (mono_reflection_define_generic_parameter): This
21676 method isn't called directly from the icall anymore; take a
21677 `MonoReflectionAssemblyBuilder *' so we can use this for type and
21678 method generic parameters.
21679 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
21680 (method_builder_encode_signature): Encode generic parameters.
21681 (mono_image_get_method_info): Write generic params to the
21682 MONO_TABLE_GENERICPARAM table.
21684 * reflection.h (MonoReflectionMethodBuilder): Added
21685 `MonoArray *generic_params'.
21687 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
21689 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
21690 wrapper for mono_reflection_define_generic_parameter().
21691 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
21693 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
21695 * marshal.h: Add missing function to fix build.
21697 * marshal.c (mono_marshal_get_native_wrapper): Add support for
21698 the SetLastError pinvoke attribute.
21700 * marshal.c (mono_marshal_set_last_error): New helper function called
21701 by the generated code.
21703 * marshal.c (mono_mb_emit_branch): New helper function.
21705 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
21707 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
21708 classes as parameters and return values of delegates. Fixes #29256.
21710 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
21712 * locales.c: use gint32 in non HAVE_ICU case
21714 2003-10-11 Martin Baulig <martin@ximian.com>
21716 * mono-debug.c (mono_debug_add_method): Added a workaround for
21719 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
21721 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
21722 delegates passed to native code must use the STDCALL calling
21723 convention. Fixes #35987.
21725 2003-10-10 Martin Baulig <martin@ximian.com>
21727 * class.c (inflate_generic_type): If we're inflating for a generic
21728 type instance (and not for a generic method), return
21729 MONO_TYPE_MVAR unchanged.
21731 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21733 * string-icalls.c: Join ignores null strings in the source array.
21734 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
21735 * threads.c: GetAvailableTheads is slightly more accurate.
21737 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
21739 * threads.h threads.c : add mono_threads_set_default_stacksize
21740 and pass default to CreateThread calls.
21742 2003-10-09 Dick Porter <dick@ximian.com>
21746 * locales.c: Internal calls for constructing CultureInfo and
21747 related objects from libicu (if its available.)
21749 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
21751 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
21753 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21755 * threadpool.c: added an argument to async_invoke_thread that is the
21756 item to process, pass the MonoAsyncResult to the thread start function
21757 when creating a new thread. This way we don't need to acquire any lock
21758 when we're creating a new thread. Readded a semaphore for faster
21759 response times (instead of that Sleep i added).
21761 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
21763 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
21764 get daylight change dates better on Windows, fix handling
21765 of platforms without tm_gmtoff.
21767 2003-10-06 Martin Baulig <martin@ximian.com>
21769 * class.c (inflate_generic_method): Renamed to
21770 mono_class_inflate_generic_method() and made public.
21771 (mono_class_init): Don't inflate the generic methods here.
21772 (mono_class_from_generic): Added `gboolean inflate_methods'
21773 argument. Inflate the methods here.
21775 * loader.c (mono_method_get_param_names): Ignore instances of
21776 generic types for the moment.
21778 * reflection.c (fixup_method): Added support for inflated methods.
21779 (mono_image_create_token): Use mono_image_get_methodref_token()
21780 for inflated methods.
21781 (mono_custom_attrs_from_param): Ignore instances of generic types
21783 (mono_reflection_bind_generic_parameters): New public function.
21784 Moved all the functionality from
21785 ves_icall_Type_BindGenericParameters() here and added support for
21787 (mono_reflection_define_generic_parameter): Initialize
21788 `klass->methods' here.
21790 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
21791 functionality into mono_reflection_define_generic_parameter().
21792 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
21793 TypeBuilder, return that TypeBuilder.
21795 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21797 * appdomain.c: removed mono_delegate_semaphore.
21800 (mono_thread_pool_add): moved hash table creation inside and the thread
21801 creation outside of the critical region.
21802 (mono_thread_pool_finish): removed obsolete code.
21803 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
21804 continue or exit the thread depending on the queue.
21806 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
21808 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
21809 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
21810 handle more bool marshalling options
21812 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
21814 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
21815 arrays of structs. Also add a more descriptive error message when
21816 a structure member is marshalled as LPArray.
21818 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
21820 * marshal.c (mono_marshal_get_native_wrapper): Add support for
21821 marshalling arrays of complex types. Fixes #29098. Also remove an
21822 usused and incomplete function.
21824 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
21826 * gc.c: report heap_size - free_bytes as total memory allocated
21829 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
21831 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
21832 fix timezone handling problems on Windows.
21834 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
21835 asserts when the year is outside the range handled by ms the functions.
21837 * class.c (setup_interface_offsets): If the class is an interface,
21838 fill out its interface_offsets slot.
21840 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21842 * threadpool.c: mark threadpool threads as background.
21844 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
21846 * decimal.c - define DECINLINE to nothing if not using GCC
21848 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
21850 * assembly.c: More refcount fixes.
21852 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21854 * string-icalls.c: if we're not trimming, return the same string.
21855 When not splitting, don't create a new string.
21857 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21860 (mono_image_open): increment the ref_count inside the critical section.
21862 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
21864 * image.c (mono_image_open): Fix reference counting bug.
21866 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
21868 * marshal.c (mono_marshal_type_size) struct alignment changed for
21869 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
21870 64bits. Avoid leak in mono_marshal_get_native_wrapper when
21871 mono_lookup_pinvoke_call throws.
21873 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
21875 * reflection.c (mono_reflection_parse_type): Fix #49114.
21877 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
21878 temporary workaround for cygwin header problem.
21880 * object.c (mono_object_isinst): Synchronize this with the code
21881 generated by the JIT for casts.
21883 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
21885 * reflection.c (encode_type): Fix #38332.
21887 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
21889 * marshal.c (mono_marshal_method_from_wrapper): New function to return
21890 the original method from the wrapper method.
21892 2003-09-25 Martin Baulig <martin@ximian.com>
21894 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
21895 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
21896 (ves_icall_Type_get_IsGenericInstance): New interncall.
21898 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
21900 * object.c: fix cast warning in big endian code.
21902 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
21904 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
21906 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21908 * assembly.c: don't call check_env from mono_assembly_load. It's
21909 already done once in mono_assemblies_init and may cause headaches when
21910 multiple threads are loading assemblies.
21912 2003-09-19 Martin Baulig <martin@ximian.com>
21914 * reflection.c (mono_reflection_define_generic_parameter): Don't
21915 allocate `klass->methods', set `klass->flags' to
21916 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
21918 2003-09-18 Martin Baulig <martin@ximian.com>
21920 * class.c (mono_class_init): Don't create `class->methods' if it's
21921 already initialized.
21923 * metadata.c (mono_metadata_load_generic_params): Make this
21926 * reflection.c (mono_reflection_define_generic_parameter): Set
21927 parent class and interfaces from the constraints.
21929 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
21930 to keep this struct in sync with the declaration in TypeBuilder.cs.
21932 2003-09-17 Martin Baulig <martin@ximian.com>
21934 * metadata.h (MonoType): Replaced the data's `int type_param'
21935 field with `MonoGenericParam *generic_param'.
21936 (MonoGenericParam): Added `MonoClass *klass'.
21938 * class.c (mono_class_from_gen_param): Removed the
21939 `MonoImage *image' and `int type_num' arguments.
21941 * metadata.c (mono_metadata_parse_generic_param): New static
21942 method; creates a MonoGenericParam which just contains the index.
21943 (do_mono_metadata_parse_type): Call
21944 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
21947 * reflection.c (mono_image_typedef_or_ref): Generic type
21948 parameters may be in the same assembly, but never use a typedef
21950 (mono_reflection_define_generic_parameter): We're now creating a
21951 "real" class for the type parameter; it's now safe to call
21952 mono_class_from_mono_type() on the class'es type, it'll do the
21955 2003-09-16 Martin Baulig <martin@ximian.com>
21957 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
21958 `symfile->range_entry_size' and `symfile->class_entry_size' here;
21959 the `symfile' data structure must be fully initialized before it
21960 gets added to the table.
21962 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
21964 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
21966 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
21967 class init trampolines.
21969 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
21971 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
21972 to the built-in profiler to turn off time and allocation profiling
21975 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
21977 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
21980 * debug-helpers.c (mono_method_full_name): Print the wrapper type
21981 in human readable form.
21983 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
21985 * reflection.c icall.c: Fixed warnings.
21987 * image.c (load_class_names): Use a temporary hash table to hold the
21988 namespaces in order to avoid doing many string comparisons.
21990 * image.h: Fix typo.
21992 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
21993 Pass NULL instead of g_direct_equal to the GHashTable constructor
21994 since the NULL case is short-circuited inside g_hash_table_lookup,
21995 leading to better performance.
21997 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
21998 obtain the first custom attribute for a given index. Depends on the
21999 CustomAttribute table being sorted by the parent field.
22001 * reflection.c (mono_custom_attrs_from_index): Use the new function
22002 for better performance.
22004 2003-09-07 Martin Baulig <martin@ximian.com>
22006 * class.c (mono_class_init): If we're a generic instance, inflate
22007 all our methods instead of loading them from the image.
22008 (mono_class_from_generic): Set `class->methods = gklass->methods'.
22010 2003-09-07 Martin Baulig <martin@ximian.com>
22012 * mono-debug-debugger.c: Added support for constructors.
22014 2003-09-06 Martin Baulig <martin@ximian.com>
22016 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
22019 * reflection.c (mono_reflection_setup_generic_class): Call
22020 ensure_runtime_vtable() to create the vtable.
22022 2003-09-05 Martin Baulig <martin@ximian.com>
22024 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
22027 2003-09-04 Martin Baulig <martin@ximian.com>
22029 * reflection.c (mono_reflection_define_generic_parameter): Generic
22030 parameters start with zero.
22032 2003-09-04 Martin Baulig <martin@ximian.com>
22034 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
22036 * reflection.h (MonoReflectionGenericParam): New typedef.
22037 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
22038 the generic parameters from the managed TypeBuilder.
22040 * reflection.c (mono_reflection_define_generic_parameter): New function.
22041 (mono_reflection_create_runtime_class): Encode generic parameters.
22042 (mono_reflection_setup_generic_class): New function; this is
22043 called after adding adding all generic params to the TypeBuilder.
22044 (encode_type): Added MONO_TYPE_VAR.
22046 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
22048 * class.h class.c (mono_class_needs_cctor_run): Moved this method
22051 * assembly.h assembly.c: Moved the AOT loading code into an assembly
22054 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
22056 * reflection.h reflection.c class.h class.c: Delete duplicate
22057 definition of mono_type_get_name () from reflection.c and export the
22060 * class.c: Class loading fixes from Bernie Solomon
22061 (bernard@ugsolutions.com).
22063 * reflection.c: Endianness fixes from Bernie Solomon
22064 (bernard@ugsolutions.com).
22066 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
22068 * assembly.h assembly.c: Define a file format version for AOT
22071 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
22073 * appdomain.h (MonoJitInfo): New field to determine whenever the
22074 code is domain neutral.
22076 2003-08-31 Miguel de Icaza <miguel@ximian.com>
22078 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
22080 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
22082 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
22083 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
22084 Avoid caching the result since strings must be domain specific. Fixes
22087 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
22089 * marshal.c (mono_marshal_init): Make this callable multiple times
22090 since it is hard to find a correct place to call it.
22092 * object.c (mono_runtime_class_init): Execute static constructors in
22093 the correct appdomain.
22095 * image.c (build_guid_table): Handle the case when multiple images have
22098 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22100 * icall.c: added a couple of icalls for System.Web.
22102 2003-08-28 Martin Baulig <martin@ximian.com>
22104 * icall.c (ves_icall_Type_BindGenericParameters): Use
22105 `klass->generic_inst' instead of `&klass->byval_arg' in the
22106 mono_type_get_object() call. The returned type must be
22107 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
22109 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
22113 * object.c (mono_class_proxy_vtable): Make it thread safe.
22115 * pedump.c: Fix warning.
22117 * object.c appdomain.h: Get rid of metadata_section.
22118 It is no longer needed and it was causing deadlocks with domain->lock.
22120 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
22122 2003-08-26 Martin Baulig <martin@ximian.com>
22124 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
22126 2003-08-26 Martin Baulig <martin@ximian.com>
22128 * pedump.c (main): Call mono_metadata_init(),
22129 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
22130 and mono_loader_init().
22132 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
22134 * loader.h: Add missing include to fix build.
22136 * image.h: mono_image_load_references is no more.
22138 * assembly.c: Reworked assembly loading to make it really thread safe.
22139 After these changes, the assembly returned by mono_assembly_open is
22140 fully initialized, i.e. all its references assemblies are loaded.
22142 * assembly.c (mono_image_load_references): Renamed to
22143 mono_assembly_load_references, and made private, since clients no
22144 longer need to call it.
22146 * class.c: Removed calls to mono_assembly_load_references, since it was
22147 a source of deadlocks.
22149 * loader.h loader.c class.h class.c: Protect data structures using a
22150 new lock, the loader lock.
22152 * class.c (mono_class_setup_vtable): Create temporary hash tables and
22153 GPtrArrays only when needed.
22155 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
22156 into empty structures by mcs. Fixes pinvoke7.cs.
22158 * domain.c (mono_init): Call a new initialization function.
22160 * appdomain.c (mono_runtime_init): Call the new initializer function
22161 of the marshal module.
22163 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
22164 inserted into empty structures by mcs. Fixes pinvoke7.cs.
22166 * marshal.h marshal.c: Added locks around the wrapper caches to make
22167 this module thread safe.
22169 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
22170 this argument. Fixes pinvoke1.exe.
22172 2003-08-25 Lluis Sanchez <lluis@ximian.com>
22174 * object.h: Added call_type field to MonoMethodMessage and the corresponding
22175 enumeration of values. Removed fields to store remote call output values in
22176 MonoAsyncResult. Not needed any more.
22177 * object.c: Initialize call_type and async_result fields in mono_message_init.
22178 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
22179 dispatching the message.
22180 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
22181 async call to finish. To do it use a message with EndInvoke call type.
22183 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
22185 * loader.h loader.c (mono_method_hash_marhal_info): New function which
22186 determines whenever a method has marshalling info.
22188 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22190 * assembly.c: fix the build on windows.
22192 2003-08-22 Lluis Sanchez <lluis@ximian.com>
22194 * object.cs: Fixed bug #47785.
22196 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
22198 * string-icalls.c (StringReplace): If their are no occurances of
22199 the old string found return a reference to the supplied
22200 string. This saves some memory and matches MS behavoir.
22202 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22204 * socket-io.c: fixed compilation for systems that define AF_INET6
22205 and don't define SOL_IP/SOL_IPV6.
22207 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
22209 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
22210 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
22212 * rawbuffer.c rawbuffer.h: Make this module thread safe.
22214 * domain.c: Make this module thread safe.
22216 * domain.c (mono_init): Call new initialization function.
22218 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
22219 reference types too. Fixes #38812.
22221 * image.c (mono_image_init): Fixed warnings.
22223 * class.c (mono_class_from_typeref): Handle assembly load failure
22226 * appdomain.c (add_assemblies_to_domain): Handle the case when
22227 the references of an assembly are not yet loaded.
22229 * metadata.c image.c assembly.c: Moved initialization of global
22230 variables to a separate function called at startup since lazy
22231 initialization of these variables is not thread safe.
22233 * image.c assembly.c: Made this module thread safe by adding locks in
22234 the appropriate places.
22236 * domain.c (mono_init): Call the new initialization functions of the
22239 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
22241 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
22242 make a direct call. It is proxy's work to make the call asynchronous.
22243 mono_delegate_end_invoke(): If the targe is a proxy, just collect
22245 * object.cs: mono_method_call_message_new(): read AsyncResult and
22246 state object from parameters list, if this info is requested.
22247 * object.h: Added fields to store remote call output values in
22248 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
22250 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
22252 * object.h: add needed fields to MonoThread.
22253 * threads.c, threads.h: allow registering a function to cleanup data
22254 allocated per thread by the JIT.
22256 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22258 * loader.h: portability fix by Bernie Solomon
22259 * <bernard@ugsolutions.com>.
22261 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
22263 * reflection.h reflection.c (mono_param_get_objects): Changed this to
22264 return a MonoArray. This simplifies the code and also ensures that
22265 the cache allways contains an object reference as a value.
22267 * icall.c (ves_icall_get_parameter_info): Simplified using the new
22270 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22272 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
22273 fixes a problem with byte ordering when getting the address family for
22276 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
22278 * .cvsignore: Added monosn.
22280 * reflection.h reflection.c loader.c: Added support for parameter
22281 marshalling to dynamically created types. Fixes #47295.
22283 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
22285 * rand.c: remove useless warnings.
22287 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
22289 * class.c: implemented ldtoken for methods and fieldrefs.
22291 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22293 * threadpool.c: when mono_async_invoke was called, no one took care of
22294 monitoring the queue. So if the method invoked took some time and we
22295 got new async invoke requests after 500 ms (the thread created waited
22296 that long in WaitForSingleObject), the new async invoke was not called
22297 until the previous one finished.
22299 This is fixed now. Thanks to Totte for helping with it.
22301 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22303 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
22305 2003-08-11 Martin Baulig <martin@ximian.com>
22307 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
22309 2003-08-06 Martin Baulig <martin@ximian.com>
22311 * mono-debug-debugger.c: Added support for static fields,
22312 properties and methods.
22314 2003-08-06 Martin Baulig <martin@ximian.com>
22316 * mono-debug-debugger.c: Don't store the MonoString's vtable to
22317 make this work for applications with multiple application domains.
22319 2003-08-04 Martin Baulig <martin@ximian.com>
22321 * mono-debug-debugger.c: Completely reworked the type support; the
22322 most important thing is that we're now just using one single
22323 `MonoType' instance per type.
22325 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
22327 * mono-endian.h, mono-endian.c, icall.c: Added icall
22328 ves_icall_System_Double_AssertEndianity to assert double word endianity
22329 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
22331 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
22333 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
22334 support, icalls and fixes.
22336 2003-07-31 Miguel de Icaza <miguel@ximian.com>
22338 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
22339 classes that are a punctuation character in .NET is not the same a
22342 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22344 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
22346 2003-07-29 Miguel de Icaza <miguel@ximian.com>
22348 * icall.c: Add new MemCopy internalcall.
22349 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
22350 Simplified code; It is not necessary to handle all the cases here,
22351 as the C# code takes care of it. Only handle the case of the name
22352 resource embedded into the assembly.
22354 Changed signature to return the data pointer and the size of the
22357 2003-07-26 Miguel de Icaza <miguel@ximian.com>
22359 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
22360 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
22362 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
22364 * socket-io.c: ignore EINTR error in select.
22366 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
22368 * class.h, class.c: removed unused subclasses field in MonoClass.
22370 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
22372 * icall.c: improve fix of get_base_definition(). If the parent class
22373 doesn't have the mehod, look at the parent of the parent.
22374 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
22375 to check if a parameter is an in or out parameter
22376 (PARAM_ATTRIBUTE_IN is not set by default).
22377 mono_method_return_message_restore(): Use mono_class_value_size to
22378 get the size of a value type. mono_type_stack_size (parameterType)
22379 does not return the correct value if parameterType is byRef.
22380 mono_load_remote_field(), mono_load_remote_field_new(),
22381 mono_store_remote_field(), mono_store_remote_field_new():
22382 raise exception if the remote call returns an exception.
22384 2003-07-28 Martin Baulig <martin@ximian.com>
22386 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
22387 method. This is a wrapper around mono_runtime_invoke() which
22388 boxes the instance object if neccessary.
22390 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
22392 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
22393 metadata.h, row-indexes.h, verify.c: first cut of generics support.
22395 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
22397 * icall.c: disable mcs bug workaround.
22399 2003-07-21 Miguel de Icaza <miguel@ximian.com>
22401 * object.c (mono_runtime_class_init): Take the metadata_section
22402 mutex before obtaining the domain mutex.
22404 * appdomain.h: Added definition of metadata_section mutex here.
22406 * object.c: define metadata_mutex here.
22408 2003-07-24 Ravi Pratap <ravi@ximian.com>
22410 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
22413 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
22415 * reflection.c: Fix bug #46669
22417 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22422 * object.h: fill in the type name for TypeLoadException.
22424 2003-07-23 Ravi Pratap <ravi@ximian.com>
22426 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
22427 relationship between TypeBuilders while compiling corlib) and bug
22428 45993 (Array types returned from the runtime while compiling
22429 corlib were from the loaded corlib).
22431 2003-07-22 Martin Baulig <martin@ximian.com>
22433 * mono-debug-debugger.c: Reworked the type support a bit more;
22434 distinguish between types and classes.
22436 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
22438 * icall.c: add IsArrayImpl icall.
22440 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
22442 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
22443 initializing real_size only once. Also fix bug #46602.
22445 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
22447 * object.c: Renamed mono_metadata_section to metadata_section.
22449 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
22451 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
22452 empty array if the type is an array. Fixed.
22453 ves_icall_MonoMethod_get_base_definition: if the base method
22454 is abstract, get the MethodInfo from the list of methods of
22456 * reflection.c: ParameterInfo.PositionImpl should be zero-based
22457 and it was 1-based. Fixed in mono_param_get_objects.
22459 2003-07-20 Martin Baulig <martin@ximian.com>
22461 * mono-debug.h: Set version number to 31.
22462 (mono_debug_init): Added `MonoDomain *' argument.
22464 * mono-debug-debugger.c: Reworked the type support; explicitly
22465 tell the debugger about builtin types; pass the `klass' address to
22468 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
22470 * image.c: Allow new metadata tables to be loaded without a
22471 warning. Also update the warning message to give the new constant value.
22473 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
22475 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
22476 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
22477 array type representation changes.
22479 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
22481 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
22482 on Environment.Exit () call.
22484 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
22486 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
22487 requires a matching corlib.
22489 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
22491 * Changelog: My editor decided to add a CR to each line. Sorry about that.
22492 Committed again without the CRs.
22494 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
22496 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
22497 getting it from the "this" socket instance. Did not work
22498 if the socket is a subclass of Socket.
22499 Also fixed bug #35371.
22501 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
22503 * metadata.c: fixed size for TypedByRef.
22504 * loader.c: when searching for a method, consider the vararg amrker.
22505 * unicode.c, decimal.c: constify some arrays.
22507 2003-07-15 Dick Porter <dick@ximian.com>
22509 * socket-io.c: Fixed compilation for gcc < 3.2.
22511 Fixed compilation for machines that don't have AF_INET6 (thanks to
22512 Bernie Solomon <bernard@ugsolutions.com> for that part.)
22514 Fixed compile warnings.
22516 Fixed formatting and line endings.
22518 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
22521 * socket-io.c: Added IPv6 support.
22523 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
22525 * class.c (mono_class_is_assignable_from): New function to implement
22526 the is_assignable_from logic. Used by mono_object_isinst,
22527 Type::IsAssignableFrom () and the interpreter.
22529 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
22530 Object, even interfaces.
22532 * object.c (mono_object_isinst): Implement in terms of
22533 is_assignable_from.
22535 * icall.c (ves_icall_type_is_assignable_from): New icall.
22537 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
22539 * domain.c (foreach_domain): fix compiler warning.
22541 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
22543 * image.c (load_metadata_ptrs): use g_strndup because strndup is
22544 not available on all plattforms
22546 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
22548 * image.h image.c: Store the metadata version string in MonoImage.
22549 * icall.c: New icall to retrieve the image version.
22550 * reflection.c (create_dynamic_image): Fill in the image version field
22551 * reflection.c (build_compressed_metadata): Use the image version
22552 from the image structure.
22554 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22556 * appdomain.c: modified comment.
22557 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
22558 That will be its last iteration when mono_gc_cleanup is called from
22559 mono_runtime_cleanup and before the domain is unloaded.
22563 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
22565 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
22568 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
22570 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
22571 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
22572 Bernie Solomon <bernard@ugsolutions.com>.
22574 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
22576 * object.c, object.h: provide mono_object_new_fast() for faster
22577 allocation in some special cases.
22579 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22581 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
22582 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
22584 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
22586 * threadpool.c: fix leaks.
22588 2003-07-01 Dick Porter <dick@ximian.com>
22590 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
22591 using MonoGHashTables. Fixes threadpool bug posted to list.
22593 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
22595 * image.h, image.c: added support to load an assembly from a byte array.
22596 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
22597 assembly bundle support.
22599 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
22601 * threadpool.c (mono_thread_pool_add): keep a reference to the
22602 AsyncResult to prevent GC
22604 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
22606 * class.c: leak fix.
22608 2003-06-25 Dick Porter <dick@ximian.com>
22610 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
22611 for the async object, the WaitHandle object will close the handle.
22614 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
22616 * class.c: in mono_array_class_get (), lookup from the hash with the
22617 same type we insert: this works around a bug in
22618 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
22619 lluis. The real fix will have to wait for after the release.
22621 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22623 * icall.c: fix memory leak when getting type members.
22625 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
22627 * reflection.c: added more pubtoken special cases.
22629 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
22631 * class.c: handle field offset correctly when class size
22632 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
22634 2003-06-20 Martin Baulig <martin@ximian.com>
22636 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
22639 2003-06-20 Martin Baulig <martin@ximian.com>
22641 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
22643 2003-06-20 Martin Baulig <martin@ximian.com>
22645 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
22646 just distinguish between variables in registers and variables at
22647 an offset relative to a register.
22649 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22651 * icall.c: #ifdef out latest changes until mcs is fixed.
22653 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
22655 * icall.c: return members in metadata order.
22657 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
22659 * icall.c: avoid infinite loop in GetTimeZoneData.
22661 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
22663 * icall.c: added Marshal.Prelink/All icalls.
22665 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
22667 * object.c, object.h: fix warnings and do some overflow checking
22668 when creating arrays.
22670 2003-06-17 Dick Porter <dick@ximian.com>
22673 * file-io.c: File attributes need to be tweaked slightly when
22674 passed from the managed to the w32 world.
22676 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
22677 * profiler.h profiler-private.h profiler.c: Rework last patch
22678 based on suggestion by Paolo.
22680 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
22682 * profiler.h profiler-private.h profiler.c: Added infrastructure for
22683 instruction level coverage data collection.
22684 * profiler.h profiler.c (: Added new callback function which can be
22685 used by the profiler to limit which functions should have coverage
22687 * profiler.c (mono_profiler_load): Call g_module_build_path to
22688 generate the file name of the profiler library.
22690 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
22692 * profiler.c, profiler.h, profiler-private.h: added basic block
22693 coverage profiling API.
22695 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
22697 * reflection.c (mono_reflection_create_runtime_class): Add support
22698 for events in dynamically generated code.
22700 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
22703 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
22705 * icall.c: when getting timezone info, return reasonable values if we
22706 can't get the actual data.
22708 2003-06-14 Dick Porter <dick@ximian.com>
22710 * threads.c (start_wrapper): Remove the reference to the thread
22711 object in the TLS data, so the thread object can be finalized.
22712 This won't be reached if the thread threw an uncaught exception,
22713 so those thread handles will stay referenced :-( (This is due to
22714 missing support for scanning thread-specific data in the Boehm GC
22715 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
22717 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
22719 * reflection.c: ensure streams and tables are first allocated with
22720 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
22722 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
22724 * icall.c: fixed GetElementType for byrefs (bug# 44792).
22726 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
22728 * reflection.c (mono_reflection_create_runtime_class): Add support for
22729 properties to dynamically created classes.
22730 * reflection.c: Fix a few places where non-MonoObjects were inserted
22731 into the tokens hashtable.
22733 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
22735 * object.c: some support to handle out of memory exceptions.
22737 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
22739 * marshal.c (mono_marshal_get_native_wrapper): support reference
22742 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
22744 * object.h, object.c: more portability stuff from Bernie Solomon.
22745 Unexport mono_object_allocate(). Added mono_object_unbox ().
22746 Set exitcode when an unhandled exception is thrown.
22748 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
22750 * marshal.c (mono_marshal_get_native_wrapper): use custom
22751 marshaler for return types.
22753 2003-06-10 Dick Porter <dick@ximian.com>
22755 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
22756 ip_mreq is available
22758 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
22760 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
22761 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
22762 by Bernie Solomon <bernard@ugsolutions.com>.
22764 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
22766 * gc.c (mono_gc_init): Avoid error message on shutdown when
22767 GC_DONT_GC=1 is used.
22769 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
22770 New icall to return the GUID of a module.
22772 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
22774 * class.c: ensure instance size always includes the parent's size
22775 even whem class size is set explicitly (fixes bug#44294).
22777 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
22779 * profiler.h, profiler.c: made the simple profiler thread-safe,
22780 get more accurate timing info. Allow the loading of an
22781 externally-developed profiler module.
22783 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
22785 * marshal.c (mono_marshal_get_native_wrapper): improved
22786 class/byref arguments.
22787 (mono_marshal_get_native_wrapper): better string marshaling support.
22789 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
22791 * class.c: ensure .pack and .size are handled correctly and
22792 simplified layout of static fields.
22794 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
22797 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
22799 * loader.c (mono_lookup_pinvoke_call): look for modules in the
22800 current directory (fix bug 44008)
22802 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
22804 * marshal.c (mono_marshal_get_native_wrapper): started support for
22806 (mono_delegate_to_ftnptr): consider marshalling specifications
22808 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22810 * reflection.c, reflection.h: emit custom marshal info.
22812 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22814 * object.c: free the GError.
22815 * icall.c: added CloseEvent_internal.
22817 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
22820 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
22822 * loader.c (mono_method_get_signature): Add support for dynamic
22825 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
22827 * reflection.c: fixed bug #43905.
22829 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
22831 * class.c, domain.c, icall.c, metadata.h, object.h: support for
22832 handling TypedReference and ArgIterator.
22833 * loader.c, loader.h: added function to get signature at call site.
22835 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
22837 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
22838 data readonly. Buglets and warning fixes. Some MethodSpec support.
22840 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
22842 * class.h, class.c, object.c: remove relative numbering support.
22844 2003-05-26 Miguel de Icaza <miguel@ximian.com>
22846 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
22847 free the string, until we get a chance to fix Gtk#
22849 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22851 * marshal.c: revert last patch.
22853 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
22855 * icall.c: updates for new mono_class_vtable() not calling
22856 the type constructor anymore.
22858 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
22860 * object.h, object.c: separate vtable creation from type
22861 initialization. Make running the .cctor thread safe.
22863 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
22865 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
22867 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
22869 * loader.c (mono_get_method): consider calling convention
22871 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
22873 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
22874 to return the invisible global type for a module.
22876 * reflection.c (mono_image_build_metadata): Emit global fields too.
22878 2003-05-20 Peter Williams <peterw@ximian.com>
22880 * loader.c (mono_lookup_internal_call): Add a few newlines.
22882 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
22884 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
22887 * appdomain.c (set_domain_search_path): Recalculate search path when
22888 AppDomainSetup.PrivateBinPath changes.
22890 * object.c (mono_class_compute_gc_descriptor): It turns out some
22891 parts of the class libs (like System.Thread) holds pointers to
22892 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
22893 to treat native int a pointer type here.
22895 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
22897 * appdomain.h, domain.c: add hashtable for jump target resolution.
22899 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
22901 * reflection.h reflection.c icall.c: Added new icalls
22902 GetManifestResourceInfoInternal, GetModulesInternal and support
22905 2003-05-16 Dick Porter <dick@ximian.com>
22909 * file-io.c: Implement System.IO.MonoIO::GetTempPath
22911 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
22913 * object.c: mono_store_remote_field: little fix to previous patch.
22915 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
22917 * class.c: add constructors to array classes.
22918 * icall.c: special case array construction for InternalInvoke (),
22920 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
22922 * class.h class.c reflection.c object.c: Added support for field
22923 defaults in dynamically generated classes.
22925 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
22927 * reflection.c: properly encode charset for ddlimport.
22929 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
22931 * threads.c: allow compiling without GC.
22933 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
22935 * appdomain.h, object.c, object.h, threads.c, threads.h: added
22936 handling of thread static data.
22938 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22940 * reflection.h, reflection.c: added mono_custom_attrs_free ().
22942 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
22944 * class.c (mono_array_class_get): always set the serializable flags
22945 (mono_array_class_get): always set the SEALED attribute for array types
22947 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
22949 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
22950 attributes (fix for bug 42021).
22952 2003-05-12 Dick Porter <dick@ximian.com>
22954 * gc.c: Don't run finalizers when the finalizer thread is
22955 finishing up, because the default domain has already been
22958 2003-05-11 Miguel de Icaza <miguel@ximian.com>
22960 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
22961 value is null, we should throw an exception. This is slightly
22962 different than the other conventions used for the constructor.
22964 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22966 * socket-io.c: fixed windows build.
22968 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22970 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
22972 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
22974 * object.c (mono_string_new_wrapper): Compatibility fix for MS
22977 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
22979 * class.c (mono_class_layout_fields): Add experimental GC aware
22980 auto layout facility. Requires class library changes to work correctly.
22982 (mono_class_setup_vtable): Avoid overriding explicit interface
22983 method implementations. Fixes iface3.exe test.
22985 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
22987 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
22988 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
22990 * metadata.h: Add new type classification macro which determines
22991 whenever the type holds an object reference.
22993 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
22995 * marshal.c (mono_marshal_get_native_wrapper): cleanups
22997 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
22999 * gc.c (finalizer_thread): Work around a GC bug.
23001 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
23003 * marshal.c (emit_struct_conv): allow unions
23005 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
23007 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
23009 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
23011 2003-05-06 Martin Baulig <martin@ximian.com>
23013 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
23015 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23018 (Select_internal): allow NULLs, don't create arrays if not needed.
23019 Coupled with Socket.cs changes.
23022 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
23023 register a finalizer for it that will close the semaphore handle. This
23024 fixes the leak and make Lupus' test run with > 4080 loops.
23026 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
23028 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
23029 Jerome Laban (bug #42287)
23031 2003-05-02 Martin Baulig <martin@ximian.com>
23033 * debug-mono-symfile.h
23034 (MonoSymbolFile): Moved declaration into mono-debug.h.
23035 (MonoDebugMethodJitInfo): Likewise.
23036 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
23038 (_mono_debug_address_from_il_offset): Take a
23039 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
23042 (MonoDebugDomainData): New struct.
23043 (mono_debug_get_domain_data): New function.
23044 (mono_debug_add_method): Take an additional `MonoDomain *'
23046 (mono_debug_source_location_from_address): Likewise.
23047 (mono_debug_il_offset_from_address): Likewise.
23048 (mono_debug_address_from_il_offset): Likewise.
23050 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
23052 * reflection.c: one more check for null type in custom attrs.
23054 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23056 * reflection.c: avoid warning (comparison is always false due to limited
23057 range of data type).
23059 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23061 * icall.c: throw an exception in Type.GetField if the argument 'name'
23064 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
23066 * reflection.c: fixed handling of enums in named arguments to custom
23067 attributes (bug #42123).
23069 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
23071 * reflection.c: use the right array element type and handle
23072 a null for a Type argument, too.
23074 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
23076 * reflection.c: handle arrays as arguments to custom attributes.
23078 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
23080 * reflection.c: handle a string value in a custom attr
23081 ctor that takes an object.
23083 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
23085 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
23088 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
23090 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
23092 2003-04-27 Martin Baulig <martin@ximian.com>
23094 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
23095 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
23096 MONO_DEBUGGER_EVENT_BREAKPOINT.
23097 (mono_breakpoint_trampoline_code): Removed.
23098 (mono_debugger_event_handler): The last argument is now a
23100 (mono_debugger_insert_breakpoint_full): Removed the
23101 `use_trampoline' argument.
23102 (mono_debugger_method_has_breakpoint): Likewise.
23103 (mono_debugger_trampoline_breakpoint_callback): Renamed to
23104 mono_debugger_breakpoint_callback(); take the method and
23105 breakpoint number as arguments.
23107 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
23109 * metadata.c: fix off by one when loading parameters attributes.
23111 2003-04-24 Martin Baulig <martin@ximian.com>
23113 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
23115 2003-04-24 Martin Baulig <martin@ximian.com>
23117 * mono-debug-debugger.c: Moved all code which interacts with the
23118 Mono Debugger here.
23120 * debug-mono-symfile.c: This code now just deals with the symbol
23121 file itself, the debugger code is now in mono-debug-debugger.c.
23123 2003-04-23 Martin Baulig <martin@ximian.com>
23125 * mono-debug.c (mono_debug_source_location_from_il_offset):
23126 New method; like mono_debug_source_location_from_address(), but
23127 takes an IL offset instead of a machine address.
23129 2003-04-23 Martin Baulig <martin@ximian.com>
23131 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
23132 `line' field; this is now computed by the debugger.
23134 2003-04-23 Martin Baulig <martin@ximian.com>
23136 * mono-debug.[ch]: New files. This is the new debugging interface.
23138 * mono-debug-debugger.[ch]: New files. Moved all code which
23139 interacts with the Mono Debugger here.
23141 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
23143 * domain.c (mono_init): initialize mono_defaults.monitor_class
23145 2003-04-21 Miguel de Icaza <miguel@ximian.com>
23147 * reflection.c (method_encode_code): Add a spicy exception to help
23148 future compiler authors.
23150 2003-04-21 Martin Baulig <martin@ximian.com>
23153 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
23154 Make this work with relative pathnames; g_filename_to_uri() needs
23155 an absolute filename.
23157 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
23159 * icall.c: Track name changes in Object and ValueType.
23161 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
23163 * metadata.c (mono_type_stack_size): size should be a multiple of
23166 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23169 (internal_domain_finalize): moved into mono_domain_finalize. No need
23170 to create another thread because the finalizers will be run in the
23173 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
23174 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
23175 to be run (MS does this too).
23177 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
23179 * object.c (mono_class_compute_gc_descriptor): Update comment.
23181 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
23183 * image.h: Add synchronized wrapper cache.
23185 * image.c (do_mono_image_open): Initialize cache.
23187 * reflection.c (create_dynamic_mono_image): Initialize cache.
23189 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23191 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
23192 ves_icall_System_Buffer_ByteLengthInternal.
23194 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
23196 * reflection.c: setup klass->nested_in earlier. Allow
23197 a dash in the assembly name.
23199 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
23201 * metadata.c (mono_type_to_unmanaged): dont access
23202 type->data.klass for MONO_TYPE_OBJECT
23203 (mono_type_to_unmanaged): consider System.Delegate class
23205 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
23207 * class.c: just setup supertypes in the proper place instead of
23208 initializing the full element class for arrays.
23210 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
23212 * class.c: ensure the element class of arrays is initialized.
23213 Setup the supertype info for array classes, too.
23215 2003-04-14 Miguel de Icaza <miguel@ximian.com>
23217 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
23219 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23221 * Makefile.am: re-added -m option when running cygpath. This way,
23222 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
23224 * mono-config.c: same codepath for locating mono config file for WIN32
23226 * assembly.c: if mono_assembly_setrootdir is called, don't override
23229 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23231 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
23232 MONO_ASSEMBLIES variable.
23234 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
23236 * icall.c: added Assembly::GetNamespaces() icall.
23238 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23240 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
23242 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
23244 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
23245 * object.c: fixed bug in the construction of vtable for proxies
23247 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
23249 * object.c (mono_array_new): Mark mono_array_new as an icall.
23251 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23253 * class.c: fixed test for public method when overriding interfaces.
23256 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
23258 * appdomain.h, domain.c: added mono_domain_foreach() to
23259 be able to access the currently loaded appdomains.
23260 * object.c: make string interning work across sppdomains.
23261 Mark some functions for use as icalls.
23263 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
23265 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
23267 * reflection.h reflection.c: Allocate long living data using
23268 GC_MALLOC_ATOMIC so the collector does not need to scan it.
23270 * reflection.c: Double the allocation size in streams instead of
23271 increasing it, to prevent unneccesary copying on large assemblies.
23273 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
23274 creation if the assembly does not have the Run flag set.
23276 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
23278 * class.h: avoid the C++ keywords in header files (Jerome Laban
23279 spotted and fixed this).
23281 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23284 (mono_unhandled_exception): fill in the arguments for the
23285 UnhandledException event. Only trigger that event for the default
23286 domain (as MS does).
23288 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
23290 * object.c: Improve typed allocation stuff based on suggestions from
23291 Paolo. Also turn it on if the GC library supports it.
23293 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
23295 * object.c object.h class.h: Added experimental typed allocation
23296 facility using the interfaces in gc_gcj.h.
23298 * os/gc_wrapper.h: Added new include files.
23300 2003-04-03 Martin Baulig <martin@ximian.com>
23302 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
23303 which is not yet enabled by default.
23305 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
23307 (mono_gc_lock, mono_gc_unlock): New static functions.
23309 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
23310 functions; stop/start the world for the garbage collector. This
23311 is using the windows API; we need to complete the SuspendThread()/
23312 ResumeThread() implementation in the io-layer to make this work on Unix.
23313 (mono_gc_push_all_stacks): New public function; tells the garbage
23314 collector about the stack pointers from all managed threads.
23316 2003-04-03 Martin Baulig <martin@ximian.com>
23318 * object.h (MonoThread): Added `gpointer stack_ptr'.
23320 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
23322 2003-04-03 Martin Baulig <martin@ximian.com>
23324 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
23326 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
23328 * reflection.c (typebuilder_setup_fields): Initialize field.first and
23331 2003-04-02 Miguel de Icaza <miguel@ximian.com>
23333 * loader.c (mono_lookup_internal_call): Report the corlib that is
23336 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
23338 * icall.c (ves_icall_type_GetTypeCode): fixed check for
23339 System.DBNull (it's class not valuetype).
23341 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
23343 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
23344 if the array method was already assigned a token (fixes bug#40646).
23346 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
23348 * reflection.c (mono_reflection_get_type): Attempt type resolve even
23349 if no assembly is given.
23351 2003-04-01 Miguel de Icaza <miguel@ximian.com>
23353 * metadata.h: Added the new tables.
23355 * row-indexes.h: Added definitions for new tables.
23357 * metadata.c: Add schemas for new tables, and add support for
23358 computing the sizes of them.
23360 * class.c: Update for handling the new type cases.
23362 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
23364 * metadata.h (MONO_TYPE_IS_VOID): new macro
23366 2003-03-31 Martin Baulig <martin@ximian.com>
23368 * threads.h (MonoThreadCallbacks): Added `thread_created'.
23370 * threads.c (mono_thread_new_init): Call `thread_created' in the
23371 mono_thread_callbacks.
23373 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
23375 * loader.h: added marshalbyrefobject_class to mono_defaults
23376 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
23377 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
23378 generation of output parameters.
23379 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
23380 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
23381 contextbound and the target object belongs to the context of the caller.
23382 * object.h: added context and unwrapped_server variables in MonoRealProxy.
23383 * object.c: Implemented support for interfaces and abstract classes
23384 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
23385 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
23387 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
23389 * class.h class.c (mono_class_is_subclass_of): New function.
23391 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
23392 routines for most common case (calls from ArrayList::ToArray).
23394 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
23395 routine so programs which call Environment::Exit() can be profiled.
23397 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
23398 Added MONO_ARCH_SAVE_REGS.
23400 * icall.c (ves_icall_type_is_subtype_of): Use new function.
23402 2003-03-29 Miguel de Icaza <miguel@ximian.com>
23404 * blob.h: Add a couple of new MonoType types definitions.
23406 * tabledefs.h: Add a couple of new call convs.
23408 2003-03-27 Zoltan Varga <vargaz@freemail.h>
23410 * reflection.h (MonoReflectionDynamicAssembly): track changes in
23411 the layout of the class.
23413 * reflection.c (alloc_table): double the size on overflow to avoid
23414 unnecessary copying.
23416 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
23417 avoid filling out metadata tables and blobs. Also set mb->ilgen to
23418 null so it can be garbage collected.
23420 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
23422 * reflection.c (mono_reflection_get_type): Return the resolved type
23423 only if it is in the assembly we searched.
23425 * reflection.c (ensure_runtime_vtable): Initialize method slots.
23427 * class.c (mono_class_setup_vtable): Set the slot of the overriding
23430 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23433 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
23434 the right one is 'file:///blah', but MS allows it.
23436 (mono_assembly_open): allow 'file://blah'
23438 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
23440 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
23442 * socket-io.c: fixes bug #40310.
23444 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
23446 * reflection.c (mono_reflection_parse_type): handle deeply nested
23449 * reflection.c (mono_image_create_token): Use unique token values
23450 since they will be put into a hash table.
23452 * class.c (mono_class_setup_vtable): If a method occurs in more than
23453 one place in the vtable, and it gets overriden, then change the
23454 other occurances too.
23456 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
23457 object as return type.
23459 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
23461 * icall.c: Deleted "ToString" implementation for double and float
23462 because they are full implemented in managed code.
23464 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
23466 * reflection.c, reflection.h: implemented and exported functions
23467 to retrieve info about custom attributes.
23469 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23471 * appdomain.c: moved Uri handling to assembly.c
23472 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
23473 work when using a file Uri in *nix and windows.
23475 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
23476 GetReferencedAssemblies.
23478 2003-03-18 Dick Porter <dick@ximian.com>
23480 * icall.c: Rename a couple of internal calls
23482 * threads.c: Set the thread state to Stopped when a thread exits.
23485 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
23487 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
23490 * object.c (mono_class_vtable): fix warning.
23492 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
23494 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
23496 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
23498 (method_encode_clauses): Create exception info structures in the right
23500 (mono_reflection_setup_internal_class): Initialize supertypes field.
23502 * class.c object.c: Handle interfaces which implement other interfaces
23505 * class.h class.c: Move the supertypes array initialization code into
23506 a separate function so it can be used for dynamic types too. Also call
23507 it earlier, in mono_class_init(), since it can be used before the
23508 type is initialized.
23510 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23514 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
23519 * object.c: remove warnings.
23521 2003-03-13 Martin Baulig <martin@ximian.com>
23523 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
23524 (MonoDebugLexicalBlockEntry): New types.
23526 * debug-mono-symfile.c
23527 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
23529 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23531 * process.c: ret can be any non-zero value accroding to MS doc.
23533 2003-03-07 Miguel de Icaza <miguel@ximian.com>
23535 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
23536 fixing a warning for a miss-used prototype, would have cause
23537 random memory corruption.
23539 2003-03-07 Martin Baulig <martin@ximian.com>
23541 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
23542 getting really annoying ....
23544 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
23546 * reflection.c (fixup_method): added support for array methods.
23548 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
23550 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
23551 (pointed out by Michael Adams).
23553 2003-03-04 Dick Porter <dick@ximian.com>
23555 * icall.c: Temporarily reverted the Double and Single ToString()
23556 change, because it broke nunit.
23558 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
23560 * object.h, threads.h: make include files compatible with C++
23561 (patch by Jerome Laban <jlaban@wanadoo.fr>).
23563 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
23565 * icall.c: Erased ToString helper functions for Double and Single.
23566 Now, that implementations ar all in managed code (Double and Single
23569 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
23571 * appdomain.c: Added method for initializing the default context of
23572 a domain. Added internal call for getting the default context.
23573 * appdomain.h: Added context variable in MonoDomain struct.
23574 * domain.c: mono_domain_set also sets the default context of the domain
23575 * icall.c: Mapped internal method InternalGetDefaultContext.
23576 * object.c: mono_object_get_virtual_method returns always a remoting
23577 wrapper if the object is a transparent proxy.
23578 mono_runtime_invoke_array: when creating an object by calling the
23579 constructor, if the created object is a proxy, then the constructor should
23580 be called using the a remoting wrapper.
23582 2003-03-03 Dick Porter <dick@ximian.com>
23584 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
23585 variable so it compiles on solaris. Problem spotted by
23586 Christopher Taylor <ct@cs.clemson.edu>
23588 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23591 (get_info_from_assembly_name): don't leak value.
23594 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
23597 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
23599 * assembly.c: export mono_image_load_references ().
23600 * class.c: handle function pointers. mono_class_from_name() now
23601 supports nested type names directly.
23603 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
23605 * reflection.h reflection.c: Encode already created dynamic methods
23606 and fields correctly as a DEF instead of a REF.
23608 * reflection.c: Get rid of the force_ref argument to
23609 mono_image_typedef_or_ref since it was wrong in the first place.
23611 * string-icalls.c: add error checking to string constructors according
23614 * reflection.c: Emit types in the order their TypeBuilders were
23615 created. Previously, a new table index was assigned to each type before
23616 the tables were emitted. This was wrong because the signature blob
23617 might already refer to a type by its original table index.
23619 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
23621 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
23624 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23626 * Makefile.am: make assemblies dir have \ instead of / on windows.
23628 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
23630 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
23631 iterate over the NESTEDCLASS table using a linear search since the
23632 table is not guaranteed to be sorted by the secondary key.
23634 * class.c (mono_class_create_from_typedef): fixed up call to
23635 mono_metadata_nesting_typedef.
23637 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
23639 * marshal.c (mono_string_to_byvalstr): clear the memory as
23640 suggested by Jerome Laban <jlaban@wanadoo.fr>
23642 2003-02-26 Dick Porter <dick@ximian.com>
23644 * process.c: Cope with padding in .rsrc blocks
23646 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
23648 * metadata.h: reverted the filter_len change, it breaks reflection
23650 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
23652 * metadata.h: added a new field to store the filter_len
23655 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23657 * reflection.c: handle custom attributes for types and members
23658 created with Reflection.Emit (bug#38422).
23660 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
23662 * reflection.c: define RTSpecialName automatically for constructors for
23663 compatibility with MS.NET.
23665 * reflection.c (mono_reflection_create_runtime_class): initialize
23666 nested_in field of dynamically created classes.
23668 2003-02-22 Martin Baulig <martin@ximian.com>
23670 * debug-mono-symfile.h: Incremented version number.
23672 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
23674 * object.h icall.c process.c: fix warnings.
23676 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
23678 * appdomain.h appdomain.c:
23679 (mono_domain_try_type_resolve): split the
23680 name_or_tb argument into a name and a tb argument.
23681 (mono_domain_has_type_resolve): new function to check whenever the
23682 application has registered a TypeResolve event handler.
23684 * icall.c reflection.h reflection.c: move the type resolve logic into
23685 mono_reflection_get_type () so it will be invoked when
23686 Assembly::GetType () is called.
23689 (mono_reflection_get_type): renamed to get_type_internal.
23690 (mono_reflection_get_type): fixed type name generation so it works
23691 for nested types too.
23692 (mono_reflection_get_type): call has_type_resolve () to avoid the
23693 costly type name generation if there is no resolve event handler.
23695 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
23697 * class.c, image.c: load exported types from file references.
23699 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
23701 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
23702 used to cache the managed methods used to create proxies and make
23703 remote invocation of methods.
23704 * class.h: Added in MonoVTable a flag to indicate that a class needs
23705 to be remotely created.
23706 * object.c: Modified the method mono_class_vtable(). It now initializes
23707 the remote flag of the vtable. Modified mono_object_new_specific(),
23708 so now it checks the remote flag.
23709 * icall.c: Added a couple of internal methods, one for enabling instance
23710 creation interception for a type, and one for creating objects bypassing
23713 2003-02-18 Martin Baulig <martin@ximian.com>
23715 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
23716 New interncall to get a method's metadata token.
23718 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
23719 New interncall for the debugger.
23721 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
23723 * class.c (mono_class_setup_vtable): allocate supertype array
23725 2003-02-18 Martin Baulig <martin@ximian.com>
23727 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
23729 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23732 (assembly_name_to_aname): jump over unknown properties (i've found
23733 something like: 'type, assembly, version=xxx, custom=null, public...',
23734 so now will ignore custom=null and still get the rest of the values).
23736 2003-02-17 Dick Porter <dick@ximian.com>
23738 * threads.c: Have Thread.Start() wait for a semaphore to signal
23739 that the thread has set up all its local data. This fixes bug
23740 34323, where Abort() raced the new thread's TLS data.
23742 Also removes the handle_store() call from start_wrapper, because
23743 threads are now always created suspended and there is no longer a
23744 race between the parent and child threads to store the info.
23746 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
23748 * image.c: explain the #- heap issue in a message, hopefully
23749 avoiding FAQs on mono-list.
23751 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23754 (GetEntryAssembly): if the domain has not invoked
23755 AppDomain.ExecuteAssembly yet, return the assembly of the default
23758 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
23760 * class.c (mono_ldtoken): make it work in dynamic assemblies.
23762 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
23764 * metadata.c, reflection.c: simple speedup to type hash
23767 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
23769 * image.c, image.h, class.c, assembly.c: move module loading
23770 to MonoImage. When loading metadata, consider alignemnet from
23771 the start of metadata, not from the metadata address in memory.
23773 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
23775 * reflection.c (mono_reflection_get_custom_attrs): Added support for
23776 AssemblyBuilder objects. Factored out custom attribute creation into
23777 a separate function.
23778 (create_custom_attr): new function to create custom attributes.
23780 2003-02-12 Miguel de Icaza <miguel@ximian.com>
23782 * Makefile.am: Got tired of typing the full pathname to pedump.
23783 Until there is another option, am installing this.
23785 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
23787 * class.c (class_compute_field_layout): always set field->parent
23788 (mono_ldtoken): use mono_defaults.fieldhandle_class;
23790 2003-02-11 Dick Porter <dick@ximian.com>
23793 * monitor.c: Rewrote Monitor, making lock much faster and
23794 Pulse/Wait work as specified. Also uses much fewer handles, and only
23795 creates them as needed.
23797 * exception.c: Added SynchronizationLockException
23799 * threads.c: Deleted old Monitor implementation. The new one is
23802 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
23804 * class.c: handled TypedReference type code. Set the correct size for
23805 class data. Setup interface_offsets for interface classes, too.
23807 2003-02-09 Martin Baulig <martin@ximian.com>
23809 * debug-mono-symfile.h: Reflect latest symbol writer changes.
23811 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
23813 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
23814 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
23815 * object.c: fixed mono_object_get_virtual_method () for interfaces.
23816 * verify.c: check for code that runs after the end of the method.
23818 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
23820 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
23821 "System.Math::Round2".
23822 * sysmath.h: Added Floor, Round and Round2 definitions.
23823 * sysmath.c: Modified certain functions that were not 100% compliant
23824 with MS.NET (math precision) and added the implementation of Floor,
23827 2003-02-07 Martin Baulig <martin@ximian.com>
23829 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
23831 2003-02-07 Martin Baulig <martin@ximian.com>
23833 * debug-mono-symfile.c: Reflected latest symwriter changes.
23834 (mono_debug_create_mono_symbol_file): Removed.
23835 (mono_debug_open_mono_symbol_file): Take an argument which
23836 specifies whether to create a dynamic symbol file.
23838 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
23840 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
23842 2003-02-05 Martin Baulig <martin@ximian.com>
23844 * reflection.c (mono_image_build_metadata): Make this public,
23845 protect it against being called multiple times, don't create
23846 resources and don't build the compressed metadata here.
23847 (mono_image_create_pefile): Do this here.
23850 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
23852 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23854 * socket-io.c: fixed bug #36322.
23856 2003-02-06 Piers Haken <piersh@friskit.com>
23860 * debug-mono-symfile.c:
23866 * socket-io.c: warning cleanups
23868 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
23870 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
23871 function. works like remoting invoke, but does a check for the Proxy first.
23873 2003-02-05 Miguel de Icaza <miguel@ximian.com>
23875 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
23877 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
23879 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
23881 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
23882 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
23884 * object.c (mono_store_remote_field_new): used by the new jit
23885 instead of mono_store_remote_field
23886 (mono_load_remote_field_new): used by the new jit
23887 instead of mono_load_remote_field
23889 2003-02-05 Patrik Torstensson
23891 * appdomain.c: changed unload to take the domain id instead
23894 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
23897 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23899 * appdomain.c: don't look for assemblies in ApplicationBase if
23900 PrivateBinPathProbe is set.
23902 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23904 * object.c: make the first argument in main_args contain the absolute
23905 path to the assembly. Fixes bug #37511.
23907 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23909 * icall.c: get correct UTC offset for countries not using daylight
23910 time saving. Fixes bug #30030.
23912 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23914 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
23915 and 1 are the family).
23917 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
23919 * icall.c (ves_icall_InternalExecute): removed wrong assertion
23921 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
23923 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
23925 * reflection.c: added support for SignatureHelper tokens, which is
23926 needed by the Calli opcode.
23928 * reflection.h: track changes to SignatureHelper class.
23930 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
23932 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23934 * appdomain.c: fixed loading assemblies from PrivateBinPath.
23936 2003-02-03 Patrik Torstensson
23937 * appdomain.[c|h], domain.c :
23938 - Added support for getting a domain via domain id
23939 - Support for setting and getting domain from System.AppDomain
23940 (used in cross appdomain channel)
23941 - Added support for get/set for a MonoAppContext on a thread
23942 (Context class in System.Runtime.Remoting.Contexts),
23943 - Removed hack in Get/SetData and ExecuteAssembly.
23945 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
23946 the managed world to get control when a proxy is created.
23948 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
23950 2003-02-03 Miguel de Icaza <miguel@ximian.com>
23953 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
23954 Populate the codebase field as well.
23956 2003-02-02 Martin Baulig <martin@ximian.com>
23958 * debug-mono-symfile.c
23959 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
23960 (mono_debug_symfile_add_method): Allow interncalls.
23962 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23964 * icall.c: throw parse exception if strtod fails or the string is empty.
23966 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
23968 * marshal.c: handle object type separately from defined
23971 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
23973 * marshal.c: handle NATIVE_LPSTR for strings when it's
23974 explicitly specified.
23976 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
23978 * reflection.c, reflection.h, icall.c: setup the reflection
23979 handle cache for ModuleBuilders and AssemblyBuilders.
23981 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
23983 * reflection.c (reflection_methodbuilder_to_mono_method): set
23986 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23988 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
23990 2003-01-29 Dick Porter <dick@ximian.com>
23992 * threads.c: No need for the fake_thread kludge now that Thread
23993 doesn't run a class constructor
23995 2003-01-29 Dick Porter <dick@ximian.com>
23997 * threads.c: Use g_direct_hash instead of the rather bogus
24000 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
24002 * marshal.c (mono_marshal_get_native_wrapper): add check for null
24003 (fix pinvoke12.exe)
24004 (mono_marshal_get_struct_to_ptr): generate valid IL code
24005 (mono_marshal_get_ptr_to_struct): generate valid IL code
24006 (*): correctly set sig->pinvoke, we need to memdup the signature
24009 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
24011 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
24012 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
24014 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
24016 * profiler.c: provide more callers information.
24018 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
24020 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
24022 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
24024 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
24026 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
24028 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
24029 exception instead of going into an infinite loop on dates which it
24032 * string-icalls.c (ves_icall_System_String_get_Chars): raise
24033 out-of-range exception if needed.
24035 * class.c (mono_class_setup_vtable): allow a virtual method to provide
24036 an implementation for an interface method and to override an inherited
24037 method at the same time.
24038 Imagine a scenario when a virtual method is used to override a
24039 virtual abstract method in a parent class, and this same method
24040 provides an implementation for an method inherited from an interface.
24041 In this case, the interface resolution code will set im->slot, which
24042 means that the virtual method override pass will skip this method
24043 which means a pointer to the abstract method inherited from the parent
24044 will remain in the vtable of this non-abstract class.
24046 * class.c: (mono_class_setup_vtable): continue search for a real
24047 method if only an abstract method is found.
24049 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
24051 * reflection.c: add size to encoding for ByValStr and ByValArray
24052 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
24054 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
24056 * class.c (mono_class_setup_vtable): pass the override info as an
24059 * class.c (mono_class_setup_vtable): set the slot of overriding methods
24062 * reflection.c (ensure_runtime_vtable); add support for method
24065 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
24067 * reflection.c (resolution_scope_from_image): Hack to work to work with
24068 dynamic assemblies.
24070 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
24071 added a 'force_ref' argument to force this function to allways return
24072 a TypeRef. This is needed by mono_image_get_memberref_token ().
24074 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
24076 * reflection.c (mono_image_get_type_info): interfaces really don't have
24079 * reflection.c (mono_image_basic_init): fill out missing fields of
24082 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
24083 dynamic assemblies. This is required so dynamic assemblies show up in
24084 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
24085 Type::GetType() etc. This is consistent with MS behaviour.
24087 * image.c image.h reflection.c: add newly created classes to the name
24088 cache so mono_class_get () will find them.
24090 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
24092 First part of changes to get IKVM.NET running under mono.
24094 * appdomain.h, appdomain.c: added new function
24095 mono_domain_try_type_resolve() which will emit TypeResolve events.
24096 This function will call AppDomain::DoTypeResolve to do the actual work.
24098 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
24099 moved existing code dealing with dynamic tokens to a new function
24100 called mono_reflection_lookup_dynamic_token (). This function will
24101 raise TypeResolve events when appropriate. Since reflection.c is not
24102 part of libmetadata, a new hook function called
24103 mono_lookup_dynamic_token() is added to class.c which will call this.
24105 * assembly.h assembly.c: make the invoke_load_hook function public,
24106 so it can be called for dynamic assemblies.
24108 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
24110 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
24113 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
24114 MonoGHashTable, since it contains pointers to objects which the GC
24117 * assembly.c (search_loaded): remove unused variable.
24119 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
24121 * object.c: fixed issue exposed by gcc-generated IL programs
24122 that use RVA data for pointers.
24124 2003-01-25 Martin Baulig <martin@ximian.com>
24126 * threads.c (start_wrapper): Moved the initialization of
24127 `start_func' above the mono_new_thread_init() call to which we
24128 pass it as argument.
24130 2003-01-24 Martin Baulig <martin@ximian.com>
24132 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
24133 the MonoThread pointer.
24135 2003-01-21 Miguel de Icaza <miguel@ximian.com>
24137 * icall.c: Rename `PowImpl' to Pow.
24139 2003-01-23 Dick Porter <dick@ximian.com>
24141 * threads.c (start_wrapper): Create a Thread object if needed, so
24142 the Main() thread can do the class initialisation in a subthread
24143 that has been set up to allow managed code execution.
24145 Pass the thread ID instead of the MonoThread pointer to the thread
24146 start and attach callbacks. This change is required, because the
24147 jit thread start callback must be called _before_ the Thread
24148 object can be created.
24150 (mono_thread_init): Removed much object creation code that is no
24151 longer needed. No managed code is called from here now.
24153 * object.c (mono_runtime_exec_managed_code): Create a subthread
24154 for Main, and call back to the runtime to use it.
24155 Set the exit code when Main exits.
24157 * gc.c: Make sure domain finalisation happens in a subthread.
24158 Re-enable threaded GC, fixing bug 31333 (again).
24160 * environment.c: System.Environment internall calls (so far just
24161 ExitCode is here, the others are still in icall.c)
24163 * appdomain.c (mono_runtime_cleanup): All threads running managed
24164 code should have finished before mono_runtime_cleanup() is
24165 reached, so no need to clean up threads.
24167 2003-01-22 Martin Baulig <martin@ximian.com>
24169 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
24170 `gpointer func' arguments.
24171 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
24172 but added `MonoThread *thread' argument.
24173 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
24175 * threads.c (mono_new_thread_init): Added `gpointer func' argument
24176 and pass it to the mono_thread_start_cb callback.
24177 (mono_install_thread_callbacks): New public function to install a
24178 set of callbacks which are set by the debugger.
24179 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
24181 2003-01-22 Martin Baulig <martin@ximian.com>
24183 * Makefile.am: Install debug-mono-symfile.h.
24185 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
24187 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
24189 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
24191 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
24192 * class.c (mono_ptr_class_get): correctly set access levels of pointers
24193 (mono_array_class_get): correctly set access levels of arrays
24195 2003-01-20 Patrik Torstensson
24196 * image.h (MonoAssemblyName): changed major, minor, build, revision
24197 from signed to unsigned.
24199 2003-01-20 sean kasun <skasun@azstarnet.com>
24201 * reflection.c (load_cattr_value): Now this handles
24202 MONO_TYPE_SZARRAY. Fixes bug #35629
24204 2003-01-20 Miguel de Icaza <miguel@ximian.com>
24206 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
24209 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24211 * decimal.c: fixed bug #26056.
24213 2003-01-17 Martin Baulig <martin@ximian.com>
24215 * gc.c: Raise an ExecutionEngineException instead of using g_error().
24217 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24220 (mono_get_exception_type_initialization): new function.
24222 * object.c: throw a TypeInitializationException when an exception is
24223 thrown invoking the class constructor.
24225 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24227 * reflection.c: fixed attribute reading.
24229 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24232 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
24233 provided, look for the type in the calling assembly and then in
24234 mscorlib; if the assembly name is provided, only try that one.
24236 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
24238 * object.c: register the vtable before there is a chance it's
24239 queried again recursively.
24241 2003-01-13 Duncan Mak <duncan@ximian.com>
24243 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
24246 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
24248 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
24250 2003-01-11 Martin Baulig <martin@ximian.com>
24252 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
24253 this to 20 for the release.
24255 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
24257 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
24259 * loader.c (mono_method_get_marshal_info): bug fix
24261 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
24262 structures with explicit layout
24264 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
24266 * profiler.c: made the output more readable (and sorted).
24267 Added caller information for the allocation profiler.
24269 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
24271 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
24273 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24275 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
24276 to get value types.
24278 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
24280 * object.c, profiler.h, profiler.c, profiler-private.h:
24281 Added object allocation profiler.
24283 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
24285 * reflection.h, reflection.c: handle global methods.
24286 Compress blob entries.
24288 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
24290 * marshal.c: fix compilation.
24292 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
24294 * loader.c (mono_method_get_marshal_info): impl.
24296 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
24298 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24300 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
24301 for reference types.
24303 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
24305 * loader.c: fixed off by one error in loaded parameter names.
24307 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
24309 * marshal.c (mono_marshal_get_icall_wrapper): like
24310 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
24311 instead of a MonoMethod.
24313 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24315 * decimal.c: fixed bug #36537.
24317 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
24319 * marshal.c: throw a missing method exception if a
24320 P/Invoke method is not found.
24322 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
24324 * icall.c: allow a null this for constructors.
24326 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
24328 * icall.c: raise the proper exceptions if the arguments to the
24329 internal Invoke are incorrect.
24331 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
24333 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
24335 2003-01-03 Martin Baulig <martin@ximian.com>
24337 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
24339 2002-12-31 Martin Baulig <martin@ximian.com>
24341 * debug-mono-symfile.c: Completely rewrote the type section.
24342 Instead of using individual malloc()ed fields, we use one big
24343 continuous memory area and offsets into this area.
24344 See the comments in the source code for details.
24346 2002-12-30 Martin Baulig <martin@ximian.com>
24348 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
24350 2002-12-30 Martin Baulig <martin@ximian.com>
24352 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
24353 line number table in this data blob instead of using an external
24356 2002-12-28 Martin Baulig <martin@ximian.com>
24358 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
24360 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
24362 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
24363 as a boxed return type.
24365 2002-12-21 Miguel de Icaza <miguel@ximian.com>
24368 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
24369 g_build_filename to properly get separators on the filename created.
24371 * object.h: Small change, introduce MonoMarshalByRefObject to
24372 track the layout of that structure in the C# universe as we make
24375 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
24377 * object.c: removed assert to allow static fields on interfaces.
24378 * loader.c: a TypeSpec may be used for any type, not just arrays.
24380 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
24382 * class.c, class.h: added mono_class_array_element_size ().
24383 Ignore static methods in interfaces.
24385 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24387 * threads.c: fixed the build under cygwin.
24389 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
24391 * reflection.c: handle nullref constants. Allocate keys for
24392 reflection handles with the GC.
24394 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
24396 * threads.c, threads.h: added mono_thread_get_abort_signal()
24397 to get a suitable signal for thread abort.
24399 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
24401 * metadata.c: fix handling of ExportedType table.
24403 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24405 * icall.c: added WriteWindowsDebugString internal call.
24407 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24409 * reflection.h: added fields to match C# implementation.
24411 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24413 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
24415 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
24417 * gc.h, gc-internal.h: Rename header for GC internal calls to
24418 gc-internal.h from gc.h as to not clash with Boehm GC having its
24419 header installed as <gc.h> in outside include paths.
24420 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
24421 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
24423 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24425 * icall.c: assign minor, build and revision in FillName.
24427 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
24429 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
24430 Added support for running code generated by Reflection.Emit.
24432 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24434 * appdomain.c: check for NULL argument in LoadFrom.
24436 2002-12-10 Dick Porter <dick@ximian.com>
24438 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
24440 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24442 * appdomain.c: fix buglet when building exe file name. Handle full
24443 assembly name (needed after latest changes to AssemblyName).
24445 (mono_image_close): free some hashtables.
24447 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
24449 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
24450 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
24451 on some systems (redhat 7.3)
24453 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
24455 * threads.c: delete the critical section of a sync block,
24456 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
24458 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
24460 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
24462 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24464 * appdomain.[ch]: handle the assembly preload event to try loading the
24465 assemblies using the paths we have in the current domain.
24467 * assembly.[ch]: created an assembly preload hook that is called to try
24468 loading the assembly by other means that the ones provided here.
24470 * domain.c: initialize the domain search path.
24472 From now on, assemblies (TODO: except corlib and System) are loaded
24473 according to these rules when using mono_assembly_load ():
24475 1. It tries to load the assembly from the ApplicationBase
24476 of the current domain appending .dll and .exe (TODO: have to
24477 try loading from name/name.dll and name/name.exe).
24479 2. It tries the search path specified in PrivateBinPath for the
24480 current domain (if any).
24482 3. Previous behavior.
24484 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
24486 * icall.c: implemented GetInterfaceMap() related icall.
24487 * domain.c, loader.h: load MethodInfo in mono_defaults.
24489 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
24491 * gc.c: disable the finalizer thread for now, untill all the issues
24492 with it are resolved.
24494 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
24496 * string-icalls.c: handle embedded nulls in string ctor when the
24497 length is specified.
24499 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
24501 * class.c: look for explicit interface implementation in parent
24504 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
24506 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
24508 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
24510 * gc.c: protect handles with a critical section.
24512 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24515 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
24516 parameters. If no assembly specified, try getting the type from all
24517 the assemblies in the current domain, else, load the assembly and get
24520 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24522 * marshal.c: applied patch from Aleksey Demakov that fixes
24523 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
24525 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24527 * icall.c: fixed get_location.
24529 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
24531 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
24532 declarations to make it work with older gcc.
24534 * loader.c (mono_get_method): set signature->pinvoke for native calls
24536 2002-11-20 Dick Porter <dick@ximian.com>
24538 * threads.c (mono_thread_init): Set the main thread's handle
24540 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
24542 * gc.c: allow compilation without GC support. Changed to match the
24545 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
24547 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
24549 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
24551 * reflection.c: set a public key token on the core assemblies.
24553 2002-11-18 Dick Porter <dick@ximian.com>
24555 * threads.c: Split out some thread initialisation so that other
24556 files can set the start callback function.
24558 * gc.c: Run finalisers in a separate thread, to avoid stack
24559 overflow. Fixes bug 31333.
24561 * appdomain.c: Set up GC finalisation thread.
24565 * domain.c: Use gc.h macros for GC_malloc
24567 2002-11-15 Dick Porter <dick@ximian.com>
24571 * appdomain.c: Removed mono_runtime_init_with_attach(),
24572 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
24573 merging the extra parameter with the existing function. Removed
24574 unneeded code in mono_thread_attach().
24576 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
24578 * image.c (mono_image_loaded_by_guid): a method to get loaded
24580 (load_metadata_ptrs): we store the guid as string.
24582 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
24584 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
24586 * metadata.c (mono_guid_to_string): imported method form Zoltan
24587 Varga (slightly modified)
24589 * assembly.c (mono_assembly_open): load precompiled code
24591 * loader.h (MonoMethod): we store the method token for use in the
24594 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24596 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
24597 the hook function called when an assembly is loaded.
24599 * domain.c: Modified file.
24600 (mono_domain_assembly_load): removed hash table insertion of assemblies.
24604 2002-11-07 Miguel de Icaza <miguel@ximian.com>
24606 * reflection.c: Map PEFileKind to the value expected by the WinNT
24609 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24611 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
24612 Read until the buffer is filled completely.
24614 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24616 * icall.c: implemented MonoType.InternalGetEvent ().
24618 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24620 * appdomain.c: implemented InitAppDomainSetup. Delayed
24621 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
24622 the entry_assembly.
24624 * assembly.c: base_dir is now an absolute path ending with
24627 * icall.c: modified get_location according to the above changes.
24629 * object.c: init AppDomain.SetupInformation for the default domain after
24630 we have the entry assembly.
24632 * domain.c: when unloading a domain, setup = NULL.
24634 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
24636 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
24638 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
24640 * object.h, object.c: introduced mono_object_get_virtual_method ()
24641 to lookup the method invoked on an object when a callvirt is done on
24643 * icall.c: make MethodInfo::Invoke() always do a virtual call.
24645 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24647 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
24648 current domain when loaded an assembly and failed to load it.
24650 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
24652 2002-10-31 Dick Porter <dick@ximian.com>
24656 * file-io.c: Return the error status in a parameter, as the
24657 GetLastError() value has long since been blown away if we try and
24658 look it up in a subsequent internal call invocation. Delete the
24659 GetLastError() internal call, because it's useless.
24661 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
24663 * class.[ch]: added cast_class to fix bug 29517
24665 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
24667 * marshal.c: create valid IL code in the filter clause:
24668 the new JIT is less forgiving:-)
24670 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24672 * icall.c: removed get_property internal call.
24674 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
24676 * appdomain.h domain.c: Added an ID to appdomains.
24678 * threads.c threads.h icall.c: Implement icall
24679 Thread:GetDomainID(), and remove unused icall
24680 CurrentThreadDomain_internal.
24682 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24684 * icall.c: Don't recurse through the base types in GetConstructor.
24687 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
24689 * mempool.h, mempool.c: added mono_mempool_empty() and
24690 mono_mempool_stats().
24692 2002-10-23 Dick Porter <dick@ximian.com>
24696 * icall.c: Added MonoIO.GetFileType internal call
24698 2002-10-17 Dick Porter <dick@ximian.com>
24700 * appdomain.c (mono_runtime_cleanup): Don't signal the async
24701 delegate semaphore before waiting for all threads to finish,
24702 because new threads can also call async delegates. Fixes bug
24705 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
24706 of 3 seconds, in case another async job is queued. (This part is
24707 needed because the bug fix reintroduced the 3s exit lag.) This
24708 makes the mono_runtime_shutdown flag superfluous.
24710 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
24712 * reflection.c: include ehader size in method section headers.
24713 Really check for suplicated modules entries.
24715 2002-10-17 Martin Baulig <martin@gnome.org>
24717 * debug-mono-symfile.c: Added back support for locals.
24719 2002-10-14 Martin Baulig <martin@gnome.org>
24721 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
24724 2002-10-14 Martin Baulig <martin@gnome.org>
24726 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
24727 mono_class_get() instead of looking in the class cache.
24729 2002-10-13 Martin Baulig <martin@gnome.org>
24731 * debug-mono-symfile.c: Set version number to 28, include the
24732 signature in method names.
24734 2002-10-13 Martin Baulig <martin@gnome.org>
24736 * debug-mono-symfile.h: Set version number to 27.
24738 2002-10-11 Martin Baulig <martin@gnome.org>
24740 * gc.c: Don't register/unregister NULL pointers as disappearing links.
24742 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
24744 * metadata.c, metadata.h: added helper function to allocate signatures.
24746 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24748 * icall.c: added internal call to get the location of machine.config.
24750 2002-10-08 Martin Baulig <martin@gnome.org>
24752 * debug-mono-symfile.c: Ignore classes with a pending init for the
24755 2002-10-03 Dick Porter <dick@ximian.com>
24757 * threads.c: Freebsd pthread_t is a pointer
24759 2002-10-03 Dick Porter <dick@ximian.com>
24761 * socket-io.c: Implemented GetHostName_internal
24763 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24766 (mono_config_parse_file): don't leak the text.
24768 2002-10-02 Martin Baulig <martin@gnome.org>
24770 * debug-mono-symfile.c: Added support for methods.
24772 2002-10-01 Martin Baulig <martin@gnome.org>
24774 * debug-mono-symfile.c: Don't emit methods and line numbers for
24775 the dynamic symbol file, just write the type table. We can easily
24776 have an external helper program which creates a symbol file for an
24779 2002-10-01 Dick Porter <dick@ximian.com>
24781 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
24782 Only add the handle to the cleanup array when we're about to
24783 launch the thread. Bug 31425 deadlocked when the test was run on
24786 2002-10-01 Martin Baulig <martin@gnome.org>
24788 * debug-mono-symfile.c: Added support for properties.
24790 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
24792 * reflection.c: unaligned store fix from Mark Crichton
24793 <crichton@gimp.org>.
24795 2002-09-27 Martin Baulig <martin@gnome.org>
24797 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
24800 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
24802 * assembly.h, assembly.c: use a sane API to hook into the assembly
24803 loading process instead of a useless special-purpouse hack
24804 (ngen needs a hook, too, for example).
24806 2002-09-27 Dick Porter <dick@ximian.com>
24808 * threads.c (mono_thread_init): Call GetCurrentProcess() so
24809 io-layer can set up some process handle info. Not needed on w32,
24810 but doesn't hurt either.
24812 * process.c: Pass the program name in the second parameter to
24813 CreateProcess, so the path is searched. Include the working
24814 directory. Implemented process name, process enumeration, and some
24815 process detail internal calls.
24817 * icall.c: Added internal calls for process lookup, and some
24820 2002-09-26 Martin Baulig <martin@gnome.org>
24822 * assembly.c (mono_install_open_assembly_hook): New global
24823 function to install a function to be invoked each time a new
24824 assembly is loaded.
24825 (mono_assembly_open): Run this callback function if set.
24827 * debug-mono-symfile.c: Put back line numbers for the dynamic
24828 symbol file and also record the .il file as source file. This
24829 allows us to install the temporary symbol file as `file.dbg' just
24830 like a compiler-generated one.
24832 2002-09-26 Nick Zigarovich <nick@chemlab.org>
24834 * Corrected typo in gc.c (BOHEM vs BOEHM).
24836 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24838 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
24839 GetProperties. Also avoid calling g_slist_length in GetProperties and
24842 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
24844 * reflection.c: avoid unaligned stores (bug spotted by
24845 Mark Crichton <crichton@gimp.org>).
24847 2002-09-25 Martin Baulig <martin@gnome.org>
24849 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
24850 instead of guint64 for addresses and added prologue/epilogue info.
24852 2002-09-25 Martin Baulig <martin@gnome.org>
24854 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
24855 store line number info. For the dynamic symbol file, we only need
24856 to provide the JIT generated dynamic line number info for the dynamic
24859 2002-09-25 Martin Baulig <martin@gnome.org>
24861 * debug-mono-symfile.h: Incremented version number.
24863 2002-09-24 Martin Baulig <martin@gnome.org>
24865 * class.c (mono_debugger_class_init_func): New global function
24867 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
24870 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
24871 function. This is called via the mono_debugger_class_init_func
24872 hook to add all types to the dynamic type table.
24873 (ves_icall_MonoDebugger_GetType): New interncall to get a class
24874 from its metadata token.
24876 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
24877 New interncall for the debugger.
24879 2002-09-24 Nick Drochak <ndrochak@gol.com>
24881 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
24882 before using it in case it is null.
24884 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
24886 * metadata.c: allow custom modifiers in local var signatures
24887 (bug spotted by Zoltan Varga).
24889 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
24891 * class.c: deal with the <Module> class that may have a NULL vtable.
24892 Eliminate warnings.
24894 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
24896 * image.c, image.h: more strong name helpers.
24897 * monosn.c: more work: convert pem keys to cryptoapi format.
24899 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
24901 * string-icalls.c: speedup IndexOf.
24903 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
24905 * icall.c: updates from Zoltan.2.Varga@nokia.com.
24907 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
24909 * icall.c: cleanup: use mono_object_domain ().
24911 2002-09-23 Martin Baulig <martin@gnome.org>
24913 * debug-mono-symfile.c: Improved type support.
24915 2002-09-22 Martin Baulig <martin@gnome.org>
24917 * debug-mono-symfile.c: Added support for reference types and strings.
24919 2002-09-22 Martin Baulig <martin@gnome.org>
24921 * debug-mono-symfile.c: Started to work on the type table.
24923 2002-09-21 Martin Baulig <martin@gnome.org>
24925 * debug-mono-symfile.c: Largely reworked the symbol table format.
24926 The symbol table is now incrementally updated each time a new
24927 method is added. We're now also using our own magic and version
24928 so that you don't need to recompile all your classes if the
24929 dynamic table changes.
24930 (mono_debug_update_mono_symbol_file): Removed.
24931 (mono_debug_symfile_add_method): New function to add a method.
24933 2002-09-21 Martin Baulig <martin@gnome.org>
24936 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
24939 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
24940 New interncall to get a method from its metadata token.
24942 2002-09-21 Martin Baulig <martin@gnome.org>
24944 * debug-mono-symfile.c: Create type table.
24946 2002-09-20 Martin Baulig <martin@gnome.org>
24948 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
24950 2002-09-20 Martin Baulig <martin@gnome.org>
24952 * debug-mono-symfile.c: Provide information about params and locals.
24954 2002-09-20 Martin Baulig <martin@gnome.org>
24956 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
24959 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
24960 interncall to get a method from its metadata token.
24962 2002-09-20 Martin Baulig <martin@gnome.org>
24964 * debug-mono-symfile.c: Added a few checks for method->header
24965 being non-NULL. This should never happen, but for the moment
24966 let's use a g_warning() rather than a g_assert().
24968 2002-09-19 Mark Crichton <crichton@gimp.org>
24970 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
24971 even if support for it isn't present. Added an #ifdef to fix this.
24973 * socket-io.c: Added checks back for Solaris support.
24975 2002-09-19 Martin Baulig <martin@gnome.org>
24977 * debug-mono-symfile.c (read_string, write_string): Reflect latest
24978 changes in the symbol file format.
24980 2002-09-18 Martin Baulig <martin@gnome.org>
24982 * debug-mono-symfile.c: Set version number to 21.
24984 2002-09-18 Dick Porter <dick@ximian.com>
24986 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
24987 on netbsd. Fixes bug 30051.
24989 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24992 (set_version_from_string): little fix.
24994 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
24996 * monosn.c, Makefile.am: added strong name utility.
24997 * reflection.h, reflection.c: implemented delayed signing,
24998 locale, version and hash id assembly attributes.
25000 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
25002 * loader.c, metadata.c: load param attributes in signatures.
25004 2002-09-16 Martin Baulig <martin@gnome.org>
25006 * debug-mono-symfile.c: Added string table with all method names.
25008 2002-09-14 Martin Baulig <martin@gnome.org>
25010 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
25011 fast method lookup.
25013 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
25015 * reflection.c: record the public key token of referenced assemblies.
25017 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
25019 * image.c, image.h: added functions to get the strong name and the
25020 public key of an assembly.
25021 * pedump.c: use them.
25023 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
25025 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
25027 2002-09-12 Miguel de Icaza <miguel@ximian.com>
25029 * marshal.c (mono_marshal_get_managed_wrapper): Added
25032 2002-09-11 Martin Baulig <martin@gnome.org>
25034 * gc.c: Call GC_unregister_disappearing_link() on all links when
25035 finalizing them, this is necessary to aviod a crash in boehm's
25038 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
25040 * gc.c: handle GetTarget for finalized objects spotted and fixed by
25043 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
25045 * icall.c: implemented MonoType::Module.
25046 * reflection.c, reflection.h: mono_module_get_object () from
25047 Tomi Pakarinen <tomi.pakarinen@welho.com>.
25049 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
25051 * icall.c: ignore overridden methods in GetMethods ().
25052 Fix for FieldInfo::SetValue().
25053 * object.c: handle float/double in runtime invoke.
25055 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
25057 * object.c: allow a constructor to be called again on an object.
25059 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
25061 * class.h, class.c: move field layout code to it's own function and
25062 export it. Get an interface id earlier. Move fields in MonoClass
25063 so they are more cache friendly and align the bitfields.
25064 * loader.c: temporary handle get_param_names() for a runtime method.
25065 * reflection.c, reflection.h: more code to handle runtime creation of
25068 2002-09-09 Martin Baulig <martin@gnome.org>
25070 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
25071 signature with the pinvoke field being set for the actual call.
25073 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
25075 * icall.c: removed some unused icalls. Start of map of glib charsets
25076 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
25078 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
25080 * debug-helpers.c: break infinite loop (found and fixed by
25081 Holger Arnold <harnold@gmx.de>).
25083 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
25085 * icall.c: target may be null in create_delegate.
25087 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
25089 * marshal.c: handle a boolean return type.
25091 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
25093 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
25095 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
25097 * gc.c: fix weakreferences.
25099 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
25101 * icall.c: added icall to get default codepage.
25103 2002-09-03 Dick Porter <dick@ximian.com>
25106 * threads.c: Use MonoThread instead of MonoObject where
25109 Store running thread objects in a hash table, so that we have all
25110 the info to hand when waiting for them to finish
25111 (means we don't need OpenThread() any more, so mingw builds should
25112 be fully functional again.)
25115 * object.h: Added thread ID to MonoThread
25117 2002-09-03 Martin Baulig <martin@gnome.org>
25119 * icall.c (System.Reflection.Assembly::get_location): New interncall.
25121 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25123 * icall.c: fixed leak in get_temp_path. Thanks lupus.
25125 2002-09-03 Martin Baulig <martin@gnome.org>
25127 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
25128 argument to store the end address of the disassembled instruction.
25130 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
25131 here from debug-symfile.h.
25132 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
25133 JIT into this struct.
25134 (MonoSymbolFile): Added `char *image_file' field.
25135 (MonoDebugGetMethodFunc): Removed.
25136 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
25137 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
25138 (mono_debug_find_method): New method.
25140 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
25141 create a full symbol file.
25142 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
25143 and static symbol files.
25144 (mono_debug_find_method): The symbol file keeps an internal method hash,
25145 call this to get a MonoDebugMethodInfo from a MonoMethod.
25147 * debug-symfile.[ch]: Removed.
25149 2002-08-29 Miguel de Icaza <miguel@ximian.com>
25151 * image.c (do_mono_image_open): Remove linker version check.
25153 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
25155 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
25156 wrappers for instance methods.
25158 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25160 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
25162 2002-08-28 Dick Porter <dick@ximian.com>
25164 * Makefile.am: Export HOST_CC for w32 builds
25166 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
25168 * file-io.c process.c: MonoString are null terminated, no
25169 need for mono_string_to_utf16() anymore.
25171 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
25173 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
25175 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
25177 * icall.c, reflection.h: speedup System.MonoType.
25179 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
25181 * reflection.c: allow null as the value of a string argument in
25182 custom attributes constructors.
25184 2002-08-27 Martin Baulig <martin@gnome.org>
25186 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
25187 `trampoline_address' field.
25189 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
25191 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
25192 check (fixes bug #29486)
25194 2002-08-27 Martin Baulig <martin@gnome.org>
25196 * debug-mono-symfile.c: Changed the file format in a way that allows us
25197 open it read-only and to use a specially malloced area for all the
25198 dynamic data. We can now also generate a symbol file on-the-fly if we're
25199 debugging IL code and there is no MCS generated symbol file for it.
25201 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
25203 * object.c: added a define for a good string and array
25204 creation speedup (not enabled by default because we need to deal with
25207 2002-08-26 Martin Baulig <martin@gnome.org>
25209 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
25210 function to create a dynamic symbol file. This is used by the
25211 debugger to create a symbol file for IL code on-the-fly.
25213 2002-08-26 Martin Baulig <martin@gnome.org>
25215 * loader.c (mono_lookup_pinvoke_call): Include the error message
25216 from g_module_error() in the error message.
25218 2002-08-24 Martin Baulig <martin@gnome.org>
25220 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
25221 function to update the symbol file. The symbol file is mmap()ed
25222 writable, but private. This allows us to install the symbol file
25223 together with the assembly.
25225 2002-08-24 Martin Baulig <martin@gnome.org>
25227 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
25228 but they can read the new symbol file format which mcs is now creating.
25230 * debug-symfile.c (mono_debug_find_source_location): Moved to
25231 debug-mono-symfile.c; this is now operating on the new symbol file.
25233 2002-08-23 Martin Baulig <martin@gnome.org>
25235 * debug-helpers.c (mono_method_desc_from_method): New function to get
25236 a MonoMethodDesc from a MonoMethod.
25238 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
25240 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
25241 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
25243 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
25245 * string-icalls.[ch]: make helper methods static.
25247 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25249 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
25250 types to it and to SetValueInternal.
25252 * object.c: Moved handle_enum label to its proper place. This was the
25255 This time i compiled mcs and gtk-sharp and they both work.
25257 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25259 * icall.c: reverted partially my previous patch until
25260 object.c:set_value handles enums correcly.
25262 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25265 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
25266 (ves_icall_System_Environment_get_MachineName): removed warning when
25267 compiling under cygwin.
25269 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
25271 * object.c: fixed field_get_value() for reference types.
25273 2002-08-22 Dick Porter <dick@ximian.com>
25275 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
25276 Don't free a buffer while it's still needed. Patch from Jonathan
25277 Liger <Jonathan.liger@wanadoo.fr>
25279 2002-08-21 Miguel de Icaza <miguel@ximian.com>
25281 * icall.c (ves_icall_System_Environment_get_Platform): Add new
25284 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
25286 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
25287 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
25289 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
25290 we call unmanaged code which throws exceptions.
25292 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
25294 * appdomain.h: added per-domain entry_assembly.
25295 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
25297 * icall.c: Assembly::GetEntryAssembly icall.
25298 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
25299 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
25301 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
25303 * appdomain.h, gc.c: added mono_domain_finalize ().
25305 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25308 (mono_print_unhandled_exception): changed g_warning by g_printerr
25309 because g_log has a 1024 characters limit (yeah, i got a big stack
25310 trace). Don't print exception name, that should be in ToString
25313 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25315 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
25316 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
25318 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25321 (mono_print_unhandled_exception): after previous commit, i realized
25322 that MS calls ToString on the exception. I changed this function to
25323 do that. This way we get stack_trace for free.
25325 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25328 (mono_print_unhandled_exception): invoke Message property instead of
25329 getting 'message' field from Exception. Don't allocate memory for
25330 'trace' and 'message' if not needed.
25332 2002-08-18 Dick Porter <dick@ximian.com>
25334 * unicode.c: Fix asserts to match Encoder.cs checks
25336 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
25338 * marshal.c: fix unaligned store issue and a few wrong
25339 opcode argument types.
25341 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25343 * icall.c: added GetUninitializedObjectInternal internal call.
25345 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
25347 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
25348 to the right domain.
25350 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
25352 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
25354 * class.c (class_compute_field_layout): set blittable to false for Strings
25356 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
25358 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
25360 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
25361 first chunk of code to create types at runtime. Code to
25362 handle ReflectedType/DeclaringType. Make reflection handles
25365 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
25367 * class.c: set correct name in arrays.
25369 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
25371 * appdomain.c (mono_domain_transfer_object): make it work with
25372 valuetypes. bug fixes.
25374 2002-08-12 Dick Porter <dick@ximian.com>
25376 * object.h: Rename some parameters to avoid c++ keywords (Patch
25377 from Joseph Wenninger <kde@jowenn.at>)
25379 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
25381 * icall.c: added icall to implement Assembly.GetFile*.
25383 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
25385 * reflection.h, reflection.c: code to embed managed resources.
25387 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
25389 * class.c: move all the type size stuff into
25390 class_compute_field_layout().
25392 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
25394 * class.c: ensure enums have always the correct instance size.
25395 * unicode.c: remove wrong assert.
25397 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
25399 * assembly.c: fix mem corruption issue.
25400 * image.h, image.c: added mono_image_get_resource () to access
25402 * icall.c: implemented Assembly.EntryPoint property and some
25403 Managed Resources related internalcalls.
25406 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
25408 * image.c, image.h: impemented mono_image_get_entry_point ().
25409 * appdomain.c: use mono_image_get_entry_point.
25411 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
25413 * reflection.c: support the object type argument when loading
25416 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
25418 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
25419 String as return type.
25421 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
25423 * reflection.c: fix encoding of named args for custom attrs to match
25424 the ms implementation. Read them back when instantiating custom
25427 2002-08-02 Radek Doulik <rodo@ximian.com>
25429 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
25430 by Dietmar as quick fix
25431 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
25432 16 as stack size, used on more places as quick fix before Dietmar
25433 will fix it properly
25435 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
25437 * object.h, object.c: added accessors for fields and properties.
25439 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
25441 * class.c, class.h: made mono_class_get_field_from_name ()
25442 loop on parent types.
25443 Added mono_class_get_property_from_name ().
25445 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
25447 * class.c, class.h: move the code to setup the type vtable in its own
25448 function so that it can be reused also for types created at runtime.
25449 Eliminate the "class" identifier from the header file.
25450 * reflection.c: setup the vtable for enums so that we can create
25451 objects for use in SetConstant ().
25453 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
25455 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
25456 instead of the delegate itself as this pointer (bug #28383)
25458 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
25460 * marshal.c (mono_marshal_get_managed_wrapper): added return type
25463 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
25465 * loader.c: don't set the pinvoke bit on icalls.
25467 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
25469 * debug-helpers.c (mono_method_full_name): only print a number to
25470 indicate wrapper type (so that the output is more readable in traces).
25472 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
25474 * class.c (mono_class_init): include method override patch from Paolo
25476 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
25478 * icall.c: fixed GetTypeCode().
25480 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
25482 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
25483 use real delegate invoke function to make it work with multicast
25484 delegates (fix bug# 28291).
25486 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
25488 * object.c: load constant strings.
25490 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
25492 * reflection.c: no magic numbers.
25493 * tabledefs.h: security action enum.
25495 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
25497 * assembly.c: fix possible memory corruption.
25499 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
25501 * reflection.h, reflection.c: added support for linking resources.
25502 * verify.c: check we have an updated corlib.
25504 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
25506 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
25508 (mono_marshal_string_array): null terminate unmanaged string arrays.
25509 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
25511 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
25513 * icall.c: Type.GetType () can now return also types from the
25516 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
25518 * loader.h, loader.c: stack walking support.
25519 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
25520 GetCallingAssembly.
25522 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
25524 * marshal.c: added optimisations for blittable types
25526 * class.c (mono_array_class_get): do not set blittable attribute on arrays
25527 (mono_class_setup_mono_type): set blittable attribute for single
25530 * marshal.c (mono_string_utf8_to_builder): impl.
25531 (mono_string_builder_to_utf8): impl.
25532 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
25534 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
25536 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
25537 (mono_marshal_get_managed_wrapper): impl. byref types
25539 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25542 (search_method): don't display debug message.
25544 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
25546 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
25548 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
25550 * appdomain.c: set the missing filename when throwing exception.
25552 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
25554 * metadata.c (mono_type_size): code cleanup
25555 (mono_type_stack_size): removed some test code
25557 2002-07-21 Miguel de Icaza <miguel@ximian.com>
25559 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
25560 mono_get_exception_file_not_found now.
25562 * exception.c (mono_exception_from_name_two_strings): New version
25563 that will call a constructor with two string arguments.
25564 (mono_get_exception_file_not_found): New helper routine, used to
25565 report file-not-found errors.
25567 2002-07-20 Dick Porter <dick@ximian.com>
25570 * process.c: Pass file handles to CreateProcess
25574 * file-io.c: Implemented CreatePipe
25576 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
25578 * metadata.c (mono_get_param_info): set alignment for value types
25580 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
25582 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
25583 Constify mono_domain_assembly_open().
25584 * loader.c: handle null namespace in icalls.
25586 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
25588 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
25589 (emit_str_to_ptr_conv): marshal object as structs
25591 * metadata.c (mono_type_to_unmanaged): marshal object as structs
25593 * marshal.c (mono_marshal_get_runtime_invoke): support value types
25595 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
25597 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
25598 (mono_marshal_get_native_wrapper): we an now return value types
25600 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
25602 * verify.c: more checks implemented.
25604 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
25606 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
25608 (mono_marshal_get_native_wrapper): allow byref arguments
25609 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
25610 impl. PtrToStringXXX methods
25611 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
25612 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
25613 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
25614 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
25615 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
25617 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
25619 * reflection.c: fix buglet in parsing an assembly name.
25621 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
25623 * marshal.c (emit_ptr_to_str_conv): first impl.
25625 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
25627 * object.c, class.h: cache the vtable in the class as suggested by
25628 vargaz@freemail.hu (Zoltan Varga).
25630 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
25632 * class.h, loader.c: added mono_field_from_token().
25633 * verify.c: first cut of type checking code.
25635 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
25637 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
25639 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
25641 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
25643 (mono_marshal_get_remoting_invoke): impl.
25644 (mono_delegate_begin_invoke): impl.
25645 (mono_mb_emit_save_args): impl.
25646 (mono_delegate_end_invoke): impl.
25647 (mono_marshal_get_delegate_begin_invoke):
25648 (mono_marshal_get_delegate_end_invoke):
25649 (mono_marshal_get_delegate_invoke): generate a special name for
25650 those methods (including the signature) and associate them whith
25651 the delegate class.
25653 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
25656 (mono_reflection_type_from_name): now it has a MonoImage parameter
25657 which is used as the default image to search the type in. If the image
25658 is NULL or getting the type from it fails, it defaults to corlib.
25660 * icall.c: changed 1 call to mono_reflection_type_from_name to match
25663 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
25665 * reflection.c: update the parameter table index.
25667 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
25669 * domain.c: don't include the mark byte in the string hash.
25671 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
25673 * icall.cs: icall for Type.GetTypeCode ().
25674 * verify: a couple of fixes and disabled local initialization checks.
25676 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
25678 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
25680 * debug-helpers.c (mono_method_full_name): print the type of the
25683 * metadata.c (mono_signature_hash): a hash function for signatures
25684 (mono_signature_hash): better hash algorithm
25686 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
25688 * debug-helpers.c (mono_method_full_name): this can now generate
25689 method names with signatures
25691 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
25692 method dont have this pointers.
25694 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
25696 * reflection.c: fixup typebuilder tokens.
25697 * image.c: fix buglet.
25698 * marshal.h: remove whitespace.
25699 * metadata.h, metadata.c: reinstate code that was removed.
25700 * verify.c: handle catch directives and fix another couple of bugs.
25702 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
25704 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
25705 (mono_marshal_get_native_wrapper): make it comp. with the old code
25706 (mono_marshal_get_native_wrapper): support boolean
25707 (mono_marshal_get_managed_wrapper): support more types
25709 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
25711 * class.c (class_compute_field_layout): compute class->blittable attribute.
25713 2002-07-09 Dick Porter <dick@ximian.com>
25715 * threads.c: Make the thread cleaning up cope with threads that
25718 2002-07-08 Radek Doulik <rodo@ximian.com>
25720 * reflection.c (method_encode_code): use non-translated values to
25721 compute finally_start, this fixes exception handling on ppc, yay!
25723 * decimal.h (struct signscale): fix endianess
25725 2002-07-07 Radek Doulik <rodo@ximian.com>
25727 * reflection.c: swap box_val and not val
25729 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
25731 * reflection.c, reflection.h: handle full assembly info in type name.
25732 Handle Type arguments when loading custom attributes.
25733 * icall.c: updated to use new mono_reflection_type_from_name () method.
25735 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25738 (method_from_memberref): also print assembly name when method not found.
25740 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25743 (ves_icall_TypeGetProperties): fixed bug #27473.
25745 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25747 * reflection.c: display image name and token when cannot find the
25748 .ctor for an attribute.
25750 2002-07-05 Martin Baulig <martin@gnome.org>
25752 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
25754 2002-07-04 Dick Porter <dick@ximian.com>
25756 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
25757 compile on mingw. This will cause mingw builds to not wait for
25758 subthreads to terminate after the main thread does. I've lodged a
25759 bug with the mingw developers for them to wrap OpenThread().
25761 2002-07-03 Dick Porter <dick@ximian.com>
25763 * threads.c: Store thread IDs instead of handles, because
25764 GetCurrentThread() returns a pseudohandle and therefore stores
25765 useless values. mono_thread_cleanup() continues checking the
25766 array of threads until it is empty, to cope with subthreads
25767 spawning new threads after the main thread has finished.
25771 * profiler-private.h: Pass the thread ID to thread profiler
25772 functions, instead of a handle
25774 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
25776 * verify.c: fixes to make it more usable.
25777 * pedump.c: added --verify code to verify IL code in an assembly.
25779 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
25781 * reflection.c: turn errors into warnings to allow compiling corlib.
25783 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
25785 * reflection.c: add special cases to compile corlib.
25787 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
25789 * reflection.c: handle properties with only a set method.
25791 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
25793 * opcodes.h: add enum with opcodes in opval order.
25795 2002-07-01 Dick Porter <dick@ximian.com>
25798 * object.c (mono_runtime_run_main): Removed unneeded argument
25800 2002-06-28 Martin Baulig <martin@gnome.org>
25802 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
25804 2002-06-27 Dick Porter <dick@ximian.com>
25806 * threads.c: Store the handle in both the parent thread and in the
25807 subthread, to minimise the time between starting a new thread and
25810 2002-06-26 Dick Porter <dick@ximian.com>
25812 * appdomain.c (mono_runtime_cleanup): Close the socket library
25813 after all the threads have finished, not before
25815 2002-06-26 Martin Baulig <martin@gnome.org>
25817 * debug-symfile.c (mono_debug_find_source_location): Added
25818 `guint32 *line_number' argument. If it's not NULL, store the line number
25819 there and return the file name without the line number.
25821 2002-06-25 Dick Porter <dick@ximian.com>
25825 * process.c: Process forking and other support functions
25827 2002-06-25 Dick Porter <dick@ximian.com>
25829 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
25830 things dont happen when the image is closed.
25831 (mono_image_lookup_resource): Walk the resource section looking
25832 for a particular entry
25834 * cil-coff.h: PE resource section decoding
25836 2002-06-25 Dick Porter <dick@ximian.com>
25840 (mono_assembly_foreach): Accessor functions to walk the list of
25842 (mono_assembly_set_main):
25843 (mono_assembly_get_main): Process methods need to know which
25844 assembly is the "main" one
25846 * object.c (mono_runtime_run_main): Record the main assembly
25848 * debug-helpers.c: Fix typo
25850 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
25852 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
25853 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
25855 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
25857 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
25859 2002-06-21 Miguel de Icaza <miguel@ximian.com>
25861 * image.c (do_mono_image_open): Initialize reference count,
25862 otherwise we leak the MonoImage.
25864 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
25866 * reflection.c: small tweak to handle self-hosting.
25868 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
25870 * reflection.c: fix type name parse code.
25872 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
25874 * reflection.c: break out of the loop.
25875 * image.c: special case corlib.
25877 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
25879 * reflection.c: add all the custom attrs at the end to ensure the
25880 ctors have been properly initialized when the attributes are defined
25881 in the current assembly.
25883 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
25885 * reflection.c: handle correctly multiple-nested types.
25887 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
25889 * row-indexes.h: fix typos.
25890 * reflection.c: adjust for typos and fix method_def_or_ref
25891 encoding in MethodImpl table.
25893 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
25895 * reflection.c: fix entry point patching (thanks Serge!).
25897 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
25899 * verify.c: add check for System.Exception
25901 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
25903 * image.c, class.c: minifix for code just c&p'ed.
25904 * reflection.c: warning fix.
25905 * object.h, loader.h, domain.c: load also StringBuilder.
25907 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
25909 * marshal.h, marshal.c: some support code to handle complex marshaling.
25911 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
25913 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
25914 Better signatures with vtable error dump.
25916 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
25918 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
25920 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
25922 * icall.c (ves_icall_Type_GetField): impl.
25924 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
25926 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
25927 to retrieve a marshal description blob for a field or param.
25929 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
25931 * reflection.h, reflection.c: change order of nested type emission
25932 to avoid table corruption. The NestedTypes table is sorted.
25933 * icall.c: change order of GetConstructor results to workaround mcs bug.
25935 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
25937 * reflection.h, reflection.c: handle field and param marshal
25940 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
25942 * icall.c, marshal.c marshal.h: more Marshal class implementation.
25944 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
25946 * reflection.c: fix call convention.
25948 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
25950 * reflection.h, reflection.c: mono_image_get_memberref_token()
25951 takes a type instead of a class, now. Added
25952 mono_image_get_array_token() to create tokens for the special
25953 multi-dim array methods.
25955 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
25957 * assembly.c: handle modules (no assembly table). Split
25958 loading references in its own function.
25959 * class.c: handle moduleref resolution scope.
25960 * image.c, image.h: cache module name in image.
25962 2002-06-07 Martin Baulig <martin@gnome.org>
25964 * reflection.c (mono_image_get_type_info): Only add a class layout entry
25965 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
25967 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
25969 * icall.c: more signature fixes that used uint instead of int.
25971 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
25973 * reflection.c: fixed signature of field refs.
25975 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
25977 * class.c, reflection.c: handle typerefs of nested types
25978 (both on read and when writing files).
25980 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
25982 * icall.c: fix method signatures that tried to workaround the previous
25985 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
25987 * debug-helpers.c: fix typo.
25989 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
25991 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
25992 rewrote the PE/COFF writing code (our programs are understood by the
25995 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
25997 * gc.c, gc.h, icall.c: weakreference support.
25999 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
26001 * Makefile.am, mono-config.c: use $(sysconfdir).
26003 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26005 * icall.c: changed default precision of Double.ToString() to 15.
26006 Fixed memory leak. Unified with Single.ToString.
26008 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
26010 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
26012 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
26014 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
26015 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
26016 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
26019 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
26021 * debug-symfile.c, sysmath.c: yet more compilation fixes.
26023 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
26025 * reflection.c, socket-io.c: more compilation fixes.
26027 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26029 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
26030 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
26031 unicode.c: warning and compiler compatibility fixes.
26033 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26035 * class.h, metadata.c: fixed warnings/compilation errors.
26037 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
26039 * Makefile.am, mono-config.c, mono-config.h: configuration file
26041 * loader.c, loader.h: make Dll mapping configurable at runtime in the
26042 config file. Export methods to insert and lookup mappings.
26044 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
26046 * reflection.c: handle types and boxed objects in custom attr
26049 2002-05-30 Martin Baulig <martin@gnome.org>
26052 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
26054 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
26056 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
26057 to lookup the implmap row for a P/Invoke method.
26058 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
26059 P/Invoke method from the runtime on an as needed basis.
26061 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
26063 * metadata.c (mono_metadata_parse_signature): impl.
26065 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
26067 * class.c: handle .pack directive.
26069 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
26071 * object.c: initialize static fields with RVA data.
26073 2002-05-25 Martin Baulig <martin@gnome.org>
26076 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
26078 2002-05-24 Martin Baulig <martin@gnome.org>
26081 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
26082 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
26083 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
26085 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26087 * object.c: special case string ctros in invoke.
26088 * gc.c: silly whitespace changes.
26090 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
26092 * threadpool.[ch]: impl. a threadpool that can
26093 be used by mint and mono.
26095 2002-05-22 Martin Baulig <martin@gnome.org>
26097 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
26098 The first argument is now a `MonoReflectionModuleBuilder *', the return
26099 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
26100 `methods' field to get the method builder. The `token' argument is the
26103 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
26104 invalid characters instead of g_assert_not_reached()ing. This seems
26105 to be the behaviour of mscorlib.
26107 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
26109 * object.c (mono_runtime_invoke_array): applied patch from Rachel
26110 Hestilow to fix bug #25104
26112 2002-05-21 Martin Baulig <martin@gnome.org>
26114 * debug-symfile.c (mono_debug_find_source_location): New function.
26115 Looks up an IL offset in the line number table and returns the source
26116 location as a string.
26118 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26121 (mono_double_ToStringImpl): changed %f by %g until we have something
26124 2002-05-21 Nick Drochak <ndrochak@gol.com>
26126 * icall.c : Use different name for Math.Pow's icall. Needed to check
26127 parameters first in C#.
26129 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
26131 * icall.c, reflection.h: added icall to get info about an event.
26133 2002-05-20 Radek Doulik <rodo@ximian.com>
26135 * object.c (mono_value_box): don't use memcpy for boxing on BIG
26137 (mono_value_box): don't use memcpy for small sizes on
26138 architectures with unaligned access
26140 2002-05-20 Martin Baulig <martin@gnome.org>
26142 * reflection.c (mono_reflection_setup_internal_class): Don't crash
26143 if `tb->parent == NULL'.
26144 (mono_reflection_create_internal_class): New function. This is
26145 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
26148 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
26151 2002-05-19 Martin Baulig <martin@gnome.org>
26153 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
26154 argument to get the length, don't default to the array length.
26156 2002-05-18 Miguel de Icaza <miguel@ximian.com>
26158 * assembly.c (mono_assembly_setrootdir): New function used to
26159 override the MONO_ASSEMBLIES directory.
26161 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26163 * icall.c: ValueType_GetHashCode() initialize local var.
26165 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26167 * reflection.c: sort custom attributes table.
26169 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
26171 * reflection.c: support named args in custom attributes (write support).
26173 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
26175 * reflection.c: fix finally position calculation.
26177 2002-05-15 Radek Doulik <rodo@ximian.com>
26179 * reflection.c: fixed endianess at many places
26181 * icall.c (ves_icall_InitializeArray): comment out debug msg
26183 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
26185 * object.c (mono_unhandled_exception): new function to handle
26186 unhandled exceptions.
26187 (mono_unhandled_exception): call the UnhandledException event.
26188 (mono_runtime_delegate_invoke): impl.
26190 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
26192 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
26193 returns the RVA, not the direct pointer to the data. Handle the case
26194 when the class size is fixed.
26196 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
26198 * reflection.c: fix some endianess issues.
26200 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
26202 * object.c (mono_runtime_invoke): is now able to catch exceptions.
26204 * threads.c (mono_thread_init): added a callback which is invoked
26207 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
26209 * icall.c: make GetHashCode return non-negative values.
26211 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
26213 * object.c, icall.c, gc.c: revert to address-based hashcode.
26215 2002-05-13 Miguel de Icaza <miguel@ximian.com>
26217 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
26219 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
26221 * icall.c, class.c: special case <Module>.
26223 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
26225 * icall.c: fix bug in GetNow().
26227 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
26229 * object.c (mono_runtime_class_init): make sure that we call all
26230 static class constructors.
26232 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
26234 * reflection.c: sort methodsemantics table.
26236 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
26238 * reflection.h, reflection.c: honour init locals setting.
26240 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
26242 * icall.c: copied Double ToStringImpl for Single ToStringImpl
26244 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
26246 * reflection.c: support ContructorBuilders in attribute blob creation.
26248 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
26250 * reflection.c: some changes to build a binary that can be run
26251 directly in windows.
26253 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
26255 * loader.c: print a big message when an icall can't be found.
26257 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26259 * string-icalls.c: fix bug 24248.
26261 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
26263 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
26264 icall.c, reflection.h: separate assembly loading by pathname and by
26265 assembly name. Use the MONO_PATH env var to search for assemblies.
26267 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
26269 * assembly.c, image.h: add some support for assemblies
26270 with multiple modules.
26271 * class.c, class.h: export mono_class_from_typeref().
26272 * loader.c: remove duplicated code and use mono_class_from_typeref(),
26275 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
26277 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
26278 documentation says (the ECMA one is correct).
26280 2002-05-02 Dick Porter <dick@ximian.com>
26282 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
26283 Don't name the synchronisation mutex.
26285 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
26288 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
26289 Make the prototypes match.
26290 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
26294 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
26295 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
26296 all systems have tm.tm_zone, so use strftime() with %Z to print
26297 the timezone abreviation into a temp string.
26299 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
26300 rather than mono_array_addr() on a MonoString on Big Endian
26303 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
26305 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
26308 2002-04-30 Dick Porter <dick@ximian.com>
26310 * socket-io.c: Cope with SOCKET being an integer rather than a
26313 * threads.c: Added Thread_free_internal, to deal with thread
26314 handle cleanup. Moved calls to handle_store() and handle_remove()
26315 to start_wrapper(), so each can only be called once. Allocate
26316 synchronisation blocks with GC_malloc(), and use GC finalisation
26317 to close the handles.
26319 * icall.c: added System.Threading.Thread::Thread_free_internal
26321 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
26323 * icall.c: support Environment.Exit, CommandLineArgs().
26325 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
26327 * object.c, object.h: added mono_runtime_run_main () and
26328 mono_runtime_get_main_args () for use in System.Environment.
26330 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
26332 * gc.c: fix thinko, enable actual finalization since the jit is now
26335 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
26337 * gc.c, object.c: take into account that an object may be offset wrt the address
26338 returned by GC_malloc().
26340 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
26342 * image.c: handle files without entries in the assembly table (modules).
26344 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
26346 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
26347 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
26348 allowed to be null when it's System.Object class setup.
26350 2002-04-27 Martin Baulig <martin@gnome.org>
26352 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
26353 if `tb->parent == NULL' rather than crashing.
26355 2002-04-28 Nick Drochak <ndrochak@gol.com>
26357 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
26358 calling acos() where asin() should have been called.
26360 2002-04-26 Martin Baulig <martin@gnome.org>
26362 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
26363 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
26364 there's a subdirectory called `System', but we don't want to read that
26365 subdirectory as an assembly.
26367 2002-04-25 Martin Baulig <martin@gnome.org>
26369 * debug-symfile.c: Reflect latest MonoString changes.
26371 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
26373 * rand.c, rand.h: instance method icalls need to have an explicit
26374 this pointer as first argument in the C implementation.
26376 2002-04-25 Nick Drochak <ndrochak@gol.com>
26378 * icall.c: Fix typo in map for GetNonZeroBytes
26380 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
26382 * string-icalls.c : String does now passes unit tests without any
26383 errors, the following changes has been made:
26385 Implemented replace methods.
26386 Renaming of methods to (try) follow the standard.
26387 Fixed compare ordinal
26388 Made all memory allocated directly to function instead of via icall function.
26389 Small performance fix in is_in_array function
26391 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
26393 c (mono_string_Internal_ctor_charp_int_int):
26394 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
26395 sindex < 0, throw ArgumentOutOfRangeException instead of
26396 ArgumentNullException.
26398 Added new check for length == 0, however
26399 I need to make it return String.Empty from the C code.
26401 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
26402 that calculate the length for us here.
26404 (mono_string_Internal_ctor_sbytep_int_int): Replaced
26405 mono_string_new_utf16 with mono_string_new, since value is utf8.
26407 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
26409 * object.c: register the object for finalization if needed.
26410 Allocate one more char in the string for the terminating 0 char.
26412 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
26414 * class.c, class.h, image.c: check if a type implemenst a destructor.
26415 Use the proper key for array class lookups.
26416 * icall.c: register the icalls in the System.GC class.
26417 * gc.c, gc.h: GC-related functions and icalls.
26419 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26423 * unicode.c: free some strings gotten from mono_string_to_utf8 and
26424 changed a couple of free () by g_free ().
26426 * decimal.c: one-liner in the comments for decimal2string ().
26428 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
26430 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
26432 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
26434 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
26435 * object.c (mono_runtime_invoke_array) : handle null in params
26437 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
26439 * string-icalls.c: fixed bug in split (one off bug)
26441 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
26443 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
26444 * icalls.c: added String::Equals as internal method
26446 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
26448 * threads.c: fixed bug in the double interlocked functions
26450 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
26452 * threads.c: implemented all of the new interlocked icalls.
26453 * string-icalls.c: fix a bug in insert.
26454 * icalls.c: added the icalls for interlocked, removed old string functions.
26456 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
26458 * loader.c: fix off-by-one error when reading argument names.
26460 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
26462 * profiler.c: win32 counter implementation (untested).
26463 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
26464 (the latter needs testing and more complete impl. from win32 folks).
26466 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
26468 * object.c: mono_array_new_full workaround mono_array_class_get
26471 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
26473 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
26474 * object.h (mono_string_chars): Changed casting type.
26476 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
26478 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
26479 method signatures to use gunichar2 instead of gint16.
26481 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
26483 * object.h, object.c: domain-specific versions of mono_object_new and
26486 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
26488 * object.c: changed String layout
26490 * string-icalls.c (mono_string_Internal_ctor_chara): added
26491 internal string constructors.
26493 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
26495 * threads.c: pass 'this' to the thread start routine.
26497 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26499 * string-icalls.c: fix IndexOf and LastIndexOf. Now
26500 InternalCompareStr don't call twice mono_string_cmp_char for the last
26501 character. Improved performance in mono_string_cmp_char.
26503 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
26505 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
26506 code into its own library: libmonoruntime.
26508 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
26510 * object.h, object.c: changed array format so that szarrays do not
26511 require a bounds structure.
26512 * icall.c, appdomain.c: support for new szarray format.
26514 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
26516 * metadata.c: compare also the retuns type when comparing signatures:
26517 we didn't do this as an optimization since really overloaded methods
26518 must differ also in the arguments, but this doesn't work with
26519 low-level IL code (or when using explicit conversion operators: see
26520 bug#23498 for an example).
26522 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
26524 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
26526 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
26528 * icall.c: make MonoType::GetElementType its own icall.
26530 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
26532 * icall.c: remove MonoMethod_get_Name().
26533 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
26536 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
26538 * string-icalls.c: optimized a few methods.
26540 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
26542 * icall.c: added all new string internal calls
26543 * string-icalls.c: added, new string internal call implementation.
26544 * object.c: added mono_string_new_size for allocating a string a size
26546 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
26548 * object.c (mono_object_isinst): use the same code as in the
26549 optimized x86 version.
26551 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
26553 * profiler.c: TSC-based timer code (faster and more accurate).
26554 Not hooked up in configure, yet (set USE_X86TSC to 1).
26556 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
26558 * profiler.c, profiler.h: track time spent compiling methods.
26559 * threads.c: track thread creation/destruction.
26561 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
26563 * profiler.c, profiler.h, profiler-private.h: profiling interface
26564 and sample implementation. Moved here so that it can be used also by
26567 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
26569 * reflection.c, reflection.h: keep types and other handles separate in
26570 the hash tables for referred tokens. Add guid for modules.
26572 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
26574 * assembly.c: fix bugs found with valgrind.
26575 * metadata.h, metadata.c: added mono_metadata_guid_heap().
26577 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
26579 * threads: added icall support for getting current domain for
26582 2002-04-13 Martin Baulig <martin@gnome.org>
26584 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
26585 (MonoDebugVarInfo): Added `index' field for register based addresses.
26586 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
26587 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
26588 `MonoDebugVarInfo *params' and `guint32 this_offset' with
26589 `MonoDebugVarInfo *this_var'.
26591 * debug-symfile.c (relocate_variable): New static function to write
26592 a location description for a local variable or method parameter.
26594 2002-04-12 Martin Baulig <martin@gnome.org>
26596 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
26597 stack offset and begin/end scope address of a local variable.
26598 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
26599 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
26600 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
26602 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
26603 Added new relocation types for start/end scope of a local variable.
26605 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
26607 * object.h: add mono_object_domain() macro.
26608 * reflection.c: handle typespecs.
26609 * icall.c: MonoMethod::get_Name() implementation.
26611 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
26613 * icall.c: String::GetHashCode() icall implementation.
26615 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
26617 * icall.c: String::IndexOfAny icall.
26618 * object.c, object.h: make array->max_length more useful.
26619 Intrduced mono_object_class() and mono_string_length() macros.
26621 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26623 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
26624 instead of g_unichar_isdigit.
26626 2002-04-11 Nick Drochak <ndrochak@gol.com>
26628 * icall.c: Implement a simple Double.ToString().
26630 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
26632 * appdomain.h: only io-layer.h is supposed to be included.
26633 * icall.c: explicitly import environ. Fix warning.
26635 2002-04-10 Nick Drochak <ndrochak@gol.com>
26637 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
26638 return true even if it's not Daylight Savings time.
26639 Only return false for the case where the function isn't
26640 implemented for a plaform (read Windows).
26642 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
26644 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
26647 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
26649 * mempool.c (mono_mempool_alloc): only use g_malloc when
26650 absolutely necessary.
26652 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
26654 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
26656 * class.c (mono_class_vtable): use domain mempool to allocate vtable
26657 (mono_class_proxy_vtable): use domain mempool
26659 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
26661 * appdomain.h, appdomain.c: split initialization that requires the
26662 execution engine support into mono_runtime_init().
26664 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
26666 * class.c (mono_class_init): don't include vtable inside MonoClass
26667 to save some memory, gather some statistics.
26668 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
26670 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
26672 * icall.c: internalcall implementation for ValueType.Equals().
26674 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
26676 * object.c (mono_message_init): moved
26677 (mono_runtime_exec_main): new arch. independent impl.
26678 (mono_runtime_invoke_array): new method - like
26679 mono_runtime_invoke, but you can pass an array of objects.
26680 (mono_remoting_invoke): new arch. independent impl.
26681 (mono_message_invoke): new arch. independent impl.
26682 (mono_runtime_class_init): new arch. independent impl.
26683 (mono_runtime_object_init): new arch. independent impl.
26685 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
26687 * metadata.c, object.c, reflection.c: documented the exported
26690 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
26692 * icall.c: simpler code to pass the assembly builder data to corlib.
26693 Implement GetNestedTypes() internalcall.
26695 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
26697 * class.c: warn if a type can't be loaded.
26699 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
26701 * image.h: typedef MonoImageOpenStatus
26702 * types.h: removed unused file
26704 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
26706 * icall.c: Enum_ToObject accepts enum value arguments.
26708 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
26710 * class.c: move initialization of properties, events and nested
26711 classes, so that they happen for interfaces, too.
26713 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
26715 * icall.c: cleanup some ugly casts in Array_SetValue*.
26717 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
26719 * icall.c: the values array fro enums is of the correct type, now.
26720 Implement (correctly) getFullName instead of assQualifiedName for
26722 * reflection.h, reflection.c: added mono_type_get_name ().
26724 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
26726 * assembly.c, image.h: for each MonoImage, record from wich assembly
26728 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
26729 Make Type.Assembly work.
26731 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
26733 * debug-symfile.h: use char* instead of gpointer to avoid
26736 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
26738 * icall.c (ves_icall_InternalExecute): impl. FielSetter
26739 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
26741 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
26743 * icall.c (mono_message_init): impl. (code cleanup)
26744 (ves_icall_InternalExecute): impl. FieldGetter
26746 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
26747 defined we call all (non-static)methods through the vtable.
26749 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
26751 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
26752 finalizer even though the memory is still referenced (and the chunk of
26753 memory is not freed).
26755 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
26757 * assembly.c: fix brokeness.
26759 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
26761 * class.c: kill some warnings. Check explicit interface method
26762 implementation also without considering the namespace.
26763 Load also literal strings in static class data.
26765 2002-03-29 Miguel de Icaza <miguel@ximian.com>
26767 * assembly.c (default_assembly_name_resolver): Kill memory leak.
26768 (default_assembly_name_resolver): Make the resolver take the
26769 "base" directory where the assembly was originally defined, so we
26770 can load DLLs that are in the same directory as the assembly that
26771 is being referenced.
26773 2002-03-28 Dick Porter <dick@ximian.com>
26779 * unicode.c: Warning cleanups
26781 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
26783 * object.h, reflection.h: use the correct type instead of MonoObject.
26785 2002-03-28 Martin Baulig <martin@gnome.org>
26787 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
26788 (mono_debug_update_symbol_file): Initialize classes if necessary.
26790 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
26792 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
26793 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
26795 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
26797 * assembly.h: fix function prototype.
26798 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
26799 * mono-endian.h: use const cast.
26801 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
26803 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
26805 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
26807 * loader.c: don't assert when a typeref can't be loaded, give
26808 a chance to the runtime to trow an exception instead.
26809 * loader.h: fix warning.
26811 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
26813 * class.c (mono_class_proxy_vtable): added proxy support
26815 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
26817 * icall.c: removed last of PAL calls, added System.Environment
26818 * file-io.h, file-io.c: MonoIO implementation
26819 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
26821 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
26823 * appdomain.c: do not use the byte marker in ldstr table lookup.
26824 * debug-helpers.c: allow two ':' to separate class and method name.
26825 * object.c: allocate arrays bounds with the GC, too.
26826 * verify: add a few more checks.
26828 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
26830 * reflection.c: output also literal strings. Allocate parameter data
26831 with GC_malloc() (thanks, Martin, for catching this!).
26833 2002-03-26 Martin Baulig <martin@gnome.org>
26835 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
26836 include the `this' offset in the `param_offsets'.
26838 2002-03-25 Martin Baulig <martin@gnome.org>
26840 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
26841 mono_debug_get_class() function to get the classes. Added new
26842 relocation types for arrays and strings.
26843 (mono_debug_get_class): New static function to search in all
26844 referenced assemblies for a metadata token.
26846 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
26848 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
26850 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
26851 hold gc-allocated objects. Make the string heap a stream like the
26852 others. Removed duplicated code when writing stream info.
26853 Added asserts to catch possible buffer overflows. Set the sorted map
26854 for tables that need sorting. Added some documentation.
26856 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
26858 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
26859 for interned strings and vtables.
26861 2002-03-24 Martin Baulig <martin@gnome.org>
26863 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
26864 it in the array since it was created with g_slist_prepend().
26866 2002-03-24 Martin Baulig <martin@gnome.org>
26868 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
26869 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
26870 (mono_debug_method_from_token): Renamed to
26871 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
26872 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
26874 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
26877 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
26879 2002-03-24 Martin Baulig <martin@gnome.org>
26881 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
26882 (mono_debug_method_from_token): New func.
26884 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
26885 New interncall, calls mono_debug_local_type_from_signature().
26886 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
26887 calls mono_debug_method_from_token().
26889 2002-03-23 Martin Baulig <martin@gnome.org>
26891 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
26892 specifies the number of bytes to be converted, not the array size.
26893 Return the number of chars, not the number of bytes.
26894 (ves_icall_iconv_get_chars): The `byteCount' argument
26895 specifies the number of bytes to be converted, not the array size.
26897 2002-03-23 Martin Baulig <martin@gnome.org>
26899 * reflection.h (MonoReflectionSigHelper): New type.
26901 * reflection.c (mono_reflection_sighelper_get_signature_local),
26902 (mono_reflection_sighelper_get_signature_local): New functions.
26904 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
26905 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
26908 2002-03-23 Martin Baulig <martin@gnome.org>
26910 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
26911 is_writeable is set.
26912 (mono_raw_buffer_update): New function to write the modified map
26915 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
26917 * debug-symfile.c (mono_debug_update_symbol_file): Call
26918 mono_raw_buffer_update() when done writing.
26920 2002-03-23 Martin Baulig <martin@gnome.org>
26922 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
26924 * debug-symfile.c: Added support for arguments and local variables.
26926 2002-03-23 Dick Porter <dick@ximian.com>
26928 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
26929 protected by ifdefs, hence breaking the w32 build.
26931 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
26933 * object.c: implement is_interned() the right way.
26935 2002-03-21 Martin Baulig <martin@gnome.org>
26937 * debug-symfile.[ch]: New files to handle debugging information
26938 files. There's also support to dynamically update these symbol
26939 files to include machine dependent information.
26941 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
26943 * threads.c (mono_thread_create): new function to create thread
26946 2002-03-20 Martin Baulig <martin@gnome.org>
26948 * icall.c (ves_icall_InternalInvoke): Create a new object if the
26949 method is a constructor.
26950 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
26951 points to ves_icall_InternalInvoke().
26953 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
26955 * file-io.c: Flush shouldn't throw exceptions.
26957 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
26959 * file-io.c: FileStream flush support; FileSetLength now
26960 restores file pointer.
26962 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
26964 * class.c: set image for pointer classes.
26966 2002/03/19 Nick Drochak <ndrochak@gol.com>
26968 * sysmath.c: Forgot one.
26970 2002-03-18 Miguel de Icaza <miguel@ximian.com>
26972 * sysmath.c: Avoid redefining existing names.
26974 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
26976 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
26977 handled by runtime as icall rather than dllimport from libm.so
26978 * file-io.c, file-io.h: fixed handle argument type.
26980 2002-03-18 Dick Porter <dick@ximian.com>
26982 * reflection.c (mono_image_get_type_info): rename interface to
26983 iface, because of "#define interface struct" on windows.
26985 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
26987 * class.c, class.h: rename and export mono_ptr_class_get().
26988 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
26989 * reflection.c, reflection.h, icall.c: better/saner type name
26990 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
26993 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
26995 * class.c (mono_class_init): removed hardcoded GHC_SLOT
26997 * icall.c (ves_icall_InternalInvoke): impl.
26999 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
27001 * reflection.c: output the interface map table, too.
27003 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
27005 * class.c (class_compute_field_layout): separate computation of
27006 static field layout
27008 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
27010 * icall.c: added System.Buffer support.
27011 * file-io.c: moved file icalls from PAL to FileStream.
27013 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
27015 * icall.c (ves_icall_System_Object_GetHashCode): impl.
27017 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
27019 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
27021 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
27023 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
27025 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
27027 * debug-helpers.{c,h}: moved here from monograph some useful functions
27028 to locate a method by name/signature in a class or image. Included
27029 also a small and flexible IL disassembler.
27031 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
27033 * reflection.c: fixup tokens in methods with small header size, too.
27035 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
27037 * object.c (mono_string_to_utf8): remove assert(!error), instead
27040 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
27042 * icall.c: update to the new mono_Array_class_get interface.
27044 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
27046 * appdomain.c, object.c: Boehm-GC enable.
27047 * icall.c: make get_data_chunk() support split data requests.
27048 Ensure a class is initialized in more cases. Return only the first
27049 property found in GetProperties() or the compiler gets confused.
27050 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
27051 * reflection.h, reflection.c: add fixup mechanism for field and method
27052 tokens. Initialize assembly->typeref in a single place. Output
27053 properties after events. Support custom attributes for events, too.
27054 Typo fix for paramter custom attrs.
27056 2002-03-07 Martin Baulig <martin@gnome.org>
27058 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
27060 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
27062 * class.c (mono_array_class_get): fix. for multi. dim. arrays
27064 2002-03-06 Martin Baulig <martin@gnome.org>
27066 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
27067 non-zero lower bounds. See testcases #F10-#F13.
27069 2002-03-05 Martin Baulig <martin@gnome.org>
27071 * exception.c (mono_get_exception_argument_out_of_range): New exception.
27073 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
27074 ves_icall_System_Array_GetValue(), only calculate the absolute array position
27076 (ves_icall_System_Array_SetValue): Likewise.
27077 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
27078 as argument and does the actual work. This function is used when copying a
27079 multi-dimensional array.
27080 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
27081 now do all the widening conversions of value types.
27082 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
27084 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
27086 * class.c: remove some magic numbers and use the smbolic names,
27087 instead. Added init_events() to load event info at class init time.
27088 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
27089 and mono_metadata_methods_from_event().
27090 * reflection.h, reflection.c: added support for writing out the evnets
27091 related information.
27093 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
27095 * reflection.h, icall.c: use a different method (GetInterfaces)
27096 to gather interface info and add isbyref, isprimitive and
27097 ispointer to the ves_icall_get_type_info() return value.
27099 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
27101 * class.h: stared adding support for events.
27102 * icall.c: split find_members implementation. Added debug icall to get
27103 the address of an object.
27104 * reflection.c: handle TypeBuilders in mono_type_get_object().
27106 2002-03-01 Martin Baulig <martin@gnome.org>
27108 * icall.c (ves_icall_System_Array_GetLength): This must throw an
27109 ArgumentOutOfRangeException(), not an ArgumentException().
27110 (ves_icall_System_Array_GetLowerBound): Likewise.
27111 (ves_icall_System_Array_GetValue): Improved argument checking.
27112 (ves_icall_System_Array_SetValue): Improved argument checking.
27114 2002-03-01 Martin Baulig <martin@gnome.org>
27116 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
27117 called with invalid arguments rather than just dying with g_assert().
27118 (ves_icall_System_Array_SetValue): Likewise.
27119 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
27120 raise a NotImplementedException instead.
27121 (ves_icall_System_Array_GetLength): Added argument checking.
27122 (ves_icall_System_Array_GetLowerBound): Added argument checking.
27124 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
27126 * object.h (mono_assert): new macros mono_assert and
27127 mono_assert_not_reached
27129 2002-02-28 Martin Baulig <martin@gnome.org>
27131 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
27132 and "System::String::IsInterned" to "System::String::_IsInterned".
27134 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
27136 * icall.c: remove hacks for typebuilder. Added icall to create a
27137 modified type from a tybebuilder.
27138 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
27139 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
27140 to create a backing MonoClass for a TypeBuilder.
27142 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
27144 * class.c, class.h: more refactoring of class init.
27145 Export mono_class_setup_mono_type() and mono_class_setup_parent().
27147 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
27149 * marshal.c, marshal.h: start of marshaling interface.
27151 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
27153 * icall.c: fix order in assembly qualified name icall.
27155 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
27157 * class.c: do not free str, since we store it in the hash table.
27158 * reflection.h: add label field to MonoILExceptionInfo.
27159 * reflection.c: handle references to more than one assembly. Handle
27160 case when there isn't a module created in the assembly.
27162 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
27164 * class.c: Fix typo. Start refactoring of class init code.
27166 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
27168 * appdomain.c: exit with 1 on error.
27169 * class.c: we already have the name in MonoClassField.
27170 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
27171 MonoStreamHeader instead of an offset of image->raw_metadata.
27173 2002-02-26 Miguel de Icaza <miguel@ximian.com>
27175 * appdomain.c (mono_init): Be even more descriptive about the error.
27177 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
27179 * appdomain.c: give the user an informative message when corlib can't
27182 2002-02-26 Martin Baulig <martin@gnome.org>
27184 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
27185 New icall to get the time zone data.
27187 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
27189 * reflection.c: set virtual and raw size of section correctly.
27190 * threads.c: transfer domain information to newly created threads.
27192 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
27194 * class.c: when instancing a class in a domain, load the default
27195 vaules for static fields from the constant table. Fix System.Enum to
27197 * icall.c: implement Object::GetType() internalcall. Implemented
27198 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
27199 Fixed checking of binding flags in find_members().
27200 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
27201 * reflection.c: handle enumerations when writing to the constant
27202 table. Use a different object cache for types.
27205 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
27207 * object.c (mono_object_isinst): fix for arrays
27209 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
27211 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
27213 * object.c: don't use mprotect () and fix intern pool hash table
27214 lookup for big endian systems.
27216 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
27218 * icall.c: change type_is_subtype_of () signature.
27220 2002-02-21 Mark Crichton <crichton@gimp.org>
27222 * rand.c, rand.h: Added random number generator for
27223 System.Security.Cryptography classes.
27225 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
27227 * icall.c: Added System.Security.Cryptography calls.
27229 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
27231 * class.c, icall.c, metadata.c: better support for pointer types.
27232 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
27233 * reflection.c: Add support for getting custom attrs for properties
27234 and simplify some code.
27236 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
27238 * icall.c: change getToken () and add custom attribute GetBlob()helper
27240 * reflection.h: add custom attrs array to the reflection builder structures.
27241 * reflection.c: encode and emit custom attributes for all the relevant
27242 reflection objects. Cache fieldref and methodref tokens. Change
27243 mono_image_create_token() interface to take a MonoDynamicAssembly.
27244 More complete custom attributes decoder. Load custom attributes for
27245 Assembly, Field, Method and Constructor objects, too. Make the
27246 returned array an Attribute[] one, not object[]. Added
27247 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
27248 custom attribute constructor.
27250 2002-02-20 Dick Porter <dick@ximian.com>
27254 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
27255 problem code out for now).
27257 2002-02-19 Radek Doulik <rodo@ximian.com>
27259 * object.c (mono_ldstr): use hash table to avoid multiple swapping
27261 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
27263 * icall.c: register the GetCustomAttributes method.
27264 * object.c, object.h: add mono_string_new_len ().
27265 * reflection.h, reflection.c: added mono_runtime_invoke(),
27266 mono_install_runtime_invoke(). Added
27267 mono_reflection_get_custom_attrs () to load custom attributes and
27268 create the attribute objects.
27270 2002-02-19 Dick Porter <dick@ximian.com>
27271 * threads-dummy-types.c:
27272 * threads-dummy-types.h:
27275 * threads-pthread-types.c:
27276 * threads-pthread-types.h:
27277 * threads-pthread.c:
27278 * threads-pthread.h: Deleted obsolete files
27280 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
27282 * class.c (mono_class_vtable): runtime init the class when we
27283 allocate static class data.
27285 * icall.c (ves_icall_System_Array_SetValue): check for null values.
27287 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
27288 and String - but we will need generic marshalling support in the
27290 (mono_init): set the domain name in a ms compatible way
27292 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
27295 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
27297 * object.c (mono_array_clone): use alloca() instead of g_malloc
27300 * appdomain.c (mono_domain_unload): impl.
27302 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
27304 * appdomain.c, object.c: fix intern pool implementation.
27305 * class.c: fix alignment code.
27307 2002-02-16 Radek Doulik <rodo@ximian.com>
27309 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
27310 and s2 > s1, just copy lower bytes to be compatible with little
27311 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
27312 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
27314 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
27315 force big_endian to be 1 for big endian machines
27316 (ves_icall_iconv_new_decoder): ditto
27318 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
27320 * socket-io.c (convert_sockopt_level_and_name): If the system
27321 doesn't define SOL_IP or SOL_TCP, get them by hand using
27322 getprotobyname() and caching the values (because this could be a
27324 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
27325 Use the appropriate struct when the system does support it. Ie,
27326 not all systems have struct ip_mreqn so use struct ip_mreq when
27329 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
27331 * reflection.c: handle finally clauses.
27333 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
27335 * socket-io.c: use g_snprintf() instead of snprintf.
27337 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
27339 * reflection.c (mono_param_get_objects): Cast second argument to
27340 mono_method_get_param_names to a const char** to silence the
27343 * appdomain.c (mono_domain_assembly_open): Put parens around the
27344 truth statement in the for-loop.
27346 * unicode.c (iconv_convert): Got rid of a compiler warning about
27347 int i being unused when the system has a new iconv.
27348 (iconv_get_length): Same.
27350 * image.c (load_class_names): Cast the second argument to
27351 g_hash_table_insert() to char* to hush compiler warnings about the
27353 (mono_image_open): Same here.
27355 * socket-io.c: Don't conditionally include sys/filio.h or
27356 sys/sockio.h here anymore since we now get them from
27357 io-layer/io-layer.h
27358 (inet_pton): If the system doesn't support inet_aton, implement
27359 using inet_addr and also #define INADDR_NONE if it isn't defined
27362 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
27364 * metadata.c, metadata.h: added function to get packing and size info
27366 * reflection.h, reflection.c: handle field RVA data. Save info about
27367 the table layout if needed. Assign typedef indexes to all the types
27368 before dumping the info about them to avoid forward reference problems.
27370 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
27372 * socket-io.c (convert_sockopt_level_and_name): ifdef
27373 SO_ACCEPTCONN because it is not defined on my system (old debian)
27375 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
27377 * opcode.c: use stddef.h to get NULL.
27379 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
27381 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
27382 for FIONBIO, FIONREAD and SIOCATMARK.
27383 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
27384 define INADDR_NONE and besides, inet_addr() is deprecated and
27385 should not be used. Use inet_pton() instead - it also has the
27386 added bonus that it can easily handle IPv6 addresses as well.
27387 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
27389 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
27391 * decimal.c: remove _MSC_VER conditional.
27393 2002-02-13 Dick Porter <dick@ximian.com>
27396 * icall.c: Internal calls for Blocking, Select, Shutdown,
27397 GetSocketOption and SetSocketOption
27399 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
27401 * assembly.cs: better resolver: use it instead of some kludgy
27404 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
27406 * reflection.c: the best way to speed-up the compiler is to avoid
27409 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
27411 * class.c (mono_class_vtable): changed the object layout
27412 (obj->vtable->class).
27413 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
27415 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
27417 * assembly.c: look for assemblies in the assembly dir, too.
27419 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
27421 * class.c: fix thinko in mono_class_from_type().
27423 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
27425 * exception.h, exception.c: added TypeLoadException.
27426 * object.h, object.c: added mono_array_clone ().
27427 * icall.c: handle throwOnError in AssemblyGetType().
27428 Added Array.Clone().
27429 * opcode.h, opcode.c: use a single value for the opcode val.
27430 Compile fix for non-gcc compilers.
27432 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
27434 * opcodes.c, opcodes.h: export interesting info about opcodes.
27436 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
27438 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
27441 * class.c (class_compute_field_layout): set element_class for enums
27442 (mono_class_create_from_typedef): set element_class for normal classes
27444 * icall.c (ves_icall_System_Enum_get_value): impl.
27446 * class.c (mono_class_create_from_typedef): do not set valuetype
27447 flag for System.ValueType and System.Enum
27449 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
27451 * unicode.c (iconv_convert): fix big endian problem.
27453 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
27455 * class.c: add asserts if we are ever going to scribble over memory.
27456 * socket-io.c: not all systems have AF_IRDA defined.
27458 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
27460 * class.c (class_compute_field_layout): do not consider static
27461 fields to compute alignment
27463 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
27465 * appdomain.c (mono_appdomain_get): impl.
27466 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
27468 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
27470 * icall.c: ignore "file://" prefix when loading an assembly.
27472 2002-01-23 Dick Porter <dick@ximian.com>
27476 * Makefile.am: Added socket support
27478 2002-01-23 Miguel de Icaza <miguel@ximian.com>
27480 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
27481 code back. This should return the assemblies that are loaded by
27482 the runtime on behalf of an application domain.
27484 The current implementation is still broken, it just returns every
27485 assembly loaded, but until we get real applications domain this
27488 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
27490 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
27493 2002-01-23 Miguel de Icaza <miguel@ximian.com>
27495 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
27496 the mono_class_from_name lookup.
27497 (ves_icall_get_parameter_info): ditto.
27498 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
27500 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
27502 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
27504 * class.c: load also nested classes on class init.
27505 System.ValueType instance methods gets passed boxed
27506 values, unless methods in derived classed that get a pointer to the
27508 * icall.c: use better name parsing code in GetType().
27509 * image.c, image.h: add mono_image_loaded ().
27510 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
27511 * reflection.c, reflection.h: added mono_reflection_parse_type().
27513 2002-01-22 Veronica De Santis <veron78@interfree.it>
27515 * icall.c : Added mapping of internal calls for Manual and Auto reset events
27516 * threads.c : Added the implementation of internal calls for events
27517 * threads.h : Added prototypes of internal calls for events
27519 2002-01-21 Radek Doulik <rodo@ximian.com>
27521 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
27523 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
27525 * class.c (mono_class_init): set min_align to 1 (instead of 0)
27526 (mono_class_value_size): use min_align
27528 2002-01-20 Dick Porter <dick@ximian.com>
27531 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
27532 so it compiles on w32.
27534 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
27536 * metadata.c (mono_type_stack_size): impl.
27538 * class.c (mono_class_get_field): impl. memberref token
27540 2002-01-16 Veronica De Santis <veron78@@interfree.it>
27542 * icall.h : Added the internal calls mapping for CreateMutex_internal
27543 and ReleaseMutex_internal.
27544 * threads.h : Added the prototype of mutexes internal calls.
27545 * threads.c : Added the implementations of mutexes internal calls.
27547 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
27549 * metaparse.h: removed unused file.
27550 * reflection.c, reflection.h: added stream_data_align () function
27551 to align data in streams and keep stream aligned. Add support for
27552 exception support in method headers.
27554 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
27556 * unicode.c: make iconv_convert () return the number of bytess written
27557 in the output buffer.
27559 2002-01-15 Dick Porter <dick@ximian.com>
27560 * threads.c: Make the runtime's idea of infinite timeouts coincide
27561 with the class library's
27563 Fix a particularly egregious bug in mono_thread_cleanup(). That
27564 code was so utterly bogus it must have been written on a Monday.
27566 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
27568 * reflection.h: add subtypes field to TypeBuilder.
27569 * reflection.c: encode constants for literal fields.
27570 Handle subtypes. Fix user string token (and add a zero byte)
27573 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
27575 * class.c (mono_class_init): bug fix: assign slot numbers for
27578 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
27580 * reflection.c: don't try to output a code RVA for abstract methods.
27581 Small fixes for method header format. Output parameter info to the
27582 ParamDef table. Save method overriding info to MethodImpl table.
27583 Fix property support. Allow typedef.extends to be a type in the
27585 * verify.c: fix off-by-one error.
27587 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
27589 * class.c: fix mono_class_from_mono_type () for szarray types.
27590 Remove unused cache check in mono_class_from_type_spec().
27591 * icall.c: *type_from_name () functions handle simple arrays and byref.
27592 * reflection.c: handle byref and szarray types. Handle methods without
27593 body (gets P/Invoke compilation working). Handle types and fields in
27595 * reflection.h: add rank to MonoTypeInfo.
27597 2002-01-10 Dick Porter <dick@ximian.com>
27599 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
27602 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
27604 * icall.c: initialize class in type_from_handle ().
27605 Loop also in parent classes for get_method ().
27606 * reflection.c: properly encode class and valuetype types.
27607 Start on encoding TypeBuilder types. Handle fieldrefs.
27608 Use correct length when registering a user string.
27609 Handle ConstructorBuilder and MonoMethod in get_token ().
27610 Make mono_type_get_object () aware of cached types.
27611 * object.c: back out change to mono_string_new ().
27613 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
27614 * object.c: mono_string_new should return a NULL when the string
27615 passed in is NULL -- not try to deference it.
27617 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
27619 * icall.c: hack to make IsSubType work for TypeBuilders.
27620 * reflection.c: emit constructors before methods.
27621 Retrieve param names in mono_param_get_objects().
27623 2002/01/05 Nick Drochak <ndrochak@gol.com>
27625 * Makefile.am: fix list of headers and sources so automake 1.5
27626 doesn't complain. Removed \# at end of list.
27628 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
27630 * reflection.c: get token for a method ref. Set return type of
27631 constructor to void.
27632 * loader.c: debug message.
27633 * class.c: typo fix.
27635 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
27637 * icall.c: fix array init with rank > 1. FindMembers
27638 loops in parent class as well.
27639 * image.c: do not insert nested types in name cache.
27640 * reflection.c: warning fix.
27641 * reflection.h: add override method (for interface impl).
27643 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
27645 * metadata.c: fix customattr decoding.
27647 2001-12-21 Miguel de Icaza <miguel@ximian.com>
27649 * rawbuffer.cs: Added native Win32 implementation, avoids using
27650 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
27652 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
27654 * class.c: make the low-level routines handle the cache.
27656 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
27658 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
27660 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
27662 * class.c: fix mono_array_element_size() for objects.
27663 * class.h, class.c: add properties to MonoClass and load them
27665 * icall.c: check with isinst() when assigning a value to an array
27666 instead of requiring the classes to match exactly.
27667 Implemented icall for System.Type::GetType().
27668 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
27669 enums. Handle bindingflags when looking for methods and fields.
27670 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
27671 and mono_metadata_methods_from_property().
27672 * reflection.h, reflection.c: added structures for propreties,
27673 parameters and enums. Implemented mono_property_get_object() and
27674 mono_param_get_objects().
27676 2001-12-18 Dick Porter <dick@ximian.com>
27678 * file-io.c: Use mono_string_to_utf16() instead of
27679 mono_string_chars()
27681 * object.c: Added mono_string_to_utf16(), which copies the non
27682 NULL-terminated MonoString into a new double-null-terminated
27685 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
27687 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
27689 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
27691 * file-io.c: raise exceptions if handle is invalid.
27693 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
27695 * assembly.c: yet another check for mscorlib.
27696 * class.c, class.h: load nesting info for classes.
27697 * icall.c: many new functions to support the Reflection classes.
27698 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
27699 * reflection.h, reflection.c: mono_image_create_token(),
27700 mono_assembly_get_object(), mono_type_get_object(),
27701 mono_method_get_object(), mono_field_get_object(): methods to return
27702 objects that parallel the C representation of assemblies, types,
27705 2001-12-11 Dick Porter <dick@ximian.com>
27708 * file-io.c: Internal calls for file IO.
27710 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
27712 * tabledefs.h: missing FileAttributes.
27713 * verify.h, verify.c: use is_valid_string () to simplify and check for
27714 valid strings more correctly. Fix warnings and speeling.
27715 Check more tables: Filed, File, ModuleRef, StandAloneSig.
27716 Check code: branches, maxstack, method calls.
27718 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
27720 * object.c (mono_object_allocate): removed static, so that the jit
27721 can allocate value types.
27723 * icall.c (ves_icall_System_DateTime_GetNow): impl.
27725 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
27727 * class.c: init enum types right away and register the
27728 token->MonoClass map in mono_class_create_from_typedef ().
27729 * verify.h, verify.c: first cut of the verifier.
27730 * pedump.c: add --verify switch to verify metadata tables.
27731 * tabledefs.h: add some missing enums.
27733 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
27735 * class.c (mono_install_runtime_class_init): impl.
27736 (mono_class_init): renamed mono_class_metadata_init to
27737 mono_class_init, also removed the metadata_inited flag
27739 * object.c (mono_object_isinst): use faster algorithm
27741 2001-11-30 Radek Doulik <rodo@ximian.com>
27743 * mono-endian.h: reverted last change
27744 added function prototypes
27746 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
27747 add mono-endian.c back
27749 * mono-endian.c: returned back, as Paolo pointed out, it's needed
27750 for unaligned access, I've mistaked it with endianess. I am
27752 (mono_read16): fix reverted endianess
27753 (mono_read64): ditto
27754 (mono_read32): ditto
27756 2001-11-30 Dick Porter <dick@ximian.com>
27758 * exception.c: Implement mono_exception_from_name()
27760 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
27762 * metadata.h, metadata.c: remove params_size and locals_size and their
27763 calculation from the metadata code: they are only usefult to the
27766 2001-11-29 Radek Doulik <rodo@ximian.com>
27768 * object.c (mono_ldstr): swap bytes here, it's probably not the
27769 best place, but works for me now, I'll redo it once I know mono
27770 better, also note that I add PROT_WRITE and don't reset back, also
27771 note that it's only affects big endians, so x86 should be OK
27773 * mono-endian.h (read16): use just glib macros for both endians
27775 * mono-endian.c: removed as glib macros are used in in
27776 mono-endian.h so we don't need to care about endianess for read
27777 macros as glib does that for us already
27779 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
27781 * class.h, class.h: take minimum alignment into consideration so
27782 that the fields of a class remain aligned also when in an array.
27784 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
27786 * loader.h, loader.c: add mono_method_get_param_names().
27787 * class.c: 0-init class fields.
27789 2001-11-26 Dick Porter <dick@ximian.com>
27793 * threads.c: New file that handles System.Threading on all platforms
27796 * object.h: Remove the synchronisation struct from MonoObject,
27797 replace it with a pointer that gets initialised on demand
27799 * Makefile.am: Replace all the system-specific threading code with
27800 a single file that uses the new wrapper library
27802 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
27804 * class.c, class.h: add mono_install_trampoline() so that the runtime
27805 can register a function to create a trampoline: removes the ugly
27806 requirement that a runtime needed to export arch_create_jit_trampoline.
27807 * object.h, object.c: added mono_install_handler() so that the runtime
27808 can install an handler for exceptions generated in C code (with
27809 mono_raise_exception()). Added C struct for System.Delegate.
27810 * pedump.c: removed arch_create_jit_trampoline.
27811 * reflection.c: some cleanups to allow registering user strings and
27812 later getting a token for methodrefs and fieldrefs before the assembly
27814 * row-indexes.h: updates and fixes from the new ECMA specs.
27816 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
27818 * class.h, class.c: add enum_basetype field to MonoClass.
27819 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
27820 to get index in the constant table reated to a field, param or
27822 * reflection.h, reflection.c: handle constructors. Set public-key and
27823 version number of the built assembly to 0.
27824 * row-indexes.h: update from new ECMA spec.
27826 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
27828 * class.h, class.c: add a max_interface_id to MonoClass.
27829 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
27830 since it's used to do that. Added mono_type_type_from_obj().
27831 Make GetType() return NULL instead of segfaulting if the type was not
27832 found. Handle simple arrays in assQualifiedName.
27833 * object.h: add a struct to represent an Exception.
27834 * reflection.c: output call convention in method signature.
27835 Add code to support P/Invoke methods and fixed offsets for fields.
27837 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
27839 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
27841 * icall.c: use mono_array_addr instead of array->vector: fixes the
27842 reflection image writing.
27843 * reflection.c: init call convention byte to 0 in method signature.
27844 Encode the property signature. Don't output property-related methods
27845 twice. Really process the properties for a type (don't cast a field to
27846 a property, my mom always told me that).
27847 Fix 64 bit issues in pointer alignment in a different and more
27850 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
27852 * loader.h: Removed type class from MonoDefaults, added monotype
27854 * loader.c: Loaded MonoType, removed loading of Type
27856 * icall.c (my_mono_new_object): Now returns a System.MonoType,
27857 and fills in System.Type._impl with a RuntimeTypeHandle rather
27858 than the actual MonoClass *
27860 (ves_icall_type_from_handle): change from type_class to
27863 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
27866 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
27869 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
27871 (ves_icall_System_Reflection_Assembly_GetType): implemented
27873 (ves_icall_System_MonoType_assQualifiedName): implemented
27875 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
27877 2001-11-09 Miguel de Icaza <miguel@ximian.com>
27879 * assembly.c (mono_assembly_open): Implement a cache for the
27882 (mono_assembly_close): only destroy the assembly when the last
27885 2001-11-09 Dick Porter <dick@ximian.com>
27887 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
27889 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
27891 * class.c (mono_class_metadata_init): bug fix: compute the right slot
27893 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
27895 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
27896 from Martin Weindel.
27897 * object.h: add mono_string_chars ().
27899 2001-11-07 Miguel de Icaza <miguel@ximian.com>
27901 * reflection.c (build_compressed_metadata): Eliminates warnings
27902 and uses 64-bit clean code.
27904 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
27905 (mono_type_equal): Change signature to eliminate warnings.
27907 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
27909 * icall.c, loader.c: remove the internalcall array constructors.
27910 Changes to match the new MonoArray structure.
27911 * object.h, object.c: an array object doesn't allocate an extra
27912 vector. Add mono_array_new_full () to create jagged arrays easily.
27914 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
27916 * metadata.h, metadata.c: add mono_metadata_field_info () to
27917 retreive all the info about a field from vairous tables.
27918 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
27919 * class.h, class.c: augment MonoClassField with more info.
27920 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
27921 policy and load a field's RVA if needed.
27923 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
27925 * class.c (mono_class_metadata_init): create a trampoline for all
27926 virtual functions instead of actually compiling them.
27928 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
27930 * class.h, class.c: include name in MonoClassField.
27931 * class.c: fix fundamental type of System.Object and System.String.
27932 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
27934 * icall.c: remove internalcalls for the Reflection stuff that is now
27936 * loader.c: mono_field_from_memberref () implementation.
27937 * mono-endian.c: thinko (s/struct/union/g).
27938 * object.c, object.h: make the mono_string_* prototypes actually use
27939 MonoString instead of MonoObject.
27940 * reflection.c, reflection.h: updates for changes in the reflection
27941 code in corlib: we use C structures that map to the actual C# classes.
27942 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
27943 fat method header if needed and use the info from the ILGenerator for
27944 methods. Handle fields in types. Misc fixes.
27946 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
27948 * class.c (mono_class_metadata_init): bug fix: always allocate
27949 space for static class data
27951 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
27953 * class.c (mono_compute_relative_numbering): use relative
27954 numbering to support fast runtime type checks.
27956 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
27958 * class.c (mono_class_create_from_typeref): added debugging output
27959 to print class name when MonoDummy is returned instead of real class
27961 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
27963 * class.c (mono_class_metadata_init): interface offset table now
27964 contains pointers into the vtable - this is more efficient for the jit
27966 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
27968 * class.c (mono_class_metadata_init): use a temporary vtable (the
27969 old algorithm only worked for the interpreter, but not for the jit)
27971 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
27973 * loader.c (method_from_memberref): use mono_class_get to get the
27974 class of an array instead of using System.Array directly.
27975 (mono_get_method): also add MEMBERREF methods to the method cache
27976 which usefull for arrays.
27978 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
27980 * pedump.c (arch_compile_method): added to compute vtable entry
27982 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
27983 number of interfaces.
27985 * class.h: merged MonoArrayClass into MonoClass
27987 * class.c (mono_class_create_from_typedef): compute the vtable size and
27988 allocate space to include the vtable inside MonoClass
27989 (mono_class_metadata_init): initialize the vtable
27991 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
27993 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
27994 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
27995 * image.c: endian fixes by Laurent Rioux.
27996 * object.h, object.c: rename MonoStringObject to MonoString and
27997 MonoArrayObject to MonoArray. Change some function names to conform to
27998 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
27999 guint16* as first argument, so don't use char*.
28000 Provide macros to do the interesting things on arrays in a portable way.
28001 * threads-pthread.c: updates for the API changes and #include <sched.h>
28002 (required for sched_yield()).
28003 * icall.c: updates for the API changes above.
28004 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
28005 platforms that need them.
28007 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
28009 * class.c: set the correct type for all the fundamental
28010 type when loading the class.
28012 2001-10-05 Dick Porter <dick@ximian.com>
28014 * threads-pthread.c (pthread_mutex_timedlock): Simple
28015 compatibility version for C libraries that lack this call.
28017 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
28019 * class.c: MonoTypes stored in MonoClass are stored as
28020 fundamental MonoTypes when the class represents a
28021 fundamental type (System.Int32, ...).
28022 The TypeHandle return by ldtoken is a MonoType*.
28023 * icall.c: ves_icall_get_data_chunk () write out all the
28024 PE/COFF stuff. Implement ves_icall_define_method (),
28025 ves_icall_set_method_body (), ves_icall_type_from_handle ().
28026 * image.c: properly skip unknown streams.
28027 * loader.h, loader.c: add type_class to mono_defaults.
28028 * metadata.c, metadata.h: export compute_size () as
28029 mono_metadata_compute_size () with a better interface.
28030 Typo and C&P fixes.
28031 * pedump.c: don't try to print the entry point RVA if there is no entry point.
28032 * reflection.c, reflection.h: many cleanups, fixes, output method
28033 signatures and headers, typedef and typeref info, compress the metadata
28034 tables, output all the heap streams, cli header etc.
28035 * row-indexes.h: typo fixes.
28037 2001-10-04 Dick Porter <dick@ximian.com>
28039 * object.h: Add a synchronisation mutex struct to MonoObject
28041 * object.c (mono_new_object): Initialise the object
28042 synchronisation mutexes
28044 * icall.c: System.Threading.Monitor internal calls
28046 * threads-pthread.h:
28047 * threads-pthread.c: System.Threading.Monitor internal calls
28049 * threads-types.h: New file, includes the system-specific thread
28052 * threads-pthread-types.h:
28053 * threads-pthread-types.c: New files, handle pthread-specific
28054 synchronisation types
28056 * threads-dummy-types.h:
28057 * threads-dummy-types.c: New files of dummy support for
28058 thread-specific types
28062 * pedump.c: include mono-endian.h not endian.h
28064 * Makefile.am: More threads files.
28065 Name mono-endian.h not endian.h
28067 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
28069 * Makefile.am, reflection.h, reflection.c: move here the reflection related
28070 stuff and implement a few more bits.
28071 * icall.c: a field needs to be dereferenced twice. Do not use the same
28072 name for two variables in the same scope.
28073 * image.c, image.h: cleanups.
28075 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
28077 * class.c (mono_class_metadata_init): bug fix: compute the right size
28079 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
28081 * icall.c: implemented some of the Reflection internalcalls.
28082 * image.c, image.h: start writing out the PE/COFF image.
28083 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
28084 that does the reverse than decode_blob_size ().
28085 * object.c: use mono_metadata_encode_value (). Move here
28086 temporary implementation of mono_string_to_utf8 ().
28087 * rawbuffer.c: make malloc_map static.
28089 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
28091 * metadata.c: fix type comparison for arrays.
28092 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
28093 Added a couple of new classes to monodefaults.
28094 * icall.c: added a couple of Reflection-related internalcalls.
28095 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
28096 Added a byval_arg MonoType to MonoClass.
28098 2001-09-28 Dick Porter <dick@ximian.com>
28101 * threads-pthread.h:
28102 * threads-pthread.c: Implemented internal calls for
28103 LocalDataStoreSlot operations. Applied mutexes around all shared
28104 data. Reworked the thread creation and Start() operations to
28105 avoid a race condition.
28108 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
28110 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
28112 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
28114 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
28116 * class.c, loader.c: warn and return NULL instead of erroring out.
28117 * icall.c: added System.AppDomain::getCurDomain().
28118 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
28120 2001-09-25 Dick Porter <dick@ximian.com>
28122 * threads-pthread.h:
28123 * threads-pthread.c: Implemented timed thread joining and added
28124 System.Threading.Thread::Join_internal internal call
28126 * icall.c: Added System.Threading.Thread::Join_internal internal call
28129 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
28131 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
28133 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
28134 mono_string_intern () to implement the semantics of the ldstr opcode
28135 and the interning of System.Strings.
28136 * icall.c: provide hooks to make String::IsIntern and String::Intern
28139 2001-09-23 Dick Porter <dick@ximian.com>
28142 * threads-dummy.h: New files of dummy threading routines
28144 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
28145 support code based on system specifics
28147 Rename PTHREAD_LIBS to THREAD_LIBS
28149 2001-09-23 Dick Porter <dick@ximian.com>
28151 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
28152 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
28154 (mono_thread_init): Set up a Thread object instance to return when
28155 the main thread calls Thread.CurrentThread
28156 (mono_thread_cleanup): Wait for all subthreads to exit
28158 * icall.c: New internal calls for System.Threading.Thread::Sleep
28159 (including Schedule) and CurrentThread
28161 * threads.h: New file, to insulate thread-specific stuff from the
28164 2001-09-21 Dick Porter <dick@ximian.com>
28166 * threads-pthread.h:
28167 * threads-pthread.c: New file, for handling pthreads-style
28168 threading support. Start() now starts a new thread and executes
28169 the ThreadStart delegate instance.
28171 * icall.c: Added the internalcall for
28172 System.Threading.Thread::Start_internal
28174 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
28176 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
28178 * loader.c: work around the different signatures for delegates
28179 constructors csc generates in compiled code vs the ones compiled in mscorlib.
28181 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
28183 * class.h, class.c: add mono_class_get_field_from_name ().
28184 * *: Fix C comments and other ANSI C issues.
28186 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
28188 * endian.h, assembly.c: fix some endianness issues.
28190 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
28192 * loader.h, load.c: add delegate_class to mono_defaults.
28193 Handle runtime provided methods in mono_get_method ().
28195 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
28197 * loader.c (mono_get_method): use pinvoke for internal call
28199 * icall.c: use pinvoke for internal call
28201 * loader.c (method_from_memberref): set the method name
28203 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
28205 * metadata.c: help the compiler generate better code for
28206 mono_class_from_mono_type ().
28208 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
28210 * class.c (mono_class_metadata_init): delayed computing of the
28211 class size to mono_class_metadata_init ()
28213 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
28215 * class.c, class.h: add an interfaces member to MonoClass.
28216 * image.c, image.h: add assembly_name field to MonoImage
28217 from the assembly table.
28218 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
28220 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
28222 * class.c: Handle Array in mono_class_from_mono_type ().
28223 * metadata.c, pedump.c: some endian fixes.
28225 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
28227 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
28228 * metadata.c: fix small problem introduced with the latest commit.
28230 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
28232 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
28233 We don't need a MonoMetadata pointer anymore to compare signatures in
28234 mono_metadata_signature_equal (), update callers.
28235 Reduced memory usage an number of allocations for MonoMethodHeader and
28236 MonoMethodSignature.
28238 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
28240 * metadata.c: added compare for szarray.
28242 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
28244 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
28245 and add a couple more types to it and mono_defaults. Give an hint on
28246 classes that need implementing in our corlib and are referenced
28249 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
28251 * class.h, class.c: keep track if a class is also an Enum.
28252 * loader.c: Implement a couple more types for use in libffi
28253 marshalling. Gives better diagnostics when failing to dlopen
28254 a library. Set method->klass for P/Invoke methods, too.
28256 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
28258 * class.c, class.h: add a MonoType this_arg to MonoClass that
28259 represents a pointer to an object of the class' type that
28260 can be used by the interpreter and later the type cache.
28261 Add best guess alignment info for valuetype objects.
28263 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
28265 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
28266 into MonoType: one less level of indirection and allocation and
28267 simplifies quite a bit of code. Added cache for MonoTypes that are
28268 used frequently, so that we don't need to allocate them all the time.
28270 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
28272 * class.c (mono_class_create_from_typedef): System.Enum is also a
28273 value type, although it does not derive from System.ValueType
28274 (maybe a bug in the ms compiler?)
28276 * metadata.c (mono_type_size): return the right size for value types
28278 * loader.c (mono_get_method): only initialize method header if not abstract
28280 * class.c (mono_class_from_mono_type): use mono_default values.
28282 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
28284 * *: use MonoClass pointers instead of <type_tokens>
28286 * class.h: new flag: metadata_inited.
28288 * class.c (mono_class_metadata_init): impl.
28289 (mono_class_instance_size): impl.
28290 (mono_class_data_size): impl.
28292 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
28294 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
28295 MonoClass now has the name and name_space fields.
28296 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
28297 mono_get_method () takes and optional MonoClass as argument.
28298 Removed mono_typedef_from_name() and added mono_class_token_from_name()
28299 instead that takes advantage of a map from class names to typedef
28300 tokens in MonoImage.
28302 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
28304 * metadata.c: zero is not a valid alignment boundary.
28305 Merge MONO_TYPE_VOID in default decoding code.
28307 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
28309 * image.h: merged MonoMetadata into MonoImage
28311 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
28312 identify the type of elements.
28314 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
28316 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
28317 * cil-coff.h: split MonoMSDOSHeader and add size info.
28318 * image.c: add some consistency checks.
28319 * metadata.c: fix row size computation: one programmer
28320 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
28321 add explanation for the locator routine.
28322 Fix decoding of size in method header.
28324 2001-08-20 Miguel de Icaza <miguel@ximian.com>
28326 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
28327 (g_concat_dir_and_file): Bring g_concat_dir_and_file
28328 function from gnome-libs. This uses the right path separator
28329 based on the OS, and also works around a bug in some systems where
28330 a double slash is not allowed.
28331 (default_assembly_name_resolver): Use g_concat_dir_and_file
28332 (mono_assembly_open): ditto.
28334 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
28336 * metadata.c (mono_metadata_signature_equal): impl.
28338 * *: void is now a realy MonoType (instead of using NULL)
28340 * metadata.c (do_mono_metadata_parse_type): use
28341 mono_metadata_parse_type to parse void value.
28343 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
28345 * metadata.c, metadata.h: in the signature and method header store
28346 only the space required for holding the loca vars and incoming arguments.
28348 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
28350 * metadata.c (do_mono_metadata_parse_type): treat void like any
28351 other type (instead of assigning NULL);
28353 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
28355 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
28357 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
28359 * image.c (do_mono_image_open): added a cache for arrays.
28361 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
28363 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
28364 decode a single column from a row in a metadata table and changes
28365 to take advantage of it in the typedef locator (gives a nice speed up).
28366 Store offset info for function params.
28368 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
28370 * image.h (MONO_IMAGE_IS_CORLIB): removed
28372 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
28374 * assembly.c: how could mono_assembly_close () had ever worked?
28375 * metadata.c, metadata.h: provide offset info for local vars.
28376 Implement mono_type_size () to take care of alignment as well
28377 as size (it was mono_field_type_size in cli/class.c before).
28379 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
28381 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
28383 * assembly.h (CORLIB_NAME): set to corlib.dll
28385 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
28387 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
28389 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
28390 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
28391 tokentype.h: massive namespace cleanup.
28393 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
28395 * metadata.h, metadata.c: decode exception clauses when parsing method header.
28397 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
28399 * metadata.c (mono_metadata_free_type): added check for type !=
28400 NULL (void) before calling mono_metadata_free_type()
28402 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
28404 * metadata.h, row_indexes.h: added header with enumerations to use
28405 to index in the columns from tables in metadata and to decode coded
28406 tokens: we should start using this instead of embedding magic numbers
28409 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
28411 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
28412 Move metadata_t info from cli_image_info_t to MonoImage, where
28413 it's easily accessible. Changed all the uses accordingly.
28414 Added the method and class caches to MonoImage.
28415 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
28416 and mono_metadata_decode_value () signature to be more consistent
28417 with the other parse functions (and simplify code). Taken advantage
28418 of zero-length array allocation with GCC. Removed reduntant (and
28419 wrong) MonoFieldType struct and use MonoParam instead. Changed
28420 mono_metadata_parse_field_type () to use common code for parsing.
28421 Added mono_metadata_typedef_from_field () and
28422 mono_metadata_typedef_from_method () to lookup a typedef index from a
28423 field or method token.
28424 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
28426 2001-07-23 Miguel de Icaza <miguel@ximian.com>
28428 * metadata.c (mono_metadata_parse_field_type): Implement.
28429 (do_mono_metadata_parse_type): Split engine from
28430 mono_metadata_parse_type, so that we can create smaller structures
28431 for things that just have one pointer to the MonoType (look at
28434 2001-07-20 Miguel de Icaza <miguel@ximian.com>
28436 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
28437 as Jan Gray found out, it is incorrect.
28439 2001-07-18 Miguel de Icaza <miguel@ximian.com>
28441 * assembly.c: Implement asssembly loading. This loads an image
28442 and loads all the referenced assemblies. Come to think of it, we
28443 could always do lazy loading of the assemblies.
28445 * image.c (mono_image_open): Keep loaded images in a hashtable.
28447 * image.h (MonoImage): Add reference count.
28449 2001-07-17 Miguel de Icaza <miguel@ximian.com>
28451 * assembly.c (mono_assembly_open): Keep track of the file name in
28452 case the assembly has no ASSEMBLY table.
28454 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
28457 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
28459 * metadata.c, metadata.h: decode local vars in method header
28460 parse function. Change callers accordingly.
28462 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
28464 * metadata.h, cil-coff.h: protect against multiple inclusion.
28465 Added some new structures to hold information decoded from metadata:
28466 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
28467 and relevant decoding/free functions.
28468 * metadata.c: implement decoding functions. Add warning for out of bounds
28469 index in mono_metadata_locate(). Implement mono_get_method () to retreive
28470 all the info about a method signature and invocation. Remove check on
28471 uninitialized local var in parse_mh() and fix memory leak.
28473 2001-07-12 Miguel de Icaza <miguel@ximian.com>
28475 * metadata.h: More macros.
28477 * tokentype.h: New file.
28479 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
28481 * assembly.c: added a consistency check and initialize
28482 some structures with g_new0().
28483 * metadata.c: fixed a couple more bugs in table size computation
28484 and add other checks for out-of bound access to metadata.
28486 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
28488 * metatada.c: fix bugs computing table sizes. Spew a
28489 warning when index in string heap is out of bounds.
28491 2001-07-04 Miguel de Icaza <miguel@ximian.com>
28493 * metadata.h: Add a couple of macros to manipulate tokens.
28495 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
28497 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
28498 cli_section_tables).
28500 2001-07-01 Miguel de Icaza <miguel@ximian.com>
28502 * metadata.c (mono_metadata_user_string): New function, provides
28503 access to the UserString heap.
28505 2001-06-27 Miguel de Icaza <miguel@ximian.com>
28507 * metadata.c: Add inline documentation.
28509 2001-06-26 Miguel de Icaza <miguel@ximian.com>
28511 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
28514 2001-06-22 Miguel de Icaza <miguel@ximian.com>
28516 * typeattr.h: New file, TypeAttribute flags.
28518 2001-06-21 Miguel de Icaza <miguel@ximian.com>
28520 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
28521 mono_assembly_ensure_section): Section loading code.
28522 (load_section_tables): Load the sections.
28524 * mono/metadata/metadata.c (mono_metadata_locate_token,
28525 mono_metadata_locate): Functions to locate the information
28526 definition given a token or a table and an index.
28527 (mono_metadata_compute_table_bases): New.
28528 (compute_size): New function to compute the sizes of the various
28531 * mono/metadata/metadata.h: Finish listing the different index
28534 * mono/metadata/pedump.c: Improve to dump new information.
28536 2001-06-19 Miguel de Icaza <miguel@ximian.com>
28538 * mono/metadata/metadata.c: Entered all the tables matching
28541 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2