1 2006-06-29 Raja R Harinath <rharinath@novell.com>
3 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
4 definition that introduces the virtual function slot.
5 Also fix Coverity #105.
7 2006-06-29 Zoltan Varga <vargaz@gmail.com>
9 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
10 for dynamic assemblies. Fixes #78724.
12 2006-06-28 Zoltan Varga <vargaz@gmail.com>
14 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
17 2006-06-21 Martin Baulig <martin@ximian.com>
20 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
23 2006-06-21 Zoltan Varga <vargaz@gmail.com>
25 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
27 2006-06-20 Raja R Harinath <rharinath@novell.com>
29 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
31 * class.c (mono_class_create_from_typespec): Add 'context' argument.
32 Inflate result if necessary.
33 (mono_class_get_full): Remove old version. Rename from
34 'mono_class_get' and add 'context' argument. Pass it to
35 ..._create_from_typespec.
36 (mono_class_get): New. Simple wrapper to mono_class_get_full.
37 (mono_ldtoken): Revert change below.
39 2006-06-20 Martin Baulig <martin@ximian.com>
41 * class.c (mono_ldtoken): Don't pass the generic context to
42 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
44 2006-06-15 Zoltan Varga <vargaz@gmail.com>
46 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
47 and later freeing it. Fixes #78638.
49 2006-06-15 Miguel de Icaza <miguel@novell.com>
51 * icall.c (mono_class_get_throw): Revert over-zealous error
52 throwing, the caller for mono_class_get_throw will cope with
53 errors when classes are not properly initialized already.
55 The code still copes with loader exceptions though.
57 Fixes the regression in reftype1 and reftype3 from the CAS tests.
59 2006-06-14 Miguel de Icaza <miguel@novell.com>
61 Fixes the `make run1' version of RuntimeAbort (to be commited,
62 source is in Bugzilla).
64 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
65 FALSE on class loading failure instead of returning true.
67 * class.c (mono_class_create_from_typedef): It is possible for
68 mono_metadata_interfaces_from_typedef_full to fail if a class is
69 not found, cope with this.
72 2006-06-14 Dick Porter <dick@ximian.com>
75 * process.c: Fix a bunch of signed/unsigned warnings from gcc
78 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
80 * culture-info-table.h : oops, forgot to make it nsync with r61548.
82 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
84 * icall.c: Another fix for building mono in Visual Studio.
86 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
88 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
90 2006-06-09 Martin Baulig <martin@ximian.com>
92 * debug-mono-symfile.c: Put this back and really fix it this
93 time. Sorry for all the trouble.
95 2006-06-08 Zoltan Varga <vargaz@gmail.com>
97 * icall.c (mono_class_get_throw): Fix a warning.
98 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
99 ReflectionTypeLoadException if needed. Fixes #78606.
101 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
102 (mono_class_init): Ditto.
104 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
106 (mono_loader_clear_error): Make this work even if there is no error.
108 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
110 * object-internals.h marshal.c marshal.h icall.c: Implement method
111 Marshal.GetComSlotForMethodInfo using internal call.
113 2006-06-07 Zoltan Varga <vargaz@gmail.com>
115 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
116 a function for signalling it.
118 * class.c (mono_class_from_typeref): Use the new kind of loader error when
119 a referenced assembly is not found.
121 * loader.c (mono_loader_error_prepare_exception): Add support for
122 LOADER_ERROR_ASSEMBLY. Fix formatting.
124 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
126 * domain.c appdomain.c class-internals.h marshal.c: Add support
127 for VARIANT marshalling on windows and increment corlib version
128 since Variant struct was added.
130 2006-06-03 Miguel de Icaza <miguel@novell.com>
132 * debug-mono-symfile.c: Revert Martin's previous patch which broke
133 stack trace line information:
135 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
136 (Martin) when looking up B which is between A and C, return A not C.
140 Thanks to Alexander Olk for tracking this down.
142 2006-06-02 Zoltan Varga <vargaz@gmail.com>
144 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
146 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
147 avoid clobbering its value.
148 (mono_string_to_lpstr): Fix a warning on windows.
150 2006-05-31 Zoltan Varga <vargaz@gmail.com>
152 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
155 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
158 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
160 * marshal.c threadpool.c: Update callers of mono_async_result_new.
162 * appdomain.c: Bump corlib version.
164 2006-05-30 Zoltan Varga <vargaz@gmail.com>
166 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
167 CEE_STIND_REF when working with object references.
169 2006-05-31 Zoltan Varga <vargaz@gmail.com>
171 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
174 2006-05-30 Miguel de Icaza <miguel@novell.com>
176 * loader.c (method_from_memberref): Fix argument value for
177 mono_loader_set_error_method_load (I was passing the MonoClass
178 instead of the class name char *).
180 2006-05-30 Zoltan Varga <vargaz@gmail.com>
182 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
183 CEE_STIND_REF when working with object references.
185 2006-05-30 Martin Baulig <martin@ximian.com>
187 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
188 mono_method_full_name() change and replace the ':' with a '.'
191 2006-05-30 Martin Baulig <martin@ximian.com>
193 * debug-mono-symfile.c
194 (mono_debug_symfile_lookup_location): Fix the algorithm:
195 when looking up B which is between A and C, return A not C.
197 2006-05-29 Martin Baulig <martin@ximian.com>
200 (MonoDebugMethodInfo): Make the typedef public.
201 (MonoDebugSourceLocation): New public struct.
204 (mono_debug_source_location_from_address): Removed.
205 (mono_debug_source_location_from_il_offset): Removed.
206 (mono_debug_il_offset_from_address): Removed.
207 (mono_debug_address_from_il_offset): Removed.
208 (mono_debug_lookup_method): New public function.
209 (mono_debug_lookup_source_location): New public function; replaces
210 the old mono_debug_source_location_from_*() functions; see the
211 inline documentation.
212 (mono_debug_free_source_location): New public function.
213 (mono_debug_print_stack_frame): New public function; see the
214 inline documentation.
216 * debug-mono-symfile.c
217 (mono_debug_find_source_location): Renamed into
218 mono_debug_symfile_lookup_location(); only take a
219 `MonoDebugMethodInfo *' and an `offset' argument; added inline
221 (mono_debug_find_method): Renamed into
222 mono_debug_symfile_lookup_method().
224 2006-05-27 Zoltan Varga <vargaz@gmail.com>
226 * assembly.c (mono_assembly_open_full): Dont overwrite the status
227 returned by mono_image_open_full ().
229 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
230 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
233 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
236 2006-05-27 Miguel de Icaza <miguel@novell.com>
238 * class.c (mono_class_from_typeref): handle missing images
239 earlier, deals with bug #78418. Refactor code;
241 Fix a warning introduced in my previous commit (some stale code
242 from before I revisited my patch).
244 * class.c (mono_class_create_from_typedef): On failure, remove the
245 class from the MonoImage->class_cache as the class is not
246 initialized; Fixes the leak pointed out by Paolo.
248 2006-05-25 Dick Porter <dick@ximian.com>
250 * threads.c (mono_thread_cleanup): Build fix. Comment out the
251 DeleteCriticalSections until I figure out which one may still be
252 sometimes locked when mono_thread_cleanup is called.
254 2006-05-24 Dick Porter <dick@ximian.com>
256 * threads.c (mono_thread_cleanup): Move the threading cleanup out
257 of mono_thread_manage and back into its own function, so it can be
258 called after the finalizer thread has finished.
260 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
262 2006-05-24 Zoltan Varga <vargaz@gmail.com>
264 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
267 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
268 with non-blittable elements.
269 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
271 2006-05-24 Martin Baulig <martin@ximian.com>
273 * mono-debug-debugger.h (MonoDebuggerEvent): Added
274 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
276 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
277 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
278 `mono_debugger_event_handler' to NULL.
280 2006-05-24 Martin Baulig <martin@ximian.com>
282 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
284 2006-05-24 Martin Baulig <martin@ximian.com>
286 * mono-debug-debugger.h
287 (mono_debugger_create_notification_function): Added
288 `MonoCodeManager *' argument.
290 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
292 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
294 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
296 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
297 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
300 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
302 * icall.c: precise GC support: objects can't be stored in unmanaged
303 memory anymore, even if they are kept alive by other references: since
304 they can move the GC needs to be able to always find them.
306 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
308 * object.c: precise GC support for static fields. Support
309 for moving GCs: write barriers and pinned allocation for interned
312 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
314 * domain.c, domain-internals.h: precise GC support for the MonoDomain
317 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
319 * class.c, gc.c: sgen and precise GC updates.
321 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
323 * marshal.h, marshal.c: added write barrier wrapper and precise type
326 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
328 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
331 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
333 * reflection.c: precise and sgen GC updates.
335 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
337 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
339 2006-05-22 Zoltan Varga <vargaz@gmail.com>
341 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
343 2006-05-20 Zoltan Varga <vargaz@gmail.com>
345 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
346 MONO_TYPE_OBJECT. Fixes #78462.
348 2006-05-18 Zoltan Varga <vargaz@gmail.com>
350 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
353 2006-05-17 Miguel de Icaza <miguel@novell.com>
355 * class.c (mono_class_get_exception_for_failure): Implement parts
356 of a TODO: if the loader error is set (instead of the class
357 error), we return a Loader exception that can be properly thrown
360 This was exposed by some Winforms 2.0 code that I tried to run
361 (Atsushi pointed me to it).
363 2006-05-17 Zoltan Varga <vargaz@gmail.com>
365 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
366 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
368 * marshal.c (emit_marshal_vtype): Add limited support for
369 UnmanagedType.LPStruct. Fixes #78427.
371 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
372 Applied a patch from kangaroo to fix #77523.
374 2006-05-17 Martin Baulig <martin@ximian.com>
377 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
378 (debugger_thread_created): Removed.
379 (debugger_thread_exited): Removed.
381 2006-05-15 Zoltan Varga <vargaz@gmail.com>
383 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
385 * object-internals.h (MonoReflectionResource): Sync with managed version.
387 2006-05-12 Wade Berrier <wberrier@novell.com>
389 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
391 2006-05-12 Zoltan Varga <vargaz@gmail.com>
393 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
394 functions try to allocate from the image mempool.
396 2006-05-12 Dick Porter <dick@ximian.com>
398 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
400 2006-05-12 Lluis Sanchez <lluis@ximian.com>
402 * object.c: The FieldGetter and FieldSetter methods require the full
403 name of the class, not only the name. Fixes bug #78277.
405 2006-05-11 Miguel de Icaza <miguel@novell.com>
407 * loader.c (method_from_memberref): Do not pass the NULL klass to
408 mono_loader_set_error_() methods. Pass the non-NULL value
411 2006-05-11 Zoltan Varga <vargaz@gmail.com>
413 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
414 (mono_assembly_close): Null out assembly->image->references after freeing it.
416 * image.c (mono_image_close): Free image->references.
418 * reflection.c (mono_image_basic_init): Fix a small memory leak.
420 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
422 * marshal.c: In function mono_mb_add_local don't use the mb pointer
423 before checking if it's NULL (g_assert).
425 2006-05-10 Martin Baulig <martin@ximian.com>
427 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
428 I thought I already killed that two months ago, but now it somehow reappeared.
430 2006-05-10 Martin Baulig <martin@ximian.com>
432 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
434 2006-05-10 Zoltan Varga <vargaz@gmail.com>
436 * reflection.c: Allocate memory for dynamically created methods in the image
439 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
441 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
442 don't use the ad pointer before checking if it's NULL (g_assert).
444 2006-05-09 Zoltan Varga <vargaz@gmail.com>
446 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
447 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
449 * marshal.c: Allocate all signatures from mempools.
451 * marshal.c: Allocate some more signatures from mempools.
453 2006-05-09 Miguel de Icaza <miguel@novell.com>
455 * object.c (mono_load_remote_field): The code used to provide a
456 temporary variable for returning results if the user did not
457 provide a result pointer. But our temporary variable was allocted
460 Fix calling code to always pass a result area. Coverity ID 103.
462 2006-05-06 Zoltan Varga <vargaz@gmail.com>
464 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
465 value, not the old. Fixes #78312.
466 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
468 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
469 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
472 * assembly.c (mono_assembly_close): Free image->references.
474 * assembly.c (mono_assembly_names_equal): Fix a warning.
475 (mono_assemblies_cleanup): Cleanup more global data.
477 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
479 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
480 ptr_cache and image->modules.
482 * image.c (mono_image_init): Allocate array_cache lazily.
484 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
486 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
487 behavior was changed recently and has bad side effects.
489 2006-05-05 Zoltan Varga <vargaz@gmail.com>
491 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
493 * assembly.c (mono_assembly_close): Remove a debug printf.
495 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
497 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
498 to also allow for temporary references between mono_image_open ()/close ().
500 * domain.c (get_runtimes_from_exe): Add a FIXME.
502 2006-05-04 Zoltan Varga <vargaz@gmail.com>
504 * marshal.c: Fix support for dynamic methods.
506 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
508 * marshal.c (mono_marshal_cleanup): New cleanup function.
510 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
513 * class.c (mono_class_init): Fix leaking class->nested_classes.
515 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
517 * image.c (mono_image_init): Initialize the new cashes.
519 * image.c (mono_image_close): Destroy the new cashes.
521 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
523 * mempool.c (mono_mempool_strdup): New helper function.
525 * class-internals.h: Add prototype for mono_loader_unlock ().
527 * domain.c (mono_jit_info_table_find): Fix a warning.
528 (mono_debugger_check_runtime_version): Ditto.
530 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
531 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
532 functions to these modules.
534 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
537 * marshal.c (mono_free_bstr): Fix a warning.
539 * assembly.c (mono_assembly_open_full): Fix another small leak.
541 * object.c: Fix some unload leaks in the remoting code.
543 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
546 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
548 * reflection.c: Fix some unload leaks in dynamic assemblies.
550 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
552 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
553 * marshal.h: Add BSTR support on Win32
554 * icall.c: Add BSTR icalls
555 * metadata.h: Add BSTR enums
557 2006-04-28 Miguel de Icaza <miguel@novell.com>
559 Work to catch the crash from #76795 and turn it into an
560 exception. As I stubbed out pieces of the VisualBasic support,
561 I found a number of places where the code was failing and I added
562 checks to those places.
564 * metadata.c (do_mono_metadata_parse_generic_class): Make this
565 function return a status code. If we fail to parse the signature
566 from mono_metadata_parse_generic_inst, return FALSE.
568 * loader.c (mono_get_method_from_token): If we fail to load the
569 method (mono_class_get) return NULL.
571 * (method_from_memberref): Return NULL if we are unable to parse
574 (mono_loader_error_prepare_exception): Since we now use the
575 loader_error flag internally to stop processing, and obtaining
576 exceptions that might be thrown will walk this code path the
577 proper way of going from a MonoLoaderError into a
578 MonoException was convoluted. This new routine encapsulates the
579 process of turning the error into an exception and *clearing* the
582 2006-04-27 Miguel de Icaza <miguel@novell.com>
584 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
585 with missing assemblies), and to cope with:
587 * Missing fieldref from a non-existing assembly.
588 * Missing methodref from a non-existing assembly.
590 The first batch of work to address *some* of the issues from 76661.
592 * object.c (mono_class_create_runtime_vtable): If we fail to
593 initialize the class raise the exception here.
595 * metadata.c (mono_class_get_overrides_full): If any methods fail
596 to load return the failure to the caller.
598 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
599 flagging assemblies that failed to load.
601 Do not crash if we are unable to load the assembly.
603 (mono_assembly_close): Do nothing with REFERENCE_MISSING
606 * loader.c (mono_loader_set_error_type_load): Change the
607 convention to always pass unallocated strings, so we make our own
608 copies (I know our own code had duplicated strings before, but
609 this keeps the normal conventions).
610 (method_from_memberref): Call mono_loader_set_error_method_load
611 for all possible failures of loading the class.
612 Remove assert, turn into a loader error.
614 (mono_loader_error_to_exception): Move this routine from mini
615 (mini_loader_error_to_exception) there was no need to have that in
618 * class.c (mono_class_from_typeref): If we were not able to load
619 the assembly with mono_assembly_load_reference, call the
620 mono_loader_set_error_type_load to register the problem.
622 (mono_class_setup_fields): If we fail to load the type from
623 mono_metadata_parse_type_full, call mono_class_set_failure and
626 If class->exception_type is set, we do not layout the fields as
627 that might crash the runtime, and instead return (from breaking
628 from the previous loop).
630 (mono_class_setup_vtable): This now returns a boolean indicating
631 whether the table was properly setup. The decision is driven by
632 mono_class_get_overrides_full which might run into non-existing
635 (mono_class_init): Returns TRUE on success or FALSE if there was a
636 problem in loading the type (incorrect assemblies, missing
637 assemblies, methods, etc).
639 When we call mono_class_setup_fields we also check for a potential
640 error inside this call (either a class exception or a general
643 (mono_class_create_from_typedef): If the parent fails to load
644 (calling mono_class_get_full) return NULL.
648 calls to mono_metadata_parse_type_full should be checked
649 everywhere and set the mono_class_set_failure
650 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
652 The current patch checks the places where my manually constructed
653 tests show the errors are showing up, but we should do it
658 mono_class_init return values should be tested everywhere, like
659 the previous case this is something that we should audit
660 everywhere and not only on the cases exposed by the tests I
663 2006-04-26 Miguel de Icaza <miguel@novell.com>
665 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
666 boolean parameter and instead pass the information on `options'
667 parameter (FileOptions).
669 * icall.c: Register the new signature for MonoIO.Open.
671 * debug-helpers.c (dis_one): Trying to understand how coverity
672 works. Fix Run 5, item 78.
674 2006-04-26 Dick Porter <dick@ximian.com>
676 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
679 2006-04-25 Martin Baulig <martin@ximian.com>
681 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
683 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
684 debugger_thread_created().
685 (debugger_gc_push_all_stacks): Don't handle the main thread in any
687 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
688 (mono_debugger_finalize_threads): New function; undo the effects
689 of mono_debugger_init_threads().
690 (mono_debugger_create_all_threads): Removed.
692 2006-04-24 Zoltan Varga <vargaz@gmail.com>
694 * image.c (mono_image_close): Tidy up trace messages.
696 * assembly.c (mono_assembly_close): Ditto.
698 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
699 no longer references an already freed assembly. Fixes #78168.
701 2006-04-21 Dick Porter <dick@ximian.com>
703 * threads.c (mono_thread_detach): Fix reference counting when
706 2006-04-21 Zoltan Varga <vargaz@gmail.com>
708 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
711 2006-04-19 Zoltan Varga <vargaz@gmail.com>
713 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
714 (mono_type_to_stind): Ditto.
716 * marshal.c: Use the new helper functions to simplify code.
718 * image.c (mono_image_close): Add some code for help debug assembly unloading
721 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
724 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
725 assembly was already loaded in another appdomain. Fixes #78083.
727 2006-04-13 Zoltan Varga <vargaz@gmail.com>
729 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
730 referenced assemblies.
731 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
733 * domain.c (mono_domain_free): Add a trace message.
735 * appdomain.c (add_assemblies_to_domain): Ditto.
737 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
740 2006-04-12 Zoltan Varga <vargaz@gmail.com>
742 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
744 2006-04-12 Martin Baulig <martin@ximian.com>
746 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
747 `USE_INCLUDED_LIBGC'.
749 2006-04-12 Zoltan Varga <vargaz@gmail.com>
751 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
752 the patch contains ../ and a small directory name later. Hopefully fixes
755 2006-04-10 Martin Baulig <martin@ximian.com>
757 Clean up the debugger's thread-handling code.
759 The debugger's thread-handling code has been moved from
760 ../mini/debug-debugger.c to threads.c. We now iterate directly
761 over the `threads' hash, keep track of exiting threads and also
764 We can now debug XSP and XSP based applications with the debugger.
766 * object-internals.h (MonoThread): Added `gpointer end_stack'.
769 (MonoThreadCallbacks): Removed; this was only used by the debugger.
770 (mono_install_thread_callbacks): Likewise.
772 * threads.c (mono_thread_callbacks): Removed.
773 (debugger_thread_created, debugger_thread_exited): New static functions.
774 (start_wrapper): Call debugger_thread_created().
775 (thread_cleanup): Call debugger_thread_exited().
776 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
777 (mono_debugger_init_threads): New public function.
778 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
779 iterate directly over the `threads' hash and also use proper locking.
781 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
783 * mono-debug-debugger.h
784 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
786 2006-04-10 Zoltan Varga <vargaz@gmail.com>
788 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
789 argument type=array. Fixes #78057.
791 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
793 * culture-info-table.h : regenerated. Fixed bug #69652.
795 2006-04-07 Zoltan Varga <vargaz@gmail.com>
797 * loader.c metadata.c: Reapply a variant r59116.
799 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
801 * class.c (mono_class_setup_interface_offsets): New internal function.
803 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
804 interfaces too. Fixes #77398.
806 * reflection.c (encode_cattr_value): Add support for
807 parameter type=object, argument type=array.
808 (load_cattr_value): Ditto. Fixes #77916.
810 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
811 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
813 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
814 a byval char array and CharSet is Ansi.
816 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
818 2006-04-06 Zoltan Varga <vargaz@gmail.com>
820 * metadata.c: Add some locking comments.
822 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
824 (mono_metadata_free_method_signature): Don't free the signature itself.
826 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
828 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
829 reference the same MonoImage.
830 (mono_assembly_load_from_full): Add an assert.
832 2006-04-05 Zoltan Varga <vargaz@gmail.com>
834 * image.c (mono_image_close): Don't put the image we are about to free into the
835 loaded_images_guid_hash.
837 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
838 to reduce code duplication.
840 * marshal.c: Register the native functions called by this module as icalls, to
841 somewhat centralize the creation of MonoMethodSignature's.
843 * loader.c (mono_method_signature): Add a cache for method signatures.
845 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
846 the parameter attributes of a method.
847 (mono_metadata_parse_method_signature_full): Refactored the computation of
848 parameter attributes into a separate function. Also avoid one allocation in
851 * assembly.c (mono_assembly_close): Ditto.
853 * image.c (mono_image_close): Log trace messages with INFO level.
855 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
857 * image.c reflection.c: Correct reference counting of image modules.
859 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
860 of this function from the image mempool.
862 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
863 to allow more cached types to be used.
865 * mono-debug.c (mono_debug_add_method): Appled patch from
866 David S. Miller <davem@sunset.davemloft.net>: Access
867 minfo->lexical_blocks[] entry elements using read32().
869 2006-04-04 Zoltan Varga <vargaz@gmail.com>
871 * loader.c (mono_free_method): No longer free the method header for non-dynamic
872 methods as it is allocated from the mempool.
874 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
877 * metadata-internals.h: Add comments describing the reference counting scheme
878 used for MonoImage and MonoAssembly.
880 * image.c assembly.c reflection.c: Rework reference counting of images and
881 assemblies so they are freed when the runtime is shut down. Free some
882 additional memory structures when an image is unloaded.
884 2006-04-03 Zoltan Varga <vargaz@gmail.com>
886 * class.c loader.c reflection.c: Allocate more data structures in
889 2006-03-31 Miguel de Icaza <miguel@novell.com>
892 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
893 build on pre glib 2.4 systems.
895 2006-03-31 Zoltan Varga <vargaz@gmail.com>
897 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
899 * icall.c: Fix some warnings.
901 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
903 * culture-info-table.h : regenerated.
905 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
907 * threads.c, object-internals.h, verify.c: changed the culture caching
908 code to use a normal MonoArray for storage so the GC can keep track of
909 them easily. Fixed bits of the cache logic, too and simplified the
912 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
914 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
915 thread for non-Boehm GCs.
917 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
919 * domain.c, object.c, domain-internals.h: reduce the amount of memory
920 needed to keep track of the data for static fields.
922 2006-03-29 Raja R Harinath <rharinath@novell.com>
925 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
926 for interface classes. Use 'num_methods' instead.
927 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
928 before using '->vtable_size' field.
930 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
932 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
933 doesn't contain managed pointers, so use a normal hashtable.
935 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
937 * reflection.c, class-internals.h, domain.c: fixed handling of types
938 used as values for objects in custom attributes (bug #77915):
940 2006-03-24 Martin Baulig <martin@ximian.com>
942 * class.c (mono_class_setup_fields): Added support for generic
943 instances; fixes #77580.
945 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
947 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
949 2006-03-24 Dick Porter <dick@ximian.com>
951 * file-io.c (get_file_attributes): More stat macro breakage.
954 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
956 * profiler.c: added the file=filename option in the default profiler
957 to output the profile data to filename.
959 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
961 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
964 2006-03-22 Martin Baulig <martin@ximian.com>
966 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
967 allocated `MonoClassField *' in `fb->handle'.
969 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
971 * class.c, image.c, metadata-internals.h: implemented new mechanism to
972 allocate interface ID to save memory and allow better ID reuse on
973 appdomain unload. setup_generic_vtable () removal from Martin.
975 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
977 * object.h, appdomain.c, domain.c, exception.c, icall.c,
978 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
979 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
980 write barriers for reference stores with managed objects accessed with
981 C structures in the runtime and in embedding programs.
983 2006-03-20 Raja R Harinath <rharinath@novell.com>
985 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
986 'interface_id' and 'max_interface_id' fields of MonoClasses
987 representing open generic types.
989 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
991 * object.h, object.c, icall.c: added functions to deal with
992 storing valuetypes that contain references in managed objects.
993 * reflection.c, string-icalls.c, threads.c, marshal.c: small
994 fixes and comments around uses of mono_array_addr ().
996 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
998 * object.h, icall.c, monitor.c: object.GetHashCode ()
999 implementation that supports the moving garbage collector.
1001 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
1003 * icall.c, threads-types.h, threads.c: implemented finalizer for
1006 2006-03-15 Zoltan Varga <vargaz@gmail.com>
1008 * metadata.c (mono_type_size): Add a fixme.
1009 (mono_type_stack_size): Ditto.
1011 * object-internals.h (MonoReflectionAssemblyBuilder): Added
1012 'type_forwarders' field.
1014 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
1015 attribute from net 2.0.
1017 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
1020 * class.c (mono_class_setup_fields): Fix a warning.
1022 * class.c (mono_class_from_name): Add support for assemblyref entries
1023 in the EXPORTEDTYPE table.
1025 * reflection.c: Add support for handling type forwarders under net 2.0.
1027 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1029 2006-03-14 Zoltan Varga <vargaz@gmail.com>
1031 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
1032 overwriting entries in ModuleBuild->types, also clean up the code
1033 a little. Fixes #77774.
1035 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
1037 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
1038 load friend assembly info when present.
1040 2006-03-14 Raja R Harinath <rharinath@novell.com>
1042 Fix crasher on gtest-158.cs.
1043 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
1044 the return value if the MonoClass we want is yet in an
1046 * class.c (mono_class_create_from_typedef): Add an comment
1047 explaining an order dependency between mono_class_setup_parent and
1048 mono_class_setup_mono_type.
1050 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1052 * class.c: documentation updates and events bug fix.
1054 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1056 * class.c: some cleanup, locking fixes.
1058 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1060 * class.c: fix the generics code to setup nested
1061 type info to the instantiated type (bug #77770).
1063 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1065 * marshal.c: fixed a few type correctness issues.
1067 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1069 * loader.c: the Set/Get/Addrtess array methods should be public.
1071 2006-03-11 Zoltan Varga <vargaz@gmail.com>
1073 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
1075 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
1078 2006-03-10 Zoltan Varga <vargaz@gmail.com>
1080 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
1082 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
1084 * mempool.c (mono_mempool_alloc): Speed this up a bit.
1085 (mono_mempool_alloc0): Ditto.
1087 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1090 (create_object_from_sockaddr): it was allocating 4 extra bytes
1091 for the AF_UNIX data. Fixes bug #77747.
1093 2006-03-09 Zoltan Varga <vargaz@gmail.com>
1095 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
1097 2006-03-09 Dick Porter <dick@ximian.com>
1099 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
1100 Fixes bug 76966 again.
1102 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
1104 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
1106 * appdomain.c: Bumped corlib version to 48 (due to r57532)
1108 2006-03-07 Martin Baulig <martin@ximian.com>
1111 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
1113 2006-03-07 Martin Baulig <martin@ximian.com>
1116 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
1117 regression introduced in r56970; see gtest-252.cs.
1119 * loader.c (mono_get_method_constrained): Correctly handle generic
1120 methods; see gtest-253.cs.
1122 2006-03-04 Zoltan Varga <vargaz@gmail.com>
1124 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
1126 2006-03-04 Martin Baulig <martin@ximian.com>
1128 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
1129 compute the parent type at runtime, just like we're already doing
1133 (mono_reflection_bind_generic_parameters): Don't compute the
1134 parent type anymore.
1136 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
1138 2006-03-04 Martin Baulig <martin@ximian.com>
1140 * mono-debug-debugger.h
1141 (mono_debugger_create_notification_function): Allocate memory at
1142 runtime and return a pointer to it.
1144 2006-03-03 Zoltan Varga <vargaz@gmail.com>
1146 * assembly.c: Fix windows build.
1148 * assembly.c: Fix build.
1150 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
1152 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
1154 2006-03-03 Dick Porter <dick@ximian.com>
1157 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1158 Check parameters before dereferencing them. Fixes Aaron's part of
1161 2006-03-03 Raja R Harinath <rharinath@novell.com>
1163 Fix performance regression.
1164 * loader.c (find_method_in_class): Add 'from_class' argument.
1165 Rename 'klass' argument to 'in_class'. The signature is compared
1166 against the method in 'in_class', and the corresponding method is
1167 returned from 'from_class'.
1168 (find_method): Walk both 'in_class' and 'from_class' in parallel.
1169 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
1170 type definition and generic instantiation in parallel.
1171 (mono_get_method_constrained): Update to changes.
1173 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1175 * threads.c: make sure the domain is correct, too when doing
1176 mono_thread_attach ().
1178 2006-03-01 Zoltan Varga <vargaz@gmail.com>
1180 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
1181 windows. Fixes #77683.
1183 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
1185 * object.h, *: introduced specific way to set elements of an array
1186 of references to be used as write barrier. Still need to audit the
1187 uses of mono_array_addr.
1189 2006-03-01 Miguel de Icaza <miguel@novell.com>
1191 * object-internals.h: New field to cache the assmebly name, patch
1192 from Tambet Ingo (tambet@ximian.com)
1194 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1196 * decimal.h, class-internals.h, metadata-internals.h,
1197 file-io.h: mark a few function declarations as internal, to
1198 reduce the number of PLT entries.
1200 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1202 * file-io.c: fix typo in warning message.
1204 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
1206 * loader.c: on unix, lookup the "*A" version of a function
1207 if charset is auto as a second option before failing.
1209 2006-02-28 Raja R Harinath <rharinath@novell.com>
1211 * class.h (mono_class_inflate_generic_method): Revert to two
1213 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
1214 (mono_class_inflate_generic_method_full): Add.
1215 * class.c (mono_class_inflate_generic_method_full): Rename from
1216 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
1217 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
1218 * loader.c, reflection.c: Update to changes.
1220 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
1222 * icall.c: const fixes and small improvements.
1224 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1226 * threadpool.c: for asynchronous connect(), enable the same workaround
1227 for BSD 6 as for the Mac. Fixes bug #77637.
1229 2006-02-24 Zoltan Varga <vargaz@gmail.com>
1231 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
1232 formatted classes. Fixes #77524.
1234 2006-02-24 Raja R Harinath <rharinath@novell.com>
1236 * class.c (inflate_generic_type): Add a couple more
1237 micro-optimizations.
1238 (inflate_generic_context): Don't use the 'gmethod' from
1240 (mono_class_inflate_generic_method): If the method has generic
1241 parameters, but the passed-in context doesn't have a 'gmethod',
1242 create one. Use the possibly simplified generic instantiation
1243 from the declaring class instead of the one passed in.
1245 2006-02-24 Raja R Harinath <harinath@gmail.com>
1247 Make generic method signature and method header handling lazy.
1248 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
1249 (inflate_generic_header): Likewise.
1250 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
1251 parameter to avoid inflating types.
1252 (mono_get_inflated_method): Empty out.
1253 * class.h (mono_class_inflate_generic_method): Update to changes.
1254 * loader.c (mono_get_method_from_token): Don't parse signature for
1255 generic methods, nor methods of generic classes.
1256 (mono_method_signature): Rename from 'mono_method_signature'.
1257 Inflate signature on demand.
1258 (mono_method_get_header): Inflate method header on demand.
1259 * reflection.c: Update to changes.
1261 2006-02-23 Raja R Harinath <rharinath@novell.com>
1263 * metadata.c (mono_metadata_inflate_generic_inst): If the
1264 instantiation is closed, don't bother expanding it in the new
1266 * class.c (inflate_generic_class): If the generic instantiation
1267 doesn't change after inflation, return the argument itself.
1268 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
1270 (inflate_generic_context): If neither the generic class nor the
1271 generic method instantiations change, return the original context.
1272 * reflection.c (mono_method_get_object): Do
1273 'mono_get_inflated_method' before accessing the ->klass field.
1274 (inflate_mono_method): Don't create a MonoGenericMethod unless
1276 (inflate_method): Don't pass a constructed type as the declaring
1277 type of a methodbuilder.
1279 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
1281 * object.c: fix memory overwrite.
1283 2006-02-22 Dick Porter <dick@ximian.com>
1285 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
1286 it doesn't work any more.
1287 (mono_threads_request_thread_dump): Fix unused variable warnings.
1289 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1291 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
1292 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
1293 the public header file.
1295 2006-02-21 Zoltan Varga <vargaz@gmail.com>
1297 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
1299 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
1301 * class-internals.h, object.c: reduce the size of MonoVTable
1302 and store the interface_offsets array at negative offsets.
1304 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
1306 * metadata.c: tweak table descriptors data structures to reduce
1307 size and runtime relocations.
1309 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1311 * marshal.c: fix some types and opcodes to be type-safe
1312 in marshaling wrappers.
1314 2006-02-21 Ankit Jain <jankit@novell.com>
1316 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
1318 2006-02-21 Raja R Harinath <rharinath@novell.com>
1320 * metadata.c (get_constraints): Relax debugging checks for monodis.
1322 2006-02-21 Ankit Jain <jankit@novell.com>
1324 * metadata.c (mono_metadata_load_generic_params): Move the code
1325 checking for ambiguous generic params from here to mono/dis/get.c
1326 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
1328 2006-02-21 Raja R Harinath <harinath@gmail.com>
1330 Fix assertion triggered when compiling nemerle.
1331 * class.c (mono_get_shared_generic_inst): Rename from
1332 get_shared_inst and make non-static.
1333 * loader.c (mono_get_shared_generic_method): New. Used to create
1334 the MonoGenericContext-equivalent of a MonoGenericContainer.
1335 (mono_get_method_from_token): Initialize the 'context' field of
1336 the created MonoGenericContainer.
1337 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
1338 * metadata.c (get_constraints): Add sanity check.
1339 * class-internals.h: Add new internal methods.
1341 * reflection.c (verify_safe_for_managed_space): New sanity check.
1342 Currently checks that owner-less generic parameters aren't allowed
1344 (mono_type_get_object): Use it.
1345 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
1346 that are now in mono_type_get_object.
1347 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
1349 2006-02-19 Raja R Harinath <harinath@gmail.com>
1351 * metadata.c (mono_type_create_from_typespec): Rename from
1352 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
1353 argument and caching of types in the generic container.
1354 (unwrap_arrays, find_generic_param): Remove.
1355 * metadata-internals.h: Update.
1356 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
1358 2006-02-18 Zoltan Varga <vargaz@gmail.com>
1360 * class.c (mono_class_get_exception_for_failure): Fix a warning.
1362 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
1363 return values. Fixes #77581.
1365 * class.c (mono_fnptr_class_get): Switch name and name_space.
1367 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
1368 classes and add support for [In, Out] attributes.
1369 (mono_marshal_free_asany): Ditto. Fixes #77524.
1371 2006-02-18 Raja R Harinath <harinath@gmail.com>
1373 * class.c (mono_class_from_generic_parameter): Make more robust to
1374 incomplete MonoGenericContainers from monodis.
1376 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1378 * class-internals.h: added some more exception types.
1379 * class.c, metadata.c: added a few checks to handle missing
1382 2006-02-17 Raja R Harinath <rharinath@novell.com>
1384 Use owner-less generic-params some more.
1385 * class.c (my_mono_class_from_generic_parameter): Remove.
1386 (mono_class_from_generic_parameter): Handle null image,
1387 param->name and param->owner.
1388 (mono_class_from_mono_type): Update.
1389 (mono_class_create_from_typespec): Remove 'container' parameter.
1390 If that parameter is non-null, the result is always inflated by
1391 'mono_class_get_full' anyway.
1392 (mono_class_get): Rename from _mono_class_get. Remove 'container'
1394 (mono_class_get_full): Update.
1396 * class.c (inflate_generic_type) [GENERICINST]: If the generic
1397 instance is not open, don't bother inflating.
1398 (mono_class_setup_fields): Hoist some loop-invariants. Don't
1399 parse metadata for inflated classes.
1400 (_mono_class_get): Change GenericContext* parameter to
1402 (mono_class_create_from_typespec): Likewise. Simplify, and
1403 implement trivially. All the cases are handled in
1404 mono_class_from_mono_type. Don't inflate returned class.
1405 (mono_class_get_full): Delegate GENERICINST optimization to
1406 inflate_generic_type.
1407 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
1409 2006-02-16 Dick Porter <dick@ximian.com>
1411 * socket-io.c (create_object_from_sockaddr): Fix typo.
1412 (create_sockaddr_from_object): Check array lengths before
1413 potentially accessing items off the end.
1414 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
1415 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
1416 (ves_icall_System_Net_Sockets_Socket_Send_internal)
1417 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
1418 length checks to avoid wraparound overflows.
1419 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
1420 contents of the array of sockets
1421 (hostent_to_IPHostEntry2)
1422 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
1423 Check return value of inet_ntop ().
1424 (addrinfo_to_IPHostEntry): Fix typo
1426 2006-02-16 Raja R Harinath <rharinath@novell.com>
1428 Type metadata parsing doesn't use generic-instantiation information.
1429 * metadata.c (mono_metadata_parse_array_full): Change
1430 MonoGenericContext* parameter to MonoGenericContainer*.
1431 (mono_metadata_parse_type_full): Likewise.
1432 (mono_type_create_from_typespec_full): Likewise.
1433 (mono_metadata_parse_mh_full): Likewise.
1434 (mono_metadata_parse_generic_inst): Likewise.
1435 (do_mono_metadata_parse_generic_class): Likewise.
1436 (do_mono_metadata_parse_type): Likewise.
1437 * metadata-internals.h: Update to changes.
1438 * class.c (mono_class_find_enum_basetype): Likewise.
1439 (mono_class_setup_fields): Likewise.
1440 (mono_class_create_from_typespec): Likewise.
1441 * loader.c (method_from_methodspec): Likewise.
1442 (mono_get_method_from_token): Likewise.
1443 (mono_method_get_header): Likewise.
1445 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1447 * marshal.c: handle additional GENERICINST case (patch from
1448 Thong Nguyen <tum@veridicus.com>).
1449 Fix a few cases where LDIND_I/STIND_I was used for references.
1451 2006-02-16 Raja R Harinath <rharinath@novell.com>
1453 * reflection.c (mono_reflection_get_token): Remove unused variable.
1455 2006-02-16 Martin Baulig <martin@ximian.com>
1457 * reflection.c (mono_reflection_get_token): Add support for fields
1458 in instantiated generic types.
1461 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
1463 2006-02-15 Martin Baulig <martin@ximian.com>
1466 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
1467 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
1468 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
1469 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
1471 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
1473 * class.c, metadata.c, metadata.h, object.c, icall.c,
1474 marshal.c: changed mono_type_get_underlying_type () to do
1475 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
1476 Fixed handling of instantiated generic valuetypes (bug #75479).
1478 2006-02-15 Raja R Harinath <rharinath@novell.com>
1480 * metadata.c (mono_metadata_decode_signed_value): Simplify.
1481 Delegate to mono_metadata_decode_value, and work on the returned value.
1483 * icall.c (ves_icall_MonoType_GetGenericArguments):
1484 Add consistency check here too.
1486 2006-02-15 Ankit Jain <jankit@novell.com>
1488 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
1491 2006-02-15 Ankit Jain <jankit@novell.com>
1493 * metadata.c (mono_metadata_decode_signed_value): New function to decode
1494 signed values, used only for representing lower bounds of arrays.
1495 (mono_metadata_parse_array_full): Use new
1496 mono_metadata_decode_signed_value to decode lower bounds.
1498 2006-02-14 Martin Baulig <martin@ximian.com>
1501 (mono_reflection_get_token): Support "MonoGenericMethod" and
1502 "MonoGenericCMethod" and allow generic instances / methods.
1504 2006-02-11 Zoltan Varga <vargaz@gmail.com>
1506 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
1507 to obtain the terminal size using an ioctl.
1509 * object.c (mono_nullable_init): Revert this as nullable reference
1510 types are not valid.
1511 (mono_nullable_box): Ditto.
1513 2006-02-09 Dick Porter <dick@ximian.com>
1515 * threads.c (mono_thread_detach): Drop a reference to the thread
1518 2006-02-09 Zoltan Varga <vargaz@gmail.com>
1520 * object.c (mono_nullable_init): Handle nullable reference types.
1521 (mono_nullable_box): Ditto. Fixes #77446.
1523 2006-02-07 Martin Baulig <martin@ximian.com>
1525 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
1527 2006-02-07 Ankit Jain <jankit@novell.com>
1529 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
1530 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
1531 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
1532 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
1533 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
1534 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
1536 2006-02-02 Zoltan Varga <vargaz@gmail.com>
1538 * class.c (mono_class_create_generic): Set type_token as well.
1540 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
1543 2006-02-02 Martin Baulig <martin@ximian.com>
1545 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
1546 has never been used so far.
1548 2006-02-02 Martin Baulig <martin@ximian.com>
1550 * mono-debug-debugger.h: Changed comment at the top of this file;
1551 the header is not installed, but it's safe to #include it from
1554 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
1555 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
1557 2006-02-02 Martin Baulig <martin@ximian.com>
1560 (MonoSymbolTable): Removed the `metadata_info' field.
1563 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
1565 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1566 (mono_debugger_add_builtin_types): Removed.
1567 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
1568 (mono_debugger_create_notification_function): We now operate on a
1569 pre-allocated area; take a `gpointer' and return `void'.
1571 * mono-debug-debugger.c
1572 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
1573 (mono_debugger_add_builtin_types): Removed.
1575 2006-02-02 Martin Baulig <martin@ximian.com>
1577 * threads.c (mono_debugger_create_all_threads): New public method.
1579 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1581 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
1582 breaks on several platforms.
1584 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
1586 * assembly.c: the VS.NET build doesn't supply default values for
1587 MONO_ASSEMBLIES and MONO_CFG_DIR.
1589 2006-02-01 Zoltan Varga <vargaz@gmail.com>
1591 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
1594 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
1596 * loader.c (method_from_memberref): Fix a warning.
1598 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
1600 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
1601 with explicit layout. Fixes #77433.
1603 2006-01-31 Zoltan Varga <vargaz@gmail.com>
1605 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
1606 max_interface_id is initialized before using it. Fixes #77398.
1607 (ves_icall_Type_GetInterfaces): Ditto.
1609 2006-01-30 Raja R Harinath <rharinath@novell.com>
1611 * metadata.c (mono_metadata_parse_method_signature_full): Don't
1612 allocate memory for parameter attributes when parsing memberref
1614 * loader.c (mono_loader_set_error_method_load): Don't warn.
1615 (method_from_memberref): Ensure MissingMethodException gets thrown
1616 if method is not found. Make warning more informative.
1618 2006-01-29 Raja R Harinath <harinath@gmail.com>
1621 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
1622 return true if is byref.
1623 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
1624 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
1625 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
1627 2006-01-27 Raja R Harinath <rharinath@novell.com>
1629 Fix tests/find-method.2.il
1630 * loader.c (find_method, find_method_in_class): Remove is_inflated
1631 argument. Revert 2006-01-18 change.
1632 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
1633 is generic, search for method in its generic definition.
1634 * class.c (mono_class_setup_vtable_general): Print generic
1635 arguments of generic types in debugging printf.
1637 2006-01-26 Zoltan Varga <vargaz@gmail.com>
1639 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
1641 * threads.c (mono_threads_request_thread_dump): New helper function.
1643 2006-01-25 Raja R Harinath <rharinath@novell.com>
1645 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
1647 2006-01-25 Ankit Jain <jankit@novell.com>
1649 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
1650 move definition to ..
1651 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
1653 2006-01-25 Ankit Jain <jankit@novell.com>
1654 Raja R Harinath <rharinath@novell.com>
1656 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
1657 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
1660 2006-01-25 Martin Baulig <martin@ximian.com>
1662 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
1663 `MonoDebuggerThread' into debug-debugger.c.
1665 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
1667 * profiler.c: fix printing of data.
1669 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
1671 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
1672 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
1674 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
1676 * object.c: fix deadlock related to string interning.
1678 2006-01-23 Martin Baulig <martin@ximian.com>
1680 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1682 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
1684 2006-01-23 Martin Baulig <martin@ximian.com>
1686 * mono-debug.h: Moved the prototypes of some functions which are
1687 used by the JIT here from mono-debug-debugger.h.
1689 2006-01-21 Martin Baulig <martin@ximian.com>
1691 * Makefile.am: Don't install mono-debug-debugger.h.
1693 2006-01-21 Martin Baulig <martin@ximian.com>
1695 * mono-debug-debugger.h: Enforce the private status of this header
1696 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
1697 Moved some stuff from mono-debugger-jit-wrapper.h here.
1699 2006-01-20 Raja R Harinath <rharinath@novell.com>
1701 * class.c (mono_class_from_typeref): Add a sanity test to help
1702 catch lack of assembly load/search hooks.
1704 2006-01-19 Zoltan Varga <vargaz@gmail.com>
1706 * marshal.c (emit_struct_conv): Relax the fields with same offset
1707 check even more. Fixes #77230.
1709 2006-01-18 Martin Baulig <martin@ximian.com>
1711 * loader.c (find_method_in_class): Added `gboolean is_inflated'
1712 argument; if false, we compare the uninstantiated signatures.
1713 (method_from_memberref): Compare the uninstantiated signatures;
1716 2006-01-18 Robert Jordan <robertj@gmx.net>
1718 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
1719 Clear the weak link. Fixes bug #77170.
1721 * gc.c (mono_gchandle_free):
1722 Reflect *-gc.c changes (tiny optimization).
1724 2006-01-18 Zoltan Varga <vargaz@gmail.com>
1726 * metadata.c (mono_metadata_signature_dup): Applied patch from
1727 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
1730 2006-01-17 Zoltan Varga <vargaz@gmail.com>
1732 * marshal.c (emit_struct_conv): Allow fields with the same offset when
1733 marshalling from native to managed code. Fixes #77230.
1735 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1737 * threadpool.c: fix problem (Mac only) when more than one asynchronous
1738 connect. Fixes bug #77020.
1740 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
1742 * class.c: fixed id assignement for nested interfaces (bug #77275).
1743 Added also better info for --print-vtable debugging.
1745 2006-01-12 Martin Baulig <martin@ximian.com>
1747 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
1748 interfaces on-the-fly; fixes #76625.
1751 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
1752 don't need that anymore.
1754 2006-01-12 Miguel de Icaza <miguel@novell.com>
1757 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
1758 To avoid initing the nested_classes when not needed I turned the
1759 PeerCredData as a toplevel internal class, as it has to be shared
1762 Fixes the CASA issue.
1764 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
1766 * domain.c: Accessors for MonoJitInfo
1768 * profiler-private.h: Add jitinfo to the end jit hook
1770 * profiler.[ch]: Define new hooks, called after jitting which give
1771 the MonoJitInfo that was compiled
1773 2006-01-10 Martin Baulig <martin@ximian.com>
1775 * class.c (mono_class_setup_events): Add support for generic
1776 classes; fixes #76440.
1778 2006-01-06 Raja R Harinath <rharinath@novell.com>
1781 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
1782 on passed-in method.
1784 2006-01-03 Zoltan Varga <vargaz@gmail.com>
1786 * object.c (mono_runtime_invoke_array): Add Nullable support.
1788 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
1790 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
1792 * file-io.c: Don't consider sockets as directory and avoid an endless
1793 loop. Fix bug #76966.
1795 2006-01-03 Zoltan Varga <vargaz@gmail.com>
1797 * object.c (mono_nullable_init): New helper function.
1798 (mono_nullable_box): Ditto.
1800 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
1802 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
1804 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
1806 2006-01-02 Zoltan Varga <vargaz@gmail.com>
1808 * class.c (mono_class_is_assignable_from): Make T assignable to
1811 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
1813 * appdomain.c: Bump corlib version to 46.
1814 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
1815 serialization purpose) and changed ves_icall_System_Reflection_
1816 Assembly_get_code_base signature to accept a boolean (to escape, or
1817 not, the assembly code base).
1819 2005-12-23 Dick Porter <dick@ximian.com>
1823 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
1824 CreateEvent icall now returns "created" boolean parameter.
1826 2005-12-22 Zoltan Varga <vargaz@gmail.com>
1828 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
1831 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
1832 when attr_klass is an interface. Fixes #77045.
1834 2005-12-20 Zoltan Varga <vargaz@gmail.com>
1836 * marshal.c (emit_struct_conv): Fix previous patch.
1838 * marshal.c (emit_struct_conv): Add a check for fields with the same
1841 2005-12-20 Raja R Harinath <rharinath@novell.com>
1843 Fix regression in Mono.C5.
1844 * class.c (mono_class_create_generic): If 'klass' is an interface
1845 set up the interface offsets.
1846 (mono_class_is_assignable_from): Don't throw away generic arguments.
1848 2005-12-19 Raja R Harinath <rharinath@novell.com>
1850 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
1853 2005-12-15 Raja R Harinath <rharinath@novell.com>
1855 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
1857 (do_mono_metadata_parse_generic_class): Don't pass the current
1858 generic context when parsing the type being instantiated: it
1859 cannot use it, anyway.
1861 * loader.c (method_from_memberref): Don't inflate a signature if
1862 it doesn't contain any type parameters.
1864 2005-12-15 Zoltan Varga <vargaz@gmail.com>
1866 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
1868 2005-12-14 Martin Baulig <martin@ximian.com>
1871 (mono_type_get_name_recurse): Don't return null for type
1872 parameters and open generic classes.
1873 (mono_class_setup_methods): Don't exclude generic instances.
1874 (mono_get_unique_iid): Use different IDs for different
1875 instantiations of the same generic type.
1876 (mono_class_setup_vtable): Only use setup_generic_vtable() for
1877 open generic instances; create a normal vtable for closed generic
1879 (mono_class_setup_vtable_general): We're now also called for
1880 closed generic instances.
1883 (mono_reflection_bind_generic_parameters): Correctly use
1884 mono_metadata_lookup_generic_inst() everywhere.
1886 2005-12-14 Zoltan Varga <vargaz@gmail.com>
1888 * object.c (mono_class_create_runtime_vtable): Call
1889 mono_class_setup_vtable ().
1891 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
1893 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
1896 * loader.c (mono_loader_set_error_type_load): Print the type load
1897 warnings to the console so they are more visible to the user.
1898 (mono_loader_set_error_method_load): Ditto.
1900 * reflection.c (ensure_runtime_vtable): Revert the last change as it
1903 * reflection.c (ensure_runtime_vtable): Fix build.
1905 * reflection.c (ensure_runtime_vtable): Disable an optimization which
1906 doesn't work in all cases.
1908 2005-12-13 Zoltan Varga <vargaz@gmail.com>
1910 * object.c (mono_array_new_full): Treat a single dimensional array
1911 with 0 lower bounds as an szarray. Fixes #76973.
1913 * reflection.c (custom_attr_visible): Really fix this.
1915 2005-12-12 Zoltan Varga <vargaz@gmail.com>
1917 * reflection.c (custom_attr_visible): Allow nested public attributes
1920 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
1923 2005-12-12 Raja R Harinath <harinath@gmail.com>
1925 * class.c (set_generic_param_owner): Delete.
1926 (mono_class_create_from_typedef): Don't set ->owner field of
1927 generic parameters to "param containers" of enclosing classes.
1928 * reflection.c (mono_reflection_initialize_generic_parameter):
1931 2005-12-11 Zoltan Varga <vargaz@gmail.com>
1933 * reflection.c (custom_attr_visible): Fix build.
1935 2005-12-10 Zoltan Varga <vargaz@gmail.com>
1937 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
1940 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
1941 handling of null parameter defaults.
1943 2005-12-09 Raja R Harinath <rharinath@novell.com>
1945 * class.c (mono_class_from_generic_parameter): Don't set
1946 klass->generic_container.
1947 (my_mono_class_from_generic_parameter): Likewise.
1949 2005-12-07 Zoltan Varga <vargaz@gmail.com>
1951 * reflection.c (load_public_key): Fix a warning.
1952 (method_encode_code): Fix unaligned accesses.
1954 2005-12-07 Martin Baulig <martin@ximian.com>
1956 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
1959 (write_generic_param_entry): Encode our custom attrs.
1961 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
1963 2005-12-07 Martin Baulig <martin@ximian.com>
1965 * reflection.c (encode_new_constraint): Removed; we don't use the
1966 `NewConstraintAttribute' anymore.
1968 2005-12-06 Zoltan Varga <vargaz@gmail.com>
1970 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
1971 not fire a TypeResolve event when Assembly.GetType () is called.
1973 2005-12-05 Ben Maurer <bmaurer@ximian.com>
1975 Beginning of support for nullable types in the runtime. Parts of
1976 this patch are from Martin.
1978 * appdomain.c (MONO_CORLIB_VERSION): Bump
1980 * domain.c (mono_init_internal): get the nullable type
1982 * class.c (mono_class_is_nullable): New method
1983 (mono_class_get_nullable_param): New mehod
1984 (mono_class_create_generic): In types T? set cast_class to T
1986 * class-internals.h (MonoDefaults): new nullable default class
1987 (mono_class_get_nullable_param, mono_class_get_nullable_param):
1990 2005-12-05 Raja R Harinath <rharinath@novell.com>
1992 * metadata.c (select_container): New. Refactor code to select the
1993 appropriate GenericContainer given the type of generic parameter
1995 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
1996 not a MonoGenericContext. Use select_container. Update parameters.
1997 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
1999 (unwrap_arrays): Remove duplicate tests.
2000 (find_generic_param): Rename from 'has_same_context'. Now walks a
2001 generic instantiated class to find any arguments that are generic
2003 (mono_type_create_from_typespec_full): Use find_generic_param to
2004 avoid evicting some generic instantiations from the typespec
2007 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
2009 * reflection.c: fixed writing of doubles on ARM FPA.
2011 2005-12-02 Robert Jordan <robertj@gmx.net>
2013 * icall.c: Fixed EventInfo.ReflectedType (#76829).
2015 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2017 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
2018 least on SUSE 10 they are not the same (on debian, they are just the
2021 2005-12-01 Raja R Harinath <rharinath@novell.com>
2023 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
2024 DeclaringType for VARs and MVARs.
2025 * class.c (set_generic_param_owner): Fix initialization of owner
2028 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
2030 * icall.c: fixed Enum.ToObject() to correctly convert the values.
2032 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2034 * threadpool.c: workaround for a bug that shows up on the Mac:
2035 select()+connect() on a blocking socket is not like it should
2036 be, so we proceed to connect() in that case, wasting the I/O
2037 threadpool thread until connect succeedes. Fixes bug #75436.
2039 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2041 * threadpool.c: fix typo when setting file descriptor states.
2043 2005-11-28 Raja R Harinath <rharinath@novell.com>
2045 * class-internals.h (MonoGenericContainer.is_signature): Remove.
2046 * metadata.c (mono_metadata_parse_method_signature_full): Don't
2047 create a temporary signature container.
2048 (mono_metadata_parse_generic_param): Update to changes.
2049 (mono_type_create_from_typespec_full): Update to changes.
2050 * loader.c (method_from_memberref): Don't use a
2051 MonoGenericContainer while parsing a memberref signature.
2052 (method_from_methodspec): Remove dead-store of the 'container'
2053 variable. It's overwritten before use.
2055 * metadata.c (mono_type_create_from_typespec_full): Make debugging
2057 (mono_metadata_parse_generic_param): Likewise.
2058 * loader.c (find_method_in_class): Does not need a
2059 MonoGenericContainer. Use 'mono_method_signature' rather than
2060 'mono_method_signature_full'.
2061 (find_method, mono_get_method_constrained, method_from_memberref):
2064 * metadata.c (mono_type_create_from_typespec_full): Ensure that
2065 owner-less generic-parameters are never evicted from the typespec
2068 * loader.c (method_from_memberref): Don't use the current context
2069 when parsing signatures.
2070 (method_from_methodspec, mono_get_method_from_token): Update to changes.
2072 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
2073 side-effects in g_assert.
2074 * loader.c (mono_get_method_from_token): Resolve klass earlier so
2075 that we don't potentially lose information.
2077 2005-11-26 Dick Porter <dick@ximian.com>
2080 * threads.c: icalls to implement basic (ie, not named)
2081 System.Threading.Semaphore.
2083 2005-11-24 Dick Porter <dick@ximian.com>
2086 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2087 Use GetProcessId() if it's available.
2089 2005-11-23 Zoltan Varga <vargaz@gmail.com>
2091 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
2093 2005-11-23 Raja R Harinath <rharinath@novell.com>
2094 Ankit Jain <jankit@novell.com>
2096 * loader.c (mono_get_method_from_token): Initialize 'method' field
2097 of all generic parameters before parsing the signature. Remove
2098 code that "fixed"-up MVAR references.
2100 2005-11-23 Ankit Jain <jankit@novell.com>
2102 * metadata.c (mono_metadata_has_generic_params):
2103 (mono_metadata_load_generic_param_constraints):
2104 (mono_metadata_load_generic_params): Move duplicate code ...
2105 (mono_metadata_get_generic_param_row): ... here. Returns the
2106 first row-id in GenericParam table for a given owner (token).
2107 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
2110 2005-11-23 Raja R Harinath <rharinath@novell.com>
2111 Ankit Jain <jankit@novell.com>
2113 * metadata.c (mono_metadata_class_equal): Pass signature_only when
2115 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
2116 type->data.generic_param only if the type is an MVAR.
2117 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
2118 leak owner-less VARs and MVARs into managed space.
2120 2005-11-21 Martin Baulig <martin@ximian.com>
2123 (MonoMethod): Moved the `generic_container' here from
2124 `MonoMethodNormal' since we now also need it for
2125 `MonoMethodPInvoke';
2126 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
2127 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
2128 an union containing both `MonoMethodNormal' and
2129 `MonoMethodPInvoke'.
2132 (mono_get_method_from_token): Allow implementing generic methods
2136 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
2139 2005-11-17 Dick Porter <dick@ximian.com>
2143 * process.c: Split the Process Start_internal icall into
2144 ShellExecuteEx_internal and CreateProcess_internal, which are
2145 called depending on whether UseShellExecute is true. Fixes bug
2148 * appdomain.c (MONO_CORLIB_VERSION): Incremented
2150 2005-11-17 Zoltan Varga <vargaz@gmail.com>
2152 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
2153 'msize' parameters, use the information in 'mspec' instead.
2154 (emit_object_to_ptr_conv): Ditto.
2156 * marshal.c (emit_struct_conv): Handle explicit layout structs with
2157 fields out of order. Fixes #76733.
2159 2005-11-17 Ankit Jain <jankit@novell.com>
2161 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
2163 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
2165 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
2168 2005-11-16 Zoltan Varga <vargaz@gmail.com>
2170 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
2171 for types with non-auto layout. Fixes #76717.
2173 2005-11-16 Ankit Jain <jankit@novell.com>
2175 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
2176 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
2177 if generic_context is null.
2178 (mono_metadata_generic_param_equal): param->owner can be null.
2179 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
2182 2005-11-16 Zoltan Varga <vargaz@gmail.com>
2184 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
2187 2005-11-15 Martin Baulig <martin@ximian.com>
2189 * object.c (set_value): Use mono_class_from_mono_type() instead of
2190 the hack for generic instances; fixes #76136.
2192 2005-11-15 Zoltan Varga <vargaz@gmail.com>
2194 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
2197 * image.c (load_metadata_ptrs): Initialize the new fields.
2199 * reflection.c (create_dynamic_mono_image): Ditto.
2201 * reflection.c (build_compressed_metadata): Use the new fields.
2203 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
2206 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
2209 2005-11-15 Ankit Jain <jankit@novell.com>
2210 Raja R Harinath <harinath@gmail.com>
2212 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
2213 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
2214 new per-generic_container cache if the cached MonoType's context matches
2215 the current context.
2216 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
2217 to the expected context.
2218 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
2220 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2222 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
2223 we changed the signature of an icall.
2224 * icall.c: Modify to mono_double_ParseImpl return true/false
2225 depending on the success, instead of throwing the exception. This will
2226 help us in Double.TryParse methods.
2228 2005-11-14 Zoltan Varga <vargaz@gmail.com>
2230 * marshal.c (emit_marshal_object): Throw an exception when
2231 marshalling 'object' instead of crashing. Fixes #76696.
2233 2005-11-11 Zoltan Varga <vargaz@gmail.com>
2235 * class-internals.h: Add prototype for mono_type_get_full_name ().
2237 2005-11-11 Dick Porter <dick@ximian.com>
2239 * threads.c (mono_thread_manage): Make sure the main thread has
2240 abandoned all its mutexes when cleaning up. Fixes bug 74680.
2242 2005-11-11 Zoltan Varga <vargaz@gmail.com>
2244 * loader.c (mono_loader_set_error_type_load): Log a warning to the
2245 console about the missing type.
2246 (mono_loader_set_error_method_load): Ditto.
2248 2005-11-09 Miguel de Icaza <miguel@novell.com>
2250 * mono-config.c (mono_get_config_dir): Set the system defaults if
2253 * assembly.c (mono_set_dirs): New API entry point to set the
2254 assembly and the config directory in one call
2256 2005-11-09 Zoltan Varga <vargaz@gmail.com>
2258 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
2259 the ftnptr was created from a delegate in a domain other than the
2260 current domain. Fixes #75377.
2262 * exception.h exception.c: Add mono_get_exception_not_supported ().
2264 2005-11-08 Martin Baulig <martin@ximian.com>
2266 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
2268 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
2270 * security-manager.h: Added definitions to deal with strongname key
2271 pairs bigger (and smaller) than 1024 bits.
2272 * reflection.c: Remove hardcoded strongname size (128 bytes) and
2273 adjust wrt the public key length being used.
2275 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
2277 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
2278 Windows build (r51396-51397).
2280 2005-11-03 Martin Baulig <martin@ximian.com>
2282 * class.c (mono_class_setup_vtable_general): Also add generic
2283 methods to the vtable; fixes #76581.
2285 2005-11-01 Miguel de Icaza <miguel@novell.com>
2287 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
2288 sure that we lookup GetString method from the System.Text.Encoding
2289 class, not the derived class or we get an empty method.
2293 2005-10-25 Miguel de Icaza <miguel@novell.com>
2295 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
2296 if it has been previously set (embedders).
2298 Make mono_set_rootdir available also on Unix.
2300 005-10-24 Robert Jordan <robertj@gmx.net>
2302 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
2304 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
2306 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
2307 only calls which are made to native code use this flag.
2309 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
2311 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
2313 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
2314 Add support for FieldBuilders.
2316 2005-10-29 Martin Baulig <martin@ximian.com>
2319 (mono_debug_using_mono_debugger): New public method; returns
2320 whether we're running inside the debugger.
2322 2005-10-27 Zoltan Varga <vargaz@gmail.com>
2324 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
2325 for Method/Constructor/FieldBuilders.
2327 2005-10-26 Zoltan Varga <vargaz@gmail.com>
2329 * reflection.c (module_add_cattrs): Save custom attributes for global methods
2332 2005-10-26 Martin Baulig <martin@ximian.com>
2334 * mono-debug-debugger.c
2335 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
2337 2005-10-24 Raja R Harinath <harinath@gmail.com>
2339 * icall.c (base64_to_byte_array): Don't pass an out-of-range
2342 2005-10-21 Zoltan Varga <vargaz@gmail.com>
2344 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
2345 when passing valuetypes byref. Fixes #76502.
2347 2005-10-19 Jackson Harper <jackson@ximian.com>
2349 * profiler.c: Don't put a . in front of types that are not in a
2352 2005-10-18 Zoltan Varga <vargaz@gmail.com>
2354 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
2356 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
2358 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
2360 (mono_marshal_get_ldflda_wrapper): Fix a warning.
2362 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2364 * assembly.c metadata-internals.h icall.c: Define an additional
2365 parameter for mono_assembly_name_parse_full, so we can avoid creating
2366 S.R.AssemblyName.Version when no version info wasn't passed.
2368 2005-10-09 Miguel de Icaza <miguel@novell.com>
2370 * class.c (mono_type_get_full_name): Reimplement method that was
2373 * image.c: Some docs
2375 2005-10-10 Zoltan Varga <vargaz@gmail.com>
2377 * profiler.c (output_newobj_profile): Fix printing of Total memory
2380 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
2382 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
2384 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
2386 * threads.c: remove debug output.
2388 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
2390 * threads.c (mono_thread_manage): Fix crashes if more than 64
2391 threads need to be aborted. Hopefully fixes #75899.
2393 * assembly.c (mono_stringify_assembly_name): New helper function.
2395 * class.c: Use mono_stringify_assembly_name instead of the similar
2398 * assembly.h assembly.c: Add support for calling a postload search
2399 hook if an assembly cannot be loaded.
2401 * appdomain.c: Register new search hooks which call the AssemblyResolve
2402 events in AppDomain. Fixes #75231
2404 2005-10-07 Martin Baulig <martin@ximian.com>
2406 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
2407 methods without debug info.
2409 2005-10-07 Zoltan Varga <vargaz@gmail.com>
2411 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
2414 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2416 * file-io.c: now that we return symlinks, use lstat and, when the file
2417 is a symbolic link, stat, to get the file attributes. Also avoid the
2418 conversion to/from utf16/external.
2420 2005-10-06 Zoltan Varga <vargaz@gmail.com>
2422 * class.c (mono_class_layout_fields): Compute klass->has_references
2423 correctly if an embedded valuetype is not yet initialized. Fixes
2426 2005-10-04 Martin Baulig <martin@ximian.com>
2429 (mono_metadata_load_generic_param_constraints): New public
2430 function; splitted the constraints loading out from
2431 mono_metadata_load_generic_params().
2433 * class.c (mono_class_create_from_typedef): Call
2434 mono_metadata_load_generic_param_constraints() after setting up
2435 the type and creating our parent; fixes #75329.
2437 2005-10-04 Martin Baulig <martin@ximian.com>
2439 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
2440 non-dynamic parent classes.
2442 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
2444 * file-io.c : win32 build fix (ETXTBSY seems not found).
2446 2005-10-04 Martin Baulig <martin@ximian.com>
2449 (mono_image_get_methodspec_token): Make the cache actually work;
2452 2005-10-04 Martin Baulig <martin@ximian.com>
2454 * class.c (mono_class_name_from_token): Removed the unneccessary
2455 `MonoGenericContext *' argument.
2457 2005-10-04 Martin Baulig <martin@ximian.com>
2460 (method_from_methodspec): Make the caching work again; fixes the
2461 performance regression from #76262.
2463 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2467 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
2468 GetFileSystemEntries that performs the same work but without going
2469 into io-layer, locking, etc.
2471 2005-09-30 Zoltan Varga <vargaz@gmail.com>
2473 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
2474 ThreadState_Stopped as well. Fixes #76047.
2476 2005-09-29 Martin Baulig <martin@ximian.com>
2479 (inflate_generic_context): If the new context has a `gmethod', set
2480 its `container' that that gmethod's `container'.
2483 (mono_metadata_parse_generic_param): Simplify things;
2484 `generic_container = generic_context->container;' is just fine.
2486 * loader.c (method_from_methodspec): Code cleanups.
2488 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
2490 * decimal.c: fix warning (and let gcc generate correct
2491 code on ARM with optimizations).
2493 2005-09-28 Martin Baulig <martin@ximian.com>
2496 (method_from_memberref): Added `MonoGenericContext *class_context'
2497 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
2498 (method_from_methodspec): If we're a memberref, use the enclosing
2499 context when parsing its parent. Fixes #76262; see gtest-206.cs.
2501 2005-09-28 Martin Baulig <martin@ximian.com>
2503 * object.c (mono_runtime_invoke_array): Added support for
2504 MONO_TYPE_GENERICINST; fixes #75917.
2506 2005-09-27 Martin Baulig <martin@ximian.com>
2508 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
2509 `k->byval_arg.type' to determine the actual type.
2511 * loader.c (method_from_methodspec): Removed some hacks.
2513 2005-09-27 Ben Maurer <bmaurer@ximian.com>
2515 * class-internals.h (mono_field_is_deleted): Do the test for
2516 rtspecialname before we check the actual name of the field. This
2517 prevents us from dereferencing a pointer into the string table,
2518 saving us from accessing a few pages
2520 * *.c: Replace the use of {Enter,Leave}CriticalSection with
2521 macros. This will allow a deadlock debugger to easily be plugged
2524 2005-09-27 Martin Baulig <martin@ximian.com>
2526 * loader.c (method_from_methodspec): Create a "signature"
2527 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
2529 2005-09-27 Martin Baulig <martin@ximian.com>
2532 (inflate_generic_class): Correctly set the new context's
2536 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
2537 instead of a `MonoGenericContext *'.
2538 (mono_method_signature_full): Take a `MonoGenericContainer *'
2539 instead of a `MonoGenericContext *'.
2542 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
2543 instead of a `MonoGenericContext *'.
2544 (mono_metadata_parse_method_signature_full): Likewise.
2546 2005-09-26 Martin Baulig <martin@ximian.com>
2549 (mono_class_from_generic_parameter): Set `klass->generic_container'
2550 (mono_class_from_generic_parameter): Likewise.
2551 (mono_bounded_array_class_get): We inherit the generic container
2552 from the element class.
2555 (find_method, find_method_in_class): Take a `MonoGenericContext *'
2556 argument rather than computing it here.
2557 (method_from_memberref): Correctly set the generic context before
2558 parsing the signature. Fixes #75681.
2560 2005-09-26 Zoltan Varga <vargaz@gmail.com>
2562 * object.c (mono_class_has_special_static_fields): Fix warnings.
2564 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2566 * assembly.c: Add parse_public_key function, to
2567 par the public keys. Also added mono_assembly_name_parse_full,
2568 to define it the parsed key should be freed or not.
2569 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
2570 to parse a long format assembly name.
2571 * metadata-internals.h: Keep mono_assembly_name_parse_full as
2572 private, since calling it to preserve the key requires
2573 freeing it manually.
2575 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
2577 * locales.c : removed HAVE_ICU part.
2579 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
2581 * object.c (mono_class_create_runtime_vtable): Avoid calling
2582 field_is_special_static if the klass has no special static fields.
2584 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
2585 (MonoCachedClassInfo): Likewise.
2587 * object.c (mono_class_has_special_static_fields): New helper function.
2589 2005-09-23 Zoltan Varga <vargaz@gmail.com>
2591 * class.c (mono_class_create_from_typedef): Don't call
2592 interfaces_from_typedef_full for enums.
2593 (mono_class_create_from_typedef): Compute the base types of enums directly
2594 without calling mono_class_setup_fields ().
2595 (mono_class_find_enum_basetype): New helper function.
2597 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
2598 one place inside the string heap.
2600 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
2602 * class.c: locking fixes, code cleanups, some docs added.
2603 Allocate some data structures in the image mempool.
2605 2005-09-23 Zoltan Varga <vargaz@gmail.com>
2607 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2610 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
2612 * class-internals.h, class.c, reflection.c: reduce memory taken by
2615 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
2617 * metadata.c, metadata.h, loader.h: documentation updates, code and
2620 2005-09-23 Zoltan Varga <vargaz@gmail.com>
2622 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2625 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
2626 page faults caused by the runtime while reading metadata.
2628 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2630 * socket-io.c: the field names were changed 3 months ago and no one
2631 realized until bug #76077 got filed!
2633 2005-09-20 Martin Baulig <martin@ximian.com>
2635 * icall.c (assembly_icalls): Removed some unused debugger icalls.
2637 2005-09-20 Martin Baulig <martin@ximian.com>
2639 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
2640 write the rank into the class entry.
2642 2005-09-20 Martin Baulig <martin@ximian.com>
2644 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
2646 2005-09-19 Zoltan Varga <vargaz@gmail.com>
2648 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2650 * icall.c (custom_attrs_defined_internal): New icall.
2652 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
2654 (mono_custom_attrs_construct_by_type): New helper function.
2656 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
2658 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
2659 terminate the resulting string. Fixes #76123.
2661 2005-09-16 Martin Baulig <martin@ximian.com>
2664 (mono_debug_add_method): Ignore inflated methods for the moment.
2666 2005-09-14 Martin Baulig <martin@ximian.com>
2668 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
2670 2005-09-13 Zoltan Varga <vargaz@gmail.com>
2672 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
2673 return a success/failure indication.
2674 (mono_metadata_interfaces_from_typedef_full): Ditto.
2675 (get_constraints): Ditto.
2677 2005-09-12 Zoltan Varga <vargaz@gmail.com>
2679 * marshal.c (emit_marshal_array): Fix handling of null arrays.
2681 * marshal.c (emit_marshal_array): Add support for returning string
2682 arrays from delegates. Fixes #76063.
2684 * marshal.c: Use the emit_ldloc/stloc macros where possible.
2686 2005-09-11 Zoltan Varga <vargaz@gmail.com>
2688 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
2691 2005-09-09 Zoltan Varga <vargaz@gmail.com>
2693 * reflection.c icall.c: Fix after mono_get_exception_type_load
2696 * assembly.c (mono_assembly_get_assemblyref): New helper function.
2697 (mono_assembly_load_reference): Use the new helper.
2699 * class-internals.h (MonoLoaderError): New structure containing
2700 information about type loading errors.
2702 * class-internals.h loader.c: Add APIs to store per-thread loader
2705 * loader.c class.c: Set the loader error if needed.
2707 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
2709 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
2711 * decimal.c: fixed to handle the broken ARM fp format.
2713 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
2715 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
2718 2005-09-06 Martin Baulig <martin@ximian.com>
2720 * domain.c (supported_runtimes): Added v2.0.50727.
2722 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
2724 * culture-info.h: reduce the size of some structures.
2726 2005-09-05 Martin Baulig <martin@ximian.com>
2728 Reflect latest API changes in the August CTP.
2731 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
2732 ("MonoType.HasGenericArguments"): Removed.
2733 ("MonoMethod.BindGenericParameters"): Renamed to
2734 "MakeGenericMethod".
2735 ("MethodBuilder.BindGenericParameters"): Renamed to
2736 "MakeGenericMethod".
2738 2005-09-05 Martin Baulig <martin@ximian.com>
2740 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
2742 2005-09-05 Martin Baulig <martin@ximian.com>
2744 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2746 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
2747 generic_container is non-NULL.
2749 2005-09-05 Martin Baulig <martin@ximian.com>
2751 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2753 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
2755 2005-08-29 Michal Moskal <malekith@nemerle.org>
2757 * reflection.c (encode_locals,
2758 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
2759 for large generic types.
2761 2005-09-05 Martin Baulig <martin@ximian.com>
2763 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2765 * class.c (mono_dup_array_type): New public method.
2766 (mono_metadata_signature_deep_dup): New public method.
2767 (dup_type): Correctly duplicate array and function types.
2769 2005-09-05 Martin Baulig <martin@ximian.com>
2771 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2773 * reflection.c (get_default_param_value_blobs): Handle generic types
2774 and generic methods.
2776 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
2778 * class.c: Fixed error reporting (method/class were inversed) for
2779 inheritance demands.
2780 * security-manager.c|h: Added the AppDomain when calling the managed
2781 System.Security.SecurityManager.InheritanceDemand method.
2783 2005-09-01 Raja R Harinath <rharinath@novell.com>
2785 * reflection.c (encode_marshal_blob): 'marshaltype' and
2786 'marshaltyperef' are alternate sources for the custom marshaler
2789 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
2791 * class.c: fix creation of array classes with rank == 1
2792 (patch by Ankit Jain <jankit@novell.com>).
2794 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
2796 * object.c: fix check for creating the bound data for arrays vs
2799 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2801 * object.c: configuration file name is now based on the executable name,
2802 not the image name. Fixes bug #75931.
2804 2005-08-29 Zoltan Varga <vargaz@gmail.com>
2806 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
2807 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
2809 2005-08-25 Zoltan Varga <vargaz@gmail.com>
2811 * rand.c: Use wincrypt.h instead of WinCrypt.h.
2813 2005-08-24 Ankit Jain <jankit@novell.com>
2814 Raja R Harinath <rharinath@novell.com>
2816 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
2817 called by it recursively.
2818 (mono_class_init): Remove special case in pending_init handling, since it's
2819 superseded by the fix to mono_class_from_typeref.
2821 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
2823 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
2824 BROKEN_THREAD_START stuff.
2826 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
2828 * class-internals.h object.c: Add a new kind of trampoline called a delegate
2831 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
2833 * object.c (mono_delegate_ctor): Replace the original function address with
2834 a delegate trampoline.
2836 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
2838 * icall.c: add boolean argument to base64_to_byte_array and
2839 InternalFromBase64String to control whether a whitespace-only string
2840 is allowed (or should casue a FormatException to be thrown). We need
2841 this as the behavior has changed between MS.NET 1.x and 2.0, and we
2842 to match the MS behaviour in both profiles.
2843 * appdomain.c: Bump corlib version.
2845 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2847 This patch implements a big portion of publisher policy
2848 support, used to bind assembly versions and redirect
2849 one assembly from version A to version B.
2852 New GSList loaded_assembly_bindings, for storing the cached
2854 (assembly_binding_maps_name): New static function for checking if a
2855 assembly binding information maps an assembly name.
2856 (mono_assembly_binding_info_free): New function for freeing
2857 assembly binding information resources.
2858 (get_publisher_policy_info): New static function for retrieving
2859 assembly binding information from a MonoImage.
2860 (compare_versions): New static function for comparing an assembly
2861 binding information data and the version of an assembly name.
2862 (check_policy_versions): New static function for checking if an
2863 assembly binding info mapping an assembly name is valid for it.
2864 (mono_assembly_load_publisher_policy): New static function for
2865 loading the 'policy.major.minor.MyAssembly' image for an assembly
2866 with an assembly name 'aname'.
2867 (mono_assembly_bind_version): New static function for updating
2868 assembly redirection.
2869 (mono_assembly_apply_binding): New static function for applying
2871 (search_binding_loaded): New static function for searching
2872 loaded assembly binding infos in the cache domain.
2873 (mono_assembly_load_full): Don't apply assembly binding for
2874 reflection only assemblies.
2876 * metadata-internals.h: Add MonoAssemblyBindingInfo,
2877 which contains information about assembly binding. Also
2878 declare signature for mono_config_parse_publisher_policy ()
2879 function, used to retrieve pub policy info.
2882 (publisher_policy_start): New static function used to parse publisher
2883 policy config files.
2884 (publisher_policy_parser): New static MonoParseHandler containing
2885 the functions used when parsing config files.
2886 (mono_config_parse_publisher_policy): New function for parsing
2887 publisher policy files.
2889 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
2891 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
2893 * marshal.c (mono_delegate_free_ftnptr): Ditto.
2895 * object.c (mono_get_addr_from_ftnptr): New helper function.
2897 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
2899 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2901 2005-08-19 Dick Porter <dick@ximian.com>
2903 * threads.c, threads.h, appdomain.c, appdomain.h,
2904 profiler-private.h, monitor.c, object.c, object-internals.h,
2905 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
2906 store the thread ID, so it can hold a 64 bit value if needed.
2908 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
2910 * reflection.c (mono_reflection_create_dynamic_method): Store the
2911 handle class into the method references as well so ldtoken works in
2914 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
2917 2005-08-19 Ankit Jain <jankit@novell.com>
2920 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
2921 here rather than using the method signature of a arbitrary function
2922 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
2924 Hack done with Harinath.
2926 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2928 * threadpool.c: disable printing stack traces when we get a exception
2929 in a threadpool thread. I need to do more testing to figure out which
2930 cases actually print this. Fixes bug #75828.
2932 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2934 * icall.c: there might be ignored whitespace after the last '='. This
2935 fixes length computation and bug #75840.
2937 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
2939 * assembly.c (mono_assembly_load_full): Consider .exe extension as
2942 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
2945 * reflection.c (create_custom_attr_data): Ditto.
2947 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
2949 * locales.c, culture-info.h : removed RegionLCIDMap.
2950 * culture-info-tables.h : regenerated.
2952 2005-08-16 Martin Baulig <martin@ximian.com>
2954 * class.c (mono_type_get_name_recurse): Small fix.
2956 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
2958 * locales.c : indentation fixie.
2960 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
2962 * object-internals.h,
2966 icall.c : added RegionInfo table support.
2967 * culture-info-table.h : regenerated for region support.
2969 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
2971 * reflection.c (resolve_object): handle all kinds of MonoMethod
2972 including generic ones
2974 2005-08-12 Ankit Jain <jankit@novell.com>
2976 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
2977 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
2979 2005-09-12 Lluis Sanchez <lluis@ximian.com>
2981 * process.c: Don't close a thread handle when it's NULL. This is a
2982 workaround for bug #75733.
2984 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
2986 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
2988 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
2990 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
2992 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2994 * threadpool.c: if a work item in the thread pool has a callback that
2995 catches a exception, don't propagate it after invoking the callback.
2998 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
3000 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
3002 * class-internals.h (MonoCachedClassInfo): Add some new fields.
3004 * class.c (mono_class_init): Load field info lazily in the AOT case.
3006 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
3008 2005-08-03 Ankit Jain <jankit@novell.com>
3011 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
3012 PInvoke calling convention is 0.
3014 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
3016 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
3017 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
3019 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
3021 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
3022 to handle threads not started by the GC (patch by Michael Meeks
3023 <michael.meeks@novell.com>).
3025 2005-07-31 Kamil Skalski <nazgul@omega.pl>
3027 * reflection.c: Make buffer used in emitting types larger for some
3028 big generic types (patch by Michal Moskal).
3030 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
3032 * mono-debug.c: Fix some (not all) alignment problems.
3034 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3036 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
3037 Invoke mono_image_load_from_data_full passing the refonly
3041 (mono_assembly_open_from_bundle): Add the refonly argument,
3042 in order to pass it to other methods it calls to.
3043 (do_mono_assembly_open): Add the refonly argument, in order
3044 to pass it to other methods it calls to.
3045 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
3046 the refonly parameter to it.
3048 * image.c: Add loaded_images_refonly_hash and
3049 loaded_images_refonly_guid_hash to cache the reflection
3051 (mono_images_init): Initialize the hash tables used for
3052 caching the reflection only images.
3053 (load_modules): Invoke mono_image_open_full passing the refonly
3054 parameter to load the modules the correct way.
3055 (build_guid_table): Add the refonly argument, to re-build the
3057 (do_mono_image_open): Added the refonly argument, in order to
3058 define it for the loaded image.
3059 (mono_image_loaded_full): New function, which receives an
3060 additional parameter to look for the image in the refonly or
3061 non-refonly section.
3062 (mono_image_loaded): Updated, using mono_image_loaded_full.
3063 (mono_image_loaded_by_guid_full): The same case that happens
3064 with mono_image_loaded_full.
3065 (mono_image_loaded_by_guid): Likewise.
3066 (register_image): Use the ref_only variable inside MonoImage
3067 to decide in which hash table store the current image.
3068 (mono_image_open_from_data_full): Rename
3069 mono_image_open_from_data to mono_image_open_from_data_full,
3070 adding the refonly argument, to define the ref_only variable
3072 (mono_image_open_from_data): Return
3073 mono_image_open_from_data_full.
3074 (mono_image_open_full): Rename mono_image_open to
3075 mono_image_open_full, receiving the new refonly argument,
3076 to pass it to inner methods.
3077 (mono_pe_file_open): Update this function, to open
3078 a MonoImage as a non-refonly image.
3079 (mono_image_close): Use the refonly variable inside
3080 MonoImage to remove the image from the correct caches.
3082 * image.h: Add the signatures of mono_image_open_full,
3083 mono_image_open_from_data_full, mono_image_loaded_full,
3084 mono_image_loaded_by_guid_full.
3086 * metadata-internals.h: Add the ref_only field to
3089 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3091 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
3092 Fix the last behavior, which used to load the assemblies and
3093 extract MonoReflectionAssemblyName information, instead of
3094 extract it from the metadata tables. Needed for Reflection
3097 2005-07-29 Martin Baulig <martin@ximian.com>
3099 * mono-debug-debugger.c
3100 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
3104 (mono_debug_address_from_il_offset): Check whether we have
3105 debugging support before attempting to take the lock.
3106 (mono_debug_source_location_from_address): Likewise.
3107 (mono_debug_source_location_from_il_offset): Likewise.
3108 (mono_debug_il_offset_from_address): Likewise.
3109 (mono_debug_address_from_il_offset): Likewise.
3111 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
3113 * class.c (mono_class_from_name_case): Add support for dynamic images.
3116 * object.c (mono_class_compute_gc_descriptor): Add a workaround
3119 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
3121 * reflection.c (mono_method_get_object): Fix warning.
3123 2005-07-28 Martin Baulig <martin@ximian.com>
3126 (mono_debug_add_wrapper): Also write the wrapper type.
3128 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
3130 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
3132 * class.c (mono_class_init): Avoid reading nested classes if the AOT
3133 data indicates the class has none.
3135 2005-07-26 Ben Maurer <bmaurer@ximian.com>
3137 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
3138 loader lock with the debugger lock. Prevents deadlocks for beagle.
3140 Beagle can now run on an smp box for a weekend without any
3143 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
3145 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
3146 in a module. Fixes #75629.
3148 2005-07-26 Martin Baulig <martin@ximian.com>
3150 * mono-debug.c (mono_debug_add_wrapper): New static method.
3151 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
3152 interncall or a wrapper.
3154 * mono-debug.h (MonoDebugWrapperData): New public typedef.
3155 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
3156 (MONO_DEBUGGER_VERSION): Bump to 51.
3158 * mono-debug-debugger.c
3159 (mono_debugger_add_type): Removed this empty function.
3160 (mono_debugger_add_method): Likewise.
3162 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
3164 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
3165 before accessing method->slot.
3167 2005-07-21 Jb Evain <jbevain@gmail.com>
3169 * reflection.c (method_encode_clauses/class): Handle filters clauses.
3172 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
3174 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
3177 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
3179 * image.h image.c: Add mono_image_get_guid () API function.
3181 2005-07-19 Ben Maurer <bmaurer@ximian.com>
3183 There were issues when multiple threads tried to load
3184 assemblies. A deadlock was created between assemblies_mutex and
3185 mono_domain_assemblies_lock. This fixes the issue by making the
3186 assembly ref counting be lock free. See bug 75586.
3188 * image.c (mono_image_close): The add ref function here was using
3189 Interlocked operations while the unref was using a mutex and a
3190 --. I don't think this was ever a bug that would be exposed in a
3191 non-pendantic way (ie, by an embedder doing a ref on one thread
3192 and an unref on another), but for the sake of correctness, this is
3195 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
3196 (mono_assembly_load_reference): Call mono_assembly_addref rather
3197 than touching the refcount ourselves.
3198 (mono_assembly_close): Use InterlockedDecrement to unref the
3199 assembly. Don't acquire the lock unless it is actually needed.
3201 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
3203 * class.c (mono_class_layout_fields): Fix calculation of has_references
3206 2005-07-12 Martin Baulig <martin@ximian.com>
3208 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3211 (mono_type_hash): Provide better hashing for generic instances.
3212 (mono_generic_inst_hash): Improve hashing.
3213 (mono_generic_class_hash): Likewise.
3215 * reflection.c (mymono_metadata_type_hash): Improve hashing for
3218 2005-07-12 Martin Baulig <martin@ximian.com>
3220 * reflection.c (mono_reflection_create_runtime_class): Remove the
3221 hack for generic type definitions and non-`Run' assemblies.
3222 (mono_reflection_bind_generic_parameters): Also use
3223 `klass->wastypebuilder' to check for TypeBuilders.
3225 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
3227 * class.c (mono_class_layout_fields): Fix calculation of has_references
3230 * class.c (inflate_generic_class): Fix a leak.
3231 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
3234 2005-07-11 Martin Baulig <martin@ximian.com>
3236 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
3239 2005-07-11 Martin Baulig <martin@ximian.com>
3241 * loader.c (find_method): Also lookup in
3242 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
3244 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3246 * appdomain.c (mono_domain_unload): Don't free the error message
3247 before passing it to mono_get_exception_...
3249 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
3251 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
3253 * threads.c: try to better guess an available RT signal (bug #75387).
3255 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3257 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
3260 2005-07-07 Martin Baulig <martin@ximian.com>
3262 * class.c (mono_type_get_name_full): Return NULL for
3263 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
3266 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3268 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
3269 exit the appdomain as well being aborted.
3271 * threadpool.c: Create all threadpool threads inside the root appdomain, and
3272 change back to the root domain after calling managed code. This enables
3273 appdomains using threadpools to be unloaded.
3275 2005-07-07 Martin Baulig <martin@ximian.com>
3278 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
3279 into `MonoDynamicGenericClass' since we only need it for dynamic
3282 * reflection.c (mono_class_bind_generic_parameters): We don't need
3283 to compute the `parent' here.
3285 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
3287 * culture-info-table.h : regenerated.
3289 2005-07-06 Martin Baulig <martin@ximian.com>
3292 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
3294 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
3296 2005-07-06 Martin Baulig <martin@ximian.com>
3298 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
3299 we're doing a signature-only comparision; fixes #74945.
3301 2005-07-06 Martin Baulig <martin@ximian.com>
3303 * class-internals.h (MonoGenericClass): Moved some things out into
3304 a new `MonoInflatedGenericClass' type.
3305 (MonoInflatedGenericClass): New type; the `klass' of a
3306 `MonoGenericClass' is now computed lazyly in
3307 mono_get_inflated_generic_class().
3309 * class.c (mono_get_inflated_generic_class): New public function.
3310 (mono_class_inflate_generic_method): Removed the unused
3311 `MonoClass *' argument.
3312 (setup_generic_vtable): Don't call mono_get_inflated_method() on
3314 (mono_class_create_generic): Make this static and merge it with
3315 mono_class_create_generic_2(); we're now called automatically from
3316 mono_get_inflated_generic_class().
3318 * loader.c (mono_method_signature): Call
3319 mono_get_inflated_method() here.
3321 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
3323 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
3324 type of fields with RVA.
3326 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
3327 for this pseudo class.
3328 (my_mono_class_from_generic_parameter): Likewise.
3329 (mono_class_init): Allow interfaces to have cctors.
3331 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
3333 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
3334 lazily for AOT methods.
3336 2005-07-05 Martin Baulig <martin@ximian.com>
3338 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
3339 returns FALSE for a successful match, not TRUE.
3341 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
3343 * loader.c (mono_method_get_index): Optimize this a bit.
3345 2005-07-04 Martin Baulig <martin@ximian.com>
3348 (class_compute_field_layout): Move the check for generic type
3349 definitions into mono_class_layout_fields(). Fixes #74684.
3350 (mono_class_from_generic_parameter): Correctly compute
3351 `klass->parent'; fixes #75457.
3353 * reflection.c (register_assembly, register_module): Make sure
3354 `domain->rejobject_hash' is already created.
3356 2005-07-02 Martin Baulig <martin@ximian.com>
3359 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
3360 `MonoDynamicGenericClass'.
3362 2005-07-01 Lluis Sanchez <lluis@ximian.com>
3364 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
3365 returned by a field getter is null, since null is a valid value.
3367 2005-07-01 Martin Baulig <martin@ximian.com>
3369 * reflection.c (mono_reflection_generic_class_initialize): Update
3370 the `dgclass->fields [i].parent' to the correct class.
3371 (mono_image_get_fieldref_token): Use the declaring type, not the
3374 2005-07-01 Martin Baulig <martin@ximian.com>
3376 * loader.c (find_method): Also look in the interfaces; fixes #75429.
3378 2005-06-30 Ben Maurer <bmaurer@ximian.com>
3380 * threads.c (thread_cleanup): assert that thread != NULL
3381 (wait_for_tids_or_state_change): We were using the wrong variable
3382 when accessing wait->threads. `i' was always out of the bounds of
3385 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3387 * loader.c: map user32 and kernel32 to libMonoSupportW
3389 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
3391 * appdomain.c (unload_thread_main): Mark this as WINAPI.
3393 2005-06-28 Martin Baulig <martin@ximian.com>
3395 * loader.c (method_from_methodspec): Fix #75334.
3397 2005-06-28 Martin Baulig <martin@ximian.com>
3399 Fix #74953 - Arrays now implement the generic IList<T> interface
3400 on the 2.0 platform.
3402 * class-internals.h (MonoDefaults): Added `generic_array_class'.
3404 * reflection.c (mono_class_bind_generic_parameters): New public
3405 function; similar to mono_reflection_bind_generic_parameters(),
3406 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
3408 * domain.c (mono_init_internal): Try to initialize.
3409 `mono_defaults.generic_array_class' here; this'll only succeed if
3410 we're using the 2.0 corlib.
3413 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
3414 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
3415 (mono_lookup_internal_call): Added support for nested classes.
3418 (mono_get_method_from_token): Set `result->signature->pinvoke' if
3419 we're an interncall and have generic arguments.
3422 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
3423 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
3424 instance of System.Array.InternalArray<T> for arrays, so they
3425 implement the generic IList<T> interface.
3427 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
3429 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
3430 (chastamar@yahoo.com). Fixes #75374.
3432 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
3434 * culture-info-table.h: regenerated.
3436 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3438 * icall.c: handle spaces correctly for base64 strings.
3440 2005-06-26 Ben Maurer <bmaurer@ximian.com>
3442 * *.c: Kill some warnings.
3444 2005-06-23 Duncan Mak <duncan@novell.com>
3446 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
3447 that this builds on Solaris 10 (x86).
3449 2005-06-23 Martin Baulig <martin@ximian.com>
3452 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
3453 generic type definitions.
3455 2005-06-23 Martin Baulig <martin@ximian.com>
3459 * metadata.c (mono_class_get_overrides): Renamed to
3460 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
3461 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
3462 pass it to mono_get_method_full().
3464 2005-06-22 Ben Maurer <bmaurer@ximian.com>
3466 * reflection.c (mono_reflection_create_runtime_class): take the
3467 mono_domain_lock in this method. Prevents deadlocks
3469 2005-06-22 Martin Baulig <martin@ximian.com>
3471 * loader.c (method_from_methodspec): Fix #75330.
3473 2005-06-22 Martin Baulig <martin@ximian.com>
3475 * reflection.c (type_get_qualified_name): Use
3476 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
3477 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
3478 argument; use it if we don't have an assembly name.
3480 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
3482 * object.c: In mono_message_init, set "copy out" flag for in
3483 parameters with the [Out] flag.
3485 2005-06-21 Martin Baulig <martin@ximian.com>
3488 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
3491 2005-06-21 Martin Baulig <martin@ximian.com>
3493 * class.c (mono_class_init): Don't initialize `class->fields' for
3494 generic instances since they're initialized again in
3495 compute_field_layout().
3496 (compute_field_layout): Set the field's `generic_info' here; fix
3499 2005-06-21 Martin Baulig <martin@ximian.com>
3502 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
3504 * metadata.c (mono_metadata_generic_method_equal): Also
3505 distinguish the `generic_class'; fixes #75334.
3507 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3511 * domain-internals.h:
3512 * reflection.c: 'domain_assemblies' field is now protected by its own
3513 lock. Don't call into managed code to run the AssemblyLoad event if we
3514 now there are no registered delegates for it.
3516 2005-06-20 Martin Baulig <martin@ximian.com>
3518 * class.c (mono_class_is_assignable_from): Use a custom version of
3519 mono_class_has_parent() to make things work for generic instances;
3522 2005-06-20 Martin Baulig <martin@ximian.com>
3524 * loader.c (method_from_methodspec): Apply a patch from
3525 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
3527 2005-06-20 Martin Baulig <martin@ximian.com>
3529 * class.c (mono_class_init): Reverted Zoltan's last change; it
3532 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
3534 * threads.c (wait_for_tids_or_state_change): Add missing locking.
3536 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3538 * socket-io.c: fix the index in the socket array for writable/error
3539 sockets. Fixes bug #75306.
3541 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
3543 * class.c (mono_class_init): Allow interfaces to have static ctors.
3545 2005-06-17 Martin Baulig <martin@ximian.com>
3547 * loader.c (method_from_methodspec): Use `context->container' when
3548 parsing the `gmethod->inst'.
3550 2005-06-17 Martin Baulig <martin@ximian.com>
3552 * class.c (mono_type_get_name_recurse): Don't add the assembly
3553 name for type arguments.
3555 2005-06-15 Martin Baulig <martin@ximian.com>
3557 * reflection.c (mono_image_get_inflated_method_token): Encode
3558 correct klass; fixes #75260.
3560 2005-06-13 Michal Moskal <malekith@nemerle.org>
3562 * icall.c: Make GetCorrespondingMethod/Constructor take
3563 MonoReflectionMethod method not MonoMethod. Removed
3564 MonoType.GetCorrespondingField, and make
3565 MonoGenericType.GetCorrespondingField take name not
3568 2005-06-13 Michal Moskal <malekith@nemerle.org>
3570 * reflection.c (field_encode_signature, encode_locals):
3571 Make sizes of buffers for types larger (for big generic types).
3572 (create_generic_typespec,
3573 mono_reflection_sighelper_get_signature_local,
3574 mono_reflection_sighelper_get_signature_field):
3575 Add asserts for too small buffers.
3577 2005-06-15 Martin Baulig <martin@ximian.com>
3579 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
3580 if our parent is not a dynamic type.
3582 2005-06-15 Martin Baulig <martin@ximian.com>
3584 * class-internals.h (MonoTypeNameFormat): New enum.
3587 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
3588 (mono_type_get_full_name): Removed.
3589 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
3590 argument instead of the boolean's.
3592 * icall.c (ves_icall_System_MonoType_getFullName):
3593 Added `gboolean assembly_qualified'.
3596 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
3598 * reflection.c (mono_reflection_parse_type): Parse the new type
3601 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3603 * icall.c: no need to convert from utf16 to utf8 and then back again
3604 after the call to GetLogicalDrives.
3606 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3608 * icall.c: frombase64. Fix problems exposed by new tests.
3610 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3612 * icall.c: added internal calls for converting char [] and strings in
3613 base64 into byte [].
3615 2005-06-10 Martin Baulig <martin@ximian.com>
3617 * class.c (mono_class_create_generic_2): Read the nested classes
3618 from the metadata rather than from `gklass->nested_classes' since
3619 `gklass' might not be initialized yet.
3621 2005-06-09 Duncan Mak <duncan@novell.com>
3623 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
3624 all public headers. Fixes #74919.
3626 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
3628 * domain.c: The key for proxy_vtable_hash is now a pointer
3629 array. Added new GHashFunc and GCompareFunc functions for this.
3631 * class.h: The list of interfaces in MonoRemoteClass is known in
3632 advance and can't grow (we create a new MonoRemoteClass if needed),
3633 so now the interface array can be allocated together with
3636 * object.c: Added a new method create_remote_class_key.
3637 Fixed mono_remote_class so it does not depend on
3638 mono_upgrade_remote_class.
3639 Removed extend_interface_array.
3640 Added new method clone_remote_class(), which makes a copy of a remote
3641 class and adds a new interface or class to it.
3642 mono_upgrade_remote_class() now creates a new remote class (or gets
3643 it from the cache) if an vtable upgrade is needed. In this way
3644 we make sure that other objects sharing the same remote class
3645 don't get the new vtable with unwanted interfaces.
3647 * object-internals.h:
3648 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
3650 * marshal.c: Track changes in mono_upgrade_remote_class().
3652 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
3653 * icall.c: Add runtime methods for obtaining members of inflated
3654 class, which were created from supplied non-inflated members. It
3655 is used in internal Get{Method,Constructor,Field} methods in
3658 2005-06-09 Martin Baulig <martin@ximian.com>
3661 (mono_reflection_bind_generic_method_parameters): Fix #75169.
3663 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3664 * reflection.c (mono_image_basic_init): Define
3665 Version in MonoDynamicAssembly.
3667 2005-06-08 Martin Baulig <martin@ximian.com>
3672 (mono_method_signature_full): New public method; takes a
3673 `MonoGenericContext *'.
3674 (find_method): Use mono_method_signature_full() and pass the
3675 klass'es context to it.
3677 * class.c (mono_class_is_inflated_method): Use
3678 mono_method_signature_full() and pass the context to it.
3680 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
3682 * object.c: add proper locking in mono_remote_class_vtable(),
3683 fixes possible memory corruption.
3685 2005-06-08 Michael Meeks <michael.meeks@novell.com>
3687 * marshal.c (mono_remoting_marshal_init): set
3688 initialized after initialization.
3690 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
3694 2005-06-06 Michael Meeks <michael.meeks@novell.com>
3696 * object.c (extend_interface_array): fix really silly
3697 memory corrupting / comparison bug.
3699 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3701 * reflection.c: Functions added to support the creation
3702 of CustomAttributeData, which includes Attribute data
3703 used by ReflectionOnly methods.
3705 * reflection.h: mono_reflection_get_custom_attrs_data and
3706 mono_custom_attrs_data_construct added (functions exposed).
3708 * icall.c: Added mono_reflection_get_custom_attrs_data
3711 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
3713 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
3716 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
3718 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
3720 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
3721 dynamic DllImportAttribute.
3723 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
3724 dynamic DllImportAttribute.
3726 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
3729 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3731 * threads.c: avoid segfault when an unstarted thread is aborted.
3733 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
3735 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
3736 Returns the name and version of the runtime for reporting.
3738 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3740 * appdomain.c: bump corlib version.
3741 * object-internals.h: new field in MonoReflectionAssembly.
3743 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3745 * object-internals.h: Carlos forgot to add this field.
3747 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3749 * icall.c: Added create_version to create instances
3750 of Version of MonoReflectionAssemblyName. This change helps
3751 the AssemblyName tests to keep running fine.
3753 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
3755 * object.c (mono_method_return_message_restore): A somehow less
3756 intrusive fix for #75138.
3758 2005-06-03 Raja R Harinath <rharinath@novell.com>
3760 * object.c (mono_method_return_message_restore): Fix computation
3761 of expected number of out args.
3763 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
3765 * reflection.c (mono_image_get_method_info): Fix the case when the
3768 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
3770 * object.c: Added missing null check in
3771 mono_method_return_message_restore.
3773 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
3775 * reflection.c (mono_image_get_method_info): Handle the case when
3778 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
3780 * object.c: When creating the vtable for a proxy, take into account
3781 all inherited interfaces, not only the ones registered in
3782 iclass->interfaces. This fixs bug #74996.
3783 Also, in mono_method_return_message_restore, verify that the array
3784 of out args has the expected lengh.
3786 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3788 * socket-io.c: update the timeout in Poll when the call is interrupte.
3790 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3792 * socket-io.c: support abort/suspend in Select_internal after last
3795 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3797 * threadpool.c: remove warning.
3799 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3802 * socket-io.[ch]: Select_internal uses poll() now when available, thus
3803 removing the 1024 limit from select(). Runtime part of the fix for
3806 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3808 * socket-io.c: when resolving the addresses for the same
3809 host returned by gethostname(), get the local IPs from the interface
3810 list. Loopback addresses are discarded if the are interfaces up with
3811 non-loopback ones. Fixes bug #63265.
3813 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
3815 * appdomain.c, verify.c, object-internals.h, reflection.c:
3816 bumped corlib number to 36, and added new extra_flags field
3817 to ReflectionMethodBuilder and friends. Fixes #75060.
3819 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
3821 * gc.c: register a new weak link only if the object is non-null
3824 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
3826 * culture-info.h : short time pattern too.
3828 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
3830 * culture-info.h : expand long time pattern string length.
3832 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
3834 * culture-info-table.h : update (more French date format; #72788).
3836 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
3838 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
3839 the method is static. Fixes #75029.
3841 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
3843 * reflection.c: Update the table_idx field of method builders after
3844 saving the module, since it can change. This is a workaround for
3847 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
3849 * culture-info-table.h : update (additional French date format).
3851 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
3853 * icall.c (ves_icall_type_Equals): Revert last change.
3855 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
3857 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
3859 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
3861 * class-internals.h: Added executioncontext_class field to
3862 MonoDefaults structure.
3863 * domain.c: Cache System.Threading.ExecutionContext class in
3865 * object.c: Capture the ExecutionContext for asynchroneous calls in
3866 mono_async_result_new.
3867 * object-internals.h: Added execution_context and original_context
3868 fields to MonoAsyncResult. Added execution_context to MonoThread.
3869 * security-manager.c|.h: Added mono_get_context_capture_method to
3870 return the capture method (if required by the security manager or by
3871 the framework version used).
3872 * threadpool.c: Apply capture (if present) ExecutionContext in
3873 mono_async_invoke and revert to original context after it completes.
3875 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
3877 * culture-info-table.h : updated (real hacky solution for zh-CHT).
3879 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
3881 * culture-info-table.h : zh-CHT related workaround.
3883 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
3885 * marshal.c (emit_marshal_custom): Add some error checking and call the
3886 methods in the ICustomMarshaler interface. Fixes #74875.
3888 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
3889 native->managed wrappers.
3891 2005-05-12 Martin Baulig <martin@ximian.com>
3893 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
3894 here and use the loader lock.
3896 * mono-debug.c: Properly lock when the debugger is not attached.
3897 (mono_debug_init): Release the initial lock if we're not running
3900 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
3902 * marshal.c (emit_marshal_custom): Pass through NULL values without
3903 calling the custom marshalling routines.
3905 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
3906 conversion in structures. Fixes #74882.
3908 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
3910 * culture-info-table.h : zh-* cultures were missing.
3912 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
3914 * threads.c: Added a new event background_change_event which is signaled
3915 when a thread changes its background mode.
3916 Moved here several checks previously done in managed code. The checks
3917 require the thread lock, and using the thread lock in managed code
3918 can result in deadlocks.
3919 Merged Start_internal and Thread_internal into a single method. Now
3920 Thread_internal does all work of creating and starting a thread.
3921 Added icalls for setting and getting the state of the object. Moved from
3922 managed code to avoid locking there.
3923 Added wait_for_tids_or_state_change() which is called instad of
3924 wait_for_tids when waiting for non-backround threads to end. This method
3925 will return if one of the threads ends or the background_change_event
3927 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
3928 the background mode. This method signals the background_change_event
3931 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
3932 removed Start_internal.
3934 2005-05-11 Martin Baulig <martin@ximian.com>
3936 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
3937 to order of some fields to get proper alignment on 64-bit machines.
3939 2005-05-11 Martin Baulig <martin@ximian.com>
3941 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
3942 changes as they're broken and completely fuck up the debugger.
3944 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
3946 2005-05-10 Martin Baulig <martin@ximian.com>
3948 * reflection.c (mono_reflection_generic_class_initialize): Don't
3949 call mono_class_setup_parent() here.
3951 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3953 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
3954 send/receive timeout use an integer in milliseconds. We were using a
3957 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3960 (internal_get_cultures): reserve the first slot of the array for the
3961 InvariantCulture, which will be filled in managed code.
3963 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
3965 * reflection.c (mono_image_fill_module_table): Initialize the
3966 GENERATION field as well.
3968 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3970 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
3971 Monitor.Enter on the object.
3973 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
3975 * threads.c: Enable the wait for running threads when exiting.
3976 * icall.c: Suspend all threads before exiting.
3978 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
3980 * assembly.c (mono_assembly_load_reference): Fix warning.
3982 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3984 * threadpool.c: changed the default number of threads per cpu. From now
3985 on, the default will be 20 + (5 * number of cpus) instead of 50.
3987 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
3989 * loader.c (mono_method_get_signature_full): Add locking here.
3991 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
3993 * appdomain.c: Moved methods for parsing and freeing assembly
3994 names to assembly.c.
3995 * assembly.c, domain-internals.h: Created public methods for parsing
3996 assembly names. Fixed mono_assembly_load_with_partial_name:
3997 it now finds the best match, taking into account the version,
3998 token and culture specified in the partial name. Also return
3999 the latest version if no version information is specified.
4001 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
4003 * threadpool.c: replace check for SocketAsyncCall class.
4005 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4007 * threadpool-internals.h:
4008 * Makefile.am: added threadpool-internals.h
4010 * threadpool.c: call mono_unhandled_exception on exceptions not handled
4011 that happen in threadpool threads (tested on MS).
4012 (mono_thread_pool_remove_socket): new function that dispatch any pending
4013 AIO call on a socket that is closing. By now only epoll really needs it,
4014 as select/poll wake up when the socket closes.
4017 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
4019 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
4021 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
4023 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
4025 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
4027 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
4029 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
4030 has an abort request, convert it into a suspend request.
4032 2005-04-30 Ben Maurer <bmaurer@ximian.com>
4034 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
4035 warning for the usage of `UnmanagedFunctionPointerAttribute' which
4036 is not supported yet.
4038 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4040 * image.c: register assemblies loaded from data (bundles) in the loaded
4041 assemblies hash. Fixes bug #74772.
4043 2005-04-29 Martin Baulig <martin@ximian.com>
4045 * class.c (mono_type_get_name_recurse): Update to the new naming
4046 schema from the latest .NET 2.x beta2.
4047 (mono_class_setup_vtable_general): If we're a generic instance,
4048 copy the vtable from our generic type definition and inflate all
4051 * loader.c (find_method): Update to the new naming schema from the
4052 latest .NET 2.x beta2.
4054 2005-04-29 Raja R Harinath <harinath@gmail.com>
4056 * class.c (mono_class_init): Add a mono_loader_unlock to the
4059 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
4061 * icall.c (ves_icall_System_Environment_Exit): Remove the
4062 suspend_all_other_threads () call for the time being, since it can hang.
4064 * threads.c (mono_thread_manage): Similarly, disable the waiting for
4065 the background threads to exit, since it can also hang.
4067 * class.c (mono_class_init): Applied patch from Ankit Jain
4068 (radical@gmail.com). Avoid pending init errors when a field refers
4069 to a nested class using a typeref. Fixes #74734.
4071 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
4072 this for dynamic modules.
4074 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4076 * threads.c: don't wait for threads that are in the process of aborting
4077 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
4078 and waiting for background threads to finish. This makes xsp and
4079 mod-mono-server exit without random length delays and/or hangs.
4081 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4083 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
4085 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
4087 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
4088 dynamic types to prevent infinite loops. Fixes #74727.
4090 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
4091 ..._is_assignable_to.
4093 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
4095 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
4097 2005-04-25 Martin Baulig <martin@ximian.com>
4099 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
4102 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
4104 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
4106 * reflection.c (build_compressed_metadata): Set metadata header
4109 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
4111 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
4112 number into an integral and a decimal part. Fixes #70473.
4114 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
4116 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
4118 * culture-info-table.h : reflected the latest locale-builder output.
4120 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4122 * threadpool.c: check for SuspendRequested too when deciding if
4123 mono_thread_interruption_checkpoint should be called.
4125 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4127 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
4128 * threads.c: remove interruption_mutex and use Interlocked instead. When
4129 suspending all the threads, wait for all the suspended events at once.
4130 If we're shutting down and get an APC that is going to be queued,
4131 call mono_thread_execute_interruption immediately, as the thread might
4132 be sleeping on a pthread condition or mutex.
4134 * icall.c: call mono_runtime_set_shutting_down before suspending the
4137 Fixes bug #74693. And now xsp is happier when exiting.
4139 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
4141 * loader.c (mono_stack_walk): Fix #74690.
4143 2005-04-22 Martin Baulig <martin@ximian.com>
4145 * mono-debug.h (MonoDebugMethodJitInfo): Added
4146 `MonoDebugMethodJitInfo *jit'.
4148 * mono-debug.c (mono_debug_read_method): Cache the
4149 MonoDebugMethodJitInfo in `address->jit'.
4150 (mono_debug_free_method_jit_info): New public method.
4152 2005-04-22 Martin Baulig <martin@ximian.com>
4154 * class.c (mono_class_is_assignable_from): Disallow
4155 type parameter -> interface.
4157 2005-04-21 Dick Porter <dick@ximian.com>
4159 * threads.c (mono_thread_create): Turn an assertion into an error.
4161 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
4163 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
4165 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
4166 Fix some gcc 4.0 warnings.
4168 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
4170 * file-io.c: fix alt dir separator char on unix systems
4171 and cleanup (fixes bug #71214).
4173 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
4175 * marshal.c: Use CALLVIRT instead of CALL when dispatching
4176 a call to a remote domain, since the method may be an
4177 interface method in the client domain. This fixes bug #74192.
4179 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4181 * threadpool.c: recv/send are now performed before going back to managed
4182 code to save one transition.
4184 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4186 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
4188 * metadata/threadpool.c: removed hack to workaround the bug above.
4192 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
4194 * reflection.c reflection.h: Fix handling of parameter defaults in
4195 dynamic methods. Also fixes handling of parameter attributes.
4198 * mono-debug.c (mono_debug_close_image): Fix warning.
4200 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4202 * socket-io.h: replaced old unused field with new 'blocking'.
4203 * threadpool.c: restore socket blocking state on windows(tm).
4205 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
4207 * icall.c: don't return the codebase in the AssemblyName[] returned by
4208 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
4209 * object-internals.h: Removed FIXME (fields were presents) and fixed
4210 versioncompat declaration.
4212 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4214 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
4215 not closed, so don't cleanup when it happens.
4217 2005-04-13 Chris Toshok <toshok@ximian.com>
4219 * mono-debug-debugger.h: change prototype for
4220 mono_debugger_lookup_type.
4222 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
4223 this function, although it should probably be named
4224 mono_debugger_init_type.
4226 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4228 * threadpool.c: fix non-AIO case.
4230 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
4232 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
4233 the built-in profiler to measure just JIT compilation times.
4235 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4237 * threadpool.c: the epollfd might be closed by another thread at
4238 any time, so ignore EBADF at treat it as a "we're closing" sign.
4240 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4242 * threadpool.c: release the semaphores with a count equals to the number
4243 of working threads in both IO and regular pools. Fixed typo that messed
4244 up the count of IO pool threads. Don't initialize the pipe handles if
4247 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4249 * threadpool.c: some systems don't like a NULL when deleting the socket
4252 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4254 * threadpool.c: fix semaphore allocation.
4256 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4258 * threadpool.c: added epoll() based implementation for asynchronous IO
4259 that is used instead of the default poll() when available.
4260 It can be disabled by setting MONO_DISABLE_AIO.
4262 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4264 * threadpool.c: windows needs 'closesocket' and instead of returning
4265 0 when the stream is closed while in select, it returns -1. Fixes bug
4268 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
4270 * class.c (class_compute_field_layout): Fix the regression caused by
4273 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4275 * threadpool.c: separate pool for socket async. IO.
4276 * threadpool.h: mono_max_worker_threads is not a global any more.
4278 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
4280 * class.c (class_compute_field_layout): Fix #74549.
4282 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4284 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
4285 use 2 connected sockets instead.
4287 2005-04-08 Miguel de Icaza <miguel@novell.com>
4289 * mono-config.c: Add new entry point for mkbundle
4290 mono_config_parse_memory.
4292 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4294 * threadpool.c: removed another unused function.
4296 2005-04-08 Ankit Jain <radical@corewars.org>
4298 * reflection.c (get_default_param_value_blobs): Add 'types'
4299 parameter to get the types encoded in the constant table.
4300 (mono_param_get_objects): Use the type from the constant table,
4301 not the type of the parameter, when creating default values.
4302 Handle null default values correctly.
4304 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4311 * socket-io.c: removed dead code for async IO.
4313 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4315 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
4317 * threadpool.c: intercept socket async. calls and pass them to a thread
4318 that is polling and dispatching the job items to the threadpool as
4319 socket become ready. Fixes bugs #71217, #71933.
4321 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
4322 between char and short/ushort arrays.
4324 * socket-io.c: remove dead code.
4326 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
4329 icall.c : removed InternalToUpper_Comp() and
4330 InternalToLower_Comp().
4332 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
4334 * char-conversions.h : The tables were incorrectly generated. Should
4335 be generated against invariant culture.
4337 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
4339 * object.c (mono_runtime_invoke_array): Fix return value when
4340 passing pre-created valuetype objects to ctors.
4342 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
4343 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
4346 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
4348 * domain.c: removed g_assert for runtimesecurityframe_class. This is
4349 only used with --security and hides the wrong corlib version error.
4351 2005-03-30 Joshua Tauberer <tauberer@for.net>
4353 * class.c: Changed mono_class_name_from_token so that types
4354 outside of a namespace don't have an initial period. Improved
4355 the g_warning message used in _mono_class_get when loading
4357 * assembly.c: In mono_assembly_load_reference, when an assembly
4358 can't be found, "No such file or directory" is misleading and
4359 unhelpful because a few paths were checked for the presence of
4360 the assembly. When that happens (ENOENT), display a nicer
4361 message indicating the directories that were searched. In all
4362 cases, the warning is made easier to read for non-hackers.
4364 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
4366 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
4368 * appdomain.h|domain.c: Removed inline from functions.
4369 * appdomain.c: Reduced warnings when compiling on windows.
4370 * icall.c: Fixed output_debug declaration to gunichar2*.
4371 * mono-config.c: Reduced warnings when compiling on windows.
4372 * rand.c: Added missing "windows.h". Added missing return value.
4373 * rawbuffer.c: Added missing winsock2.h for windows.
4374 * sysmath.h: Added mono-compiler.h header to allow/ease
4375 compilation with non-GCC compilers.
4376 * threads.c: Fixed declarations to compile with VS.NET C compiler.
4377 Removed cast warnings.
4379 Adapted from the work of J Lothian (for VC6).
4381 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
4383 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
4386 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
4388 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
4391 2005-03-27 Raja R Harinath <harinath@gmail.com>
4393 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
4394 has to be in $(exec_prefix). $(prefix) is for arch-independent
4395 stuff, and it would probably use $(prefix)/share rather than
4398 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4400 * console-io.c: added 2 includes that might be missing.
4402 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
4404 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
4407 * reflection.c (create_custom_attr): Allocate the params array using
4408 alloca so it gets GC tracking.
4410 2005-03-23 Chris Toshok <toshok@ximian.com>
4412 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
4415 2005-03-24 Raja R Harinath <rharinath@novell.com>
4417 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
4418 changes to pick up any changes in prefix, etc.
4420 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
4422 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
4424 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
4425 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
4427 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
4429 * class-internals.h object-internals.h class.c reflection.c: Extend the
4430 mono_lookup_dynamic_token () function to return the class of the
4433 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
4436 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
4438 * security-manager.c: Skip inheritance checks for intra-corlib
4439 class inheritance and method overrides. This skips a lot of checks
4440 and (anyway) permissions cannot work until corlib is loaded.
4442 2005-03-23 Martin Baulig <martin@ximian.com>
4444 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
4445 MONO_TYPE_GENERICINST.
4447 2005-03-23 Martin Baulig <martin@ximian.com>
4449 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
4451 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4453 * class.c: added locking comments to some functions.
4454 Cache the interface offsets arrays (saves about 20 KB
4455 of runtime memory in a typical app).
4456 Reduce the time overhead in mono_class_setup_supertypes ().
4458 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
4460 * icall.c: speedup and fix leaks in GetMethodsByName and
4461 GetPropertiesByName.
4463 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4465 * reflection.c: some locking fixes.
4467 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4469 * metadata.c: added missing break in case statement.
4471 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
4473 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4474 typedbyref return values. Fixes #73941.
4476 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
4478 * security-manager.c|h: Added demandunmanaged method and
4479 suppressunmanagedcodesecurity class to MonoSecurityManager.
4480 Renamed aptc class to allowpartiallytrustedcallers.
4482 2005-03-17 Martin Baulig <martin@ximian.com>
4484 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
4486 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4488 * file-io.c: disabled file async. IO using aio_*. It uses the
4489 threadpool now. Workaround for bug #73718.
4491 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4493 * assembly.h, mono-config.c: added code to deal with bundled configs
4494 for bundled assemblies.
4496 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
4498 * *.c, private.h: cleanup, removing old private.h header file.
4500 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
4502 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
4503 and throw_on_unmappable_char attributes.
4505 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
4507 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
4508 _ProcessName_internal.
4510 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
4512 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
4515 * icall.c threads.c threads-types.h: Remove slothash icalls as they
4518 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
4520 * object.c (compute_class_bitmap): Add support for generics. Fixes
4523 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
4525 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
4527 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4529 * filewatcher.c: commented out the code for windows watcher, as we don't
4530 use it (we use the managed implementation instead).
4532 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
4534 * object-internals.h (MonoThread): Remove 'unused1' field.
4536 * appdomain.c: Bump corlib version.
4538 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
4540 * reflection.c (mono_reflection_create_runtime_class): Remove the
4541 AssemblyBuilder.Save optimization since it causes too many problems.
4543 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
4545 * exception.c|h: Added mono_get_exception_reflection_type_load to
4546 create a ReflectionTypeLoadException object.
4547 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
4548 to return NULL is a InheritanceDemand fails during reflection. Updated
4549 ves_icall_System_Reflection_Assembly_GetTypes to throw a
4550 ReflectionTypeLoadException if an InheritanceDemand fails during
4551 reflection. Added icall mapping for GetLinkDemandSecurity.
4552 * security-manager.c|h: Added ves_icall_System_Security_
4553 SecurityManager_GetLinkDemandSecurity internal call to return the
4554 class and methods permissions set for a LinkDemand. Removed unused
4555 fields in MonoSecurityManager.
4557 2005-03-10 Martin Baulig <martin@ximian.com>
4559 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
4560 it's a generic instance.
4562 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
4564 * reflection.c (mono_get_object_from_blob): Applied patch from
4565 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
4567 * class.c (mono_class_is_assignable_from): Another try at fixing
4568 #73469 without breaking anything.
4570 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
4572 * class.c: (mono_class_is_assignable_from): Revert the last changes
4573 since they don't work with generics.
4575 * class.c (mono_class_is_assignable_from): Fix build bustage.
4577 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
4578 the managed IsAssignableFrom method. Fixes #73469.
4580 * reflection.c (mono_reflection_call_is_assignable_from): New helper
4583 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
4585 * object.c (mono_load_remote_field_new): Fix returning uninitialized
4586 memory when the remoting callback does not sets the out arguments.
4589 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
4592 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
4594 * object-internals.h (MonoStackFrame): Sync with managed object layout.
4596 * appdomain.c: Bump corlib version.
4598 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
4600 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
4603 * threads.c (mono_thread_attach): Detect threads which are not started
4604 by the GC pthread wrappers.
4606 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
4608 * icall.c: Added new icall for RNG.
4609 * rand.c|h: Added new icall to open the RNG. This allows to share a
4610 single handle on Linux to access /dev/urandom and fix #73183.
4612 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
4614 * object.c: setting the new vtable in a transparent proxy object must
4615 not change the GC descriptor.
4617 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4619 * object.c: fixed compilation without GCJ support.
4620 * reflection.c: for runtime-created types ensure klass->has_references
4621 is correct (bug #73215).
4623 2005-03-02 Martin Baulig <martin@ximian.com>
4625 * class.c (mono_class_is_assignable_from): Make this work if
4626 `oklass' is a generic instance; fixes #72831.
4628 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
4630 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
4633 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
4635 * marshal.c: Reorganize native->managed marshalling code to also use
4636 the emit_marshal_... functions.
4638 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4640 * object.c: typed allocs have issues with bitmap sizes > 30,
4641 so check for max_set >= 30.
4643 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
4645 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
4646 managed code. Fixes #73012.
4648 * metadata.h (MonoMarshalSpec): Add elem_mult field.
4650 * metadata.c reflection.c: Load/Emit elem_mult as well.
4652 * metadata.h (MonoMarshalSpec): Add comment.
4654 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
4656 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
4657 num_elem to -1 if not given.
4659 * object-internals.h (MonoReflectionMarshal): Add has_size field.
4661 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
4664 2005-03-01 Marek Safar <marek.safar@seznam.cz>
4666 * null-gc.c (mono_gc_free_fixed): Was not compilable.
4668 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
4670 * reflection.c (encode_marshal_blob): Encode param_num field as well.
4672 * object-internals.h (MonoReflectionMarshal): Add param_num field.
4674 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4676 * object.c: generalized the reference bitmap creation
4677 and added hooks for the new GC.
4678 * class-internals.c: removed the gc_bitmap field from MonoClass.
4680 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4682 * domain.c: help the compiler to produce better code
4683 in mono_jit_info_table_find ().
4685 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4687 * object.c: make all allocations look typed.
4689 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4691 * socket-io.c: load Mono.Posix if it's not loaded already
4694 2005-02-24 Martin Baulig <martin@ximian.com>
4696 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
4697 * reflection.c (dup_type): Likewise.
4699 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
4701 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
4702 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
4704 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4706 * domain.c, threads.c, object-internals.h: make the critical thread
4707 local vars use the fast access mode (even when we're compiled in
4708 a lib). Provide accessors to be used by the jit during codegen.
4710 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4712 * appdomain.c: Changed hook functios behavior to include
4713 support for the reflection only assemblies. Some icalls were changed
4714 to support the mentioned assemblies too. Signatures of static methods
4715 try_assembly_resolve and real_load now have an additional parameter:
4718 * assembly.c: General changes to mono_assembly_ methods to support
4719 reflection only api. Functions mono_assembly_open, mono_assembly_load,
4720 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
4721 suffix, to support an additional gbool parameter to specify whether
4722 the assembli is reflection only or not. Created some new hook functions
4723 to add support for reflection only assemblies. Signatures of static
4724 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
4725 have now an additional parameter: refonly.
4727 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
4728 indicating whether the assembly is reflection only or not.
4730 * exception.c: Add mono_get_exception_invalid_operation.
4732 * icall.c: Throw an InvalidOperationException when trying to invoke
4733 a property/method/event, or trying to set/get the value of a field.
4734 Also add an icall to retrieve the ref_only flag to the
4735 MonoReflectionAssembly.
4737 2005-02-23 Chris Toshok <toshok@ximian.com>
4739 Part of fix for #72827.
4740 * mono-debug.c (mono_debug_add_method): add lexical block data to
4741 the info we write. Kind of a hack at the moment - we copy the
4742 lexical block info from the MonoDebugMethodInfo to the
4743 MonoDebugMethodJitInfo here, before writing it.
4744 (mono_debug_read_method): read the lexical block info.
4746 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
4748 * debug-mono-symfile.h: add lexical block support.
4750 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
4753 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
4755 * loader.c (mono_lookup_pinvoke_call): Fix warning.
4757 * object.c (mono_runtime_free_method): Call mono_free_method () and
4758 put the TODOs there.
4760 * loader.c (mono_free_method): Free up most memory allocated for
4763 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4765 * reflection.c: properly flag a Type argument to a
4766 named custom attr value (bug #72248).
4768 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4770 * reflection.c: reduce code duplication in named custom
4773 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
4775 * reflection.c: properly encode custom attrs of type object
4778 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
4780 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
4782 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
4784 * socket-io.c: load System.dll if it's not loaded already
4785 (bug #72850 and #70477).
4787 2005-02-21 Martin Baulig <martin@ximian.com>
4789 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4792 2005-02-21 Martin Baulig <martin@ximian.com>
4794 * reflection.c (mono_image_build_metadata): We also need to
4795 "fixup" the MethodImpl table after we computed the final method
4796 indices. Call fixup_methodimpl() to do that.
4797 (fixup_methodimpl): New private method.
4799 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4801 * assembly.c: special case mscorlib.dll (bug#72536),
4802 patch from Carlos Alberto Cortez.
4804 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
4806 * threads-types.h threads.c: Fix build bustage.
4808 * threads.c: Use a union for long<->double conversions.
4810 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
4811 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
4813 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
4814 containing the checkpoint call with NOT_TAKEN.
4816 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
4817 checkpoint before pushing the arguments, so they won't have to be
4820 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4822 * domain.c, assembly.c, domain-internals.h: make some data
4823 const and relocation-free.
4825 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
4827 * object.c, appdomain.c, class-internals.h: introduce the
4828 MonoClassRuntimeInfo structure to hold the info needed to
4829 use a class at runtime. Made mono_class_vtable() lock-free
4830 for all the appdomains.
4832 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
4834 * metadata-internals.h, image.c: introduce a per-image mempool to
4835 be used for memory that has the same lifetime as the image.
4837 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
4839 * domain.c: In mono_init_internal(), instead of selecting the first
4840 runtime version supported by an executable, get a list of all
4841 supported versions and select the one for which an mscorlib exists
4842 (since even if the runtime supports a given version, it doesn't mean
4843 that the framework for that version is installed).
4844 Modified get_runtimes_from_exe to support this behavior.
4845 In supported_runtimes, added information about additional system
4848 * assembly.c: Added support for more than one system assembly version
4849 per runtime version. Updated the assembly list.
4850 In mono_assembly_remap_version, removed the initial version check,
4851 since we don't know to which version we need to compare until we
4852 get the version set on which the assembly is based.
4853 Moved the code for loading corlib into the new method
4854 mono_assembly_load_corlib(), so it can be used by the initialization
4857 * domain-internals.h: Updated data structures and added declaration
4858 for mono_assembly_load_corlib.
4860 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
4862 * reflection.c (resolve_object): Fix the creation of the signature in
4863 the SignatureHelper case.
4865 * assembly.c (mono_assembly_remap_version): Fix binary search.
4867 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
4869 * class.c: Added inheritance check when a method is overloaded (from a
4870 virtual method or when implementing an interface) and when a class is
4871 inherited. Added functions to set a failure for a class and to
4872 retreive the exception from a failure.
4873 * class-internals.h: Added fields to MonoClass to keep the exception
4874 information status for inheritance (or other exceptions) to be thrown
4875 later (i.e. not at load time).
4876 * object.c: Throw the inheritance SecurityException when a type is to
4877 be created with either class or method inheritance violations.
4878 * reflection.c|h: Fix when getting declsec from a class. Removed
4879 unrequired code for class. Improved sanity in parameter naming.
4880 * security-manager.c|h: Added functions to check for class and method
4883 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
4885 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
4886 and has_finalize in dynamic types as well.
4888 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
4890 * culture-info-table.h : fixed currency format for en-GB (and so on).
4892 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
4894 * gc.c: ensure the GC handles never have 0 as a value.
4896 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
4898 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
4899 a pointer to a struct to unmanaged code. Fixes #72625.
4901 2005-02-16 Martin Baulig <martin@ximian.com>
4903 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
4905 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
4907 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
4909 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
4911 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
4913 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
4914 UnmanagedFunctionPointerAttribute, use it for determining calling convention
4917 * reflection.c (mono_custom_attrs_get_attr): New helper function.
4919 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
4921 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
4923 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
4924 changes to make the current context a field in MonoThread.
4926 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
4928 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
4931 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
4932 extracted from mono_marshal_get_native_wrapper.
4934 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
4935 to create wrappers around native functions.
4937 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
4938 delegates for arbitrary function pointers. Fixes #71472.
4940 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
4942 * threads.c: cleaned up the code a little.
4944 2005-02-15 Martin Baulig <martin@ximian.com>
4946 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
4949 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
4950 allocate larger chunks if needed.
4952 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
4954 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
4957 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
4959 * domain.c: keep the domains in an array and ensure the domain ids
4960 are kept small, so they can be used as indexes to domain-specific data
4961 with a small memory overhead.
4963 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
4965 * icall.c: Handle byref types in Type icalls. Fixes #72544.
4967 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
4969 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
4971 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
4973 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
4975 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
4978 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
4980 2005-02-12 Ben Maurer <bmaurer@ximian.com>
4982 * domain-internals.h: add the hashtable here.
4984 * class-internals.h: Remove `info' from MonoMethod
4986 * domain.c: Add a new hashtable, jit_trampoline_hash
4988 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
4990 * object.c: don't set the value of static fields
4993 2005-02-11 Martin Baulig <martin@ximian.com>
4995 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
4996 (mono_debug_add_method): Silently ignore the method if it's too big.
4997 (mono_debug_add_type): Likewise.
4999 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
5001 * threads.c, appdomain.c: remove #ifdefs from the code.
5003 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
5005 * metadata-internals.h: Added flags to MonoAssembly to cache the most
5006 common security informations. This allows us to stay in unmanaged code
5007 when doing LinkDemand and it's special cases (except for the first
5008 time for initialization). The flags a very much used with --security.
5009 * reflection.c|h: Added code to get declarative security attributes
5010 for LinkDemand and InheritanceDemand. This required to refactor the
5011 existing code for Demand.
5012 * security-manager.c|h: Added new method fields for the special cases
5015 2005-02-10 Martin Baulig <martin@ximian.com>
5017 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
5018 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
5020 2005-02-10 Martin Baulig <martin@ximian.com>
5022 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
5023 debugging code; this is almost a complete rewrite.
5025 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
5027 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5029 * domain.c, object.h: expose mono_string_equal () and
5030 mono_string_hash ().
5031 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
5032 it's implemented in managed code.
5034 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5036 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
5037 lo leak objects between appdomains.
5039 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5041 * assembly.c: old compilers compilation fix from
5042 robertj@gmx.net (Robert Jordan).
5044 2005-02-09 Ben Maurer <bmaurer@ximian.com>
5046 * class-internals.h: Little reminder for the future.
5048 * debug-helpers.c: Fix up wrapper_type_names
5050 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5052 * image.c, metadata-internals.h: when loading an image from a file,
5053 mmap all of it and use the same codepaths as when using a
5054 in-memory image: the code is simpler and we use less memory
5055 (both writable and readonly).
5057 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5059 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
5060 API to alloc runtime data structures that need to be tracked by the
5061 GC and contain pointers.
5062 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
5063 make the code more readable and eventually use a different GC.
5065 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
5067 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
5070 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
5072 * object.c: In release_type_locks(), don't release the cctor lock
5073 if it has already been released. This fixes a crash in the
5076 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5078 * gc.c, marshal.c, icall.c: register a delegate for finalization
5079 only when the native function pointer has been allocated for it.
5081 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5083 * object.c: cleaned up some code, allocate objects that are
5084 pointer free with the atomic malloc variant. Allocate memory
5085 for static data from the mempool if it's pointer-free.
5086 Allocate the bounds array at the end of the array data, when needed.
5087 * object-internals.h, object.h: move a private function in a private
5089 * class.c: handle missing case in tracking references in fields.
5091 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5093 * class.c, class-internals.h: keep track if a type has
5094 reference fields in either the instance or static fields.
5096 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
5098 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
5099 and renamed to MonoRuntimeInfo. Added fields to store the expected
5100 framework assembly version. Changed mono_get_framework_version and
5101 mono_get_runtime_version for a single mono_get_runtime_info method.
5103 * assembly.c: Added method to remap system assembly versions to the
5104 current executing runtime version. Removed old mapping code.
5105 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
5107 * icall.c, reflection.c: Track api changes.
5109 2005-02-06 Miguel de Icaza <miguel@novell.com>
5111 * loader.c (method_from_memberref): Improve error reporting,
5112 produce the class name instead of the typeref/typedef index.
5114 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
5116 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
5118 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5120 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
5121 stdcall and charset name mangling. Reorganize the code and add
5124 2005-02-05 Ben Maurer <bmaurer@ximian.com>
5126 * monodiet.c: More iters!
5128 * marshal.c: Iter usage.
5130 * icall.c: Iter usage.
5132 * object.c: Use iters.
5134 * debug-helpers.c: More iters
5136 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5138 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
5141 2005-02-05 Ben Maurer <bmaurer@ximian.com>
5143 * mono-debug-debugger.c: use iters
5145 * class.c, class-internals.h: mono_class_setup_events is static
5148 * All callers: use iters
5150 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5152 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
5153 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5155 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
5157 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
5159 * marshal.h: Add prototypes for ldfld/stfld_remote.
5161 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
5162 this is called during startup.
5164 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5166 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
5167 MonoThreadsSync struct private in monitor.c. Changed the way
5168 MonoThreadsSync is allocated so it's faster and there is no
5169 need to keep track of it with a finalizer and it uses less memory.
5170 This also finally allows us to allocate mono objects as ptrfree when
5171 there are no reference fields.
5173 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
5175 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
5176 disappearing link to the GC interface and use them to simplify
5179 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
5181 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
5182 stfld_remote which call mono_load/store_field_new. This allows methods
5183 calling ldfld/stfld wrappers to be AOTed.
5185 * console-io.c: Include sys/filio.h under solaris.
5187 * console-io.c: Include curses.h if needed correctly.
5189 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
5191 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
5192 method->klass as well.
5194 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
5196 * class.c (mono_class_init): Switch on lazy initialization of
5199 * class.c (mono_class_get_finalizer): Handle the case when the
5200 finalizer is inherited.
5202 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5204 * console-io.c: <curses.h> is needed by term.h on solaris.
5206 2005-02-03 Ben Maurer <bmaurer@ximian.com>
5208 * icall.c, class-internals.h, monodiet.c, class.c: Remove
5209 mono_class_setup_properties where possible. Remove this ftn from
5210 the header file, and make it static.
5212 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
5214 * loader.c: Add missing setup_... call.
5216 * class.c: Add missing setup_... calls.
5218 * class.c (mono_class_init): Switch on lazy initialization of
5221 * class.c (mono_class_init): Fix generics broken by the recent changes.
5223 * monodiet.c (handle_type): Add missing setup_... calls.
5225 * class.c: Back out garbage in previous patch.
5227 * class.c: Add missing setup_... calls.
5229 * class.c (mono_class_get_method_from_name_flags): Avoid calling
5230 mono_class_setup_methods () if possible.
5232 * class-internals.h (MonoClass): Add 'has_cctor' flag.
5234 * class-internals.h (MonoCachedClassInfo): New structure.
5236 * class.c: Initialize properties and events fields of MonoClass lazily.
5238 * class.c: Add infrastructure for lazily initializing the methods and
5239 vtable fields of MonoClass. Not yet used.
5241 * class.c (mono_class_get_finalizer): New helper function.
5243 * class.c: Add infrastructure for loading some class related data from
5246 * object.c: Add infrastructure for initializing the vtable from data
5249 * gc.c (run_finalize): Use mono_class_get_finalizer ().
5251 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
5252 appropriate initialization function before accessing parts of the
5253 MonoClass structure.
5255 * marshal.c: Fix warnings.
5257 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
5259 * mono-debug-debugger.c (get_exception_message): Use
5260 mono_class_get_method_from_name_flags ().
5262 2005-02-02 Ben Maurer <bmaurer@ximian.com>
5264 * reflection.c, appdomain.c: Replace a few manual searches that
5265 Zoltan missed. (Paolo approved this part of my initial patch).
5267 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
5269 * profiler.c: disable recording statistical events at report time.
5271 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5273 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
5274 to byteswap arrays of enum values, too (bug #72080).
5276 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
5278 * appdomain.c (set_domain_search_path): Allow this to be called if
5279 domain->setup is not yet set.
5281 * loader.c (mono_method_get_index): New helper function.
5283 * loader.c reflection.c: Use mono_method_get_index ().
5285 * class.c (mono_class_get_method_from_name_flags): New helper method.
5287 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
5290 * class.c (mono_class_get_cctor): New helper method.
5292 * string-icalls.c object.c class.c marshal.c reflection.c: Use
5293 mono_class_get_method () to look up methods.
5295 2005-02-01 Miguel de Icaza <miguel@novell.com>
5297 * console-io.c: Fix the build, this should work on Windows.
5299 2005-01-31 Ben Maurer <bmaurer@ximian.com>
5301 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
5302 be set to null to keep things valid
5304 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5306 * icall.c: added Console 2.0 icalls.
5307 * Makefile.am: added console-io.[ch]
5308 * console-io.[ch]: internal calls for Console 2.0 API.
5310 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5312 * class.c: make sure we consider all the interfaces
5313 when calculating max_interface_id (bug found by
5314 Jeroen Frijters running ikvm).
5316 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
5318 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
5319 valuetype fields to null.
5321 * object.c (set_value): Ditto. Fixes #71669.
5323 2005-01-31 Martin Baulig <martin@ximian.com>
5325 * metadata.c (mono_metadata_has_generic_params): New public
5326 function; checks whether something is a generic method.
5328 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5330 * appdomain.c: fix infinite recursion when adding assemblies.
5332 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
5334 * object.c: Fix small typo to return all items for Environment.
5337 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5339 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
5340 reflection.c: more domain and assembly-unload related fixes
5341 and memory leaks plugs.
5343 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
5345 * 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.
5347 2005-01-29 Ben Maurer <bmaurer@ximian.com>
5349 * loader.c (mono_method_signature): Make this method lazy
5350 (mono_get_method_from_token): Don't computate the signature here.
5352 Doing this saves quite a bit of memory. I got 90 kb on starting up
5353 monodoc. It should also save some disk reads on startup.
5355 * *: MonoMethod->signature might be NULL now. You *MUST* use
5356 mono_method_signature.
5358 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
5360 * object.c (mono_runtime_get_main_args): Return an array from the
5361 current domain here. Fixes #71938.
5363 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
5365 * monitor.c: formatting changes to comply with the
5366 mono coding style and remove #ifdefs from the code.
5368 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5370 * metadata.c, private.h: remove some unneeded data
5371 and use a more compact representation for table schemas.
5373 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
5375 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
5376 to get a better distribution in hash tables.
5377 * *.c: use mono_aligned_addr_hash() where appropriate.
5378 * assembly.c: make var static.
5380 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
5382 * domain-internals.h: Put MonoJitInfo on a diet.
5384 * domain.c: Fix a warning.
5386 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5388 * gc.c: rework the gc handles code to reuse handles
5391 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5393 * domain.c: fixed long standing bug in mono_string_equal() which
5394 was brought to light with the ldstr changes.
5396 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
5398 * reflection.c: Remove warning by adding missing include for marshal.h
5400 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5402 * domain.c, object.c: change the ldstr_table to hold
5403 MonoString* as keys: makes the runtime isinterned lookup
5404 faster and simplifies memory management.
5406 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
5408 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
5409 possible to add imperative security checks before calling the icall.
5410 * reflection.c: Return security attributes on the original MonoMethod
5411 (and not the wrapped one). This fix permissions on icalls.
5413 2005-01-25 Dick Porter <dick@ximian.com>
5415 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
5416 the check for mktime() support actually test the mktime() return
5417 value. "Fixes" bug 71682, though the output is still different to
5420 2005-01-25 Martin Baulig <martin@ximian.com>
5422 * class.c (mono_class_is_assignable_from): Make this work for
5425 2005-01-24 Ben Maurer <bmaurer@ximian.com>
5427 * marshal.c (mono_string_utf8_to_builder)
5428 (mono_string_builder_to_utf16): We might not have ownership of the
5429 string. In thise case, we need to create a new buffer.
5431 * object-internals.h (mono_stringbuilder_capacity): sb->str might
5432 be null, in which case, use the default capacity.
5434 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5436 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
5437 GC events to the profiler.
5439 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5441 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
5442 if you don't want the GC to run.
5444 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
5446 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
5447 start providing a GC API and keeping different implementations in
5449 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
5451 2005-01-22 Ben Maurer <bmaurer@ximian.com>
5453 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
5454 mmap rather than allocating a huge buffer.
5455 (mono_debug_close_mono_symbol_file): Free the buffer allocated
5458 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
5460 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
5461 and CheckExecutionRights.
5462 * reflection.c|h: Keep the index of the declarative security to be
5463 used, instead of the pointer, when AOT compiler is used. Also add
5464 class initialization when requesting demands.
5465 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
5466 CheckExecutionRights. Both properties are now FALSE by default, and
5467 unmodifiable, unless the --security option is used.
5469 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5471 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
5472 reflection.c: properly refcount images and assemblies, many leaks fixed.
5474 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5476 * threadpool.c: increase the timeout for threads in the thread pool to
5477 10s. Fixes bug #67159.
5479 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
5481 * class-internals.h: Sun's compiler insists on explicit
5482 signed on bit fields to handle then correctly.
5484 2005-01-19 Miguel de Icaza <miguel@ximian.com>
5486 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
5487 Make the size of the array fit only the number of invalid path
5490 * class.c (_mono_class_get): Improve the error reporting when a
5491 class referenced is not found, to assist debugging.
5493 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
5495 * threads.c: fix off-by-one error.
5496 * domain.c: free data allocated in the domain.
5498 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
5500 * reflection.c (mono_method_body_get_object): Fill out exception info
5503 * object-internals.h: Add MonoReflectionExceptionHandlingClause
5506 2005-01-19 Martin Baulig <martin@ximian.com>
5508 * loader.c (mono_get_method_constrained): Make this work again.
5510 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
5512 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
5513 guint16 to match the managed side.
5515 * reflection.c (mono_reflection_body_get_object): Fill out local
5518 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
5521 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
5522 'local_var_sig_token'.
5524 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
5526 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
5529 * reflection.c (mono_method_body_get_object): Handle abstract and
5532 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
5534 * marshal.c, loader.c, class-internals.h, reflection.c:
5535 store the emthod data for a wrapper in an array instead of a list.
5537 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
5539 * marshal.c: change the code to allocate memory more
5540 conservatively for method wrappers.
5542 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
5544 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
5545 fields from MonoClass to the marshal info structure where they belong.
5547 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5549 * class.c, object.c, class-internals.h, marshal.c: rearrange
5550 some fields and tweak some types to lower memory usage.
5552 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
5554 * threads.c (signal_thread_state_change): Handle the case when the
5555 target thread is the current thread.
5557 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
5559 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
5560 emit_ptr_to_object_conv.
5562 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
5563 marshalling. Fixes #71352.
5565 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5567 * metadata.h, blob.h: move table enum to blob.h so it can be included
5569 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
5570 cut the size of MonoImage/MonoDynamicImage.
5572 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
5574 * profiler.c (mono_profiler_install_simple): Fix default arguments.
5576 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
5578 * reflection.c, reflection.h, icall.c: add a function to check
5579 if an attribute type is defined for a metadata object.
5581 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
5583 * object-internals.h: Added some needed fields from StringBuilder class.
5584 * marshal.c: Set the maxCapacity when creating a StringBuilder.
5586 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
5588 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
5589 threads before shutting down the runtime.
5591 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
5593 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5595 * object-internal.h, threads.c: implement stacksize and
5596 parameterized thread start functionality (requires
5597 matching corlib). Marked broken code for later removal.
5599 2005-01-12 Martin Baulig <martin@ximian.com>
5601 * class-internals.h (MonoGenericClass): Moved the `initialized'
5602 flag to MonoDynamicGenericClass, removed `init_pending'.
5603 (MonoGenericInst): Added `is_reference' flag.
5605 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
5607 * reflection.c (mono_image_create_pefile): Only set the pe_offset
5608 inside the MSDOS header. Fixes #71201.
5610 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
5612 (mono_domain_finalize): Ditto.
5614 2005-01-12 Martin Baulig <martin@ximian.com>
5616 * class.c (mono_get_shared_generic_class): Use the cache for
5617 non-dynamic generic classes.
5619 * class-internals.h (mono_class_create_generic_2): Removed
5620 function prototype, this function is now static inside class.c.
5622 * class.c (mono_class_create_generic_2): Made this static, only
5623 call it from mono_class_init() and mono_class_setup_parent().
5624 (collect_implemented_interfaces_aux): Call mono_class_init() on
5625 the interfaces we collect.
5626 (mono_class_setup_vtable): Call mono_class_init (class->parent).
5628 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
5630 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
5631 it a real thread handle.
5633 * domain-internals.h: Move exvar_offset from MonoJitInfo to
5634 MonoJitExceptionInfo, since each catch clause needs its own variable.
5636 2005-01-11 Dick Porter <dick@ximian.com>
5638 * image.c (mono_pe_file_open): New variant on mono_image_open()
5639 that does not set up the CLI metadata; used for FileVersionInfo so
5640 it can get the data for windows binaries too.
5642 * process.c (process_read_string_block): Don't read off the end of
5643 the StringTable block.
5645 These both fix bug 70766.
5647 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
5649 * gc.c: set some fields to NULL at GC cleanup time.
5650 * threads.c: if we quit the main thread, call exit ().
5652 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
5654 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
5656 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
5658 * threads.h, threads.c, object.c: added accessor and settor for
5659 main_thread. Handle it specially when exiting from it: wait
5660 for other foreground threads to exit.
5662 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
5664 * process.c, verify.c: remove some bloat.
5666 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
5668 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
5669 the calling convention to cdecl under win32.
5671 2005-01-08 Ben Maurer <bmaurer@ximian.com>
5673 * object.c (mono_object_get_size): New function to get the size of
5676 * profiler.c (simple_allocation): Use above.
5678 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
5680 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
5681 ves_icall_System_AppDomain_getRootDomain (as it's not required to
5682 get an appdomain by it's id and we can't assume the root's id is 0).
5683 * domain-internals.h: Change the function prototype to match.
5684 * icall.c: Change the icall table for AppDomain.
5686 2005-01-08 Miguel de Icaza <miguel@ximian.com>
5688 * locales.c (string_invariant_compare_char): Only compute
5689 GUnicodeTypes in the case where we need them. Test for ordinality
5690 first and return if so.
5695 * FIXME: here we must use the information from c1type and c2type
5696 * to find out the proper collation, even on the InvariantCulture, the
5697 * sorting is not done by computing the unicode values, but their
5698 * actual sort order.
5701 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5703 * loader.c: for P/Invoke methods, allow the "Internal" shared
5704 library name to refer to the calling process symbol namespace.
5706 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
5708 * Makefile.am: Add the security manager to the build.
5709 * security-manager.c|h: New. Initialization of the security manager.
5711 2005-01-07 Dick Porter <dick@ximian.com>
5714 * monitor.c: Update thread state during Monitor and WaitHandle
5715 waits. Fixes bug 71031.
5717 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
5719 * reflection.c (property_encode_signature): Correctly handle when the
5720 property has no methods.
5722 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
5724 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
5726 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
5727 fields from mb, not rmb. Fixes #71017.
5729 * marshal.c (emit_ptr_to_str_conv): Add support for
5730 ByValTStr -> string conversion. Fixes #71015.
5732 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
5734 * mempool.c (mono_mempool_contains_addr): New helper function.
5736 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
5738 * metadata.c (mono_metadata_compute_size): Fix size calculation of
5739 HasSematics encoded fields.
5741 * metadata.c (mono_type_to_unmanaged): Improve error message for
5742 invalid string marshalling.
5744 * metadata.c: Fix warnings.
5746 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5748 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
5751 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
5753 * domain.c object.c domain-internals.h: Revert part of r38077 since the
5754 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
5757 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
5759 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
5760 so methods containing these can be AOTed.
5762 2005-01-03 Martin Baulig <martin@ximian.com>
5764 * loader.c (find_method): Removed the hack for generic instances.
5765 (method_from_memberref): If our parent is a generic instance, pass
5766 its generic type definition to find_method() and then inflate the
5768 (mono_get_method_constrained): Pass the generic type definition to
5769 find_method() and inflate the method later.
5771 * class-internals.h (MonoStats): Added `generic_class_count'.
5773 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
5774 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
5776 * reflection.c (mono_custom_attrs_from_params): Don't ignore
5777 generic type definitions.
5779 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
5781 * loader.c icall.c: Fix warnings.
5783 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
5785 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
5786 blittable types. Fixes #70864.
5788 2004-12-29 Martin Baulig <martin@ximian.com>
5791 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
5793 * reflection.c (mono_method_get_object): Create a
5794 "System.Reflection.MonoGenericMethod" for inflated methods; don't
5795 call mono_get_inflated_method().
5797 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
5799 2004-12-27 Martin Baulig <martin@ximian.com>
5801 * class-internals.h (MonoMethod): Added `is_inflated' flag.
5802 (MonoMethodInflated): Added `inflated' field.
5804 * class.c (mono_class_inflate_generic_method): Don't really
5805 inflate the method here; just set the `is_inflated' flag in the
5807 (mono_class_get_inflated_method): Actually inflate the method here
5808 if it's not already inflated; we use the MonoMethodInflated's new
5809 `inflated' field as a cache.
5811 2004-12-26 Martin Baulig <martin@ximian.com>
5814 (inflate_generic_class): Moved some code out of inflate_generic_type().
5815 (mono_class_inflate_generic_method): If we're already inflated,
5816 inflate the context and use the declaring method; ie. make sure
5817 the declaring method of an inflated method is always the generic
5819 (mono_class_create_from_typedef): Create
5820 `class->generic_container->context->gclass'.
5822 2004-12-24 Ben Maurer <bmaurer@ximian.com>
5824 * metadata-internals.h, marshal.c, reflection.c: More
5825 MonoGHashTable->GHashTable.
5827 * domain-internals.h, class.c: Change MonoGHashTable's into
5828 GHashTables for some cases where no gc stuff is used
5830 All users: update apis
5832 2004-12-23 Ben Maurer <bmaurer@ximian.com>
5834 * metadata.c (builtin_types): Make this `const'. Makes this get
5835 put into the shareable section.
5836 (mono_metadata_init): Casts to make gcc happy.
5838 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
5840 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
5842 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
5844 * icall.c: Added an internal call to retrieve the position and length
5845 of assembly-level declarative security attributes (RequestMinimum,
5846 RequestOptional and RequestRefuse). This is used by the Assembly class
5847 to re-create the corresponding permission sets.
5849 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
5851 * marshal.c: fix the stelemref wrapper to be type correct
5854 2004-12-20 Ben Maurer <bmaurer@ximian.com>
5856 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
5857 to do key & 0x7fffffff. Hashtable already does this. It just
5858 results in longer code.
5860 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
5862 * appdomain.c: Bump corlib version.
5863 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
5864 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
5865 * reflection.c|h: Add functions to get declarative security infos
5866 (blob position and length) for assemblies, classes and methods.
5868 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
5870 * reflection.c: sort the constant table (bug #70693).
5872 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
5874 * object-internals.h, threads.c, domain.c: add accessors for
5875 the MonoThread and MonoDomain tls keys.
5877 2004-12-18 Martin Baulig <martin@ximian.com>
5879 * class.c (inflate_generic_type): If we're inflating a generic
5880 instance, set `ngclass->context->container = context->container';
5881 ie. the container we inflated into.
5883 * metadata.c (mono_metadata_parse_generic_param): Reflect above
5884 inflate_generic_type() changes.
5886 2004-12-17 Martin Baulig <martin@ximian.com>
5889 (MonoGenericClass): Replaced `MonoType *generic_type' with
5890 `MonoClass *generic_class'. Removed `dynamic_info'; if
5891 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
5892 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
5894 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
5896 * exception.c (mono_exception_from_token): New helper function.
5898 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
5900 * assembly.c (mono_assembly_load_with_partial_name): Call
5901 mono_assembly_loaded before invoking the preload hooks. Fixes
5904 * object-internals.h (MonoThread): Change culture_info and
5905 ui_culture_info into an array.
5907 * threads.c: Cache culture info objects from more than one appdomain.
5909 * threads.c threads-types.h icall.c: Add icalls for manipulating the
5912 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
5914 * threads.h threads.c appdomain.c: Clear the culture_info field of
5915 all threads during unloading if they point to an object in the dying
5918 2004-12-13 Ben Maurer <bmaurer@ximian.com>
5920 * culture-info.h (TextInfoEntry): New struct
5921 * object-internals.h: sync with managed
5922 * locales.c: fill the `text_info_data' field
5923 * culture-info-tables.h: update
5925 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
5927 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
5930 2004-12-12 Ben Maurer <bmaurer@ximian.com>
5932 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
5933 (ves_icall_ModuleBuilder_getMethodToken): Ditto
5935 2004-12-12 Martin Baulig <martin@ximian.com>
5937 * mono-debug-debugger.c (write_type): If we're an enum and the
5938 builtin types have already been initialized, call mono_class_init().
5940 2004-12-11 Martin Baulig <martin@ximian.com>
5942 * metadata.c (mono_metadata_load_generic_params): Added
5943 `MonoGenericContainer *parent_container' argument; automatically
5944 compute `container->is_method'; pass the correct owner to
5947 * reflection.c (compare_genericparam): Sort the GenericParam table
5948 according to increasing owners.
5950 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
5952 * profiler.c: allow disabling the default profiler.
5954 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
5956 * decimal.c, icall.c: allow disabling System.Decimal support.
5958 2004-12-09 Marek Safar <marek.safar@seznam.cz>
5960 * reflection.c: Add support for null attribute arguments.
5962 2004-12-09 Martin Baulig <martin@ximian.com>
5964 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
5965 names to get rid of compiler warnings.
5967 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
5969 * marshal.c (mono_marshal_get_struct_to_ptr): Call
5970 mono_marshal_load_type_info (). Fixes #69625.
5971 (mono_marshal_get_ptr_to_struct): Likewise.
5973 2004-12-08 Martin Baulig <martin@ximian.com>
5975 * mono-debug.h: Bumped version number to 47.
5977 * mono-debug-debugger.c
5978 (mono_debugger_event_handler, mono_debugger_event): Take two
5979 guint64 arguments insteed of a gpointer and a guint32.
5981 2004-12-08 Martin Baulig <martin@ximian.com>
5983 * debug-mono-symfile.h
5984 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
5985 `address' to `native_offset'.
5987 2004-12-08 Martin Baulig <martin@ximian.com>
5989 * class.c (mono_class_create_from_typespec): Only inflate if we
5990 either have `context->gclass' or `context->gmethod'.
5992 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
5994 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
5996 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
5998 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
6000 * reflection.c (mono_assembly_get_object): Remove the workaround put
6003 * appdomain.c: Use the corlib_internal field from MonoAssembly.
6005 * appdomain.c: Bump corlib version.
6007 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
6008 be visible in other appdomains.
6010 2004-12-07 Ben Maurer <bmaurer@ximian.com>
6012 * threads.c: Interlocked inc and dec for longs were messed up,
6013 use a KISS based impl for this. Fixes 70234
6015 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
6017 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
6019 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
6021 * icall.c: fix to follow policy not to allow struct
6022 arguments in icalls.
6024 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6026 * process.c: make the patch that handles spaces in file paths work
6027 on mono/windows too.
6029 2004-12-06 Martin Baulig <martin@ximian.com>
6031 * class.c (mono_class_create_generic): Call
6032 mono_class_setup_supertypes() if we're dynamic.
6033 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
6035 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
6037 * object-internals.h: Add new fields to MonoThread.
6039 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6041 * icall.c threads-types.h threads.c: Add new icalls.
6043 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
6045 * object-internals.h (MonoReflectionAssembly): Sync object layout with
6048 * appdomain.c: Bump corlib version.
6050 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
6051 internal assemblies. Fixes #69181.
6053 2004-12-05 Martin Baulig <martin@ximian.com>
6055 * class.c (mono_class_inflate_generic_signature): Make this a
6056 no-op if `context' is NULL or we don't have any type parameters;
6057 also copy `sentinelpos'.
6059 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
6061 * image.c: Add unbox_wrapper_cache.
6063 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
6065 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
6068 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
6071 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
6073 2004-12-04 Martin Baulig <martin@ximian.com>
6075 * loader.c (mono_method_get_signature_full): New public function;
6076 like mono_method_get_signature(), but with an additional
6077 `MonoGenericContext *' argument.
6079 * class.c (mono_class_inflate_generic_signature): Formerly known
6080 as inflate_generic_signature(); make this public.
6082 2004-12-04 Martin Baulig <martin@ximian.com>
6085 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
6086 instead of a `MonoGenericContainer *'.
6087 (mono_metadata_parse_array_full): Likewise.
6088 (mono_metadata_parse_signature_full): Likewise.
6089 (mono_metadata_parse_method_signature_full): Likewise.
6090 (mono_metadata_parse_generic_inst): Likewise.
6091 (mono_metadata_parse_generic_param): Likewise.
6092 (mono_metadata_parse_mh_full): Likewise.
6093 (mono_type_create_from_typespec_full): Likewise.
6095 2004-12-03 Martin Baulig <martin@ximian.com>
6097 * class-internals.h (MonoGenericContainer): Replaced the
6098 `MonoGenericContext * pointer with a `MonoGenericContext'
6099 structure and made it the first element.
6101 2004-12-03 Martin Baulig <martin@ximian.com>
6104 (inflate_generic_type): Set the `context->container' when creating
6105 a new MonoGenericContext.
6106 (mono_class_inflate_generic_method): Likewise.
6107 (mono_class_create_from_typespec): Just use `context->container'
6108 to get the container.
6110 * loader.c (method_from_methodspec): Set `context->parent' from
6111 `context->container' - and if that's a method container, use its
6112 parent. Also set the `context->container' when creating a new
6114 (mono_get_method_from_token): Use just `context->container' to get
6117 * metadata.c (do_mono_metadata_parse_generic_class): Also set
6118 `gclass->context->container'.
6120 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
6121 the `context->container' when creating a new MonoGenericContext.
6123 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
6125 * reflection.c (compare_genericparam): Sort params with identical
6126 owner by their number. Fixes gen-111 on sparc.
6128 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
6130 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
6131 around the domain changes.
6133 * appdomain.c (mono_domain_unload): Handle the case when the thread
6134 calling Unload is itself being aborted during unloading. Fixes #70022.
6136 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
6138 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
6139 checkpoint_func as an icall so it gets a wrapper.
6140 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
6141 in the cross-appdomain wrappers too.
6143 * threads.c (mono_thread_has_appdomain_ref): Make this public.
6145 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
6147 * reflection.c: Fix some memory leaks.
6149 2004-12-02 Martin Baulig <martin@ximian.com>
6151 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
6153 * metadata.c (generic_class_cache): New static hashtable.
6154 (mono_metadata_lookup_generic_class): New public method.
6156 2004-12-02 Martin Baulig <martin@ximian.com>
6158 * class.c (mono_class_create_from_typedef): Call
6159 mono_class_setup_parent() and mono_class_create_mono_type() before
6160 parsing the interfaces.
6162 2004-12-02 Martin Baulig <martin@ximian.com>
6164 * metadata.c (generic_inst_cache): New static hashtable.
6165 (mono_metadata_lookup_generic_inst): New public function.
6166 (mono_metadata_inflate_generic_inst): New public function.
6167 (mono_metadata_parse_generic_inst): New public function.
6168 (do_mono_metadata_parse_generic_class): Use the new
6169 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
6170 since this'll also use the cache.
6172 * reflection.c (mono_reflection_bind_generic_method_parameters):
6173 Use mono_metadata_lookup_generic_inst() to use the new cache.
6175 * class.c (inflate_mono_type): Use
6176 mono_metadata_inflate_generic_inst() to inflate a generic
6177 instance; this'll also use the new cache.
6179 * loader.c (method_from_methodspec): Use
6180 mono_metadata_parse_generic_inst() and
6181 mono_metadata_inflate_generic_inst() rather than parsing it
6182 manually, so we can use the new cache.
6184 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
6186 * threads.c (wait_for_tids): Do not incorrectly free threads when
6189 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6191 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
6192 iter->args based on whether parameters are passed in registers (i.e.
6193 MONO_ARCH_REGPARMS is defined)
6195 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
6197 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
6198 the exception message. Fixes #70070.
6199 (method_from_methodspec): Fix warnings.
6201 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6203 * process.c: (complete_path) return the path quoted
6205 2004-12-01 Martin Baulig <martin@ximian.com>
6207 * class-internals.h (MonoGenericInst): New structure.
6208 (MonoGenericClass): Replaced `type_argc', `type_argv' and
6209 `is_open' with `MonoGenericInst *inst'.
6210 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
6211 `is_open' with `MonoGenericInst *inst'.
6213 2004-11-30 Martin Baulig <martin@ximian.com>
6215 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
6217 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
6218 to `generic_class_cache'.
6221 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
6222 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
6223 (mono_generic_inst_is_valuetype): Renamed to
6224 mono_generic_class_is_valuetype().
6227 (MonoGenericInst): Renamed to MonoGenericClass.
6228 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
6229 (MonoClass): Renamed `generic_inst' to `generic_class'.
6230 (MonoGenericContext): Renamed `ginst' to `gclass'.
6232 * object-internals.h
6233 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
6235 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
6236 mono_reflection_generic_class_initialize().
6238 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
6239 now known as "System.Reflection.MonoGenericClass".
6240 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
6242 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
6244 * class-internals.h: Added a flag field to MonoClass to cache the
6245 declarative security attributes actions associated with the class.
6246 * domain-internals.h: Added booleans to MonoJitInfo to cache the
6247 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
6248 applicable to the JITted method.
6249 * reflection.c|h: Added functions to extract (as flags) which security
6250 actions are available (declaratively) for a method, class or assembly.
6251 * metadata.c|h: Added functions to search the declarative security
6252 table in the metadata.
6254 2004-11-29 Ben Maurer <bmaurer@ximian.com>
6256 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
6257 EXPORTEDTYPES are already in the class name cache, so there is no
6258 need to add extra code here to look at them. Just removes a bit of
6261 (ves_icall_System_Environment_get_TickCount): No need for #if
6262 WINDOWS. We already have the code in io-layer.
6264 2004-11-28 Martin Baulig <martin@ximian.com>
6267 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
6270 2004-11-27 Miguel de Icaza <miguel@ximian.com>
6272 * assembly.c (do_mono_assembly_open): Instead of having a
6273 conditional WITH_BUNDLE, incorporate support for bundles here, by
6274 having a global `bundles' variable holding a pointer to the actual
6277 (mono_register_bundled_assemblies): New API call used by the
6280 See mkbundle.1 for details.
6282 2004-11-27 Martin Baulig <martin@ximian.com>
6284 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
6285 the vtable for generic methods.
6287 2004-11-26 Martin Baulig <martin@ximian.com>
6290 (mono_metadata_generic_method_hash): New public function.
6291 (mono_metadata_generic_method_equal): Likewise.
6294 (MonoGenericContainer): Added `GHashTable *method_hash'.
6296 * reflection.c (ReflectionMethodBuilder): Added
6297 `MonoGenericContainer *generic_container'.
6298 (reflection_methodbuilder_to_mono_method): Don't create a new
6299 MonoGenericContainer each time we're called.
6300 (mono_reflection_bind_generic_method_parameters): Use
6301 `container->method_hash' to cache the results so we don't create a
6302 different method if we're called several times with the same
6305 * loader.c (method_from_methodspec): Use the new
6306 `container->method_hash' here, too.
6308 2004-11-26 Martin Baulig <martin@ximian.com>
6310 * class.c (inflate_generic_signature): Correctly compute
6311 `res->has_type_parameters'.
6312 (mono_class_vtable): Use the `has_type_parameters' flag to
6313 determine whether we're a generic method.
6315 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
6317 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
6319 * object.c (mono_runtime_run_main): Fix a small memory leak.
6321 2004-11-25 Martin Baulig <martin@ximian.com>
6323 * class.c (set_generic_param_owner): Fixed the loop.
6325 2004-11-25 Martin Baulig <martin@ximian.com>
6327 * object.c (mono_class_vtable): Don't create any JIT wrappers for
6330 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
6332 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
6333 names. Fixes #69787.
6335 2004-11-24 Martin Baulig <martin@ximian.com>
6337 * class.c (mono_class_create_generic_2): If we don't have a
6338 `ginst->parent', inflate `gklass->parent' to get our parent.
6340 2004-11-24 Martin Baulig <martin@ximian.com>
6342 * reflection.c (compare_genericparam): Correctly sort the
6343 GenericParam table; fixes #69779.
6345 2004-11-23 Ben Maurer <bmaurer@ximian.com>
6347 * reflection.c: When writing a PE file, don't create a huge
6348 buffer in memory. Just write the arrays we have to the file.
6349 This reduces memory usage.
6351 * metadata-internals.h: MonoDynamicStream pefile is no longer used
6354 2004-11-17 Martin Baulig <martin@ximian.com>
6356 * class.c (mono_class_init): Don't setup `class->parent' for
6357 dynamic instances; moved this to mono_class_generic_2().
6358 (mono_class_create_generic): Also set `klass->inited' for dynamic
6360 (mono_class_create_generic_2): Don't do anything for dynamic
6361 generic instances. Set `klass->parent' here and also call
6362 mono_class_setup_parent() here.
6364 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
6365 `MonoType *parent' argument; set `ginst->parent' before calling
6366 mono_class_create_generic_2(), so we set the correct parent.
6368 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
6370 * reflection.c: allow getting attributes from ModuleBuilder
6373 2004-11-17 Martin Baulig <martin@ximian.com>
6375 * class.c (mono_class_create_from_typedef): If a type parameter is
6376 inherited from an outer class, set its owner to that class.
6378 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
6380 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
6381 for (int*) written size. This fixes bug #69592.
6383 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
6385 * icall.c: Added IsAuthenticodePresnet internal call.
6386 * image.c|h: New function that check a MonoImage for an Authenticode
6387 signature in the certificate PE data directory.
6388 * security.c|h: New internal call to ask the runtime if an
6389 Authenticode signature seems referenced in the PE header.
6391 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
6393 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
6395 * reflection.c (mono_image_create_pefile): Free the assembly streams
6396 after writing out the assembly file.
6398 * object.c (mono_runtime_run_main): Fix small memory leak.
6400 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
6401 property access modifiers. Fixes #69389.
6403 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
6405 * domain.c, object.c, object-internals.h, domain-internals.h,
6406 object.h, marshal.c: keep dynamic code info per domain.
6408 2004-11-15 Martin Baulig <martin@ximian.com>
6410 * class.c (mono_type_get_name_recurse): Put type arguments in
6411 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
6414 2004-11-15 Martin Baulig <martin@ximian.com>
6416 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
6417 (mono_class_setup_vtable): When computing `the_cname' for a
6418 generic instance, don't include the namespace since we'd otherwise
6421 2004-11-15 Martin Baulig <martin@ximian.com>
6423 * class.c (mono_class_create_generic): Changed return type to void.
6424 (mono_class_create_generic_2): New public function; setup
6425 `class->method', `class->field' and `class->interfaces' here
6426 instead of in mono_class_init().
6428 * class.h (mono_class_create_generic): Moved to class-internals.h.
6430 2004-11-14 Ben Maurer <bmaurer@ximian.com>
6432 * reflection.c (mono_image_create_pefile): take a file HANDLE.
6433 rather than writing to memory, write to this file. Right now,
6434 we are just writting into a buffer, and copying that. However
6435 we can avoid the buffer later.
6437 (mono_dynamic_stream_reset): new function
6439 * icall.c, object-internals.h: update for the above.
6441 2004-11-13 Ben Maurer <bmaurer@ximian.com>
6443 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
6444 have been using gc'd memory. First it is slower, unlikely
6445 the comment in the source code said, secondly, it increases
6446 our footprint to do it in the gc.
6448 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
6449 the method so that it does not have to copy to managed code.
6451 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
6453 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
6455 2004-11-12 Martin Baulig <martin@localhost>
6457 * reflection.c (mono_image_create_token): Allow generic method
6458 definitions here, since they may appear in an `.override'; see
6459 gen-98/gen-99 for an example.
6461 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
6463 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
6466 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
6469 2004-11-11 Martin Baulig <martin@ximian.com>
6471 * class.c (mono_class_setup_vtable): In an explicit interface
6472 implementation, the method name now includes the arity.
6474 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
6476 * object.c (mono_array_full_copy): Fix warning.
6478 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
6480 * appdomain.c: Removed look_for_method_by_name(). Use the new method
6481 mono_class_get_method_from_name() instead.
6483 * class-internals.h: Added two new types of wrappers.
6484 Added MonoRemotingTarget enum. Added new trampoline function type, which
6485 takes an additional MonoRemotingTarget value as parameter, so it is
6486 possible to request a trampoline for a specific target.
6488 * class.c: Added new mono_class_get_method_from_name() method.
6490 * class.h: In MonoRemoteClass, we can have now to vtables, one for
6491 general remoting sinks and one specific for cross domain calls.
6493 * debug-helpers.c: Added new wrapper names.
6495 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
6498 * image.c: Porperly delete value objects form the remoting invoke hashtable.
6500 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
6501 with several other methods (mono_marshal_get_xappdomain_dispatch,
6502 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
6503 and others) can generate a fast remoting wrapper for cross domain calls.
6504 More information can be found in docs/remoting.
6505 Other changes: Removed mono_find_method_by_name, and used
6506 mono_class_get_method_from_name instead.
6507 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
6508 is stored in the remoting invoke hashtable.
6510 * marshal.h: published the new method for getting the xdomain wrapper,
6511 and also added a method for getting the adequate wrapper for a given
6514 * object-internals.h, object.c: Added a couple of methods for capying and
6516 Modified mono_install_remoting_trampoline, which takes the new remoting
6517 trampoline that has a remoting target as parameter.
6518 mono_class_proxy_vtable now also takes a remoting target as parameter, and
6519 will return the most suitable vtable for the target.
6520 Added mono_remote_class_vtable, which returns the vtable of a remote class
6521 (which can be the normal remoting vtable or the xdomain vtable).
6523 * threads.c: the xdomain invoke and dispatch wrappers must also be
6524 protected against interruptions.
6526 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6528 * icall.c: use memmove in BlockCopyInternal when the source and
6529 destination arrays are the same.
6531 2004-11-09 Martin Baulig <martin@ximian.com>
6533 * class-internals.h (MonoGenericContainer): Removed `method' and
6534 `signature', replaced them with `is_method' and `is_signature'
6535 flags. Added `context'.
6537 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
6538 instead of a `MonoGenericContainer *'.
6540 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
6541 for dynamic type parameters.
6542 (mono_metadata_load_generic_params): Setup `container->context'.
6544 * reflection.c (mono_reflection_setup_generic_class): Setup
6545 `tb->generic_container->context'.
6546 (do_mono_reflection_bind_generic_parameters): Use
6547 mono_class_inflate_generic_type() to correctly inflate types,
6548 rather than using our own hack just for MONO_TYPE_VAR.
6550 2004-11-09 Martin Baulig <martin@ximian.com>
6552 * class.c (mono_class_inflate_generic_method): Small fix; don't
6556 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
6557 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
6558 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
6559 (ves_icall_Type_BindGenericParameters): Likewise.
6560 (ves_icall_Type_get_IsGenericInstance): Likewise.
6561 (ves_icall_Type_GetGenericParameterPosition): Likewise.
6562 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
6563 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
6564 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
6566 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
6568 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
6569 assembly versions and public key tokens. Fixes #69113.
6571 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
6573 * metadata.c: fix bug introduced with the type cache changes
6576 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
6578 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
6579 the MonoClass pointer instead of the token in exception clauses.
6580 * reflection.c: updates for the above and make the code not depend
6581 on the structure of MonoExceptionClause.
6583 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
6585 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
6586 Add support for dynamic assemblies. Fixes #69114.
6588 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
6590 2004-11-07 Ben Maurer <bmaurer@ximian.com>
6592 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
6593 since most only those methods use it. the code member of
6594 MonoMethodPInvoke was dead, so that can be removed too. Also,
6595 remove inline_count (again, not used), and move slot so that it
6596 can share bits with some other flags. This saves 8 bytes in the
6597 structure and gives us about 50 kb back for mcs helloworld.cs
6599 * *.[ch]: Do naming changes for the above.
6601 * loader.c (mono_method_get_header): Lazily init the header
6603 (mono_get_method_from_token): don't init the header here
6604 (mono_free_method): the header may never be allocated
6606 Overall, this saves 150 kb of unmanaged allocations
6607 for mcs helloworld.cs. That accounts for 10% of the unmanaged
6610 * loader.c, loader.h (mono_method_get_header): new accessor.
6612 * *.[ch]: use the above method. Prepares us to lazily load
6615 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
6616 three warnings, which are actual bugs (see 69206).
6618 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
6619 unused. Saves a cool 4 bytes / method.
6621 2004-11-06 Ben Maurer <bmaurer@ximian.com>
6623 * metadata.c (builtin_types): Add types for System.Object here.
6624 (mono_metadata_parse_type_full): Cache MonoType*'s that are
6625 for a class or valuetype from klass->this_arg or klass->byval_arg.
6627 On mcs for a hello world, this gets us down from 21836 MonoType's
6630 (mono_metadata_free_type): Account for the above change.
6632 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
6634 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
6635 exception instead of asserting if name is null.
6636 (ves_icall_System_AppDomain_GetData): Ditto.
6638 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
6640 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
6643 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
6644 Return NULL when the domain does not have entry_assembly set.
6646 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
6647 Add a 'resource_modules' argument.
6648 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
6650 * reflection.c (mono_reflection_create_runtime_class): Move setting
6651 of wastypebuilder here, so mono_get_type_object () returns a MonoType
6654 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
6655 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
6656 Throw an ArgumentNullException if 'ptr' is null.
6658 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
6659 assemblies here. Fixes #69020.
6661 2004-11-05 Geoff Norton <gnorton@customerdna.com>
6663 * reflection.c (build_compressed_metadata): Fix the previous patch for
6664 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
6667 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
6669 * assembly.c (mono_assembly_names_equal): Allow a match if one of
6670 the cultures is false. Fixes #69090.
6672 * reflection.c (build_compressed_metadata): Fix invalid memory read
6673 detected by valgrind.
6675 * reflection.c (mono_reflection_get_type): Avoid triggering a
6676 TypeResolve multiple times for the same type. Fixes #65577.
6678 2004-11-04 Ben Maurer <bmaurer@ximian.com>
6680 * marshal.c: Avoid using ldftn to call managed functions. It is
6681 much slower than just a call.
6683 * reflection.c (mono_module_get_object): free the basename we
6684 allocate here from glib.
6686 * reflection.c (ensure_runtime_vtable): make sure to free
6687 overrides. Also, we were allocating an array of MonoMethod not an
6688 array of MonoMethod*.
6690 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
6692 * image.c (mono_image_close): free image->guid here.
6694 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
6696 * reflection.c: Fix some spec conformance issues with the PE file
6697 structures so mcs compiled apps run on the Net 2.0 beta.
6699 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
6701 * string-icalls.c (ves_icall_System_String_ctor_encoding):
6702 Implement this. Fixes #67264.
6704 * debug-helpers.h debug-helpers.c marshal.c: Move
6705 mono_find_method_by_name to debug-helpers.c.
6707 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
6709 * object.c (mono_release_type_locks): type_initialization_hash is
6712 * reflection.c object.c object-internals.h: Fix warnings.
6714 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
6715 without accessors. Fixes #61561.
6717 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
6718 application base from the root domain if not set. Fixes #65641.
6719 (mono_runtime_init): Fix warning.
6721 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6723 * appdomain.c: call mono_thread_pool_init.
6724 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
6725 of worker threads based on the number of CPUs and the environment
6726 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
6727 for non-windows (windows) systems.
6729 2004-10-27 Chris Toshok <toshok@ximian.com>
6731 * mono-debug-debugger.c (write_class): don't call mono_class_init
6732 here, as even with the check for (!klass->init_pending), we get
6733 into a situation where we're hitting cycles in class
6734 initialization. Fixes #68816.
6736 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
6738 * image.c: Avoid overwriting values in the loaded_images_hash when an
6739 assembly is loaded multiple times. Fixes #61152.
6741 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
6742 so multiple satellite assemblies for the same name can be loaded.
6745 * mono_domain_assembly_preload: Actually return the loaded assembly,
6748 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
6749 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
6751 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
6752 pending finalizers are not invoked after the appdomain has been
6753 unloaded. Fixes #67862.
6755 2004-10-22 Martin Baulig <martin@ximian.com>
6757 * mono-debug-debugger.c
6758 (mono_debugger_runtime_invoke): Don't box valuetypes.
6760 2004-10-22 Chris Toshok <toshok@ximian.com>
6762 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
6763 don't hide private methods.
6765 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
6767 * icall.c: Allows the runtime to "share" (when known) the public key
6768 token of an assembly. This avoid the need to recalculate the token
6769 (from the public key) in managed code.
6771 2004-10-21 Chris Toshok <toshok@ximian.com>
6773 * debug-helpers.c (append_class_name): argh, revert last patch.
6775 2004-10-21 Chris Toshok <toshok@ximian.com>
6777 * debug-helpers.c (append_class_name): use '+' as the delimiter,
6778 not '/', so that it matches what the debugger uses to look up
6781 2004-10-21 Martin Baulig <martin@ximian.com>
6783 * mono-debug-debugger.c (mono_debugger_throw_exception): New
6784 public method; this is called each time an exception is thrown and
6785 allows the debugger to use exception catch points.
6787 2004-10-21 Martin Baulig <martin@ximian.com>
6789 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
6790 the stack pointer and the exception object in some struct and pass
6791 that to the debugger.
6793 2004-10-21 Chris Toshok <toshok@ximian.com>
6795 * mono-debug-debugger.c (do_write_class): add instance/static
6796 event support. We don't expose "raise" or "other" yet.
6797 (event_is_static): new method.
6799 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
6801 * mono-debug-debugger.c
6802 (mono_debugger_handle_exception): Remove
6803 bogus return value for fussy compilers.
6805 2004-10-20 Martin Baulig <martin@ximian.com>
6807 * mono-debug-debugger.c
6808 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
6809 (mono_debugger_handled_exception): Likewise.
6811 2004-10-20 Martin Baulig <martin@ximian.com>
6813 * mono-debug-debugger.h (MonoDebuggerEvent): Added
6814 MONO_DEBUGGER_EVENT_EXCEPTION.
6816 * mono-debug-debugger.c (mono_debugger_handle_exception): New
6817 public function to send the debugger a notification for an
6818 exception and inform it about a catch/finally clause.
6820 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
6822 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
6823 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
6826 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
6828 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
6830 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
6831 marshalled as [In,Out]. Fixes #58325.
6833 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
6835 * reflection.c (mono_method_body_get_object): Implement some fields.
6837 2004-10-12 Martin Baulig <martin@ximian.com>
6839 * reflection.c (mono_reflection_bind_generic_parameters): Small
6840 fix, correctly retrieve our parent from a generic instance.
6842 2004-10-12 Martin Baulig <martin@ximian.com>
6844 * metadata.c (mono_metadata_generic_param_equal): We always have
6848 (mono_class_from_generic_parameter): We need to have an owner.
6849 (my_mono_class_from_generic_parameter): Likewise.
6851 * reflection.c (mono_reflection_setup_generic_class): Renamed to
6852 mono_reflection_create_generic_class() and added a new
6853 mono_reflection_setup_generic_class().
6854 (mono_reflection_initialize_generic_param): If we're a nested
6855 generic type and inherited from the containing class, set our
6856 owner to the outer class.
6858 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
6860 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
6862 * reflection.c (mono_method_body_get_object): New function to create
6863 a MethodBody object.
6865 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
6867 2004-10-11 Martin Baulig <martin@ximian.com>
6869 * metadata.c (_mono_metadata_type_equal): Renamed to
6870 do_mono_metadata_type_equal() and made static.
6872 2004-10-11 Martin Baulig <martin@ximian.com>
6874 * appdomain.c: Bump corlib version number to 28.
6876 2004-10-10 Martin Baulig <martin@ximian.com>
6879 (MonoGenericInst): Added `MonoGenericContainer *container'.
6880 (MonoGenericMethod): Likewise.
6881 (MonoGenericContext): Likewise.
6882 (MonoGenericParam): Added `MonoGenericContainer *owner'.
6885 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
6886 (do_mono_metadata_parse_generic_inst): Likewise.
6887 (mono_metadata_parse_type_full): New public method. This is the actual
6888 mono_metadata_parse_type() implementation - with an additional
6889 `MonoGenericContainer *' argument.
6890 (mono_metadata_parse_array_full): Likewise.
6891 (mono_metadata_parse_signature_full): Likewise.
6892 (mono_metadata_parse_method_signature_full): Likewise.
6893 (mono_metadata_parse_mh_full): Likewise.
6894 (mono_type_create_from_typespec): Likewise.
6895 (mono_metadata_interfaces_from_typedef_full): New public method;
6896 this is similar to the other _full() methods, but we take a
6897 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
6898 (mono_metadata_parse_generic_param): Take an additional
6899 `MonoGenericContainer *' argument and lookup the MonoGenericParam
6900 from that container.
6901 (mono_metadata_generic_param_equal): New static method to compare
6902 two type parameters.
6903 (_mono_metadata_type_equal): New static method; takes an
6904 additional `gboolean signature_only' argument - if true, we don't
6905 compare the owners of generic parameters.
6906 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
6907 with a TRUE argument - do a signature-only comparision.
6909 * loader.c: Use the new _full() methods and pass the
6910 MonoGenericContainer to them.
6912 * object-internals.h (MonoReflectionTypeBuilder): Added
6913 `MonoGenericContainer *generic_container' field.
6914 (MonoReflectionMethodBuilder): Likewise.
6916 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
6918 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
6919 case initial images of dynamic assemblies.
6921 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
6923 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
6925 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
6926 length of event->other array.
6927 (typebuilder_setup_events): Ditto.
6929 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
6930 'assembly_by_name' and add an 'assemblies' list.
6932 * assembly.h assembly.c: Add a new search hook for determining whenever
6933 an assembly is already loaded. Use this instead of searching in the
6934 loaded_assemblies list.
6936 * domain.c appdomain.c: Implement the new search hook so loaded
6937 assemblies are now scoped by appdomain. Fixes #67727.
6939 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
6941 * threads.c (mono_thread_attach): Initialize synch_lock field so
6942 mono_thread_detach works again.
6944 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
6945 'lib' too. Fixes #63130.
6947 2004-10-06 Jackson Harper <jackson@ximian.com>
6949 * culture-info-tables.h: regenerated.
6951 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
6953 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
6954 implemented by other interfaces in the result. Fixes #65764.
6956 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
6957 Handle unloadable modules without crashing.
6959 * image.c (load_modules): Revert the previous patch since modules must
6960 have a fixed index inside the array.
6962 * image.c (load_modules): Don't include native modules in the modules
6965 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
6967 * reflection.h: Add param_defaults field.
6969 * reflection.c: Add support for parameter defaults in dynamic methods.
6972 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
6973 an empty string when a type has no namespace. Fixes #64230.
6975 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
6977 * tabledefs.h: Added "internal" security actions to support non-CAS
6978 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
6979 Note: they do not seems to be used anymore in 2.0 (new metadata format)
6981 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
6983 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
6984 constructor of abstract class. Fixes #61689.
6986 2004-10-04 Martin Baulig <martin@ximian.com>
6988 * class-internals.h (MonoGenericContainer): New type.
6989 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
6990 `MonoGenericContainer *generic_container'.
6991 (MonoClass): Replaced `gen_params' and `num_gen_params' with
6992 `MonoGenericContainer *generic_container'.
6994 * metadata.c (mono_metadata_load_generic_params): Return a
6995 `MonoGenericContainer *' instead of a `MonoGenericParam *';
6996 removed the `num' argument.
6998 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
7000 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
7003 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
7006 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
7008 * reflection.c: Save pe_kind and machine values into the generated
7011 * appdomain.c: Bump corlib version number.
7013 * object-internals.h: Reorganize layout of LocalBuilder.
7015 * class-internals.h class.c (mono_class_get_implemented_interfaces):
7016 New helper function.
7018 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
7019 created MonoType for dynamic types. Fixes #66180.
7021 2004-10-02 Ben Maurer <bmaurer@ximian.com>
7023 * threadpool.c: the ares hashtable needs a critical section around it.
7024 this prevents some nasty segfaults
7026 2004-10-02 Massimiliano Mantione <massi@ximian.com>
7028 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
7029 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
7032 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
7034 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
7036 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
7038 * image.c: Always canonicalize image file names, to avoid loading
7039 the same assembly twice when referenced using a relative path.
7041 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
7043 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
7045 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7047 * marshal.c: Fix warnings.
7049 2004-09-29 Geoff Norton <gnorton@customerdna.com>
7051 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
7052 attempting to marshal the delegate_trampoline as the method_addr.
7053 This patch has a static hashtable of marshalled delegates so that
7054 we can map delegate_trampoline addresses back to delegates. This
7055 allows a delegate passed to managed code to be passed back into native
7058 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
7060 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
7062 * reflection.c (method_encode_code): Align method headers properly.
7065 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
7067 * marshal.c: In the runtime invoke wrapper, reset the abort
7068 exception if it is cached. This avoids the automatic rethrowal of
7069 the exception after the catch of the wrapper. Also check for pending
7070 interruptions before calling the managed method. This is done using
7071 the new method emit_thread_force_interrupt_checkpoint, since the
7072 normal checkpoint method is ignored when running the invoke wrapper.
7073 * object.c: If the abort exception is rethrown, set the abort_exc
7074 field of the thread, so it will be rethrown aftere every catch.
7075 * threadpool.c: Only run an interruption checkpoint if what has been
7076 requested is a stop of the thread (aborts will be ignored).
7077 * threads.c: By default, a thread will now never be interrumped while
7078 running the runtime invoke wrapper (this ensures that runtime_invoke
7079 will always return to the caller if an exception pointer is provided).
7080 There is a new special method mono_thread_force_interruption_checkpoint()
7081 to force an interruption checkpoint even if running a protected
7082 wrapper, which is used by the same runtime invoke wrapper to do a check
7085 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
7087 * object.c, object-internals.h: Implemented mono_release_type_locks,
7088 which releases the cctor locks held by a thread.
7089 * threads.c, threads.h: In thread_cleanup, release cctor locks held
7090 by a thread. Added mono_thread_exit() method to be used to safely stop
7093 2004-09-28 Raja R Harinath <rharinath@novell.com>
7095 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7096 Move null check before dereference. Avoid indexing beyond the end
7097 of the 'modules' array.
7099 2004-09-28 Raja R Harinath <rharinath@novell.com>
7101 * metadata-internals.h (MonoImage): Add module_count field.
7102 * image.c (load_modules): Set image->module_count.
7103 (mono_image_load_file_for_image): Use image->module_count.
7104 * reflection.c (mono_image_load_module): Append to image->modules array
7105 of dynamic assembly.
7106 (mono_module_get_object): Fix loop to actually increment index.
7107 Use image->module_count.
7108 * assembly.c (mono_assembly_load_references): Use image->module_count.
7109 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7112 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
7114 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
7115 Avoid assert on generic types.
7117 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
7119 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
7121 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
7123 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
7124 function to convert a MarshalSpec structure to its managed counterpart.
7126 * reflection.c: Fix warnings.
7128 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
7131 * icall.c (mono_create_icall_signature): Fix build.
7133 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
7135 * icall.c: Add MakePointType icall.
7137 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
7140 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7142 * threadpool.c: reuse allocated slots in the queue.
7144 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
7146 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
7148 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
7150 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
7153 * tabledefs.h: Add constants for pinvoke attributes BestFit and
7154 ThrowOnUnmappableChar.
7156 * icall.c (ves_icall_Type_GetPacking): New icall.
7158 2004-09-24 Martin Baulig <martin@ximian.com>
7160 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
7162 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7165 (mono_domain_set): allow setting a domain that is being unloaded.
7166 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
7169 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
7171 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
7172 the GetCustomAttributes icall.
7174 2004-09-23 Martin Baulig <martin@ximian.com>
7176 * object-internals.h (MonoReflectionGenericParam): Replaced
7177 'has_ctor_constraint', `has_reference_type' and `has_value_type'
7178 with `guint32 attrs'.
7180 2004-09-23 Martin Baulig <martin@ximian.com>
7182 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
7184 2004-09-23 Martin Baulig <martin@ximian.com>
7186 * object-internals.h (GenericParameterAttributes): New enum.
7188 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
7190 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
7192 * class.c (init_events): Fill out event->other field.
7194 * class.c: Fix warnings.
7196 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
7198 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7200 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
7201 walk which doesn't supply the IL offset.
7203 2004-09-22 Martin Baulig <martin@ximian.com>
7205 * reflection.c (mono_reflection_setup_internal_class): If we're
7206 System.ValueType, System.Object or System.Enum, set
7207 `klass->instance_size' and create the vtable.
7208 (mono_reflection_create_internal_class): If we're an enum type,
7209 get the base class from our current corlib.
7211 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
7213 * reflection.h (MonoResolveTokenError): New type.
7215 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
7218 * icall.c: Add an 'error' argument to the ResolveToken icalls.
7220 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
7222 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
7223 Support also calling constructors, but only for already allocated objects.
7225 2004-09-17 Geoff Norton <gnorton@customerdna.com>
7227 * reflection.c (type_get_qualified_name): If the klass is null
7228 return the typename to avoid a NullRefEx.
7229 (encode_cattr_value): Get the qualified name of the boxed type,
7230 not the underlying enumtype. Fixes #62984.
7232 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
7234 * marshal.c: Fix problems with previous checkin.
7236 2004-09-21 <vargaz@freemail.hu>
7238 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
7239 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
7241 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
7243 2004-09-21 Geoff Norton <gnorton@customerdna.com>
7245 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
7246 should only return a type for pointers, arrays, and passbyref types.
7249 2004-09-21 Martin Baulig <martin@ximian.com>
7251 * domain.c (mono_debugger_check_runtime_version): New public
7254 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
7256 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
7258 * reflection.c: Added missing sort to the declarative security
7259 attributes table. MS implementation stops seeing the attributes if the
7260 token number regress in the table (as shown by ildasm and permview).
7262 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
7264 * object-internals.h (MonoReflectionModule): Add 'token' field.
7266 * reflection.c (mono_reflection_get_token): Add support for Module
7268 (mono_module_get_object): Set 'token' field.
7269 (mono_module_file_get_object): Set 'token' field.
7271 * icall.c: Add new Assembly and Module icalls.
7273 * appdomain.c: Bump corlib version.
7275 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
7277 * loader.h loader.c class.h class.c: Add helper functions for obtaining
7278 tokens of metadata objects.
7280 * reflection.h reflection.c (mono_reflection_get_token): New function
7281 to obtain the token of a metadata object.
7283 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
7285 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
7287 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
7289 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
7291 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
7293 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
7294 * object-internals.h: Added 3 MonoArray* members to MonoReflection
7295 AssemblyBuilder to access the permissions set in the class lib.
7296 * reflection.c: Added security attributes encoding step in
7297 mono_image_build_metadata.
7298 * tabledefs.h: Added new security actions defined in 2.0:
7299 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
7301 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
7303 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
7306 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
7308 * locales.c: nullify the ICU_collator member of CompareInfo when it is
7309 finalized. There where random SIGSEVs at program termination, when
7310 an object being finalized was trying to do a string comparison and
7311 the current culture was already finalized.
7313 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7315 * threads.c: call thread_cleanup before finishing the thread if we get
7318 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
7320 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
7321 assemblies from the parent. Fixes #65665.
7323 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
7325 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
7328 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
7330 * reflection.h: add prototype for mono_get_dbnull_object
7331 * reflection.c: add prototypes for get_default_param_value_blobs
7332 and mono_get_object_from_blob for fussier compilers
7334 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
7336 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
7337 false deadlock checks in class initialization.
7339 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
7341 * image.c (mono_image_addref): Fix comment.
7343 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
7346 2004-09-12 Jambunathan K <kjambunathan@novell.com>
7348 * reflection.c (mono_param_get_objects): Modified to return
7349 ParameterInfo.DefaultValue object.
7351 (get_default_param_value_blobs):
7352 (mono_get_object_from_blob):
7353 (mono_get_dbnull_object): New helper routines.
7355 * object.c (mono_get_constant_value_from_blob): New helper routine
7356 carved out from get_default_field_value ()
7358 * object-internals.h (mono_get_constant_value_from_blob): Added
7359 function declaration.
7361 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
7363 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
7364 referenced assemblies. Fixes #62135.
7366 * exception.h exception.c (mono_get_exception_file_not_found2): New
7369 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
7371 * class.h class.c: Add mono_type_get_underlying_type ().
7373 2004-09-09 Geoff Norton <gnorton@customerndna.com>
7375 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
7376 Fix GetTypes() to support dynamically created assemblies.
7378 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
7380 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
7382 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
7385 * reflection.h reflection.c loader.c: Allow dynamic construction of
7386 pinvoke methods. Fixes #65571.
7388 * reflection.c (mono_reflection_get_type): Revert previous change since
7389 it causes regressions.
7391 2004-09-08 Martin Baulig <martin@ximian.com>
7393 * class.c (class_compute_field_layout): Don't call
7394 mono_class_layout_fields() for open generic instances.
7396 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
7397 * threads.c appdomain.c: fix typo in GC macro
7399 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7401 * threads.c: don't call mono_thread_detach() in start_wrapper(),
7402 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
7404 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
7406 * image.c (mono_image_close): Applied patch from
7407 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
7408 assembly is loaded multiple times from data.
7410 * image.c (mono_image_open): Fix warning.
7412 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
7414 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
7417 * reflection.c (mono_reflection_create_runtime_class): Initialize
7418 klass->nested_classes. Fixes #61224.
7420 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
7422 * threads.c: sched_yield() on exit, to allow threads to quit.
7424 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
7426 * object.c (mono_unhandled_exception): Remove leftover debug code.
7428 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
7430 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
7432 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
7434 * marshal.c (emit_marshal_array): Really null terminate string arrays.
7436 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
7438 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
7440 * marshal.c (emit_marshal_array): Null terminate string arrays.
7442 * marshal.c (raise_auto_layout_exception): Fix warning.
7444 * reflection.c (mono_param_get_objects): Initialize the default value
7445 with DBNull.Value, not null. Fixes #62123.
7447 2004-09-01 Miguel de Icaza <miguel@ximian.com>
7449 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
7450 throw an exception with a cute explanation.
7452 2004-09-06 Dick Porter <dick@ximian.com>
7454 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
7455 Close the new process's thread handle, as we don't use it. The
7456 handle stays around forever otherwise.
7458 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
7460 * object.c (arith_overflow): Fix warning.
7462 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
7463 calling conventions in method refs. Fixes #65352.
7465 * reflection.c: Fix warnings.
7467 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
7469 * icall.c: Add a new icall for Array.Clear
7471 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
7473 * object.c: When allocating an array, we have to throw
7474 an overflow exception if any of the lengths are < 0.
7476 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
7478 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
7479 properly. Also move implementation of string array marshalling to
7480 managed code. Fixes #42316.
7482 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7484 * assembly.c: provide more information when loading an assembly fails.
7486 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7488 * filewatcher.c: don't expect the development fam package to be
7491 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
7493 * marshal.c: Make a copy of the signature cookie since it will be
7494 freed by the caller.
7496 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
7498 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
7500 * metadata.c (mono_metadata_free_marshal_spec): New function to free
7503 * marshal.c: More refactoring.
7505 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
7508 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
7510 * object.c: In mono_message_invoke, fill the output parameter array after
7511 calling the managed method (it was done before the call). This fixes
7514 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
7516 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
7519 2004-09-02 Martin Baulig <martin@ximian.com>
7521 * class.c (mono_class_instance_size): Don't allow generic type
7522 definitions or open generic instances.
7523 (mono_class_array_element_size): If we're a value type, call
7524 mono_class_instance_size() on the original class.
7526 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
7527 handle generic instances.
7529 * mono-debug-debugger.c (write_type): Handle generic instances
7532 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
7534 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
7535 the allocation request fails. Fixes #65089.
7537 * object.c (mono_runtime_free_method): Do not call mono_free_method.
7539 * object.c (mono_runtime_free_method): New function to free a dynamic
7542 * marshal.c (mono_delegate_free_ftnptr): New function to free the
7543 delegate trampoline.
7545 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
7546 with hasthis as dynamic,
7548 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
7550 * domain.c (mono_jit_info_table_remove): New function to remove an
7551 entry from the jit info table.
7553 * class-internals.h (MonoMethod): Add 'dynamic' field.
7555 * loader.c: Fix warnings.
7557 2004-09-01 Martin Baulig <martin@ximian.com>
7559 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
7560 instead of mono_debugger_lock() because the latter one is a no-op
7561 unless running in the debugger.
7563 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
7565 * class.c (class_compute_field_layout): Classes with auto-layout or
7566 reference fields are not blittable.
7568 2004-09-01 Dick Porter <dick@ximian.com>
7570 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
7571 mono_image_get_filename() to get the assembly location.
7574 * metadata.h: Fix compile warnings
7576 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
7578 * class.c (class_compute_field_layout): System.Object is blittable.
7580 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
7581 as in/out. Fixes #59909.
7583 2004-09-01 Martin Baulig <martin@ximian.com>
7585 * metadata.h (MONO_TYPE_ISREFERENCE): Call
7586 mono_metadata_generic_inst_is_valuetype() if we're a generic
7587 instance to check whether our underlying type is a reference type.
7589 2004-09-01 Martin Baulig <martin@ximian.com>
7591 * metadata.c (mono_type_size): If we're a generic instance, call
7592 mono_class_value_size() for value types.
7594 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
7596 * marshal.c: Implement more custom marshalling functionality. Fixes
7599 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
7601 * mono-debug.c, debug-mono-symfile.c: add some locking love.
7603 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
7605 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
7607 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
7609 * icall.c: Fix some warnings.
7611 * threads.c (abort_appdomain_thread): Fix unref errors.
7612 (mono_thread_current): Fix THREAD_DEBUG define.
7614 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
7616 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
7618 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
7620 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
7622 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
7625 2004-08-28 Martin Baulig <martin@ximian.com>
7628 (mono_metadata_generic_inst_is_valuetype): New public function.
7630 * metadata.h (MONO_TYPE_ISSTRUCT): Call
7631 mono_metadata_generic_inst_is_valuetype() if we're a generic
7632 instance to check whether our underlying type is a valuetype.
7634 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
7636 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
7639 2004-08-25 Martin Baulig <martin@ximian.com>
7641 * loader.c (mono_get_method_from_token): Abstract methods can also
7642 be generic and thus have type parameters.
7644 * metadata-internals.h
7645 (MonoDynamicImage): Added `GPtrArray *gen_params'.
7647 * reflection.c (mono_image_get_generic_param_info): Don't create a
7648 metadata row, just add an entry to the `gen_params' array.
7649 (build_compressed_metadata): Sort the `gen_params' array and then
7650 actually create the metadata.
7652 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7654 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
7656 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
7658 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
7660 2004-08-24 Martin Baulig <martin@ximian.com>
7662 * class.cs (mono_class_is_subclass_of): Like an interface, a
7663 generic instance also derives from System.Object.
7665 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
7667 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
7668 custom modifiers to be in any order. Fixes #61990.
7670 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
7672 * object.c: Register mono_object_new_fast icall.
7674 * object.c (mono_class_get_allocation_ftn): Return to calling
7675 mono_object_new_fast, since it seems faster to compute the object
7676 size in unmanaged code than passing it as a parameter.
7678 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
7680 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
7681 this function with Boehm as the oom handler, so we don't have to check
7682 the result of GC_malloc.
7684 * object.c: Remove checks for oom.
7686 * object.h object.c (mono_class_get_allocation_ftn): New function to
7687 return the icall which can be used to allocate an instance of a given
7690 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
7692 * class-internals.h: Add 'enabled' field.
7694 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
7696 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
7698 2004-08-18 Jambunathan K <kjambunathan@novell.com>
7699 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
7702 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
7704 * appdomain.c: use the Tls function for appdomain too,
7705 at Zoltan's request. Actually return in mono_context_get
7707 * appdomain.c, profiler.c, threads.c: use __thread
7709 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
7711 * appdomain.c threads.c: Call GC_CreateThread on windows.
7713 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
7714 multiple libraries since this don't work on windows.
7716 2004-08-18 Martin Baulig <martin@ximian.com>
7719 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
7722 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
7723 MonoMethodNormal since we also need it for abstract and interface
7727 (build_compressed_metadata): Sort the GenericParam table.
7728 (mono_image_create_token): Added `gboolean create_methodspec'
7729 argument; this is false when generating a MethodImpl token.
7730 (reflection_methodbuilder_to_mono_method): Abstract and interface
7731 methods may also have generic parameters.
7733 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
7735 * appdomain.c: thread local alloc
7737 2004-08-17 Martin Baulig <martin@ximian.com>
7739 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
7742 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
7745 * class.c (mono_type_get_full_name): New public function.
7746 (mono_type_get_name): Don't include the type arguments.
7748 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
7750 * Makefile.am: Build static versions of libmetadata and libmonoruntime
7751 for inclusion into the mono executable.
7753 2004-08-16 Martin Baulig <martin@ximian.com>
7755 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
7756 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
7758 2004-08-14 Martin Baulig <martin@ximian.com>
7760 * class.c (dup_type): Also copy the `byref' field.
7762 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
7764 * reflection.c (create_dynamic_mono_image): Revert the last change
7765 since it breaks bootstrap.
7767 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
7769 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
7771 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
7772 not free them with g_free.
7774 2004-08-11 Martin Baulig <martin@ximian.com>
7776 * reflection.c (mono_reflection_setup_internal_class): Also call
7777 mono_class_setup_mono_type() if we already have a `tb->type.type'.
7779 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
7781 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
7782 called during default (first) AppDomain creation. Keep track of
7783 Evidence when loading assemblies.
7785 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
7787 * opcodes.c, opcodes.h: reduce runtime relocations.
7789 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
7791 * culture-info.h, locales.c: fixes and chages to sue the new
7792 optimized format of the locale data.
7793 * culture-info-tables.h: regenerated.
7795 2004-08-06 Geoff Norton <gnorton@customerdna.com>
7797 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
7799 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
7801 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
7802 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
7803 * domain-internals.h: icall declaration.
7804 * icall.c: icall registration.
7805 * object-internals.h: New fields in MonoAssembly for CAS.
7807 2004-08-05 Duncan Mak <duncan@ximian.com>
7809 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
7812 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
7814 * reflection.c: fix to deal with object[] arrays in custom ctors
7817 2004-08-05 Martin Baulig <martin@ximian.com>
7819 * class.c (mono_class_array_element_size): Added support for
7820 generic instances and correctly handle "recursive" types.
7822 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
7824 * assembly.c: Fix warnings.
7826 2004-08-04 Martin Baulig <martin@ximian.com>
7829 (mono_type_get_name_recurse): Added `gboolean include_arity'
7830 argument specifying whether or not we should include the generic
7831 arity in the type name.
7832 (_mono_type_get_name): New static function.
7833 (mono_class_setup_vtable): If we're a generic instance, don't
7834 include the generic arity in the names of explicit method
7837 2004-08-03 Martin Baulig <martin@ximian.com>
7839 * class.c (mono_type_get_name_recurse): Enclose the generic type
7840 arguments in `<', '>'.
7842 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7844 * gc.c: make GC warning messages use the trace API, they are just
7845 noise to most of the users.
7847 2004-08-03 Martin Baulig <martin@ximian.com>
7849 * debug-mono-symfile.c (read_string): Correctly read the string.
7851 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
7853 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
7855 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
7857 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
7859 2004-07-30 Martin Baulig <martin@ximian.com>
7861 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
7862 Reflect latest symbol writer changes.
7864 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7866 * object.c: always create an object if null is passed
7867 to Invoke() where a valuetype is expected.
7869 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
7871 * marshal.c (mono_marshal_init): make managed
7872 signatures match native ones better for 64bits.
7874 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7876 * appdomain.c: hack to build correctly the private bin path on windows.
7879 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
7881 * assembly.c: Load mscorlib from the correct framework directory
7882 (mono/<version>/mscorlib.dll).
7883 * appdomain.h: Added prototypes for new functions.
7884 * internals.h: Added some prototypes.
7885 * domain.c: When initializing the runtime, get from the executable and
7886 the configuration files the runtime version that the app supports.
7887 Added support methods for reading app.exe.config. Added list of versions
7888 supported by the JIT. Added two new methods: mono_init_from_assembly,
7889 which initializes the runtime and determines the required version from
7890 the provided exe file, and mono_init_version, which initializes
7891 the runtime using the provided version.
7892 * icall.c: Get machine.config from version-specific directory.
7893 * reflection.c: When generating an image, embed the version number
7894 of the current runtime.
7896 2004-07-28 Dick Porter <dick@ximian.com>
7899 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
7900 returned sockaddr size before creating the remote address object.
7901 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
7904 2004-07-28 Dick Porter <dick@ximian.com>
7906 * locales.c (string_invariant_compare_char): Fix invariant char
7907 compares between upper and lower cases. Fixes bug 61458.
7909 2004-07-27 Ben Maurer <bmaurer@ximain.com>
7911 * marshal.c: actually cache stelem.ref wrappers.
7913 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
7915 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
7916 sections and remove the mono_cli_rva_map () function.
7918 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
7920 * debug-mono-symfile.c: fix one more endianess issue, from a patch
7921 by Geoff Norton (<gnorton@customerdna.com>).
7923 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7925 * class.c: fix class loads for pointer types (typeof(int) !=
7928 2004-07-27 Martin Baulig <martin@ximian.com>
7930 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
7931 reading the debugging information from an external ".mdb" file.
7933 2004-07-24 Martin Baulig <martin@ximian.com>
7935 * reflection.c (mono_image_get_type_info): Only write a class
7936 layout entry if we actually have a size or a packing size.
7938 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
7940 * reflection.c (type_get_fully_qualified_name):
7941 insert cast to get type checking of ?: with non-gcc compilers
7943 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
7945 * rand.c: use g_getenv for both lookups of
7948 2004-07-17 Martin Baulig <martin@ximian.com>
7950 * reflection.c (mono_reflection_bind_generic_method_parameters):
7951 Set `gmethod->reflection_info'.
7953 2004-07-17 Martin Baulig <martin@ximian.com>
7955 * class.c (mono_class_create_from_typedef): Insert the newly
7956 created class into the hash table before computing the interfaces
7957 since we could be called recursively.
7959 2004-07-16 Ben Maurer <bmaurer@ximain.com>
7961 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
7962 function to implement stelem.ref in managed code
7963 * class-internals.h, debug-helpers.c: a new wrapper type
7966 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7968 * gc.c: allow GC handles to work even when no GC is compiled in.
7969 Fix part of bug #61134 (GetAddrOfPinnedObject).
7971 2004-07-13 Peter Williams <peter@newton.cx>
7973 * process.c (complete_path): Make sure we don't attempt to execute
7976 2004-07-12 Geoff Norton <gnorton@customerdna.com>
7978 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
7979 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
7980 and will add/subtract the hour if needed
7982 2004-07-12 Martin Baulig <martin@ximian.com>
7984 * reflection.c (mono_field_get_object): If we have
7985 `field->generic_info', take the attributes from
7986 `field->generic_info->generic_type'.
7988 2004-07-12 Martin Baulig <martin@ximian.com>
7990 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
7991 This function must be called before initializing the runtime.
7992 (mono_debug_init_1): New function; call this after initializing
7993 the runtime, but before loading the assembly. It tells the
7994 debugger to load corlib and the builtin types.
7996 * mono-debug-debugger.c: Did some larger changes in the debugging
7997 code; support recursive class declarations, make sure we actually
8000 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8002 * debug-helpers.c: undo my previous patch and fixed the real issue in
8003 ../mini/exceptions-x86.c
8005 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8007 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
8008 when no HOME env. variable was set and a NullRef was thrown in a .cctor
8009 called from other .cctors.
8011 2004-07-09 Miguel de Icaza <miguel@ximian.com>
8013 * loader.c: Removed the mono_loader_wine_init hack now that we are
8014 doing a managed version of Windows.Forms.
8016 2004-07-09 Ben Maurer <bmaurer@ximian.com>
8018 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
8019 threadpool.c, threads.c: remove static data from rootset.
8021 2004-07-09 Dick Porter <dick@ximian.com>
8023 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
8024 Don't do any more processing if the matched length was 0. It was
8025 increasing the size of the string before. Fixes bug 61167.
8027 2004-07-09 Dick Porter <dick@ximian.com>
8031 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
8032 Add support for SO_PEERCRED if its available.
8034 2004-07-09 Peter Bartok <pbartok@novell.com>
8035 * loader.c: winelib.exe.so error message is now only displayed if
8036 MONO_DEBUG is set. To help us avoid questions when people are trying
8037 out the new Managed.Windows.Forms.
8039 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
8041 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
8042 for isinst and castclass wrappers.
8044 * class-internals.h icall.c: Move registration and lookup of JIT icalls
8045 to libmetadata from the JIT, so they could be used by the marshalling
8046 code and the interpreter.
8048 * marshal.c: Register marshalling related JIT icalls here instead of
8049 in mini.c. Use CEE_MONO_ICALL instead of the family of
8050 CEE_MONO_PROC<x> opcodes to call marshalling functions.
8052 * metadata.h: Remove unneeded marshalling conversions.
8054 * opcodes.c: Update for new opcodes.
8056 2004-07-08 Martin Baulig <martin@ximian.com>
8058 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
8059 (mono_debug_get_domain_data): Make this function static.
8061 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8063 * gc.c, object.h: add nice GC handle API for embedders.
8065 2004-07-06 Ben Maurer <bmaurer@ximian.com>
8067 * reflection.c: more changes for the new api
8069 * object.c: When we reflect on a field w/ a constant value, it
8070 will not have a memory location, so we must access metadata. Also,
8071 allow easier reading of strings so that we can read them from
8074 * class.c (mono_class_layout_fields): no need for literal fields here.
8076 * class-internals.h: api changes for const fields
8078 * icall.c (ves_icall_get_enum_info): use new apis for const fields
8080 2004-07-06 Martin Baulig <martin@ximian.com>
8082 * mono-debug.h: Increment version number to 44.
8084 * mono-debug.c (mono_debug_add_wrapper): The second argument is
8085 now a gpointer, rewrote this whole method.
8087 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
8088 function. Add information about the wrapper in a new "misc table".
8090 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
8091 for the new misc table.
8093 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
8095 * metadata-internals.h image.c: Add a cache for helper signatures.
8097 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
8099 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
8101 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
8102 delegates from a delegate. Fixes #61033.
8104 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
8105 marshalling of stringbuilder arrays. Fixes #59900.
8107 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
8109 * icall.c: Add EnumBuilder:setup_enum_type icall.
8111 2004-06-30 Ben Maurer <bmaurer@ximian.com>
8113 * icall.c: Added a new icall for the property version of
8116 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
8118 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
8119 it has a constant size across platforms.
8121 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
8124 2004-06-29 Martin Baulig <martin@ximian.com>
8126 * mono-debug.c (mono_debug_add_method): Protect the whole function
8127 in mono_debugger_lock(), not just parts of it.
8129 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8131 * reflection.c: make sure padding bytes in heaps are zeroed.
8133 2004-06-24 David Waite <mass@akuma.org>
8135 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
8136 image.c, loader.c, locales.c, marshal.c, metadata.c,
8137 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
8138 string-icalls.c, threads.c: change to C90-style comments from C99 /
8141 2004-06-24 Dick Porter <dick@ximian.com>
8144 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
8145 return createdNew. Fixes bug 60412.
8148 * icall.c: Add createdNew parameter to CreateMutex icall
8150 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8152 * reflection.c, object-internals.h: save default value in params.
8154 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8156 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
8157 no need to build a new path combining that with the application base.
8160 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8162 * reflection.c: fixed minor standard compliance issues.
8164 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8166 * reflection.c: fixed issue with encoding some custom attributes
8167 (arrays in properties and fields, bug #60411).
8169 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8171 * reflection.c: fix start address when copying the public key token.
8173 2004-06-23 Martin Baulig <martin@ximian.com>
8175 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8176 the `exc' object in a static object to put it into the GC's root set.
8178 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8180 * reflection.c: make mono_reflection_setup_internal_class ()
8181 callable a second time to setup a new parent class.
8183 2004-06-23 Dick Porter <dick@ximian.com>
8185 * threads.c: Check for WAIT_IO_COMPLETION return values.
8187 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
8189 * appdomain.c: Removed the g_free on the public key token. Now copy
8190 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
8191 * assembly.c: Added public key token string value when loading
8192 assemblies. Fix bug #60439.
8193 * icall.c: Added missing informations (like public key) in
8194 GetReferencedAssemblies. Fix #60519.
8195 * image.h: Changed definition for public key token from const char*
8196 public_tok_value to guchar public_key_token [17];
8197 * reflection.c: Updated for changes to public key token.
8199 2004-06-22 Lluis Sanchez Gual
8201 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
8202 for the field in base classes.
8204 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8206 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
8207 mark headers as not supported, they are installed only for use by the
8210 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
8212 * *.c, *.h: avoid namespace pollution in public headers.
8214 2004-06-21 Martin Baulig <martin@ximian.com>
8216 * exception.c (mono_get_exception_security): It's in
8217 "System.Security", not in "System".
8219 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
8220 the exception classes.
8222 2004-06-21 Martin Baulig <martin@ximian.com>
8224 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
8225 Protect the exception object from being finalized.
8227 2004-06-21 Martin Baulig <martin@ximian.com>
8229 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
8232 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
8234 * reflection.c: Load the assembly in mono_reflection_type_from_name,
8235 if it was not loaded before. Fix parts of #60439.
8237 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
8239 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
8240 code that was broken since Ben's change: wrappers are now
8241 dependent on the method signature only again.
8243 2004-06-21 Martin Baulig <martin@ximian.com>
8245 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
8246 added interface support.
8248 2004-06-21 Martin Baulig <martin@ximian.com>
8250 * class.c (mono_vtable_get_static_field_data): New public method.
8252 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
8254 * filewatcher.c : Windows build fix to be compliant with API changes.
8256 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8258 * class.h, class.c: more accessors.
8259 * metadata.h, metadata.c: prepare for hiding MonoType and
8260 MonoMethodSignature: people should use the accessors from now on
8261 outside of the tree.
8263 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8265 * *.c, *.h: more API cleanups.
8267 2004-06-18 Jackson Harper <jackson@ximian.com>
8269 * assembly.c: Trace loading assemblies.
8270 * loader.c: Trace loading native libraries.
8271 * mono-config.c: Trace loading config files.
8273 2004-06-18 Dick Porter <dick@ximian.com>
8275 * locales.c: Tell ICU the lengths of strings, it can cope with
8276 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
8278 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
8280 * image.c: swapped name/filename;
8282 2004-06-18 Martin Baulig <martin@ximian.com>
8284 * mono-debug-debugger.c (write_class): Write the parent class at
8285 the end of the header.
8287 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8289 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
8291 2004-06-17 Raja R Harinath <rharinath@novell.com>
8293 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
8294 (bundle_obj): New conditional define.
8295 (BUILT_SOURCES): Remove.
8296 ($(bundle_srcs)): Make parallel-make safe.
8297 (libmonoruntime_la_LIBADD): Make unconditional.
8298 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
8299 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
8301 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
8303 * culture-info-tables.h: It was inconsistent with the latest
8306 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
8308 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
8311 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
8314 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8316 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
8317 cleaned up public header threads.h.
8319 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8321 * Makefile.am, *.c, *.h: more API cleanups.
8323 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8325 * Makefile.am: removed monosn from compilation.
8326 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
8327 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
8328 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
8329 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
8330 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
8331 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
8333 2004-06-15 Jackson Harper <jackson@ximian.com>
8335 * assembly.c: Make locales lower case when searching the GAC for
8336 assemblies. gacutil will always make locales lowercase when
8337 installing so this effectively makes them case insensitive.
8339 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
8341 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
8342 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
8343 parameter which allows to choose whether the wait can be interrupted or
8344 not. Also added the method mono_monitor_enter(), which locks the monitor
8345 using an infinite wait and without allowing interruption.
8346 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
8348 * object.h: Added new fields in MonoThread. suspend_event holds the event
8349 used to susped/resume the thread. synch_lock is the lock object to use for
8350 modifying the thread state.
8351 * threads.c: Use the new synch_lock object for locking, instead of "this",
8352 which can generate deadlocks.
8353 Moved thread state change in Thread.Sleep and Thread.Join from managed
8354 to unmanaged code. This avoids a deadlock when the thread was suspended
8355 just after acquiring the thread lock.
8356 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
8357 Implemented Thread.Suspend using an event instead of ThreadSuspend,
8358 which is not fully implemented in the io-layer.
8359 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
8361 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
8363 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
8364 threads-types.h: more API cleanups.
8366 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8368 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
8369 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
8370 threadpool.c, threads.c: first pass at the exported API cleanup.
8372 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
8374 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
8376 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8378 * icall.c: added internalGetHome.
8380 2004-06-14 Dick Porter <dick@ximian.com>
8382 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
8383 possible to return successfully when '.' or '..' were the only
8384 entries in a directory, but were skipped. The MonoIOStat was not
8385 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
8388 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8390 * reflection.c: make binaries run on .Net 1.1 by default.
8392 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8394 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
8396 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
8398 * marshal.c: keep track of struct size with explicit layout
8401 2004-06-12 Martin Baulig <martin@ximian.com>
8403 * mono-debug-debugger.c: Comment out a debugging g_message().
8405 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8407 * reflection.c, reflection.h: do not free custom attrs that are cached.
8408 * icall.c: use braces to make code clearer.
8410 2004-06-11 Martin Baulig <martin@ximian.com>
8412 * class.h (MonoInflatedField): New type.
8413 (MonoClassField): Replaced `MonoType *generic_type' with
8414 `MonoInflatedField *generic_info'.
8417 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
8419 2004-06-11 Martin Baulig <martin@ximian.com>
8421 * reflection.c (mono_image_create_method_token): Correctly encode
8424 2004-06-11 Martin Baulig <martin@ximian.com>
8426 * metadata.c (mono_metadata_parse_method_signature): When parsing
8427 a MethodDef which has VarArgs, also set sentinelpos if we don't
8428 have any parameters.
8430 2004-06-11 Martin Baulig <martin@ximian.com>
8432 * verify.c (mono_method_verify): In CEE_CALL, use
8433 mono_method_get_signature() to get the method's signature, unless
8434 we're a PInvoke method.
8436 2004-06-10 Jackson Harper <jackson@ximian.com>
8438 * assembly.c: Use <path>/lib/mono/gac for the extra paths
8439 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
8440 logical name as the supplied path is just a prefix to the gac not
8441 the direct path to it.
8443 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
8445 * reflection.c: make the token for a created method match
8446 the token of the MethodBuilder it was created from
8447 (IKVM requires this behaviour now).
8449 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
8451 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
8452 reflection.c, socket-io.c: leak fixes.
8454 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
8456 * icall.c: handle sentinel pos in vararg methods in position different
8459 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8461 * culture-info-tables.h: freshly generated.
8463 2004-06-09 Martin Baulig <martin@ximian.com>
8465 * loader.c (mono_get_method_constrained): Call `mono_class_init
8466 (constrained_class)'.
8468 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
8470 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
8471 any methods. Fixes #59629.
8473 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
8475 * culture-info-tables.h: reflecting locale-builder updates.
8477 2004-06-08 Dick Porter <dick@ximian.com>
8480 * locales.c: Fixed compile warnings, including a real bug in
8481 CompareInfo_internal_compare.
8483 2004-06-08 Dick Porter <dick@ximian.com>
8486 (ves_icall_System_Globalization_CompareInfo_internal_index):
8487 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
8488 Double-check the resuls of usearches, because ICU currently
8489 ignores most of the collator settings here. Fixes bug 59720.
8491 2004-06-08 Dick Porter <dick@ximian.com>
8494 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
8495 Fix memory leak and segfault-causing typo. No idea how this one
8496 lasted so long without being noticed.
8498 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
8500 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
8501 any methods. Fixes #59629.
8503 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8506 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
8507 own the critical section before). Removed dead code (that's done
8508 in the preload hook).
8510 (mono_assembly_load_with_partial_name): call the preload hook.
8512 2004-06-08 Martin Baulig <martin@ximian.com>
8514 * metadata.c (mono_metadata_signature_alloc): Default
8515 `sentinelpos' to -1.
8517 * reflection.c (mono_image_get_array_token): Likewise.
8519 2004-06-08 Martin Baulig <martin@ximian.com>
8521 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
8523 * metadata.c (mono_metadata_parse_method_signature): When parsing
8524 a MethodDef which has VarArgs, set sentinelpos.
8526 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
8527 `gint16' since we're using -1 for non-varargs methods.
8530 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
8531 (method_encode_signature): Added varargs support.
8532 (method_builder_encode_signature): Likewise.
8533 (mono_image_get_varargs_method_token): New static method.
8534 (mono_image_create_method_token): New public method; this is
8535 called via an icall instead of mono_image_create_token() when
8536 calling a varargs method.
8538 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
8540 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
8542 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
8544 * culture-info-tables.h : Reflecting the latest locale-builder that
8545 fixed empty array representation ({} to {0}).
8547 2004-06-07 Jackson Harper <jackson@ximian.com>
8549 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
8550 looking up extra gac paths. This allows MONO_GAC_PATH to act
8551 exactly like a prefix.
8553 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
8555 * reflection.c (mono_reflection_type_from_name): Make a copy of the
8556 type name before modifying it. Fixes #59405.
8558 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
8560 * culture-info.h: added fields for "all datetime patterns".
8561 * locales.c: ( ves_icall_System_Globalization_CultureInfo
8562 _construct_datetime_format ()): fill xxx_patterns fields.
8563 * object.h: added fields for "all datetime patterns" to
8564 MonoDateTimeFormatInfo.
8565 * culture-info-tables.h: reflecting locale-builder updates.
8567 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
8569 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
8570 the event has no add and remove methods. Fixes #59629.
8572 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
8574 * object.c: Fixed possible integer overflow when allocating large
8577 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
8579 * culture-info-tables.h: reflecting locale-builder updates.
8581 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
8583 * culture-info-tables.h: reflecting locale-builder updates.
8585 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
8587 * culture-info-tables.h: reflecting locale-builder updates.
8589 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
8591 * threads.c: Made Thread.Sleep abortable.
8593 2004-06-02 Martin Baulig <martin@ximian.com>
8595 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
8597 * debug-mono-symfile.h: Bumped symbol file version number to 37.
8599 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
8601 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
8603 2004-05-30 Jackson Harper <jackson@ximian.com>
8605 * reflection.c: Do not hardcode assembly versions or public key
8606 tokens anymore. All of this except the corlib section was dead
8609 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
8611 * object.c (mono_runtime_invoke_array): Automatically create boxed
8612 objects for byref valuetypes if needed. Fixes #59300.
8614 * object.c (mono_method_return_message_restore): Handle
8615 MONO_TYPE_OBJECT as well.
8617 2004-05-28 Jackson Harper <jackson@ximian.com>
8619 * reflection.c: The modified type encoding was causing build
8620 problems. Reverted for now.
8622 2004-05-28 Jackson Harper <jackson@ximian.com>
8624 * reflection.c/h: Take an assembly ref so that we dont create
8625 fully qualified names when encoding types in the same assembly as
8626 the custom attribute being emitted.
8627 * appdomain.c: Increment version number.
8629 2004-05-26 Duncan Mak <duncan@ximian.com>
8632 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
8633 Set the full version number (major, minor, build, revision).
8635 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
8637 * marshal.c (emit_struct_conv): increment src/dst after blit
8638 (mono_marshal_get_managed_wrapper,
8639 mono_marshal_get_native_wrapper): make sure we have marshalling
8640 info before marshalling params (info computation affects
8643 * class.c (class_compute_field_layout): correctly deal with
8645 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
8646 value types (as per what windows dows by default)
8647 (mono_class_setup_mono_type): System.ValueType is blittable
8648 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
8651 * marshal.c (mono_marshal_load_type_info): flag types as
8652 non-blittable if the native layout doesn't match the managed
8655 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8657 * appdomain.c: don't add stuff in the private search path that is
8658 above the application base. If application base is not set, there's
8659 no private search path.
8661 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
8663 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
8664 byref struct arguments in native->managed marshalling.
8666 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
8668 * marshal.c (mono_marshal_get_runtime_invoke): correctly
8669 cache methods using signature (special case for methods
8670 that are value type or string class)
8672 * image.c (mono_image_close): clean up allocated GSList's
8673 in runtime_invoke_cache.
8675 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8677 * mono-config.c: set the correct path for mono_cfg_dir on windows when
8678 there's no MONO_CFG_DIR environment variable defined.
8680 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8682 * threads.c: windows version must be >= 0x0500 to include OpenThread.
8684 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
8686 * threadpool.c: Really wait for 500ms after the async call, even if the wait
8688 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
8689 before waiting for it, and call CloseHandle after the wait to unref it.
8690 This will make sure that handles are not disposed too early.
8692 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8697 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
8700 * object.c: se the application_base only for the domain that runs
8701 Main. Fixes bug #59216,
8703 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8706 * object.c: only the domain in which Main is run have
8707 SetupInformation.ConfigurationFile set, so moved a few lines from
8708 appdomain.c to object.c.
8710 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8712 * appdomain.c: we tried to load [name].(dll|exe), but according
8713 to bug #57710, we must also try [culture]/[name].(dll|exe) and
8714 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
8715 There's a test case attached to bug #58922.
8717 2004-05-27 Dick Porter <dick@ximian.com>
8720 * file-io.c: Implemented icalls for locking and unlocking regions
8722 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
8723 FALSE on error (fixes both compiler warning and real bug.)
8725 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
8727 * culture-info-tables.h: reflecting locale-builder updates.
8729 (Added missing ChangeLog entry for 05/26)
8731 2004-05-27 Jackson Harper <jackson@ximian.com>
8733 * locales.c: Fix some cut and paste errors.
8735 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8737 * mono-config.c: set the correct path for config. directory on windows.
8739 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
8741 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
8744 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
8746 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
8747 from pinvoke functions.
8749 * marshal.c (mono_ftnptr_to_delegate): Implement this.
8751 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
8753 * culture-info-tables.h: reflecting locale-builder updates.
8755 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
8757 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
8760 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
8762 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
8763 * icall.c: Modified icalls for RNG.
8764 * rand.c|h: Changed RNG interface to allow thread-safe usage under
8765 Windows (CryptoAPI).
8767 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
8769 * locales.c: Fix build.
8771 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
8773 * culture-info-tables.h: reflecting locale-builder updates.
8775 2004-05-25 Jackson Harper <jackson@ximian.com>
8777 * locales.c: When creating the current culture use the $LANGs
8778 specific culture. So DateTimeFormat and NumberFormat entries are created.
8780 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
8782 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
8783 a char array as parameter.
8785 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
8787 * image.c: In mono_image_open(), always use an absolute path name to
8788 look for already loaded images.
8790 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
8792 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
8793 missing in the windows build (like older cygwin include files).
8795 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
8797 * icall.c: Fixed check for possible integer overflow in Buffer_
8798 BlockCopy icall. Replaced comments style // by /* */.
8800 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
8802 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
8804 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
8805 check after MONO_VTADDR. Fixes pinvoke2.exe.
8807 * marshal.h marshal.c metadata.h: Add beginnings of support for
8808 ftnptr -> delegate marshalling.
8810 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
8812 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
8813 * threads.c: Fix warnings.
8815 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
8817 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
8818 * icall.c: Registered icalls for Suspend and Resume.
8819 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
8821 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
8822 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
8823 * process.c: Use WaitForSingleObjectEx.
8824 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
8826 * threads.c, threads.h: Make use of new Ex wait methods. Improved
8827 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
8828 for Suspend and Resume. Added new mono_thread_stop, used for stoping
8829 background threads. Added basic support for Abort in Windows.
8830 Start new threads using a managed delegate invoke wrapper. This wrapper
8831 has an interruption checkpoint that is needed since an interruption
8832 can be requested before the thread leaves the unmanaged code that starts
8834 * marshal.c: Added interruption checkpoint after every native call, and
8835 also before managed calls for wrappers called from unmanaged code to
8836 go into managed code.
8837 * object.h: Added new field in MonoThread to keep track of interruption
8840 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
8842 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
8845 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8852 * rand.c: getenv -> g_getenv (windows!)
8854 * process.c: complete_path is also used on non-windows platforms.
8856 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8858 * icall.c: new signature for Process_Start.
8860 * process.[ch]: new signature for Process_Start. If we're on windows
8861 and UseShellExecute is false, we have to search for the program by
8862 ourselves if we don't get a full path.
8864 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
8866 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
8867 marshalling and call CleanUpNativeData if needed. Fixes #58646.
8869 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8871 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
8874 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8876 * process.c: use double quotes to quote program name and arguments on
8877 windows. Fixes bug #58575.
8879 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8881 * file-io.c: don't return "." and ".." when using windows Find*File.
8883 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
8885 * marshal.c: Don't pass wrappers to message init because method
8886 addressed used to lookup metadata. part of remoting[2|3] fix.
8888 2004-05-15 Jackson Harper <jackson@ximian.com>
8890 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
8891 path is essentially the same as MONO_PATH except that it points to
8892 GACs instead of lib directories.
8893 * loader.h: The user gac is gone so we dont need function to
8895 * mono-config.c: user gac option is now gone.
8897 2004-05-15 Jackson Harper <jackson@ximian.com>
8899 * culture-info.h: Make defines more consistent, add calendar data
8900 to the culture info table.
8901 * culture-info-tables.h: Add basic calendar data. Basically
8902 everyone gets default gregorian until all the data is
8904 * locales.c: Use the new consistent defines. Set calendar data for
8905 culture info objects.
8906 * object.h: add a field for calendar data to CultureInfo
8908 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
8910 * image.c: image->runtime_invoke_cache is keyed on signatures now.
8911 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
8913 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
8914 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
8915 an extra param that is the pointer of the method to invoke. The IL for
8916 the invoke method is no longer specific to the method, but to the
8917 signature of the method. Thus, we can share the same code for multiple
8918 methods. This reduces the number of methods that have to be compiled.
8920 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
8922 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
8924 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8926 * icall.c: Optimize Buffer.BlockCopy.
8928 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8930 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
8931 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
8932 quote). Changed them to "MMMM yyyy".
8934 2004-05-12 Miguel de Icaza <miguel@ximian.com>
8937 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
8939 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
8941 * reflection.h: Updated after changes to managed structures.
8943 * appdomain.c: Bump corlib version.
8945 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8947 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
8950 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8952 * Makefile.am: link to ../os/libmonoos.la on windows.
8955 -If MONO_DEBUG, warn about non-existing directories in
8957 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
8958 compile time variable.
8959 -Removed init_default_path and call mono_set_rootdir from
8960 libmonoos.a instead (windows only).
8962 * assembly.h: declare mono_assembly_getrootdir().
8965 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
8967 * loader.c: s/getenv/g_getenv/
8969 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
8971 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
8973 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
8975 * metadata.h: Add new marshalling conversions.
8977 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
8980 * reflection.c (mono_reflection_get_type): Lookup the type in all
8981 modules of a multi-module assembly. Fixes #58291.
8983 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
8985 * threads.c: Before aborting a background, set the StopRequested
8986 state. This avoids throwing the Abort exception.
8987 In mono_thread_manage, don't continue with the shutdown until all
8988 aborted threads have actually stopped.
8990 2004-05-10 Jackson Harper <jackson@ximian.com>
8992 * locales.c: Remove the modifier from culture names.
8994 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8996 * Makefile.am: monosn is not installed any more. It has been deprecated
8999 2004-05-07 Jackson Harper <jackson@ximian.com>
9002 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
9003 Fix array construction, add bailout if the length is 0.
9005 2004-05-07 Dick Porter <dick@ximian.com>
9007 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
9008 machine doesn't have a DNS entry. Patch by Urs Muff
9009 (umuff@quark.com), fixes bug 57928.
9011 2004-05-06 Jackson Harper <jackson@ximian.com>
9013 * reflection.c: Handle null PublicTokens properly. alloc mem for
9014 assembly names culture so we dont crash when freeing it.
9016 2004-05-06 Jackson Harper <jackson@ximian.com>
9018 * assembly.c: Check the usergac when loading with partial names.
9020 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
9022 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
9023 does nothing for now (not required for Linux/Windows) but the class
9024 library can call it (and a newer or modified runtime could need it).
9025 * icall.c: Registred icall.
9027 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9029 * loader.c: prints a message on module loading error we set MONO_DEBUG
9030 environment variable.
9032 2004-05-05 Jackson Harper <jackson@ximian.com>
9034 * appdomain.c: Handle PublicKeyToken=null properly.
9036 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
9038 * environment.c|h: Added icall ves_icall_System_Environment_
9039 GetOSVersionString to get the current OS version as a string.
9040 * icall.c: Registred icall.
9042 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
9044 * object.c: in mono_object_get_virtual_method(), take into account that
9045 non-virtual methods don't have a slot in the vtable. Check needed when
9046 the object is a proxy.
9048 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
9050 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
9051 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
9053 * object.c (mono_class_compute_gc_descriptor): Fix warning.
9055 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
9056 passed when a valuetype is expected.
9058 * object.c (mono_unhandled_exception): Only set the exit code if the
9059 exception happens in the main thread. Fixes thread5.exe.
9061 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
9062 invalid names. Fixes #58047.
9064 2004-05-03 Jackson Harper <jackson@ximian.com>
9066 * assembly.c: This line was committed accidently and is unneeded.
9068 2004-05-03 Jackson Harper <jackson@ximian.com>
9070 * icall.c: Add new icall for Assembly::LoadWithPartialName
9071 * assembly.c/.h: new function that probes the GAC to load partial
9072 assembly names by Paolo Molaro.
9074 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9076 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
9077 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
9078 (type_get_fully_qualified_name): Added PublicKeyToken when building a
9081 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9083 * appdomain.c: fixed check for 'neutral' culture and removed warning.
9084 * reflection.c: fix bug when parsing a full type name and Version is not
9085 the last thing in the string.
9087 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
9089 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
9090 crashes when it is freed.
9092 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9094 * assembly.c: print the compat warning to stderr.
9096 2004-05-01 Miguel de Icaza <miguel@ximian.com>
9098 * assembly.c (mono_assembly_load_references): Add a compatibility
9099 hack to run old applications that might be still referencing the
9100 3300-based assemblies, only do this for System.xxx.
9102 2004-05-01 Jackson Harper <jackson@ximian.com>
9104 * appdomain.c: If the culture is neutral we set it to "".
9106 2004-04-29 Jackson Harper <jackson@ximian.com>
9108 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
9110 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
9112 * string-icalls.c: added low overhead function for copying chars
9113 * icall.c: added needed icall for the above function
9115 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9117 * icall.c: fix return value of get_global_assembly_cache. Implemented
9118 Environment.GetLogicalDrives.
9120 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
9122 * rand.c: try and talk to egd or prngd
9123 for random bytes if opening devices fail.
9125 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
9127 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
9128 alignment for the type using the native alignment of its members
9129 instead of using klass->min_align.
9131 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
9133 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9136 * socket-io.c: added check for sys/aio.h.
9138 2004-04-28 Dick Porter <dick@ximian.com>
9140 * threads.c: Don't abort a thread thats already aborting, when
9141 terminating everything.
9143 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9145 * icall.c: added 2 new async calls for Socket.
9147 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
9150 * threadpool.c: removed unused variable.
9152 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
9154 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
9156 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9158 * locales.c: put back string_invariant_tolower () and
9159 string_invariant_toupper ().
9161 2004-04-26 David Waite <mass@akuma.org>
9166 * unicode.h: remove comma from end of enumeration declarations
9168 2004-04-26 David Waite <mass@akuma.org>
9170 * debug-mono-symfile.h:
9173 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
9176 2004-04-26 Jackson Harper <jackson@ximian.com>
9178 * appdomain.c: Increment version number.
9180 2004-04-26 Jackson Harper <jackson@ximian.com>
9182 * appdomain.c: Set assembly references public token value when
9183 PublicKeyToken is specified, not the hash_value. Free public token
9184 values when free assembly name data. Previously the public key
9185 token was hex decoded, however we are using hex encoded public key
9186 tokens, so this is not neccasary.
9187 * assembly.c: Lookup assemblies in the gac if their public token
9188 value is set. Add function to allow enabling user gac
9189 lookups. Specify whether or not the assembly was loaded from the
9190 GAC. Compare full assembly names when checking the cache for
9191 assemblies (Temporarily disabled see comment in code). Remove
9192 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
9193 specifies trace-loader they get extra info to stdout on the
9194 loading of assemblies.
9195 * image.h: Add a field for an assembly references public token
9196 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
9197 whether an assembly has been loaded from the GAC.
9198 * image.c: Remove a corlib -> mscorlib name mapping.
9199 * loader.h: Add function to enable/disable the user gac.
9200 * mono-config.c: Check if the usergac is enabled in the config
9202 * icall.c: New icall to determine whether or not an assembly has
9203 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
9204 * tabldefs.h: Add constant for assemblyref flag that specifies a
9205 full public key is used instead of a public token.
9206 * reflection.c: Remove mscorlib -> corlib mappings. Set
9207 PublicTokenValue instead of hash value. This value is a hex
9208 string so it does not need to be expanded.
9210 2004-04-26 Martin Baulig <martin@ximian.com>
9212 * mono-debug-debugger.c (mono_debugger_initialize): Set
9213 `mono_debugger_initialized' before calling mono_debug_lock().
9215 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
9217 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
9218 InternalToUpper/InternalToLower.
9219 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
9220 removed invariant culture shortcut. This is now done in managed code.
9221 * locales.c: (string_invariant_toupper/tolower) removed.
9223 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9225 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
9226 Added Poll internal call.
9228 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
9229 call for Poll. Select was too heavy for polling a single socket.
9231 * threadpool.[ch]: added mono_threadpool_cleanup.
9232 * threads.c: use it. Don't use Thread_Abort on windows.
9234 2004-04-23 Martin Baulig <martin@ximian.com>
9236 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
9238 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
9240 * icall.c: Registred new icalls for key pair protection and added an
9241 icall for Environment.GetFolderPath on Windows.
9242 * security.c|h: Added new icalls for key pair protection.
9244 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9246 * socket-io.c: don't display the non-supported family warning for known
9247 families. Now this is not displayed on windows when checking support
9250 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9252 * class.c: don't display the layout warning for static fields.
9254 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
9256 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
9257 * locales.c, locales.h: Added new icalls for culture-specific
9258 Char.ToLower and Char.ToUpper.
9260 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9262 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
9265 2004-04-20 Martin Baulig <martin@ximian.com>
9267 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
9268 of the type name before passing it to mono_reflection_type_from_name().
9270 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
9272 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
9273 encodings here. Fixes #56965.
9275 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
9277 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9278 fix test on strstr result not that I can see anything that
9279 relies on the result.
9281 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
9283 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
9286 * marshal.c (mono_marshal_get_string_encoding): New helper function.
9288 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
9289 function to determine which marshalling to use for strings. Fixes
9292 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
9294 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
9296 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
9298 * icall.c: #include mono-config.h
9300 2004-04-15 Jackson Harper <jackson@ximian.com>
9302 * culture-info-tables.h: Fix date formats for en-US culture.
9304 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
9306 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
9307 ThreadPool.SetMinThreads.
9308 * threadpool.c: Implemented ThreadPool.GetMinThreads and
9309 ThreadPool.SetMinThreads.
9311 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9313 * mono-config.c: also load the .config file in the directory
9314 where the assembly was found.
9316 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
9318 * assembly.c: load per-assembly config files.
9319 * icall.c: decrapified code to get the config dir and moved to
9321 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
9322 per-assembly config files. When doing a dll map lookup give precedence
9323 to the per-assembly data.
9325 2004-04-14 Martin Baulig <martin@ximian.com>
9327 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
9328 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
9329 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
9331 * mono-debugger-debugger.c: While the debugger is locked, remember
9332 whether the symbol tables have changes and send one single
9333 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
9335 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
9337 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
9339 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
9342 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
9343 account when marshalling string arrays. Fixes #56965.
9345 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
9347 * icall.c: Add new icalls mapping for security.
9348 * security.c|h: Add internal calls for WindowsIdentity,
9349 WindowsImpersonationContext and WindowsPrincipal.
9351 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
9353 * class.c: Added comment to ensure the System.MonoDummy class
9354 is removed when no longer necessary
9356 2004-04-13 Miguel de Icaza <miguel@ximian.com>
9358 * appdomain.c: Pass arguments to the bootstraping exceptions to
9359 minimize JITed methods at boot
9361 * metadata.c (mono_exception_from_name_two_strings): Allow for the
9362 second string to be null.
9364 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9365 Change the protocol to minimize the JIT methods at startup. Now
9366 it Returns the internal codepage, if the value of "int_code_page"
9367 is 1 at entry, and we can not compute a suitable code page
9368 number, returns the code page as a string.
9370 2004-04-13 Jackson Harper <jackson@ximian.com>
9372 * culture-info-tables.h: Fix number of decimal digits for all
9375 2004-04-13 Jackson Harper <jackson@ximian.com>
9377 * icall.c: Clairfy out of sync error message. It is not always
9378 your corlib that is out of sync.
9380 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
9382 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
9383 properties when only the set accessor is overriden. Fixes #55874.
9385 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
9387 * assembly.c (mono_assembly_load_references): Make this thread safe.
9390 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
9392 * monosn.c: Add missing initialization calls.
9394 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
9397 ves_icall_System_Globalization_CultureInfo_construct_number_format
9398 Fix g_assert so it compiles on fussier compilers re int/ptr
9401 2004-04-08 Dick Porter <dick@ximian.com>
9404 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
9405 53992. Also rearrange the code so that the internal calls return
9406 an error value and exceptions are thrown from managed code.
9408 * icall.c: Add type info to the socket icalls.
9410 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9412 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
9415 2004-04-07 Martin Baulig <martin@ximian.com>
9417 * class.c (mono_class_from_generic_parameter): Don't default
9418 `klass->parent' to `mono_defaults.object_type'.
9420 2004-04-07 Martin Baulig <martin@ximian.com>
9422 * reflection.c (mono_reflection_initialize_generic_parameter): Set
9423 `param->pklass->reflection_info'.
9425 2004-04-07 Jackson Harper <jackson@ximian.com>
9427 * culture-info-tables.h: Fix date separator symbol.
9429 2004-04-07 Martin Baulig <martin@ximian.com>
9431 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
9432 from System.Type to System.MonoType.
9434 2004-04-07 Martin Baulig <martin@ximian.com>
9437 (MonoReflectionGenericParam): Added `has_reference_type' and
9438 `has_value_type' fields.
9440 * reflection.c (mono_image_get_generic_param_info): Encode the
9441 correct flags if we have the `class' or `struct' constraint.
9443 2004-04-07 Martin Baulig <martin@ximian.com>
9446 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
9448 2004-04-07 Jackson Harper <jackson@ximian.com>
9450 * appdomain.c: Revert extra patches, just wanted to bump the
9453 2004-04-07 Jackson Harper <jackson@ximian.com>
9455 * Makefile.am: Add culture-info private headers.
9456 * icall.c: Add new icalls for contructing locales.
9457 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
9458 * locales.h: Declare new culture info construction methods.
9459 * object.h: Add new fields used to avoid the CultureMap to
9461 * culture-info.h: Definition of structs used in the culture info
9463 * culture-info-tables.h: Autogenerated tables that contain culture
9464 info data. This file was generated with the locale-builder tool.
9465 * appdomain.c: Incement corlib version number.
9467 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
9469 * appdomain.c: (mono_runtime_init) move mono_thread_init
9470 to before mono_object_new calls so critical sections
9471 are initialized before use.
9473 2004-04-07 Martin Baulig <martin@ximian.com>
9476 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
9477 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
9478 (ves_icall_MonoGenericParam_initialize): Removed.
9479 (monogenericparam_icalls): Removed.
9480 (generictypeparambuilder_icalls): Added new table for
9481 System.Reflection.Emit.GenericTypeParameterBuilder.
9484 (mono_reflection_define_generic_parameter): Removed.
9485 (mono_reflection_initialize_generic_parameter): This is now called
9486 from GenericTypeParameterBuilder's .ctor.
9488 2004-04-06 Martin Baulig <martin@ximian.com>
9490 * class.c (mono_class_init): Don't inflate nested classes in a
9492 (mono_type_get_name_recurse): Include the generic arguments for
9493 generic instances and generic type declarations.
9494 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
9495 (_mono_class_get_instantiation_name): Removed.
9496 (mono_class_create_generic): Always use `gklass->name' as our name.
9498 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
9500 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
9501 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
9502 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
9503 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
9504 closed generic methods here.
9507 (mono_reflection_generic_inst_get_nested_types): Removed.
9508 (inflate_mono_method): Copy the generic parameters from the
9509 MonoMethodHeader into out MonoGenericMethod.
9511 2004-04-06 Martin Baulig <martin@ximian.com>
9514 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
9516 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
9518 * reflection.c (build_compressed_metadata): If we have any entries
9519 in the GenericParam, MethodSpec or GenericParamConstraint tables,
9520 set the header version to 1.1.
9522 2004-04-06 Martin Baulig <martin@ximian.com>
9524 * class.c (mono_class_init): If we're a generic instance,
9525 initialize our nested classes, too.
9526 (_mono_class_get_instantiation_name): Deal with the new `!%d'
9529 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9531 * process.c: quote the argument passed to the shell on windows.
9533 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
9535 * threads.c (mono_alloc_special_static_data): Allow this to be
9536 called during startup.
9538 2004-04-02 Martin Baulig <martin@ximian.com>
9541 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
9543 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
9545 * icall.c: Fix build.
9547 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
9549 * Makefile.am: Added security.c|h.
9550 * icall.c: Added icall for get_UserName;
9551 * security.c: New file for security related icalls. Added function
9552 get_UserName for System.Environment (fix #56144).
9553 * security.h: New. Header file for security.c
9555 2004-04-02 Dick Porter <dick@ximian.com>
9557 * icall.c: Deleted the icalls that were obsoleted some time ago
9558 by the ICU string code, and which were mixed into the icall
9559 rearranging. Fixes bug 55969.
9562 * string-icalls.c: Deleted the code that those icalls reference.
9564 2004-04-01 Martin Baulig <martin@ximian.com>
9566 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
9568 * class.c (mono_class_from_generic_parameter): Don't set
9569 TYPE_ATTRIBUTE_INTERFACE.
9570 (my_mono_class_from_generic_parameter): Likewise.
9572 2004-04-01 Martin Baulig <martin@ximian.com>
9574 * loader.c (find_method): Added an optional `MonoClass *ic'
9575 argument to search in a specific interface.
9576 (mono_get_method_constrained): New public function.
9578 2004-04-01 Martin Baulig <martin@ximian.com>
9580 * reflection.c (mono_image_get_generic_field_token): Use the
9581 `handleref' cache here.
9583 2004-04-01 Martin Baulig <martin@ximian.com>
9585 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
9587 * reflection.c (create_generic_typespec): Use the `typespec' hash
9588 here, not the `typeref' one.
9590 2004-04-01 Martin Baulig <martin@ximian.com>
9592 * class.c (mono_class_inflate_generic_type): Moved the
9593 functionality into a new static inflate_generic_type() which
9594 returns NULL if it didn't do anything. Only increment the
9595 `mono_stats.inflated_type_count' if we actually inflated
9597 (mono_class_get_full): Check the classes type to see whether we
9598 need to inflate it; also inflate MONO_TYPE_(M)VAR.
9600 2004-04-01 Jackson Harper <jackson@ximian.com>
9602 * reflection.c: Set culture for assembly references.
9604 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
9606 * reflection.[ch], icall.[ch], Fix support for pinning variables.
9608 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9611 (do_mono_assembly_open): the critical section also covers
9612 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
9614 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9617 (mono_manage_threads): abort the background threads when finishing.
9620 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9622 * gc.c: only close the done_event handle if there was no timeout.
9625 2004-03-30 Martin Baulig <martin@ximian.com>
9627 * icall.c (icall_entries): It's called "System.Activator", not
9628 "System.Activation".
9630 2004-03-30 Martin Baulig <martin@ximian.com>
9632 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
9633 (mono_class_create_from_typespec): Likewise.
9635 2004-03-30 Martin Baulig <martin@ximian.com>
9637 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
9638 `has_ctor_constraint' and `initialized'.
9640 2004-03-30 Martin Baulig <martin@ximian.com>
9642 * reflection.c (encode_new_constraint): New static function to add
9643 the constructor constraint attribute to a type parameter.
9644 (encode_constraints): Call encode_new_constraint() if necessary.
9647 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
9649 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
9651 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
9653 * reflection.c, icall.c: add support for pinning variables.
9655 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
9657 * marshal.c (mono_marshal_get_managed_wrapper):
9658 init bool local with zero rather than null.
9660 2004-03-29 Martin Baulig <martin@ximian.com>
9662 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
9663 the "official" behavior here.
9664 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
9666 2004-03-29 Martin Baulig <martin@ximian.com>
9668 * icall.c: Reflect latest API changes.
9670 2004-03-29 Martin Baulig <martin@ximian.com>
9672 * loader.c (mono_get_method_from_token): Also call
9673 mono_metadata_load_generic_params () for abstract and interface
9674 methods; replace the type arguments in the method signature with
9675 the ones which are loaded from the metadata.
9677 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
9679 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
9680 of the lock is not the current thread. MS.NET don't do it, in spite of
9681 what the documentation says. See bug #56157.
9683 2004-03-28 Martin Baulig <martin@ximian.com>
9685 * class.c (mono_class_init): Don't call init_properties() and
9686 init_events() for generic instances; set `prop->parent' when
9687 inflating properties.
9689 * reflection.c (mono_generic_inst_get_object): Call
9690 `mono_class_init (ginst->klass)'.
9691 (mono_type_get_object): Only create a MonoGenericInst if your
9692 generic type is a TypeBuilder.
9693 (do_mono_reflection_bind_generic_parameters): Only set
9694 `ginst->is_dynamic' if our generic type is a TypeBuilder.
9696 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
9698 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
9701 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9703 * icall.c: added Kill_internal icall.
9704 * process.[ch]: added Kill_internal icall.
9706 2004-03-25 Martin Baulig <martin@ximian.com>
9708 * class.h (MonoStats): Added `generic_instance_count',
9709 `inflated_method_count', `inflated_type_count' and
9710 `generics_metadata_size'.
9712 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9714 * reflection.c: no warnings now.
9716 2004-03-25 Martin Baulig <martin@ximian.com>
9718 * class.c (mono_class_get_full): New public function; does a
9719 mono_class_get(), but also takes a `MonoGenericContext *'.
9721 * loader.c (mono_field_from_memberref): Renamed to
9722 `field_from_memberref', made static and added `MonoGenericContext *'
9724 (mono_field_from_token): Added `MonoGenericInst *' argument.
9725 (method_from_memberef): Likewise.
9726 (mono_get_method_from_token): Likewise.
9727 (mono_get_method_full): New public function; does a
9728 mono_get_method(), but also takes a `MonoGenericContext *'.
9730 * verify.c (mono_method_verify): Get the method's generic context
9731 and pass it to mono_field_from_token(), mono_get_method_full() and
9732 mono_class_get_full().
9734 2004-03-25 Martin Baulig <martin@ximian.com>
9736 * class.c (mono_class_inflate_generic_type): Take a
9737 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
9738 `MonoGenericMethod *'.
9740 2004-03-25 Martin Baulig <martin@ximian.com>
9742 * loader.h (MonoMethodInflated): Store the MonoGenericContext
9743 instead of the MonoGenericMethod here.
9745 2004-03-25 Martin Baulig <martin@ximian.com>
9747 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
9748 each time we create a new MonoGenericInst, we also create a new
9749 context which points back to us.
9751 * class.c (inflate_method): Use `ginst->context' instead of
9752 creating a new context.
9754 * loader.c (method_from_memberref): Use
9755 `klass->generic_inst->context' instead of creating a new context.
9757 2004-03-25 Martin Baulig <martin@ximian.com>
9759 * class.h (MonoGenericContext): New struct.
9760 (MonoGenericMethod): Removed `generic_inst'.
9762 * class.c (mono_class_inflate_generic_method): Take a
9763 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
9765 2004-03-25 Martin Baulig <martin@ximian.com>
9767 * loader.h (MonoMethodInflated): New typedef.
9769 * metadata.h (MonoMethodSignature): Removed `gen_method', make
9770 `generic_param_count' consume just 30 bits, added `is_inflated'
9771 and `has_type_parameters' flags (one bit each).
9773 * class.c (mono_class_inflate_generic_method): Create a
9774 MonoMethodInflated instead of a MonoMethodNormal and set
9775 `is_inflated' in the method signature.
9777 * class.h (MonoGenericMethod): Removed `generic_method'.
9779 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
9781 * image.c: Make sure the name of a MonoImage is always an absolute path.
9782 This fixes bug #54415.
9784 2004-03-24 Martin Baulig <martin@ximian.com>
9786 * class.c (mono_class_setup_vtable): If we're a generic instance,
9787 use our generic type's vtable size.
9789 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
9791 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
9792 MONO_NO_UNLOAD env var as a temporary workaround for unloading
9795 2004-03-23 Martin Baulig <martin@ximian.com>
9797 * class.h (MonoDynamicGenericInst): Added `int count_events' and
9798 `MonoEvent *events'.
9800 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
9801 (typebuilder_icalls): Added "get_event_info"; calls
9802 mono_reflection_event_builder_get_event_info().
9804 * reflection.c (mono_reflection_generic_inst_initialize): Added
9805 `MonoArray *events'.
9806 (mono_reflection_event_builder_get_event_info): New function.
9808 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
9810 * object.h: add mono_type_initialization_init
9812 * object.c (mono_runtime_class_init):
9813 implement class constructor synchronization rules
9814 to cope with threading issues.
9815 add mono_type_initialization_init
9817 * appdomain.c (mono_runtime_init): call
9818 mono_type_initialization_init
9820 * class.h: removing initializing field from MonoVTable
9822 2004-03-23 Martin Baulig <martin@ximian.com>
9824 * class.c (my_mono_class_from_generic_parameter): Use
9825 `param->name' if it's not NULL.
9827 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
9829 * class.c: do not insert non-virtual methods in the vtable.
9830 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
9831 that means the method is non-virtual. This never would have
9834 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
9836 * profiler.c: Added lock for accessing coverage_hash.
9838 2004-03-22 Martin Baulig <martin@ximian.com>
9840 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
9841 `method->method->signature->generic_param_count != 0' to make it
9842 work for interface methods.
9844 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9846 * process.c: quote the string passed to the shell using g_shell_quote.
9848 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9851 (mono_threads_manage): don't remove the finalizer thread and self
9852 from the threads hash table so that mono_thread_manage can be called
9855 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9857 * process.c: quote the arguments when UseShellExecute is true. Fixes
9860 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9862 * threads.c: set mono_thread_detach as a cleanup routine for every
9863 thread. This way it's always executed upon thread termination, either
9864 aborted or finished normally. No more xsp hangs!
9866 2004-03-17 Martin Baulig <martin@ximian.com>
9868 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
9869 `int count_nested' and a `MonoType **nested'.
9871 * reflection.c (mono_reflection_bind_generic_parameters): Moved
9872 most of the functionality into a new static
9873 do_mono_reflection_bind_generic_parameters() and don't take a
9874 `MonoType *nested_in' argument any more. Don't compute nested
9876 (mono_reflection_generic_inst_get_nested_types): New public method
9877 to get nested types.
9879 * class.c (mono_class_create_generic): Set `klass->nested_in' if
9880 we're a nested class.
9882 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
9883 mono_reflection_generic_inst_get_nested_types() to compute the
9886 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
9888 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
9889 descriptive error message under windows.
9891 2004-03-17 Martin Baulig <martin@ximian.com>
9893 * class.c (dup_type): Added `const MonoType *original' argument;
9894 copy the attrs from the original type.
9896 2004-03-17 Martin Baulig <martin@ximian.com>
9898 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
9899 `m->generic_inst_cache' here.
9901 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
9903 * exception.h exception.c: Add stack_overflow_exception.
9905 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9908 (overlapped_callback): call SetEvent *after* invoking the callback.
9909 No need to call CloseHandle.
9911 2004-03-16 Martin Baulig <martin@ximian.com>
9913 * reflection.c (mono_image_get_fieldref_token): Take a
9914 `MonoReflectionField *' instead of a `MonoClassField *' and a
9915 `MonoClass *'; store the `MonoReflectionField *' in the hash.
9917 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9919 * appdomain.c: don't add the culture to the filename we're looking for
9920 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
9922 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9924 * locales.c: don't ignore symbols when doing case insensitive compares.
9925 Thanks Dick! Fixes bug #54046.
9927 * threads.c: surround 'threads' usage with enter/leave in
9930 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
9932 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
9933 implicitly marshalled as [Out]. Fixes #55450.
9935 (mono_marshal_get_runtime_invoke): Zero out the result if there is
9938 2004-03-16 Martin Baulig <martin@ximian.com>
9940 * class.c (mono_class_from_generic_parameter): Use the actual
9943 2004-03-16 Martin Baulig <martin@ximian.com>
9945 * reflection.c (type_get_signature_size): New static function.
9946 Compues the size of the type in a method signature.
9947 (method_get_signature_size): New static function; calls
9948 type_get_signature_size() to compute the actual size of the
9950 (method_encode_signature): Use method_get_signature_size() to get
9951 the signature's size rather than using `nparams * 10'.
9953 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9955 * file-io.h: define here WapiOverlapped on windows. I don't want the
9956 regular OVERLAPPED one.
9959 * threadpool.c: somehow, BindIoCompletionCallback is not found.
9960 Disabling AIO on windows.
9962 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9964 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
9967 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9969 * appdomain.c: upgraded corlib version.
9971 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
9972 and BeginWrite. Allow opening files for asynchrnous operations.
9974 * file-io.h: new struct that maps FileStreamAsyncResult.
9975 * icall.c: added new icalls.
9976 * process.[ch]: support setting child process environment variables
9977 and use the SHELL or COMSPEC when UseShellExecute is true.
9979 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
9980 callback for async. IO is here and also BindHandle.
9982 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
9985 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
9987 * reflection.c (create_custom_attr): Allow len == 0.
9989 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
9990 computation on big-endian machines.
9992 2004-03-13 Martin Baulig <martin@ximian.com>
9994 * class.h (MonoGenericInst): Added `int count_ifaces'.
9996 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
9997 `ginst->count_ifaces' instead `klass->interface_count' since we
9998 may get called before the vtable is created.
10000 * loader.c (mono_method_get_param_names): If we're a generic
10001 instance, return and don't initialize the class.
10003 * reflection.c (mono_reflection_setup_generic_class): Don't call
10004 ensure_runtime_vtable().
10005 (mono_reflection_bind_generic_parameters): Set
10006 `ginst->count_ifaces'.
10008 2004-03-11 Jackson Harper <jackson@ximian.com>
10012 * unicode.h: Remove unused System.Char icalls.
10014 2004-03-11 Miguel de Icaza <miguel@ximian.com>
10016 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
10017 code when we P/Invoke the first library in Windows.Forms, instead
10018 of when we first open the assembly.
10020 * assembly.c: Drop the lookup from here.
10022 2004-03-10 Martin Baulig <martin@ximian.com>
10024 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
10025 class for properties, fields and events. Finally fixes #54945.
10027 2004-03-10 Martin Baulig <martin@ximian.com>
10029 * metadata.c (mono_metadata_class_equal): New static function;
10030 checks whether two generic instances or two generic parameters are
10032 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
10035 2004-03-10 Martin Baulig <martin@ximian.com>
10037 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
10039 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
10040 argument and write it into the `reflection_info' field.
10043 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
10044 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
10046 2004-03-09 Jackson Harper <jackson@ximian.com>
10048 * char-conversions.h: use 8 bits for numeric data its all we need
10049 * icall.c: numeric data is only 8 bits now.
10051 2004-03-09 Martin Baulig <martin@ximian.com>
10053 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
10055 * class.c (init_properties, init_events): Initialize the new
10058 * reflection.c (typebuilder_setup_properties): Likewise.
10059 (typebuilder_setup_events): Likewise.
10061 * reflection.h (MonoEventInfo): Replaced `parent with
10062 `declaring_type' and `reflected_type'.
10064 * icall.c (ves_icall_get_property_info): Distinguish between
10065 declaring and reflected type.
10066 (ves_icall_get_event_info): Likewise.
10068 2004-03-09 Martin Baulig <martin@ximian.com>
10070 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
10071 (ves_icall_Type_GetField): Correctly set field->klass.
10073 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
10075 * loader.h: Fix warning.
10077 2004-03-08 Miguel de Icaza <miguel@ximian.com>
10079 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
10080 library routine if present. Notice that it will still continue
10081 executing even if its missing, for those working on the Gtk#
10082 edition of Windows.Forms.
10084 * assembly.c (do_mono_assembly_open): If loading the
10085 System.Windows.Forms call mono_loader_wini_init.
10087 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
10089 * class.h: Added MonoRemoteClass struct.
10090 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
10091 function for MonoStrings.
10092 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
10093 Added internal call for getting the proxy type.
10094 * marshal.c: Get the type of transparent proxies from its remote_class.
10095 Added methods that generate the IL for type checks and casts:
10096 mono_marshal_get_isinst, mono_marshal_get_castclass,
10097 mono_marshal_get_proxy_cancast.
10098 * marshal.h: Declaration of the previous new methods.
10099 * object.c: Added new moethods for creating and updating MonoRemoteClass
10100 instances: mono_remote_class, mono_upgrade_remote_class,
10101 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
10102 * verify.c: FIx transparent_proxy_fields layout.
10103 * appdomain.c: Bump corlib version.
10105 2004-03-04 Jackson Harper <jackson@ximian.com>
10107 * icall.c: Add icall to access char conversion tables.
10108 * char-conversions.h: Character conversion tables.
10109 * Makefile.am: Add char-conversions.h private header file.
10111 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
10113 * appdomain.c (unload_thread_main): Increase unloading timeout to
10114 10 sec as a temporary workaround for Nant problems.
10116 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
10118 * gc.c: Add checks for GC_enable and GC_disable.
10120 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
10121 (jaak@zd.com.pl). Fix memory corruption in String.Replace
10124 2004-02-27 Martin Baulig <martin@ximian.com>
10126 * reflection.c (mono_reflection_bind_generic_parameters): Take a
10127 `MonoReflectionType *' instead of a `MonoType *'.
10129 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
10131 * gc.c (run_finalize): Avoid finalizing the object representing the
10133 (finalizer_thread): Fix warning.
10135 2004-02-25 Martin Baulig <martin@ximian.com>
10137 * class.c (_mono_class_get_instantiation_name): Added `int offset'
10138 argument for nested types.
10139 (mono_class_create_generic): Added support for nested generictypes.
10141 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
10144 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
10146 * reflection.c (method_encode_signature): Increase the minimum
10147 value of `size' from 10 to 11.
10148 (mono_reflection_bind_generic_parameters): Take `int type_argc'
10149 and `MonoType **types' arguments instead of the `MonoArray
10150 *types'; added `MonoType *nested_in'. Recursively instantiate
10153 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
10155 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
10156 stack_overflow_ex members which are used by exception handling.
10158 * appdomain.c (mono_runtime_init): Initialize the new members.
10160 * gc.c (mono_gc_enable): New helper function.
10161 * gc.c (mono_gc_disable): New helper function.
10163 2004-02-23 Martin Baulig <martin@ximian.com>
10165 * icall.c: I must have been really stupid - make it actually work
10168 2004-02-23 Martin Baulig <martin@ximian.com>
10170 * loader.c (method_from_memberref): Only inflate the method if
10171 it's in another klass.
10173 2004-02-23 Martin Baulig <martin@ximian.com>
10175 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
10176 (mono_class_init): If we're a generic instance and an interface,
10177 compute `class->interface_id'; also create `class->interfaces'
10178 here and inflate them.
10180 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
10182 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
10184 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
10186 2004-02-15 Miguel de Icaza <miguel@ximian.com>
10188 * reflection.c (method_encode_code): Improved the error message
10189 generated by the exception.
10191 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10193 * icall.c: Martin did not do what he said in the ChangeLog for
10194 2004-02-18, but put back the changes for properties and events.
10195 Commenting those changes out again and adding comment to bug #54518.
10197 * process.c: removed warning.
10199 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
10201 * marshal.c (emit_struct_conv): Print an error message instead of
10202 asserting when a type does not have the StructLayout attribute.
10204 2004-02-20 Martin Baulig <martin@ximian.com>
10206 * reflection.c (mono_type_get_object): Also use the cache for
10208 (mono_reflection_bind_generic_parameters): Always compute
10211 2004-02-20 Martin Baulig <martin@ximian.com>
10213 * class.h (MonoGenericMethod): Removed `klass'.
10215 * class.c (mono_class_inflate_generic_method): Added `MonoClass
10218 2004-02-20 Martin Baulig <martin@ximian.com>
10220 * reflection.c (method_encode_methodspec): Actually use the
10221 uninflated signature for the memberref.
10223 2004-02-20 Martin Baulig <martin@ximian.com>
10225 * class.h (MonoGenericMethod): Removed `declaring'.
10227 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
10228 is NULL, compute it here.
10230 2004-02-20 Martin Baulig <martin@ximian.com>
10232 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
10234 * metadata.c (mono_metadata_generic_inst_hash): New method.
10235 (mono_metadata_generic_inst_equal): New method.
10237 * reflection.c (mono_reflection_bind_generic_parameters): Use the
10238 `klass->image->generic_inst_cache' cache to avoid creating
10239 duplicate MonoGenericInst's.
10241 * class.c (mono_class_inflate_generic_type): Use the cache.
10243 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
10245 * object.c: fixed gc descriptor calculation for embedded valuetypes.
10247 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10249 * icall.c: added Socket.WSAIoctl icall.
10251 * socket-io.[ch]: implemented
10252 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
10254 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
10256 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
10258 2004-02-18 Urs C Muff <umuff@quark.com>
10260 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
10261 this work on PPC and other big-endian architectures.
10263 * debug-mono-symfile.h: Prepended the names of all the `guint32'
10264 fields with an underscore to make sure they're only accessed by
10265 the read32() macro.
10267 2004-02-18 Martin Baulig <martin@ximian.com>
10269 * icall.c: Put the klass->refclass changes back for methods and
10270 fields, but not for properties and events. We're currently not
10271 distinguishing between DeclaringType and ReflectedType for
10272 properties and events, that's what caused the regressions.
10274 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10277 (mono_async_result_new): the handle can be NULL.
10279 * threadpool.c: Use an event instead of a semaphore, don't initialize
10280 it until needed. This saves quite a few semaphores from being created
10281 when using the threadpool.
10283 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
10285 * object.c (mono_string_is_interned_lookup): Fix interning of long
10286 strings. Fixes #54473.
10288 * domain.c (ldstr_equal): Optimize if the two strings are equal.
10290 * icall.c: Revert the klass->refclass changes since they introduce
10291 regressions (bug #54518).
10293 2004-02-18 Martin Baulig <martin@ximian.com>
10295 * class.c (mono_class_init): If we're a generic instance and don't
10296 come from a TypeBuilder, inflate our members here.
10297 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
10298 (mono_class_create_generic): New public method.
10299 (mono_class_initialize_generic): Removed.
10300 (get_instantiation_name): Renamed to
10301 _mono_class_get_instantiation_name() and made it public.
10303 2004-02-18 Martin Baulig <martin@ximian.com>
10305 * class.c (mono_class_inflate_generic_type): Clear the new
10306 instance's `nginst->klass' when inflating a generic instance.
10307 (mono_class_is_subclass_of): Added (basic) support for generic
10310 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
10312 * appdomain.h, domain.c: use a MonoCodeManager instead of a
10313 MonoMempool to hold compiled native code.
10315 2004-02-17 Martin Baulig <martin@ximian.com>
10317 * class.h (MonoDynamicGenericInst): Added `count_properties' and
10320 * reflection.c (mono_reflection_generic_inst_initialize): Added
10321 `MonoArray *properties' argument.
10323 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
10325 2004-02-17 Martin Baulig <martin@ximian.com>
10327 * icall.c (ves_icall_Type_GetFields): Renamed to
10328 ves_icall_Type_GetFields_internal() and added a
10329 `MonoReflectionType *rtype' argument; pass it to
10330 mono_field_get_object() to set the field's "reflected" type.
10331 (ves_icall_Type_GetConstructors): Likewise.
10332 (ves_icall_Type_GetEvents): Likewise.
10333 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
10334 argument; pass it to mono_method_get_object() to set the method's
10337 2004-02-17 Martin Baulig <martin@ximian.com>
10339 * class.h (MonoDynamicGenericInst): New type.
10340 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
10342 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
10343 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
10344 (ves_icall_MonoGenericInst_GetFields): New interncall.
10346 * class.c (mono_class_from_generic): Don't call
10347 mono_class_initialize_generic() if this is a dynamic instance;
10348 ie. it's being created from a TypeBuilder.
10349 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
10350 `class->byval_arg.type'.
10352 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
10353 to `inflate_method' and made static.
10354 (mono_reflection_inflate_field): Removed.
10355 (mono_reflection_generic_inst_initialize): New public method.
10357 * reflection.h (MonoReflectionGenericInst): Removed `methods',
10358 `ctors' and `fields'; added `initialized'.
10360 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
10362 * debug-helpers.c (mono_method_full_name): Fix output for empty
10365 2004-02-12 Martin Baulig <martin@ximian.com>
10367 * class.h (MonoClassField): Added `MonoType *generic_type'.
10369 * reflection.c (mono_image_get_fieldref_token): Added support for
10370 instantiated generic types.
10371 (field_encode_inflated_field): Removed.
10372 (mono_image_get_inflated_field_token): Removed.
10373 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
10375 * reflection.h (MonoReflectionInflatedField): Removed.
10377 2004-02-12 Martin Baulig <martin@ximian.com>
10379 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
10380 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
10382 * reflection.c (mono_image_get_methodspec_token): Take a
10383 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
10384 (mono_image_create_token): Check whether we have a
10385 `method->signature->gen_method' and call
10386 mono_image_get_methodspec_token() if appropriate.
10387 (inflated_method_get_object): Removed.
10388 (mono_reflection_bind_generic_method_parameters): Return a
10389 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
10390 (mono_reflection_inflate_method_or_ctor): Likewise.
10392 * reflection.h (MonoReflectionInflatedMethod): Removed.
10394 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
10396 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
10397 for custom valuetype marshalling.
10399 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
10401 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10403 * icall.c: fixed WSAGetLastError_internal name.
10405 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
10407 * threads.c (mono_thread_attach): Allow this to be called multiple
10408 times for a thread.
10410 * threads.c (build_wait_tids): Do not wait for ourselves.
10412 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
10413 appdomain list is empty.
10415 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
10416 memory returned by mono_string_builder_to_utf16, since it points into
10417 managed memory. Thanks to Bernie Solomon for noticing this.
10419 * icall.c: Add AppDomainSetup icalls.
10421 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
10423 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
10426 * reflection.c (reflection_methodbuilder_to_mono_method): Save
10427 custom attributes to the method_aux struct. Also fix array indexes etc.
10429 * loader.c (mono_method_get_param_names): Make dynamic case work again.
10431 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
10433 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
10434 (both static and runtime) and reduce startup time.
10436 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
10438 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
10439 AsAny marshalling conversion instead of crashing.
10441 * marshal.c: Fix warnings.
10443 2004-02-09 Martin Baulig <martin@ximian.com>
10445 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
10447 * reflection.h (MonoReflectionInflatedMethod): Removed the
10448 `declaring' field, it's now in the unmanaged MonoGenericMethod.
10450 * reflection.c (method_encode_methodspec): Removed the `method'
10451 argument; we get it from `gmethod->declaring'.
10452 (inflated_method_get_object): Removed the `declaring' argument.
10454 2004-02-09 Martin Baulig <martin@ximian.com>
10456 * class.h (MonoGenericMethod): New type.
10457 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
10460 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
10461 a `MonoGenericMethod *gen_method' one.
10463 * class.c (mono_class_inflate_generic_type): Take an additional
10464 `MonoGenericMethod * argument. This is only non-NULL if we're
10465 inflating types for a generic method.
10466 (mono_class_inflate_generic_signature): Renamed to
10467 inflate_generic_signature() and made static; take a
10468 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
10469 (inflate_generic_header): Take a `MonoGenericMethod *' argument
10470 instead of a `MonoGenericInst *' one.
10471 (mono_class_inflate_generic_method): Likewise.
10473 * reflection.c (encode_generic_method_sig): Take a
10474 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
10475 (method_encode_methodspec): Likewise.
10476 (inflated_method_get_object): Likewise.
10478 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
10479 field with a `MonoGenericMethod *gmethod' one.
10481 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
10483 * class.h (mono_class_has_parent): add parens to expansion
10486 2004-02-08 Martin Baulig <martin@ximian.com>
10488 * image.h (MonoImage): Removed `generics_cache'.
10490 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
10491 instead of a `MonoType *' argument; removed the `inflate_methods'
10492 argument. Don't inflate methods here.
10494 * loader.c (find_method): If it's a generic instance, call
10495 mono_class_init() on the `sclass->generic_inst->generic_type'.
10497 * metadata.c (mono_type_size): Make this work on uninitialized
10498 generic instances; call it on the `ginst->generic_type's class.
10500 * reflection.c (mono_reflection_bind_generic_parameters): Call
10501 mono_class_from_generic() to create the `ginst->klass'.
10503 2004-02-08 Martin Baulig <martin@ximian.com>
10505 * class.h (MonoClass): Changed type of `generic_inst' from
10506 `MonoType *' to `MonoGenericInst *'.
10508 2004-02-08 Martin Baulig <martin@ximian.com>
10510 * icall.c (ves_icall_Type_BindGenericParameters): Just call
10511 mono_type_get_object(), this is now creating a `MonoGenericInst'
10512 for MONO_TYPE_GENERICINST.
10513 (ves_icall_MonoGenericInst_GetParentType): Likewise.
10514 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
10516 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
10517 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
10518 (inflated_method_get_object): Added `MonoClass *refclass' argument.
10519 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
10520 and reflected type.
10522 * reflection.h (MonoReflectionInflatedMethod): Removed
10523 `declaring_type' and `reflected_type'.
10525 2004-02-08 Martin Baulig <martin@ximian.com>
10527 * class.h (MonoGenericInst): Added `MonoType *parent' and
10528 `MonoType **ifaces'.
10530 * reflection.h (MonoReflectionGenericInst): Removed `klass',
10531 `parent' and `interfaces'.
10533 * reflection.c (mono_reflection_bind_generic_parameters): Take a
10534 `MonoType *' argument and return a `MonoType *'.
10537 (ves_icall_MonoGenericInst_GetParentType): New interncall.
10538 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
10540 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
10542 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
10543 valuetype marshalling.
10545 2004-02-06 Martin Baulig <martin@ximian.com>
10548 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
10549 (my_mono_class_from_generic_parameter): Likewise.
10551 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
10553 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
10554 contents of the symbol files lazily.
10556 * object.h (MonoThread): Add 'name' and 'name_len' fields.
10558 * threads.h threads.c icall.c: New icalls for getting and setting the
10561 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
10563 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
10564 Raise an exception when the domain is not found.
10566 2004-02-03 Martin Baulig <martin@ximian.com>
10568 * reflection.c (mono_image_get_methodspec_token): Use the
10569 uninflated signature; fixes gen-33.
10571 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
10573 * gc.c threads.c: Make the finalizer thread a normal managed thread so
10574 the finalizer code can use thread functionality.
10576 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
10577 the finalizer thread.
10579 * threads.c: Make some functions more robust.
10581 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
10583 * metadata.h: Add new marshalling conventions.
10585 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
10586 stringbuilder marshalling. Fixes #53700.
10588 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
10590 * reflection.c (mono_image_get_type_info): Save declarative security
10593 * reflection.c (mono_image_get_field_info): Handle uninitialized
10594 unmanaged fields as well.
10596 * appdomain.c: Bump corlib version.
10598 2004-02-01 Martin Baulig <martin@ximian.com>
10600 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
10601 method type arguments.
10603 2004-01-30 Duncan Mak <duncan@ximian.com>
10605 * marshal.h: Add prototype for
10606 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
10608 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
10611 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
10613 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
10614 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
10616 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
10618 * marshal.c (mono_marshal_get_native_wrapper): Add support for
10619 custom marshalling of valuetypes.
10621 * marshal.c: Fix some warnings.
10623 2004-01-29 Martin Baulig <martin@ximian.com>
10625 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
10626 for generic method parameters.
10628 * reflection.c (method_encode_methodspec): Write the uninflated
10629 signature into the methodspec table.
10630 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
10631 is always the uninflated method.
10632 (reflection_methodbuilder_to_mono_method): Copy the generic
10633 parameters from the MethodBuilder into `header->gen_params'.
10635 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
10637 * class.c (mono_class_from_generic_parameter): Fix warning.
10639 2004-01-27 Martin Baulig <martin@ximian.com>
10641 * class.c (mono_class_from_generic_parameter): Don't create
10642 `klass->methods' here.
10644 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
10646 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
10647 extension since it does not work with libraries named lib<FOO>.dll.so.
10649 2004-01-25 Martin Baulig <martin@ximian.com>
10651 * class.c (mono_class_inflate_generic_type): Added support for
10652 MONO_TYPE_GENERICINST.
10654 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
10655 inflate methods on open constructed types.
10657 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10659 * object.c: fire ProcessExit event in the root AppDomain after running
10660 Main. Fixes bug #53299.
10662 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
10664 * socket-io.c: include the new socket-wrappers.h header.
10665 Use the wrappers instead of the unix socket functions to make the code
10668 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
10670 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
10672 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10675 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
10677 * reflection.c (mono_image_create_pefile): Handle the case when the
10678 entry point is not a MethodBuilder.
10680 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10681 field to ReflectionMethod since it is not allways a builder.
10683 * reflection.c (type_get_fully_qualified_name): New helper function to
10684 return the fully qualified name of a type.
10686 * reflection.c (encode_marshal_blob): Always emit the fully qualified
10687 type name for custom marshallers.
10689 * reflection.c (mono_marshal_spec_from_builder): Ditto.
10691 * class.c (mono_class_setup_vtable): If a parent class already
10692 implements an interface, use the implementing methods from that class.
10695 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10697 * threadpool.c: just return instead of ExitThread to allow for thread
10700 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
10702 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
10703 when closing resource modules.
10705 * reflection.c (mono_image_create_pefile): Handle the case when the
10706 entry point is not a MethodBuilder.
10708 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10709 field to ReflectionMethod since it is not allways a builder.
10711 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
10713 * marshal.c (mono_marshal_get_managed_wrapper):
10714 mono_marshal_alloc takes native int so CONV_I
10715 the arg for 64bits.
10717 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
10719 * reflection.c (fixup_cattrs): New function to fixup the methoddef
10720 tokens in the cattr table. Fixes #53108.
10722 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10724 * loader.c: don't trim ".dll" before looking up in the config file.
10725 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
10727 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
10729 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
10730 Return the module which contains the resource as well.
10731 (ves_icall_System_Reflection_Module_Close): New icall.
10733 * appdomain.c: Bump corlib version number.
10735 * image.c (mono_image_addref): New public function.
10737 * assembly.c: Call mono_image_addref.
10739 * reflection.c (mono_module_get_object): Increase reference count of
10742 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10745 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
10746 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
10747 proper exceptions on DllImport problems.
10749 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
10751 * class.c, metadata.c: eliminate CSIZE macro.
10753 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
10755 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
10756 * object.h: Added async_callback field in MonoAsyncResult.
10757 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
10758 * verify.c: Added async_callback in MonoAsyncResult layout.
10760 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
10762 * reflection.c (mono_reflection_get_custom_attrs): Add support
10765 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
10767 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
10769 (mono_marshal_method_from_wrapper): Add null pointer check.
10771 2004-01-16 Martin Baulig <martin@ximian.com>
10773 * debug-mono-symfile.h: Set version number to 36 and reflect
10774 latest symbol writer changes.
10776 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
10778 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
10779 multi-dimensional arrays.
10780 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
10781 (mono_class_from_mono_type): Use bounded_array_class_get.
10783 * class.c (mono_bounded_array_class_get): New function which takes
10784 a 'bounded' bool argument to distinguish vectors from one dimensional
10787 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
10788 bounded_array_class_get if the array has bounds.
10790 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
10791 Search modules loaded using AssemblyBuilder:AddModule as well.
10793 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10795 * appdomain.c: increased corlib version.
10796 * filewatcher.c: removed g_print.
10798 (get_property_info): only allocate what is actually requested.
10799 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
10801 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10803 * Makefile.am: added filewatcher.[ch]
10804 * filewatcher.[ch]: FileSystemWatcher runtime support.
10805 * icall.c: added new FSW icalls.
10807 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10809 * string-icalls.c: fix stringbuilder regression as suggested by
10810 Iain McCoy <iain@mccoy.id.au>.
10812 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
10814 * process.c (process_read_stringtable_block): Recognize '007f' as
10815 a language neutral stringtable block.
10817 2004-01-12 Patrik Torstensson
10819 * object.h (MonoStringBuilder) : Changed layout to support our
10820 new stringbuilder class.
10821 * marshal.c: Change marshalling to support the new layout of
10823 * appdomain.c: increased version number because new layout of
10826 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
10828 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
10829 assembly name as an string instead of an AssemblyName, since it is
10830 easier to extract info from it.
10832 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
10833 the culture subdirectories too. Fixes #52231.
10835 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10837 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
10838 It takes 2 new parameters with an optional name for the method to look
10839 for and case ignoring info.
10841 * threadpool.c: removed unused variable.
10843 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10845 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
10846 It takes 2 new parameters with an optional name for the property to look
10847 for and case ignoring info.
10850 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
10852 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
10855 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10858 * assembly.c: escape the uri before passing it to g_filename_from_uri.
10861 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
10863 * reflection.c: Add support for more than one unmanaged resource.
10865 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
10866 in field->def_value, as done in all other cases.
10868 * reflection.c (mono_reflection_get_custom_attrs): Add support for
10871 * reflection.c (mono_reflection_create_runtime_class): Remove
10872 errorneous assignment to klass->element_class, since it is already
10873 done in mono_reflection_setup_internal_class.
10875 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10877 * gc.c: added missing LeaveCriticalSection.
10878 * icall.c: indented a couple of lines.
10879 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
10880 if we call EndInvoke inside a callback. Fixes bug #52601.
10882 2004-01-07 Martin Baulig <martin@ximian.com>
10884 * mono-debug-debugger.h
10885 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
10887 2004-01-06 Miguel de Icaza <miguel@ximian.com>
10889 * appdomain.c: Use messages in NotImplementedException.
10891 * exception.c (mono_get_exception_not_implemented): Now this takes
10892 a message argument.
10894 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
10895 exception instead of g_asserting an aborting when something is not
10898 Add some inline docs.
10900 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
10902 * reflection.h: Update after changes to object layout.
10904 * reflection.c: Implement saving of unmanaged aka win32 resources.
10906 * appdomain.c: Bump version number.
10908 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
10909 Handle missing domains gracefully.
10911 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
10913 * file-io.c : On Windows, there are much more invalid_path_chars.
10915 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
10917 * class.h, object.c: prepare for GetType () speedup.
10919 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
10921 * profiler.c: workaround for --profile null reference exception on
10922 cygwin. Patch by Patrik Torstensson.
10924 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
10926 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
10927 make work for unaligned access.
10929 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
10931 * class.c: small cleanup (class->fields [i] -> field).
10932 * image.c: check address of metadata is valid.
10934 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
10936 * assembly.h assembly.c (mono_assembly_loaded): New public function to
10937 search the list of loaded assemblies.
10939 * reflection.c (mono_reflection_type_from_name): Use
10940 mono_assembly_loaded instead of mono_image_loaded.
10942 * reflection.c: Fix warnings.
10944 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
10946 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
10947 is dynamic. This is needed since an assembly can contain both dynamic and
10948 non-dynamic images.
10950 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
10953 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
10955 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
10956 to store modules loaded using AddModule.
10958 * reflection.c (mono_image_fill_file_table): Generalize this so it works
10961 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
10963 * reflection.c (mono_image_fill_export_table_from_module): New function to
10964 fill out the EXPORTEDTYPES table from a module.
10966 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
10967 into a separate function. Also handle loaded non-dynamic modules.
10969 * reflection.c (mono_image_basic_init): Fix memory allocation.
10971 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10973 * assembly.c (mono_assembly_load_references): Make this public.
10975 2003-12-19 Martin Baulig <martin@ximian.com>
10977 * class.c (mono_class_initialize_generic): Made this static, take
10978 a `MonoGenericInst *' instead of a `MonoClass *'.
10979 (mono_class_from_generic): Call mono_class_initialize_generic()
10980 unless we're already initialized or being called from
10981 do_mono_metadata_parse_generic_inst().
10983 * class.h (MonoGenericInst): Added `initialized' and
10984 `init_pending' flags.
10986 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
10987 `mono_class_init (gklass)' or mono_class_initialize_generic()
10988 here; set `generic_inst->init_pending' while parsing the
10991 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
10993 * locales.c: include string.h for memxxx prototypes
10995 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
10997 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
10998 constructor when accessing literal fields.
11000 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
11002 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11004 * reflection.c (assembly_add_resource_manifest): New function to fill
11005 the MANIFESTRESOURCE table.
11007 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
11009 * reflection.h: Update to changes in class layout.
11011 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
11012 Reenable call to mono_runtime_is_shutting_down ().
11014 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
11015 determine if the runtime is shutting down.
11017 2003-12-16 Jackson Harper <jackson@ximian.com>
11019 * icall.c: comment out call to mono_runtime_is_shutting_down to
11022 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
11024 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
11025 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
11027 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
11029 * reflection.c: move definition of swap_with_size
11030 to before its first call
11032 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
11034 * appdomain.c (mono_runtime_is_shutting_down): New public function.
11036 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
11039 * object.c: Fix warnings.
11041 * icall.c (ves_icall_Type_Get...): Only consider inherited static
11042 members if FlattenHierarchy is set.
11044 * reflection.c (mono_image_add_decl_security): New function to emit
11045 declarative security.
11047 * reflection.h reflection.c: Add support for declarative security.
11049 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11051 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
11053 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11055 * appdomain.c verify.c: Moved corlib version checking into its own
11056 function in appdomain.c since it needs to create vtables etc.
11058 2003-12-13 Patrik Torstensson <p@rxc.se>
11060 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
11061 instead of unwrapped server.
11063 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
11065 * verify.c (check_corlib): Fix field index.
11067 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
11069 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
11072 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
11074 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
11075 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
11076 cope with sizeof(size_t) != sizeof(guint32).
11078 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11080 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
11081 in case of failure.
11083 2003-12-10 Mark Crichton <crichton@gimp.org>
11085 * icall.c: removed the GetNonZeroBytes. We now handle this case
11088 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
11090 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
11092 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
11095 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
11097 * verify.c (check_corlib): Handle the case when the version field is
11098 initialized by a static constructor.
11100 2003-12-08 Patrik Torstensson <p@rxc.se>
11102 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
11104 2003-12-08 Martin Baulig <martin@ximian.com>
11106 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
11107 a MonoReflectionGenericParameter, also take the parameter index
11108 and name as arguments.
11109 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11110 (ves_icall_MonoGenericParam_initialize): New interncall.
11111 (ves_icall_Type_make_byref_type): New interncall.
11113 * reflection.h (MonoReflectionGenericParam): Derive from
11114 MonoReflectionType, not just from MonoObject. Added `refobj' and
11117 * reflection.c (mono_reflection_define_generic_parameter): Create
11118 and return a new MonoReflectionGenericParam; don't initialize the
11120 (mono_reflection_initialize_generic_parameter): New public method;
11121 initializes the constraints and creates the `param->pklass'.
11123 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
11125 * reflection.h reflection.c: Use the new fields 'num_types',
11126 'num_fields' and 'num_methods' to track the number of types etc.
11128 * verify.c (check_corlib): Check corlib version number.
11130 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
11132 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
11133 function works on all methods.
11135 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
11137 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
11138 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
11139 the custom_type_info flag of the transparent proxy.
11140 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
11141 objects that supports IRemotingTypeInfo.
11142 * object.h: Added custom_type_info field in transparent proxy.
11144 2003-12-06 Martin Baulig <martin@ximian.com>
11146 * class.c (mono_class_create_from_generic): Removed.
11147 (mono_class_from_generic): Check `ginst->klass' before doing
11148 anything else. This is important to fully support "recursive"
11151 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
11152 empty `generic_inst->klass' before doing anything else.
11154 2003-12-06 Dick Porter <dick@ximian.com>
11159 * locales.c: Use C structs to access class fields. Don't do a
11160 conversion between MonoString and UChar because both are
11161 platform-endian UTF-16. Compare now takes startindex and count
11162 parameters. Add a char overload for IndexOf. Speed up the
11163 invariant string IndexOf.
11165 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
11167 * Makefile.am (monosn_LDADD): Fix parallel build.
11169 2003-12-04 Martin Baulig <martin@ximian.com>
11172 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11173 (ves_icall_Type_make_array_type): New interncall.
11175 2003-12-04 Martin Baulig <martin@ximian.com>
11177 * locales.c: also change it in the !HAVE_ICU case.
11179 2003-12-04 Dick Porter <dick@ximian.com>
11182 * locales.c: construct_compareinfo is now in CompareInfo, not
11185 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
11187 * image.c (mono_image_load_file_for_image): Cache loaded images in the
11188 image->files array.
11190 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
11193 * assembly.c (mono_assembly_load_references): Only load references
11196 * class.c (mono_class_from_name): Avoid linear search of the
11197 EXPORTEDTYPE table.
11199 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
11201 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
11203 * image.h (MonoImage): Add 'field_cache' field.
11205 * loader.c (mono_field_from_token): Cache field lookups.
11207 * reflection.c (mono_module_get_object): Fix name property.
11209 * icall.c (ves_icall_get_enum_info): Update after changes to
11210 mono_metadata_get_constant_index ().
11212 * icall.c: Get rid of get_type_info icall, use a separate icall for
11213 each type property to avoid needless memory allocations. Fixes #51514.
11215 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
11216 to avoid needless binary searches.
11218 * class.c (class_compute_field_layout): Move the initialization of
11219 field->def_value to mono_class_vtable ().
11221 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
11224 * object.c (mono_object_allocate): Make it inline.
11226 * object.c (mono_object_allocate_spec): Make it inline.
11228 2003-12-02 Dick Porter <dick@ximian.com>
11230 * locales.c (create_NumberFormat): NumberFormatInfo construction.
11231 Patch by Mohammad DAMT (mdamt@cdl2000.com).
11233 2003-12-01 Dick Porter <dick@ximian.com>
11235 * threads.c: Fix signature and call in CreateMutex and
11238 2003-12-01 Dick Porter <dick@ximian.com>
11241 * locales.c: Implement string compares and searching
11243 * object.h: Add extra Thread field
11245 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
11247 * reflection.c (fixup_method): Add support for MonoCMethod.
11249 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
11251 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
11253 * reflection.c (assembly_name_to_aname): Allow extra characters in
11254 assembly names. Fixes #51468.
11256 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
11258 * exception.c (mono_exception_from_name_domain): New helper function.
11260 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
11261 exception object in the correct domain.
11263 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
11264 formatting + make a copy a the input data.
11266 * loader.c (mono_get_method_from_token): Methods which contain
11267 native code do not have entries in the ImplMap.
11269 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
11270 Thanks to Gonzalo for spotting this.
11272 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
11273 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
11275 * assembly.h (mono_assembly_load_from): Split the second part of
11276 assembly loading into a new public function.
11278 * exception.h (mono_get_exception_bad_image_format): New function.
11280 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
11282 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
11283 Enumerate all modules inside a dynamic assembly. Fixes #51293.
11285 * icall.c: Add new icall for creating dynamic methods.
11287 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
11289 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
11291 * reflection.c (mono_reflection_create_dynamic_method): New icall to
11292 create a dynamic method.
11294 * reflection.c (resolve_object): New helper function.
11296 * reflection.c: Generalize ReflectionMethodBuilder and the functions
11297 which manipulate it so they can also work on dynamic methods.
11299 * reflection.c (reflection_method_builder_to_mono_method): Avoid
11300 creating the MonoReflectionMethodAux structure if it is not needed.
11302 * reflection.h verify.c: Update after changes to object layout.
11304 * reflection.c (method_builder_encode_signature): Fix compilation on
11307 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
11309 * appdomain.h: Added support for context static fields. Added static_data
11310 field to MonoAppContext and renamed thread_static_fields to a more
11311 generic special_static_fields in MonoAppDomain, since it can now contain
11312 context static fields.
11313 * domain.c: Updated hashtable name.
11314 * object.c: Replaced field_is_thread_static() for a more generic
11315 field_is_special_static() which also checks for context static attribute.
11316 In mono_class_vtable(), added support for static context fields.
11317 * threads.c: Changed methods that manage thread static fields to more
11318 generic methods so they can be reused both for thread and context static
11320 * threads.h: Declared some new methods.
11322 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
11324 * reflection.h: Update after changes to the managed types.
11326 * reflection.c (encode_custom_modifiers): New helper function.
11328 * reflection.c (method_encode_signature): Emit custom modifiers.
11330 * reflection.c (field_encode_signature): Emit custom modifiers.
11332 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
11334 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
11336 * icall.c (ves_icall_System_ValueType_Equals): New optimized
11339 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
11342 * object.c (mono_field_get_value_object): New function.
11344 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
11347 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
11349 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
11350 return a preallocated out-of-memory exception instance.
11352 * object.c (out_of_memory): Use the new function.
11354 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
11355 flag is before the custom modifiers. Fixes #49802.
11357 2003-11-16 Martin Baulig <martin@ximian.com>
11359 * class.c (mono_class_is_open_constructed_type): Implemented the
11360 MONO_TYPE_GENERICINST case.
11362 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
11364 * assembly.c (mono_assembly_fill_assembly_name): New function to
11365 fill out the MonoAssemblyName structure.
11366 (mono_assembly_open): Use the new function.
11368 * icall.c (fill_reflection_assembly_name): New helper function.
11370 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
11373 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
11375 2003-11-15 Martin Baulig <martin@ximian.com>
11377 * class.c (mono_class_is_open_constructed_type): New public
11378 function; checks whether a type is an open constructed type,
11379 ie. whether it still contains type parameters.
11380 (mono_class_inflate_generic_type): If we're a type parameter and
11381 the inflated type is also a MONO_TYPE_(M)VAR, return the original
11384 * class.h (MonoGenericInst): Added `guint32 is_open'.
11386 * loader.c (method_from_methodspec): Check whether we're an open
11387 or closed constructed type and set `ginst->is_open'.
11389 * reflection.c (mono_reflection_bind_generic_parameters): Check
11390 whether we're an open or closed constructed type and set
11392 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
11393 from open constructed types.
11395 2003-11-15 Martin Baulig <martin@ximian.com>
11397 * reflection.c (mono_reflection_bind_generic_parameters): If we're
11398 a generic instance (instead of a generic type declaration) with
11399 unbound generic parameters, bind them to our actual types.
11401 2003-11-14 Martin Baulig <martin@ximian.com>
11403 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
11405 * reflection.c (mono_reflection_bind_generic_parameters): If we're
11406 an interface type, populate `res->interfaces' with instantiated
11407 versions of all the interfaces we inherit.
11409 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
11411 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
11412 when MONO_PATH is set but doesn't contain the install dir.
11414 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11417 (ves_icall_Type_GetInterfaces): don't return an interface twice when
11418 it's also implemented in base classes. Fixes bug #50927.
11420 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
11422 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
11423 if this method is called from a finalizer. Fixes #50913.
11425 2003-11-12 Miguel de Icaza <miguel@ximian.com>
11427 * threads.c: Implement VolatileRead/VolatileWrite
11429 * icall.c: Add new icalls for VolatileRead/VolatileWrite
11431 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
11433 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
11434 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
11437 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
11438 from Peter Ross (pro@missioncriticalit.com).
11440 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
11442 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
11444 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
11446 * assembly.c (mono_assembly_load_references): Disable check because it
11447 triggers on older corlibs which lots of people have.
11449 2003-11-12 Jackson Harper <jackson@ximian.com>
11451 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
11452 load corlib.dll if mscorlib.dll is not found.
11453 * assembly.h: Remove corlib name define.
11456 * image.c: Change corlib name to mscorlib.
11458 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
11460 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
11462 2003-11-11 Miguel de Icaza <miguel@ximian.com>
11464 * appdomain.h: Added loader_optimization here to sync with the C#
11465 code, and add disallow_binding_redirects field.
11467 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
11469 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
11471 * reflection.c (mono_image_build_metadata): Fix crash on modules
11474 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
11476 * icall.c (ves_icall_get_method_info): Return callingConvention as
11479 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
11480 namespaces from the EXPORTEDTYPE table as well.
11482 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
11483 from all modules inside the assembly.
11485 2003-11-11 Martin Baulig <martin@ximian.com>
11487 * reflection.c (mono_reflection_bind_generic_parameters): Make
11488 this work for interfaces.
11490 2003-11-11 Martin Baulig <martin@ximian.com>
11492 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
11494 2003-11-11 Martin Baulig <martin@ximian.com>
11496 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
11497 "MonoInflatedMethod" and "MonoInflatedCtor".
11499 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
11501 * reflection.c (resolution_scope_from_image): Use the assembly table
11502 from the manifest module, since other modules don't have it.
11504 * debug-helpers.c (mono_type_full_name): New helper function.
11506 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
11508 * image.c (mono_image_load_file_for_image): New public function which
11509 is a replacement for the load_file_for_image in class.c.
11511 * assembly.c (mono_assembly_load_module): A wrapper for the function
11512 above which does assembly association and reference loading too.
11514 * class.c (mono_class_from_name): Call mono_assembly_load_module.
11516 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11518 * appdomain.c: not all of the attributes for the full assembly name
11519 are required and the order doesn't matter. Fixes bug #50787.
11521 2003-11-10 Dick Porter <dick@ximian.com>
11523 * locales.c: Use platform-endian UTF16
11525 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
11527 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
11529 2003-11-10 Martin Baulig <martin@ximian.com>
11532 (mono_metadata_load_generic_params): Make this actually work.
11534 * reflection.c (mono_reflection_bind_generic_parameters): If our
11535 parent is a generic instance, pass all the `types' to it, no
11536 matter whether it has the same number of type parameters or not.
11538 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
11540 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
11542 * assembly.c (mono_assembly_load_references): Move the image<->assembly
11543 assignment code to this function so it gets called recursively for all
11546 * image.c (load_modules): Remove the assembly assignment since it is
11547 now done by mono_assembly_load_references.
11549 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
11550 Add 'module' argument.
11551 (mono_module_get_types): New helper function.
11552 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
11554 2003-11-08 Martin Baulig <martin@ximian.com>
11556 * class.c (mono_class_inflate_generic_method): Interface method
11557 don't have a header.
11559 * reflection.c (mono_image_get_methodspec_token): Take an
11560 additional `MonoGenericInst *' argument instead of reading it from
11561 the header; this is necessary to support interfaces.
11562 (mono_image_create_token): Pass the `MonoGenericInst *' from the
11563 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
11564 (inflated_method_get_object): Take an additional `MonoGenericInst *'
11567 * reflection.h (MonoReflectionInflatedMethod): Added
11568 `MonoGenericInst *ginst'.
11570 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
11572 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
11574 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
11576 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
11578 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
11581 (reflection_methodbuilder_from_method_builder):
11582 (reflection_methodbuilder_from_ctor_builder): New helper functions to
11583 initialize a ReflectionMethodBuilder structure.
11584 (mono_image_get_methodbuilder_token):
11585 (mono_image_get_ctorbuilder_token): New functions to emit memberref
11586 tokens which point to types in another module inside the same assembly.
11588 * reflection.c: Use the new helper functions.
11590 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
11592 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
11593 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
11595 * reflection.c (resolution_scope_from_image): Emit a moduleref if
11598 * reflection.c (mono_image_build_metadata): Emit metadata only for the
11599 current module. Emit the manifest only for the main module.
11601 * reflection.c (mono_image_create_token): Add assertion when a
11602 memberref needs to be created.
11604 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
11606 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
11607 larger buffer for the custom attribute blob. Fixes #50637.
11609 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11611 * threadpool.c: notify listener on async processing handles after
11612 invoking the async callback. Thanks to Zoltan.
11614 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
11616 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
11617 avoid code duplication.
11619 * reflection.h (MonoDynamicImage): New type which is currently unused,
11620 but will be used through the ref.emit code in place of
11621 MonoDynamicAssembly.
11623 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11626 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
11627 a MonoDynamicImage instead of just a MonoImage.
11629 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
11630 icalls to ModuleBuilder but keep their semantics, so they will work
11631 with moduleb->assemblyb. This will change later.
11633 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
11635 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11638 * reflection.c (mono_image_build_metadata): Avoid creation of a default
11639 main module, since it is now done by the managed code.
11641 2003-11-03 Martin Baulig <martin@ximian.com>
11643 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
11644 `ginst->klass' here.
11645 (method_encode_methodspec): Don't use the `ginst->generic_method's
11646 klass if it's a generic instance, use `ginst->klass' in this case.
11648 2003-11-03 Martin Baulig <martin@ximian.com>
11650 * reflection.c (mono_image_get_generic_method_param_info):
11651 Removed, use mono_image_get_generic_param_info() instead.
11652 (mono_image_get_type_info): Write the GenericParam table before
11653 the Method table. This is neccessary because in the GenericParam
11654 table, type parameters of the class (ie. '!0' etc.) must come
11655 before the ones from its generic methods (ie. '!!0' etc).
11657 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
11659 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
11661 2003-11-02 Martin Baulig <martin@ximian.com>
11663 * reflection.c (create_generic_typespec): Take a
11664 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
11665 the generic parameters from it.
11667 2003-11-02 Martin Baulig <martin@ximian.com>
11669 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
11670 instead of a `MonoClassField *' since we just need the type.
11671 (create_generic_typespec): New static function. Creates a
11672 TypeSpec token for a generic type declaration.
11673 (mono_image_get_generic_field_token): New static function.
11674 (mono_image_create_token): If we're a FieldBuilder in a generic
11675 type declaration, call mono_image_get_generic_field_token() to get
11678 2003-11-02 Martin Baulig <martin@ximian.com>
11681 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
11682 `MonoReflectionGenericInst *declaring_type' and
11683 `MonoReflectionGenericInst *reflected_type' fields.
11685 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
11686 `MonoReflectionGenericInst *declaring_type' and a
11687 `MonoReflectionGenericInst *reflected_type' argument instead of a
11688 single `MonoReflectionGenericInst *type' one. Set
11689 `res->declaring_type' and `res->reflected_type' from them.
11690 (mono_reflection_inflate_field): Likewise.
11692 2003-11-02 Martin Baulig <martin@ximian.com>
11694 * class.c (mono_class_setup_vtable): Don't store generic methods
11697 2003-11-02 Martin Baulig <martin@ximian.com>
11699 * reflection.h (MonoReflectionGenericInst): Added
11700 `MonoReflectionType *declaring_type'.
11702 * reflection.c (mono_reflection_bind_generic_parameters): Use
11703 `if (tb->parent)' instead of `klass->parent'.
11705 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
11707 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
11708 with an empty ASSEMBLY table.
11710 * reflection.c (mono_image_build_metadata): Avoid using the same loop
11711 variable in the inner and outer loops.
11713 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
11715 * metadata.h (mono_metadata_make_token): Put parentheses around macro
11718 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
11720 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
11721 icalls. Instead, do everything in managed code. This is needed since
11722 it is hard to restore the original domain etc. in unmanaged code in the
11723 presence of undeniable exceptions.
11725 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
11726 New icalls to push and pop appdomain refs.
11728 2003-10-31 Martin Baulig <martin@ximian.com>
11730 * class.c (inflate_generic_type): Renamed to
11731 mono_class_inflate_generic_type() and made it public.
11733 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
11736 * loader.c (mono_field_from_memberref): Also set the retklass for
11739 * fielder.c (mono_image_get_inflated_field_token): New static
11740 method; creates a metadata token for an inflated field.
11741 (mono_image_create_token, fixup_method): Added support for
11742 "MonoInflatedField".
11743 (fieldbuilder_to_mono_class_field): New static function.
11744 (mono_reflection_inflate_field): New public function.
11747 (MonoReflectionGenericInst): Added `MonoArray *fields'.
11748 (MonoReflectionInflatedField): New typedef.
11750 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
11752 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
11753 for Solaris and other platforms without s6_addr16
11755 2003-10-30 Martin Baulig <martin@ximian.com>
11757 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
11758 argument instead of two.
11759 (mono_class_inflate_generic_signature): Likewise.
11760 (inflate_generic_header): Likewise.
11761 (mono_class_inflate_generic_method): Likewise. In addition, if
11762 `ginst->klass' is set, it becomes the new `method->klass'.
11764 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
11767 * reflection.c (encode_generic_method_sig): Write a 0xa as the
11768 first byte. [FIXME]
11769 (method_encode_methodspec): If we have generic parameters, create
11770 a MethodSpec instead of a MethodRef.
11771 (fixup_method): Added support for "MonoInflatedMethod" and
11772 "MonoInflatedCtor".
11773 (mono_image_create_token): Added support for "MonoInflatedMethod"
11774 and "MonoInflatedCtor".
11775 (inflated_method_get_object): New static function; returns a
11776 managed "System.Reflection.MonoInflatedMethod" object.
11777 (mono_reflection_bind_generic_method_parameters): Return a
11778 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
11779 (mono_reflection_inflate_method_or_ctor): Likewise.
11780 (mono_image_get_generic_method_param_info): Initialize unused
11782 (mono_image_get_generic_param_info): Likewise.
11784 * reflection.h (MonoReflectionInflatedMethod): New public
11785 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
11786 "S.R.MonoInflatedCtor" classes.
11788 * loader.c (method_from_memberref): If we're a TypeSpec and it
11789 resolves to a generic instance, inflate the method.
11791 2003-10-28 Dick Porter <dick@ximian.com>
11793 * object.c (mono_runtime_run_main): Convert command-line arguments
11794 into utf8, falling back to the user's locale encoding to do so.
11796 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
11798 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
11801 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
11803 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
11804 up icalls at method definition time. Partially fixes #33569.
11806 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
11808 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
11809 marshalling of arrays. Fixes #50116.
11811 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
11813 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
11814 points to a vtable in the dying appdomain.
11816 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
11817 listeners into unmanaged code inside the lock.
11819 * object.c (mono_class_vtable): Turn off typed allocation in non-root
11820 domains and add some comments.
11822 2003-10-25 Martin Baulig <martin@ximian.com>
11824 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
11826 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
11828 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
11829 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
11830 currently parsing. Create the generic class and store it in
11831 `generic_inst->klass' before parsing the type arguments. This is
11832 required to support "recursive" definitions; see mcs/tests/gen-23.cs
11834 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
11835 to support recursive typespec entries.
11837 * class.c (mono_class_setup_parent): If our parent is a generic
11838 instance, we may get called before it has its name set.
11839 (mono_class_from_generic): Splitted into
11840 mono_class_create_from_generic() and mono_class_initialize_generic().
11842 2003-10-25 Martin Baulig <martin@ximian.com>
11844 * icall.c (ves_icall_Type_BindGenericParameters): Return a
11845 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
11846 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
11847 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
11849 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
11850 (create_typespec): Likewise.
11851 (mono_reflection_bind_generic_parameters): Return a
11852 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
11853 (mono_reflection_inflate_method_or_ctor): New public function.
11855 * reflection.h (MonoReflectionGenericInst): New typedef.
11857 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
11859 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
11860 inside the domain lock. Fixes #49993.
11862 * object.c (mono_class_vtable): When typed allocation is used,
11863 allocate vtables in the GC heap instead of in the mempool, since the
11864 vtables contain GC descriptors which are used by the collector even
11865 after the domain owning the mempool is unloaded.
11867 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
11869 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
11870 reflect what it does. Also invalidate mempools instead of freeing
11871 them if a define is set.
11873 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
11876 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
11877 hold the finalizable objects in this domain.
11879 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
11882 * appdomain.c (mono_domain_set): New function to set the current
11883 appdomain, but only if it is not being unloaded.
11885 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
11886 appdomain which is being unloaded.
11888 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
11889 unloading of the root appdomain.
11891 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
11892 icall to execute a method in another appdomain. Intended as a
11893 replacement for InternalSetDomain, which can confuse the code
11894 generation in the JIT.
11896 * appdomain.c (mono_domain_is_unloading): New function to determine
11897 whenever an appdomain is unloading.
11899 * appdomain.c (mono_domain_unload): New function to correctly unload
11902 * assembly.c (mono_assembly_load_references): Check that an assembly
11903 does not references itself.
11905 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
11906 domain manually, it asks the finalizer thread to do it, then waits for
11907 the result. Also added a timeout.
11909 * icall.c: Register the new icalls.
11911 * threads.h threads.c: Export the mono_gc_stop_world and
11912 mono_gc_start_world functions.
11914 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
11915 function to fill out the mempool with 0x2a.
11917 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
11919 * reflection.h (MonoReflectionMethodAux): New structure to store
11920 information which is rarely used, thus is not in the MonoMethod
11923 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
11924 store the aux info.
11926 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
11927 and marshalling info into the aux structure.
11929 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
11930 from the aux structure.
11932 * loader.c (mono_method_get_param_names): Retrieve the param names from
11935 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
11937 * exception.h exception.c: Add AppDomainUnloadedException && fix
11940 2003-10-21 Dick Porter <dick@ximian.com>
11943 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
11944 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
11946 2003-10-21 Martin Baulig <martin@ximian.com>
11948 * reflection.c (mono_reflection_bind_generic_parameters):
11949 `klass->parent' is NULL for interfaces.
11951 2003-10-21 Martin Baulig <martin@ximian.com>
11953 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11955 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
11957 * exception.c (mono_exception_from_name_msg): New helper function for
11958 creating exceptions and initializing their message field.
11960 * exception.c: Simplify functions using the new helper.
11962 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
11965 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
11966 mono_raise_exception, since otherwise gcc doesn't generate the function
11967 epilog for raise_exception, confusing the stack unwinding in the JIT.
11970 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
11971 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
11974 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11976 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
11979 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
11981 * icall.c: Removed GetUninitializedObject method because
11982 AllocateUninitializedClassInstance does the same.
11984 2003-10-18 Martin Baulig <martin@ximian.com>
11986 * class.c (inflate_generic_signature): Renamed to
11987 mono_class_inflate_generic_signature() and made it public.
11988 (my_mono_class_from_generic_parameter): New static function; if we
11989 don't already have the generic parameter's MonoClass, create a
11990 very simple one which is just used internally in the runtime and
11991 not passed back to managed code.
11993 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
11995 * metadata.h (MonoMethodSignature): Moved the
11996 `MonoGenericParam *gen_params' to the MonoMethodHeader.
11997 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
11999 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
12000 ves_icall_MonoMethod_GetGenericArguments(); this is now an
12001 interncall on the MonoMethod class, not on MethodInfo.
12002 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
12003 calling mono_reflection_bind_generic_method_parameters() directly.
12005 * loader.c (mono_method_get_signature): If this is a MethodSpec;
12006 return the already computed `method->signature'.
12007 (method_from_methodspec): New static function to load a method
12008 from a MethodSpec entry.
12009 (mono_get_method_from_token): Call the new method_from_methodspec()
12010 for MethodSpec tokens.
12011 (mono_get_method_from_token): If we're a generic method, load the
12014 * reflection.c (mono_image_get_memberref_token): Allow
12015 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
12017 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
12018 (mono_image_create_token): First check whether it's a generic
12019 method (so we'd need to create a MethodSpec), then do the other
12021 (mono_reflection_bind_generic_method_parameters): Return a
12022 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
12023 called directly from the interncall.
12025 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
12027 * reflection.c (load_public_key): Move loading of the public key
12030 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
12032 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
12035 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
12036 culture, hash_alg and public_key. Fixes #49555.
12038 2003-10-17 Martin Baulig <martin@ximian.com>
12040 * class.h (MonoGenericInst): Moved this declaration here and added
12041 `MonoMethod *generic_method'.
12044 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
12045 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
12047 * metadata.c (mono_metadata_type_equal): Two types of
12048 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
12049 index; ie. don't compare the address of the `MonoGenericParam'
12051 (mono_metadata_load_generic_params): Removed the `MonoMethod
12054 * metadata.h (MonoGenericInst): Moved declaration to class.h.
12055 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
12057 * reflection.c (method_encode_signature): Encode the number of
12058 generic parameters.
12059 (encode_generic_method_sig): New static function.
12060 (method_encode_methodspec): New static function; creates an entry
12061 in the MethodSpec table for a generic method.
12062 (mono_image_get_methodspec_token): New static function.
12063 (mono_image_create_token): Call mono_image_get_methodspec_token()
12064 for generic methods.
12065 (mono_reflection_bind_generic_method_parameters): New public
12066 function. Instantiates a generic method.
12068 2003-10-16 Martin Baulig <martin@ximian.com>
12070 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
12071 *gen_params' here from MonoMethodHeader.
12073 * metadata.c (mono_metadata_parse_method_signature): If we have
12074 generic parameters, initialize `method->gen_params' and then set
12075 the correct `type->data.generic_param' in all the parameters.
12077 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
12079 * threads.c (mono_threads_get_default_stacksize): New function to
12080 return the default stacksize.
12082 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
12083 termination of the finalizer thread, since the previous method had
12084 race conditions. Fixes #49628.
12086 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
12087 as for the other managed threads.
12089 2003-10-16 Martin Baulig <martin@ximian.com>
12091 * class.c (inflate_generic_signature): Copy `generic_param_count'
12094 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
12097 * metadata.c (mono_metadata_parse_method_signature): Actually set
12098 the `method->generic_param_count' here.
12099 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
12101 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
12103 * object.h: Add a new field to TypedRef to simplify the implementation
12104 of the REFANY opcodes in the JIT.
12106 * icall.c: Make use of the new field.
12108 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
12111 2003-10-15 Martin Baulig <martin@ximian.com>
12113 * class.c (mono_class_from_gen_param): Renamed to
12114 mono_class_from_generic_parameter() and moved most of the
12115 functionality from mono_reflection_define_generic_parameter()
12116 here; ie. we create a "real" class here.
12117 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
12118 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
12119 previously been called.
12121 * class.h (MonoGenericParam): Moved the declaration of this struct
12122 here from metadata.h and added `MonoMethod *method'.
12124 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
12127 * loader.c (mono_get_method_from_token): If we have any generic
12128 parameters, call mono_metadata_load_generic_params() to read them
12129 from the MONO_TABLE_GENERICPAR.
12131 * metadata.c (mono_metadata_load_generic_params): Added
12132 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
12134 * metadata.h (MonoMethodSignature): Replaced
12135 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
12136 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
12138 * reflection.c (mono_reflection_define_generic_parameter): Moved
12139 most of the functionality into the new
12140 mono_class_from_generic_parameter(); set the `method' field if
12141 we're a method parameter.
12143 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
12145 * marshal.c (emit_struct_conv): if native size is 0
12148 2003-10-14 Martin Baulig <martin@ximian.com>
12150 * icall.c: The generics API has changed in the spec since it was
12151 added to System.Type; these modifications make it match the spec
12153 (ves_icall_Type_GetGenericParameters): Renamed to
12154 `ves_icall_Type_GetGenericArguments'.
12155 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
12156 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
12157 `ves_icall_MonoType_get_HasGenericArguments'.
12158 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
12159 `ves_icall_MonoType_get_IsGenericParameter'.
12160 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
12161 this is no interncall anymore.
12162 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
12163 `ves_icall_TypeBuilder_get_IsGenericParameter'.
12165 2003-10-14 Martin Baulig <martin@ximian.com>
12167 * reflection.c (mono_reflection_bind_generic_parameters): Also
12168 inflate generic methods if we're reading the class from IL.
12170 2003-10-13 Martin Baulig <martin@ximian.com>
12172 * reflection.c (mono_reflection_define_generic_parameter): This
12173 method isn't called directly from the icall anymore; take a
12174 `MonoReflectionAssemblyBuilder *' so we can use this for type and
12175 method generic parameters.
12176 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
12177 (method_builder_encode_signature): Encode generic parameters.
12178 (mono_image_get_method_info): Write generic params to the
12179 MONO_TABLE_GENERICPARAM table.
12181 * reflection.h (MonoReflectionMethodBuilder): Added
12182 `MonoArray *generic_params'.
12184 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
12186 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
12187 wrapper for mono_reflection_define_generic_parameter().
12188 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
12190 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
12192 * marshal.h: Add missing function to fix build.
12194 * marshal.c (mono_marshal_get_native_wrapper): Add support for
12195 the SetLastError pinvoke attribute.
12197 * marshal.c (mono_marshal_set_last_error): New helper function called
12198 by the generated code.
12200 * marshal.c (mono_mb_emit_branch): New helper function.
12202 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
12204 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12205 classes as parameters and return values of delegates. Fixes #29256.
12207 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
12209 * locales.c: use gint32 in non HAVE_ICU case
12211 2003-10-11 Martin Baulig <martin@ximian.com>
12213 * mono-debug.c (mono_debug_add_method): Added a workaround for
12216 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
12218 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
12219 delegates passed to native code must use the STDCALL calling
12220 convention. Fixes #35987.
12222 2003-10-10 Martin Baulig <martin@ximian.com>
12224 * class.c (inflate_generic_type): If we're inflating for a generic
12225 type instance (and not for a generic method), return
12226 MONO_TYPE_MVAR unchanged.
12228 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12230 * string-icalls.c: Join ignores null strings in the source array.
12231 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
12232 * threads.c: GetAvailableTheads is slightly more accurate.
12234 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
12236 * threads.h threads.c : add mono_threads_set_default_stacksize
12237 and pass default to CreateThread calls.
12239 2003-10-09 Dick Porter <dick@ximian.com>
12243 * locales.c: Internal calls for constructing CultureInfo and
12244 related objects from libicu (if its available.)
12246 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
12248 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
12250 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12252 * threadpool.c: added an argument to async_invoke_thread that is the
12253 item to process, pass the MonoAsyncResult to the thread start function
12254 when creating a new thread. This way we don't need to acquire any lock
12255 when we're creating a new thread. Readded a semaphore for faster
12256 response times (instead of that Sleep i added).
12258 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
12260 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
12261 get daylight change dates better on Windows, fix handling
12262 of platforms without tm_gmtoff.
12264 2003-10-06 Martin Baulig <martin@ximian.com>
12266 * class.c (inflate_generic_method): Renamed to
12267 mono_class_inflate_generic_method() and made public.
12268 (mono_class_init): Don't inflate the generic methods here.
12269 (mono_class_from_generic): Added `gboolean inflate_methods'
12270 argument. Inflate the methods here.
12272 * loader.c (mono_method_get_param_names): Ignore instances of
12273 generic types for the moment.
12275 * reflection.c (fixup_method): Added support for inflated methods.
12276 (mono_image_create_token): Use mono_image_get_methodref_token()
12277 for inflated methods.
12278 (mono_custom_attrs_from_param): Ignore instances of generic types
12280 (mono_reflection_bind_generic_parameters): New public function.
12281 Moved all the functionality from
12282 ves_icall_Type_BindGenericParameters() here and added support for
12284 (mono_reflection_define_generic_parameter): Initialize
12285 `klass->methods' here.
12287 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
12288 functionality into mono_reflection_define_generic_parameter().
12289 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
12290 TypeBuilder, return that TypeBuilder.
12292 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12294 * appdomain.c: removed mono_delegate_semaphore.
12297 (mono_thread_pool_add): moved hash table creation inside and the thread
12298 creation outside of the critical region.
12299 (mono_thread_pool_finish): removed obsolete code.
12300 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
12301 continue or exit the thread depending on the queue.
12303 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
12305 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
12306 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
12307 handle more bool marshalling options
12309 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
12311 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
12312 arrays of structs. Also add a more descriptive error message when
12313 a structure member is marshalled as LPArray.
12315 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
12317 * marshal.c (mono_marshal_get_native_wrapper): Add support for
12318 marshalling arrays of complex types. Fixes #29098. Also remove an
12319 usused and incomplete function.
12321 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
12323 * gc.c: report heap_size - free_bytes as total memory allocated
12326 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
12328 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
12329 fix timezone handling problems on Windows.
12331 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
12332 asserts when the year is outside the range handled by ms the functions.
12334 * class.c (setup_interface_offsets): If the class is an interface,
12335 fill out its interface_offsets slot.
12337 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12339 * threadpool.c: mark threadpool threads as background.
12341 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
12343 * decimal.c - define DECINLINE to nothing if not using GCC
12345 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
12347 * assembly.c: More refcount fixes.
12349 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12351 * string-icalls.c: if we're not trimming, return the same string.
12352 When not splitting, don't create a new string.
12354 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12357 (mono_image_open): increment the ref_count inside the critical section.
12359 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
12361 * image.c (mono_image_open): Fix reference counting bug.
12363 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
12365 * marshal.c (mono_marshal_type_size) struct alignment changed for
12366 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
12367 64bits. Avoid leak in mono_marshal_get_native_wrapper when
12368 mono_lookup_pinvoke_call throws.
12370 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
12372 * reflection.c (mono_reflection_parse_type): Fix #49114.
12374 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
12375 temporary workaround for cygwin header problem.
12377 * object.c (mono_object_isinst): Synchronize this with the code
12378 generated by the JIT for casts.
12380 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
12382 * reflection.c (encode_type): Fix #38332.
12384 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
12386 * marshal.c (mono_marshal_method_from_wrapper): New function to return
12387 the original method from the wrapper method.
12389 2003-09-25 Martin Baulig <martin@ximian.com>
12391 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
12392 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
12393 (ves_icall_Type_get_IsGenericInstance): New interncall.
12395 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
12397 * object.c: fix cast warning in big endian code.
12399 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
12401 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
12403 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12405 * assembly.c: don't call check_env from mono_assembly_load. It's
12406 already done once in mono_assemblies_init and may cause headaches when
12407 multiple threads are loading assemblies.
12409 2003-09-19 Martin Baulig <martin@ximian.com>
12411 * reflection.c (mono_reflection_define_generic_parameter): Don't
12412 allocate `klass->methods', set `klass->flags' to
12413 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
12415 2003-09-18 Martin Baulig <martin@ximian.com>
12417 * class.c (mono_class_init): Don't create `class->methods' if it's
12418 already initialized.
12420 * metadata.c (mono_metadata_load_generic_params): Make this
12423 * reflection.c (mono_reflection_define_generic_parameter): Set
12424 parent class and interfaces from the constraints.
12426 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
12427 to keep this struct in sync with the declaration in TypeBuilder.cs.
12429 2003-09-17 Martin Baulig <martin@ximian.com>
12431 * metadata.h (MonoType): Replaced the data's `int type_param'
12432 field with `MonoGenericParam *generic_param'.
12433 (MonoGenericParam): Added `MonoClass *klass'.
12435 * class.c (mono_class_from_gen_param): Removed the
12436 `MonoImage *image' and `int type_num' arguments.
12438 * metadata.c (mono_metadata_parse_generic_param): New static
12439 method; creates a MonoGenericParam which just contains the index.
12440 (do_mono_metadata_parse_type): Call
12441 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
12444 * reflection.c (mono_image_typedef_or_ref): Generic type
12445 parameters may be in the same assembly, but never use a typedef
12447 (mono_reflection_define_generic_parameter): We're now creating a
12448 "real" class for the type parameter; it's now safe to call
12449 mono_class_from_mono_type() on the class'es type, it'll do the
12452 2003-09-16 Martin Baulig <martin@ximian.com>
12454 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
12455 `symfile->range_entry_size' and `symfile->class_entry_size' here;
12456 the `symfile' data structure must be fully initialized before it
12457 gets added to the table.
12459 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
12461 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
12463 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
12464 class init trampolines.
12466 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
12468 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
12469 to the built-in profiler to turn off time and allocation profiling
12472 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
12474 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
12477 * debug-helpers.c (mono_method_full_name): Print the wrapper type
12478 in human readable form.
12480 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
12482 * reflection.c icall.c: Fixed warnings.
12484 * image.c (load_class_names): Use a temporary hash table to hold the
12485 namespaces in order to avoid doing many string comparisons.
12487 * image.h: Fix typo.
12489 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
12490 Pass NULL instead of g_direct_equal to the GHashTable constructor
12491 since the NULL case is short-circuited inside g_hash_table_lookup,
12492 leading to better performance.
12494 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
12495 obtain the first custom attribute for a given index. Depends on the
12496 CustomAttribute table being sorted by the parent field.
12498 * reflection.c (mono_custom_attrs_from_index): Use the new function
12499 for better performance.
12501 2003-09-07 Martin Baulig <martin@ximian.com>
12503 * class.c (mono_class_init): If we're a generic instance, inflate
12504 all our methods instead of loading them from the image.
12505 (mono_class_from_generic): Set `class->methods = gklass->methods'.
12507 2003-09-07 Martin Baulig <martin@ximian.com>
12509 * mono-debug-debugger.c: Added support for constructors.
12511 2003-09-06 Martin Baulig <martin@ximian.com>
12513 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
12516 * reflection.c (mono_reflection_setup_generic_class): Call
12517 ensure_runtime_vtable() to create the vtable.
12519 2003-09-05 Martin Baulig <martin@ximian.com>
12521 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
12524 2003-09-04 Martin Baulig <martin@ximian.com>
12526 * reflection.c (mono_reflection_define_generic_parameter): Generic
12527 parameters start with zero.
12529 2003-09-04 Martin Baulig <martin@ximian.com>
12531 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12533 * reflection.h (MonoReflectionGenericParam): New typedef.
12534 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
12535 the generic parameters from the managed TypeBuilder.
12537 * reflection.c (mono_reflection_define_generic_parameter): New function.
12538 (mono_reflection_create_runtime_class): Encode generic parameters.
12539 (mono_reflection_setup_generic_class): New function; this is
12540 called after adding adding all generic params to the TypeBuilder.
12541 (encode_type): Added MONO_TYPE_VAR.
12543 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
12545 * class.h class.c (mono_class_needs_cctor_run): Moved this method
12548 * assembly.h assembly.c: Moved the AOT loading code into an assembly
12551 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
12553 * reflection.h reflection.c class.h class.c: Delete duplicate
12554 definition of mono_type_get_name () from reflection.c and export the
12557 * class.c: Class loading fixes from Bernie Solomon
12558 (bernard@ugsolutions.com).
12560 * reflection.c: Endianness fixes from Bernie Solomon
12561 (bernard@ugsolutions.com).
12563 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
12565 * assembly.h assembly.c: Define a file format version for AOT
12568 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
12570 * appdomain.h (MonoJitInfo): New field to determine whenever the
12571 code is domain neutral.
12573 2003-08-31 Miguel de Icaza <miguel@ximian.com>
12575 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
12577 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
12579 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
12580 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
12581 Avoid caching the result since strings must be domain specific. Fixes
12584 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
12586 * marshal.c (mono_marshal_init): Make this callable multiple times
12587 since it is hard to find a correct place to call it.
12589 * object.c (mono_runtime_class_init): Execute static constructors in
12590 the correct appdomain.
12592 * image.c (build_guid_table): Handle the case when multiple images have
12595 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12597 * icall.c: added a couple of icalls for System.Web.
12599 2003-08-28 Martin Baulig <martin@ximian.com>
12601 * icall.c (ves_icall_Type_BindGenericParameters): Use
12602 `klass->generic_inst' instead of `&klass->byval_arg' in the
12603 mono_type_get_object() call. The returned type must be
12604 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
12606 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
12610 * object.c (mono_class_proxy_vtable): Make it thread safe.
12612 * pedump.c: Fix warning.
12614 * object.c appdomain.h: Get rid of metadata_section.
12615 It is no longer needed and it was causing deadlocks with domain->lock.
12617 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
12619 2003-08-26 Martin Baulig <martin@ximian.com>
12621 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
12623 2003-08-26 Martin Baulig <martin@ximian.com>
12625 * pedump.c (main): Call mono_metadata_init(),
12626 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
12627 and mono_loader_init().
12629 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
12631 * loader.h: Add missing include to fix build.
12633 * image.h: mono_image_load_references is no more.
12635 * assembly.c: Reworked assembly loading to make it really thread safe.
12636 After these changes, the assembly returned by mono_assembly_open is
12637 fully initialized, i.e. all its references assemblies are loaded.
12639 * assembly.c (mono_image_load_references): Renamed to
12640 mono_assembly_load_references, and made private, since clients no
12641 longer need to call it.
12643 * class.c: Removed calls to mono_assembly_load_references, since it was
12644 a source of deadlocks.
12646 * loader.h loader.c class.h class.c: Protect data structures using a
12647 new lock, the loader lock.
12649 * class.c (mono_class_setup_vtable): Create temporary hash tables and
12650 GPtrArrays only when needed.
12652 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
12653 into empty structures by mcs. Fixes pinvoke7.cs.
12655 * domain.c (mono_init): Call a new initialization function.
12657 * appdomain.c (mono_runtime_init): Call the new initializer function
12658 of the marshal module.
12660 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
12661 inserted into empty structures by mcs. Fixes pinvoke7.cs.
12663 * marshal.h marshal.c: Added locks around the wrapper caches to make
12664 this module thread safe.
12666 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
12667 this argument. Fixes pinvoke1.exe.
12669 2003-08-25 Lluis Sanchez <lluis@ximian.com>
12671 * object.h: Added call_type field to MonoMethodMessage and the corresponding
12672 enumeration of values. Removed fields to store remote call output values in
12673 MonoAsyncResult. Not needed any more.
12674 * object.c: Initialize call_type and async_result fields in mono_message_init.
12675 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
12676 dispatching the message.
12677 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
12678 async call to finish. To do it use a message with EndInvoke call type.
12680 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
12682 * loader.h loader.c (mono_method_hash_marhal_info): New function which
12683 determines whenever a method has marshalling info.
12685 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12687 * assembly.c: fix the build on windows.
12689 2003-08-22 Lluis Sanchez <lluis@ximian.com>
12691 * object.cs: Fixed bug #47785.
12693 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
12695 * string-icalls.c (StringReplace): If their are no occurances of
12696 the old string found return a reference to the supplied
12697 string. This saves some memory and matches MS behavoir.
12699 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12701 * socket-io.c: fixed compilation for systems that define AF_INET6
12702 and don't define SOL_IP/SOL_IPV6.
12704 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
12706 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
12707 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
12709 * rawbuffer.c rawbuffer.h: Make this module thread safe.
12711 * domain.c: Make this module thread safe.
12713 * domain.c (mono_init): Call new initialization function.
12715 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
12716 reference types too. Fixes #38812.
12718 * image.c (mono_image_init): Fixed warnings.
12720 * class.c (mono_class_from_typeref): Handle assembly load failure
12723 * appdomain.c (add_assemblies_to_domain): Handle the case when
12724 the references of an assembly are not yet loaded.
12726 * metadata.c image.c assembly.c: Moved initialization of global
12727 variables to a separate function called at startup since lazy
12728 initialization of these variables is not thread safe.
12730 * image.c assembly.c: Made this module thread safe by adding locks in
12731 the appropriate places.
12733 * domain.c (mono_init): Call the new initialization functions of the
12736 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
12738 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
12739 make a direct call. It is proxy's work to make the call asynchronous.
12740 mono_delegate_end_invoke(): If the targe is a proxy, just collect
12742 * object.cs: mono_method_call_message_new(): read AsyncResult and
12743 state object from parameters list, if this info is requested.
12744 * object.h: Added fields to store remote call output values in
12745 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
12747 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12749 * object.h: add needed fields to MonoThread.
12750 * threads.c, threads.h: allow registering a function to cleanup data
12751 allocated per thread by the JIT.
12753 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12755 * loader.h: portability fix by Bernie Solomon
12756 * <bernard@ugsolutions.com>.
12758 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
12760 * reflection.h reflection.c (mono_param_get_objects): Changed this to
12761 return a MonoArray. This simplifies the code and also ensures that
12762 the cache allways contains an object reference as a value.
12764 * icall.c (ves_icall_get_parameter_info): Simplified using the new
12767 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12769 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
12770 fixes a problem with byte ordering when getting the address family for
12773 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
12775 * .cvsignore: Added monosn.
12777 * reflection.h reflection.c loader.c: Added support for parameter
12778 marshalling to dynamically created types. Fixes #47295.
12780 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
12782 * rand.c: remove useless warnings.
12784 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12786 * class.c: implemented ldtoken for methods and fieldrefs.
12788 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12790 * threadpool.c: when mono_async_invoke was called, no one took care of
12791 monitoring the queue. So if the method invoked took some time and we
12792 got new async invoke requests after 500 ms (the thread created waited
12793 that long in WaitForSingleObject), the new async invoke was not called
12794 until the previous one finished.
12796 This is fixed now. Thanks to Totte for helping with it.
12798 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12800 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
12802 2003-08-11 Martin Baulig <martin@ximian.com>
12804 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
12806 2003-08-06 Martin Baulig <martin@ximian.com>
12808 * mono-debug-debugger.c: Added support for static fields,
12809 properties and methods.
12811 2003-08-06 Martin Baulig <martin@ximian.com>
12813 * mono-debug-debugger.c: Don't store the MonoString's vtable to
12814 make this work for applications with multiple application domains.
12816 2003-08-04 Martin Baulig <martin@ximian.com>
12818 * mono-debug-debugger.c: Completely reworked the type support; the
12819 most important thing is that we're now just using one single
12820 `MonoType' instance per type.
12822 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
12824 * mono-endian.h, mono-endian.c, icall.c: Added icall
12825 ves_icall_System_Double_AssertEndianity to assert double word endianity
12826 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
12828 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12830 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
12831 support, icalls and fixes.
12833 2003-07-31 Miguel de Icaza <miguel@ximian.com>
12835 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
12836 classes that are a punctuation character in .NET is not the same a
12839 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12841 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
12843 2003-07-29 Miguel de Icaza <miguel@ximian.com>
12845 * icall.c: Add new MemCopy internalcall.
12846 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
12847 Simplified code; It is not necessary to handle all the cases here,
12848 as the C# code takes care of it. Only handle the case of the name
12849 resource embedded into the assembly.
12851 Changed signature to return the data pointer and the size of the
12854 2003-07-26 Miguel de Icaza <miguel@ximian.com>
12856 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
12857 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
12859 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
12861 * socket-io.c: ignore EINTR error in select.
12863 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
12865 * class.h, class.c: removed unused subclasses field in MonoClass.
12867 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
12869 * icall.c: improve fix of get_base_definition(). If the parent class
12870 doesn't have the mehod, look at the parent of the parent.
12871 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
12872 to check if a parameter is an in or out parameter
12873 (PARAM_ATTRIBUTE_IN is not set by default).
12874 mono_method_return_message_restore(): Use mono_class_value_size to
12875 get the size of a value type. mono_type_stack_size (parameterType)
12876 does not return the correct value if parameterType is byRef.
12877 mono_load_remote_field(), mono_load_remote_field_new(),
12878 mono_store_remote_field(), mono_store_remote_field_new():
12879 raise exception if the remote call returns an exception.
12881 2003-07-28 Martin Baulig <martin@ximian.com>
12883 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
12884 method. This is a wrapper around mono_runtime_invoke() which
12885 boxes the instance object if neccessary.
12887 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12889 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
12890 metadata.h, row-indexes.h, verify.c: first cut of generics support.
12892 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12894 * icall.c: disable mcs bug workaround.
12896 2003-07-21 Miguel de Icaza <miguel@ximian.com>
12898 * object.c (mono_runtime_class_init): Take the metadata_section
12899 mutex before obtaining the domain mutex.
12901 * appdomain.h: Added definition of metadata_section mutex here.
12903 * object.c: define metadata_mutex here.
12905 2003-07-24 Ravi Pratap <ravi@ximian.com>
12907 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
12910 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
12912 * reflection.c: Fix bug #46669
12914 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12919 * object.h: fill in the type name for TypeLoadException.
12921 2003-07-23 Ravi Pratap <ravi@ximian.com>
12923 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
12924 relationship between TypeBuilders while compiling corlib) and bug
12925 45993 (Array types returned from the runtime while compiling
12926 corlib were from the loaded corlib).
12928 2003-07-22 Martin Baulig <martin@ximian.com>
12930 * mono-debug-debugger.c: Reworked the type support a bit more;
12931 distinguish between types and classes.
12933 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
12935 * icall.c: add IsArrayImpl icall.
12937 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
12939 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
12940 initializing real_size only once. Also fix bug #46602.
12942 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
12944 * object.c: Renamed mono_metadata_section to metadata_section.
12946 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
12948 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
12949 empty array if the type is an array. Fixed.
12950 ves_icall_MonoMethod_get_base_definition: if the base method
12951 is abstract, get the MethodInfo from the list of methods of
12953 * reflection.c: ParameterInfo.PositionImpl should be zero-based
12954 and it was 1-based. Fixed in mono_param_get_objects.
12956 2003-07-20 Martin Baulig <martin@ximian.com>
12958 * mono-debug.h: Set version number to 31.
12959 (mono_debug_init): Added `MonoDomain *' argument.
12961 * mono-debug-debugger.c: Reworked the type support; explicitly
12962 tell the debugger about builtin types; pass the `klass' address to
12965 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
12967 * image.c: Allow new metadata tables to be loaded without a
12968 warning. Also update the warning message to give the new constant value.
12970 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
12972 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
12973 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
12974 array type representation changes.
12976 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
12978 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
12979 on Environment.Exit () call.
12981 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12983 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
12984 requires a matching corlib.
12986 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
12988 * Changelog: My editor decided to add a CR to each line. Sorry about that.
12989 Committed again without the CRs.
12991 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
12993 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
12994 getting it from the "this" socket instance. Did not work
12995 if the socket is a subclass of Socket.
12996 Also fixed bug #35371.
12998 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13000 * metadata.c: fixed size for TypedByRef.
13001 * loader.c: when searching for a method, consider the vararg amrker.
13002 * unicode.c, decimal.c: constify some arrays.
13004 2003-07-15 Dick Porter <dick@ximian.com>
13006 * socket-io.c: Fixed compilation for gcc < 3.2.
13008 Fixed compilation for machines that don't have AF_INET6 (thanks to
13009 Bernie Solomon <bernard@ugsolutions.com> for that part.)
13011 Fixed compile warnings.
13013 Fixed formatting and line endings.
13015 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
13018 * socket-io.c: Added IPv6 support.
13020 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
13022 * class.c (mono_class_is_assignable_from): New function to implement
13023 the is_assignable_from logic. Used by mono_object_isinst,
13024 Type::IsAssignableFrom () and the interpreter.
13026 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
13027 Object, even interfaces.
13029 * object.c (mono_object_isinst): Implement in terms of
13030 is_assignable_from.
13032 * icall.c (ves_icall_type_is_assignable_from): New icall.
13034 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
13036 * domain.c (foreach_domain): fix compiler warning.
13038 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
13040 * image.c (load_metadata_ptrs): use g_strndup because strndup is
13041 not available on all plattforms
13043 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
13045 * image.h image.c: Store the metadata version string in MonoImage.
13046 * icall.c: New icall to retrieve the image version.
13047 * reflection.c (create_dynamic_image): Fill in the image version field
13048 * reflection.c (build_compressed_metadata): Use the image version
13049 from the image structure.
13051 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13053 * appdomain.c: modified comment.
13054 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
13055 That will be its last iteration when mono_gc_cleanup is called from
13056 mono_runtime_cleanup and before the domain is unloaded.
13060 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
13062 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
13065 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13067 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
13068 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
13069 Bernie Solomon <bernard@ugsolutions.com>.
13071 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13073 * object.c, object.h: provide mono_object_new_fast() for faster
13074 allocation in some special cases.
13076 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13078 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
13079 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
13081 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13083 * threadpool.c: fix leaks.
13085 2003-07-01 Dick Porter <dick@ximian.com>
13087 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
13088 using MonoGHashTables. Fixes threadpool bug posted to list.
13090 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13092 * image.h, image.c: added support to load an assembly from a byte array.
13093 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
13094 assembly bundle support.
13096 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
13098 * threadpool.c (mono_thread_pool_add): keep a reference to the
13099 AsyncResult to prevent GC
13101 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13103 * class.c: leak fix.
13105 2003-06-25 Dick Porter <dick@ximian.com>
13107 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
13108 for the async object, the WaitHandle object will close the handle.
13111 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13113 * class.c: in mono_array_class_get (), lookup from the hash with the
13114 same type we insert: this works around a bug in
13115 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
13116 lluis. The real fix will have to wait for after the release.
13118 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13120 * icall.c: fix memory leak when getting type members.
13122 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13124 * reflection.c: added more pubtoken special cases.
13126 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13128 * class.c: handle field offset correctly when class size
13129 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
13131 2003-06-20 Martin Baulig <martin@ximian.com>
13133 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
13136 2003-06-20 Martin Baulig <martin@ximian.com>
13138 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
13140 2003-06-20 Martin Baulig <martin@ximian.com>
13142 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
13143 just distinguish between variables in registers and variables at
13144 an offset relative to a register.
13146 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13148 * icall.c: #ifdef out latest changes until mcs is fixed.
13150 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13152 * icall.c: return members in metadata order.
13154 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13156 * icall.c: avoid infinite loop in GetTimeZoneData.
13158 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13160 * icall.c: added Marshal.Prelink/All icalls.
13162 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13164 * object.c, object.h: fix warnings and do some overflow checking
13165 when creating arrays.
13167 2003-06-17 Dick Porter <dick@ximian.com>
13170 * file-io.c: File attributes need to be tweaked slightly when
13171 passed from the managed to the w32 world.
13173 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
13174 * profiler.h profiler-private.h profiler.c: Rework last patch
13175 based on suggestion by Paolo.
13177 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
13179 * profiler.h profiler-private.h profiler.c: Added infrastructure for
13180 instruction level coverage data collection.
13181 * profiler.h profiler.c (: Added new callback function which can be
13182 used by the profiler to limit which functions should have coverage
13184 * profiler.c (mono_profiler_load): Call g_module_build_path to
13185 generate the file name of the profiler library.
13187 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13189 * profiler.c, profiler.h, profiler-private.h: added basic block
13190 coverage profiling API.
13192 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
13194 * reflection.c (mono_reflection_create_runtime_class): Add support
13195 for events in dynamically generated code.
13197 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
13200 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13202 * icall.c: when getting timezone info, return reasonable values if we
13203 can't get the actual data.
13205 2003-06-14 Dick Porter <dick@ximian.com>
13207 * threads.c (start_wrapper): Remove the reference to the thread
13208 object in the TLS data, so the thread object can be finalized.
13209 This won't be reached if the thread threw an uncaught exception,
13210 so those thread handles will stay referenced :-( (This is due to
13211 missing support for scanning thread-specific data in the Boehm GC
13212 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
13214 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
13216 * reflection.c: ensure streams and tables are first allocated with
13217 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
13219 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13221 * icall.c: fixed GetElementType for byrefs (bug# 44792).
13223 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
13225 * reflection.c (mono_reflection_create_runtime_class): Add support for
13226 properties to dynamically created classes.
13227 * reflection.c: Fix a few places where non-MonoObjects were inserted
13228 into the tokens hashtable.
13230 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13232 * object.c: some support to handle out of memory exceptions.
13234 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
13236 * marshal.c (mono_marshal_get_native_wrapper): support reference
13239 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13241 * object.h, object.c: more portability stuff from Bernie Solomon.
13242 Unexport mono_object_allocate(). Added mono_object_unbox ().
13243 Set exitcode when an unhandled exception is thrown.
13245 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
13247 * marshal.c (mono_marshal_get_native_wrapper): use custom
13248 marshaler for return types.
13250 2003-06-10 Dick Porter <dick@ximian.com>
13252 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
13253 ip_mreq is available
13255 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13257 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
13258 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
13259 by Bernie Solomon <bernard@ugsolutions.com>.
13261 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
13263 * gc.c (mono_gc_init): Avoid error message on shutdown when
13264 GC_DONT_GC=1 is used.
13266 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
13267 New icall to return the GUID of a module.
13269 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13271 * class.c: ensure instance size always includes the parent's size
13272 even whem class size is set explicitly (fixes bug#44294).
13274 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13276 * profiler.h, profiler.c: made the simple profiler thread-safe,
13277 get more accurate timing info. Allow the loading of an
13278 externally-developed profiler module.
13280 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
13282 * marshal.c (mono_marshal_get_native_wrapper): improved
13283 class/byref arguments.
13284 (mono_marshal_get_native_wrapper): better string marshaling support.
13286 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13288 * class.c: ensure .pack and .size are handled correctly and
13289 simplified layout of static fields.
13291 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
13294 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
13296 * loader.c (mono_lookup_pinvoke_call): look for modules in the
13297 current directory (fix bug 44008)
13299 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
13301 * marshal.c (mono_marshal_get_native_wrapper): started support for
13303 (mono_delegate_to_ftnptr): consider marshalling specifications
13305 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13307 * reflection.c, reflection.h: emit custom marshal info.
13309 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13311 * object.c: free the GError.
13312 * icall.c: added CloseEvent_internal.
13314 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
13317 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
13319 * loader.c (mono_method_get_signature): Add support for dynamic
13322 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13324 * reflection.c: fixed bug #43905.
13326 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13328 * class.c, domain.c, icall.c, metadata.h, object.h: support for
13329 handling TypedReference and ArgIterator.
13330 * loader.c, loader.h: added function to get signature at call site.
13332 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13334 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
13335 data readonly. Buglets and warning fixes. Some MethodSpec support.
13337 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13339 * class.h, class.c, object.c: remove relative numbering support.
13341 2003-05-26 Miguel de Icaza <miguel@ximian.com>
13343 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
13344 free the string, until we get a chance to fix Gtk#
13346 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13348 * marshal.c: revert last patch.
13350 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13352 * icall.c: updates for new mono_class_vtable() not calling
13353 the type constructor anymore.
13355 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13357 * object.h, object.c: separate vtable creation from type
13358 initialization. Make running the .cctor thread safe.
13360 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
13362 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
13364 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
13366 * loader.c (mono_get_method): consider calling convention
13368 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
13370 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
13371 to return the invisible global type for a module.
13373 * reflection.c (mono_image_build_metadata): Emit global fields too.
13375 2003-05-20 Peter Williams <peterw@ximian.com>
13377 * loader.c (mono_lookup_internal_call): Add a few newlines.
13379 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
13381 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
13384 * appdomain.c (set_domain_search_path): Recalculate search path when
13385 AppDomainSetup.PrivateBinPath changes.
13387 * object.c (mono_class_compute_gc_descriptor): It turns out some
13388 parts of the class libs (like System.Thread) holds pointers to
13389 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
13390 to treat native int a pointer type here.
13392 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
13394 * appdomain.h, domain.c: add hashtable for jump target resolution.
13396 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
13398 * reflection.h reflection.c icall.c: Added new icalls
13399 GetManifestResourceInfoInternal, GetModulesInternal and support
13402 2003-05-16 Dick Porter <dick@ximian.com>
13406 * file-io.c: Implement System.IO.MonoIO::GetTempPath
13408 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
13410 * object.c: mono_store_remote_field: little fix to previous patch.
13412 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13414 * class.c: add constructors to array classes.
13415 * icall.c: special case array construction for InternalInvoke (),
13417 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
13419 * class.h class.c reflection.c object.c: Added support for field
13420 defaults in dynamically generated classes.
13422 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13424 * reflection.c: properly encode charset for ddlimport.
13426 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13428 * threads.c: allow compiling without GC.
13430 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13432 * appdomain.h, object.c, object.h, threads.c, threads.h: added
13433 handling of thread static data.
13435 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13437 * reflection.h, reflection.c: added mono_custom_attrs_free ().
13439 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
13441 * class.c (mono_array_class_get): always set the serializable flags
13442 (mono_array_class_get): always set the SEALED attribute for array types
13444 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
13446 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
13447 attributes (fix for bug 42021).
13449 2003-05-12 Dick Porter <dick@ximian.com>
13451 * gc.c: Don't run finalizers when the finalizer thread is
13452 finishing up, because the default domain has already been
13455 2003-05-11 Miguel de Icaza <miguel@ximian.com>
13457 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
13458 value is null, we should throw an exception. This is slightly
13459 different than the other conventions used for the constructor.
13461 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13463 * socket-io.c: fixed windows build.
13465 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13467 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
13469 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
13471 * object.c (mono_string_new_wrapper): Compatibility fix for MS
13474 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
13476 * class.c (mono_class_layout_fields): Add experimental GC aware
13477 auto layout facility. Requires class library changes to work correctly.
13479 (mono_class_setup_vtable): Avoid overriding explicit interface
13480 method implementations. Fixes iface3.exe test.
13482 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
13484 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
13485 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
13487 * metadata.h: Add new type classification macro which determines
13488 whenever the type holds an object reference.
13490 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
13492 * marshal.c (mono_marshal_get_native_wrapper): cleanups
13494 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
13496 * gc.c (finalizer_thread): Work around a GC bug.
13498 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
13500 * marshal.c (emit_struct_conv): allow unions
13502 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
13504 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
13506 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
13508 2003-05-06 Martin Baulig <martin@ximian.com>
13510 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
13512 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13515 (Select_internal): allow NULLs, don't create arrays if not needed.
13516 Coupled with Socket.cs changes.
13519 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
13520 register a finalizer for it that will close the semaphore handle. This
13521 fixes the leak and make Lupus' test run with > 4080 loops.
13523 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
13525 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
13526 Jerome Laban (bug #42287)
13528 2003-05-02 Martin Baulig <martin@ximian.com>
13530 * debug-mono-symfile.h
13531 (MonoSymbolFile): Moved declaration into mono-debug.h.
13532 (MonoDebugMethodJitInfo): Likewise.
13533 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
13535 (_mono_debug_address_from_il_offset): Take a
13536 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
13539 (MonoDebugDomainData): New struct.
13540 (mono_debug_get_domain_data): New function.
13541 (mono_debug_add_method): Take an additional `MonoDomain *'
13543 (mono_debug_source_location_from_address): Likewise.
13544 (mono_debug_il_offset_from_address): Likewise.
13545 (mono_debug_address_from_il_offset): Likewise.
13547 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
13549 * reflection.c: one more check for null type in custom attrs.
13551 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13553 * reflection.c: avoid warning (comparison is always false due to limited
13554 range of data type).
13556 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13558 * icall.c: throw an exception in Type.GetField if the argument 'name'
13561 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
13563 * reflection.c: fixed handling of enums in named arguments to custom
13564 attributes (bug #42123).
13566 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13568 * reflection.c: use the right array element type and handle
13569 a null for a Type argument, too.
13571 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
13573 * reflection.c: handle arrays as arguments to custom attributes.
13575 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13577 * reflection.c: handle a string value in a custom attr
13578 ctor that takes an object.
13580 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
13582 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
13585 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
13587 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
13589 2003-04-27 Martin Baulig <martin@ximian.com>
13591 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
13592 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
13593 MONO_DEBUGGER_EVENT_BREAKPOINT.
13594 (mono_breakpoint_trampoline_code): Removed.
13595 (mono_debugger_event_handler): The last argument is now a
13597 (mono_debugger_insert_breakpoint_full): Removed the
13598 `use_trampoline' argument.
13599 (mono_debugger_method_has_breakpoint): Likewise.
13600 (mono_debugger_trampoline_breakpoint_callback): Renamed to
13601 mono_debugger_breakpoint_callback(); take the method and
13602 breakpoint number as arguments.
13604 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13606 * metadata.c: fix off by one when loading parameters attributes.
13608 2003-04-24 Martin Baulig <martin@ximian.com>
13610 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
13612 2003-04-24 Martin Baulig <martin@ximian.com>
13614 * mono-debug-debugger.c: Moved all code which interacts with the
13615 Mono Debugger here.
13617 * debug-mono-symfile.c: This code now just deals with the symbol
13618 file itself, the debugger code is now in mono-debug-debugger.c.
13620 2003-04-23 Martin Baulig <martin@ximian.com>
13622 * mono-debug.c (mono_debug_source_location_from_il_offset):
13623 New method; like mono_debug_source_location_from_address(), but
13624 takes an IL offset instead of a machine address.
13626 2003-04-23 Martin Baulig <martin@ximian.com>
13628 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
13629 `line' field; this is now computed by the debugger.
13631 2003-04-23 Martin Baulig <martin@ximian.com>
13633 * mono-debug.[ch]: New files. This is the new debugging interface.
13635 * mono-debug-debugger.[ch]: New files. Moved all code which
13636 interacts with the Mono Debugger here.
13638 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
13640 * domain.c (mono_init): initialize mono_defaults.monitor_class
13642 2003-04-21 Miguel de Icaza <miguel@ximian.com>
13644 * reflection.c (method_encode_code): Add a spicy exception to help
13645 future compiler authors.
13647 2003-04-21 Martin Baulig <martin@ximian.com>
13650 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13651 Make this work with relative pathnames; g_filename_to_uri() needs
13652 an absolute filename.
13654 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
13656 * icall.c: Track name changes in Object and ValueType.
13658 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
13660 * metadata.c (mono_type_stack_size): size should be a multiple of
13663 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13666 (internal_domain_finalize): moved into mono_domain_finalize. No need
13667 to create another thread because the finalizers will be run in the
13670 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
13671 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
13672 to be run (MS does this too).
13674 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
13676 * object.c (mono_class_compute_gc_descriptor): Update comment.
13678 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
13680 * image.h: Add synchronized wrapper cache.
13682 * image.c (do_mono_image_open): Initialize cache.
13684 * reflection.c (create_dynamic_mono_image): Initialize cache.
13686 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13688 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
13689 ves_icall_System_Buffer_ByteLengthInternal.
13691 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13693 * reflection.c: setup klass->nested_in earlier. Allow
13694 a dash in the assembly name.
13696 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
13698 * metadata.c (mono_type_to_unmanaged): dont access
13699 type->data.klass for MONO_TYPE_OBJECT
13700 (mono_type_to_unmanaged): consider System.Delegate class
13702 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
13704 * class.c: just setup supertypes in the proper place instead of
13705 initializing the full element class for arrays.
13707 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13709 * class.c: ensure the element class of arrays is initialized.
13710 Setup the supertype info for array classes, too.
13712 2003-04-14 Miguel de Icaza <miguel@ximian.com>
13714 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
13716 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13718 * Makefile.am: re-added -m option when running cygpath. This way,
13719 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
13721 * mono-config.c: same codepath for locating mono config file for WIN32
13723 * assembly.c: if mono_assembly_setrootdir is called, don't override
13726 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13728 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
13729 MONO_ASSEMBLIES variable.
13731 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13733 * icall.c: added Assembly::GetNamespaces() icall.
13735 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13737 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
13739 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
13741 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
13742 * object.c: fixed bug in the construction of vtable for proxies
13744 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
13746 * object.c (mono_array_new): Mark mono_array_new as an icall.
13748 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13750 * class.c: fixed test for public method when overriding interfaces.
13753 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13755 * appdomain.h, domain.c: added mono_domain_foreach() to
13756 be able to access the currently loaded appdomains.
13757 * object.c: make string interning work across sppdomains.
13758 Mark some functions for use as icalls.
13760 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
13762 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
13764 * reflection.h reflection.c: Allocate long living data using
13765 GC_MALLOC_ATOMIC so the collector does not need to scan it.
13767 * reflection.c: Double the allocation size in streams instead of
13768 increasing it, to prevent unneccesary copying on large assemblies.
13770 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
13771 creation if the assembly does not have the Run flag set.
13773 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13775 * class.h: avoid the C++ keywords in header files (Jerome Laban
13776 spotted and fixed this).
13778 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13781 (mono_unhandled_exception): fill in the arguments for the
13782 UnhandledException event. Only trigger that event for the default
13783 domain (as MS does).
13785 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
13787 * object.c: Improve typed allocation stuff based on suggestions from
13788 Paolo. Also turn it on if the GC library supports it.
13790 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
13792 * object.c object.h class.h: Added experimental typed allocation
13793 facility using the interfaces in gc_gcj.h.
13795 * os/gc_wrapper.h: Added new include files.
13797 2003-04-03 Martin Baulig <martin@ximian.com>
13799 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
13800 which is not yet enabled by default.
13802 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
13804 (mono_gc_lock, mono_gc_unlock): New static functions.
13806 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
13807 functions; stop/start the world for the garbage collector. This
13808 is using the windows API; we need to complete the SuspendThread()/
13809 ResumeThread() implementation in the io-layer to make this work on Unix.
13810 (mono_gc_push_all_stacks): New public function; tells the garbage
13811 collector about the stack pointers from all managed threads.
13813 2003-04-03 Martin Baulig <martin@ximian.com>
13815 * object.h (MonoThread): Added `gpointer stack_ptr'.
13817 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
13819 2003-04-03 Martin Baulig <martin@ximian.com>
13821 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
13823 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
13825 * reflection.c (typebuilder_setup_fields): Initialize field.first and
13828 2003-04-02 Miguel de Icaza <miguel@ximian.com>
13830 * loader.c (mono_lookup_internal_call): Report the corlib that is
13833 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
13835 * icall.c (ves_icall_type_GetTypeCode): fixed check for
13836 System.DBNull (it's class not valuetype).
13838 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13840 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
13841 if the array method was already assigned a token (fixes bug#40646).
13843 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
13845 * reflection.c (mono_reflection_get_type): Attempt type resolve even
13846 if no assembly is given.
13848 2003-04-01 Miguel de Icaza <miguel@ximian.com>
13850 * metadata.h: Added the new tables.
13852 * row-indexes.h: Added definitions for new tables.
13854 * metadata.c: Add schemas for new tables, and add support for
13855 computing the sizes of them.
13857 * class.c: Update for handling the new type cases.
13859 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
13861 * metadata.h (MONO_TYPE_IS_VOID): new macro
13863 2003-03-31 Martin Baulig <martin@ximian.com>
13865 * threads.h (MonoThreadCallbacks): Added `thread_created'.
13867 * threads.c (mono_thread_new_init): Call `thread_created' in the
13868 mono_thread_callbacks.
13870 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
13872 * loader.h: added marshalbyrefobject_class to mono_defaults
13873 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
13874 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
13875 generation of output parameters.
13876 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
13877 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
13878 contextbound and the target object belongs to the context of the caller.
13879 * object.h: added context and unwrapped_server variables in MonoRealProxy.
13880 * object.c: Implemented support for interfaces and abstract classes
13881 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
13882 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
13884 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
13886 * class.h class.c (mono_class_is_subclass_of): New function.
13888 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
13889 routines for most common case (calls from ArrayList::ToArray).
13891 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
13892 routine so programs which call Environment::Exit() can be profiled.
13894 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
13895 Added MONO_ARCH_SAVE_REGS.
13897 * icall.c (ves_icall_type_is_subtype_of): Use new function.
13899 2003-03-29 Miguel de Icaza <miguel@ximian.com>
13901 * blob.h: Add a couple of new MonoType types definitions.
13903 * tabledefs.h: Add a couple of new call convs.
13905 2003-03-27 Zoltan Varga <vargaz@freemail.h>
13907 * reflection.h (MonoReflectionDynamicAssembly): track changes in
13908 the layout of the class.
13910 * reflection.c (alloc_table): double the size on overflow to avoid
13911 unnecessary copying.
13913 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
13914 avoid filling out metadata tables and blobs. Also set mb->ilgen to
13915 null so it can be garbage collected.
13917 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
13919 * reflection.c (mono_reflection_get_type): Return the resolved type
13920 only if it is in the assembly we searched.
13922 * reflection.c (ensure_runtime_vtable): Initialize method slots.
13924 * class.c (mono_class_setup_vtable): Set the slot of the overriding
13927 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13930 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
13931 the right one is 'file:///blah', but MS allows it.
13933 (mono_assembly_open): allow 'file://blah'
13935 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
13937 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
13939 * socket-io.c: fixes bug #40310.
13941 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
13943 * reflection.c (mono_reflection_parse_type): handle deeply nested
13946 * reflection.c (mono_image_create_token): Use unique token values
13947 since they will be put into a hash table.
13949 * class.c (mono_class_setup_vtable): If a method occurs in more than
13950 one place in the vtable, and it gets overriden, then change the
13951 other occurances too.
13953 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
13954 object as return type.
13956 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
13958 * icall.c: Deleted "ToString" implementation for double and float
13959 because they are full implemented in managed code.
13961 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13963 * reflection.c, reflection.h: implemented and exported functions
13964 to retrieve info about custom attributes.
13966 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13968 * appdomain.c: moved Uri handling to assembly.c
13969 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
13970 work when using a file Uri in *nix and windows.
13972 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
13973 GetReferencedAssemblies.
13975 2003-03-18 Dick Porter <dick@ximian.com>
13977 * icall.c: Rename a couple of internal calls
13979 * threads.c: Set the thread state to Stopped when a thread exits.
13982 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
13984 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
13987 * object.c (mono_class_vtable): fix warning.
13989 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
13991 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
13993 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
13995 (method_encode_clauses): Create exception info structures in the right
13997 (mono_reflection_setup_internal_class): Initialize supertypes field.
13999 * class.c object.c: Handle interfaces which implement other interfaces
14002 * class.h class.c: Move the supertypes array initialization code into
14003 a separate function so it can be used for dynamic types too. Also call
14004 it earlier, in mono_class_init(), since it can be used before the
14005 type is initialized.
14007 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14011 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
14016 * object.c: remove warnings.
14018 2003-03-13 Martin Baulig <martin@ximian.com>
14020 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
14021 (MonoDebugLexicalBlockEntry): New types.
14023 * debug-mono-symfile.c
14024 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
14026 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14028 * process.c: ret can be any non-zero value accroding to MS doc.
14030 2003-03-07 Miguel de Icaza <miguel@ximian.com>
14032 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
14033 fixing a warning for a miss-used prototype, would have cause
14034 random memory corruption.
14036 2003-03-07 Martin Baulig <martin@ximian.com>
14038 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
14039 getting really annoying ....
14041 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
14043 * reflection.c (fixup_method): added support for array methods.
14045 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14047 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
14048 (pointed out by Michael Adams).
14050 2003-03-04 Dick Porter <dick@ximian.com>
14052 * icall.c: Temporarily reverted the Double and Single ToString()
14053 change, because it broke nunit.
14055 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
14057 * object.h, threads.h: make include files compatible with C++
14058 (patch by Jerome Laban <jlaban@wanadoo.fr>).
14060 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14062 * icall.c: Erased ToString helper functions for Double and Single.
14063 Now, that implementations ar all in managed code (Double and Single
14066 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
14068 * appdomain.c: Added method for initializing the default context of
14069 a domain. Added internal call for getting the default context.
14070 * appdomain.h: Added context variable in MonoDomain struct.
14071 * domain.c: mono_domain_set also sets the default context of the domain
14072 * icall.c: Mapped internal method InternalGetDefaultContext.
14073 * object.c: mono_object_get_virtual_method returns always a remoting
14074 wrapper if the object is a transparent proxy.
14075 mono_runtime_invoke_array: when creating an object by calling the
14076 constructor, if the created object is a proxy, then the constructor should
14077 be called using the a remoting wrapper.
14079 2003-03-03 Dick Porter <dick@ximian.com>
14081 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
14082 variable so it compiles on solaris. Problem spotted by
14083 Christopher Taylor <ct@cs.clemson.edu>
14085 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14088 (get_info_from_assembly_name): don't leak value.
14091 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
14094 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14096 * assembly.c: export mono_image_load_references ().
14097 * class.c: handle function pointers. mono_class_from_name() now
14098 supports nested type names directly.
14100 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
14102 * reflection.h reflection.c: Encode already created dynamic methods
14103 and fields correctly as a DEF instead of a REF.
14105 * reflection.c: Get rid of the force_ref argument to
14106 mono_image_typedef_or_ref since it was wrong in the first place.
14108 * string-icalls.c: add error checking to string constructors according
14111 * reflection.c: Emit types in the order their TypeBuilders were
14112 created. Previously, a new table index was assigned to each type before
14113 the tables were emitted. This was wrong because the signature blob
14114 might already refer to a type by its original table index.
14116 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
14118 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
14121 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14123 * Makefile.am: make assemblies dir have \ instead of / on windows.
14125 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
14127 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
14128 iterate over the NESTEDCLASS table using a linear search since the
14129 table is not guaranteed to be sorted by the secondary key.
14131 * class.c (mono_class_create_from_typedef): fixed up call to
14132 mono_metadata_nesting_typedef.
14134 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
14136 * marshal.c (mono_string_to_byvalstr): clear the memory as
14137 suggested by Jerome Laban <jlaban@wanadoo.fr>
14139 2003-02-26 Dick Porter <dick@ximian.com>
14141 * process.c: Cope with padding in .rsrc blocks
14143 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
14145 * metadata.h: reverted the filter_len change, it breaks reflection
14147 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
14149 * metadata.h: added a new field to store the filter_len
14152 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14154 * reflection.c: handle custom attributes for types and members
14155 created with Reflection.Emit (bug#38422).
14157 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
14159 * reflection.c: define RTSpecialName automatically for constructors for
14160 compatibility with MS.NET.
14162 * reflection.c (mono_reflection_create_runtime_class): initialize
14163 nested_in field of dynamically created classes.
14165 2003-02-22 Martin Baulig <martin@ximian.com>
14167 * debug-mono-symfile.h: Incremented version number.
14169 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
14171 * object.h icall.c process.c: fix warnings.
14173 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
14175 * appdomain.h appdomain.c:
14176 (mono_domain_try_type_resolve): split the
14177 name_or_tb argument into a name and a tb argument.
14178 (mono_domain_has_type_resolve): new function to check whenever the
14179 application has registered a TypeResolve event handler.
14181 * icall.c reflection.h reflection.c: move the type resolve logic into
14182 mono_reflection_get_type () so it will be invoked when
14183 Assembly::GetType () is called.
14186 (mono_reflection_get_type): renamed to get_type_internal.
14187 (mono_reflection_get_type): fixed type name generation so it works
14188 for nested types too.
14189 (mono_reflection_get_type): call has_type_resolve () to avoid the
14190 costly type name generation if there is no resolve event handler.
14192 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14194 * class.c, image.c: load exported types from file references.
14196 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
14198 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
14199 used to cache the managed methods used to create proxies and make
14200 remote invocation of methods.
14201 * class.h: Added in MonoVTable a flag to indicate that a class needs
14202 to be remotely created.
14203 * object.c: Modified the method mono_class_vtable(). It now initializes
14204 the remote flag of the vtable. Modified mono_object_new_specific(),
14205 so now it checks the remote flag.
14206 * icall.c: Added a couple of internal methods, one for enabling instance
14207 creation interception for a type, and one for creating objects bypassing
14210 2003-02-18 Martin Baulig <martin@ximian.com>
14212 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
14213 New interncall to get a method's metadata token.
14215 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
14216 New interncall for the debugger.
14218 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
14220 * class.c (mono_class_setup_vtable): allocate supertype array
14222 2003-02-18 Martin Baulig <martin@ximian.com>
14224 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
14226 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14229 (assembly_name_to_aname): jump over unknown properties (i've found
14230 something like: 'type, assembly, version=xxx, custom=null, public...',
14231 so now will ignore custom=null and still get the rest of the values).
14233 2003-02-17 Dick Porter <dick@ximian.com>
14235 * threads.c: Have Thread.Start() wait for a semaphore to signal
14236 that the thread has set up all its local data. This fixes bug
14237 34323, where Abort() raced the new thread's TLS data.
14239 Also removes the handle_store() call from start_wrapper, because
14240 threads are now always created suspended and there is no longer a
14241 race between the parent and child threads to store the info.
14243 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
14245 * image.c: explain the #- heap issue in a message, hopefully
14246 avoiding FAQs on mono-list.
14248 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14251 (GetEntryAssembly): if the domain has not invoked
14252 AppDomain.ExecuteAssembly yet, return the assembly of the default
14255 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
14257 * class.c (mono_ldtoken): make it work in dynamic assemblies.
14259 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14261 * metadata.c, reflection.c: simple speedup to type hash
14264 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
14266 * image.c, image.h, class.c, assembly.c: move module loading
14267 to MonoImage. When loading metadata, consider alignemnet from
14268 the start of metadata, not from the metadata address in memory.
14270 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
14272 * reflection.c (mono_reflection_get_custom_attrs): Added support for
14273 AssemblyBuilder objects. Factored out custom attribute creation into
14274 a separate function.
14275 (create_custom_attr): new function to create custom attributes.
14277 2003-02-12 Miguel de Icaza <miguel@ximian.com>
14279 * Makefile.am: Got tired of typing the full pathname to pedump.
14280 Until there is another option, am installing this.
14282 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
14284 * class.c (class_compute_field_layout): always set field->parent
14285 (mono_ldtoken): use mono_defaults.fieldhandle_class;
14287 2003-02-11 Dick Porter <dick@ximian.com>
14290 * monitor.c: Rewrote Monitor, making lock much faster and
14291 Pulse/Wait work as specified. Also uses much fewer handles, and only
14292 creates them as needed.
14294 * exception.c: Added SynchronizationLockException
14296 * threads.c: Deleted old Monitor implementation. The new one is
14299 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14301 * class.c: handled TypedReference type code. Set the correct size for
14302 class data. Setup interface_offsets for interface classes, too.
14304 2003-02-09 Martin Baulig <martin@ximian.com>
14306 * debug-mono-symfile.h: Reflect latest symbol writer changes.
14308 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
14310 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
14311 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
14312 * object.c: fixed mono_object_get_virtual_method () for interfaces.
14313 * verify.c: check for code that runs after the end of the method.
14315 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14317 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
14318 "System.Math::Round2".
14319 * sysmath.h: Added Floor, Round and Round2 definitions.
14320 * sysmath.c: Modified certain functions that were not 100% compliant
14321 with MS.NET (math precision) and added the implementation of Floor,
14324 2003-02-07 Martin Baulig <martin@ximian.com>
14326 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
14328 2003-02-07 Martin Baulig <martin@ximian.com>
14330 * debug-mono-symfile.c: Reflected latest symwriter changes.
14331 (mono_debug_create_mono_symbol_file): Removed.
14332 (mono_debug_open_mono_symbol_file): Take an argument which
14333 specifies whether to create a dynamic symbol file.
14335 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
14337 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
14339 2003-02-05 Martin Baulig <martin@ximian.com>
14341 * reflection.c (mono_image_build_metadata): Make this public,
14342 protect it against being called multiple times, don't create
14343 resources and don't build the compressed metadata here.
14344 (mono_image_create_pefile): Do this here.
14347 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
14349 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14351 * socket-io.c: fixed bug #36322.
14353 2003-02-06 Piers Haken <piersh@friskit.com>
14357 * debug-mono-symfile.c:
14363 * socket-io.c: warning cleanups
14365 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
14367 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
14368 function. works like remoting invoke, but does a check for the Proxy first.
14370 2003-02-05 Miguel de Icaza <miguel@ximian.com>
14372 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
14374 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
14376 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
14378 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
14379 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
14381 * object.c (mono_store_remote_field_new): used by the new jit
14382 instead of mono_store_remote_field
14383 (mono_load_remote_field_new): used by the new jit
14384 instead of mono_load_remote_field
14386 2003-02-05 Patrik Torstensson
14388 * appdomain.c: changed unload to take the domain id instead
14391 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
14394 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14396 * appdomain.c: don't look for assemblies in ApplicationBase if
14397 PrivateBinPathProbe is set.
14399 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14401 * object.c: make the first argument in main_args contain the absolute
14402 path to the assembly. Fixes bug #37511.
14404 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14406 * icall.c: get correct UTC offset for countries not using daylight
14407 time saving. Fixes bug #30030.
14409 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14411 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
14412 and 1 are the family).
14414 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
14416 * icall.c (ves_icall_InternalExecute): removed wrong assertion
14418 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
14420 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
14422 * reflection.c: added support for SignatureHelper tokens, which is
14423 needed by the Calli opcode.
14425 * reflection.h: track changes to SignatureHelper class.
14427 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
14429 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14431 * appdomain.c: fixed loading assemblies from PrivateBinPath.
14433 2003-02-03 Patrik Torstensson
14434 * appdomain.[c|h], domain.c :
14435 - Added support for getting a domain via domain id
14436 - Support for setting and getting domain from System.AppDomain
14437 (used in cross appdomain channel)
14438 - Added support for get/set for a MonoAppContext on a thread
14439 (Context class in System.Runtime.Remoting.Contexts),
14440 - Removed hack in Get/SetData and ExecuteAssembly.
14442 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
14443 the managed world to get control when a proxy is created.
14445 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
14447 2003-02-03 Miguel de Icaza <miguel@ximian.com>
14450 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14451 Populate the codebase field as well.
14453 2003-02-02 Martin Baulig <martin@ximian.com>
14455 * debug-mono-symfile.c
14456 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
14457 (mono_debug_symfile_add_method): Allow interncalls.
14459 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14461 * icall.c: throw parse exception if strtod fails or the string is empty.
14463 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
14465 * marshal.c: handle object type separately from defined
14468 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
14470 * marshal.c: handle NATIVE_LPSTR for strings when it's
14471 explicitly specified.
14473 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
14475 * reflection.c, reflection.h, icall.c: setup the reflection
14476 handle cache for ModuleBuilders and AssemblyBuilders.
14478 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
14480 * reflection.c (reflection_methodbuilder_to_mono_method): set
14483 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14485 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
14487 2003-01-29 Dick Porter <dick@ximian.com>
14489 * threads.c: No need for the fake_thread kludge now that Thread
14490 doesn't run a class constructor
14492 2003-01-29 Dick Porter <dick@ximian.com>
14494 * threads.c: Use g_direct_hash instead of the rather bogus
14497 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
14499 * marshal.c (mono_marshal_get_native_wrapper): add check for null
14500 (fix pinvoke12.exe)
14501 (mono_marshal_get_struct_to_ptr): generate valid IL code
14502 (mono_marshal_get_ptr_to_struct): generate valid IL code
14503 (*): correctly set sig->pinvoke, we need to memdup the signature
14506 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14508 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
14509 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
14511 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
14513 * profiler.c: provide more callers information.
14515 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
14517 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
14519 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
14521 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
14523 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14525 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
14526 exception instead of going into an infinite loop on dates which it
14529 * string-icalls.c (ves_icall_System_String_get_Chars): raise
14530 out-of-range exception if needed.
14532 * class.c (mono_class_setup_vtable): allow a virtual method to provide
14533 an implementation for an interface method and to override an inherited
14534 method at the same time.
14535 Imagine a scenario when a virtual method is used to override a
14536 virtual abstract method in a parent class, and this same method
14537 provides an implementation for an method inherited from an interface.
14538 In this case, the interface resolution code will set im->slot, which
14539 means that the virtual method override pass will skip this method
14540 which means a pointer to the abstract method inherited from the parent
14541 will remain in the vtable of this non-abstract class.
14543 * class.c: (mono_class_setup_vtable): continue search for a real
14544 method if only an abstract method is found.
14546 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
14548 * reflection.c: add size to encoding for ByValStr and ByValArray
14549 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
14551 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14553 * class.c (mono_class_setup_vtable): pass the override info as an
14556 * class.c (mono_class_setup_vtable): set the slot of overriding methods
14559 * reflection.c (ensure_runtime_vtable); add support for method
14562 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14564 * reflection.c (resolution_scope_from_image): Hack to work to work with
14565 dynamic assemblies.
14567 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
14568 added a 'force_ref' argument to force this function to allways return
14569 a TypeRef. This is needed by mono_image_get_memberref_token ().
14571 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14573 * reflection.c (mono_image_get_type_info): interfaces really don't have
14576 * reflection.c (mono_image_basic_init): fill out missing fields of
14579 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
14580 dynamic assemblies. This is required so dynamic assemblies show up in
14581 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
14582 Type::GetType() etc. This is consistent with MS behaviour.
14584 * image.c image.h reflection.c: add newly created classes to the name
14585 cache so mono_class_get () will find them.
14587 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14589 First part of changes to get IKVM.NET running under mono.
14591 * appdomain.h, appdomain.c: added new function
14592 mono_domain_try_type_resolve() which will emit TypeResolve events.
14593 This function will call AppDomain::DoTypeResolve to do the actual work.
14595 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
14596 moved existing code dealing with dynamic tokens to a new function
14597 called mono_reflection_lookup_dynamic_token (). This function will
14598 raise TypeResolve events when appropriate. Since reflection.c is not
14599 part of libmetadata, a new hook function called
14600 mono_lookup_dynamic_token() is added to class.c which will call this.
14602 * assembly.h assembly.c: make the invoke_load_hook function public,
14603 so it can be called for dynamic assemblies.
14605 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
14607 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
14610 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
14611 MonoGHashTable, since it contains pointers to objects which the GC
14614 * assembly.c (search_loaded): remove unused variable.
14616 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
14618 * object.c: fixed issue exposed by gcc-generated IL programs
14619 that use RVA data for pointers.
14621 2003-01-25 Martin Baulig <martin@ximian.com>
14623 * threads.c (start_wrapper): Moved the initialization of
14624 `start_func' above the mono_new_thread_init() call to which we
14625 pass it as argument.
14627 2003-01-24 Martin Baulig <martin@ximian.com>
14629 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
14630 the MonoThread pointer.
14632 2003-01-21 Miguel de Icaza <miguel@ximian.com>
14634 * icall.c: Rename `PowImpl' to Pow.
14636 2003-01-23 Dick Porter <dick@ximian.com>
14638 * threads.c (start_wrapper): Create a Thread object if needed, so
14639 the Main() thread can do the class initialisation in a subthread
14640 that has been set up to allow managed code execution.
14642 Pass the thread ID instead of the MonoThread pointer to the thread
14643 start and attach callbacks. This change is required, because the
14644 jit thread start callback must be called _before_ the Thread
14645 object can be created.
14647 (mono_thread_init): Removed much object creation code that is no
14648 longer needed. No managed code is called from here now.
14650 * object.c (mono_runtime_exec_managed_code): Create a subthread
14651 for Main, and call back to the runtime to use it.
14652 Set the exit code when Main exits.
14654 * gc.c: Make sure domain finalisation happens in a subthread.
14655 Re-enable threaded GC, fixing bug 31333 (again).
14657 * environment.c: System.Environment internall calls (so far just
14658 ExitCode is here, the others are still in icall.c)
14660 * appdomain.c (mono_runtime_cleanup): All threads running managed
14661 code should have finished before mono_runtime_cleanup() is
14662 reached, so no need to clean up threads.
14664 2003-01-22 Martin Baulig <martin@ximian.com>
14666 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
14667 `gpointer func' arguments.
14668 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
14669 but added `MonoThread *thread' argument.
14670 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
14672 * threads.c (mono_new_thread_init): Added `gpointer func' argument
14673 and pass it to the mono_thread_start_cb callback.
14674 (mono_install_thread_callbacks): New public function to install a
14675 set of callbacks which are set by the debugger.
14676 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
14678 2003-01-22 Martin Baulig <martin@ximian.com>
14680 * Makefile.am: Install debug-mono-symfile.h.
14682 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
14684 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
14686 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
14688 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
14689 * class.c (mono_ptr_class_get): correctly set access levels of pointers
14690 (mono_array_class_get): correctly set access levels of arrays
14692 2003-01-20 Patrik Torstensson
14693 * image.h (MonoAssemblyName): changed major, minor, build, revision
14694 from signed to unsigned.
14696 2003-01-20 sean kasun <skasun@azstarnet.com>
14698 * reflection.c (load_cattr_value): Now this handles
14699 MONO_TYPE_SZARRAY. Fixes bug #35629
14701 2003-01-20 Miguel de Icaza <miguel@ximian.com>
14703 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
14706 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14708 * decimal.c: fixed bug #26056.
14710 2003-01-17 Martin Baulig <martin@ximian.com>
14712 * gc.c: Raise an ExecutionEngineException instead of using g_error().
14714 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14717 (mono_get_exception_type_initialization): new function.
14719 * object.c: throw a TypeInitializationException when an exception is
14720 thrown invoking the class constructor.
14722 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14724 * reflection.c: fixed attribute reading.
14726 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14729 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
14730 provided, look for the type in the calling assembly and then in
14731 mscorlib; if the assembly name is provided, only try that one.
14733 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14735 * object.c: register the vtable before there is a chance it's
14736 queried again recursively.
14738 2003-01-13 Duncan Mak <duncan@ximian.com>
14740 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
14743 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
14745 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
14747 2003-01-11 Martin Baulig <martin@ximian.com>
14749 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
14750 this to 20 for the release.
14752 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
14754 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
14756 * loader.c (mono_method_get_marshal_info): bug fix
14758 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
14759 structures with explicit layout
14761 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14763 * profiler.c: made the output more readable (and sorted).
14764 Added caller information for the allocation profiler.
14766 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
14768 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
14770 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14772 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
14773 to get value types.
14775 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
14777 * object.c, profiler.h, profiler.c, profiler-private.h:
14778 Added object allocation profiler.
14780 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
14782 * reflection.h, reflection.c: handle global methods.
14783 Compress blob entries.
14785 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
14787 * marshal.c: fix compilation.
14789 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
14791 * loader.c (mono_method_get_marshal_info): impl.
14793 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
14795 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14797 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
14798 for reference types.
14800 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
14802 * loader.c: fixed off by one error in loaded parameter names.
14804 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
14806 * marshal.c (mono_marshal_get_icall_wrapper): like
14807 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
14808 instead of a MonoMethod.
14810 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14812 * decimal.c: fixed bug #36537.
14814 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
14816 * marshal.c: throw a missing method exception if a
14817 P/Invoke method is not found.
14819 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14821 * icall.c: allow a null this for constructors.
14823 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14825 * icall.c: raise the proper exceptions if the arguments to the
14826 internal Invoke are incorrect.
14828 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
14830 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
14832 2003-01-03 Martin Baulig <martin@ximian.com>
14834 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14836 2002-12-31 Martin Baulig <martin@ximian.com>
14838 * debug-mono-symfile.c: Completely rewrote the type section.
14839 Instead of using individual malloc()ed fields, we use one big
14840 continuous memory area and offsets into this area.
14841 See the comments in the source code for details.
14843 2002-12-30 Martin Baulig <martin@ximian.com>
14845 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
14847 2002-12-30 Martin Baulig <martin@ximian.com>
14849 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
14850 line number table in this data blob instead of using an external
14853 2002-12-28 Martin Baulig <martin@ximian.com>
14855 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14857 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
14859 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
14860 as a boxed return type.
14862 2002-12-21 Miguel de Icaza <miguel@ximian.com>
14865 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
14866 g_build_filename to properly get separators on the filename created.
14868 * object.h: Small change, introduce MonoMarshalByRefObject to
14869 track the layout of that structure in the C# universe as we make
14872 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
14874 * object.c: removed assert to allow static fields on interfaces.
14875 * loader.c: a TypeSpec may be used for any type, not just arrays.
14877 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
14879 * class.c, class.h: added mono_class_array_element_size ().
14880 Ignore static methods in interfaces.
14882 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14884 * threads.c: fixed the build under cygwin.
14886 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
14888 * reflection.c: handle nullref constants. Allocate keys for
14889 reflection handles with the GC.
14891 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14893 * threads.c, threads.h: added mono_thread_get_abort_signal()
14894 to get a suitable signal for thread abort.
14896 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14898 * metadata.c: fix handling of ExportedType table.
14900 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14902 * icall.c: added WriteWindowsDebugString internal call.
14904 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14906 * reflection.h: added fields to match C# implementation.
14908 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14910 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
14912 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
14914 * gc.h, gc-internal.h: Rename header for GC internal calls to
14915 gc-internal.h from gc.h as to not clash with Boehm GC having its
14916 header installed as <gc.h> in outside include paths.
14917 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
14918 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
14920 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14922 * icall.c: assign minor, build and revision in FillName.
14924 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
14926 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
14927 Added support for running code generated by Reflection.Emit.
14929 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14931 * appdomain.c: check for NULL argument in LoadFrom.
14933 2002-12-10 Dick Porter <dick@ximian.com>
14935 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
14937 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14939 * appdomain.c: fix buglet when building exe file name. Handle full
14940 assembly name (needed after latest changes to AssemblyName).
14942 (mono_image_close): free some hashtables.
14944 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
14946 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
14947 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
14948 on some systems (redhat 7.3)
14950 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
14952 * threads.c: delete the critical section of a sync block,
14953 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
14955 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
14957 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
14959 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14961 * appdomain.[ch]: handle the assembly preload event to try loading the
14962 assemblies using the paths we have in the current domain.
14964 * assembly.[ch]: created an assembly preload hook that is called to try
14965 loading the assembly by other means that the ones provided here.
14967 * domain.c: initialize the domain search path.
14969 From now on, assemblies (TODO: except corlib and System) are loaded
14970 according to these rules when using mono_assembly_load ():
14972 1. It tries to load the assembly from the ApplicationBase
14973 of the current domain appending .dll and .exe (TODO: have to
14974 try loading from name/name.dll and name/name.exe).
14976 2. It tries the search path specified in PrivateBinPath for the
14977 current domain (if any).
14979 3. Previous behavior.
14981 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
14983 * icall.c: implemented GetInterfaceMap() related icall.
14984 * domain.c, loader.h: load MethodInfo in mono_defaults.
14986 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
14988 * gc.c: disable the finalizer thread for now, untill all the issues
14989 with it are resolved.
14991 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
14993 * string-icalls.c: handle embedded nulls in string ctor when the
14994 length is specified.
14996 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
14998 * class.c: look for explicit interface implementation in parent
15001 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
15003 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
15005 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15007 * gc.c: protect handles with a critical section.
15009 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15012 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
15013 parameters. If no assembly specified, try getting the type from all
15014 the assemblies in the current domain, else, load the assembly and get
15017 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15019 * marshal.c: applied patch from Aleksey Demakov that fixes
15020 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
15022 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15024 * icall.c: fixed get_location.
15026 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
15028 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
15029 declarations to make it work with older gcc.
15031 * loader.c (mono_get_method): set signature->pinvoke for native calls
15033 2002-11-20 Dick Porter <dick@ximian.com>
15035 * threads.c (mono_thread_init): Set the main thread's handle
15037 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15039 * gc.c: allow compilation without GC support. Changed to match the
15042 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15044 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
15046 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
15048 * reflection.c: set a public key token on the core assemblies.
15050 2002-11-18 Dick Porter <dick@ximian.com>
15052 * threads.c: Split out some thread initialisation so that other
15053 files can set the start callback function.
15055 * gc.c: Run finalisers in a separate thread, to avoid stack
15056 overflow. Fixes bug 31333.
15058 * appdomain.c: Set up GC finalisation thread.
15062 * domain.c: Use gc.h macros for GC_malloc
15064 2002-11-15 Dick Porter <dick@ximian.com>
15068 * appdomain.c: Removed mono_runtime_init_with_attach(),
15069 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
15070 merging the extra parameter with the existing function. Removed
15071 unneeded code in mono_thread_attach().
15073 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
15075 * image.c (mono_image_loaded_by_guid): a method to get loaded
15077 (load_metadata_ptrs): we store the guid as string.
15079 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
15081 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
15083 * metadata.c (mono_guid_to_string): imported method form Zoltan
15084 Varga (slightly modified)
15086 * assembly.c (mono_assembly_open): load precompiled code
15088 * loader.h (MonoMethod): we store the method token for use in the
15091 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15093 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
15094 the hook function called when an assembly is loaded.
15096 * domain.c: Modified file.
15097 (mono_domain_assembly_load): removed hash table insertion of assemblies.
15101 2002-11-07 Miguel de Icaza <miguel@ximian.com>
15103 * reflection.c: Map PEFileKind to the value expected by the WinNT
15106 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15108 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
15109 Read until the buffer is filled completely.
15111 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15113 * icall.c: implemented MonoType.InternalGetEvent ().
15115 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15117 * appdomain.c: implemented InitAppDomainSetup. Delayed
15118 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
15119 the entry_assembly.
15121 * assembly.c: base_dir is now an absolute path ending with
15124 * icall.c: modified get_location according to the above changes.
15126 * object.c: init AppDomain.SetupInformation for the default domain after
15127 we have the entry assembly.
15129 * domain.c: when unloading a domain, setup = NULL.
15131 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
15133 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
15135 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
15137 * object.h, object.c: introduced mono_object_get_virtual_method ()
15138 to lookup the method invoked on an object when a callvirt is done on
15140 * icall.c: make MethodInfo::Invoke() always do a virtual call.
15142 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15144 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
15145 current domain when loaded an assembly and failed to load it.
15147 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
15149 2002-10-31 Dick Porter <dick@ximian.com>
15153 * file-io.c: Return the error status in a parameter, as the
15154 GetLastError() value has long since been blown away if we try and
15155 look it up in a subsequent internal call invocation. Delete the
15156 GetLastError() internal call, because it's useless.
15158 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
15160 * class.[ch]: added cast_class to fix bug 29517
15162 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
15164 * marshal.c: create valid IL code in the filter clause:
15165 the new JIT is less forgiving:-)
15167 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15169 * icall.c: removed get_property internal call.
15171 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
15173 * appdomain.h domain.c: Added an ID to appdomains.
15175 * threads.c threads.h icall.c: Implement icall
15176 Thread:GetDomainID(), and remove unused icall
15177 CurrentThreadDomain_internal.
15179 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15181 * icall.c: Don't recurse through the base types in GetConstructor.
15184 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15186 * mempool.h, mempool.c: added mono_mempool_empty() and
15187 mono_mempool_stats().
15189 2002-10-23 Dick Porter <dick@ximian.com>
15193 * icall.c: Added MonoIO.GetFileType internal call
15195 2002-10-17 Dick Porter <dick@ximian.com>
15197 * appdomain.c (mono_runtime_cleanup): Don't signal the async
15198 delegate semaphore before waiting for all threads to finish,
15199 because new threads can also call async delegates. Fixes bug
15202 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
15203 of 3 seconds, in case another async job is queued. (This part is
15204 needed because the bug fix reintroduced the 3s exit lag.) This
15205 makes the mono_runtime_shutdown flag superfluous.
15207 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15209 * reflection.c: include ehader size in method section headers.
15210 Really check for suplicated modules entries.
15212 2002-10-17 Martin Baulig <martin@gnome.org>
15214 * debug-mono-symfile.c: Added back support for locals.
15216 2002-10-14 Martin Baulig <martin@gnome.org>
15218 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
15221 2002-10-14 Martin Baulig <martin@gnome.org>
15223 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
15224 mono_class_get() instead of looking in the class cache.
15226 2002-10-13 Martin Baulig <martin@gnome.org>
15228 * debug-mono-symfile.c: Set version number to 28, include the
15229 signature in method names.
15231 2002-10-13 Martin Baulig <martin@gnome.org>
15233 * debug-mono-symfile.h: Set version number to 27.
15235 2002-10-11 Martin Baulig <martin@gnome.org>
15237 * gc.c: Don't register/unregister NULL pointers as disappearing links.
15239 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15241 * metadata.c, metadata.h: added helper function to allocate signatures.
15243 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15245 * icall.c: added internal call to get the location of machine.config.
15247 2002-10-08 Martin Baulig <martin@gnome.org>
15249 * debug-mono-symfile.c: Ignore classes with a pending init for the
15252 2002-10-03 Dick Porter <dick@ximian.com>
15254 * threads.c: Freebsd pthread_t is a pointer
15256 2002-10-03 Dick Porter <dick@ximian.com>
15258 * socket-io.c: Implemented GetHostName_internal
15260 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15263 (mono_config_parse_file): don't leak the text.
15265 2002-10-02 Martin Baulig <martin@gnome.org>
15267 * debug-mono-symfile.c: Added support for methods.
15269 2002-10-01 Martin Baulig <martin@gnome.org>
15271 * debug-mono-symfile.c: Don't emit methods and line numbers for
15272 the dynamic symbol file, just write the type table. We can easily
15273 have an external helper program which creates a symbol file for an
15276 2002-10-01 Dick Porter <dick@ximian.com>
15278 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
15279 Only add the handle to the cleanup array when we're about to
15280 launch the thread. Bug 31425 deadlocked when the test was run on
15283 2002-10-01 Martin Baulig <martin@gnome.org>
15285 * debug-mono-symfile.c: Added support for properties.
15287 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15289 * reflection.c: unaligned store fix from Mark Crichton
15290 <crichton@gimp.org>.
15292 2002-09-27 Martin Baulig <martin@gnome.org>
15294 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
15297 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
15299 * assembly.h, assembly.c: use a sane API to hook into the assembly
15300 loading process instead of a useless special-purpouse hack
15301 (ngen needs a hook, too, for example).
15303 2002-09-27 Dick Porter <dick@ximian.com>
15305 * threads.c (mono_thread_init): Call GetCurrentProcess() so
15306 io-layer can set up some process handle info. Not needed on w32,
15307 but doesn't hurt either.
15309 * process.c: Pass the program name in the second parameter to
15310 CreateProcess, so the path is searched. Include the working
15311 directory. Implemented process name, process enumeration, and some
15312 process detail internal calls.
15314 * icall.c: Added internal calls for process lookup, and some
15317 2002-09-26 Martin Baulig <martin@gnome.org>
15319 * assembly.c (mono_install_open_assembly_hook): New global
15320 function to install a function to be invoked each time a new
15321 assembly is loaded.
15322 (mono_assembly_open): Run this callback function if set.
15324 * debug-mono-symfile.c: Put back line numbers for the dynamic
15325 symbol file and also record the .il file as source file. This
15326 allows us to install the temporary symbol file as `file.dbg' just
15327 like a compiler-generated one.
15329 2002-09-26 Nick Zigarovich <nick@chemlab.org>
15331 * Corrected typo in gc.c (BOHEM vs BOEHM).
15333 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15335 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
15336 GetProperties. Also avoid calling g_slist_length in GetProperties and
15339 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15341 * reflection.c: avoid unaligned stores (bug spotted by
15342 Mark Crichton <crichton@gimp.org>).
15344 2002-09-25 Martin Baulig <martin@gnome.org>
15346 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
15347 instead of guint64 for addresses and added prologue/epilogue info.
15349 2002-09-25 Martin Baulig <martin@gnome.org>
15351 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
15352 store line number info. For the dynamic symbol file, we only need
15353 to provide the JIT generated dynamic line number info for the dynamic
15356 2002-09-25 Martin Baulig <martin@gnome.org>
15358 * debug-mono-symfile.h: Incremented version number.
15360 2002-09-24 Martin Baulig <martin@gnome.org>
15362 * class.c (mono_debugger_class_init_func): New global function
15364 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
15367 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
15368 function. This is called via the mono_debugger_class_init_func
15369 hook to add all types to the dynamic type table.
15370 (ves_icall_MonoDebugger_GetType): New interncall to get a class
15371 from its metadata token.
15373 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
15374 New interncall for the debugger.
15376 2002-09-24 Nick Drochak <ndrochak@gol.com>
15378 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
15379 before using it in case it is null.
15381 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15383 * metadata.c: allow custom modifiers in local var signatures
15384 (bug spotted by Zoltan Varga).
15386 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15388 * class.c: deal with the <Module> class that may have a NULL vtable.
15389 Eliminate warnings.
15391 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15393 * image.c, image.h: more strong name helpers.
15394 * monosn.c: more work: convert pem keys to cryptoapi format.
15396 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15398 * string-icalls.c: speedup IndexOf.
15400 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15402 * icall.c: updates from Zoltan.2.Varga@nokia.com.
15404 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15406 * icall.c: cleanup: use mono_object_domain ().
15408 2002-09-23 Martin Baulig <martin@gnome.org>
15410 * debug-mono-symfile.c: Improved type support.
15412 2002-09-22 Martin Baulig <martin@gnome.org>
15414 * debug-mono-symfile.c: Added support for reference types and strings.
15416 2002-09-22 Martin Baulig <martin@gnome.org>
15418 * debug-mono-symfile.c: Started to work on the type table.
15420 2002-09-21 Martin Baulig <martin@gnome.org>
15422 * debug-mono-symfile.c: Largely reworked the symbol table format.
15423 The symbol table is now incrementally updated each time a new
15424 method is added. We're now also using our own magic and version
15425 so that you don't need to recompile all your classes if the
15426 dynamic table changes.
15427 (mono_debug_update_mono_symbol_file): Removed.
15428 (mono_debug_symfile_add_method): New function to add a method.
15430 2002-09-21 Martin Baulig <martin@gnome.org>
15433 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
15436 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
15437 New interncall to get a method from its metadata token.
15439 2002-09-21 Martin Baulig <martin@gnome.org>
15441 * debug-mono-symfile.c: Create type table.
15443 2002-09-20 Martin Baulig <martin@gnome.org>
15445 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
15447 2002-09-20 Martin Baulig <martin@gnome.org>
15449 * debug-mono-symfile.c: Provide information about params and locals.
15451 2002-09-20 Martin Baulig <martin@gnome.org>
15453 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
15456 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
15457 interncall to get a method from its metadata token.
15459 2002-09-20 Martin Baulig <martin@gnome.org>
15461 * debug-mono-symfile.c: Added a few checks for method->header
15462 being non-NULL. This should never happen, but for the moment
15463 let's use a g_warning() rather than a g_assert().
15465 2002-09-19 Mark Crichton <crichton@gimp.org>
15467 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
15468 even if support for it isn't present. Added an #ifdef to fix this.
15470 * socket-io.c: Added checks back for Solaris support.
15472 2002-09-19 Martin Baulig <martin@gnome.org>
15474 * debug-mono-symfile.c (read_string, write_string): Reflect latest
15475 changes in the symbol file format.
15477 2002-09-18 Martin Baulig <martin@gnome.org>
15479 * debug-mono-symfile.c: Set version number to 21.
15481 2002-09-18 Dick Porter <dick@ximian.com>
15483 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
15484 on netbsd. Fixes bug 30051.
15486 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15489 (set_version_from_string): little fix.
15491 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15493 * monosn.c, Makefile.am: added strong name utility.
15494 * reflection.h, reflection.c: implemented delayed signing,
15495 locale, version and hash id assembly attributes.
15497 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15499 * loader.c, metadata.c: load param attributes in signatures.
15501 2002-09-16 Martin Baulig <martin@gnome.org>
15503 * debug-mono-symfile.c: Added string table with all method names.
15505 2002-09-14 Martin Baulig <martin@gnome.org>
15507 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
15508 fast method lookup.
15510 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15512 * reflection.c: record the public key token of referenced assemblies.
15514 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15516 * image.c, image.h: added functions to get the strong name and the
15517 public key of an assembly.
15518 * pedump.c: use them.
15520 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
15522 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
15524 2002-09-12 Miguel de Icaza <miguel@ximian.com>
15526 * marshal.c (mono_marshal_get_managed_wrapper): Added
15529 2002-09-11 Martin Baulig <martin@gnome.org>
15531 * gc.c: Call GC_unregister_disappearing_link() on all links when
15532 finalizing them, this is necessary to aviod a crash in boehm's
15535 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15537 * gc.c: handle GetTarget for finalized objects spotted and fixed by
15540 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
15542 * icall.c: implemented MonoType::Module.
15543 * reflection.c, reflection.h: mono_module_get_object () from
15544 Tomi Pakarinen <tomi.pakarinen@welho.com>.
15546 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15548 * icall.c: ignore overridden methods in GetMethods ().
15549 Fix for FieldInfo::SetValue().
15550 * object.c: handle float/double in runtime invoke.
15552 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15554 * object.c: allow a constructor to be called again on an object.
15556 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15558 * class.h, class.c: move field layout code to it's own function and
15559 export it. Get an interface id earlier. Move fields in MonoClass
15560 so they are more cache friendly and align the bitfields.
15561 * loader.c: temporary handle get_param_names() for a runtime method.
15562 * reflection.c, reflection.h: more code to handle runtime creation of
15565 2002-09-09 Martin Baulig <martin@gnome.org>
15567 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
15568 signature with the pinvoke field being set for the actual call.
15570 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15572 * icall.c: removed some unused icalls. Start of map of glib charsets
15573 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
15575 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15577 * debug-helpers.c: break infinite loop (found and fixed by
15578 Holger Arnold <harnold@gmx.de>).
15580 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15582 * icall.c: target may be null in create_delegate.
15584 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15586 * marshal.c: handle a boolean return type.
15588 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15590 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
15592 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15594 * gc.c: fix weakreferences.
15596 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
15598 * icall.c: added icall to get default codepage.
15600 2002-09-03 Dick Porter <dick@ximian.com>
15603 * threads.c: Use MonoThread instead of MonoObject where
15606 Store running thread objects in a hash table, so that we have all
15607 the info to hand when waiting for them to finish
15608 (means we don't need OpenThread() any more, so mingw builds should
15609 be fully functional again.)
15612 * object.h: Added thread ID to MonoThread
15614 2002-09-03 Martin Baulig <martin@gnome.org>
15616 * icall.c (System.Reflection.Assembly::get_location): New interncall.
15618 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15620 * icall.c: fixed leak in get_temp_path. Thanks lupus.
15622 2002-09-03 Martin Baulig <martin@gnome.org>
15624 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
15625 argument to store the end address of the disassembled instruction.
15627 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
15628 here from debug-symfile.h.
15629 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
15630 JIT into this struct.
15631 (MonoSymbolFile): Added `char *image_file' field.
15632 (MonoDebugGetMethodFunc): Removed.
15633 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
15634 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
15635 (mono_debug_find_method): New method.
15637 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
15638 create a full symbol file.
15639 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
15640 and static symbol files.
15641 (mono_debug_find_method): The symbol file keeps an internal method hash,
15642 call this to get a MonoDebugMethodInfo from a MonoMethod.
15644 * debug-symfile.[ch]: Removed.
15646 2002-08-29 Miguel de Icaza <miguel@ximian.com>
15648 * image.c (do_mono_image_open): Remove linker version check.
15650 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
15652 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
15653 wrappers for instance methods.
15655 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15657 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
15659 2002-08-28 Dick Porter <dick@ximian.com>
15661 * Makefile.am: Export HOST_CC for w32 builds
15663 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15665 * file-io.c process.c: MonoString are null terminated, no
15666 need for mono_string_to_utf16() anymore.
15668 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15670 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
15672 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
15674 * icall.c, reflection.h: speedup System.MonoType.
15676 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15678 * reflection.c: allow null as the value of a string argument in
15679 custom attributes constructors.
15681 2002-08-27 Martin Baulig <martin@gnome.org>
15683 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
15684 `trampoline_address' field.
15686 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
15688 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
15689 check (fixes bug #29486)
15691 2002-08-27 Martin Baulig <martin@gnome.org>
15693 * debug-mono-symfile.c: Changed the file format in a way that allows us
15694 open it read-only and to use a specially malloced area for all the
15695 dynamic data. We can now also generate a symbol file on-the-fly if we're
15696 debugging IL code and there is no MCS generated symbol file for it.
15698 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15700 * object.c: added a define for a good string and array
15701 creation speedup (not enabled by default because we need to deal with
15704 2002-08-26 Martin Baulig <martin@gnome.org>
15706 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
15707 function to create a dynamic symbol file. This is used by the
15708 debugger to create a symbol file for IL code on-the-fly.
15710 2002-08-26 Martin Baulig <martin@gnome.org>
15712 * loader.c (mono_lookup_pinvoke_call): Include the error message
15713 from g_module_error() in the error message.
15715 2002-08-24 Martin Baulig <martin@gnome.org>
15717 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
15718 function to update the symbol file. The symbol file is mmap()ed
15719 writable, but private. This allows us to install the symbol file
15720 together with the assembly.
15722 2002-08-24 Martin Baulig <martin@gnome.org>
15724 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
15725 but they can read the new symbol file format which mcs is now creating.
15727 * debug-symfile.c (mono_debug_find_source_location): Moved to
15728 debug-mono-symfile.c; this is now operating on the new symbol file.
15730 2002-08-23 Martin Baulig <martin@gnome.org>
15732 * debug-helpers.c (mono_method_desc_from_method): New function to get
15733 a MonoMethodDesc from a MonoMethod.
15735 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15737 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
15738 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
15740 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
15742 * string-icalls.[ch]: make helper methods static.
15744 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15746 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
15747 types to it and to SetValueInternal.
15749 * object.c: Moved handle_enum label to its proper place. This was the
15752 This time i compiled mcs and gtk-sharp and they both work.
15754 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15756 * icall.c: reverted partially my previous patch until
15757 object.c:set_value handles enums correcly.
15759 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15762 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
15763 (ves_icall_System_Environment_get_MachineName): removed warning when
15764 compiling under cygwin.
15766 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15768 * object.c: fixed field_get_value() for reference types.
15770 2002-08-22 Dick Porter <dick@ximian.com>
15772 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
15773 Don't free a buffer while it's still needed. Patch from Jonathan
15774 Liger <Jonathan.liger@wanadoo.fr>
15776 2002-08-21 Miguel de Icaza <miguel@ximian.com>
15778 * icall.c (ves_icall_System_Environment_get_Platform): Add new
15781 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
15783 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
15784 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
15786 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
15787 we call unmanaged code which throws exceptions.
15789 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15791 * appdomain.h: added per-domain entry_assembly.
15792 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
15794 * icall.c: Assembly::GetEntryAssembly icall.
15795 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
15796 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
15798 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15800 * appdomain.h, gc.c: added mono_domain_finalize ().
15802 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15805 (mono_print_unhandled_exception): changed g_warning by g_printerr
15806 because g_log has a 1024 characters limit (yeah, i got a big stack
15807 trace). Don't print exception name, that should be in ToString
15810 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15812 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
15813 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
15815 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15818 (mono_print_unhandled_exception): after previous commit, i realized
15819 that MS calls ToString on the exception. I changed this function to
15820 do that. This way we get stack_trace for free.
15822 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15825 (mono_print_unhandled_exception): invoke Message property instead of
15826 getting 'message' field from Exception. Don't allocate memory for
15827 'trace' and 'message' if not needed.
15829 2002-08-18 Dick Porter <dick@ximian.com>
15831 * unicode.c: Fix asserts to match Encoder.cs checks
15833 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15835 * marshal.c: fix unaligned store issue and a few wrong
15836 opcode argument types.
15838 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15840 * icall.c: added GetUninitializedObjectInternal internal call.
15842 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
15844 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
15845 to the right domain.
15847 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
15849 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
15851 * class.c (class_compute_field_layout): set blittable to false for Strings
15853 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
15855 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15857 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
15858 first chunk of code to create types at runtime. Code to
15859 handle ReflectedType/DeclaringType. Make reflection handles
15862 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
15864 * class.c: set correct name in arrays.
15866 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
15868 * appdomain.c (mono_domain_transfer_object): make it work with
15869 valuetypes. bug fixes.
15871 2002-08-12 Dick Porter <dick@ximian.com>
15873 * object.h: Rename some parameters to avoid c++ keywords (Patch
15874 from Joseph Wenninger <kde@jowenn.at>)
15876 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
15878 * icall.c: added icall to implement Assembly.GetFile*.
15880 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15882 * reflection.h, reflection.c: code to embed managed resources.
15884 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15886 * class.c: move all the type size stuff into
15887 class_compute_field_layout().
15889 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15891 * class.c: ensure enums have always the correct instance size.
15892 * unicode.c: remove wrong assert.
15894 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15896 * assembly.c: fix mem corruption issue.
15897 * image.h, image.c: added mono_image_get_resource () to access
15899 * icall.c: implemented Assembly.EntryPoint property and some
15900 Managed Resources related internalcalls.
15903 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15905 * image.c, image.h: impemented mono_image_get_entry_point ().
15906 * appdomain.c: use mono_image_get_entry_point.
15908 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15910 * reflection.c: support the object type argument when loading
15913 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
15915 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
15916 String as return type.
15918 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
15920 * reflection.c: fix encoding of named args for custom attrs to match
15921 the ms implementation. Read them back when instantiating custom
15924 2002-08-02 Radek Doulik <rodo@ximian.com>
15926 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
15927 by Dietmar as quick fix
15928 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
15929 16 as stack size, used on more places as quick fix before Dietmar
15930 will fix it properly
15932 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15934 * object.h, object.c: added accessors for fields and properties.
15936 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15938 * class.c, class.h: made mono_class_get_field_from_name ()
15939 loop on parent types.
15940 Added mono_class_get_property_from_name ().
15942 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15944 * class.c, class.h: move the code to setup the type vtable in its own
15945 function so that it can be reused also for types created at runtime.
15946 Eliminate the "class" identifier from the header file.
15947 * reflection.c: setup the vtable for enums so that we can create
15948 objects for use in SetConstant ().
15950 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
15952 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
15953 instead of the delegate itself as this pointer (bug #28383)
15955 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
15957 * marshal.c (mono_marshal_get_managed_wrapper): added return type
15960 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15962 * loader.c: don't set the pinvoke bit on icalls.
15964 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
15966 * debug-helpers.c (mono_method_full_name): only print a number to
15967 indicate wrapper type (so that the output is more readable in traces).
15969 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
15971 * class.c (mono_class_init): include method override patch from Paolo
15973 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
15975 * icall.c: fixed GetTypeCode().
15977 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
15979 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
15980 use real delegate invoke function to make it work with multicast
15981 delegates (fix bug# 28291).
15983 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15985 * object.c: load constant strings.
15987 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15989 * reflection.c: no magic numbers.
15990 * tabledefs.h: security action enum.
15992 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15994 * assembly.c: fix possible memory corruption.
15996 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15998 * reflection.h, reflection.c: added support for linking resources.
15999 * verify.c: check we have an updated corlib.
16001 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
16003 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
16005 (mono_marshal_string_array): null terminate unmanaged string arrays.
16006 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
16008 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16010 * icall.c: Type.GetType () can now return also types from the
16013 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16015 * loader.h, loader.c: stack walking support.
16016 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
16017 GetCallingAssembly.
16019 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
16021 * marshal.c: added optimisations for blittable types
16023 * class.c (mono_array_class_get): do not set blittable attribute on arrays
16024 (mono_class_setup_mono_type): set blittable attribute for single
16027 * marshal.c (mono_string_utf8_to_builder): impl.
16028 (mono_string_builder_to_utf8): impl.
16029 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
16031 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
16033 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
16034 (mono_marshal_get_managed_wrapper): impl. byref types
16036 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16039 (search_method): don't display debug message.
16041 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
16043 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
16045 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16047 * appdomain.c: set the missing filename when throwing exception.
16049 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
16051 * metadata.c (mono_type_size): code cleanup
16052 (mono_type_stack_size): removed some test code
16054 2002-07-21 Miguel de Icaza <miguel@ximian.com>
16056 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
16057 mono_get_exception_file_not_found now.
16059 * exception.c (mono_exception_from_name_two_strings): New version
16060 that will call a constructor with two string arguments.
16061 (mono_get_exception_file_not_found): New helper routine, used to
16062 report file-not-found errors.
16064 2002-07-20 Dick Porter <dick@ximian.com>
16067 * process.c: Pass file handles to CreateProcess
16071 * file-io.c: Implemented CreatePipe
16073 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
16075 * metadata.c (mono_get_param_info): set alignment for value types
16077 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16079 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
16080 Constify mono_domain_assembly_open().
16081 * loader.c: handle null namespace in icalls.
16083 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
16085 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
16086 (emit_str_to_ptr_conv): marshal object as structs
16088 * metadata.c (mono_type_to_unmanaged): marshal object as structs
16090 * marshal.c (mono_marshal_get_runtime_invoke): support value types
16092 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
16094 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
16095 (mono_marshal_get_native_wrapper): we an now return value types
16097 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16099 * verify.c: more checks implemented.
16101 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
16103 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
16105 (mono_marshal_get_native_wrapper): allow byref arguments
16106 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
16107 impl. PtrToStringXXX methods
16108 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
16109 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
16110 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
16111 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
16112 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
16114 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16116 * reflection.c: fix buglet in parsing an assembly name.
16118 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
16120 * marshal.c (emit_ptr_to_str_conv): first impl.
16122 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16124 * object.c, class.h: cache the vtable in the class as suggested by
16125 vargaz@freemail.hu (Zoltan Varga).
16127 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16129 * class.h, loader.c: added mono_field_from_token().
16130 * verify.c: first cut of type checking code.
16132 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
16134 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
16136 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
16138 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
16140 (mono_marshal_get_remoting_invoke): impl.
16141 (mono_delegate_begin_invoke): impl.
16142 (mono_mb_emit_save_args): impl.
16143 (mono_delegate_end_invoke): impl.
16144 (mono_marshal_get_delegate_begin_invoke):
16145 (mono_marshal_get_delegate_end_invoke):
16146 (mono_marshal_get_delegate_invoke): generate a special name for
16147 those methods (including the signature) and associate them whith
16148 the delegate class.
16150 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
16153 (mono_reflection_type_from_name): now it has a MonoImage parameter
16154 which is used as the default image to search the type in. If the image
16155 is NULL or getting the type from it fails, it defaults to corlib.
16157 * icall.c: changed 1 call to mono_reflection_type_from_name to match
16160 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16162 * reflection.c: update the parameter table index.
16164 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16166 * domain.c: don't include the mark byte in the string hash.
16168 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16170 * icall.cs: icall for Type.GetTypeCode ().
16171 * verify: a couple of fixes and disabled local initialization checks.
16173 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
16175 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
16177 * debug-helpers.c (mono_method_full_name): print the type of the
16180 * metadata.c (mono_signature_hash): a hash function for signatures
16181 (mono_signature_hash): better hash algorithm
16183 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
16185 * debug-helpers.c (mono_method_full_name): this can now generate
16186 method names with signatures
16188 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
16189 method dont have this pointers.
16191 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16193 * reflection.c: fixup typebuilder tokens.
16194 * image.c: fix buglet.
16195 * marshal.h: remove whitespace.
16196 * metadata.h, metadata.c: reinstate code that was removed.
16197 * verify.c: handle catch directives and fix another couple of bugs.
16199 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
16201 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
16202 (mono_marshal_get_native_wrapper): make it comp. with the old code
16203 (mono_marshal_get_native_wrapper): support boolean
16204 (mono_marshal_get_managed_wrapper): support more types
16206 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
16208 * class.c (class_compute_field_layout): compute class->blittable attribute.
16210 2002-07-09 Dick Porter <dick@ximian.com>
16212 * threads.c: Make the thread cleaning up cope with threads that
16215 2002-07-08 Radek Doulik <rodo@ximian.com>
16217 * reflection.c (method_encode_code): use non-translated values to
16218 compute finally_start, this fixes exception handling on ppc, yay!
16220 * decimal.h (struct signscale): fix endianess
16222 2002-07-07 Radek Doulik <rodo@ximian.com>
16224 * reflection.c: swap box_val and not val
16226 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16228 * reflection.c, reflection.h: handle full assembly info in type name.
16229 Handle Type arguments when loading custom attributes.
16230 * icall.c: updated to use new mono_reflection_type_from_name () method.
16232 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16235 (method_from_memberref): also print assembly name when method not found.
16237 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16240 (ves_icall_TypeGetProperties): fixed bug #27473.
16242 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16244 * reflection.c: display image name and token when cannot find the
16245 .ctor for an attribute.
16247 2002-07-05 Martin Baulig <martin@gnome.org>
16249 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16251 2002-07-04 Dick Porter <dick@ximian.com>
16253 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
16254 compile on mingw. This will cause mingw builds to not wait for
16255 subthreads to terminate after the main thread does. I've lodged a
16256 bug with the mingw developers for them to wrap OpenThread().
16258 2002-07-03 Dick Porter <dick@ximian.com>
16260 * threads.c: Store thread IDs instead of handles, because
16261 GetCurrentThread() returns a pseudohandle and therefore stores
16262 useless values. mono_thread_cleanup() continues checking the
16263 array of threads until it is empty, to cope with subthreads
16264 spawning new threads after the main thread has finished.
16268 * profiler-private.h: Pass the thread ID to thread profiler
16269 functions, instead of a handle
16271 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16273 * verify.c: fixes to make it more usable.
16274 * pedump.c: added --verify code to verify IL code in an assembly.
16276 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16278 * reflection.c: turn errors into warnings to allow compiling corlib.
16280 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16282 * reflection.c: add special cases to compile corlib.
16284 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16286 * reflection.c: handle properties with only a set method.
16288 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16290 * opcodes.h: add enum with opcodes in opval order.
16292 2002-07-01 Dick Porter <dick@ximian.com>
16295 * object.c (mono_runtime_run_main): Removed unneeded argument
16297 2002-06-28 Martin Baulig <martin@gnome.org>
16299 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16301 2002-06-27 Dick Porter <dick@ximian.com>
16303 * threads.c: Store the handle in both the parent thread and in the
16304 subthread, to minimise the time between starting a new thread and
16307 2002-06-26 Dick Porter <dick@ximian.com>
16309 * appdomain.c (mono_runtime_cleanup): Close the socket library
16310 after all the threads have finished, not before
16312 2002-06-26 Martin Baulig <martin@gnome.org>
16314 * debug-symfile.c (mono_debug_find_source_location): Added
16315 `guint32 *line_number' argument. If it's not NULL, store the line number
16316 there and return the file name without the line number.
16318 2002-06-25 Dick Porter <dick@ximian.com>
16322 * process.c: Process forking and other support functions
16324 2002-06-25 Dick Porter <dick@ximian.com>
16326 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
16327 things dont happen when the image is closed.
16328 (mono_image_lookup_resource): Walk the resource section looking
16329 for a particular entry
16331 * cil-coff.h: PE resource section decoding
16333 2002-06-25 Dick Porter <dick@ximian.com>
16337 (mono_assembly_foreach): Accessor functions to walk the list of
16339 (mono_assembly_set_main):
16340 (mono_assembly_get_main): Process methods need to know which
16341 assembly is the "main" one
16343 * object.c (mono_runtime_run_main): Record the main assembly
16345 * debug-helpers.c: Fix typo
16347 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
16349 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
16350 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
16352 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16354 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
16356 2002-06-21 Miguel de Icaza <miguel@ximian.com>
16358 * image.c (do_mono_image_open): Initialize reference count,
16359 otherwise we leak the MonoImage.
16361 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16363 * reflection.c: small tweak to handle self-hosting.
16365 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16367 * reflection.c: fix type name parse code.
16369 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16371 * reflection.c: break out of the loop.
16372 * image.c: special case corlib.
16374 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16376 * reflection.c: add all the custom attrs at the end to ensure the
16377 ctors have been properly initialized when the attributes are defined
16378 in the current assembly.
16380 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16382 * reflection.c: handle correctly multiple-nested types.
16384 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16386 * row-indexes.h: fix typos.
16387 * reflection.c: adjust for typos and fix method_def_or_ref
16388 encoding in MethodImpl table.
16390 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16392 * reflection.c: fix entry point patching (thanks Serge!).
16394 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
16396 * verify.c: add check for System.Exception
16398 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16400 * image.c, class.c: minifix for code just c&p'ed.
16401 * reflection.c: warning fix.
16402 * object.h, loader.h, domain.c: load also StringBuilder.
16404 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16406 * marshal.h, marshal.c: some support code to handle complex marshaling.
16408 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16410 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
16411 Better signatures with vtable error dump.
16413 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
16415 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
16417 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
16419 * icall.c (ves_icall_Type_GetField): impl.
16421 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16423 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
16424 to retrieve a marshal description blob for a field or param.
16426 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16428 * reflection.h, reflection.c: change order of nested type emission
16429 to avoid table corruption. The NestedTypes table is sorted.
16430 * icall.c: change order of GetConstructor results to workaround mcs bug.
16432 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16434 * reflection.h, reflection.c: handle field and param marshal
16437 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16439 * icall.c, marshal.c marshal.h: more Marshal class implementation.
16441 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16443 * reflection.c: fix call convention.
16445 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16447 * reflection.h, reflection.c: mono_image_get_memberref_token()
16448 takes a type instead of a class, now. Added
16449 mono_image_get_array_token() to create tokens for the special
16450 multi-dim array methods.
16452 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16454 * assembly.c: handle modules (no assembly table). Split
16455 loading references in its own function.
16456 * class.c: handle moduleref resolution scope.
16457 * image.c, image.h: cache module name in image.
16459 2002-06-07 Martin Baulig <martin@gnome.org>
16461 * reflection.c (mono_image_get_type_info): Only add a class layout entry
16462 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
16464 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16466 * icall.c: more signature fixes that used uint instead of int.
16468 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16470 * reflection.c: fixed signature of field refs.
16472 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16474 * class.c, reflection.c: handle typerefs of nested types
16475 (both on read and when writing files).
16477 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16479 * icall.c: fix method signatures that tried to workaround the previous
16482 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16484 * debug-helpers.c: fix typo.
16486 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16488 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
16489 rewrote the PE/COFF writing code (our programs are understood by the
16492 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16494 * gc.c, gc.h, icall.c: weakreference support.
16496 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16498 * Makefile.am, mono-config.c: use $(sysconfdir).
16500 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16502 * icall.c: changed default precision of Double.ToString() to 15.
16503 Fixed memory leak. Unified with Single.ToString.
16505 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16507 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
16509 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16511 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
16512 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
16513 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
16516 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16518 * debug-symfile.c, sysmath.c: yet more compilation fixes.
16520 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16522 * reflection.c, socket-io.c: more compilation fixes.
16524 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16526 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
16527 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
16528 unicode.c: warning and compiler compatibility fixes.
16530 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16532 * class.h, metadata.c: fixed warnings/compilation errors.
16534 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16536 * Makefile.am, mono-config.c, mono-config.h: configuration file
16538 * loader.c, loader.h: make Dll mapping configurable at runtime in the
16539 config file. Export methods to insert and lookup mappings.
16541 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16543 * reflection.c: handle types and boxed objects in custom attr
16546 2002-05-30 Martin Baulig <martin@gnome.org>
16549 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
16551 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
16553 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
16554 to lookup the implmap row for a P/Invoke method.
16555 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
16556 P/Invoke method from the runtime on an as needed basis.
16558 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
16560 * metadata.c (mono_metadata_parse_signature): impl.
16562 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16564 * class.c: handle .pack directive.
16566 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16568 * object.c: initialize static fields with RVA data.
16570 2002-05-25 Martin Baulig <martin@gnome.org>
16573 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
16575 2002-05-24 Martin Baulig <martin@gnome.org>
16578 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
16579 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
16580 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
16582 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16584 * object.c: special case string ctros in invoke.
16585 * gc.c: silly whitespace changes.
16587 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
16589 * threadpool.[ch]: impl. a threadpool that can
16590 be used by mint and mono.
16592 2002-05-22 Martin Baulig <martin@gnome.org>
16594 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
16595 The first argument is now a `MonoReflectionModuleBuilder *', the return
16596 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
16597 `methods' field to get the method builder. The `token' argument is the
16600 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
16601 invalid characters instead of g_assert_not_reached()ing. This seems
16602 to be the behaviour of mscorlib.
16604 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
16606 * object.c (mono_runtime_invoke_array): applied patch from Rachel
16607 Hestilow to fix bug #25104
16609 2002-05-21 Martin Baulig <martin@gnome.org>
16611 * debug-symfile.c (mono_debug_find_source_location): New function.
16612 Looks up an IL offset in the line number table and returns the source
16613 location as a string.
16615 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16618 (mono_double_ToStringImpl): changed %f by %g until we have something
16621 2002-05-21 Nick Drochak <ndrochak@gol.com>
16623 * icall.c : Use different name for Math.Pow's icall. Needed to check
16624 parameters first in C#.
16626 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16628 * icall.c, reflection.h: added icall to get info about an event.
16630 2002-05-20 Radek Doulik <rodo@ximian.com>
16632 * object.c (mono_value_box): don't use memcpy for boxing on BIG
16634 (mono_value_box): don't use memcpy for small sizes on
16635 architectures with unaligned access
16637 2002-05-20 Martin Baulig <martin@gnome.org>
16639 * reflection.c (mono_reflection_setup_internal_class): Don't crash
16640 if `tb->parent == NULL'.
16641 (mono_reflection_create_internal_class): New function. This is
16642 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
16645 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
16648 2002-05-19 Martin Baulig <martin@gnome.org>
16650 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
16651 argument to get the length, don't default to the array length.
16653 2002-05-18 Miguel de Icaza <miguel@ximian.com>
16655 * assembly.c (mono_assembly_setrootdir): New function used to
16656 override the MONO_ASSEMBLIES directory.
16658 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16660 * icall.c: ValueType_GetHashCode() initialize local var.
16662 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16664 * reflection.c: sort custom attributes table.
16666 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16668 * reflection.c: support named args in custom attributes (write support).
16670 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16672 * reflection.c: fix finally position calculation.
16674 2002-05-15 Radek Doulik <rodo@ximian.com>
16676 * reflection.c: fixed endianess at many places
16678 * icall.c (ves_icall_InitializeArray): comment out debug msg
16680 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
16682 * object.c (mono_unhandled_exception): new function to handle
16683 unhandled exceptions.
16684 (mono_unhandled_exception): call the UnhandledException event.
16685 (mono_runtime_delegate_invoke): impl.
16687 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
16689 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
16690 returns the RVA, not the direct pointer to the data. Handle the case
16691 when the class size is fixed.
16693 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16695 * reflection.c: fix some endianess issues.
16697 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
16699 * object.c (mono_runtime_invoke): is now able to catch exceptions.
16701 * threads.c (mono_thread_init): added a callback which is invoked
16704 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
16706 * icall.c: make GetHashCode return non-negative values.
16708 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
16710 * object.c, icall.c, gc.c: revert to address-based hashcode.
16712 2002-05-13 Miguel de Icaza <miguel@ximian.com>
16714 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
16716 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16718 * icall.c, class.c: special case <Module>.
16720 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
16722 * icall.c: fix bug in GetNow().
16724 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
16726 * object.c (mono_runtime_class_init): make sure that we call all
16727 static class constructors.
16729 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16731 * reflection.c: sort methodsemantics table.
16733 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16735 * reflection.h, reflection.c: honour init locals setting.
16737 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
16739 * icall.c: copied Double ToStringImpl for Single ToStringImpl
16741 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16743 * reflection.c: support ContructorBuilders in attribute blob creation.
16745 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16747 * reflection.c: some changes to build a binary that can be run
16748 directly in windows.
16750 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
16752 * loader.c: print a big message when an icall can't be found.
16754 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16756 * string-icalls.c: fix bug 24248.
16758 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16760 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
16761 icall.c, reflection.h: separate assembly loading by pathname and by
16762 assembly name. Use the MONO_PATH env var to search for assemblies.
16764 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16766 * assembly.c, image.h: add some support for assemblies
16767 with multiple modules.
16768 * class.c, class.h: export mono_class_from_typeref().
16769 * loader.c: remove duplicated code and use mono_class_from_typeref(),
16772 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16774 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
16775 documentation says (the ECMA one is correct).
16777 2002-05-02 Dick Porter <dick@ximian.com>
16779 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
16780 Don't name the synchronisation mutex.
16782 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
16785 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
16786 Make the prototypes match.
16787 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
16791 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
16792 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
16793 all systems have tm.tm_zone, so use strftime() with %Z to print
16794 the timezone abreviation into a temp string.
16796 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
16797 rather than mono_array_addr() on a MonoString on Big Endian
16800 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
16802 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
16805 2002-04-30 Dick Porter <dick@ximian.com>
16807 * socket-io.c: Cope with SOCKET being an integer rather than a
16810 * threads.c: Added Thread_free_internal, to deal with thread
16811 handle cleanup. Moved calls to handle_store() and handle_remove()
16812 to start_wrapper(), so each can only be called once. Allocate
16813 synchronisation blocks with GC_malloc(), and use GC finalisation
16814 to close the handles.
16816 * icall.c: added System.Threading.Thread::Thread_free_internal
16818 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16820 * icall.c: support Environment.Exit, CommandLineArgs().
16822 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16824 * object.c, object.h: added mono_runtime_run_main () and
16825 mono_runtime_get_main_args () for use in System.Environment.
16827 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16829 * gc.c: fix thinko, enable actual finalization since the jit is now
16832 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16834 * gc.c, object.c: take into account that an object may be offset wrt the address
16835 returned by GC_malloc().
16837 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
16839 * image.c: handle files without entries in the assembly table (modules).
16841 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
16843 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
16844 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
16845 allowed to be null when it's System.Object class setup.
16847 2002-04-27 Martin Baulig <martin@gnome.org>
16849 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
16850 if `tb->parent == NULL' rather than crashing.
16852 2002-04-28 Nick Drochak <ndrochak@gol.com>
16854 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
16855 calling acos() where asin() should have been called.
16857 2002-04-26 Martin Baulig <martin@gnome.org>
16859 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
16860 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
16861 there's a subdirectory called `System', but we don't want to read that
16862 subdirectory as an assembly.
16864 2002-04-25 Martin Baulig <martin@gnome.org>
16866 * debug-symfile.c: Reflect latest MonoString changes.
16868 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16870 * rand.c, rand.h: instance method icalls need to have an explicit
16871 this pointer as first argument in the C implementation.
16873 2002-04-25 Nick Drochak <ndrochak@gol.com>
16875 * icall.c: Fix typo in map for GetNonZeroBytes
16877 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
16879 * string-icalls.c : String does now passes unit tests without any
16880 errors, the following changes has been made:
16882 Implemented replace methods.
16883 Renaming of methods to (try) follow the standard.
16884 Fixed compare ordinal
16885 Made all memory allocated directly to function instead of via icall function.
16886 Small performance fix in is_in_array function
16888 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
16890 c (mono_string_Internal_ctor_charp_int_int):
16891 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
16892 sindex < 0, throw ArgumentOutOfRangeException instead of
16893 ArgumentNullException.
16895 Added new check for length == 0, however
16896 I need to make it return String.Empty from the C code.
16898 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
16899 that calculate the length for us here.
16901 (mono_string_Internal_ctor_sbytep_int_int): Replaced
16902 mono_string_new_utf16 with mono_string_new, since value is utf8.
16904 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16906 * object.c: register the object for finalization if needed.
16907 Allocate one more char in the string for the terminating 0 char.
16909 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16911 * class.c, class.h, image.c: check if a type implemenst a destructor.
16912 Use the proper key for array class lookups.
16913 * icall.c: register the icalls in the System.GC class.
16914 * gc.c, gc.h: GC-related functions and icalls.
16916 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16920 * unicode.c: free some strings gotten from mono_string_to_utf8 and
16921 changed a couple of free () by g_free ().
16923 * decimal.c: one-liner in the comments for decimal2string ().
16925 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
16927 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
16929 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
16931 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
16932 * object.c (mono_runtime_invoke_array) : handle null in params
16934 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
16936 * string-icalls.c: fixed bug in split (one off bug)
16938 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
16940 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
16941 * icalls.c: added String::Equals as internal method
16943 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
16945 * threads.c: fixed bug in the double interlocked functions
16947 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
16949 * threads.c: implemented all of the new interlocked icalls.
16950 * string-icalls.c: fix a bug in insert.
16951 * icalls.c: added the icalls for interlocked, removed old string functions.
16953 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16955 * loader.c: fix off-by-one error when reading argument names.
16957 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16959 * profiler.c: win32 counter implementation (untested).
16960 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
16961 (the latter needs testing and more complete impl. from win32 folks).
16963 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
16965 * object.c: mono_array_new_full workaround mono_array_class_get
16968 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
16970 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
16971 * object.h (mono_string_chars): Changed casting type.
16973 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
16975 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
16976 method signatures to use gunichar2 instead of gint16.
16978 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
16980 * object.h, object.c: domain-specific versions of mono_object_new and
16983 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
16985 * object.c: changed String layout
16987 * string-icalls.c (mono_string_Internal_ctor_chara): added
16988 internal string constructors.
16990 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
16992 * threads.c: pass 'this' to the thread start routine.
16994 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16996 * string-icalls.c: fix IndexOf and LastIndexOf. Now
16997 InternalCompareStr don't call twice mono_string_cmp_char for the last
16998 character. Improved performance in mono_string_cmp_char.
17000 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17002 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
17003 code into its own library: libmonoruntime.
17005 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
17007 * object.h, object.c: changed array format so that szarrays do not
17008 require a bounds structure.
17009 * icall.c, appdomain.c: support for new szarray format.
17011 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17013 * metadata.c: compare also the retuns type when comparing signatures:
17014 we didn't do this as an optimization since really overloaded methods
17015 must differ also in the arguments, but this doesn't work with
17016 low-level IL code (or when using explicit conversion operators: see
17017 bug#23498 for an example).
17019 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17021 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
17023 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17025 * icall.c: make MonoType::GetElementType its own icall.
17027 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17029 * icall.c: remove MonoMethod_get_Name().
17030 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
17033 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17035 * string-icalls.c: optimized a few methods.
17037 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17039 * icall.c: added all new string internal calls
17040 * string-icalls.c: added, new string internal call implementation.
17041 * object.c: added mono_string_new_size for allocating a string a size
17043 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
17045 * object.c (mono_object_isinst): use the same code as in the
17046 optimized x86 version.
17048 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17050 * profiler.c: TSC-based timer code (faster and more accurate).
17051 Not hooked up in configure, yet (set USE_X86TSC to 1).
17053 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
17055 * profiler.c, profiler.h: track time spent compiling methods.
17056 * threads.c: track thread creation/destruction.
17058 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
17060 * profiler.c, profiler.h, profiler-private.h: profiling interface
17061 and sample implementation. Moved here so that it can be used also by
17064 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
17066 * reflection.c, reflection.h: keep types and other handles separate in
17067 the hash tables for referred tokens. Add guid for modules.
17069 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17071 * assembly.c: fix bugs found with valgrind.
17072 * metadata.h, metadata.c: added mono_metadata_guid_heap().
17074 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
17076 * threads: added icall support for getting current domain for
17079 2002-04-13 Martin Baulig <martin@gnome.org>
17081 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
17082 (MonoDebugVarInfo): Added `index' field for register based addresses.
17083 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
17084 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
17085 `MonoDebugVarInfo *params' and `guint32 this_offset' with
17086 `MonoDebugVarInfo *this_var'.
17088 * debug-symfile.c (relocate_variable): New static function to write
17089 a location description for a local variable or method parameter.
17091 2002-04-12 Martin Baulig <martin@gnome.org>
17093 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
17094 stack offset and begin/end scope address of a local variable.
17095 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
17096 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
17097 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
17099 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
17100 Added new relocation types for start/end scope of a local variable.
17102 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17104 * object.h: add mono_object_domain() macro.
17105 * reflection.c: handle typespecs.
17106 * icall.c: MonoMethod::get_Name() implementation.
17108 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17110 * icall.c: String::GetHashCode() icall implementation.
17112 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17114 * icall.c: String::IndexOfAny icall.
17115 * object.c, object.h: make array->max_length more useful.
17116 Intrduced mono_object_class() and mono_string_length() macros.
17118 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17120 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
17121 instead of g_unichar_isdigit.
17123 2002-04-11 Nick Drochak <ndrochak@gol.com>
17125 * icall.c: Implement a simple Double.ToString().
17127 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17129 * appdomain.h: only io-layer.h is supposed to be included.
17130 * icall.c: explicitly import environ. Fix warning.
17132 2002-04-10 Nick Drochak <ndrochak@gol.com>
17134 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
17135 return true even if it's not Daylight Savings time.
17136 Only return false for the case where the function isn't
17137 implemented for a plaform (read Windows).
17139 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17141 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
17144 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
17146 * mempool.c (mono_mempool_alloc): only use g_malloc when
17147 absolutely necessary.
17149 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
17151 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
17153 * class.c (mono_class_vtable): use domain mempool to allocate vtable
17154 (mono_class_proxy_vtable): use domain mempool
17156 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17158 * appdomain.h, appdomain.c: split initialization that requires the
17159 execution engine support into mono_runtime_init().
17161 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
17163 * class.c (mono_class_init): don't include vtable inside MonoClass
17164 to save some memory, gather some statistics.
17165 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
17167 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17169 * icall.c: internalcall implementation for ValueType.Equals().
17171 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
17173 * object.c (mono_message_init): moved
17174 (mono_runtime_exec_main): new arch. independent impl.
17175 (mono_runtime_invoke_array): new method - like
17176 mono_runtime_invoke, but you can pass an array of objects.
17177 (mono_remoting_invoke): new arch. independent impl.
17178 (mono_message_invoke): new arch. independent impl.
17179 (mono_runtime_class_init): new arch. independent impl.
17180 (mono_runtime_object_init): new arch. independent impl.
17182 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17184 * metadata.c, object.c, reflection.c: documented the exported
17187 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17189 * icall.c: simpler code to pass the assembly builder data to corlib.
17190 Implement GetNestedTypes() internalcall.
17192 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17194 * class.c: warn if a type can't be loaded.
17196 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
17198 * image.h: typedef MonoImageOpenStatus
17199 * types.h: removed unused file
17201 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
17203 * icall.c: Enum_ToObject accepts enum value arguments.
17205 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17207 * class.c: move initialization of properties, events and nested
17208 classes, so that they happen for interfaces, too.
17210 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17212 * icall.c: cleanup some ugly casts in Array_SetValue*.
17214 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17216 * icall.c: the values array fro enums is of the correct type, now.
17217 Implement (correctly) getFullName instead of assQualifiedName for
17219 * reflection.h, reflection.c: added mono_type_get_name ().
17221 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17223 * assembly.c, image.h: for each MonoImage, record from wich assembly
17225 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
17226 Make Type.Assembly work.
17228 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
17230 * debug-symfile.h: use char* instead of gpointer to avoid
17233 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
17235 * icall.c (ves_icall_InternalExecute): impl. FielSetter
17236 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
17238 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
17240 * icall.c (mono_message_init): impl. (code cleanup)
17241 (ves_icall_InternalExecute): impl. FieldGetter
17243 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
17244 defined we call all (non-static)methods through the vtable.
17246 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
17248 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
17249 finalizer even though the memory is still referenced (and the chunk of
17250 memory is not freed).
17252 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17254 * assembly.c: fix brokeness.
17256 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
17258 * class.c: kill some warnings. Check explicit interface method
17259 implementation also without considering the namespace.
17260 Load also literal strings in static class data.
17262 2002-03-29 Miguel de Icaza <miguel@ximian.com>
17264 * assembly.c (default_assembly_name_resolver): Kill memory leak.
17265 (default_assembly_name_resolver): Make the resolver take the
17266 "base" directory where the assembly was originally defined, so we
17267 can load DLLs that are in the same directory as the assembly that
17268 is being referenced.
17270 2002-03-28 Dick Porter <dick@ximian.com>
17276 * unicode.c: Warning cleanups
17278 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
17280 * object.h, reflection.h: use the correct type instead of MonoObject.
17282 2002-03-28 Martin Baulig <martin@gnome.org>
17284 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
17285 (mono_debug_update_symbol_file): Initialize classes if necessary.
17287 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17289 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
17290 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
17292 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
17294 * assembly.h: fix function prototype.
17295 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
17296 * mono-endian.h: use const cast.
17298 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
17300 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
17302 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17304 * loader.c: don't assert when a typeref can't be loaded, give
17305 a chance to the runtime to trow an exception instead.
17306 * loader.h: fix warning.
17308 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
17310 * class.c (mono_class_proxy_vtable): added proxy support
17312 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
17314 * icall.c: removed last of PAL calls, added System.Environment
17315 * file-io.h, file-io.c: MonoIO implementation
17316 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
17318 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17320 * appdomain.c: do not use the byte marker in ldstr table lookup.
17321 * debug-helpers.c: allow two ':' to separate class and method name.
17322 * object.c: allocate arrays bounds with the GC, too.
17323 * verify: add a few more checks.
17325 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
17327 * reflection.c: output also literal strings. Allocate parameter data
17328 with GC_malloc() (thanks, Martin, for catching this!).
17330 2002-03-26 Martin Baulig <martin@gnome.org>
17332 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
17333 include the `this' offset in the `param_offsets'.
17335 2002-03-25 Martin Baulig <martin@gnome.org>
17337 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
17338 mono_debug_get_class() function to get the classes. Added new
17339 relocation types for arrays and strings.
17340 (mono_debug_get_class): New static function to search in all
17341 referenced assemblies for a metadata token.
17343 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
17345 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17347 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
17348 hold gc-allocated objects. Make the string heap a stream like the
17349 others. Removed duplicated code when writing stream info.
17350 Added asserts to catch possible buffer overflows. Set the sorted map
17351 for tables that need sorting. Added some documentation.
17353 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
17355 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
17356 for interned strings and vtables.
17358 2002-03-24 Martin Baulig <martin@gnome.org>
17360 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
17361 it in the array since it was created with g_slist_prepend().
17363 2002-03-24 Martin Baulig <martin@gnome.org>
17365 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
17366 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
17367 (mono_debug_method_from_token): Renamed to
17368 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
17369 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
17371 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
17374 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
17376 2002-03-24 Martin Baulig <martin@gnome.org>
17378 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
17379 (mono_debug_method_from_token): New func.
17381 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
17382 New interncall, calls mono_debug_local_type_from_signature().
17383 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
17384 calls mono_debug_method_from_token().
17386 2002-03-23 Martin Baulig <martin@gnome.org>
17388 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
17389 specifies the number of bytes to be converted, not the array size.
17390 Return the number of chars, not the number of bytes.
17391 (ves_icall_iconv_get_chars): The `byteCount' argument
17392 specifies the number of bytes to be converted, not the array size.
17394 2002-03-23 Martin Baulig <martin@gnome.org>
17396 * reflection.h (MonoReflectionSigHelper): New type.
17398 * reflection.c (mono_reflection_sighelper_get_signature_local),
17399 (mono_reflection_sighelper_get_signature_local): New functions.
17401 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
17402 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
17405 2002-03-23 Martin Baulig <martin@gnome.org>
17407 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
17408 is_writeable is set.
17409 (mono_raw_buffer_update): New function to write the modified map
17412 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
17414 * debug-symfile.c (mono_debug_update_symbol_file): Call
17415 mono_raw_buffer_update() when done writing.
17417 2002-03-23 Martin Baulig <martin@gnome.org>
17419 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
17421 * debug-symfile.c: Added support for arguments and local variables.
17423 2002-03-23 Dick Porter <dick@ximian.com>
17425 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
17426 protected by ifdefs, hence breaking the w32 build.
17428 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17430 * object.c: implement is_interned() the right way.
17432 2002-03-21 Martin Baulig <martin@gnome.org>
17434 * debug-symfile.[ch]: New files to handle debugging information
17435 files. There's also support to dynamically update these symbol
17436 files to include machine dependent information.
17438 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
17440 * threads.c (mono_thread_create): new function to create thread
17443 2002-03-20 Martin Baulig <martin@gnome.org>
17445 * icall.c (ves_icall_InternalInvoke): Create a new object if the
17446 method is a constructor.
17447 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
17448 points to ves_icall_InternalInvoke().
17450 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
17452 * file-io.c: Flush shouldn't throw exceptions.
17454 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
17456 * file-io.c: FileStream flush support; FileSetLength now
17457 restores file pointer.
17459 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17461 * class.c: set image for pointer classes.
17463 2002/03/19 Nick Drochak <ndrochak@gol.com>
17465 * sysmath.c: Forgot one.
17467 2002-03-18 Miguel de Icaza <miguel@ximian.com>
17469 * sysmath.c: Avoid redefining existing names.
17471 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
17473 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
17474 handled by runtime as icall rather than dllimport from libm.so
17475 * file-io.c, file-io.h: fixed handle argument type.
17477 2002-03-18 Dick Porter <dick@ximian.com>
17479 * reflection.c (mono_image_get_type_info): rename interface to
17480 iface, because of "#define interface struct" on windows.
17482 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
17484 * class.c, class.h: rename and export mono_ptr_class_get().
17485 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
17486 * reflection.c, reflection.h, icall.c: better/saner type name
17487 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
17490 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
17492 * class.c (mono_class_init): removed hardcoded GHC_SLOT
17494 * icall.c (ves_icall_InternalInvoke): impl.
17496 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17498 * reflection.c: output the interface map table, too.
17500 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
17502 * class.c (class_compute_field_layout): separate computation of
17503 static field layout
17505 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
17507 * icall.c: added System.Buffer support.
17508 * file-io.c: moved file icalls from PAL to FileStream.
17510 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
17512 * icall.c (ves_icall_System_Object_GetHashCode): impl.
17514 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
17516 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
17518 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17520 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
17522 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
17524 * debug-helpers.{c,h}: moved here from monograph some useful functions
17525 to locate a method by name/signature in a class or image. Included
17526 also a small and flexible IL disassembler.
17528 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17530 * reflection.c: fixup tokens in methods with small header size, too.
17532 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
17534 * object.c (mono_string_to_utf8): remove assert(!error), instead
17537 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
17539 * icall.c: update to the new mono_Array_class_get interface.
17541 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
17543 * appdomain.c, object.c: Boehm-GC enable.
17544 * icall.c: make get_data_chunk() support split data requests.
17545 Ensure a class is initialized in more cases. Return only the first
17546 property found in GetProperties() or the compiler gets confused.
17547 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
17548 * reflection.h, reflection.c: add fixup mechanism for field and method
17549 tokens. Initialize assembly->typeref in a single place. Output
17550 properties after events. Support custom attributes for events, too.
17551 Typo fix for paramter custom attrs.
17553 2002-03-07 Martin Baulig <martin@gnome.org>
17555 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
17557 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
17559 * class.c (mono_array_class_get): fix. for multi. dim. arrays
17561 2002-03-06 Martin Baulig <martin@gnome.org>
17563 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
17564 non-zero lower bounds. See testcases #F10-#F13.
17566 2002-03-05 Martin Baulig <martin@gnome.org>
17568 * exception.c (mono_get_exception_argument_out_of_range): New exception.
17570 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
17571 ves_icall_System_Array_GetValue(), only calculate the absolute array position
17573 (ves_icall_System_Array_SetValue): Likewise.
17574 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
17575 as argument and does the actual work. This function is used when copying a
17576 multi-dimensional array.
17577 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
17578 now do all the widening conversions of value types.
17579 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
17581 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17583 * class.c: remove some magic numbers and use the smbolic names,
17584 instead. Added init_events() to load event info at class init time.
17585 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
17586 and mono_metadata_methods_from_event().
17587 * reflection.h, reflection.c: added support for writing out the evnets
17588 related information.
17590 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17592 * reflection.h, icall.c: use a different method (GetInterfaces)
17593 to gather interface info and add isbyref, isprimitive and
17594 ispointer to the ves_icall_get_type_info() return value.
17596 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
17598 * class.h: stared adding support for events.
17599 * icall.c: split find_members implementation. Added debug icall to get
17600 the address of an object.
17601 * reflection.c: handle TypeBuilders in mono_type_get_object().
17603 2002-03-01 Martin Baulig <martin@gnome.org>
17605 * icall.c (ves_icall_System_Array_GetLength): This must throw an
17606 ArgumentOutOfRangeException(), not an ArgumentException().
17607 (ves_icall_System_Array_GetLowerBound): Likewise.
17608 (ves_icall_System_Array_GetValue): Improved argument checking.
17609 (ves_icall_System_Array_SetValue): Improved argument checking.
17611 2002-03-01 Martin Baulig <martin@gnome.org>
17613 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
17614 called with invalid arguments rather than just dying with g_assert().
17615 (ves_icall_System_Array_SetValue): Likewise.
17616 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
17617 raise a NotImplementedException instead.
17618 (ves_icall_System_Array_GetLength): Added argument checking.
17619 (ves_icall_System_Array_GetLowerBound): Added argument checking.
17621 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
17623 * object.h (mono_assert): new macros mono_assert and
17624 mono_assert_not_reached
17626 2002-02-28 Martin Baulig <martin@gnome.org>
17628 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
17629 and "System::String::IsInterned" to "System::String::_IsInterned".
17631 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
17633 * icall.c: remove hacks for typebuilder. Added icall to create a
17634 modified type from a tybebuilder.
17635 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
17636 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
17637 to create a backing MonoClass for a TypeBuilder.
17639 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17641 * class.c, class.h: more refactoring of class init.
17642 Export mono_class_setup_mono_type() and mono_class_setup_parent().
17644 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
17646 * marshal.c, marshal.h: start of marshaling interface.
17648 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
17650 * icall.c: fix order in assembly qualified name icall.
17652 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
17654 * class.c: do not free str, since we store it in the hash table.
17655 * reflection.h: add label field to MonoILExceptionInfo.
17656 * reflection.c: handle references to more than one assembly. Handle
17657 case when there isn't a module created in the assembly.
17659 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17661 * class.c: Fix typo. Start refactoring of class init code.
17663 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17665 * appdomain.c: exit with 1 on error.
17666 * class.c: we already have the name in MonoClassField.
17667 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
17668 MonoStreamHeader instead of an offset of image->raw_metadata.
17670 2002-02-26 Miguel de Icaza <miguel@ximian.com>
17672 * appdomain.c (mono_init): Be even more descriptive about the error.
17674 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
17676 * appdomain.c: give the user an informative message when corlib can't
17679 2002-02-26 Martin Baulig <martin@gnome.org>
17681 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17682 New icall to get the time zone data.
17684 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17686 * reflection.c: set virtual and raw size of section correctly.
17687 * threads.c: transfer domain information to newly created threads.
17689 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
17691 * class.c: when instancing a class in a domain, load the default
17692 vaules for static fields from the constant table. Fix System.Enum to
17694 * icall.c: implement Object::GetType() internalcall. Implemented
17695 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
17696 Fixed checking of binding flags in find_members().
17697 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
17698 * reflection.c: handle enumerations when writing to the constant
17699 table. Use a different object cache for types.
17702 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
17704 * object.c (mono_object_isinst): fix for arrays
17706 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
17708 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
17710 * object.c: don't use mprotect () and fix intern pool hash table
17711 lookup for big endian systems.
17713 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17715 * icall.c: change type_is_subtype_of () signature.
17717 2002-02-21 Mark Crichton <crichton@gimp.org>
17719 * rand.c, rand.h: Added random number generator for
17720 System.Security.Cryptography classes.
17722 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
17724 * icall.c: Added System.Security.Cryptography calls.
17726 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
17728 * class.c, icall.c, metadata.c: better support for pointer types.
17729 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
17730 * reflection.c: Add support for getting custom attrs for properties
17731 and simplify some code.
17733 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17735 * icall.c: change getToken () and add custom attribute GetBlob()helper
17737 * reflection.h: add custom attrs array to the reflection builder structures.
17738 * reflection.c: encode and emit custom attributes for all the relevant
17739 reflection objects. Cache fieldref and methodref tokens. Change
17740 mono_image_create_token() interface to take a MonoDynamicAssembly.
17741 More complete custom attributes decoder. Load custom attributes for
17742 Assembly, Field, Method and Constructor objects, too. Make the
17743 returned array an Attribute[] one, not object[]. Added
17744 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
17745 custom attribute constructor.
17747 2002-02-20 Dick Porter <dick@ximian.com>
17751 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
17752 problem code out for now).
17754 2002-02-19 Radek Doulik <rodo@ximian.com>
17756 * object.c (mono_ldstr): use hash table to avoid multiple swapping
17758 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
17760 * icall.c: register the GetCustomAttributes method.
17761 * object.c, object.h: add mono_string_new_len ().
17762 * reflection.h, reflection.c: added mono_runtime_invoke(),
17763 mono_install_runtime_invoke(). Added
17764 mono_reflection_get_custom_attrs () to load custom attributes and
17765 create the attribute objects.
17767 2002-02-19 Dick Porter <dick@ximian.com>
17768 * threads-dummy-types.c:
17769 * threads-dummy-types.h:
17772 * threads-pthread-types.c:
17773 * threads-pthread-types.h:
17774 * threads-pthread.c:
17775 * threads-pthread.h: Deleted obsolete files
17777 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
17779 * class.c (mono_class_vtable): runtime init the class when we
17780 allocate static class data.
17782 * icall.c (ves_icall_System_Array_SetValue): check for null values.
17784 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
17785 and String - but we will need generic marshalling support in the
17787 (mono_init): set the domain name in a ms compatible way
17789 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
17792 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
17794 * object.c (mono_array_clone): use alloca() instead of g_malloc
17797 * appdomain.c (mono_domain_unload): impl.
17799 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17801 * appdomain.c, object.c: fix intern pool implementation.
17802 * class.c: fix alignment code.
17804 2002-02-16 Radek Doulik <rodo@ximian.com>
17806 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
17807 and s2 > s1, just copy lower bytes to be compatible with little
17808 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
17809 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
17811 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
17812 force big_endian to be 1 for big endian machines
17813 (ves_icall_iconv_new_decoder): ditto
17815 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
17817 * socket-io.c (convert_sockopt_level_and_name): If the system
17818 doesn't define SOL_IP or SOL_TCP, get them by hand using
17819 getprotobyname() and caching the values (because this could be a
17821 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
17822 Use the appropriate struct when the system does support it. Ie,
17823 not all systems have struct ip_mreqn so use struct ip_mreq when
17826 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
17828 * reflection.c: handle finally clauses.
17830 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
17832 * socket-io.c: use g_snprintf() instead of snprintf.
17834 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
17836 * reflection.c (mono_param_get_objects): Cast second argument to
17837 mono_method_get_param_names to a const char** to silence the
17840 * appdomain.c (mono_domain_assembly_open): Put parens around the
17841 truth statement in the for-loop.
17843 * unicode.c (iconv_convert): Got rid of a compiler warning about
17844 int i being unused when the system has a new iconv.
17845 (iconv_get_length): Same.
17847 * image.c (load_class_names): Cast the second argument to
17848 g_hash_table_insert() to char* to hush compiler warnings about the
17850 (mono_image_open): Same here.
17852 * socket-io.c: Don't conditionally include sys/filio.h or
17853 sys/sockio.h here anymore since we now get them from
17854 io-layer/io-layer.h
17855 (inet_pton): If the system doesn't support inet_aton, implement
17856 using inet_addr and also #define INADDR_NONE if it isn't defined
17859 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
17861 * metadata.c, metadata.h: added function to get packing and size info
17863 * reflection.h, reflection.c: handle field RVA data. Save info about
17864 the table layout if needed. Assign typedef indexes to all the types
17865 before dumping the info about them to avoid forward reference problems.
17867 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
17869 * socket-io.c (convert_sockopt_level_and_name): ifdef
17870 SO_ACCEPTCONN because it is not defined on my system (old debian)
17872 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17874 * opcode.c: use stddef.h to get NULL.
17876 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
17878 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
17879 for FIONBIO, FIONREAD and SIOCATMARK.
17880 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
17881 define INADDR_NONE and besides, inet_addr() is deprecated and
17882 should not be used. Use inet_pton() instead - it also has the
17883 added bonus that it can easily handle IPv6 addresses as well.
17884 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
17886 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17888 * decimal.c: remove _MSC_VER conditional.
17890 2002-02-13 Dick Porter <dick@ximian.com>
17893 * icall.c: Internal calls for Blocking, Select, Shutdown,
17894 GetSocketOption and SetSocketOption
17896 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17898 * assembly.cs: better resolver: use it instead of some kludgy
17901 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
17903 * reflection.c: the best way to speed-up the compiler is to avoid
17906 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
17908 * class.c (mono_class_vtable): changed the object layout
17909 (obj->vtable->class).
17910 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
17912 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17914 * assembly.c: look for assemblies in the assembly dir, too.
17916 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17918 * class.c: fix thinko in mono_class_from_type().
17920 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17922 * exception.h, exception.c: added TypeLoadException.
17923 * object.h, object.c: added mono_array_clone ().
17924 * icall.c: handle throwOnError in AssemblyGetType().
17925 Added Array.Clone().
17926 * opcode.h, opcode.c: use a single value for the opcode val.
17927 Compile fix for non-gcc compilers.
17929 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
17931 * opcodes.c, opcodes.h: export interesting info about opcodes.
17933 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
17935 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
17938 * class.c (class_compute_field_layout): set element_class for enums
17939 (mono_class_create_from_typedef): set element_class for normal classes
17941 * icall.c (ves_icall_System_Enum_get_value): impl.
17943 * class.c (mono_class_create_from_typedef): do not set valuetype
17944 flag for System.ValueType and System.Enum
17946 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
17948 * unicode.c (iconv_convert): fix big endian problem.
17950 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17952 * class.c: add asserts if we are ever going to scribble over memory.
17953 * socket-io.c: not all systems have AF_IRDA defined.
17955 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
17957 * class.c (class_compute_field_layout): do not consider static
17958 fields to compute alignment
17960 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
17962 * appdomain.c (mono_appdomain_get): impl.
17963 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
17965 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
17967 * icall.c: ignore "file://" prefix when loading an assembly.
17969 2002-01-23 Dick Porter <dick@ximian.com>
17973 * Makefile.am: Added socket support
17975 2002-01-23 Miguel de Icaza <miguel@ximian.com>
17977 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
17978 code back. This should return the assemblies that are loaded by
17979 the runtime on behalf of an application domain.
17981 The current implementation is still broken, it just returns every
17982 assembly loaded, but until we get real applications domain this
17985 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
17987 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
17990 2002-01-23 Miguel de Icaza <miguel@ximian.com>
17992 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
17993 the mono_class_from_name lookup.
17994 (ves_icall_get_parameter_info): ditto.
17995 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
17997 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
17999 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
18001 * class.c: load also nested classes on class init.
18002 System.ValueType instance methods gets passed boxed
18003 values, unless methods in derived classed that get a pointer to the
18005 * icall.c: use better name parsing code in GetType().
18006 * image.c, image.h: add mono_image_loaded ().
18007 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
18008 * reflection.c, reflection.h: added mono_reflection_parse_type().
18010 2002-01-22 Veronica De Santis <veron78@interfree.it>
18012 * icall.c : Added mapping of internal calls for Manual and Auto reset events
18013 * threads.c : Added the implementation of internal calls for events
18014 * threads.h : Added prototypes of internal calls for events
18016 2002-01-21 Radek Doulik <rodo@ximian.com>
18018 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
18020 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
18022 * class.c (mono_class_init): set min_align to 1 (instead of 0)
18023 (mono_class_value_size): use min_align
18025 2002-01-20 Dick Porter <dick@ximian.com>
18028 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
18029 so it compiles on w32.
18031 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
18033 * metadata.c (mono_type_stack_size): impl.
18035 * class.c (mono_class_get_field): impl. memberref token
18037 2002-01-16 Veronica De Santis <veron78@@interfree.it>
18039 * icall.h : Added the internal calls mapping for CreateMutex_internal
18040 and ReleaseMutex_internal.
18041 * threads.h : Added the prototype of mutexes internal calls.
18042 * threads.c : Added the implementations of mutexes internal calls.
18044 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18046 * metaparse.h: removed unused file.
18047 * reflection.c, reflection.h: added stream_data_align () function
18048 to align data in streams and keep stream aligned. Add support for
18049 exception support in method headers.
18051 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
18053 * unicode.c: make iconv_convert () return the number of bytess written
18054 in the output buffer.
18056 2002-01-15 Dick Porter <dick@ximian.com>
18057 * threads.c: Make the runtime's idea of infinite timeouts coincide
18058 with the class library's
18060 Fix a particularly egregious bug in mono_thread_cleanup(). That
18061 code was so utterly bogus it must have been written on a Monday.
18063 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18065 * reflection.h: add subtypes field to TypeBuilder.
18066 * reflection.c: encode constants for literal fields.
18067 Handle subtypes. Fix user string token (and add a zero byte)
18070 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
18072 * class.c (mono_class_init): bug fix: assign slot numbers for
18075 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18077 * reflection.c: don't try to output a code RVA for abstract methods.
18078 Small fixes for method header format. Output parameter info to the
18079 ParamDef table. Save method overriding info to MethodImpl table.
18080 Fix property support. Allow typedef.extends to be a type in the
18082 * verify.c: fix off-by-one error.
18084 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
18086 * class.c: fix mono_class_from_mono_type () for szarray types.
18087 Remove unused cache check in mono_class_from_type_spec().
18088 * icall.c: *type_from_name () functions handle simple arrays and byref.
18089 * reflection.c: handle byref and szarray types. Handle methods without
18090 body (gets P/Invoke compilation working). Handle types and fields in
18092 * reflection.h: add rank to MonoTypeInfo.
18094 2002-01-10 Dick Porter <dick@ximian.com>
18096 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
18099 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18101 * icall.c: initialize class in type_from_handle ().
18102 Loop also in parent classes for get_method ().
18103 * reflection.c: properly encode class and valuetype types.
18104 Start on encoding TypeBuilder types. Handle fieldrefs.
18105 Use correct length when registering a user string.
18106 Handle ConstructorBuilder and MonoMethod in get_token ().
18107 Make mono_type_get_object () aware of cached types.
18108 * object.c: back out change to mono_string_new ().
18110 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
18111 * object.c: mono_string_new should return a NULL when the string
18112 passed in is NULL -- not try to deference it.
18114 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18116 * icall.c: hack to make IsSubType work for TypeBuilders.
18117 * reflection.c: emit constructors before methods.
18118 Retrieve param names in mono_param_get_objects().
18120 2002/01/05 Nick Drochak <ndrochak@gol.com>
18122 * Makefile.am: fix list of headers and sources so automake 1.5
18123 doesn't complain. Removed \# at end of list.
18125 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18127 * reflection.c: get token for a method ref. Set return type of
18128 constructor to void.
18129 * loader.c: debug message.
18130 * class.c: typo fix.
18132 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
18134 * icall.c: fix array init with rank > 1. FindMembers
18135 loops in parent class as well.
18136 * image.c: do not insert nested types in name cache.
18137 * reflection.c: warning fix.
18138 * reflection.h: add override method (for interface impl).
18140 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
18142 * metadata.c: fix customattr decoding.
18144 2001-12-21 Miguel de Icaza <miguel@ximian.com>
18146 * rawbuffer.cs: Added native Win32 implementation, avoids using
18147 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
18149 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
18151 * class.c: make the low-level routines handle the cache.
18153 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
18155 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
18157 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
18159 * class.c: fix mono_array_element_size() for objects.
18160 * class.h, class.c: add properties to MonoClass and load them
18162 * icall.c: check with isinst() when assigning a value to an array
18163 instead of requiring the classes to match exactly.
18164 Implemented icall for System.Type::GetType().
18165 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
18166 enums. Handle bindingflags when looking for methods and fields.
18167 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
18168 and mono_metadata_methods_from_property().
18169 * reflection.h, reflection.c: added structures for propreties,
18170 parameters and enums. Implemented mono_property_get_object() and
18171 mono_param_get_objects().
18173 2001-12-18 Dick Porter <dick@ximian.com>
18175 * file-io.c: Use mono_string_to_utf16() instead of
18176 mono_string_chars()
18178 * object.c: Added mono_string_to_utf16(), which copies the non
18179 NULL-terminated MonoString into a new double-null-terminated
18182 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
18184 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
18186 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
18188 * file-io.c: raise exceptions if handle is invalid.
18190 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
18192 * assembly.c: yet another check for mscorlib.
18193 * class.c, class.h: load nesting info for classes.
18194 * icall.c: many new functions to support the Reflection classes.
18195 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
18196 * reflection.h, reflection.c: mono_image_create_token(),
18197 mono_assembly_get_object(), mono_type_get_object(),
18198 mono_method_get_object(), mono_field_get_object(): methods to return
18199 objects that parallel the C representation of assemblies, types,
18202 2001-12-11 Dick Porter <dick@ximian.com>
18205 * file-io.c: Internal calls for file IO.
18207 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
18209 * tabledefs.h: missing FileAttributes.
18210 * verify.h, verify.c: use is_valid_string () to simplify and check for
18211 valid strings more correctly. Fix warnings and speeling.
18212 Check more tables: Filed, File, ModuleRef, StandAloneSig.
18213 Check code: branches, maxstack, method calls.
18215 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
18217 * object.c (mono_object_allocate): removed static, so that the jit
18218 can allocate value types.
18220 * icall.c (ves_icall_System_DateTime_GetNow): impl.
18222 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18224 * class.c: init enum types right away and register the
18225 token->MonoClass map in mono_class_create_from_typedef ().
18226 * verify.h, verify.c: first cut of the verifier.
18227 * pedump.c: add --verify switch to verify metadata tables.
18228 * tabledefs.h: add some missing enums.
18230 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
18232 * class.c (mono_install_runtime_class_init): impl.
18233 (mono_class_init): renamed mono_class_metadata_init to
18234 mono_class_init, also removed the metadata_inited flag
18236 * object.c (mono_object_isinst): use faster algorithm
18238 2001-11-30 Radek Doulik <rodo@ximian.com>
18240 * mono-endian.h: reverted last change
18241 added function prototypes
18243 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
18244 add mono-endian.c back
18246 * mono-endian.c: returned back, as Paolo pointed out, it's needed
18247 for unaligned access, I've mistaked it with endianess. I am
18249 (mono_read16): fix reverted endianess
18250 (mono_read64): ditto
18251 (mono_read32): ditto
18253 2001-11-30 Dick Porter <dick@ximian.com>
18255 * exception.c: Implement mono_exception_from_name()
18257 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18259 * metadata.h, metadata.c: remove params_size and locals_size and their
18260 calculation from the metadata code: they are only usefult to the
18263 2001-11-29 Radek Doulik <rodo@ximian.com>
18265 * object.c (mono_ldstr): swap bytes here, it's probably not the
18266 best place, but works for me now, I'll redo it once I know mono
18267 better, also note that I add PROT_WRITE and don't reset back, also
18268 note that it's only affects big endians, so x86 should be OK
18270 * mono-endian.h (read16): use just glib macros for both endians
18272 * mono-endian.c: removed as glib macros are used in in
18273 mono-endian.h so we don't need to care about endianess for read
18274 macros as glib does that for us already
18276 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
18278 * class.h, class.h: take minimum alignment into consideration so
18279 that the fields of a class remain aligned also when in an array.
18281 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18283 * loader.h, loader.c: add mono_method_get_param_names().
18284 * class.c: 0-init class fields.
18286 2001-11-26 Dick Porter <dick@ximian.com>
18290 * threads.c: New file that handles System.Threading on all platforms
18293 * object.h: Remove the synchronisation struct from MonoObject,
18294 replace it with a pointer that gets initialised on demand
18296 * Makefile.am: Replace all the system-specific threading code with
18297 a single file that uses the new wrapper library
18299 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
18301 * class.c, class.h: add mono_install_trampoline() so that the runtime
18302 can register a function to create a trampoline: removes the ugly
18303 requirement that a runtime needed to export arch_create_jit_trampoline.
18304 * object.h, object.c: added mono_install_handler() so that the runtime
18305 can install an handler for exceptions generated in C code (with
18306 mono_raise_exception()). Added C struct for System.Delegate.
18307 * pedump.c: removed arch_create_jit_trampoline.
18308 * reflection.c: some cleanups to allow registering user strings and
18309 later getting a token for methodrefs and fieldrefs before the assembly
18311 * row-indexes.h: updates and fixes from the new ECMA specs.
18313 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
18315 * class.h, class.c: add enum_basetype field to MonoClass.
18316 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
18317 to get index in the constant table reated to a field, param or
18319 * reflection.h, reflection.c: handle constructors. Set public-key and
18320 version number of the built assembly to 0.
18321 * row-indexes.h: update from new ECMA spec.
18323 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18325 * class.h, class.c: add a max_interface_id to MonoClass.
18326 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
18327 since it's used to do that. Added mono_type_type_from_obj().
18328 Make GetType() return NULL instead of segfaulting if the type was not
18329 found. Handle simple arrays in assQualifiedName.
18330 * object.h: add a struct to represent an Exception.
18331 * reflection.c: output call convention in method signature.
18332 Add code to support P/Invoke methods and fixed offsets for fields.
18334 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
18336 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
18338 * icall.c: use mono_array_addr instead of array->vector: fixes the
18339 reflection image writing.
18340 * reflection.c: init call convention byte to 0 in method signature.
18341 Encode the property signature. Don't output property-related methods
18342 twice. Really process the properties for a type (don't cast a field to
18343 a property, my mom always told me that).
18344 Fix 64 bit issues in pointer alignment in a different and more
18347 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
18349 * loader.h: Removed type class from MonoDefaults, added monotype
18351 * loader.c: Loaded MonoType, removed loading of Type
18353 * icall.c (my_mono_new_object): Now returns a System.MonoType,
18354 and fills in System.Type._impl with a RuntimeTypeHandle rather
18355 than the actual MonoClass *
18357 (ves_icall_type_from_handle): change from type_class to
18360 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
18363 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
18366 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
18368 (ves_icall_System_Reflection_Assembly_GetType): implemented
18370 (ves_icall_System_MonoType_assQualifiedName): implemented
18372 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
18374 2001-11-09 Miguel de Icaza <miguel@ximian.com>
18376 * assembly.c (mono_assembly_open): Implement a cache for the
18379 (mono_assembly_close): only destroy the assembly when the last
18382 2001-11-09 Dick Porter <dick@ximian.com>
18384 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
18386 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
18388 * class.c (mono_class_metadata_init): bug fix: compute the right slot
18390 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18392 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
18393 from Martin Weindel.
18394 * object.h: add mono_string_chars ().
18396 2001-11-07 Miguel de Icaza <miguel@ximian.com>
18398 * reflection.c (build_compressed_metadata): Eliminates warnings
18399 and uses 64-bit clean code.
18401 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
18402 (mono_type_equal): Change signature to eliminate warnings.
18404 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18406 * icall.c, loader.c: remove the internalcall array constructors.
18407 Changes to match the new MonoArray structure.
18408 * object.h, object.c: an array object doesn't allocate an extra
18409 vector. Add mono_array_new_full () to create jagged arrays easily.
18411 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18413 * metadata.h, metadata.c: add mono_metadata_field_info () to
18414 retreive all the info about a field from vairous tables.
18415 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
18416 * class.h, class.c: augment MonoClassField with more info.
18417 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
18418 policy and load a field's RVA if needed.
18420 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
18422 * class.c (mono_class_metadata_init): create a trampoline for all
18423 virtual functions instead of actually compiling them.
18425 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
18427 * class.h, class.c: include name in MonoClassField.
18428 * class.c: fix fundamental type of System.Object and System.String.
18429 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
18431 * icall.c: remove internalcalls for the Reflection stuff that is now
18433 * loader.c: mono_field_from_memberref () implementation.
18434 * mono-endian.c: thinko (s/struct/union/g).
18435 * object.c, object.h: make the mono_string_* prototypes actually use
18436 MonoString instead of MonoObject.
18437 * reflection.c, reflection.h: updates for changes in the reflection
18438 code in corlib: we use C structures that map to the actual C# classes.
18439 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
18440 fat method header if needed and use the info from the ILGenerator for
18441 methods. Handle fields in types. Misc fixes.
18443 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
18445 * class.c (mono_class_metadata_init): bug fix: always allocate
18446 space for static class data
18448 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
18450 * class.c (mono_compute_relative_numbering): use relative
18451 numbering to support fast runtime type checks.
18453 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
18455 * class.c (mono_class_create_from_typeref): added debugging output
18456 to print class name when MonoDummy is returned instead of real class
18458 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
18460 * class.c (mono_class_metadata_init): interface offset table now
18461 contains pointers into the vtable - this is more efficient for the jit
18463 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
18465 * class.c (mono_class_metadata_init): use a temporary vtable (the
18466 old algorithm only worked for the interpreter, but not for the jit)
18468 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
18470 * loader.c (method_from_memberref): use mono_class_get to get the
18471 class of an array instead of using System.Array directly.
18472 (mono_get_method): also add MEMBERREF methods to the method cache
18473 which usefull for arrays.
18475 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
18477 * pedump.c (arch_compile_method): added to compute vtable entry
18479 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
18480 number of interfaces.
18482 * class.h: merged MonoArrayClass into MonoClass
18484 * class.c (mono_class_create_from_typedef): compute the vtable size and
18485 allocate space to include the vtable inside MonoClass
18486 (mono_class_metadata_init): initialize the vtable
18488 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
18490 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
18491 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
18492 * image.c: endian fixes by Laurent Rioux.
18493 * object.h, object.c: rename MonoStringObject to MonoString and
18494 MonoArrayObject to MonoArray. Change some function names to conform to
18495 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
18496 guint16* as first argument, so don't use char*.
18497 Provide macros to do the interesting things on arrays in a portable way.
18498 * threads-pthread.c: updates for the API changes and #include <sched.h>
18499 (required for sched_yield()).
18500 * icall.c: updates for the API changes above.
18501 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
18502 platforms that need them.
18504 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18506 * class.c: set the correct type for all the fundamental
18507 type when loading the class.
18509 2001-10-05 Dick Porter <dick@ximian.com>
18511 * threads-pthread.c (pthread_mutex_timedlock): Simple
18512 compatibility version for C libraries that lack this call.
18514 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18516 * class.c: MonoTypes stored in MonoClass are stored as
18517 fundamental MonoTypes when the class represents a
18518 fundamental type (System.Int32, ...).
18519 The TypeHandle return by ldtoken is a MonoType*.
18520 * icall.c: ves_icall_get_data_chunk () write out all the
18521 PE/COFF stuff. Implement ves_icall_define_method (),
18522 ves_icall_set_method_body (), ves_icall_type_from_handle ().
18523 * image.c: properly skip unknown streams.
18524 * loader.h, loader.c: add type_class to mono_defaults.
18525 * metadata.c, metadata.h: export compute_size () as
18526 mono_metadata_compute_size () with a better interface.
18527 Typo and C&P fixes.
18528 * pedump.c: don't try to print the entry point RVA if there is no entry point.
18529 * reflection.c, reflection.h: many cleanups, fixes, output method
18530 signatures and headers, typedef and typeref info, compress the metadata
18531 tables, output all the heap streams, cli header etc.
18532 * row-indexes.h: typo fixes.
18534 2001-10-04 Dick Porter <dick@ximian.com>
18536 * object.h: Add a synchronisation mutex struct to MonoObject
18538 * object.c (mono_new_object): Initialise the object
18539 synchronisation mutexes
18541 * icall.c: System.Threading.Monitor internal calls
18543 * threads-pthread.h:
18544 * threads-pthread.c: System.Threading.Monitor internal calls
18546 * threads-types.h: New file, includes the system-specific thread
18549 * threads-pthread-types.h:
18550 * threads-pthread-types.c: New files, handle pthread-specific
18551 synchronisation types
18553 * threads-dummy-types.h:
18554 * threads-dummy-types.c: New files of dummy support for
18555 thread-specific types
18559 * pedump.c: include mono-endian.h not endian.h
18561 * Makefile.am: More threads files.
18562 Name mono-endian.h not endian.h
18564 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
18566 * Makefile.am, reflection.h, reflection.c: move here the reflection related
18567 stuff and implement a few more bits.
18568 * icall.c: a field needs to be dereferenced twice. Do not use the same
18569 name for two variables in the same scope.
18570 * image.c, image.h: cleanups.
18572 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
18574 * class.c (mono_class_metadata_init): bug fix: compute the right size
18576 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
18578 * icall.c: implemented some of the Reflection internalcalls.
18579 * image.c, image.h: start writing out the PE/COFF image.
18580 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
18581 that does the reverse than decode_blob_size ().
18582 * object.c: use mono_metadata_encode_value (). Move here
18583 temporary implementation of mono_string_to_utf8 ().
18584 * rawbuffer.c: make malloc_map static.
18586 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18588 * metadata.c: fix type comparison for arrays.
18589 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
18590 Added a couple of new classes to monodefaults.
18591 * icall.c: added a couple of Reflection-related internalcalls.
18592 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
18593 Added a byval_arg MonoType to MonoClass.
18595 2001-09-28 Dick Porter <dick@ximian.com>
18598 * threads-pthread.h:
18599 * threads-pthread.c: Implemented internal calls for
18600 LocalDataStoreSlot operations. Applied mutexes around all shared
18601 data. Reworked the thread creation and Start() operations to
18602 avoid a race condition.
18605 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
18607 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
18609 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
18611 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
18613 * class.c, loader.c: warn and return NULL instead of erroring out.
18614 * icall.c: added System.AppDomain::getCurDomain().
18615 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
18617 2001-09-25 Dick Porter <dick@ximian.com>
18619 * threads-pthread.h:
18620 * threads-pthread.c: Implemented timed thread joining and added
18621 System.Threading.Thread::Join_internal internal call
18623 * icall.c: Added System.Threading.Thread::Join_internal internal call
18626 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
18628 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
18630 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
18631 mono_string_intern () to implement the semantics of the ldstr opcode
18632 and the interning of System.Strings.
18633 * icall.c: provide hooks to make String::IsIntern and String::Intern
18636 2001-09-23 Dick Porter <dick@ximian.com>
18639 * threads-dummy.h: New files of dummy threading routines
18641 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
18642 support code based on system specifics
18644 Rename PTHREAD_LIBS to THREAD_LIBS
18646 2001-09-23 Dick Porter <dick@ximian.com>
18648 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
18649 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
18651 (mono_thread_init): Set up a Thread object instance to return when
18652 the main thread calls Thread.CurrentThread
18653 (mono_thread_cleanup): Wait for all subthreads to exit
18655 * icall.c: New internal calls for System.Threading.Thread::Sleep
18656 (including Schedule) and CurrentThread
18658 * threads.h: New file, to insulate thread-specific stuff from the
18661 2001-09-21 Dick Porter <dick@ximian.com>
18663 * threads-pthread.h:
18664 * threads-pthread.c: New file, for handling pthreads-style
18665 threading support. Start() now starts a new thread and executes
18666 the ThreadStart delegate instance.
18668 * icall.c: Added the internalcall for
18669 System.Threading.Thread::Start_internal
18671 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
18673 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
18675 * loader.c: work around the different signatures for delegates
18676 constructors csc generates in compiled code vs the ones compiled in mscorlib.
18678 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18680 * class.h, class.c: add mono_class_get_field_from_name ().
18681 * *: Fix C comments and other ANSI C issues.
18683 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
18685 * endian.h, assembly.c: fix some endianness issues.
18687 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
18689 * loader.h, load.c: add delegate_class to mono_defaults.
18690 Handle runtime provided methods in mono_get_method ().
18692 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
18694 * loader.c (mono_get_method): use pinvoke for internal call
18696 * icall.c: use pinvoke for internal call
18698 * loader.c (method_from_memberref): set the method name
18700 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
18702 * metadata.c: help the compiler generate better code for
18703 mono_class_from_mono_type ().
18705 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
18707 * class.c (mono_class_metadata_init): delayed computing of the
18708 class size to mono_class_metadata_init ()
18710 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
18712 * class.c, class.h: add an interfaces member to MonoClass.
18713 * image.c, image.h: add assembly_name field to MonoImage
18714 from the assembly table.
18715 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
18717 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18719 * class.c: Handle Array in mono_class_from_mono_type ().
18720 * metadata.c, pedump.c: some endian fixes.
18722 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18724 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
18725 * metadata.c: fix small problem introduced with the latest commit.
18727 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
18729 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
18730 We don't need a MonoMetadata pointer anymore to compare signatures in
18731 mono_metadata_signature_equal (), update callers.
18732 Reduced memory usage an number of allocations for MonoMethodHeader and
18733 MonoMethodSignature.
18735 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
18737 * metadata.c: added compare for szarray.
18739 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
18741 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
18742 and add a couple more types to it and mono_defaults. Give an hint on
18743 classes that need implementing in our corlib and are referenced
18746 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
18748 * class.h, class.c: keep track if a class is also an Enum.
18749 * loader.c: Implement a couple more types for use in libffi
18750 marshalling. Gives better diagnostics when failing to dlopen
18751 a library. Set method->klass for P/Invoke methods, too.
18753 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
18755 * class.c, class.h: add a MonoType this_arg to MonoClass that
18756 represents a pointer to an object of the class' type that
18757 can be used by the interpreter and later the type cache.
18758 Add best guess alignment info for valuetype objects.
18760 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
18762 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
18763 into MonoType: one less level of indirection and allocation and
18764 simplifies quite a bit of code. Added cache for MonoTypes that are
18765 used frequently, so that we don't need to allocate them all the time.
18767 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
18769 * class.c (mono_class_create_from_typedef): System.Enum is also a
18770 value type, although it does not derive from System.ValueType
18771 (maybe a bug in the ms compiler?)
18773 * metadata.c (mono_type_size): return the right size for value types
18775 * loader.c (mono_get_method): only initialize method header if not abstract
18777 * class.c (mono_class_from_mono_type): use mono_default values.
18779 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
18781 * *: use MonoClass pointers instead of <type_tokens>
18783 * class.h: new flag: metadata_inited.
18785 * class.c (mono_class_metadata_init): impl.
18786 (mono_class_instance_size): impl.
18787 (mono_class_data_size): impl.
18789 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18791 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
18792 MonoClass now has the name and name_space fields.
18793 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
18794 mono_get_method () takes and optional MonoClass as argument.
18795 Removed mono_typedef_from_name() and added mono_class_token_from_name()
18796 instead that takes advantage of a map from class names to typedef
18797 tokens in MonoImage.
18799 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
18801 * metadata.c: zero is not a valid alignment boundary.
18802 Merge MONO_TYPE_VOID in default decoding code.
18804 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
18806 * image.h: merged MonoMetadata into MonoImage
18808 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
18809 identify the type of elements.
18811 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
18813 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
18814 * cil-coff.h: split MonoMSDOSHeader and add size info.
18815 * image.c: add some consistency checks.
18816 * metadata.c: fix row size computation: one programmer
18817 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
18818 add explanation for the locator routine.
18819 Fix decoding of size in method header.
18821 2001-08-20 Miguel de Icaza <miguel@ximian.com>
18823 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
18824 (g_concat_dir_and_file): Bring g_concat_dir_and_file
18825 function from gnome-libs. This uses the right path separator
18826 based on the OS, and also works around a bug in some systems where
18827 a double slash is not allowed.
18828 (default_assembly_name_resolver): Use g_concat_dir_and_file
18829 (mono_assembly_open): ditto.
18831 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
18833 * metadata.c (mono_metadata_signature_equal): impl.
18835 * *: void is now a realy MonoType (instead of using NULL)
18837 * metadata.c (do_mono_metadata_parse_type): use
18838 mono_metadata_parse_type to parse void value.
18840 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
18842 * metadata.c, metadata.h: in the signature and method header store
18843 only the space required for holding the loca vars and incoming arguments.
18845 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
18847 * metadata.c (do_mono_metadata_parse_type): treat void like any
18848 other type (instead of assigning NULL);
18850 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
18852 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
18854 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
18856 * image.c (do_mono_image_open): added a cache for arrays.
18858 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18860 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
18861 decode a single column from a row in a metadata table and changes
18862 to take advantage of it in the typedef locator (gives a nice speed up).
18863 Store offset info for function params.
18865 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
18867 * image.h (MONO_IMAGE_IS_CORLIB): removed
18869 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
18871 * assembly.c: how could mono_assembly_close () had ever worked?
18872 * metadata.c, metadata.h: provide offset info for local vars.
18873 Implement mono_type_size () to take care of alignment as well
18874 as size (it was mono_field_type_size in cli/class.c before).
18876 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
18878 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
18880 * assembly.h (CORLIB_NAME): set to corlib.dll
18882 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
18884 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18886 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
18887 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
18888 tokentype.h: massive namespace cleanup.
18890 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18892 * metadata.h, metadata.c: decode exception clauses when parsing method header.
18894 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
18896 * metadata.c (mono_metadata_free_type): added check for type !=
18897 NULL (void) before calling mono_metadata_free_type()
18899 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
18901 * metadata.h, row_indexes.h: added header with enumerations to use
18902 to index in the columns from tables in metadata and to decode coded
18903 tokens: we should start using this instead of embedding magic numbers
18906 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
18908 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
18909 Move metadata_t info from cli_image_info_t to MonoImage, where
18910 it's easily accessible. Changed all the uses accordingly.
18911 Added the method and class caches to MonoImage.
18912 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
18913 and mono_metadata_decode_value () signature to be more consistent
18914 with the other parse functions (and simplify code). Taken advantage
18915 of zero-length array allocation with GCC. Removed reduntant (and
18916 wrong) MonoFieldType struct and use MonoParam instead. Changed
18917 mono_metadata_parse_field_type () to use common code for parsing.
18918 Added mono_metadata_typedef_from_field () and
18919 mono_metadata_typedef_from_method () to lookup a typedef index from a
18920 field or method token.
18921 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
18923 2001-07-23 Miguel de Icaza <miguel@ximian.com>
18925 * metadata.c (mono_metadata_parse_field_type): Implement.
18926 (do_mono_metadata_parse_type): Split engine from
18927 mono_metadata_parse_type, so that we can create smaller structures
18928 for things that just have one pointer to the MonoType (look at
18931 2001-07-20 Miguel de Icaza <miguel@ximian.com>
18933 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
18934 as Jan Gray found out, it is incorrect.
18936 2001-07-18 Miguel de Icaza <miguel@ximian.com>
18938 * assembly.c: Implement asssembly loading. This loads an image
18939 and loads all the referenced assemblies. Come to think of it, we
18940 could always do lazy loading of the assemblies.
18942 * image.c (mono_image_open): Keep loaded images in a hashtable.
18944 * image.h (MonoImage): Add reference count.
18946 2001-07-17 Miguel de Icaza <miguel@ximian.com>
18948 * assembly.c (mono_assembly_open): Keep track of the file name in
18949 case the assembly has no ASSEMBLY table.
18951 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
18954 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
18956 * metadata.c, metadata.h: decode local vars in method header
18957 parse function. Change callers accordingly.
18959 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
18961 * metadata.h, cil-coff.h: protect against multiple inclusion.
18962 Added some new structures to hold information decoded from metadata:
18963 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
18964 and relevant decoding/free functions.
18965 * metadata.c: implement decoding functions. Add warning for out of bounds
18966 index in mono_metadata_locate(). Implement mono_get_method () to retreive
18967 all the info about a method signature and invocation. Remove check on
18968 uninitialized local var in parse_mh() and fix memory leak.
18970 2001-07-12 Miguel de Icaza <miguel@ximian.com>
18972 * metadata.h: More macros.
18974 * tokentype.h: New file.
18976 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
18978 * assembly.c: added a consistency check and initialize
18979 some structures with g_new0().
18980 * metadata.c: fixed a couple more bugs in table size computation
18981 and add other checks for out-of bound access to metadata.
18983 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
18985 * metatada.c: fix bugs computing table sizes. Spew a
18986 warning when index in string heap is out of bounds.
18988 2001-07-04 Miguel de Icaza <miguel@ximian.com>
18990 * metadata.h: Add a couple of macros to manipulate tokens.
18992 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18994 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
18995 cli_section_tables).
18997 2001-07-01 Miguel de Icaza <miguel@ximian.com>
18999 * metadata.c (mono_metadata_user_string): New function, provides
19000 access to the UserString heap.
19002 2001-06-27 Miguel de Icaza <miguel@ximian.com>
19004 * metadata.c: Add inline documentation.
19006 2001-06-26 Miguel de Icaza <miguel@ximian.com>
19008 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
19011 2001-06-22 Miguel de Icaza <miguel@ximian.com>
19013 * typeattr.h: New file, TypeAttribute flags.
19015 2001-06-21 Miguel de Icaza <miguel@ximian.com>
19017 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
19018 mono_assembly_ensure_section): Section loading code.
19019 (load_section_tables): Load the sections.
19021 * mono/metadata/metadata.c (mono_metadata_locate_token,
19022 mono_metadata_locate): Functions to locate the information
19023 definition given a token or a table and an index.
19024 (mono_metadata_compute_table_bases): New.
19025 (compute_size): New function to compute the sizes of the various
19028 * mono/metadata/metadata.h: Finish listing the different index
19031 * mono/metadata/pedump.c: Improve to dump new information.
19033 2001-06-19 Miguel de Icaza <miguel@ximian.com>
19035 * mono/metadata/metadata.c: Entered all the tables matching
19038 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2