1 2006-06-15 Zoltan Varga <vargaz@gmail.com>
3 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
4 and later freeing it. Fixes #78638.
6 2006-06-15 Miguel de Icaza <miguel@novell.com>
8 * icall.c (mono_class_get_throw): Revert over-zealous error
9 throwing, the caller for mono_class_get_throw will cope with
10 errors when classes are not properly initialized already.
12 The code still copes with loader exceptions though.
14 Fixes the regression in reftype1 and reftype3 from the CAS tests.
16 2006-06-14 Miguel de Icaza <miguel@novell.com>
18 Fixes the `make run1' version of RuntimeAbort (to be commited,
19 source is in Bugzilla).
21 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
22 FALSE on class loading failure instead of returning true.
24 * class.c (mono_class_create_from_typedef): It is possible for
25 mono_metadata_interfaces_from_typedef_full to fail if a class is
26 not found, cope with this.
29 2006-06-14 Dick Porter <dick@ximian.com>
32 * process.c: Fix a bunch of signed/unsigned warnings from gcc
35 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
37 * culture-info-table.h : oops, forgot to make it nsync with r61548.
39 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
41 * icall.c: Another fix for building mono in Visual Studio.
43 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
45 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
47 2006-06-09 Martin Baulig <martin@ximian.com>
49 * debug-mono-symfile.c: Put this back and really fix it this
50 time. Sorry for all the trouble.
52 2006-06-08 Zoltan Varga <vargaz@gmail.com>
54 * icall.c (mono_class_get_throw): Fix a warning.
55 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
56 ReflectionTypeLoadException if needed. Fixes #78606.
58 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
59 (mono_class_init): Ditto.
61 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
63 (mono_loader_clear_error): Make this work even if there is no error.
65 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
67 * object-internals.h marshal.c marshal.h icall.c: Implement method
68 Marshal.GetComSlotForMethodInfo using internal call.
70 2006-06-07 Zoltan Varga <vargaz@gmail.com>
72 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
73 a function for signalling it.
75 * class.c (mono_class_from_typeref): Use the new kind of loader error when
76 a referenced assembly is not found.
78 * loader.c (mono_loader_error_prepare_exception): Add support for
79 LOADER_ERROR_ASSEMBLY. Fix formatting.
81 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
83 * domain.c appdomain.c class-internals.h marshal.c: Add support
84 for VARIANT marshalling on windows and increment corlib version
85 since Variant struct was added.
87 2006-06-03 Miguel de Icaza <miguel@novell.com>
89 * debug-mono-symfile.c: Revert Martin's previous patch which broke
90 stack trace line information:
92 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
93 (Martin) when looking up B which is between A and C, return A not C.
97 Thanks to Alexander Olk for tracking this down.
99 2006-06-02 Zoltan Varga <vargaz@gmail.com>
101 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
103 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
104 avoid clobbering its value.
105 (mono_string_to_lpstr): Fix a warning on windows.
107 2006-05-31 Zoltan Varga <vargaz@gmail.com>
109 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
112 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
115 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
117 * marshal.c threadpool.c: Update callers of mono_async_result_new.
119 * appdomain.c: Bump corlib version.
121 2006-05-30 Zoltan Varga <vargaz@gmail.com>
123 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
124 CEE_STIND_REF when working with object references.
126 2006-05-31 Zoltan Varga <vargaz@gmail.com>
128 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
131 2006-05-30 Miguel de Icaza <miguel@novell.com>
133 * loader.c (method_from_memberref): Fix argument value for
134 mono_loader_set_error_method_load (I was passing the MonoClass
135 instead of the class name char *).
137 2006-05-30 Zoltan Varga <vargaz@gmail.com>
139 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
140 CEE_STIND_REF when working with object references.
142 2006-05-30 Martin Baulig <martin@ximian.com>
144 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
145 mono_method_full_name() change and replace the ':' with a '.'
148 2006-05-30 Martin Baulig <martin@ximian.com>
150 * debug-mono-symfile.c
151 (mono_debug_symfile_lookup_location): Fix the algorithm:
152 when looking up B which is between A and C, return A not C.
154 2006-05-29 Martin Baulig <martin@ximian.com>
157 (MonoDebugMethodInfo): Make the typedef public.
158 (MonoDebugSourceLocation): New public struct.
161 (mono_debug_source_location_from_address): Removed.
162 (mono_debug_source_location_from_il_offset): Removed.
163 (mono_debug_il_offset_from_address): Removed.
164 (mono_debug_address_from_il_offset): Removed.
165 (mono_debug_lookup_method): New public function.
166 (mono_debug_lookup_source_location): New public function; replaces
167 the old mono_debug_source_location_from_*() functions; see the
168 inline documentation.
169 (mono_debug_free_source_location): New public function.
170 (mono_debug_print_stack_frame): New public function; see the
171 inline documentation.
173 * debug-mono-symfile.c
174 (mono_debug_find_source_location): Renamed into
175 mono_debug_symfile_lookup_location(); only take a
176 `MonoDebugMethodInfo *' and an `offset' argument; added inline
178 (mono_debug_find_method): Renamed into
179 mono_debug_symfile_lookup_method().
181 2006-05-27 Zoltan Varga <vargaz@gmail.com>
183 * assembly.c (mono_assembly_open_full): Dont overwrite the status
184 returned by mono_image_open_full ().
186 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
187 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
190 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
193 2006-05-27 Miguel de Icaza <miguel@novell.com>
195 * class.c (mono_class_from_typeref): handle missing images
196 earlier, deals with bug #78418. Refactor code;
198 Fix a warning introduced in my previous commit (some stale code
199 from before I revisited my patch).
201 * class.c (mono_class_create_from_typedef): On failure, remove the
202 class from the MonoImage->class_cache as the class is not
203 initialized; Fixes the leak pointed out by Paolo.
205 2006-05-25 Dick Porter <dick@ximian.com>
207 * threads.c (mono_thread_cleanup): Build fix. Comment out the
208 DeleteCriticalSections until I figure out which one may still be
209 sometimes locked when mono_thread_cleanup is called.
211 2006-05-24 Dick Porter <dick@ximian.com>
213 * threads.c (mono_thread_cleanup): Move the threading cleanup out
214 of mono_thread_manage and back into its own function, so it can be
215 called after the finalizer thread has finished.
217 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
219 2006-05-24 Zoltan Varga <vargaz@gmail.com>
221 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
224 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
225 with non-blittable elements.
226 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
228 2006-05-24 Martin Baulig <martin@ximian.com>
230 * mono-debug-debugger.h (MonoDebuggerEvent): Added
231 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
233 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
234 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
235 `mono_debugger_event_handler' to NULL.
237 2006-05-24 Martin Baulig <martin@ximian.com>
239 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
241 2006-05-24 Martin Baulig <martin@ximian.com>
243 * mono-debug-debugger.h
244 (mono_debugger_create_notification_function): Added
245 `MonoCodeManager *' argument.
247 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
249 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
251 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
253 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
254 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
257 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
259 * icall.c: precise GC support: objects can't be stored in unmanaged
260 memory anymore, even if they are kept alive by other references: since
261 they can move the GC needs to be able to always find them.
263 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
265 * object.c: precise GC support for static fields. Support
266 for moving GCs: write barriers and pinned allocation for interned
269 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
271 * domain.c, domain-internals.h: precise GC support for the MonoDomain
274 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
276 * class.c, gc.c: sgen and precise GC updates.
278 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
280 * marshal.h, marshal.c: added write barrier wrapper and precise type
283 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
285 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
288 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
290 * reflection.c: precise and sgen GC updates.
292 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
294 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
296 2006-05-22 Zoltan Varga <vargaz@gmail.com>
298 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
300 2006-05-20 Zoltan Varga <vargaz@gmail.com>
302 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
303 MONO_TYPE_OBJECT. Fixes #78462.
305 2006-05-18 Zoltan Varga <vargaz@gmail.com>
307 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
310 2006-05-17 Miguel de Icaza <miguel@novell.com>
312 * class.c (mono_class_get_exception_for_failure): Implement parts
313 of a TODO: if the loader error is set (instead of the class
314 error), we return a Loader exception that can be properly thrown
317 This was exposed by some Winforms 2.0 code that I tried to run
318 (Atsushi pointed me to it).
320 2006-05-17 Zoltan Varga <vargaz@gmail.com>
322 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
323 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
325 * marshal.c (emit_marshal_vtype): Add limited support for
326 UnmanagedType.LPStruct. Fixes #78427.
328 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
329 Applied a patch from kangaroo to fix #77523.
331 2006-05-17 Martin Baulig <martin@ximian.com>
334 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
335 (debugger_thread_created): Removed.
336 (debugger_thread_exited): Removed.
338 2006-05-15 Zoltan Varga <vargaz@gmail.com>
340 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
342 * object-internals.h (MonoReflectionResource): Sync with managed version.
344 2006-05-12 Wade Berrier <wberrier@novell.com>
346 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
348 2006-05-12 Zoltan Varga <vargaz@gmail.com>
350 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
351 functions try to allocate from the image mempool.
353 2006-05-12 Dick Porter <dick@ximian.com>
355 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
357 2006-05-12 Lluis Sanchez <lluis@ximian.com>
359 * object.c: The FieldGetter and FieldSetter methods require the full
360 name of the class, not only the name. Fixes bug #78277.
362 2006-05-11 Miguel de Icaza <miguel@novell.com>
364 * loader.c (method_from_memberref): Do not pass the NULL klass to
365 mono_loader_set_error_() methods. Pass the non-NULL value
368 2006-05-11 Zoltan Varga <vargaz@gmail.com>
370 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
371 (mono_assembly_close): Null out assembly->image->references after freeing it.
373 * image.c (mono_image_close): Free image->references.
375 * reflection.c (mono_image_basic_init): Fix a small memory leak.
377 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
379 * marshal.c: In function mono_mb_add_local don't use the mb pointer
380 before checking if it's NULL (g_assert).
382 2006-05-10 Martin Baulig <martin@ximian.com>
384 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
385 I thought I already killed that two months ago, but now it somehow reappeared.
387 2006-05-10 Martin Baulig <martin@ximian.com>
389 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
391 2006-05-10 Zoltan Varga <vargaz@gmail.com>
393 * reflection.c: Allocate memory for dynamically created methods in the image
396 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
398 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
399 don't use the ad pointer before checking if it's NULL (g_assert).
401 2006-05-09 Zoltan Varga <vargaz@gmail.com>
403 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
404 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
406 * marshal.c: Allocate all signatures from mempools.
408 * marshal.c: Allocate some more signatures from mempools.
410 2006-05-09 Miguel de Icaza <miguel@novell.com>
412 * object.c (mono_load_remote_field): The code used to provide a
413 temporary variable for returning results if the user did not
414 provide a result pointer. But our temporary variable was allocted
417 Fix calling code to always pass a result area. Coverity ID 103.
419 2006-05-06 Zoltan Varga <vargaz@gmail.com>
421 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
422 value, not the old. Fixes #78312.
423 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
425 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
426 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
429 * assembly.c (mono_assembly_close): Free image->references.
431 * assembly.c (mono_assembly_names_equal): Fix a warning.
432 (mono_assemblies_cleanup): Cleanup more global data.
434 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
436 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
437 ptr_cache and image->modules.
439 * image.c (mono_image_init): Allocate array_cache lazily.
441 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
443 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
444 behavior was changed recently and has bad side effects.
446 2006-05-05 Zoltan Varga <vargaz@gmail.com>
448 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
450 * assembly.c (mono_assembly_close): Remove a debug printf.
452 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
454 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
455 to also allow for temporary references between mono_image_open ()/close ().
457 * domain.c (get_runtimes_from_exe): Add a FIXME.
459 2006-05-04 Zoltan Varga <vargaz@gmail.com>
461 * marshal.c: Fix support for dynamic methods.
463 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
465 * marshal.c (mono_marshal_cleanup): New cleanup function.
467 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
470 * class.c (mono_class_init): Fix leaking class->nested_classes.
472 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
474 * image.c (mono_image_init): Initialize the new cashes.
476 * image.c (mono_image_close): Destroy the new cashes.
478 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
480 * mempool.c (mono_mempool_strdup): New helper function.
482 * class-internals.h: Add prototype for mono_loader_unlock ().
484 * domain.c (mono_jit_info_table_find): Fix a warning.
485 (mono_debugger_check_runtime_version): Ditto.
487 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
488 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
489 functions to these modules.
491 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
494 * marshal.c (mono_free_bstr): Fix a warning.
496 * assembly.c (mono_assembly_open_full): Fix another small leak.
498 * object.c: Fix some unload leaks in the remoting code.
500 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
503 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
505 * reflection.c: Fix some unload leaks in dynamic assemblies.
507 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
509 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
510 * marshal.h: Add BSTR support on Win32
511 * icall.c: Add BSTR icalls
512 * metadata.h: Add BSTR enums
514 2006-04-28 Miguel de Icaza <miguel@novell.com>
516 Work to catch the crash from #76795 and turn it into an
517 exception. As I stubbed out pieces of the VisualBasic support,
518 I found a number of places where the code was failing and I added
519 checks to those places.
521 * metadata.c (do_mono_metadata_parse_generic_class): Make this
522 function return a status code. If we fail to parse the signature
523 from mono_metadata_parse_generic_inst, return FALSE.
525 * loader.c (mono_get_method_from_token): If we fail to load the
526 method (mono_class_get) return NULL.
528 * (method_from_memberref): Return NULL if we are unable to parse
531 (mono_loader_error_prepare_exception): Since we now use the
532 loader_error flag internally to stop processing, and obtaining
533 exceptions that might be thrown will walk this code path the
534 proper way of going from a MonoLoaderError into a
535 MonoException was convoluted. This new routine encapsulates the
536 process of turning the error into an exception and *clearing* the
539 2006-04-27 Miguel de Icaza <miguel@novell.com>
541 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
542 with missing assemblies), and to cope with:
544 * Missing fieldref from a non-existing assembly.
545 * Missing methodref from a non-existing assembly.
547 The first batch of work to address *some* of the issues from 76661.
549 * object.c (mono_class_create_runtime_vtable): If we fail to
550 initialize the class raise the exception here.
552 * metadata.c (mono_class_get_overrides_full): If any methods fail
553 to load return the failure to the caller.
555 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
556 flagging assemblies that failed to load.
558 Do not crash if we are unable to load the assembly.
560 (mono_assembly_close): Do nothing with REFERENCE_MISSING
563 * loader.c (mono_loader_set_error_type_load): Change the
564 convention to always pass unallocated strings, so we make our own
565 copies (I know our own code had duplicated strings before, but
566 this keeps the normal conventions).
567 (method_from_memberref): Call mono_loader_set_error_method_load
568 for all possible failures of loading the class.
569 Remove assert, turn into a loader error.
571 (mono_loader_error_to_exception): Move this routine from mini
572 (mini_loader_error_to_exception) there was no need to have that in
575 * class.c (mono_class_from_typeref): If we were not able to load
576 the assembly with mono_assembly_load_reference, call the
577 mono_loader_set_error_type_load to register the problem.
579 (mono_class_setup_fields): If we fail to load the type from
580 mono_metadata_parse_type_full, call mono_class_set_failure and
583 If class->exception_type is set, we do not layout the fields as
584 that might crash the runtime, and instead return (from breaking
585 from the previous loop).
587 (mono_class_setup_vtable): This now returns a boolean indicating
588 whether the table was properly setup. The decision is driven by
589 mono_class_get_overrides_full which might run into non-existing
592 (mono_class_init): Returns TRUE on success or FALSE if there was a
593 problem in loading the type (incorrect assemblies, missing
594 assemblies, methods, etc).
596 When we call mono_class_setup_fields we also check for a potential
597 error inside this call (either a class exception or a general
600 (mono_class_create_from_typedef): If the parent fails to load
601 (calling mono_class_get_full) return NULL.
605 calls to mono_metadata_parse_type_full should be checked
606 everywhere and set the mono_class_set_failure
607 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
609 The current patch checks the places where my manually constructed
610 tests show the errors are showing up, but we should do it
615 mono_class_init return values should be tested everywhere, like
616 the previous case this is something that we should audit
617 everywhere and not only on the cases exposed by the tests I
620 2006-04-26 Miguel de Icaza <miguel@novell.com>
622 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
623 boolean parameter and instead pass the information on `options'
624 parameter (FileOptions).
626 * icall.c: Register the new signature for MonoIO.Open.
628 * debug-helpers.c (dis_one): Trying to understand how coverity
629 works. Fix Run 5, item 78.
631 2006-04-26 Dick Porter <dick@ximian.com>
633 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
636 2006-04-25 Martin Baulig <martin@ximian.com>
638 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
640 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
641 debugger_thread_created().
642 (debugger_gc_push_all_stacks): Don't handle the main thread in any
644 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
645 (mono_debugger_finalize_threads): New function; undo the effects
646 of mono_debugger_init_threads().
647 (mono_debugger_create_all_threads): Removed.
649 2006-04-24 Zoltan Varga <vargaz@gmail.com>
651 * image.c (mono_image_close): Tidy up trace messages.
653 * assembly.c (mono_assembly_close): Ditto.
655 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
656 no longer references an already freed assembly. Fixes #78168.
658 2006-04-21 Dick Porter <dick@ximian.com>
660 * threads.c (mono_thread_detach): Fix reference counting when
663 2006-04-21 Zoltan Varga <vargaz@gmail.com>
665 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
668 2006-04-19 Zoltan Varga <vargaz@gmail.com>
670 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
671 (mono_type_to_stind): Ditto.
673 * marshal.c: Use the new helper functions to simplify code.
675 * image.c (mono_image_close): Add some code for help debug assembly unloading
678 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
681 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
682 assembly was already loaded in another appdomain. Fixes #78083.
684 2006-04-13 Zoltan Varga <vargaz@gmail.com>
686 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
687 referenced assemblies.
688 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
690 * domain.c (mono_domain_free): Add a trace message.
692 * appdomain.c (add_assemblies_to_domain): Ditto.
694 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
697 2006-04-12 Zoltan Varga <vargaz@gmail.com>
699 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
701 2006-04-12 Martin Baulig <martin@ximian.com>
703 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
704 `USE_INCLUDED_LIBGC'.
706 2006-04-12 Zoltan Varga <vargaz@gmail.com>
708 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
709 the patch contains ../ and a small directory name later. Hopefully fixes
712 2006-04-10 Martin Baulig <martin@ximian.com>
714 Clean up the debugger's thread-handling code.
716 The debugger's thread-handling code has been moved from
717 ../mini/debug-debugger.c to threads.c. We now iterate directly
718 over the `threads' hash, keep track of exiting threads and also
721 We can now debug XSP and XSP based applications with the debugger.
723 * object-internals.h (MonoThread): Added `gpointer end_stack'.
726 (MonoThreadCallbacks): Removed; this was only used by the debugger.
727 (mono_install_thread_callbacks): Likewise.
729 * threads.c (mono_thread_callbacks): Removed.
730 (debugger_thread_created, debugger_thread_exited): New static functions.
731 (start_wrapper): Call debugger_thread_created().
732 (thread_cleanup): Call debugger_thread_exited().
733 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
734 (mono_debugger_init_threads): New public function.
735 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
736 iterate directly over the `threads' hash and also use proper locking.
738 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
740 * mono-debug-debugger.h
741 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
743 2006-04-10 Zoltan Varga <vargaz@gmail.com>
745 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
746 argument type=array. Fixes #78057.
748 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
750 * culture-info-table.h : regenerated. Fixed bug #69652.
752 2006-04-07 Zoltan Varga <vargaz@gmail.com>
754 * loader.c metadata.c: Reapply a variant r59116.
756 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
758 * class.c (mono_class_setup_interface_offsets): New internal function.
760 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
761 interfaces too. Fixes #77398.
763 * reflection.c (encode_cattr_value): Add support for
764 parameter type=object, argument type=array.
765 (load_cattr_value): Ditto. Fixes #77916.
767 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
768 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
770 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
771 a byval char array and CharSet is Ansi.
773 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
775 2006-04-06 Zoltan Varga <vargaz@gmail.com>
777 * metadata.c: Add some locking comments.
779 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
781 (mono_metadata_free_method_signature): Don't free the signature itself.
783 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
785 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
786 reference the same MonoImage.
787 (mono_assembly_load_from_full): Add an assert.
789 2006-04-05 Zoltan Varga <vargaz@gmail.com>
791 * image.c (mono_image_close): Don't put the image we are about to free into the
792 loaded_images_guid_hash.
794 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
795 to reduce code duplication.
797 * marshal.c: Register the native functions called by this module as icalls, to
798 somewhat centralize the creation of MonoMethodSignature's.
800 * loader.c (mono_method_signature): Add a cache for method signatures.
802 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
803 the parameter attributes of a method.
804 (mono_metadata_parse_method_signature_full): Refactored the computation of
805 parameter attributes into a separate function. Also avoid one allocation in
808 * assembly.c (mono_assembly_close): Ditto.
810 * image.c (mono_image_close): Log trace messages with INFO level.
812 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
814 * image.c reflection.c: Correct reference counting of image modules.
816 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
817 of this function from the image mempool.
819 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
820 to allow more cached types to be used.
822 * mono-debug.c (mono_debug_add_method): Appled patch from
823 David S. Miller <davem@sunset.davemloft.net>: Access
824 minfo->lexical_blocks[] entry elements using read32().
826 2006-04-04 Zoltan Varga <vargaz@gmail.com>
828 * loader.c (mono_free_method): No longer free the method header for non-dynamic
829 methods as it is allocated from the mempool.
831 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
834 * metadata-internals.h: Add comments describing the reference counting scheme
835 used for MonoImage and MonoAssembly.
837 * image.c assembly.c reflection.c: Rework reference counting of images and
838 assemblies so they are freed when the runtime is shut down. Free some
839 additional memory structures when an image is unloaded.
841 2006-04-03 Zoltan Varga <vargaz@gmail.com>
843 * class.c loader.c reflection.c: Allocate more data structures in
846 2006-03-31 Miguel de Icaza <miguel@novell.com>
849 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
850 build on pre glib 2.4 systems.
852 2006-03-31 Zoltan Varga <vargaz@gmail.com>
854 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
856 * icall.c: Fix some warnings.
858 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
860 * culture-info-table.h : regenerated.
862 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
864 * threads.c, object-internals.h, verify.c: changed the culture caching
865 code to use a normal MonoArray for storage so the GC can keep track of
866 them easily. Fixed bits of the cache logic, too and simplified the
869 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
871 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
872 thread for non-Boehm GCs.
874 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
876 * domain.c, object.c, domain-internals.h: reduce the amount of memory
877 needed to keep track of the data for static fields.
879 2006-03-29 Raja R Harinath <rharinath@novell.com>
882 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
883 for interface classes. Use 'num_methods' instead.
884 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
885 before using '->vtable_size' field.
887 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
889 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
890 doesn't contain managed pointers, so use a normal hashtable.
892 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
894 * reflection.c, class-internals.h, domain.c: fixed handling of types
895 used as values for objects in custom attributes (bug #77915):
897 2006-03-24 Martin Baulig <martin@ximian.com>
899 * class.c (mono_class_setup_fields): Added support for generic
900 instances; fixes #77580.
902 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
904 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
906 2006-03-24 Dick Porter <dick@ximian.com>
908 * file-io.c (get_file_attributes): More stat macro breakage.
911 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
913 * profiler.c: added the file=filename option in the default profiler
914 to output the profile data to filename.
916 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
918 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
921 2006-03-22 Martin Baulig <martin@ximian.com>
923 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
924 allocated `MonoClassField *' in `fb->handle'.
926 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
928 * class.c, image.c, metadata-internals.h: implemented new mechanism to
929 allocate interface ID to save memory and allow better ID reuse on
930 appdomain unload. setup_generic_vtable () removal from Martin.
932 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
934 * object.h, appdomain.c, domain.c, exception.c, icall.c,
935 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
936 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
937 write barriers for reference stores with managed objects accessed with
938 C structures in the runtime and in embedding programs.
940 2006-03-20 Raja R Harinath <rharinath@novell.com>
942 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
943 'interface_id' and 'max_interface_id' fields of MonoClasses
944 representing open generic types.
946 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
948 * object.h, object.c, icall.c: added functions to deal with
949 storing valuetypes that contain references in managed objects.
950 * reflection.c, string-icalls.c, threads.c, marshal.c: small
951 fixes and comments around uses of mono_array_addr ().
953 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
955 * object.h, icall.c, monitor.c: object.GetHashCode ()
956 implementation that supports the moving garbage collector.
958 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
960 * icall.c, threads-types.h, threads.c: implemented finalizer for
963 2006-03-15 Zoltan Varga <vargaz@gmail.com>
965 * metadata.c (mono_type_size): Add a fixme.
966 (mono_type_stack_size): Ditto.
968 * object-internals.h (MonoReflectionAssemblyBuilder): Added
969 'type_forwarders' field.
971 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
972 attribute from net 2.0.
974 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
977 * class.c (mono_class_setup_fields): Fix a warning.
979 * class.c (mono_class_from_name): Add support for assemblyref entries
980 in the EXPORTEDTYPE table.
982 * reflection.c: Add support for handling type forwarders under net 2.0.
984 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
986 2006-03-14 Zoltan Varga <vargaz@gmail.com>
988 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
989 overwriting entries in ModuleBuild->types, also clean up the code
990 a little. Fixes #77774.
992 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
994 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
995 load friend assembly info when present.
997 2006-03-14 Raja R Harinath <rharinath@novell.com>
999 Fix crasher on gtest-158.cs.
1000 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
1001 the return value if the MonoClass we want is yet in an
1003 * class.c (mono_class_create_from_typedef): Add an comment
1004 explaining an order dependency between mono_class_setup_parent and
1005 mono_class_setup_mono_type.
1007 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1009 * class.c: documentation updates and events bug fix.
1011 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1013 * class.c: some cleanup, locking fixes.
1015 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1017 * class.c: fix the generics code to setup nested
1018 type info to the instantiated type (bug #77770).
1020 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1022 * marshal.c: fixed a few type correctness issues.
1024 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1026 * loader.c: the Set/Get/Addrtess array methods should be public.
1028 2006-03-11 Zoltan Varga <vargaz@gmail.com>
1030 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
1032 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
1035 2006-03-10 Zoltan Varga <vargaz@gmail.com>
1037 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
1039 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
1041 * mempool.c (mono_mempool_alloc): Speed this up a bit.
1042 (mono_mempool_alloc0): Ditto.
1044 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1047 (create_object_from_sockaddr): it was allocating 4 extra bytes
1048 for the AF_UNIX data. Fixes bug #77747.
1050 2006-03-09 Zoltan Varga <vargaz@gmail.com>
1052 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
1054 2006-03-09 Dick Porter <dick@ximian.com>
1056 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
1057 Fixes bug 76966 again.
1059 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
1061 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
1063 * appdomain.c: Bumped corlib version to 48 (due to r57532)
1065 2006-03-07 Martin Baulig <martin@ximian.com>
1068 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
1070 2006-03-07 Martin Baulig <martin@ximian.com>
1073 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
1074 regression introduced in r56970; see gtest-252.cs.
1076 * loader.c (mono_get_method_constrained): Correctly handle generic
1077 methods; see gtest-253.cs.
1079 2006-03-04 Zoltan Varga <vargaz@gmail.com>
1081 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
1083 2006-03-04 Martin Baulig <martin@ximian.com>
1085 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
1086 compute the parent type at runtime, just like we're already doing
1090 (mono_reflection_bind_generic_parameters): Don't compute the
1091 parent type anymore.
1093 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
1095 2006-03-04 Martin Baulig <martin@ximian.com>
1097 * mono-debug-debugger.h
1098 (mono_debugger_create_notification_function): Allocate memory at
1099 runtime and return a pointer to it.
1101 2006-03-03 Zoltan Varga <vargaz@gmail.com>
1103 * assembly.c: Fix windows build.
1105 * assembly.c: Fix build.
1107 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
1109 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
1111 2006-03-03 Dick Porter <dick@ximian.com>
1114 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1115 Check parameters before dereferencing them. Fixes Aaron's part of
1118 2006-03-03 Raja R Harinath <rharinath@novell.com>
1120 Fix performance regression.
1121 * loader.c (find_method_in_class): Add 'from_class' argument.
1122 Rename 'klass' argument to 'in_class'. The signature is compared
1123 against the method in 'in_class', and the corresponding method is
1124 returned from 'from_class'.
1125 (find_method): Walk both 'in_class' and 'from_class' in parallel.
1126 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
1127 type definition and generic instantiation in parallel.
1128 (mono_get_method_constrained): Update to changes.
1130 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1132 * threads.c: make sure the domain is correct, too when doing
1133 mono_thread_attach ().
1135 2006-03-01 Zoltan Varga <vargaz@gmail.com>
1137 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
1138 windows. Fixes #77683.
1140 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
1142 * object.h, *: introduced specific way to set elements of an array
1143 of references to be used as write barrier. Still need to audit the
1144 uses of mono_array_addr.
1146 2006-03-01 Miguel de Icaza <miguel@novell.com>
1148 * object-internals.h: New field to cache the assmebly name, patch
1149 from Tambet Ingo (tambet@ximian.com)
1151 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1153 * decimal.h, class-internals.h, metadata-internals.h,
1154 file-io.h: mark a few function declarations as internal, to
1155 reduce the number of PLT entries.
1157 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1159 * file-io.c: fix typo in warning message.
1161 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
1163 * loader.c: on unix, lookup the "*A" version of a function
1164 if charset is auto as a second option before failing.
1166 2006-02-28 Raja R Harinath <rharinath@novell.com>
1168 * class.h (mono_class_inflate_generic_method): Revert to two
1170 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
1171 (mono_class_inflate_generic_method_full): Add.
1172 * class.c (mono_class_inflate_generic_method_full): Rename from
1173 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
1174 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
1175 * loader.c, reflection.c: Update to changes.
1177 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
1179 * icall.c: const fixes and small improvements.
1181 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1183 * threadpool.c: for asynchronous connect(), enable the same workaround
1184 for BSD 6 as for the Mac. Fixes bug #77637.
1186 2006-02-24 Zoltan Varga <vargaz@gmail.com>
1188 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
1189 formatted classes. Fixes #77524.
1191 2006-02-24 Raja R Harinath <rharinath@novell.com>
1193 * class.c (inflate_generic_type): Add a couple more
1194 micro-optimizations.
1195 (inflate_generic_context): Don't use the 'gmethod' from
1197 (mono_class_inflate_generic_method): If the method has generic
1198 parameters, but the passed-in context doesn't have a 'gmethod',
1199 create one. Use the possibly simplified generic instantiation
1200 from the declaring class instead of the one passed in.
1202 2006-02-24 Raja R Harinath <harinath@gmail.com>
1204 Make generic method signature and method header handling lazy.
1205 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
1206 (inflate_generic_header): Likewise.
1207 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
1208 parameter to avoid inflating types.
1209 (mono_get_inflated_method): Empty out.
1210 * class.h (mono_class_inflate_generic_method): Update to changes.
1211 * loader.c (mono_get_method_from_token): Don't parse signature for
1212 generic methods, nor methods of generic classes.
1213 (mono_method_signature): Rename from 'mono_method_signature'.
1214 Inflate signature on demand.
1215 (mono_method_get_header): Inflate method header on demand.
1216 * reflection.c: Update to changes.
1218 2006-02-23 Raja R Harinath <rharinath@novell.com>
1220 * metadata.c (mono_metadata_inflate_generic_inst): If the
1221 instantiation is closed, don't bother expanding it in the new
1223 * class.c (inflate_generic_class): If the generic instantiation
1224 doesn't change after inflation, return the argument itself.
1225 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
1227 (inflate_generic_context): If neither the generic class nor the
1228 generic method instantiations change, return the original context.
1229 * reflection.c (mono_method_get_object): Do
1230 'mono_get_inflated_method' before accessing the ->klass field.
1231 (inflate_mono_method): Don't create a MonoGenericMethod unless
1233 (inflate_method): Don't pass a constructed type as the declaring
1234 type of a methodbuilder.
1236 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
1238 * object.c: fix memory overwrite.
1240 2006-02-22 Dick Porter <dick@ximian.com>
1242 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
1243 it doesn't work any more.
1244 (mono_threads_request_thread_dump): Fix unused variable warnings.
1246 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1248 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
1249 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
1250 the public header file.
1252 2006-02-21 Zoltan Varga <vargaz@gmail.com>
1254 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
1256 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
1258 * class-internals.h, object.c: reduce the size of MonoVTable
1259 and store the interface_offsets array at negative offsets.
1261 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
1263 * metadata.c: tweak table descriptors data structures to reduce
1264 size and runtime relocations.
1266 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1268 * marshal.c: fix some types and opcodes to be type-safe
1269 in marshaling wrappers.
1271 2006-02-21 Ankit Jain <jankit@novell.com>
1273 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
1275 2006-02-21 Raja R Harinath <rharinath@novell.com>
1277 * metadata.c (get_constraints): Relax debugging checks for monodis.
1279 2006-02-21 Ankit Jain <jankit@novell.com>
1281 * metadata.c (mono_metadata_load_generic_params): Move the code
1282 checking for ambiguous generic params from here to mono/dis/get.c
1283 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
1285 2006-02-21 Raja R Harinath <harinath@gmail.com>
1287 Fix assertion triggered when compiling nemerle.
1288 * class.c (mono_get_shared_generic_inst): Rename from
1289 get_shared_inst and make non-static.
1290 * loader.c (mono_get_shared_generic_method): New. Used to create
1291 the MonoGenericContext-equivalent of a MonoGenericContainer.
1292 (mono_get_method_from_token): Initialize the 'context' field of
1293 the created MonoGenericContainer.
1294 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
1295 * metadata.c (get_constraints): Add sanity check.
1296 * class-internals.h: Add new internal methods.
1298 * reflection.c (verify_safe_for_managed_space): New sanity check.
1299 Currently checks that owner-less generic parameters aren't allowed
1301 (mono_type_get_object): Use it.
1302 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
1303 that are now in mono_type_get_object.
1304 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
1306 2006-02-19 Raja R Harinath <harinath@gmail.com>
1308 * metadata.c (mono_type_create_from_typespec): Rename from
1309 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
1310 argument and caching of types in the generic container.
1311 (unwrap_arrays, find_generic_param): Remove.
1312 * metadata-internals.h: Update.
1313 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
1315 2006-02-18 Zoltan Varga <vargaz@gmail.com>
1317 * class.c (mono_class_get_exception_for_failure): Fix a warning.
1319 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
1320 return values. Fixes #77581.
1322 * class.c (mono_fnptr_class_get): Switch name and name_space.
1324 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
1325 classes and add support for [In, Out] attributes.
1326 (mono_marshal_free_asany): Ditto. Fixes #77524.
1328 2006-02-18 Raja R Harinath <harinath@gmail.com>
1330 * class.c (mono_class_from_generic_parameter): Make more robust to
1331 incomplete MonoGenericContainers from monodis.
1333 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1335 * class-internals.h: added some more exception types.
1336 * class.c, metadata.c: added a few checks to handle missing
1339 2006-02-17 Raja R Harinath <rharinath@novell.com>
1341 Use owner-less generic-params some more.
1342 * class.c (my_mono_class_from_generic_parameter): Remove.
1343 (mono_class_from_generic_parameter): Handle null image,
1344 param->name and param->owner.
1345 (mono_class_from_mono_type): Update.
1346 (mono_class_create_from_typespec): Remove 'container' parameter.
1347 If that parameter is non-null, the result is always inflated by
1348 'mono_class_get_full' anyway.
1349 (mono_class_get): Rename from _mono_class_get. Remove 'container'
1351 (mono_class_get_full): Update.
1353 * class.c (inflate_generic_type) [GENERICINST]: If the generic
1354 instance is not open, don't bother inflating.
1355 (mono_class_setup_fields): Hoist some loop-invariants. Don't
1356 parse metadata for inflated classes.
1357 (_mono_class_get): Change GenericContext* parameter to
1359 (mono_class_create_from_typespec): Likewise. Simplify, and
1360 implement trivially. All the cases are handled in
1361 mono_class_from_mono_type. Don't inflate returned class.
1362 (mono_class_get_full): Delegate GENERICINST optimization to
1363 inflate_generic_type.
1364 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
1366 2006-02-16 Dick Porter <dick@ximian.com>
1368 * socket-io.c (create_object_from_sockaddr): Fix typo.
1369 (create_sockaddr_from_object): Check array lengths before
1370 potentially accessing items off the end.
1371 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
1372 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
1373 (ves_icall_System_Net_Sockets_Socket_Send_internal)
1374 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
1375 length checks to avoid wraparound overflows.
1376 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
1377 contents of the array of sockets
1378 (hostent_to_IPHostEntry2)
1379 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
1380 Check return value of inet_ntop ().
1381 (addrinfo_to_IPHostEntry): Fix typo
1383 2006-02-16 Raja R Harinath <rharinath@novell.com>
1385 Type metadata parsing doesn't use generic-instantiation information.
1386 * metadata.c (mono_metadata_parse_array_full): Change
1387 MonoGenericContext* parameter to MonoGenericContainer*.
1388 (mono_metadata_parse_type_full): Likewise.
1389 (mono_type_create_from_typespec_full): Likewise.
1390 (mono_metadata_parse_mh_full): Likewise.
1391 (mono_metadata_parse_generic_inst): Likewise.
1392 (do_mono_metadata_parse_generic_class): Likewise.
1393 (do_mono_metadata_parse_type): Likewise.
1394 * metadata-internals.h: Update to changes.
1395 * class.c (mono_class_find_enum_basetype): Likewise.
1396 (mono_class_setup_fields): Likewise.
1397 (mono_class_create_from_typespec): Likewise.
1398 * loader.c (method_from_methodspec): Likewise.
1399 (mono_get_method_from_token): Likewise.
1400 (mono_method_get_header): Likewise.
1402 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1404 * marshal.c: handle additional GENERICINST case (patch from
1405 Thong Nguyen <tum@veridicus.com>).
1406 Fix a few cases where LDIND_I/STIND_I was used for references.
1408 2006-02-16 Raja R Harinath <rharinath@novell.com>
1410 * reflection.c (mono_reflection_get_token): Remove unused variable.
1412 2006-02-16 Martin Baulig <martin@ximian.com>
1414 * reflection.c (mono_reflection_get_token): Add support for fields
1415 in instantiated generic types.
1418 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
1420 2006-02-15 Martin Baulig <martin@ximian.com>
1423 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
1424 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
1425 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
1426 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
1428 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
1430 * class.c, metadata.c, metadata.h, object.c, icall.c,
1431 marshal.c: changed mono_type_get_underlying_type () to do
1432 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
1433 Fixed handling of instantiated generic valuetypes (bug #75479).
1435 2006-02-15 Raja R Harinath <rharinath@novell.com>
1437 * metadata.c (mono_metadata_decode_signed_value): Simplify.
1438 Delegate to mono_metadata_decode_value, and work on the returned value.
1440 * icall.c (ves_icall_MonoType_GetGenericArguments):
1441 Add consistency check here too.
1443 2006-02-15 Ankit Jain <jankit@novell.com>
1445 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
1448 2006-02-15 Ankit Jain <jankit@novell.com>
1450 * metadata.c (mono_metadata_decode_signed_value): New function to decode
1451 signed values, used only for representing lower bounds of arrays.
1452 (mono_metadata_parse_array_full): Use new
1453 mono_metadata_decode_signed_value to decode lower bounds.
1455 2006-02-14 Martin Baulig <martin@ximian.com>
1458 (mono_reflection_get_token): Support "MonoGenericMethod" and
1459 "MonoGenericCMethod" and allow generic instances / methods.
1461 2006-02-11 Zoltan Varga <vargaz@gmail.com>
1463 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
1464 to obtain the terminal size using an ioctl.
1466 * object.c (mono_nullable_init): Revert this as nullable reference
1467 types are not valid.
1468 (mono_nullable_box): Ditto.
1470 2006-02-09 Dick Porter <dick@ximian.com>
1472 * threads.c (mono_thread_detach): Drop a reference to the thread
1475 2006-02-09 Zoltan Varga <vargaz@gmail.com>
1477 * object.c (mono_nullable_init): Handle nullable reference types.
1478 (mono_nullable_box): Ditto. Fixes #77446.
1480 2006-02-07 Martin Baulig <martin@ximian.com>
1482 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
1484 2006-02-07 Ankit Jain <jankit@novell.com>
1486 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
1487 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
1488 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
1489 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
1490 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
1491 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
1493 2006-02-02 Zoltan Varga <vargaz@gmail.com>
1495 * class.c (mono_class_create_generic): Set type_token as well.
1497 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
1500 2006-02-02 Martin Baulig <martin@ximian.com>
1502 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
1503 has never been used so far.
1505 2006-02-02 Martin Baulig <martin@ximian.com>
1507 * mono-debug-debugger.h: Changed comment at the top of this file;
1508 the header is not installed, but it's safe to #include it from
1511 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
1512 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
1514 2006-02-02 Martin Baulig <martin@ximian.com>
1517 (MonoSymbolTable): Removed the `metadata_info' field.
1520 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
1522 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1523 (mono_debugger_add_builtin_types): Removed.
1524 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
1525 (mono_debugger_create_notification_function): We now operate on a
1526 pre-allocated area; take a `gpointer' and return `void'.
1528 * mono-debug-debugger.c
1529 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
1530 (mono_debugger_add_builtin_types): Removed.
1532 2006-02-02 Martin Baulig <martin@ximian.com>
1534 * threads.c (mono_debugger_create_all_threads): New public method.
1536 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1538 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
1539 breaks on several platforms.
1541 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
1543 * assembly.c: the VS.NET build doesn't supply default values for
1544 MONO_ASSEMBLIES and MONO_CFG_DIR.
1546 2006-02-01 Zoltan Varga <vargaz@gmail.com>
1548 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
1551 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
1553 * loader.c (method_from_memberref): Fix a warning.
1555 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
1557 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
1558 with explicit layout. Fixes #77433.
1560 2006-01-31 Zoltan Varga <vargaz@gmail.com>
1562 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
1563 max_interface_id is initialized before using it. Fixes #77398.
1564 (ves_icall_Type_GetInterfaces): Ditto.
1566 2006-01-30 Raja R Harinath <rharinath@novell.com>
1568 * metadata.c (mono_metadata_parse_method_signature_full): Don't
1569 allocate memory for parameter attributes when parsing memberref
1571 * loader.c (mono_loader_set_error_method_load): Don't warn.
1572 (method_from_memberref): Ensure MissingMethodException gets thrown
1573 if method is not found. Make warning more informative.
1575 2006-01-29 Raja R Harinath <harinath@gmail.com>
1578 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
1579 return true if is byref.
1580 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
1581 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
1582 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
1584 2006-01-27 Raja R Harinath <rharinath@novell.com>
1586 Fix tests/find-method.2.il
1587 * loader.c (find_method, find_method_in_class): Remove is_inflated
1588 argument. Revert 2006-01-18 change.
1589 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
1590 is generic, search for method in its generic definition.
1591 * class.c (mono_class_setup_vtable_general): Print generic
1592 arguments of generic types in debugging printf.
1594 2006-01-26 Zoltan Varga <vargaz@gmail.com>
1596 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
1598 * threads.c (mono_threads_request_thread_dump): New helper function.
1600 2006-01-25 Raja R Harinath <rharinath@novell.com>
1602 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
1604 2006-01-25 Ankit Jain <jankit@novell.com>
1606 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
1607 move definition to ..
1608 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
1610 2006-01-25 Ankit Jain <jankit@novell.com>
1611 Raja R Harinath <rharinath@novell.com>
1613 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
1614 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
1617 2006-01-25 Martin Baulig <martin@ximian.com>
1619 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
1620 `MonoDebuggerThread' into debug-debugger.c.
1622 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
1624 * profiler.c: fix printing of data.
1626 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
1628 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
1629 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
1631 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
1633 * object.c: fix deadlock related to string interning.
1635 2006-01-23 Martin Baulig <martin@ximian.com>
1637 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1639 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
1641 2006-01-23 Martin Baulig <martin@ximian.com>
1643 * mono-debug.h: Moved the prototypes of some functions which are
1644 used by the JIT here from mono-debug-debugger.h.
1646 2006-01-21 Martin Baulig <martin@ximian.com>
1648 * Makefile.am: Don't install mono-debug-debugger.h.
1650 2006-01-21 Martin Baulig <martin@ximian.com>
1652 * mono-debug-debugger.h: Enforce the private status of this header
1653 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
1654 Moved some stuff from mono-debugger-jit-wrapper.h here.
1656 2006-01-20 Raja R Harinath <rharinath@novell.com>
1658 * class.c (mono_class_from_typeref): Add a sanity test to help
1659 catch lack of assembly load/search hooks.
1661 2006-01-19 Zoltan Varga <vargaz@gmail.com>
1663 * marshal.c (emit_struct_conv): Relax the fields with same offset
1664 check even more. Fixes #77230.
1666 2006-01-18 Martin Baulig <martin@ximian.com>
1668 * loader.c (find_method_in_class): Added `gboolean is_inflated'
1669 argument; if false, we compare the uninstantiated signatures.
1670 (method_from_memberref): Compare the uninstantiated signatures;
1673 2006-01-18 Robert Jordan <robertj@gmx.net>
1675 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
1676 Clear the weak link. Fixes bug #77170.
1678 * gc.c (mono_gchandle_free):
1679 Reflect *-gc.c changes (tiny optimization).
1681 2006-01-18 Zoltan Varga <vargaz@gmail.com>
1683 * metadata.c (mono_metadata_signature_dup): Applied patch from
1684 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
1687 2006-01-17 Zoltan Varga <vargaz@gmail.com>
1689 * marshal.c (emit_struct_conv): Allow fields with the same offset when
1690 marshalling from native to managed code. Fixes #77230.
1692 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1694 * threadpool.c: fix problem (Mac only) when more than one asynchronous
1695 connect. Fixes bug #77020.
1697 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
1699 * class.c: fixed id assignement for nested interfaces (bug #77275).
1700 Added also better info for --print-vtable debugging.
1702 2006-01-12 Martin Baulig <martin@ximian.com>
1704 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
1705 interfaces on-the-fly; fixes #76625.
1708 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
1709 don't need that anymore.
1711 2006-01-12 Miguel de Icaza <miguel@novell.com>
1714 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
1715 To avoid initing the nested_classes when not needed I turned the
1716 PeerCredData as a toplevel internal class, as it has to be shared
1719 Fixes the CASA issue.
1721 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
1723 * domain.c: Accessors for MonoJitInfo
1725 * profiler-private.h: Add jitinfo to the end jit hook
1727 * profiler.[ch]: Define new hooks, called after jitting which give
1728 the MonoJitInfo that was compiled
1730 2006-01-10 Martin Baulig <martin@ximian.com>
1732 * class.c (mono_class_setup_events): Add support for generic
1733 classes; fixes #76440.
1735 2006-01-06 Raja R Harinath <rharinath@novell.com>
1738 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
1739 on passed-in method.
1741 2006-01-03 Zoltan Varga <vargaz@gmail.com>
1743 * object.c (mono_runtime_invoke_array): Add Nullable support.
1745 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
1747 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
1749 * file-io.c: Don't consider sockets as directory and avoid an endless
1750 loop. Fix bug #76966.
1752 2006-01-03 Zoltan Varga <vargaz@gmail.com>
1754 * object.c (mono_nullable_init): New helper function.
1755 (mono_nullable_box): Ditto.
1757 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
1759 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
1761 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
1763 2006-01-02 Zoltan Varga <vargaz@gmail.com>
1765 * class.c (mono_class_is_assignable_from): Make T assignable to
1768 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
1770 * appdomain.c: Bump corlib version to 46.
1771 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
1772 serialization purpose) and changed ves_icall_System_Reflection_
1773 Assembly_get_code_base signature to accept a boolean (to escape, or
1774 not, the assembly code base).
1776 2005-12-23 Dick Porter <dick@ximian.com>
1780 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
1781 CreateEvent icall now returns "created" boolean parameter.
1783 2005-12-22 Zoltan Varga <vargaz@gmail.com>
1785 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
1788 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
1789 when attr_klass is an interface. Fixes #77045.
1791 2005-12-20 Zoltan Varga <vargaz@gmail.com>
1793 * marshal.c (emit_struct_conv): Fix previous patch.
1795 * marshal.c (emit_struct_conv): Add a check for fields with the same
1798 2005-12-20 Raja R Harinath <rharinath@novell.com>
1800 Fix regression in Mono.C5.
1801 * class.c (mono_class_create_generic): If 'klass' is an interface
1802 set up the interface offsets.
1803 (mono_class_is_assignable_from): Don't throw away generic arguments.
1805 2005-12-19 Raja R Harinath <rharinath@novell.com>
1807 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
1810 2005-12-15 Raja R Harinath <rharinath@novell.com>
1812 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
1814 (do_mono_metadata_parse_generic_class): Don't pass the current
1815 generic context when parsing the type being instantiated: it
1816 cannot use it, anyway.
1818 * loader.c (method_from_memberref): Don't inflate a signature if
1819 it doesn't contain any type parameters.
1821 2005-12-15 Zoltan Varga <vargaz@gmail.com>
1823 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
1825 2005-12-14 Martin Baulig <martin@ximian.com>
1828 (mono_type_get_name_recurse): Don't return null for type
1829 parameters and open generic classes.
1830 (mono_class_setup_methods): Don't exclude generic instances.
1831 (mono_get_unique_iid): Use different IDs for different
1832 instantiations of the same generic type.
1833 (mono_class_setup_vtable): Only use setup_generic_vtable() for
1834 open generic instances; create a normal vtable for closed generic
1836 (mono_class_setup_vtable_general): We're now also called for
1837 closed generic instances.
1840 (mono_reflection_bind_generic_parameters): Correctly use
1841 mono_metadata_lookup_generic_inst() everywhere.
1843 2005-12-14 Zoltan Varga <vargaz@gmail.com>
1845 * object.c (mono_class_create_runtime_vtable): Call
1846 mono_class_setup_vtable ().
1848 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
1850 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
1853 * loader.c (mono_loader_set_error_type_load): Print the type load
1854 warnings to the console so they are more visible to the user.
1855 (mono_loader_set_error_method_load): Ditto.
1857 * reflection.c (ensure_runtime_vtable): Revert the last change as it
1860 * reflection.c (ensure_runtime_vtable): Fix build.
1862 * reflection.c (ensure_runtime_vtable): Disable an optimization which
1863 doesn't work in all cases.
1865 2005-12-13 Zoltan Varga <vargaz@gmail.com>
1867 * object.c (mono_array_new_full): Treat a single dimensional array
1868 with 0 lower bounds as an szarray. Fixes #76973.
1870 * reflection.c (custom_attr_visible): Really fix this.
1872 2005-12-12 Zoltan Varga <vargaz@gmail.com>
1874 * reflection.c (custom_attr_visible): Allow nested public attributes
1877 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
1880 2005-12-12 Raja R Harinath <harinath@gmail.com>
1882 * class.c (set_generic_param_owner): Delete.
1883 (mono_class_create_from_typedef): Don't set ->owner field of
1884 generic parameters to "param containers" of enclosing classes.
1885 * reflection.c (mono_reflection_initialize_generic_parameter):
1888 2005-12-11 Zoltan Varga <vargaz@gmail.com>
1890 * reflection.c (custom_attr_visible): Fix build.
1892 2005-12-10 Zoltan Varga <vargaz@gmail.com>
1894 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
1897 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
1898 handling of null parameter defaults.
1900 2005-12-09 Raja R Harinath <rharinath@novell.com>
1902 * class.c (mono_class_from_generic_parameter): Don't set
1903 klass->generic_container.
1904 (my_mono_class_from_generic_parameter): Likewise.
1906 2005-12-07 Zoltan Varga <vargaz@gmail.com>
1908 * reflection.c (load_public_key): Fix a warning.
1909 (method_encode_code): Fix unaligned accesses.
1911 2005-12-07 Martin Baulig <martin@ximian.com>
1913 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
1916 (write_generic_param_entry): Encode our custom attrs.
1918 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
1920 2005-12-07 Martin Baulig <martin@ximian.com>
1922 * reflection.c (encode_new_constraint): Removed; we don't use the
1923 `NewConstraintAttribute' anymore.
1925 2005-12-06 Zoltan Varga <vargaz@gmail.com>
1927 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
1928 not fire a TypeResolve event when Assembly.GetType () is called.
1930 2005-12-05 Ben Maurer <bmaurer@ximian.com>
1932 Beginning of support for nullable types in the runtime. Parts of
1933 this patch are from Martin.
1935 * appdomain.c (MONO_CORLIB_VERSION): Bump
1937 * domain.c (mono_init_internal): get the nullable type
1939 * class.c (mono_class_is_nullable): New method
1940 (mono_class_get_nullable_param): New mehod
1941 (mono_class_create_generic): In types T? set cast_class to T
1943 * class-internals.h (MonoDefaults): new nullable default class
1944 (mono_class_get_nullable_param, mono_class_get_nullable_param):
1947 2005-12-05 Raja R Harinath <rharinath@novell.com>
1949 * metadata.c (select_container): New. Refactor code to select the
1950 appropriate GenericContainer given the type of generic parameter
1952 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
1953 not a MonoGenericContext. Use select_container. Update parameters.
1954 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
1956 (unwrap_arrays): Remove duplicate tests.
1957 (find_generic_param): Rename from 'has_same_context'. Now walks a
1958 generic instantiated class to find any arguments that are generic
1960 (mono_type_create_from_typespec_full): Use find_generic_param to
1961 avoid evicting some generic instantiations from the typespec
1964 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
1966 * reflection.c: fixed writing of doubles on ARM FPA.
1968 2005-12-02 Robert Jordan <robertj@gmx.net>
1970 * icall.c: Fixed EventInfo.ReflectedType (#76829).
1972 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1974 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
1975 least on SUSE 10 they are not the same (on debian, they are just the
1978 2005-12-01 Raja R Harinath <rharinath@novell.com>
1980 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
1981 DeclaringType for VARs and MVARs.
1982 * class.c (set_generic_param_owner): Fix initialization of owner
1985 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
1987 * icall.c: fixed Enum.ToObject() to correctly convert the values.
1989 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1991 * threadpool.c: workaround for a bug that shows up on the Mac:
1992 select()+connect() on a blocking socket is not like it should
1993 be, so we proceed to connect() in that case, wasting the I/O
1994 threadpool thread until connect succeedes. Fixes bug #75436.
1996 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1998 * threadpool.c: fix typo when setting file descriptor states.
2000 2005-11-28 Raja R Harinath <rharinath@novell.com>
2002 * class-internals.h (MonoGenericContainer.is_signature): Remove.
2003 * metadata.c (mono_metadata_parse_method_signature_full): Don't
2004 create a temporary signature container.
2005 (mono_metadata_parse_generic_param): Update to changes.
2006 (mono_type_create_from_typespec_full): Update to changes.
2007 * loader.c (method_from_memberref): Don't use a
2008 MonoGenericContainer while parsing a memberref signature.
2009 (method_from_methodspec): Remove dead-store of the 'container'
2010 variable. It's overwritten before use.
2012 * metadata.c (mono_type_create_from_typespec_full): Make debugging
2014 (mono_metadata_parse_generic_param): Likewise.
2015 * loader.c (find_method_in_class): Does not need a
2016 MonoGenericContainer. Use 'mono_method_signature' rather than
2017 'mono_method_signature_full'.
2018 (find_method, mono_get_method_constrained, method_from_memberref):
2021 * metadata.c (mono_type_create_from_typespec_full): Ensure that
2022 owner-less generic-parameters are never evicted from the typespec
2025 * loader.c (method_from_memberref): Don't use the current context
2026 when parsing signatures.
2027 (method_from_methodspec, mono_get_method_from_token): Update to changes.
2029 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
2030 side-effects in g_assert.
2031 * loader.c (mono_get_method_from_token): Resolve klass earlier so
2032 that we don't potentially lose information.
2034 2005-11-26 Dick Porter <dick@ximian.com>
2037 * threads.c: icalls to implement basic (ie, not named)
2038 System.Threading.Semaphore.
2040 2005-11-24 Dick Porter <dick@ximian.com>
2043 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2044 Use GetProcessId() if it's available.
2046 2005-11-23 Zoltan Varga <vargaz@gmail.com>
2048 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
2050 2005-11-23 Raja R Harinath <rharinath@novell.com>
2051 Ankit Jain <jankit@novell.com>
2053 * loader.c (mono_get_method_from_token): Initialize 'method' field
2054 of all generic parameters before parsing the signature. Remove
2055 code that "fixed"-up MVAR references.
2057 2005-11-23 Ankit Jain <jankit@novell.com>
2059 * metadata.c (mono_metadata_has_generic_params):
2060 (mono_metadata_load_generic_param_constraints):
2061 (mono_metadata_load_generic_params): Move duplicate code ...
2062 (mono_metadata_get_generic_param_row): ... here. Returns the
2063 first row-id in GenericParam table for a given owner (token).
2064 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
2067 2005-11-23 Raja R Harinath <rharinath@novell.com>
2068 Ankit Jain <jankit@novell.com>
2070 * metadata.c (mono_metadata_class_equal): Pass signature_only when
2072 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
2073 type->data.generic_param only if the type is an MVAR.
2074 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
2075 leak owner-less VARs and MVARs into managed space.
2077 2005-11-21 Martin Baulig <martin@ximian.com>
2080 (MonoMethod): Moved the `generic_container' here from
2081 `MonoMethodNormal' since we now also need it for
2082 `MonoMethodPInvoke';
2083 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
2084 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
2085 an union containing both `MonoMethodNormal' and
2086 `MonoMethodPInvoke'.
2089 (mono_get_method_from_token): Allow implementing generic methods
2093 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
2096 2005-11-17 Dick Porter <dick@ximian.com>
2100 * process.c: Split the Process Start_internal icall into
2101 ShellExecuteEx_internal and CreateProcess_internal, which are
2102 called depending on whether UseShellExecute is true. Fixes bug
2105 * appdomain.c (MONO_CORLIB_VERSION): Incremented
2107 2005-11-17 Zoltan Varga <vargaz@gmail.com>
2109 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
2110 'msize' parameters, use the information in 'mspec' instead.
2111 (emit_object_to_ptr_conv): Ditto.
2113 * marshal.c (emit_struct_conv): Handle explicit layout structs with
2114 fields out of order. Fixes #76733.
2116 2005-11-17 Ankit Jain <jankit@novell.com>
2118 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
2120 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
2122 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
2125 2005-11-16 Zoltan Varga <vargaz@gmail.com>
2127 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
2128 for types with non-auto layout. Fixes #76717.
2130 2005-11-16 Ankit Jain <jankit@novell.com>
2132 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
2133 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
2134 if generic_context is null.
2135 (mono_metadata_generic_param_equal): param->owner can be null.
2136 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
2139 2005-11-16 Zoltan Varga <vargaz@gmail.com>
2141 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
2144 2005-11-15 Martin Baulig <martin@ximian.com>
2146 * object.c (set_value): Use mono_class_from_mono_type() instead of
2147 the hack for generic instances; fixes #76136.
2149 2005-11-15 Zoltan Varga <vargaz@gmail.com>
2151 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
2154 * image.c (load_metadata_ptrs): Initialize the new fields.
2156 * reflection.c (create_dynamic_mono_image): Ditto.
2158 * reflection.c (build_compressed_metadata): Use the new fields.
2160 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
2163 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
2166 2005-11-15 Ankit Jain <jankit@novell.com>
2167 Raja R Harinath <harinath@gmail.com>
2169 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
2170 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
2171 new per-generic_container cache if the cached MonoType's context matches
2172 the current context.
2173 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
2174 to the expected context.
2175 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
2177 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2179 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
2180 we changed the signature of an icall.
2181 * icall.c: Modify to mono_double_ParseImpl return true/false
2182 depending on the success, instead of throwing the exception. This will
2183 help us in Double.TryParse methods.
2185 2005-11-14 Zoltan Varga <vargaz@gmail.com>
2187 * marshal.c (emit_marshal_object): Throw an exception when
2188 marshalling 'object' instead of crashing. Fixes #76696.
2190 2005-11-11 Zoltan Varga <vargaz@gmail.com>
2192 * class-internals.h: Add prototype for mono_type_get_full_name ().
2194 2005-11-11 Dick Porter <dick@ximian.com>
2196 * threads.c (mono_thread_manage): Make sure the main thread has
2197 abandoned all its mutexes when cleaning up. Fixes bug 74680.
2199 2005-11-11 Zoltan Varga <vargaz@gmail.com>
2201 * loader.c (mono_loader_set_error_type_load): Log a warning to the
2202 console about the missing type.
2203 (mono_loader_set_error_method_load): Ditto.
2205 2005-11-09 Miguel de Icaza <miguel@novell.com>
2207 * mono-config.c (mono_get_config_dir): Set the system defaults if
2210 * assembly.c (mono_set_dirs): New API entry point to set the
2211 assembly and the config directory in one call
2213 2005-11-09 Zoltan Varga <vargaz@gmail.com>
2215 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
2216 the ftnptr was created from a delegate in a domain other than the
2217 current domain. Fixes #75377.
2219 * exception.h exception.c: Add mono_get_exception_not_supported ().
2221 2005-11-08 Martin Baulig <martin@ximian.com>
2223 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
2225 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
2227 * security-manager.h: Added definitions to deal with strongname key
2228 pairs bigger (and smaller) than 1024 bits.
2229 * reflection.c: Remove hardcoded strongname size (128 bytes) and
2230 adjust wrt the public key length being used.
2232 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
2234 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
2235 Windows build (r51396-51397).
2237 2005-11-03 Martin Baulig <martin@ximian.com>
2239 * class.c (mono_class_setup_vtable_general): Also add generic
2240 methods to the vtable; fixes #76581.
2242 2005-11-01 Miguel de Icaza <miguel@novell.com>
2244 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
2245 sure that we lookup GetString method from the System.Text.Encoding
2246 class, not the derived class or we get an empty method.
2250 2005-10-25 Miguel de Icaza <miguel@novell.com>
2252 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
2253 if it has been previously set (embedders).
2255 Make mono_set_rootdir available also on Unix.
2257 005-10-24 Robert Jordan <robertj@gmx.net>
2259 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
2261 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
2263 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
2264 only calls which are made to native code use this flag.
2266 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
2268 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
2270 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
2271 Add support for FieldBuilders.
2273 2005-10-29 Martin Baulig <martin@ximian.com>
2276 (mono_debug_using_mono_debugger): New public method; returns
2277 whether we're running inside the debugger.
2279 2005-10-27 Zoltan Varga <vargaz@gmail.com>
2281 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
2282 for Method/Constructor/FieldBuilders.
2284 2005-10-26 Zoltan Varga <vargaz@gmail.com>
2286 * reflection.c (module_add_cattrs): Save custom attributes for global methods
2289 2005-10-26 Martin Baulig <martin@ximian.com>
2291 * mono-debug-debugger.c
2292 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
2294 2005-10-24 Raja R Harinath <harinath@gmail.com>
2296 * icall.c (base64_to_byte_array): Don't pass an out-of-range
2299 2005-10-21 Zoltan Varga <vargaz@gmail.com>
2301 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
2302 when passing valuetypes byref. Fixes #76502.
2304 2005-10-19 Jackson Harper <jackson@ximian.com>
2306 * profiler.c: Don't put a . in front of types that are not in a
2309 2005-10-18 Zoltan Varga <vargaz@gmail.com>
2311 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
2313 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
2315 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
2317 (mono_marshal_get_ldflda_wrapper): Fix a warning.
2319 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2321 * assembly.c metadata-internals.h icall.c: Define an additional
2322 parameter for mono_assembly_name_parse_full, so we can avoid creating
2323 S.R.AssemblyName.Version when no version info wasn't passed.
2325 2005-10-09 Miguel de Icaza <miguel@novell.com>
2327 * class.c (mono_type_get_full_name): Reimplement method that was
2330 * image.c: Some docs
2332 2005-10-10 Zoltan Varga <vargaz@gmail.com>
2334 * profiler.c (output_newobj_profile): Fix printing of Total memory
2337 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
2339 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
2341 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
2343 * threads.c: remove debug output.
2345 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
2347 * threads.c (mono_thread_manage): Fix crashes if more than 64
2348 threads need to be aborted. Hopefully fixes #75899.
2350 * assembly.c (mono_stringify_assembly_name): New helper function.
2352 * class.c: Use mono_stringify_assembly_name instead of the similar
2355 * assembly.h assembly.c: Add support for calling a postload search
2356 hook if an assembly cannot be loaded.
2358 * appdomain.c: Register new search hooks which call the AssemblyResolve
2359 events in AppDomain. Fixes #75231
2361 2005-10-07 Martin Baulig <martin@ximian.com>
2363 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
2364 methods without debug info.
2366 2005-10-07 Zoltan Varga <vargaz@gmail.com>
2368 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
2371 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2373 * file-io.c: now that we return symlinks, use lstat and, when the file
2374 is a symbolic link, stat, to get the file attributes. Also avoid the
2375 conversion to/from utf16/external.
2377 2005-10-06 Zoltan Varga <vargaz@gmail.com>
2379 * class.c (mono_class_layout_fields): Compute klass->has_references
2380 correctly if an embedded valuetype is not yet initialized. Fixes
2383 2005-10-04 Martin Baulig <martin@ximian.com>
2386 (mono_metadata_load_generic_param_constraints): New public
2387 function; splitted the constraints loading out from
2388 mono_metadata_load_generic_params().
2390 * class.c (mono_class_create_from_typedef): Call
2391 mono_metadata_load_generic_param_constraints() after setting up
2392 the type and creating our parent; fixes #75329.
2394 2005-10-04 Martin Baulig <martin@ximian.com>
2396 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
2397 non-dynamic parent classes.
2399 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
2401 * file-io.c : win32 build fix (ETXTBSY seems not found).
2403 2005-10-04 Martin Baulig <martin@ximian.com>
2406 (mono_image_get_methodspec_token): Make the cache actually work;
2409 2005-10-04 Martin Baulig <martin@ximian.com>
2411 * class.c (mono_class_name_from_token): Removed the unneccessary
2412 `MonoGenericContext *' argument.
2414 2005-10-04 Martin Baulig <martin@ximian.com>
2417 (method_from_methodspec): Make the caching work again; fixes the
2418 performance regression from #76262.
2420 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2424 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
2425 GetFileSystemEntries that performs the same work but without going
2426 into io-layer, locking, etc.
2428 2005-09-30 Zoltan Varga <vargaz@gmail.com>
2430 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
2431 ThreadState_Stopped as well. Fixes #76047.
2433 2005-09-29 Martin Baulig <martin@ximian.com>
2436 (inflate_generic_context): If the new context has a `gmethod', set
2437 its `container' that that gmethod's `container'.
2440 (mono_metadata_parse_generic_param): Simplify things;
2441 `generic_container = generic_context->container;' is just fine.
2443 * loader.c (method_from_methodspec): Code cleanups.
2445 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
2447 * decimal.c: fix warning (and let gcc generate correct
2448 code on ARM with optimizations).
2450 2005-09-28 Martin Baulig <martin@ximian.com>
2453 (method_from_memberref): Added `MonoGenericContext *class_context'
2454 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
2455 (method_from_methodspec): If we're a memberref, use the enclosing
2456 context when parsing its parent. Fixes #76262; see gtest-206.cs.
2458 2005-09-28 Martin Baulig <martin@ximian.com>
2460 * object.c (mono_runtime_invoke_array): Added support for
2461 MONO_TYPE_GENERICINST; fixes #75917.
2463 2005-09-27 Martin Baulig <martin@ximian.com>
2465 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
2466 `k->byval_arg.type' to determine the actual type.
2468 * loader.c (method_from_methodspec): Removed some hacks.
2470 2005-09-27 Ben Maurer <bmaurer@ximian.com>
2472 * class-internals.h (mono_field_is_deleted): Do the test for
2473 rtspecialname before we check the actual name of the field. This
2474 prevents us from dereferencing a pointer into the string table,
2475 saving us from accessing a few pages
2477 * *.c: Replace the use of {Enter,Leave}CriticalSection with
2478 macros. This will allow a deadlock debugger to easily be plugged
2481 2005-09-27 Martin Baulig <martin@ximian.com>
2483 * loader.c (method_from_methodspec): Create a "signature"
2484 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
2486 2005-09-27 Martin Baulig <martin@ximian.com>
2489 (inflate_generic_class): Correctly set the new context's
2493 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
2494 instead of a `MonoGenericContext *'.
2495 (mono_method_signature_full): Take a `MonoGenericContainer *'
2496 instead of a `MonoGenericContext *'.
2499 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
2500 instead of a `MonoGenericContext *'.
2501 (mono_metadata_parse_method_signature_full): Likewise.
2503 2005-09-26 Martin Baulig <martin@ximian.com>
2506 (mono_class_from_generic_parameter): Set `klass->generic_container'
2507 (mono_class_from_generic_parameter): Likewise.
2508 (mono_bounded_array_class_get): We inherit the generic container
2509 from the element class.
2512 (find_method, find_method_in_class): Take a `MonoGenericContext *'
2513 argument rather than computing it here.
2514 (method_from_memberref): Correctly set the generic context before
2515 parsing the signature. Fixes #75681.
2517 2005-09-26 Zoltan Varga <vargaz@gmail.com>
2519 * object.c (mono_class_has_special_static_fields): Fix warnings.
2521 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2523 * assembly.c: Add parse_public_key function, to
2524 par the public keys. Also added mono_assembly_name_parse_full,
2525 to define it the parsed key should be freed or not.
2526 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
2527 to parse a long format assembly name.
2528 * metadata-internals.h: Keep mono_assembly_name_parse_full as
2529 private, since calling it to preserve the key requires
2530 freeing it manually.
2532 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
2534 * locales.c : removed HAVE_ICU part.
2536 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
2538 * object.c (mono_class_create_runtime_vtable): Avoid calling
2539 field_is_special_static if the klass has no special static fields.
2541 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
2542 (MonoCachedClassInfo): Likewise.
2544 * object.c (mono_class_has_special_static_fields): New helper function.
2546 2005-09-23 Zoltan Varga <vargaz@gmail.com>
2548 * class.c (mono_class_create_from_typedef): Don't call
2549 interfaces_from_typedef_full for enums.
2550 (mono_class_create_from_typedef): Compute the base types of enums directly
2551 without calling mono_class_setup_fields ().
2552 (mono_class_find_enum_basetype): New helper function.
2554 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
2555 one place inside the string heap.
2557 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
2559 * class.c: locking fixes, code cleanups, some docs added.
2560 Allocate some data structures in the image mempool.
2562 2005-09-23 Zoltan Varga <vargaz@gmail.com>
2564 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2567 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
2569 * class-internals.h, class.c, reflection.c: reduce memory taken by
2572 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
2574 * metadata.c, metadata.h, loader.h: documentation updates, code and
2577 2005-09-23 Zoltan Varga <vargaz@gmail.com>
2579 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2582 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
2583 page faults caused by the runtime while reading metadata.
2585 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2587 * socket-io.c: the field names were changed 3 months ago and no one
2588 realized until bug #76077 got filed!
2590 2005-09-20 Martin Baulig <martin@ximian.com>
2592 * icall.c (assembly_icalls): Removed some unused debugger icalls.
2594 2005-09-20 Martin Baulig <martin@ximian.com>
2596 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
2597 write the rank into the class entry.
2599 2005-09-20 Martin Baulig <martin@ximian.com>
2601 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
2603 2005-09-19 Zoltan Varga <vargaz@gmail.com>
2605 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2607 * icall.c (custom_attrs_defined_internal): New icall.
2609 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
2611 (mono_custom_attrs_construct_by_type): New helper function.
2613 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
2615 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
2616 terminate the resulting string. Fixes #76123.
2618 2005-09-16 Martin Baulig <martin@ximian.com>
2621 (mono_debug_add_method): Ignore inflated methods for the moment.
2623 2005-09-14 Martin Baulig <martin@ximian.com>
2625 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
2627 2005-09-13 Zoltan Varga <vargaz@gmail.com>
2629 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
2630 return a success/failure indication.
2631 (mono_metadata_interfaces_from_typedef_full): Ditto.
2632 (get_constraints): Ditto.
2634 2005-09-12 Zoltan Varga <vargaz@gmail.com>
2636 * marshal.c (emit_marshal_array): Fix handling of null arrays.
2638 * marshal.c (emit_marshal_array): Add support for returning string
2639 arrays from delegates. Fixes #76063.
2641 * marshal.c: Use the emit_ldloc/stloc macros where possible.
2643 2005-09-11 Zoltan Varga <vargaz@gmail.com>
2645 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
2648 2005-09-09 Zoltan Varga <vargaz@gmail.com>
2650 * reflection.c icall.c: Fix after mono_get_exception_type_load
2653 * assembly.c (mono_assembly_get_assemblyref): New helper function.
2654 (mono_assembly_load_reference): Use the new helper.
2656 * class-internals.h (MonoLoaderError): New structure containing
2657 information about type loading errors.
2659 * class-internals.h loader.c: Add APIs to store per-thread loader
2662 * loader.c class.c: Set the loader error if needed.
2664 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
2666 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
2668 * decimal.c: fixed to handle the broken ARM fp format.
2670 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
2672 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
2675 2005-09-06 Martin Baulig <martin@ximian.com>
2677 * domain.c (supported_runtimes): Added v2.0.50727.
2679 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
2681 * culture-info.h: reduce the size of some structures.
2683 2005-09-05 Martin Baulig <martin@ximian.com>
2685 Reflect latest API changes in the August CTP.
2688 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
2689 ("MonoType.HasGenericArguments"): Removed.
2690 ("MonoMethod.BindGenericParameters"): Renamed to
2691 "MakeGenericMethod".
2692 ("MethodBuilder.BindGenericParameters"): Renamed to
2693 "MakeGenericMethod".
2695 2005-09-05 Martin Baulig <martin@ximian.com>
2697 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
2699 2005-09-05 Martin Baulig <martin@ximian.com>
2701 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2703 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
2704 generic_container is non-NULL.
2706 2005-09-05 Martin Baulig <martin@ximian.com>
2708 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2710 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
2712 2005-08-29 Michal Moskal <malekith@nemerle.org>
2714 * reflection.c (encode_locals,
2715 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
2716 for large generic types.
2718 2005-09-05 Martin Baulig <martin@ximian.com>
2720 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2722 * class.c (mono_dup_array_type): New public method.
2723 (mono_metadata_signature_deep_dup): New public method.
2724 (dup_type): Correctly duplicate array and function types.
2726 2005-09-05 Martin Baulig <martin@ximian.com>
2728 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2730 * reflection.c (get_default_param_value_blobs): Handle generic types
2731 and generic methods.
2733 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
2735 * class.c: Fixed error reporting (method/class were inversed) for
2736 inheritance demands.
2737 * security-manager.c|h: Added the AppDomain when calling the managed
2738 System.Security.SecurityManager.InheritanceDemand method.
2740 2005-09-01 Raja R Harinath <rharinath@novell.com>
2742 * reflection.c (encode_marshal_blob): 'marshaltype' and
2743 'marshaltyperef' are alternate sources for the custom marshaler
2746 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
2748 * class.c: fix creation of array classes with rank == 1
2749 (patch by Ankit Jain <jankit@novell.com>).
2751 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
2753 * object.c: fix check for creating the bound data for arrays vs
2756 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2758 * object.c: configuration file name is now based on the executable name,
2759 not the image name. Fixes bug #75931.
2761 2005-08-29 Zoltan Varga <vargaz@gmail.com>
2763 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
2764 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
2766 2005-08-25 Zoltan Varga <vargaz@gmail.com>
2768 * rand.c: Use wincrypt.h instead of WinCrypt.h.
2770 2005-08-24 Ankit Jain <jankit@novell.com>
2771 Raja R Harinath <rharinath@novell.com>
2773 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
2774 called by it recursively.
2775 (mono_class_init): Remove special case in pending_init handling, since it's
2776 superseded by the fix to mono_class_from_typeref.
2778 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
2780 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
2781 BROKEN_THREAD_START stuff.
2783 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
2785 * class-internals.h object.c: Add a new kind of trampoline called a delegate
2788 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
2790 * object.c (mono_delegate_ctor): Replace the original function address with
2791 a delegate trampoline.
2793 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
2795 * icall.c: add boolean argument to base64_to_byte_array and
2796 InternalFromBase64String to control whether a whitespace-only string
2797 is allowed (or should casue a FormatException to be thrown). We need
2798 this as the behavior has changed between MS.NET 1.x and 2.0, and we
2799 to match the MS behaviour in both profiles.
2800 * appdomain.c: Bump corlib version.
2802 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2804 This patch implements a big portion of publisher policy
2805 support, used to bind assembly versions and redirect
2806 one assembly from version A to version B.
2809 New GSList loaded_assembly_bindings, for storing the cached
2811 (assembly_binding_maps_name): New static function for checking if a
2812 assembly binding information maps an assembly name.
2813 (mono_assembly_binding_info_free): New function for freeing
2814 assembly binding information resources.
2815 (get_publisher_policy_info): New static function for retrieving
2816 assembly binding information from a MonoImage.
2817 (compare_versions): New static function for comparing an assembly
2818 binding information data and the version of an assembly name.
2819 (check_policy_versions): New static function for checking if an
2820 assembly binding info mapping an assembly name is valid for it.
2821 (mono_assembly_load_publisher_policy): New static function for
2822 loading the 'policy.major.minor.MyAssembly' image for an assembly
2823 with an assembly name 'aname'.
2824 (mono_assembly_bind_version): New static function for updating
2825 assembly redirection.
2826 (mono_assembly_apply_binding): New static function for applying
2828 (search_binding_loaded): New static function for searching
2829 loaded assembly binding infos in the cache domain.
2830 (mono_assembly_load_full): Don't apply assembly binding for
2831 reflection only assemblies.
2833 * metadata-internals.h: Add MonoAssemblyBindingInfo,
2834 which contains information about assembly binding. Also
2835 declare signature for mono_config_parse_publisher_policy ()
2836 function, used to retrieve pub policy info.
2839 (publisher_policy_start): New static function used to parse publisher
2840 policy config files.
2841 (publisher_policy_parser): New static MonoParseHandler containing
2842 the functions used when parsing config files.
2843 (mono_config_parse_publisher_policy): New function for parsing
2844 publisher policy files.
2846 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
2848 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
2850 * marshal.c (mono_delegate_free_ftnptr): Ditto.
2852 * object.c (mono_get_addr_from_ftnptr): New helper function.
2854 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
2856 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2858 2005-08-19 Dick Porter <dick@ximian.com>
2860 * threads.c, threads.h, appdomain.c, appdomain.h,
2861 profiler-private.h, monitor.c, object.c, object-internals.h,
2862 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
2863 store the thread ID, so it can hold a 64 bit value if needed.
2865 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
2867 * reflection.c (mono_reflection_create_dynamic_method): Store the
2868 handle class into the method references as well so ldtoken works in
2871 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
2874 2005-08-19 Ankit Jain <jankit@novell.com>
2877 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
2878 here rather than using the method signature of a arbitrary function
2879 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
2881 Hack done with Harinath.
2883 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2885 * threadpool.c: disable printing stack traces when we get a exception
2886 in a threadpool thread. I need to do more testing to figure out which
2887 cases actually print this. Fixes bug #75828.
2889 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2891 * icall.c: there might be ignored whitespace after the last '='. This
2892 fixes length computation and bug #75840.
2894 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
2896 * assembly.c (mono_assembly_load_full): Consider .exe extension as
2899 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
2902 * reflection.c (create_custom_attr_data): Ditto.
2904 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
2906 * locales.c, culture-info.h : removed RegionLCIDMap.
2907 * culture-info-tables.h : regenerated.
2909 2005-08-16 Martin Baulig <martin@ximian.com>
2911 * class.c (mono_type_get_name_recurse): Small fix.
2913 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
2915 * locales.c : indentation fixie.
2917 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
2919 * object-internals.h,
2923 icall.c : added RegionInfo table support.
2924 * culture-info-table.h : regenerated for region support.
2926 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
2928 * reflection.c (resolve_object): handle all kinds of MonoMethod
2929 including generic ones
2931 2005-08-12 Ankit Jain <jankit@novell.com>
2933 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
2934 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
2936 2005-09-12 Lluis Sanchez <lluis@ximian.com>
2938 * process.c: Don't close a thread handle when it's NULL. This is a
2939 workaround for bug #75733.
2941 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
2943 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
2945 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
2947 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
2949 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2951 * threadpool.c: if a work item in the thread pool has a callback that
2952 catches a exception, don't propagate it after invoking the callback.
2955 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
2957 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
2959 * class-internals.h (MonoCachedClassInfo): Add some new fields.
2961 * class.c (mono_class_init): Load field info lazily in the AOT case.
2963 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
2965 2005-08-03 Ankit Jain <jankit@novell.com>
2968 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
2969 PInvoke calling convention is 0.
2971 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
2973 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
2974 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
2976 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
2978 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
2979 to handle threads not started by the GC (patch by Michael Meeks
2980 <michael.meeks@novell.com>).
2982 2005-07-31 Kamil Skalski <nazgul@omega.pl>
2984 * reflection.c: Make buffer used in emitting types larger for some
2985 big generic types (patch by Michal Moskal).
2987 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
2989 * mono-debug.c: Fix some (not all) alignment problems.
2991 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2993 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
2994 Invoke mono_image_load_from_data_full passing the refonly
2998 (mono_assembly_open_from_bundle): Add the refonly argument,
2999 in order to pass it to other methods it calls to.
3000 (do_mono_assembly_open): Add the refonly argument, in order
3001 to pass it to other methods it calls to.
3002 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
3003 the refonly parameter to it.
3005 * image.c: Add loaded_images_refonly_hash and
3006 loaded_images_refonly_guid_hash to cache the reflection
3008 (mono_images_init): Initialize the hash tables used for
3009 caching the reflection only images.
3010 (load_modules): Invoke mono_image_open_full passing the refonly
3011 parameter to load the modules the correct way.
3012 (build_guid_table): Add the refonly argument, to re-build the
3014 (do_mono_image_open): Added the refonly argument, in order to
3015 define it for the loaded image.
3016 (mono_image_loaded_full): New function, which receives an
3017 additional parameter to look for the image in the refonly or
3018 non-refonly section.
3019 (mono_image_loaded): Updated, using mono_image_loaded_full.
3020 (mono_image_loaded_by_guid_full): The same case that happens
3021 with mono_image_loaded_full.
3022 (mono_image_loaded_by_guid): Likewise.
3023 (register_image): Use the ref_only variable inside MonoImage
3024 to decide in which hash table store the current image.
3025 (mono_image_open_from_data_full): Rename
3026 mono_image_open_from_data to mono_image_open_from_data_full,
3027 adding the refonly argument, to define the ref_only variable
3029 (mono_image_open_from_data): Return
3030 mono_image_open_from_data_full.
3031 (mono_image_open_full): Rename mono_image_open to
3032 mono_image_open_full, receiving the new refonly argument,
3033 to pass it to inner methods.
3034 (mono_pe_file_open): Update this function, to open
3035 a MonoImage as a non-refonly image.
3036 (mono_image_close): Use the refonly variable inside
3037 MonoImage to remove the image from the correct caches.
3039 * image.h: Add the signatures of mono_image_open_full,
3040 mono_image_open_from_data_full, mono_image_loaded_full,
3041 mono_image_loaded_by_guid_full.
3043 * metadata-internals.h: Add the ref_only field to
3046 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3048 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
3049 Fix the last behavior, which used to load the assemblies and
3050 extract MonoReflectionAssemblyName information, instead of
3051 extract it from the metadata tables. Needed for Reflection
3054 2005-07-29 Martin Baulig <martin@ximian.com>
3056 * mono-debug-debugger.c
3057 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
3061 (mono_debug_address_from_il_offset): Check whether we have
3062 debugging support before attempting to take the lock.
3063 (mono_debug_source_location_from_address): Likewise.
3064 (mono_debug_source_location_from_il_offset): Likewise.
3065 (mono_debug_il_offset_from_address): Likewise.
3066 (mono_debug_address_from_il_offset): Likewise.
3068 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
3070 * class.c (mono_class_from_name_case): Add support for dynamic images.
3073 * object.c (mono_class_compute_gc_descriptor): Add a workaround
3076 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
3078 * reflection.c (mono_method_get_object): Fix warning.
3080 2005-07-28 Martin Baulig <martin@ximian.com>
3083 (mono_debug_add_wrapper): Also write the wrapper type.
3085 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
3087 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
3089 * class.c (mono_class_init): Avoid reading nested classes if the AOT
3090 data indicates the class has none.
3092 2005-07-26 Ben Maurer <bmaurer@ximian.com>
3094 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
3095 loader lock with the debugger lock. Prevents deadlocks for beagle.
3097 Beagle can now run on an smp box for a weekend without any
3100 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
3102 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
3103 in a module. Fixes #75629.
3105 2005-07-26 Martin Baulig <martin@ximian.com>
3107 * mono-debug.c (mono_debug_add_wrapper): New static method.
3108 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
3109 interncall or a wrapper.
3111 * mono-debug.h (MonoDebugWrapperData): New public typedef.
3112 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
3113 (MONO_DEBUGGER_VERSION): Bump to 51.
3115 * mono-debug-debugger.c
3116 (mono_debugger_add_type): Removed this empty function.
3117 (mono_debugger_add_method): Likewise.
3119 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
3121 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
3122 before accessing method->slot.
3124 2005-07-21 Jb Evain <jbevain@gmail.com>
3126 * reflection.c (method_encode_clauses/class): Handle filters clauses.
3129 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
3131 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
3134 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
3136 * image.h image.c: Add mono_image_get_guid () API function.
3138 2005-07-19 Ben Maurer <bmaurer@ximian.com>
3140 There were issues when multiple threads tried to load
3141 assemblies. A deadlock was created between assemblies_mutex and
3142 mono_domain_assemblies_lock. This fixes the issue by making the
3143 assembly ref counting be lock free. See bug 75586.
3145 * image.c (mono_image_close): The add ref function here was using
3146 Interlocked operations while the unref was using a mutex and a
3147 --. I don't think this was ever a bug that would be exposed in a
3148 non-pendantic way (ie, by an embedder doing a ref on one thread
3149 and an unref on another), but for the sake of correctness, this is
3152 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
3153 (mono_assembly_load_reference): Call mono_assembly_addref rather
3154 than touching the refcount ourselves.
3155 (mono_assembly_close): Use InterlockedDecrement to unref the
3156 assembly. Don't acquire the lock unless it is actually needed.
3158 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
3160 * class.c (mono_class_layout_fields): Fix calculation of has_references
3163 2005-07-12 Martin Baulig <martin@ximian.com>
3165 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3168 (mono_type_hash): Provide better hashing for generic instances.
3169 (mono_generic_inst_hash): Improve hashing.
3170 (mono_generic_class_hash): Likewise.
3172 * reflection.c (mymono_metadata_type_hash): Improve hashing for
3175 2005-07-12 Martin Baulig <martin@ximian.com>
3177 * reflection.c (mono_reflection_create_runtime_class): Remove the
3178 hack for generic type definitions and non-`Run' assemblies.
3179 (mono_reflection_bind_generic_parameters): Also use
3180 `klass->wastypebuilder' to check for TypeBuilders.
3182 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
3184 * class.c (mono_class_layout_fields): Fix calculation of has_references
3187 * class.c (inflate_generic_class): Fix a leak.
3188 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
3191 2005-07-11 Martin Baulig <martin@ximian.com>
3193 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
3196 2005-07-11 Martin Baulig <martin@ximian.com>
3198 * loader.c (find_method): Also lookup in
3199 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
3201 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3203 * appdomain.c (mono_domain_unload): Don't free the error message
3204 before passing it to mono_get_exception_...
3206 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
3208 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
3210 * threads.c: try to better guess an available RT signal (bug #75387).
3212 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3214 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
3217 2005-07-07 Martin Baulig <martin@ximian.com>
3219 * class.c (mono_type_get_name_full): Return NULL for
3220 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
3223 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3225 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
3226 exit the appdomain as well being aborted.
3228 * threadpool.c: Create all threadpool threads inside the root appdomain, and
3229 change back to the root domain after calling managed code. This enables
3230 appdomains using threadpools to be unloaded.
3232 2005-07-07 Martin Baulig <martin@ximian.com>
3235 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
3236 into `MonoDynamicGenericClass' since we only need it for dynamic
3239 * reflection.c (mono_class_bind_generic_parameters): We don't need
3240 to compute the `parent' here.
3242 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
3244 * culture-info-table.h : regenerated.
3246 2005-07-06 Martin Baulig <martin@ximian.com>
3249 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
3251 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
3253 2005-07-06 Martin Baulig <martin@ximian.com>
3255 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
3256 we're doing a signature-only comparision; fixes #74945.
3258 2005-07-06 Martin Baulig <martin@ximian.com>
3260 * class-internals.h (MonoGenericClass): Moved some things out into
3261 a new `MonoInflatedGenericClass' type.
3262 (MonoInflatedGenericClass): New type; the `klass' of a
3263 `MonoGenericClass' is now computed lazyly in
3264 mono_get_inflated_generic_class().
3266 * class.c (mono_get_inflated_generic_class): New public function.
3267 (mono_class_inflate_generic_method): Removed the unused
3268 `MonoClass *' argument.
3269 (setup_generic_vtable): Don't call mono_get_inflated_method() on
3271 (mono_class_create_generic): Make this static and merge it with
3272 mono_class_create_generic_2(); we're now called automatically from
3273 mono_get_inflated_generic_class().
3275 * loader.c (mono_method_signature): Call
3276 mono_get_inflated_method() here.
3278 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
3280 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
3281 type of fields with RVA.
3283 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
3284 for this pseudo class.
3285 (my_mono_class_from_generic_parameter): Likewise.
3286 (mono_class_init): Allow interfaces to have cctors.
3288 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
3290 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
3291 lazily for AOT methods.
3293 2005-07-05 Martin Baulig <martin@ximian.com>
3295 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
3296 returns FALSE for a successful match, not TRUE.
3298 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
3300 * loader.c (mono_method_get_index): Optimize this a bit.
3302 2005-07-04 Martin Baulig <martin@ximian.com>
3305 (class_compute_field_layout): Move the check for generic type
3306 definitions into mono_class_layout_fields(). Fixes #74684.
3307 (mono_class_from_generic_parameter): Correctly compute
3308 `klass->parent'; fixes #75457.
3310 * reflection.c (register_assembly, register_module): Make sure
3311 `domain->rejobject_hash' is already created.
3313 2005-07-02 Martin Baulig <martin@ximian.com>
3316 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
3317 `MonoDynamicGenericClass'.
3319 2005-07-01 Lluis Sanchez <lluis@ximian.com>
3321 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
3322 returned by a field getter is null, since null is a valid value.
3324 2005-07-01 Martin Baulig <martin@ximian.com>
3326 * reflection.c (mono_reflection_generic_class_initialize): Update
3327 the `dgclass->fields [i].parent' to the correct class.
3328 (mono_image_get_fieldref_token): Use the declaring type, not the
3331 2005-07-01 Martin Baulig <martin@ximian.com>
3333 * loader.c (find_method): Also look in the interfaces; fixes #75429.
3335 2005-06-30 Ben Maurer <bmaurer@ximian.com>
3337 * threads.c (thread_cleanup): assert that thread != NULL
3338 (wait_for_tids_or_state_change): We were using the wrong variable
3339 when accessing wait->threads. `i' was always out of the bounds of
3342 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3344 * loader.c: map user32 and kernel32 to libMonoSupportW
3346 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
3348 * appdomain.c (unload_thread_main): Mark this as WINAPI.
3350 2005-06-28 Martin Baulig <martin@ximian.com>
3352 * loader.c (method_from_methodspec): Fix #75334.
3354 2005-06-28 Martin Baulig <martin@ximian.com>
3356 Fix #74953 - Arrays now implement the generic IList<T> interface
3357 on the 2.0 platform.
3359 * class-internals.h (MonoDefaults): Added `generic_array_class'.
3361 * reflection.c (mono_class_bind_generic_parameters): New public
3362 function; similar to mono_reflection_bind_generic_parameters(),
3363 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
3365 * domain.c (mono_init_internal): Try to initialize.
3366 `mono_defaults.generic_array_class' here; this'll only succeed if
3367 we're using the 2.0 corlib.
3370 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
3371 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
3372 (mono_lookup_internal_call): Added support for nested classes.
3375 (mono_get_method_from_token): Set `result->signature->pinvoke' if
3376 we're an interncall and have generic arguments.
3379 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
3380 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
3381 instance of System.Array.InternalArray<T> for arrays, so they
3382 implement the generic IList<T> interface.
3384 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
3386 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
3387 (chastamar@yahoo.com). Fixes #75374.
3389 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
3391 * culture-info-table.h: regenerated.
3393 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3395 * icall.c: handle spaces correctly for base64 strings.
3397 2005-06-26 Ben Maurer <bmaurer@ximian.com>
3399 * *.c: Kill some warnings.
3401 2005-06-23 Duncan Mak <duncan@novell.com>
3403 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
3404 that this builds on Solaris 10 (x86).
3406 2005-06-23 Martin Baulig <martin@ximian.com>
3409 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
3410 generic type definitions.
3412 2005-06-23 Martin Baulig <martin@ximian.com>
3416 * metadata.c (mono_class_get_overrides): Renamed to
3417 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
3418 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
3419 pass it to mono_get_method_full().
3421 2005-06-22 Ben Maurer <bmaurer@ximian.com>
3423 * reflection.c (mono_reflection_create_runtime_class): take the
3424 mono_domain_lock in this method. Prevents deadlocks
3426 2005-06-22 Martin Baulig <martin@ximian.com>
3428 * loader.c (method_from_methodspec): Fix #75330.
3430 2005-06-22 Martin Baulig <martin@ximian.com>
3432 * reflection.c (type_get_qualified_name): Use
3433 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
3434 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
3435 argument; use it if we don't have an assembly name.
3437 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
3439 * object.c: In mono_message_init, set "copy out" flag for in
3440 parameters with the [Out] flag.
3442 2005-06-21 Martin Baulig <martin@ximian.com>
3445 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
3448 2005-06-21 Martin Baulig <martin@ximian.com>
3450 * class.c (mono_class_init): Don't initialize `class->fields' for
3451 generic instances since they're initialized again in
3452 compute_field_layout().
3453 (compute_field_layout): Set the field's `generic_info' here; fix
3456 2005-06-21 Martin Baulig <martin@ximian.com>
3459 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
3461 * metadata.c (mono_metadata_generic_method_equal): Also
3462 distinguish the `generic_class'; fixes #75334.
3464 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3468 * domain-internals.h:
3469 * reflection.c: 'domain_assemblies' field is now protected by its own
3470 lock. Don't call into managed code to run the AssemblyLoad event if we
3471 now there are no registered delegates for it.
3473 2005-06-20 Martin Baulig <martin@ximian.com>
3475 * class.c (mono_class_is_assignable_from): Use a custom version of
3476 mono_class_has_parent() to make things work for generic instances;
3479 2005-06-20 Martin Baulig <martin@ximian.com>
3481 * loader.c (method_from_methodspec): Apply a patch from
3482 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
3484 2005-06-20 Martin Baulig <martin@ximian.com>
3486 * class.c (mono_class_init): Reverted Zoltan's last change; it
3489 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
3491 * threads.c (wait_for_tids_or_state_change): Add missing locking.
3493 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3495 * socket-io.c: fix the index in the socket array for writable/error
3496 sockets. Fixes bug #75306.
3498 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
3500 * class.c (mono_class_init): Allow interfaces to have static ctors.
3502 2005-06-17 Martin Baulig <martin@ximian.com>
3504 * loader.c (method_from_methodspec): Use `context->container' when
3505 parsing the `gmethod->inst'.
3507 2005-06-17 Martin Baulig <martin@ximian.com>
3509 * class.c (mono_type_get_name_recurse): Don't add the assembly
3510 name for type arguments.
3512 2005-06-15 Martin Baulig <martin@ximian.com>
3514 * reflection.c (mono_image_get_inflated_method_token): Encode
3515 correct klass; fixes #75260.
3517 2005-06-13 Michal Moskal <malekith@nemerle.org>
3519 * icall.c: Make GetCorrespondingMethod/Constructor take
3520 MonoReflectionMethod method not MonoMethod. Removed
3521 MonoType.GetCorrespondingField, and make
3522 MonoGenericType.GetCorrespondingField take name not
3525 2005-06-13 Michal Moskal <malekith@nemerle.org>
3527 * reflection.c (field_encode_signature, encode_locals):
3528 Make sizes of buffers for types larger (for big generic types).
3529 (create_generic_typespec,
3530 mono_reflection_sighelper_get_signature_local,
3531 mono_reflection_sighelper_get_signature_field):
3532 Add asserts for too small buffers.
3534 2005-06-15 Martin Baulig <martin@ximian.com>
3536 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
3537 if our parent is not a dynamic type.
3539 2005-06-15 Martin Baulig <martin@ximian.com>
3541 * class-internals.h (MonoTypeNameFormat): New enum.
3544 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
3545 (mono_type_get_full_name): Removed.
3546 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
3547 argument instead of the boolean's.
3549 * icall.c (ves_icall_System_MonoType_getFullName):
3550 Added `gboolean assembly_qualified'.
3553 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
3555 * reflection.c (mono_reflection_parse_type): Parse the new type
3558 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3560 * icall.c: no need to convert from utf16 to utf8 and then back again
3561 after the call to GetLogicalDrives.
3563 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3565 * icall.c: frombase64. Fix problems exposed by new tests.
3567 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3569 * icall.c: added internal calls for converting char [] and strings in
3570 base64 into byte [].
3572 2005-06-10 Martin Baulig <martin@ximian.com>
3574 * class.c (mono_class_create_generic_2): Read the nested classes
3575 from the metadata rather than from `gklass->nested_classes' since
3576 `gklass' might not be initialized yet.
3578 2005-06-09 Duncan Mak <duncan@novell.com>
3580 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
3581 all public headers. Fixes #74919.
3583 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
3585 * domain.c: The key for proxy_vtable_hash is now a pointer
3586 array. Added new GHashFunc and GCompareFunc functions for this.
3588 * class.h: The list of interfaces in MonoRemoteClass is known in
3589 advance and can't grow (we create a new MonoRemoteClass if needed),
3590 so now the interface array can be allocated together with
3593 * object.c: Added a new method create_remote_class_key.
3594 Fixed mono_remote_class so it does not depend on
3595 mono_upgrade_remote_class.
3596 Removed extend_interface_array.
3597 Added new method clone_remote_class(), which makes a copy of a remote
3598 class and adds a new interface or class to it.
3599 mono_upgrade_remote_class() now creates a new remote class (or gets
3600 it from the cache) if an vtable upgrade is needed. In this way
3601 we make sure that other objects sharing the same remote class
3602 don't get the new vtable with unwanted interfaces.
3604 * object-internals.h:
3605 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
3607 * marshal.c: Track changes in mono_upgrade_remote_class().
3609 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
3610 * icall.c: Add runtime methods for obtaining members of inflated
3611 class, which were created from supplied non-inflated members. It
3612 is used in internal Get{Method,Constructor,Field} methods in
3615 2005-06-09 Martin Baulig <martin@ximian.com>
3618 (mono_reflection_bind_generic_method_parameters): Fix #75169.
3620 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3621 * reflection.c (mono_image_basic_init): Define
3622 Version in MonoDynamicAssembly.
3624 2005-06-08 Martin Baulig <martin@ximian.com>
3629 (mono_method_signature_full): New public method; takes a
3630 `MonoGenericContext *'.
3631 (find_method): Use mono_method_signature_full() and pass the
3632 klass'es context to it.
3634 * class.c (mono_class_is_inflated_method): Use
3635 mono_method_signature_full() and pass the context to it.
3637 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
3639 * object.c: add proper locking in mono_remote_class_vtable(),
3640 fixes possible memory corruption.
3642 2005-06-08 Michael Meeks <michael.meeks@novell.com>
3644 * marshal.c (mono_remoting_marshal_init): set
3645 initialized after initialization.
3647 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
3651 2005-06-06 Michael Meeks <michael.meeks@novell.com>
3653 * object.c (extend_interface_array): fix really silly
3654 memory corrupting / comparison bug.
3656 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3658 * reflection.c: Functions added to support the creation
3659 of CustomAttributeData, which includes Attribute data
3660 used by ReflectionOnly methods.
3662 * reflection.h: mono_reflection_get_custom_attrs_data and
3663 mono_custom_attrs_data_construct added (functions exposed).
3665 * icall.c: Added mono_reflection_get_custom_attrs_data
3668 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
3670 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
3673 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
3675 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
3677 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
3678 dynamic DllImportAttribute.
3680 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
3681 dynamic DllImportAttribute.
3683 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
3686 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3688 * threads.c: avoid segfault when an unstarted thread is aborted.
3690 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
3692 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
3693 Returns the name and version of the runtime for reporting.
3695 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3697 * appdomain.c: bump corlib version.
3698 * object-internals.h: new field in MonoReflectionAssembly.
3700 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3702 * object-internals.h: Carlos forgot to add this field.
3704 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3706 * icall.c: Added create_version to create instances
3707 of Version of MonoReflectionAssemblyName. This change helps
3708 the AssemblyName tests to keep running fine.
3710 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
3712 * object.c (mono_method_return_message_restore): A somehow less
3713 intrusive fix for #75138.
3715 2005-06-03 Raja R Harinath <rharinath@novell.com>
3717 * object.c (mono_method_return_message_restore): Fix computation
3718 of expected number of out args.
3720 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
3722 * reflection.c (mono_image_get_method_info): Fix the case when the
3725 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
3727 * object.c: Added missing null check in
3728 mono_method_return_message_restore.
3730 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
3732 * reflection.c (mono_image_get_method_info): Handle the case when
3735 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
3737 * object.c: When creating the vtable for a proxy, take into account
3738 all inherited interfaces, not only the ones registered in
3739 iclass->interfaces. This fixs bug #74996.
3740 Also, in mono_method_return_message_restore, verify that the array
3741 of out args has the expected lengh.
3743 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3745 * socket-io.c: update the timeout in Poll when the call is interrupte.
3747 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3749 * socket-io.c: support abort/suspend in Select_internal after last
3752 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3754 * threadpool.c: remove warning.
3756 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3759 * socket-io.[ch]: Select_internal uses poll() now when available, thus
3760 removing the 1024 limit from select(). Runtime part of the fix for
3763 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3765 * socket-io.c: when resolving the addresses for the same
3766 host returned by gethostname(), get the local IPs from the interface
3767 list. Loopback addresses are discarded if the are interfaces up with
3768 non-loopback ones. Fixes bug #63265.
3770 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
3772 * appdomain.c, verify.c, object-internals.h, reflection.c:
3773 bumped corlib number to 36, and added new extra_flags field
3774 to ReflectionMethodBuilder and friends. Fixes #75060.
3776 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
3778 * gc.c: register a new weak link only if the object is non-null
3781 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
3783 * culture-info.h : short time pattern too.
3785 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
3787 * culture-info.h : expand long time pattern string length.
3789 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
3791 * culture-info-table.h : update (more French date format; #72788).
3793 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
3795 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
3796 the method is static. Fixes #75029.
3798 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
3800 * reflection.c: Update the table_idx field of method builders after
3801 saving the module, since it can change. This is a workaround for
3804 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
3806 * culture-info-table.h : update (additional French date format).
3808 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
3810 * icall.c (ves_icall_type_Equals): Revert last change.
3812 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
3814 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
3816 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
3818 * class-internals.h: Added executioncontext_class field to
3819 MonoDefaults structure.
3820 * domain.c: Cache System.Threading.ExecutionContext class in
3822 * object.c: Capture the ExecutionContext for asynchroneous calls in
3823 mono_async_result_new.
3824 * object-internals.h: Added execution_context and original_context
3825 fields to MonoAsyncResult. Added execution_context to MonoThread.
3826 * security-manager.c|.h: Added mono_get_context_capture_method to
3827 return the capture method (if required by the security manager or by
3828 the framework version used).
3829 * threadpool.c: Apply capture (if present) ExecutionContext in
3830 mono_async_invoke and revert to original context after it completes.
3832 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
3834 * culture-info-table.h : updated (real hacky solution for zh-CHT).
3836 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
3838 * culture-info-table.h : zh-CHT related workaround.
3840 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
3842 * marshal.c (emit_marshal_custom): Add some error checking and call the
3843 methods in the ICustomMarshaler interface. Fixes #74875.
3845 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
3846 native->managed wrappers.
3848 2005-05-12 Martin Baulig <martin@ximian.com>
3850 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
3851 here and use the loader lock.
3853 * mono-debug.c: Properly lock when the debugger is not attached.
3854 (mono_debug_init): Release the initial lock if we're not running
3857 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
3859 * marshal.c (emit_marshal_custom): Pass through NULL values without
3860 calling the custom marshalling routines.
3862 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
3863 conversion in structures. Fixes #74882.
3865 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
3867 * culture-info-table.h : zh-* cultures were missing.
3869 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
3871 * threads.c: Added a new event background_change_event which is signaled
3872 when a thread changes its background mode.
3873 Moved here several checks previously done in managed code. The checks
3874 require the thread lock, and using the thread lock in managed code
3875 can result in deadlocks.
3876 Merged Start_internal and Thread_internal into a single method. Now
3877 Thread_internal does all work of creating and starting a thread.
3878 Added icalls for setting and getting the state of the object. Moved from
3879 managed code to avoid locking there.
3880 Added wait_for_tids_or_state_change() which is called instad of
3881 wait_for_tids when waiting for non-backround threads to end. This method
3882 will return if one of the threads ends or the background_change_event
3884 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
3885 the background mode. This method signals the background_change_event
3888 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
3889 removed Start_internal.
3891 2005-05-11 Martin Baulig <martin@ximian.com>
3893 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
3894 to order of some fields to get proper alignment on 64-bit machines.
3896 2005-05-11 Martin Baulig <martin@ximian.com>
3898 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
3899 changes as they're broken and completely fuck up the debugger.
3901 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
3903 2005-05-10 Martin Baulig <martin@ximian.com>
3905 * reflection.c (mono_reflection_generic_class_initialize): Don't
3906 call mono_class_setup_parent() here.
3908 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3910 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
3911 send/receive timeout use an integer in milliseconds. We were using a
3914 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3917 (internal_get_cultures): reserve the first slot of the array for the
3918 InvariantCulture, which will be filled in managed code.
3920 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
3922 * reflection.c (mono_image_fill_module_table): Initialize the
3923 GENERATION field as well.
3925 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3927 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
3928 Monitor.Enter on the object.
3930 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
3932 * threads.c: Enable the wait for running threads when exiting.
3933 * icall.c: Suspend all threads before exiting.
3935 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
3937 * assembly.c (mono_assembly_load_reference): Fix warning.
3939 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3941 * threadpool.c: changed the default number of threads per cpu. From now
3942 on, the default will be 20 + (5 * number of cpus) instead of 50.
3944 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
3946 * loader.c (mono_method_get_signature_full): Add locking here.
3948 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
3950 * appdomain.c: Moved methods for parsing and freeing assembly
3951 names to assembly.c.
3952 * assembly.c, domain-internals.h: Created public methods for parsing
3953 assembly names. Fixed mono_assembly_load_with_partial_name:
3954 it now finds the best match, taking into account the version,
3955 token and culture specified in the partial name. Also return
3956 the latest version if no version information is specified.
3958 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
3960 * threadpool.c: replace check for SocketAsyncCall class.
3962 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3964 * threadpool-internals.h:
3965 * Makefile.am: added threadpool-internals.h
3967 * threadpool.c: call mono_unhandled_exception on exceptions not handled
3968 that happen in threadpool threads (tested on MS).
3969 (mono_thread_pool_remove_socket): new function that dispatch any pending
3970 AIO call on a socket that is closing. By now only epoll really needs it,
3971 as select/poll wake up when the socket closes.
3974 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
3976 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
3978 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
3980 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
3982 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
3984 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
3986 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
3987 has an abort request, convert it into a suspend request.
3989 2005-04-30 Ben Maurer <bmaurer@ximian.com>
3991 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
3992 warning for the usage of `UnmanagedFunctionPointerAttribute' which
3993 is not supported yet.
3995 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3997 * image.c: register assemblies loaded from data (bundles) in the loaded
3998 assemblies hash. Fixes bug #74772.
4000 2005-04-29 Martin Baulig <martin@ximian.com>
4002 * class.c (mono_type_get_name_recurse): Update to the new naming
4003 schema from the latest .NET 2.x beta2.
4004 (mono_class_setup_vtable_general): If we're a generic instance,
4005 copy the vtable from our generic type definition and inflate all
4008 * loader.c (find_method): Update to the new naming schema from the
4009 latest .NET 2.x beta2.
4011 2005-04-29 Raja R Harinath <harinath@gmail.com>
4013 * class.c (mono_class_init): Add a mono_loader_unlock to the
4016 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
4018 * icall.c (ves_icall_System_Environment_Exit): Remove the
4019 suspend_all_other_threads () call for the time being, since it can hang.
4021 * threads.c (mono_thread_manage): Similarly, disable the waiting for
4022 the background threads to exit, since it can also hang.
4024 * class.c (mono_class_init): Applied patch from Ankit Jain
4025 (radical@gmail.com). Avoid pending init errors when a field refers
4026 to a nested class using a typeref. Fixes #74734.
4028 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
4029 this for dynamic modules.
4031 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4033 * threads.c: don't wait for threads that are in the process of aborting
4034 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
4035 and waiting for background threads to finish. This makes xsp and
4036 mod-mono-server exit without random length delays and/or hangs.
4038 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4040 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
4042 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
4044 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
4045 dynamic types to prevent infinite loops. Fixes #74727.
4047 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
4048 ..._is_assignable_to.
4050 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
4052 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
4054 2005-04-25 Martin Baulig <martin@ximian.com>
4056 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
4059 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
4061 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
4063 * reflection.c (build_compressed_metadata): Set metadata header
4066 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
4068 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
4069 number into an integral and a decimal part. Fixes #70473.
4071 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
4073 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
4075 * culture-info-table.h : reflected the latest locale-builder output.
4077 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4079 * threadpool.c: check for SuspendRequested too when deciding if
4080 mono_thread_interruption_checkpoint should be called.
4082 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4084 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
4085 * threads.c: remove interruption_mutex and use Interlocked instead. When
4086 suspending all the threads, wait for all the suspended events at once.
4087 If we're shutting down and get an APC that is going to be queued,
4088 call mono_thread_execute_interruption immediately, as the thread might
4089 be sleeping on a pthread condition or mutex.
4091 * icall.c: call mono_runtime_set_shutting_down before suspending the
4094 Fixes bug #74693. And now xsp is happier when exiting.
4096 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
4098 * loader.c (mono_stack_walk): Fix #74690.
4100 2005-04-22 Martin Baulig <martin@ximian.com>
4102 * mono-debug.h (MonoDebugMethodJitInfo): Added
4103 `MonoDebugMethodJitInfo *jit'.
4105 * mono-debug.c (mono_debug_read_method): Cache the
4106 MonoDebugMethodJitInfo in `address->jit'.
4107 (mono_debug_free_method_jit_info): New public method.
4109 2005-04-22 Martin Baulig <martin@ximian.com>
4111 * class.c (mono_class_is_assignable_from): Disallow
4112 type parameter -> interface.
4114 2005-04-21 Dick Porter <dick@ximian.com>
4116 * threads.c (mono_thread_create): Turn an assertion into an error.
4118 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
4120 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
4122 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
4123 Fix some gcc 4.0 warnings.
4125 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
4127 * file-io.c: fix alt dir separator char on unix systems
4128 and cleanup (fixes bug #71214).
4130 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
4132 * marshal.c: Use CALLVIRT instead of CALL when dispatching
4133 a call to a remote domain, since the method may be an
4134 interface method in the client domain. This fixes bug #74192.
4136 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4138 * threadpool.c: recv/send are now performed before going back to managed
4139 code to save one transition.
4141 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4143 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
4145 * metadata/threadpool.c: removed hack to workaround the bug above.
4149 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
4151 * reflection.c reflection.h: Fix handling of parameter defaults in
4152 dynamic methods. Also fixes handling of parameter attributes.
4155 * mono-debug.c (mono_debug_close_image): Fix warning.
4157 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4159 * socket-io.h: replaced old unused field with new 'blocking'.
4160 * threadpool.c: restore socket blocking state on windows(tm).
4162 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
4164 * icall.c: don't return the codebase in the AssemblyName[] returned by
4165 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
4166 * object-internals.h: Removed FIXME (fields were presents) and fixed
4167 versioncompat declaration.
4169 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4171 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
4172 not closed, so don't cleanup when it happens.
4174 2005-04-13 Chris Toshok <toshok@ximian.com>
4176 * mono-debug-debugger.h: change prototype for
4177 mono_debugger_lookup_type.
4179 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
4180 this function, although it should probably be named
4181 mono_debugger_init_type.
4183 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4185 * threadpool.c: fix non-AIO case.
4187 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
4189 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
4190 the built-in profiler to measure just JIT compilation times.
4192 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4194 * threadpool.c: the epollfd might be closed by another thread at
4195 any time, so ignore EBADF at treat it as a "we're closing" sign.
4197 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4199 * threadpool.c: release the semaphores with a count equals to the number
4200 of working threads in both IO and regular pools. Fixed typo that messed
4201 up the count of IO pool threads. Don't initialize the pipe handles if
4204 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4206 * threadpool.c: some systems don't like a NULL when deleting the socket
4209 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4211 * threadpool.c: fix semaphore allocation.
4213 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4215 * threadpool.c: added epoll() based implementation for asynchronous IO
4216 that is used instead of the default poll() when available.
4217 It can be disabled by setting MONO_DISABLE_AIO.
4219 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4221 * threadpool.c: windows needs 'closesocket' and instead of returning
4222 0 when the stream is closed while in select, it returns -1. Fixes bug
4225 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
4227 * class.c (class_compute_field_layout): Fix the regression caused by
4230 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4232 * threadpool.c: separate pool for socket async. IO.
4233 * threadpool.h: mono_max_worker_threads is not a global any more.
4235 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
4237 * class.c (class_compute_field_layout): Fix #74549.
4239 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4241 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
4242 use 2 connected sockets instead.
4244 2005-04-08 Miguel de Icaza <miguel@novell.com>
4246 * mono-config.c: Add new entry point for mkbundle
4247 mono_config_parse_memory.
4249 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4251 * threadpool.c: removed another unused function.
4253 2005-04-08 Ankit Jain <radical@corewars.org>
4255 * reflection.c (get_default_param_value_blobs): Add 'types'
4256 parameter to get the types encoded in the constant table.
4257 (mono_param_get_objects): Use the type from the constant table,
4258 not the type of the parameter, when creating default values.
4259 Handle null default values correctly.
4261 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4268 * socket-io.c: removed dead code for async IO.
4270 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4272 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
4274 * threadpool.c: intercept socket async. calls and pass them to a thread
4275 that is polling and dispatching the job items to the threadpool as
4276 socket become ready. Fixes bugs #71217, #71933.
4278 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
4279 between char and short/ushort arrays.
4281 * socket-io.c: remove dead code.
4283 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
4286 icall.c : removed InternalToUpper_Comp() and
4287 InternalToLower_Comp().
4289 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
4291 * char-conversions.h : The tables were incorrectly generated. Should
4292 be generated against invariant culture.
4294 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
4296 * object.c (mono_runtime_invoke_array): Fix return value when
4297 passing pre-created valuetype objects to ctors.
4299 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
4300 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
4303 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
4305 * domain.c: removed g_assert for runtimesecurityframe_class. This is
4306 only used with --security and hides the wrong corlib version error.
4308 2005-03-30 Joshua Tauberer <tauberer@for.net>
4310 * class.c: Changed mono_class_name_from_token so that types
4311 outside of a namespace don't have an initial period. Improved
4312 the g_warning message used in _mono_class_get when loading
4314 * assembly.c: In mono_assembly_load_reference, when an assembly
4315 can't be found, "No such file or directory" is misleading and
4316 unhelpful because a few paths were checked for the presence of
4317 the assembly. When that happens (ENOENT), display a nicer
4318 message indicating the directories that were searched. In all
4319 cases, the warning is made easier to read for non-hackers.
4321 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
4323 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
4325 * appdomain.h|domain.c: Removed inline from functions.
4326 * appdomain.c: Reduced warnings when compiling on windows.
4327 * icall.c: Fixed output_debug declaration to gunichar2*.
4328 * mono-config.c: Reduced warnings when compiling on windows.
4329 * rand.c: Added missing "windows.h". Added missing return value.
4330 * rawbuffer.c: Added missing winsock2.h for windows.
4331 * sysmath.h: Added mono-compiler.h header to allow/ease
4332 compilation with non-GCC compilers.
4333 * threads.c: Fixed declarations to compile with VS.NET C compiler.
4334 Removed cast warnings.
4336 Adapted from the work of J Lothian (for VC6).
4338 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
4340 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
4343 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
4345 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
4348 2005-03-27 Raja R Harinath <harinath@gmail.com>
4350 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
4351 has to be in $(exec_prefix). $(prefix) is for arch-independent
4352 stuff, and it would probably use $(prefix)/share rather than
4355 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4357 * console-io.c: added 2 includes that might be missing.
4359 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
4361 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
4364 * reflection.c (create_custom_attr): Allocate the params array using
4365 alloca so it gets GC tracking.
4367 2005-03-23 Chris Toshok <toshok@ximian.com>
4369 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
4372 2005-03-24 Raja R Harinath <rharinath@novell.com>
4374 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
4375 changes to pick up any changes in prefix, etc.
4377 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
4379 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
4381 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
4382 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
4384 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
4386 * class-internals.h object-internals.h class.c reflection.c: Extend the
4387 mono_lookup_dynamic_token () function to return the class of the
4390 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
4393 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
4395 * security-manager.c: Skip inheritance checks for intra-corlib
4396 class inheritance and method overrides. This skips a lot of checks
4397 and (anyway) permissions cannot work until corlib is loaded.
4399 2005-03-23 Martin Baulig <martin@ximian.com>
4401 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
4402 MONO_TYPE_GENERICINST.
4404 2005-03-23 Martin Baulig <martin@ximian.com>
4406 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
4408 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4410 * class.c: added locking comments to some functions.
4411 Cache the interface offsets arrays (saves about 20 KB
4412 of runtime memory in a typical app).
4413 Reduce the time overhead in mono_class_setup_supertypes ().
4415 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
4417 * icall.c: speedup and fix leaks in GetMethodsByName and
4418 GetPropertiesByName.
4420 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4422 * reflection.c: some locking fixes.
4424 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4426 * metadata.c: added missing break in case statement.
4428 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
4430 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4431 typedbyref return values. Fixes #73941.
4433 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
4435 * security-manager.c|h: Added demandunmanaged method and
4436 suppressunmanagedcodesecurity class to MonoSecurityManager.
4437 Renamed aptc class to allowpartiallytrustedcallers.
4439 2005-03-17 Martin Baulig <martin@ximian.com>
4441 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
4443 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4445 * file-io.c: disabled file async. IO using aio_*. It uses the
4446 threadpool now. Workaround for bug #73718.
4448 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4450 * assembly.h, mono-config.c: added code to deal with bundled configs
4451 for bundled assemblies.
4453 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
4455 * *.c, private.h: cleanup, removing old private.h header file.
4457 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
4459 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
4460 and throw_on_unmappable_char attributes.
4462 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
4464 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
4465 _ProcessName_internal.
4467 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
4469 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
4472 * icall.c threads.c threads-types.h: Remove slothash icalls as they
4475 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
4477 * object.c (compute_class_bitmap): Add support for generics. Fixes
4480 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
4482 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
4484 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4486 * filewatcher.c: commented out the code for windows watcher, as we don't
4487 use it (we use the managed implementation instead).
4489 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
4491 * object-internals.h (MonoThread): Remove 'unused1' field.
4493 * appdomain.c: Bump corlib version.
4495 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
4497 * reflection.c (mono_reflection_create_runtime_class): Remove the
4498 AssemblyBuilder.Save optimization since it causes too many problems.
4500 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
4502 * exception.c|h: Added mono_get_exception_reflection_type_load to
4503 create a ReflectionTypeLoadException object.
4504 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
4505 to return NULL is a InheritanceDemand fails during reflection. Updated
4506 ves_icall_System_Reflection_Assembly_GetTypes to throw a
4507 ReflectionTypeLoadException if an InheritanceDemand fails during
4508 reflection. Added icall mapping for GetLinkDemandSecurity.
4509 * security-manager.c|h: Added ves_icall_System_Security_
4510 SecurityManager_GetLinkDemandSecurity internal call to return the
4511 class and methods permissions set for a LinkDemand. Removed unused
4512 fields in MonoSecurityManager.
4514 2005-03-10 Martin Baulig <martin@ximian.com>
4516 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
4517 it's a generic instance.
4519 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
4521 * reflection.c (mono_get_object_from_blob): Applied patch from
4522 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
4524 * class.c (mono_class_is_assignable_from): Another try at fixing
4525 #73469 without breaking anything.
4527 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
4529 * class.c: (mono_class_is_assignable_from): Revert the last changes
4530 since they don't work with generics.
4532 * class.c (mono_class_is_assignable_from): Fix build bustage.
4534 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
4535 the managed IsAssignableFrom method. Fixes #73469.
4537 * reflection.c (mono_reflection_call_is_assignable_from): New helper
4540 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
4542 * object.c (mono_load_remote_field_new): Fix returning uninitialized
4543 memory when the remoting callback does not sets the out arguments.
4546 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
4549 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
4551 * object-internals.h (MonoStackFrame): Sync with managed object layout.
4553 * appdomain.c: Bump corlib version.
4555 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
4557 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
4560 * threads.c (mono_thread_attach): Detect threads which are not started
4561 by the GC pthread wrappers.
4563 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
4565 * icall.c: Added new icall for RNG.
4566 * rand.c|h: Added new icall to open the RNG. This allows to share a
4567 single handle on Linux to access /dev/urandom and fix #73183.
4569 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
4571 * object.c: setting the new vtable in a transparent proxy object must
4572 not change the GC descriptor.
4574 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4576 * object.c: fixed compilation without GCJ support.
4577 * reflection.c: for runtime-created types ensure klass->has_references
4578 is correct (bug #73215).
4580 2005-03-02 Martin Baulig <martin@ximian.com>
4582 * class.c (mono_class_is_assignable_from): Make this work if
4583 `oklass' is a generic instance; fixes #72831.
4585 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
4587 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
4590 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
4592 * marshal.c: Reorganize native->managed marshalling code to also use
4593 the emit_marshal_... functions.
4595 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4597 * object.c: typed allocs have issues with bitmap sizes > 30,
4598 so check for max_set >= 30.
4600 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
4602 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
4603 managed code. Fixes #73012.
4605 * metadata.h (MonoMarshalSpec): Add elem_mult field.
4607 * metadata.c reflection.c: Load/Emit elem_mult as well.
4609 * metadata.h (MonoMarshalSpec): Add comment.
4611 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
4613 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
4614 num_elem to -1 if not given.
4616 * object-internals.h (MonoReflectionMarshal): Add has_size field.
4618 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
4621 2005-03-01 Marek Safar <marek.safar@seznam.cz>
4623 * null-gc.c (mono_gc_free_fixed): Was not compilable.
4625 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
4627 * reflection.c (encode_marshal_blob): Encode param_num field as well.
4629 * object-internals.h (MonoReflectionMarshal): Add param_num field.
4631 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4633 * object.c: generalized the reference bitmap creation
4634 and added hooks for the new GC.
4635 * class-internals.c: removed the gc_bitmap field from MonoClass.
4637 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4639 * domain.c: help the compiler to produce better code
4640 in mono_jit_info_table_find ().
4642 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4644 * object.c: make all allocations look typed.
4646 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4648 * socket-io.c: load Mono.Posix if it's not loaded already
4651 2005-02-24 Martin Baulig <martin@ximian.com>
4653 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
4654 * reflection.c (dup_type): Likewise.
4656 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
4658 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
4659 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
4661 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4663 * domain.c, threads.c, object-internals.h: make the critical thread
4664 local vars use the fast access mode (even when we're compiled in
4665 a lib). Provide accessors to be used by the jit during codegen.
4667 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4669 * appdomain.c: Changed hook functios behavior to include
4670 support for the reflection only assemblies. Some icalls were changed
4671 to support the mentioned assemblies too. Signatures of static methods
4672 try_assembly_resolve and real_load now have an additional parameter:
4675 * assembly.c: General changes to mono_assembly_ methods to support
4676 reflection only api. Functions mono_assembly_open, mono_assembly_load,
4677 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
4678 suffix, to support an additional gbool parameter to specify whether
4679 the assembli is reflection only or not. Created some new hook functions
4680 to add support for reflection only assemblies. Signatures of static
4681 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
4682 have now an additional parameter: refonly.
4684 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
4685 indicating whether the assembly is reflection only or not.
4687 * exception.c: Add mono_get_exception_invalid_operation.
4689 * icall.c: Throw an InvalidOperationException when trying to invoke
4690 a property/method/event, or trying to set/get the value of a field.
4691 Also add an icall to retrieve the ref_only flag to the
4692 MonoReflectionAssembly.
4694 2005-02-23 Chris Toshok <toshok@ximian.com>
4696 Part of fix for #72827.
4697 * mono-debug.c (mono_debug_add_method): add lexical block data to
4698 the info we write. Kind of a hack at the moment - we copy the
4699 lexical block info from the MonoDebugMethodInfo to the
4700 MonoDebugMethodJitInfo here, before writing it.
4701 (mono_debug_read_method): read the lexical block info.
4703 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
4705 * debug-mono-symfile.h: add lexical block support.
4707 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
4710 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
4712 * loader.c (mono_lookup_pinvoke_call): Fix warning.
4714 * object.c (mono_runtime_free_method): Call mono_free_method () and
4715 put the TODOs there.
4717 * loader.c (mono_free_method): Free up most memory allocated for
4720 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4722 * reflection.c: properly flag a Type argument to a
4723 named custom attr value (bug #72248).
4725 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4727 * reflection.c: reduce code duplication in named custom
4730 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
4732 * reflection.c: properly encode custom attrs of type object
4735 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
4737 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
4739 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
4741 * socket-io.c: load System.dll if it's not loaded already
4742 (bug #72850 and #70477).
4744 2005-02-21 Martin Baulig <martin@ximian.com>
4746 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4749 2005-02-21 Martin Baulig <martin@ximian.com>
4751 * reflection.c (mono_image_build_metadata): We also need to
4752 "fixup" the MethodImpl table after we computed the final method
4753 indices. Call fixup_methodimpl() to do that.
4754 (fixup_methodimpl): New private method.
4756 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4758 * assembly.c: special case mscorlib.dll (bug#72536),
4759 patch from Carlos Alberto Cortez.
4761 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
4763 * threads-types.h threads.c: Fix build bustage.
4765 * threads.c: Use a union for long<->double conversions.
4767 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
4768 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
4770 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
4771 containing the checkpoint call with NOT_TAKEN.
4773 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
4774 checkpoint before pushing the arguments, so they won't have to be
4777 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4779 * domain.c, assembly.c, domain-internals.h: make some data
4780 const and relocation-free.
4782 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
4784 * object.c, appdomain.c, class-internals.h: introduce the
4785 MonoClassRuntimeInfo structure to hold the info needed to
4786 use a class at runtime. Made mono_class_vtable() lock-free
4787 for all the appdomains.
4789 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
4791 * metadata-internals.h, image.c: introduce a per-image mempool to
4792 be used for memory that has the same lifetime as the image.
4794 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
4796 * domain.c: In mono_init_internal(), instead of selecting the first
4797 runtime version supported by an executable, get a list of all
4798 supported versions and select the one for which an mscorlib exists
4799 (since even if the runtime supports a given version, it doesn't mean
4800 that the framework for that version is installed).
4801 Modified get_runtimes_from_exe to support this behavior.
4802 In supported_runtimes, added information about additional system
4805 * assembly.c: Added support for more than one system assembly version
4806 per runtime version. Updated the assembly list.
4807 In mono_assembly_remap_version, removed the initial version check,
4808 since we don't know to which version we need to compare until we
4809 get the version set on which the assembly is based.
4810 Moved the code for loading corlib into the new method
4811 mono_assembly_load_corlib(), so it can be used by the initialization
4814 * domain-internals.h: Updated data structures and added declaration
4815 for mono_assembly_load_corlib.
4817 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
4819 * reflection.c (resolve_object): Fix the creation of the signature in
4820 the SignatureHelper case.
4822 * assembly.c (mono_assembly_remap_version): Fix binary search.
4824 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
4826 * class.c: Added inheritance check when a method is overloaded (from a
4827 virtual method or when implementing an interface) and when a class is
4828 inherited. Added functions to set a failure for a class and to
4829 retreive the exception from a failure.
4830 * class-internals.h: Added fields to MonoClass to keep the exception
4831 information status for inheritance (or other exceptions) to be thrown
4832 later (i.e. not at load time).
4833 * object.c: Throw the inheritance SecurityException when a type is to
4834 be created with either class or method inheritance violations.
4835 * reflection.c|h: Fix when getting declsec from a class. Removed
4836 unrequired code for class. Improved sanity in parameter naming.
4837 * security-manager.c|h: Added functions to check for class and method
4840 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
4842 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
4843 and has_finalize in dynamic types as well.
4845 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
4847 * culture-info-table.h : fixed currency format for en-GB (and so on).
4849 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
4851 * gc.c: ensure the GC handles never have 0 as a value.
4853 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
4855 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
4856 a pointer to a struct to unmanaged code. Fixes #72625.
4858 2005-02-16 Martin Baulig <martin@ximian.com>
4860 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
4862 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
4864 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
4866 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
4868 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
4870 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
4871 UnmanagedFunctionPointerAttribute, use it for determining calling convention
4874 * reflection.c (mono_custom_attrs_get_attr): New helper function.
4876 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
4878 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
4880 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
4881 changes to make the current context a field in MonoThread.
4883 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
4885 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
4888 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
4889 extracted from mono_marshal_get_native_wrapper.
4891 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
4892 to create wrappers around native functions.
4894 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
4895 delegates for arbitrary function pointers. Fixes #71472.
4897 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
4899 * threads.c: cleaned up the code a little.
4901 2005-02-15 Martin Baulig <martin@ximian.com>
4903 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
4906 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
4907 allocate larger chunks if needed.
4909 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
4911 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
4914 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
4916 * domain.c: keep the domains in an array and ensure the domain ids
4917 are kept small, so they can be used as indexes to domain-specific data
4918 with a small memory overhead.
4920 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
4922 * icall.c: Handle byref types in Type icalls. Fixes #72544.
4924 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
4926 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
4928 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
4930 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
4932 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
4935 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
4937 2005-02-12 Ben Maurer <bmaurer@ximian.com>
4939 * domain-internals.h: add the hashtable here.
4941 * class-internals.h: Remove `info' from MonoMethod
4943 * domain.c: Add a new hashtable, jit_trampoline_hash
4945 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
4947 * object.c: don't set the value of static fields
4950 2005-02-11 Martin Baulig <martin@ximian.com>
4952 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
4953 (mono_debug_add_method): Silently ignore the method if it's too big.
4954 (mono_debug_add_type): Likewise.
4956 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
4958 * threads.c, appdomain.c: remove #ifdefs from the code.
4960 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
4962 * metadata-internals.h: Added flags to MonoAssembly to cache the most
4963 common security informations. This allows us to stay in unmanaged code
4964 when doing LinkDemand and it's special cases (except for the first
4965 time for initialization). The flags a very much used with --security.
4966 * reflection.c|h: Added code to get declarative security attributes
4967 for LinkDemand and InheritanceDemand. This required to refactor the
4968 existing code for Demand.
4969 * security-manager.c|h: Added new method fields for the special cases
4972 2005-02-10 Martin Baulig <martin@ximian.com>
4974 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
4975 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
4977 2005-02-10 Martin Baulig <martin@ximian.com>
4979 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
4980 debugging code; this is almost a complete rewrite.
4982 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
4984 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4986 * domain.c, object.h: expose mono_string_equal () and
4987 mono_string_hash ().
4988 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
4989 it's implemented in managed code.
4991 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4993 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
4994 lo leak objects between appdomains.
4996 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4998 * assembly.c: old compilers compilation fix from
4999 robertj@gmx.net (Robert Jordan).
5001 2005-02-09 Ben Maurer <bmaurer@ximian.com>
5003 * class-internals.h: Little reminder for the future.
5005 * debug-helpers.c: Fix up wrapper_type_names
5007 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5009 * image.c, metadata-internals.h: when loading an image from a file,
5010 mmap all of it and use the same codepaths as when using a
5011 in-memory image: the code is simpler and we use less memory
5012 (both writable and readonly).
5014 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5016 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
5017 API to alloc runtime data structures that need to be tracked by the
5018 GC and contain pointers.
5019 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
5020 make the code more readable and eventually use a different GC.
5022 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
5024 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
5027 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
5029 * object.c: In release_type_locks(), don't release the cctor lock
5030 if it has already been released. This fixes a crash in the
5033 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5035 * gc.c, marshal.c, icall.c: register a delegate for finalization
5036 only when the native function pointer has been allocated for it.
5038 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5040 * object.c: cleaned up some code, allocate objects that are
5041 pointer free with the atomic malloc variant. Allocate memory
5042 for static data from the mempool if it's pointer-free.
5043 Allocate the bounds array at the end of the array data, when needed.
5044 * object-internals.h, object.h: move a private function in a private
5046 * class.c: handle missing case in tracking references in fields.
5048 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5050 * class.c, class-internals.h: keep track if a type has
5051 reference fields in either the instance or static fields.
5053 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
5055 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
5056 and renamed to MonoRuntimeInfo. Added fields to store the expected
5057 framework assembly version. Changed mono_get_framework_version and
5058 mono_get_runtime_version for a single mono_get_runtime_info method.
5060 * assembly.c: Added method to remap system assembly versions to the
5061 current executing runtime version. Removed old mapping code.
5062 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
5064 * icall.c, reflection.c: Track api changes.
5066 2005-02-06 Miguel de Icaza <miguel@novell.com>
5068 * loader.c (method_from_memberref): Improve error reporting,
5069 produce the class name instead of the typeref/typedef index.
5071 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
5073 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
5075 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5077 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
5078 stdcall and charset name mangling. Reorganize the code and add
5081 2005-02-05 Ben Maurer <bmaurer@ximian.com>
5083 * monodiet.c: More iters!
5085 * marshal.c: Iter usage.
5087 * icall.c: Iter usage.
5089 * object.c: Use iters.
5091 * debug-helpers.c: More iters
5093 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5095 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
5098 2005-02-05 Ben Maurer <bmaurer@ximian.com>
5100 * mono-debug-debugger.c: use iters
5102 * class.c, class-internals.h: mono_class_setup_events is static
5105 * All callers: use iters
5107 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5109 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
5110 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5112 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
5114 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
5116 * marshal.h: Add prototypes for ldfld/stfld_remote.
5118 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
5119 this is called during startup.
5121 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5123 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
5124 MonoThreadsSync struct private in monitor.c. Changed the way
5125 MonoThreadsSync is allocated so it's faster and there is no
5126 need to keep track of it with a finalizer and it uses less memory.
5127 This also finally allows us to allocate mono objects as ptrfree when
5128 there are no reference fields.
5130 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
5132 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
5133 disappearing link to the GC interface and use them to simplify
5136 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
5138 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
5139 stfld_remote which call mono_load/store_field_new. This allows methods
5140 calling ldfld/stfld wrappers to be AOTed.
5142 * console-io.c: Include sys/filio.h under solaris.
5144 * console-io.c: Include curses.h if needed correctly.
5146 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
5148 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
5149 method->klass as well.
5151 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
5153 * class.c (mono_class_init): Switch on lazy initialization of
5156 * class.c (mono_class_get_finalizer): Handle the case when the
5157 finalizer is inherited.
5159 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5161 * console-io.c: <curses.h> is needed by term.h on solaris.
5163 2005-02-03 Ben Maurer <bmaurer@ximian.com>
5165 * icall.c, class-internals.h, monodiet.c, class.c: Remove
5166 mono_class_setup_properties where possible. Remove this ftn from
5167 the header file, and make it static.
5169 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
5171 * loader.c: Add missing setup_... call.
5173 * class.c: Add missing setup_... calls.
5175 * class.c (mono_class_init): Switch on lazy initialization of
5178 * class.c (mono_class_init): Fix generics broken by the recent changes.
5180 * monodiet.c (handle_type): Add missing setup_... calls.
5182 * class.c: Back out garbage in previous patch.
5184 * class.c: Add missing setup_... calls.
5186 * class.c (mono_class_get_method_from_name_flags): Avoid calling
5187 mono_class_setup_methods () if possible.
5189 * class-internals.h (MonoClass): Add 'has_cctor' flag.
5191 * class-internals.h (MonoCachedClassInfo): New structure.
5193 * class.c: Initialize properties and events fields of MonoClass lazily.
5195 * class.c: Add infrastructure for lazily initializing the methods and
5196 vtable fields of MonoClass. Not yet used.
5198 * class.c (mono_class_get_finalizer): New helper function.
5200 * class.c: Add infrastructure for loading some class related data from
5203 * object.c: Add infrastructure for initializing the vtable from data
5206 * gc.c (run_finalize): Use mono_class_get_finalizer ().
5208 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
5209 appropriate initialization function before accessing parts of the
5210 MonoClass structure.
5212 * marshal.c: Fix warnings.
5214 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
5216 * mono-debug-debugger.c (get_exception_message): Use
5217 mono_class_get_method_from_name_flags ().
5219 2005-02-02 Ben Maurer <bmaurer@ximian.com>
5221 * reflection.c, appdomain.c: Replace a few manual searches that
5222 Zoltan missed. (Paolo approved this part of my initial patch).
5224 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
5226 * profiler.c: disable recording statistical events at report time.
5228 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5230 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
5231 to byteswap arrays of enum values, too (bug #72080).
5233 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
5235 * appdomain.c (set_domain_search_path): Allow this to be called if
5236 domain->setup is not yet set.
5238 * loader.c (mono_method_get_index): New helper function.
5240 * loader.c reflection.c: Use mono_method_get_index ().
5242 * class.c (mono_class_get_method_from_name_flags): New helper method.
5244 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
5247 * class.c (mono_class_get_cctor): New helper method.
5249 * string-icalls.c object.c class.c marshal.c reflection.c: Use
5250 mono_class_get_method () to look up methods.
5252 2005-02-01 Miguel de Icaza <miguel@novell.com>
5254 * console-io.c: Fix the build, this should work on Windows.
5256 2005-01-31 Ben Maurer <bmaurer@ximian.com>
5258 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
5259 be set to null to keep things valid
5261 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5263 * icall.c: added Console 2.0 icalls.
5264 * Makefile.am: added console-io.[ch]
5265 * console-io.[ch]: internal calls for Console 2.0 API.
5267 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5269 * class.c: make sure we consider all the interfaces
5270 when calculating max_interface_id (bug found by
5271 Jeroen Frijters running ikvm).
5273 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
5275 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
5276 valuetype fields to null.
5278 * object.c (set_value): Ditto. Fixes #71669.
5280 2005-01-31 Martin Baulig <martin@ximian.com>
5282 * metadata.c (mono_metadata_has_generic_params): New public
5283 function; checks whether something is a generic method.
5285 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5287 * appdomain.c: fix infinite recursion when adding assemblies.
5289 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
5291 * object.c: Fix small typo to return all items for Environment.
5294 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5296 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
5297 reflection.c: more domain and assembly-unload related fixes
5298 and memory leaks plugs.
5300 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
5302 * 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.
5304 2005-01-29 Ben Maurer <bmaurer@ximian.com>
5306 * loader.c (mono_method_signature): Make this method lazy
5307 (mono_get_method_from_token): Don't computate the signature here.
5309 Doing this saves quite a bit of memory. I got 90 kb on starting up
5310 monodoc. It should also save some disk reads on startup.
5312 * *: MonoMethod->signature might be NULL now. You *MUST* use
5313 mono_method_signature.
5315 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
5317 * object.c (mono_runtime_get_main_args): Return an array from the
5318 current domain here. Fixes #71938.
5320 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
5322 * monitor.c: formatting changes to comply with the
5323 mono coding style and remove #ifdefs from the code.
5325 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5327 * metadata.c, private.h: remove some unneeded data
5328 and use a more compact representation for table schemas.
5330 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
5332 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
5333 to get a better distribution in hash tables.
5334 * *.c: use mono_aligned_addr_hash() where appropriate.
5335 * assembly.c: make var static.
5337 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
5339 * domain-internals.h: Put MonoJitInfo on a diet.
5341 * domain.c: Fix a warning.
5343 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5345 * gc.c: rework the gc handles code to reuse handles
5348 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5350 * domain.c: fixed long standing bug in mono_string_equal() which
5351 was brought to light with the ldstr changes.
5353 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
5355 * reflection.c: Remove warning by adding missing include for marshal.h
5357 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5359 * domain.c, object.c: change the ldstr_table to hold
5360 MonoString* as keys: makes the runtime isinterned lookup
5361 faster and simplifies memory management.
5363 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
5365 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
5366 possible to add imperative security checks before calling the icall.
5367 * reflection.c: Return security attributes on the original MonoMethod
5368 (and not the wrapped one). This fix permissions on icalls.
5370 2005-01-25 Dick Porter <dick@ximian.com>
5372 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
5373 the check for mktime() support actually test the mktime() return
5374 value. "Fixes" bug 71682, though the output is still different to
5377 2005-01-25 Martin Baulig <martin@ximian.com>
5379 * class.c (mono_class_is_assignable_from): Make this work for
5382 2005-01-24 Ben Maurer <bmaurer@ximian.com>
5384 * marshal.c (mono_string_utf8_to_builder)
5385 (mono_string_builder_to_utf16): We might not have ownership of the
5386 string. In thise case, we need to create a new buffer.
5388 * object-internals.h (mono_stringbuilder_capacity): sb->str might
5389 be null, in which case, use the default capacity.
5391 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5393 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
5394 GC events to the profiler.
5396 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5398 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
5399 if you don't want the GC to run.
5401 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
5403 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
5404 start providing a GC API and keeping different implementations in
5406 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
5408 2005-01-22 Ben Maurer <bmaurer@ximian.com>
5410 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
5411 mmap rather than allocating a huge buffer.
5412 (mono_debug_close_mono_symbol_file): Free the buffer allocated
5415 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
5417 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
5418 and CheckExecutionRights.
5419 * reflection.c|h: Keep the index of the declarative security to be
5420 used, instead of the pointer, when AOT compiler is used. Also add
5421 class initialization when requesting demands.
5422 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
5423 CheckExecutionRights. Both properties are now FALSE by default, and
5424 unmodifiable, unless the --security option is used.
5426 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5428 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
5429 reflection.c: properly refcount images and assemblies, many leaks fixed.
5431 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5433 * threadpool.c: increase the timeout for threads in the thread pool to
5434 10s. Fixes bug #67159.
5436 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
5438 * class-internals.h: Sun's compiler insists on explicit
5439 signed on bit fields to handle then correctly.
5441 2005-01-19 Miguel de Icaza <miguel@ximian.com>
5443 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
5444 Make the size of the array fit only the number of invalid path
5447 * class.c (_mono_class_get): Improve the error reporting when a
5448 class referenced is not found, to assist debugging.
5450 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
5452 * threads.c: fix off-by-one error.
5453 * domain.c: free data allocated in the domain.
5455 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
5457 * reflection.c (mono_method_body_get_object): Fill out exception info
5460 * object-internals.h: Add MonoReflectionExceptionHandlingClause
5463 2005-01-19 Martin Baulig <martin@ximian.com>
5465 * loader.c (mono_get_method_constrained): Make this work again.
5467 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
5469 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
5470 guint16 to match the managed side.
5472 * reflection.c (mono_reflection_body_get_object): Fill out local
5475 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
5478 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
5479 'local_var_sig_token'.
5481 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
5483 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
5486 * reflection.c (mono_method_body_get_object): Handle abstract and
5489 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
5491 * marshal.c, loader.c, class-internals.h, reflection.c:
5492 store the emthod data for a wrapper in an array instead of a list.
5494 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
5496 * marshal.c: change the code to allocate memory more
5497 conservatively for method wrappers.
5499 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
5501 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
5502 fields from MonoClass to the marshal info structure where they belong.
5504 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5506 * class.c, object.c, class-internals.h, marshal.c: rearrange
5507 some fields and tweak some types to lower memory usage.
5509 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
5511 * threads.c (signal_thread_state_change): Handle the case when the
5512 target thread is the current thread.
5514 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
5516 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
5517 emit_ptr_to_object_conv.
5519 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
5520 marshalling. Fixes #71352.
5522 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5524 * metadata.h, blob.h: move table enum to blob.h so it can be included
5526 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
5527 cut the size of MonoImage/MonoDynamicImage.
5529 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
5531 * profiler.c (mono_profiler_install_simple): Fix default arguments.
5533 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
5535 * reflection.c, reflection.h, icall.c: add a function to check
5536 if an attribute type is defined for a metadata object.
5538 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
5540 * object-internals.h: Added some needed fields from StringBuilder class.
5541 * marshal.c: Set the maxCapacity when creating a StringBuilder.
5543 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
5545 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
5546 threads before shutting down the runtime.
5548 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
5550 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5552 * object-internal.h, threads.c: implement stacksize and
5553 parameterized thread start functionality (requires
5554 matching corlib). Marked broken code for later removal.
5556 2005-01-12 Martin Baulig <martin@ximian.com>
5558 * class-internals.h (MonoGenericClass): Moved the `initialized'
5559 flag to MonoDynamicGenericClass, removed `init_pending'.
5560 (MonoGenericInst): Added `is_reference' flag.
5562 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
5564 * reflection.c (mono_image_create_pefile): Only set the pe_offset
5565 inside the MSDOS header. Fixes #71201.
5567 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
5569 (mono_domain_finalize): Ditto.
5571 2005-01-12 Martin Baulig <martin@ximian.com>
5573 * class.c (mono_get_shared_generic_class): Use the cache for
5574 non-dynamic generic classes.
5576 * class-internals.h (mono_class_create_generic_2): Removed
5577 function prototype, this function is now static inside class.c.
5579 * class.c (mono_class_create_generic_2): Made this static, only
5580 call it from mono_class_init() and mono_class_setup_parent().
5581 (collect_implemented_interfaces_aux): Call mono_class_init() on
5582 the interfaces we collect.
5583 (mono_class_setup_vtable): Call mono_class_init (class->parent).
5585 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
5587 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
5588 it a real thread handle.
5590 * domain-internals.h: Move exvar_offset from MonoJitInfo to
5591 MonoJitExceptionInfo, since each catch clause needs its own variable.
5593 2005-01-11 Dick Porter <dick@ximian.com>
5595 * image.c (mono_pe_file_open): New variant on mono_image_open()
5596 that does not set up the CLI metadata; used for FileVersionInfo so
5597 it can get the data for windows binaries too.
5599 * process.c (process_read_string_block): Don't read off the end of
5600 the StringTable block.
5602 These both fix bug 70766.
5604 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
5606 * gc.c: set some fields to NULL at GC cleanup time.
5607 * threads.c: if we quit the main thread, call exit ().
5609 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
5611 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
5613 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
5615 * threads.h, threads.c, object.c: added accessor and settor for
5616 main_thread. Handle it specially when exiting from it: wait
5617 for other foreground threads to exit.
5619 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
5621 * process.c, verify.c: remove some bloat.
5623 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
5625 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
5626 the calling convention to cdecl under win32.
5628 2005-01-08 Ben Maurer <bmaurer@ximian.com>
5630 * object.c (mono_object_get_size): New function to get the size of
5633 * profiler.c (simple_allocation): Use above.
5635 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
5637 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
5638 ves_icall_System_AppDomain_getRootDomain (as it's not required to
5639 get an appdomain by it's id and we can't assume the root's id is 0).
5640 * domain-internals.h: Change the function prototype to match.
5641 * icall.c: Change the icall table for AppDomain.
5643 2005-01-08 Miguel de Icaza <miguel@ximian.com>
5645 * locales.c (string_invariant_compare_char): Only compute
5646 GUnicodeTypes in the case where we need them. Test for ordinality
5647 first and return if so.
5652 * FIXME: here we must use the information from c1type and c2type
5653 * to find out the proper collation, even on the InvariantCulture, the
5654 * sorting is not done by computing the unicode values, but their
5655 * actual sort order.
5658 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5660 * loader.c: for P/Invoke methods, allow the "Internal" shared
5661 library name to refer to the calling process symbol namespace.
5663 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
5665 * Makefile.am: Add the security manager to the build.
5666 * security-manager.c|h: New. Initialization of the security manager.
5668 2005-01-07 Dick Porter <dick@ximian.com>
5671 * monitor.c: Update thread state during Monitor and WaitHandle
5672 waits. Fixes bug 71031.
5674 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
5676 * reflection.c (property_encode_signature): Correctly handle when the
5677 property has no methods.
5679 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
5681 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
5683 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
5684 fields from mb, not rmb. Fixes #71017.
5686 * marshal.c (emit_ptr_to_str_conv): Add support for
5687 ByValTStr -> string conversion. Fixes #71015.
5689 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
5691 * mempool.c (mono_mempool_contains_addr): New helper function.
5693 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
5695 * metadata.c (mono_metadata_compute_size): Fix size calculation of
5696 HasSematics encoded fields.
5698 * metadata.c (mono_type_to_unmanaged): Improve error message for
5699 invalid string marshalling.
5701 * metadata.c: Fix warnings.
5703 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5705 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
5708 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
5710 * domain.c object.c domain-internals.h: Revert part of r38077 since the
5711 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
5714 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
5716 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
5717 so methods containing these can be AOTed.
5719 2005-01-03 Martin Baulig <martin@ximian.com>
5721 * loader.c (find_method): Removed the hack for generic instances.
5722 (method_from_memberref): If our parent is a generic instance, pass
5723 its generic type definition to find_method() and then inflate the
5725 (mono_get_method_constrained): Pass the generic type definition to
5726 find_method() and inflate the method later.
5728 * class-internals.h (MonoStats): Added `generic_class_count'.
5730 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
5731 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
5733 * reflection.c (mono_custom_attrs_from_params): Don't ignore
5734 generic type definitions.
5736 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
5738 * loader.c icall.c: Fix warnings.
5740 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
5742 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
5743 blittable types. Fixes #70864.
5745 2004-12-29 Martin Baulig <martin@ximian.com>
5748 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
5750 * reflection.c (mono_method_get_object): Create a
5751 "System.Reflection.MonoGenericMethod" for inflated methods; don't
5752 call mono_get_inflated_method().
5754 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
5756 2004-12-27 Martin Baulig <martin@ximian.com>
5758 * class-internals.h (MonoMethod): Added `is_inflated' flag.
5759 (MonoMethodInflated): Added `inflated' field.
5761 * class.c (mono_class_inflate_generic_method): Don't really
5762 inflate the method here; just set the `is_inflated' flag in the
5764 (mono_class_get_inflated_method): Actually inflate the method here
5765 if it's not already inflated; we use the MonoMethodInflated's new
5766 `inflated' field as a cache.
5768 2004-12-26 Martin Baulig <martin@ximian.com>
5771 (inflate_generic_class): Moved some code out of inflate_generic_type().
5772 (mono_class_inflate_generic_method): If we're already inflated,
5773 inflate the context and use the declaring method; ie. make sure
5774 the declaring method of an inflated method is always the generic
5776 (mono_class_create_from_typedef): Create
5777 `class->generic_container->context->gclass'.
5779 2004-12-24 Ben Maurer <bmaurer@ximian.com>
5781 * metadata-internals.h, marshal.c, reflection.c: More
5782 MonoGHashTable->GHashTable.
5784 * domain-internals.h, class.c: Change MonoGHashTable's into
5785 GHashTables for some cases where no gc stuff is used
5787 All users: update apis
5789 2004-12-23 Ben Maurer <bmaurer@ximian.com>
5791 * metadata.c (builtin_types): Make this `const'. Makes this get
5792 put into the shareable section.
5793 (mono_metadata_init): Casts to make gcc happy.
5795 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
5797 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
5799 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
5801 * icall.c: Added an internal call to retrieve the position and length
5802 of assembly-level declarative security attributes (RequestMinimum,
5803 RequestOptional and RequestRefuse). This is used by the Assembly class
5804 to re-create the corresponding permission sets.
5806 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
5808 * marshal.c: fix the stelemref wrapper to be type correct
5811 2004-12-20 Ben Maurer <bmaurer@ximian.com>
5813 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
5814 to do key & 0x7fffffff. Hashtable already does this. It just
5815 results in longer code.
5817 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
5819 * appdomain.c: Bump corlib version.
5820 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
5821 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
5822 * reflection.c|h: Add functions to get declarative security infos
5823 (blob position and length) for assemblies, classes and methods.
5825 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
5827 * reflection.c: sort the constant table (bug #70693).
5829 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
5831 * object-internals.h, threads.c, domain.c: add accessors for
5832 the MonoThread and MonoDomain tls keys.
5834 2004-12-18 Martin Baulig <martin@ximian.com>
5836 * class.c (inflate_generic_type): If we're inflating a generic
5837 instance, set `ngclass->context->container = context->container';
5838 ie. the container we inflated into.
5840 * metadata.c (mono_metadata_parse_generic_param): Reflect above
5841 inflate_generic_type() changes.
5843 2004-12-17 Martin Baulig <martin@ximian.com>
5846 (MonoGenericClass): Replaced `MonoType *generic_type' with
5847 `MonoClass *generic_class'. Removed `dynamic_info'; if
5848 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
5849 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
5851 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
5853 * exception.c (mono_exception_from_token): New helper function.
5855 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
5857 * assembly.c (mono_assembly_load_with_partial_name): Call
5858 mono_assembly_loaded before invoking the preload hooks. Fixes
5861 * object-internals.h (MonoThread): Change culture_info and
5862 ui_culture_info into an array.
5864 * threads.c: Cache culture info objects from more than one appdomain.
5866 * threads.c threads-types.h icall.c: Add icalls for manipulating the
5869 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
5871 * threads.h threads.c appdomain.c: Clear the culture_info field of
5872 all threads during unloading if they point to an object in the dying
5875 2004-12-13 Ben Maurer <bmaurer@ximian.com>
5877 * culture-info.h (TextInfoEntry): New struct
5878 * object-internals.h: sync with managed
5879 * locales.c: fill the `text_info_data' field
5880 * culture-info-tables.h: update
5882 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
5884 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
5887 2004-12-12 Ben Maurer <bmaurer@ximian.com>
5889 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
5890 (ves_icall_ModuleBuilder_getMethodToken): Ditto
5892 2004-12-12 Martin Baulig <martin@ximian.com>
5894 * mono-debug-debugger.c (write_type): If we're an enum and the
5895 builtin types have already been initialized, call mono_class_init().
5897 2004-12-11 Martin Baulig <martin@ximian.com>
5899 * metadata.c (mono_metadata_load_generic_params): Added
5900 `MonoGenericContainer *parent_container' argument; automatically
5901 compute `container->is_method'; pass the correct owner to
5904 * reflection.c (compare_genericparam): Sort the GenericParam table
5905 according to increasing owners.
5907 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
5909 * profiler.c: allow disabling the default profiler.
5911 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
5913 * decimal.c, icall.c: allow disabling System.Decimal support.
5915 2004-12-09 Marek Safar <marek.safar@seznam.cz>
5917 * reflection.c: Add support for null attribute arguments.
5919 2004-12-09 Martin Baulig <martin@ximian.com>
5921 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
5922 names to get rid of compiler warnings.
5924 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
5926 * marshal.c (mono_marshal_get_struct_to_ptr): Call
5927 mono_marshal_load_type_info (). Fixes #69625.
5928 (mono_marshal_get_ptr_to_struct): Likewise.
5930 2004-12-08 Martin Baulig <martin@ximian.com>
5932 * mono-debug.h: Bumped version number to 47.
5934 * mono-debug-debugger.c
5935 (mono_debugger_event_handler, mono_debugger_event): Take two
5936 guint64 arguments insteed of a gpointer and a guint32.
5938 2004-12-08 Martin Baulig <martin@ximian.com>
5940 * debug-mono-symfile.h
5941 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
5942 `address' to `native_offset'.
5944 2004-12-08 Martin Baulig <martin@ximian.com>
5946 * class.c (mono_class_create_from_typespec): Only inflate if we
5947 either have `context->gclass' or `context->gmethod'.
5949 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
5951 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
5953 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
5955 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
5957 * reflection.c (mono_assembly_get_object): Remove the workaround put
5960 * appdomain.c: Use the corlib_internal field from MonoAssembly.
5962 * appdomain.c: Bump corlib version.
5964 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
5965 be visible in other appdomains.
5967 2004-12-07 Ben Maurer <bmaurer@ximian.com>
5969 * threads.c: Interlocked inc and dec for longs were messed up,
5970 use a KISS based impl for this. Fixes 70234
5972 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
5974 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
5976 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
5978 * icall.c: fix to follow policy not to allow struct
5979 arguments in icalls.
5981 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5983 * process.c: make the patch that handles spaces in file paths work
5984 on mono/windows too.
5986 2004-12-06 Martin Baulig <martin@ximian.com>
5988 * class.c (mono_class_create_generic): Call
5989 mono_class_setup_supertypes() if we're dynamic.
5990 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
5992 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
5994 * object-internals.h: Add new fields to MonoThread.
5996 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
5998 * icall.c threads-types.h threads.c: Add new icalls.
6000 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
6002 * object-internals.h (MonoReflectionAssembly): Sync object layout with
6005 * appdomain.c: Bump corlib version.
6007 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
6008 internal assemblies. Fixes #69181.
6010 2004-12-05 Martin Baulig <martin@ximian.com>
6012 * class.c (mono_class_inflate_generic_signature): Make this a
6013 no-op if `context' is NULL or we don't have any type parameters;
6014 also copy `sentinelpos'.
6016 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
6018 * image.c: Add unbox_wrapper_cache.
6020 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
6022 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
6025 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
6028 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
6030 2004-12-04 Martin Baulig <martin@ximian.com>
6032 * loader.c (mono_method_get_signature_full): New public function;
6033 like mono_method_get_signature(), but with an additional
6034 `MonoGenericContext *' argument.
6036 * class.c (mono_class_inflate_generic_signature): Formerly known
6037 as inflate_generic_signature(); make this public.
6039 2004-12-04 Martin Baulig <martin@ximian.com>
6042 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
6043 instead of a `MonoGenericContainer *'.
6044 (mono_metadata_parse_array_full): Likewise.
6045 (mono_metadata_parse_signature_full): Likewise.
6046 (mono_metadata_parse_method_signature_full): Likewise.
6047 (mono_metadata_parse_generic_inst): Likewise.
6048 (mono_metadata_parse_generic_param): Likewise.
6049 (mono_metadata_parse_mh_full): Likewise.
6050 (mono_type_create_from_typespec_full): Likewise.
6052 2004-12-03 Martin Baulig <martin@ximian.com>
6054 * class-internals.h (MonoGenericContainer): Replaced the
6055 `MonoGenericContext * pointer with a `MonoGenericContext'
6056 structure and made it the first element.
6058 2004-12-03 Martin Baulig <martin@ximian.com>
6061 (inflate_generic_type): Set the `context->container' when creating
6062 a new MonoGenericContext.
6063 (mono_class_inflate_generic_method): Likewise.
6064 (mono_class_create_from_typespec): Just use `context->container'
6065 to get the container.
6067 * loader.c (method_from_methodspec): Set `context->parent' from
6068 `context->container' - and if that's a method container, use its
6069 parent. Also set the `context->container' when creating a new
6071 (mono_get_method_from_token): Use just `context->container' to get
6074 * metadata.c (do_mono_metadata_parse_generic_class): Also set
6075 `gclass->context->container'.
6077 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
6078 the `context->container' when creating a new MonoGenericContext.
6080 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
6082 * reflection.c (compare_genericparam): Sort params with identical
6083 owner by their number. Fixes gen-111 on sparc.
6085 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
6087 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
6088 around the domain changes.
6090 * appdomain.c (mono_domain_unload): Handle the case when the thread
6091 calling Unload is itself being aborted during unloading. Fixes #70022.
6093 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
6095 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
6096 checkpoint_func as an icall so it gets a wrapper.
6097 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
6098 in the cross-appdomain wrappers too.
6100 * threads.c (mono_thread_has_appdomain_ref): Make this public.
6102 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
6104 * reflection.c: Fix some memory leaks.
6106 2004-12-02 Martin Baulig <martin@ximian.com>
6108 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
6110 * metadata.c (generic_class_cache): New static hashtable.
6111 (mono_metadata_lookup_generic_class): New public method.
6113 2004-12-02 Martin Baulig <martin@ximian.com>
6115 * class.c (mono_class_create_from_typedef): Call
6116 mono_class_setup_parent() and mono_class_create_mono_type() before
6117 parsing the interfaces.
6119 2004-12-02 Martin Baulig <martin@ximian.com>
6121 * metadata.c (generic_inst_cache): New static hashtable.
6122 (mono_metadata_lookup_generic_inst): New public function.
6123 (mono_metadata_inflate_generic_inst): New public function.
6124 (mono_metadata_parse_generic_inst): New public function.
6125 (do_mono_metadata_parse_generic_class): Use the new
6126 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
6127 since this'll also use the cache.
6129 * reflection.c (mono_reflection_bind_generic_method_parameters):
6130 Use mono_metadata_lookup_generic_inst() to use the new cache.
6132 * class.c (inflate_mono_type): Use
6133 mono_metadata_inflate_generic_inst() to inflate a generic
6134 instance; this'll also use the new cache.
6136 * loader.c (method_from_methodspec): Use
6137 mono_metadata_parse_generic_inst() and
6138 mono_metadata_inflate_generic_inst() rather than parsing it
6139 manually, so we can use the new cache.
6141 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
6143 * threads.c (wait_for_tids): Do not incorrectly free threads when
6146 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6148 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
6149 iter->args based on whether parameters are passed in registers (i.e.
6150 MONO_ARCH_REGPARMS is defined)
6152 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
6154 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
6155 the exception message. Fixes #70070.
6156 (method_from_methodspec): Fix warnings.
6158 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6160 * process.c: (complete_path) return the path quoted
6162 2004-12-01 Martin Baulig <martin@ximian.com>
6164 * class-internals.h (MonoGenericInst): New structure.
6165 (MonoGenericClass): Replaced `type_argc', `type_argv' and
6166 `is_open' with `MonoGenericInst *inst'.
6167 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
6168 `is_open' with `MonoGenericInst *inst'.
6170 2004-11-30 Martin Baulig <martin@ximian.com>
6172 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
6174 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
6175 to `generic_class_cache'.
6178 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
6179 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
6180 (mono_generic_inst_is_valuetype): Renamed to
6181 mono_generic_class_is_valuetype().
6184 (MonoGenericInst): Renamed to MonoGenericClass.
6185 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
6186 (MonoClass): Renamed `generic_inst' to `generic_class'.
6187 (MonoGenericContext): Renamed `ginst' to `gclass'.
6189 * object-internals.h
6190 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
6192 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
6193 mono_reflection_generic_class_initialize().
6195 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
6196 now known as "System.Reflection.MonoGenericClass".
6197 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
6199 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
6201 * class-internals.h: Added a flag field to MonoClass to cache the
6202 declarative security attributes actions associated with the class.
6203 * domain-internals.h: Added booleans to MonoJitInfo to cache the
6204 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
6205 applicable to the JITted method.
6206 * reflection.c|h: Added functions to extract (as flags) which security
6207 actions are available (declaratively) for a method, class or assembly.
6208 * metadata.c|h: Added functions to search the declarative security
6209 table in the metadata.
6211 2004-11-29 Ben Maurer <bmaurer@ximian.com>
6213 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
6214 EXPORTEDTYPES are already in the class name cache, so there is no
6215 need to add extra code here to look at them. Just removes a bit of
6218 (ves_icall_System_Environment_get_TickCount): No need for #if
6219 WINDOWS. We already have the code in io-layer.
6221 2004-11-28 Martin Baulig <martin@ximian.com>
6224 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
6227 2004-11-27 Miguel de Icaza <miguel@ximian.com>
6229 * assembly.c (do_mono_assembly_open): Instead of having a
6230 conditional WITH_BUNDLE, incorporate support for bundles here, by
6231 having a global `bundles' variable holding a pointer to the actual
6234 (mono_register_bundled_assemblies): New API call used by the
6237 See mkbundle.1 for details.
6239 2004-11-27 Martin Baulig <martin@ximian.com>
6241 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
6242 the vtable for generic methods.
6244 2004-11-26 Martin Baulig <martin@ximian.com>
6247 (mono_metadata_generic_method_hash): New public function.
6248 (mono_metadata_generic_method_equal): Likewise.
6251 (MonoGenericContainer): Added `GHashTable *method_hash'.
6253 * reflection.c (ReflectionMethodBuilder): Added
6254 `MonoGenericContainer *generic_container'.
6255 (reflection_methodbuilder_to_mono_method): Don't create a new
6256 MonoGenericContainer each time we're called.
6257 (mono_reflection_bind_generic_method_parameters): Use
6258 `container->method_hash' to cache the results so we don't create a
6259 different method if we're called several times with the same
6262 * loader.c (method_from_methodspec): Use the new
6263 `container->method_hash' here, too.
6265 2004-11-26 Martin Baulig <martin@ximian.com>
6267 * class.c (inflate_generic_signature): Correctly compute
6268 `res->has_type_parameters'.
6269 (mono_class_vtable): Use the `has_type_parameters' flag to
6270 determine whether we're a generic method.
6272 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
6274 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
6276 * object.c (mono_runtime_run_main): Fix a small memory leak.
6278 2004-11-25 Martin Baulig <martin@ximian.com>
6280 * class.c (set_generic_param_owner): Fixed the loop.
6282 2004-11-25 Martin Baulig <martin@ximian.com>
6284 * object.c (mono_class_vtable): Don't create any JIT wrappers for
6287 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
6289 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
6290 names. Fixes #69787.
6292 2004-11-24 Martin Baulig <martin@ximian.com>
6294 * class.c (mono_class_create_generic_2): If we don't have a
6295 `ginst->parent', inflate `gklass->parent' to get our parent.
6297 2004-11-24 Martin Baulig <martin@ximian.com>
6299 * reflection.c (compare_genericparam): Correctly sort the
6300 GenericParam table; fixes #69779.
6302 2004-11-23 Ben Maurer <bmaurer@ximian.com>
6304 * reflection.c: When writing a PE file, don't create a huge
6305 buffer in memory. Just write the arrays we have to the file.
6306 This reduces memory usage.
6308 * metadata-internals.h: MonoDynamicStream pefile is no longer used
6311 2004-11-17 Martin Baulig <martin@ximian.com>
6313 * class.c (mono_class_init): Don't setup `class->parent' for
6314 dynamic instances; moved this to mono_class_generic_2().
6315 (mono_class_create_generic): Also set `klass->inited' for dynamic
6317 (mono_class_create_generic_2): Don't do anything for dynamic
6318 generic instances. Set `klass->parent' here and also call
6319 mono_class_setup_parent() here.
6321 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
6322 `MonoType *parent' argument; set `ginst->parent' before calling
6323 mono_class_create_generic_2(), so we set the correct parent.
6325 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
6327 * reflection.c: allow getting attributes from ModuleBuilder
6330 2004-11-17 Martin Baulig <martin@ximian.com>
6332 * class.c (mono_class_create_from_typedef): If a type parameter is
6333 inherited from an outer class, set its owner to that class.
6335 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
6337 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
6338 for (int*) written size. This fixes bug #69592.
6340 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
6342 * icall.c: Added IsAuthenticodePresnet internal call.
6343 * image.c|h: New function that check a MonoImage for an Authenticode
6344 signature in the certificate PE data directory.
6345 * security.c|h: New internal call to ask the runtime if an
6346 Authenticode signature seems referenced in the PE header.
6348 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
6350 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
6352 * reflection.c (mono_image_create_pefile): Free the assembly streams
6353 after writing out the assembly file.
6355 * object.c (mono_runtime_run_main): Fix small memory leak.
6357 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
6358 property access modifiers. Fixes #69389.
6360 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
6362 * domain.c, object.c, object-internals.h, domain-internals.h,
6363 object.h, marshal.c: keep dynamic code info per domain.
6365 2004-11-15 Martin Baulig <martin@ximian.com>
6367 * class.c (mono_type_get_name_recurse): Put type arguments in
6368 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
6371 2004-11-15 Martin Baulig <martin@ximian.com>
6373 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
6374 (mono_class_setup_vtable): When computing `the_cname' for a
6375 generic instance, don't include the namespace since we'd otherwise
6378 2004-11-15 Martin Baulig <martin@ximian.com>
6380 * class.c (mono_class_create_generic): Changed return type to void.
6381 (mono_class_create_generic_2): New public function; setup
6382 `class->method', `class->field' and `class->interfaces' here
6383 instead of in mono_class_init().
6385 * class.h (mono_class_create_generic): Moved to class-internals.h.
6387 2004-11-14 Ben Maurer <bmaurer@ximian.com>
6389 * reflection.c (mono_image_create_pefile): take a file HANDLE.
6390 rather than writing to memory, write to this file. Right now,
6391 we are just writting into a buffer, and copying that. However
6392 we can avoid the buffer later.
6394 (mono_dynamic_stream_reset): new function
6396 * icall.c, object-internals.h: update for the above.
6398 2004-11-13 Ben Maurer <bmaurer@ximian.com>
6400 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
6401 have been using gc'd memory. First it is slower, unlikely
6402 the comment in the source code said, secondly, it increases
6403 our footprint to do it in the gc.
6405 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
6406 the method so that it does not have to copy to managed code.
6408 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
6410 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
6412 2004-11-12 Martin Baulig <martin@localhost>
6414 * reflection.c (mono_image_create_token): Allow generic method
6415 definitions here, since they may appear in an `.override'; see
6416 gen-98/gen-99 for an example.
6418 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
6420 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
6423 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
6426 2004-11-11 Martin Baulig <martin@ximian.com>
6428 * class.c (mono_class_setup_vtable): In an explicit interface
6429 implementation, the method name now includes the arity.
6431 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
6433 * object.c (mono_array_full_copy): Fix warning.
6435 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
6437 * appdomain.c: Removed look_for_method_by_name(). Use the new method
6438 mono_class_get_method_from_name() instead.
6440 * class-internals.h: Added two new types of wrappers.
6441 Added MonoRemotingTarget enum. Added new trampoline function type, which
6442 takes an additional MonoRemotingTarget value as parameter, so it is
6443 possible to request a trampoline for a specific target.
6445 * class.c: Added new mono_class_get_method_from_name() method.
6447 * class.h: In MonoRemoteClass, we can have now to vtables, one for
6448 general remoting sinks and one specific for cross domain calls.
6450 * debug-helpers.c: Added new wrapper names.
6452 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
6455 * image.c: Porperly delete value objects form the remoting invoke hashtable.
6457 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
6458 with several other methods (mono_marshal_get_xappdomain_dispatch,
6459 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
6460 and others) can generate a fast remoting wrapper for cross domain calls.
6461 More information can be found in docs/remoting.
6462 Other changes: Removed mono_find_method_by_name, and used
6463 mono_class_get_method_from_name instead.
6464 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
6465 is stored in the remoting invoke hashtable.
6467 * marshal.h: published the new method for getting the xdomain wrapper,
6468 and also added a method for getting the adequate wrapper for a given
6471 * object-internals.h, object.c: Added a couple of methods for capying and
6473 Modified mono_install_remoting_trampoline, which takes the new remoting
6474 trampoline that has a remoting target as parameter.
6475 mono_class_proxy_vtable now also takes a remoting target as parameter, and
6476 will return the most suitable vtable for the target.
6477 Added mono_remote_class_vtable, which returns the vtable of a remote class
6478 (which can be the normal remoting vtable or the xdomain vtable).
6480 * threads.c: the xdomain invoke and dispatch wrappers must also be
6481 protected against interruptions.
6483 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6485 * icall.c: use memmove in BlockCopyInternal when the source and
6486 destination arrays are the same.
6488 2004-11-09 Martin Baulig <martin@ximian.com>
6490 * class-internals.h (MonoGenericContainer): Removed `method' and
6491 `signature', replaced them with `is_method' and `is_signature'
6492 flags. Added `context'.
6494 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
6495 instead of a `MonoGenericContainer *'.
6497 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
6498 for dynamic type parameters.
6499 (mono_metadata_load_generic_params): Setup `container->context'.
6501 * reflection.c (mono_reflection_setup_generic_class): Setup
6502 `tb->generic_container->context'.
6503 (do_mono_reflection_bind_generic_parameters): Use
6504 mono_class_inflate_generic_type() to correctly inflate types,
6505 rather than using our own hack just for MONO_TYPE_VAR.
6507 2004-11-09 Martin Baulig <martin@ximian.com>
6509 * class.c (mono_class_inflate_generic_method): Small fix; don't
6513 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
6514 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
6515 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
6516 (ves_icall_Type_BindGenericParameters): Likewise.
6517 (ves_icall_Type_get_IsGenericInstance): Likewise.
6518 (ves_icall_Type_GetGenericParameterPosition): Likewise.
6519 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
6520 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
6521 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
6523 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
6525 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
6526 assembly versions and public key tokens. Fixes #69113.
6528 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
6530 * metadata.c: fix bug introduced with the type cache changes
6533 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
6535 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
6536 the MonoClass pointer instead of the token in exception clauses.
6537 * reflection.c: updates for the above and make the code not depend
6538 on the structure of MonoExceptionClause.
6540 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
6542 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
6543 Add support for dynamic assemblies. Fixes #69114.
6545 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
6547 2004-11-07 Ben Maurer <bmaurer@ximian.com>
6549 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
6550 since most only those methods use it. the code member of
6551 MonoMethodPInvoke was dead, so that can be removed too. Also,
6552 remove inline_count (again, not used), and move slot so that it
6553 can share bits with some other flags. This saves 8 bytes in the
6554 structure and gives us about 50 kb back for mcs helloworld.cs
6556 * *.[ch]: Do naming changes for the above.
6558 * loader.c (mono_method_get_header): Lazily init the header
6560 (mono_get_method_from_token): don't init the header here
6561 (mono_free_method): the header may never be allocated
6563 Overall, this saves 150 kb of unmanaged allocations
6564 for mcs helloworld.cs. That accounts for 10% of the unmanaged
6567 * loader.c, loader.h (mono_method_get_header): new accessor.
6569 * *.[ch]: use the above method. Prepares us to lazily load
6572 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
6573 three warnings, which are actual bugs (see 69206).
6575 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
6576 unused. Saves a cool 4 bytes / method.
6578 2004-11-06 Ben Maurer <bmaurer@ximian.com>
6580 * metadata.c (builtin_types): Add types for System.Object here.
6581 (mono_metadata_parse_type_full): Cache MonoType*'s that are
6582 for a class or valuetype from klass->this_arg or klass->byval_arg.
6584 On mcs for a hello world, this gets us down from 21836 MonoType's
6587 (mono_metadata_free_type): Account for the above change.
6589 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
6591 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
6592 exception instead of asserting if name is null.
6593 (ves_icall_System_AppDomain_GetData): Ditto.
6595 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
6597 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
6600 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
6601 Return NULL when the domain does not have entry_assembly set.
6603 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
6604 Add a 'resource_modules' argument.
6605 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
6607 * reflection.c (mono_reflection_create_runtime_class): Move setting
6608 of wastypebuilder here, so mono_get_type_object () returns a MonoType
6611 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
6612 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
6613 Throw an ArgumentNullException if 'ptr' is null.
6615 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
6616 assemblies here. Fixes #69020.
6618 2004-11-05 Geoff Norton <gnorton@customerdna.com>
6620 * reflection.c (build_compressed_metadata): Fix the previous patch for
6621 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
6624 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
6626 * assembly.c (mono_assembly_names_equal): Allow a match if one of
6627 the cultures is false. Fixes #69090.
6629 * reflection.c (build_compressed_metadata): Fix invalid memory read
6630 detected by valgrind.
6632 * reflection.c (mono_reflection_get_type): Avoid triggering a
6633 TypeResolve multiple times for the same type. Fixes #65577.
6635 2004-11-04 Ben Maurer <bmaurer@ximian.com>
6637 * marshal.c: Avoid using ldftn to call managed functions. It is
6638 much slower than just a call.
6640 * reflection.c (mono_module_get_object): free the basename we
6641 allocate here from glib.
6643 * reflection.c (ensure_runtime_vtable): make sure to free
6644 overrides. Also, we were allocating an array of MonoMethod not an
6645 array of MonoMethod*.
6647 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
6649 * image.c (mono_image_close): free image->guid here.
6651 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
6653 * reflection.c: Fix some spec conformance issues with the PE file
6654 structures so mcs compiled apps run on the Net 2.0 beta.
6656 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
6658 * string-icalls.c (ves_icall_System_String_ctor_encoding):
6659 Implement this. Fixes #67264.
6661 * debug-helpers.h debug-helpers.c marshal.c: Move
6662 mono_find_method_by_name to debug-helpers.c.
6664 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
6666 * object.c (mono_release_type_locks): type_initialization_hash is
6669 * reflection.c object.c object-internals.h: Fix warnings.
6671 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
6672 without accessors. Fixes #61561.
6674 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
6675 application base from the root domain if not set. Fixes #65641.
6676 (mono_runtime_init): Fix warning.
6678 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6680 * appdomain.c: call mono_thread_pool_init.
6681 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
6682 of worker threads based on the number of CPUs and the environment
6683 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
6684 for non-windows (windows) systems.
6686 2004-10-27 Chris Toshok <toshok@ximian.com>
6688 * mono-debug-debugger.c (write_class): don't call mono_class_init
6689 here, as even with the check for (!klass->init_pending), we get
6690 into a situation where we're hitting cycles in class
6691 initialization. Fixes #68816.
6693 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
6695 * image.c: Avoid overwriting values in the loaded_images_hash when an
6696 assembly is loaded multiple times. Fixes #61152.
6698 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
6699 so multiple satellite assemblies for the same name can be loaded.
6702 * mono_domain_assembly_preload: Actually return the loaded assembly,
6705 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
6706 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
6708 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
6709 pending finalizers are not invoked after the appdomain has been
6710 unloaded. Fixes #67862.
6712 2004-10-22 Martin Baulig <martin@ximian.com>
6714 * mono-debug-debugger.c
6715 (mono_debugger_runtime_invoke): Don't box valuetypes.
6717 2004-10-22 Chris Toshok <toshok@ximian.com>
6719 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
6720 don't hide private methods.
6722 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
6724 * icall.c: Allows the runtime to "share" (when known) the public key
6725 token of an assembly. This avoid the need to recalculate the token
6726 (from the public key) in managed code.
6728 2004-10-21 Chris Toshok <toshok@ximian.com>
6730 * debug-helpers.c (append_class_name): argh, revert last patch.
6732 2004-10-21 Chris Toshok <toshok@ximian.com>
6734 * debug-helpers.c (append_class_name): use '+' as the delimiter,
6735 not '/', so that it matches what the debugger uses to look up
6738 2004-10-21 Martin Baulig <martin@ximian.com>
6740 * mono-debug-debugger.c (mono_debugger_throw_exception): New
6741 public method; this is called each time an exception is thrown and
6742 allows the debugger to use exception catch points.
6744 2004-10-21 Martin Baulig <martin@ximian.com>
6746 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
6747 the stack pointer and the exception object in some struct and pass
6748 that to the debugger.
6750 2004-10-21 Chris Toshok <toshok@ximian.com>
6752 * mono-debug-debugger.c (do_write_class): add instance/static
6753 event support. We don't expose "raise" or "other" yet.
6754 (event_is_static): new method.
6756 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
6758 * mono-debug-debugger.c
6759 (mono_debugger_handle_exception): Remove
6760 bogus return value for fussy compilers.
6762 2004-10-20 Martin Baulig <martin@ximian.com>
6764 * mono-debug-debugger.c
6765 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
6766 (mono_debugger_handled_exception): Likewise.
6768 2004-10-20 Martin Baulig <martin@ximian.com>
6770 * mono-debug-debugger.h (MonoDebuggerEvent): Added
6771 MONO_DEBUGGER_EVENT_EXCEPTION.
6773 * mono-debug-debugger.c (mono_debugger_handle_exception): New
6774 public function to send the debugger a notification for an
6775 exception and inform it about a catch/finally clause.
6777 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
6779 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
6780 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
6783 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
6785 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
6787 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
6788 marshalled as [In,Out]. Fixes #58325.
6790 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
6792 * reflection.c (mono_method_body_get_object): Implement some fields.
6794 2004-10-12 Martin Baulig <martin@ximian.com>
6796 * reflection.c (mono_reflection_bind_generic_parameters): Small
6797 fix, correctly retrieve our parent from a generic instance.
6799 2004-10-12 Martin Baulig <martin@ximian.com>
6801 * metadata.c (mono_metadata_generic_param_equal): We always have
6805 (mono_class_from_generic_parameter): We need to have an owner.
6806 (my_mono_class_from_generic_parameter): Likewise.
6808 * reflection.c (mono_reflection_setup_generic_class): Renamed to
6809 mono_reflection_create_generic_class() and added a new
6810 mono_reflection_setup_generic_class().
6811 (mono_reflection_initialize_generic_param): If we're a nested
6812 generic type and inherited from the containing class, set our
6813 owner to the outer class.
6815 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
6817 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
6819 * reflection.c (mono_method_body_get_object): New function to create
6820 a MethodBody object.
6822 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
6824 2004-10-11 Martin Baulig <martin@ximian.com>
6826 * metadata.c (_mono_metadata_type_equal): Renamed to
6827 do_mono_metadata_type_equal() and made static.
6829 2004-10-11 Martin Baulig <martin@ximian.com>
6831 * appdomain.c: Bump corlib version number to 28.
6833 2004-10-10 Martin Baulig <martin@ximian.com>
6836 (MonoGenericInst): Added `MonoGenericContainer *container'.
6837 (MonoGenericMethod): Likewise.
6838 (MonoGenericContext): Likewise.
6839 (MonoGenericParam): Added `MonoGenericContainer *owner'.
6842 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
6843 (do_mono_metadata_parse_generic_inst): Likewise.
6844 (mono_metadata_parse_type_full): New public method. This is the actual
6845 mono_metadata_parse_type() implementation - with an additional
6846 `MonoGenericContainer *' argument.
6847 (mono_metadata_parse_array_full): Likewise.
6848 (mono_metadata_parse_signature_full): Likewise.
6849 (mono_metadata_parse_method_signature_full): Likewise.
6850 (mono_metadata_parse_mh_full): Likewise.
6851 (mono_type_create_from_typespec): Likewise.
6852 (mono_metadata_interfaces_from_typedef_full): New public method;
6853 this is similar to the other _full() methods, but we take a
6854 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
6855 (mono_metadata_parse_generic_param): Take an additional
6856 `MonoGenericContainer *' argument and lookup the MonoGenericParam
6857 from that container.
6858 (mono_metadata_generic_param_equal): New static method to compare
6859 two type parameters.
6860 (_mono_metadata_type_equal): New static method; takes an
6861 additional `gboolean signature_only' argument - if true, we don't
6862 compare the owners of generic parameters.
6863 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
6864 with a TRUE argument - do a signature-only comparision.
6866 * loader.c: Use the new _full() methods and pass the
6867 MonoGenericContainer to them.
6869 * object-internals.h (MonoReflectionTypeBuilder): Added
6870 `MonoGenericContainer *generic_container' field.
6871 (MonoReflectionMethodBuilder): Likewise.
6873 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
6875 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
6876 case initial images of dynamic assemblies.
6878 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
6880 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
6882 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
6883 length of event->other array.
6884 (typebuilder_setup_events): Ditto.
6886 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
6887 'assembly_by_name' and add an 'assemblies' list.
6889 * assembly.h assembly.c: Add a new search hook for determining whenever
6890 an assembly is already loaded. Use this instead of searching in the
6891 loaded_assemblies list.
6893 * domain.c appdomain.c: Implement the new search hook so loaded
6894 assemblies are now scoped by appdomain. Fixes #67727.
6896 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
6898 * threads.c (mono_thread_attach): Initialize synch_lock field so
6899 mono_thread_detach works again.
6901 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
6902 'lib' too. Fixes #63130.
6904 2004-10-06 Jackson Harper <jackson@ximian.com>
6906 * culture-info-tables.h: regenerated.
6908 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
6910 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
6911 implemented by other interfaces in the result. Fixes #65764.
6913 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
6914 Handle unloadable modules without crashing.
6916 * image.c (load_modules): Revert the previous patch since modules must
6917 have a fixed index inside the array.
6919 * image.c (load_modules): Don't include native modules in the modules
6922 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
6924 * reflection.h: Add param_defaults field.
6926 * reflection.c: Add support for parameter defaults in dynamic methods.
6929 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
6930 an empty string when a type has no namespace. Fixes #64230.
6932 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
6934 * tabledefs.h: Added "internal" security actions to support non-CAS
6935 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
6936 Note: they do not seems to be used anymore in 2.0 (new metadata format)
6938 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
6940 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
6941 constructor of abstract class. Fixes #61689.
6943 2004-10-04 Martin Baulig <martin@ximian.com>
6945 * class-internals.h (MonoGenericContainer): New type.
6946 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
6947 `MonoGenericContainer *generic_container'.
6948 (MonoClass): Replaced `gen_params' and `num_gen_params' with
6949 `MonoGenericContainer *generic_container'.
6951 * metadata.c (mono_metadata_load_generic_params): Return a
6952 `MonoGenericContainer *' instead of a `MonoGenericParam *';
6953 removed the `num' argument.
6955 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
6957 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
6960 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
6963 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
6965 * reflection.c: Save pe_kind and machine values into the generated
6968 * appdomain.c: Bump corlib version number.
6970 * object-internals.h: Reorganize layout of LocalBuilder.
6972 * class-internals.h class.c (mono_class_get_implemented_interfaces):
6973 New helper function.
6975 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
6976 created MonoType for dynamic types. Fixes #66180.
6978 2004-10-02 Ben Maurer <bmaurer@ximian.com>
6980 * threadpool.c: the ares hashtable needs a critical section around it.
6981 this prevents some nasty segfaults
6983 2004-10-02 Massimiliano Mantione <massi@ximian.com>
6985 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
6986 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
6989 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
6991 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
6993 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
6995 * image.c: Always canonicalize image file names, to avoid loading
6996 the same assembly twice when referenced using a relative path.
6998 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
7000 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
7002 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7004 * marshal.c: Fix warnings.
7006 2004-09-29 Geoff Norton <gnorton@customerdna.com>
7008 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
7009 attempting to marshal the delegate_trampoline as the method_addr.
7010 This patch has a static hashtable of marshalled delegates so that
7011 we can map delegate_trampoline addresses back to delegates. This
7012 allows a delegate passed to managed code to be passed back into native
7015 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
7017 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
7019 * reflection.c (method_encode_code): Align method headers properly.
7022 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
7024 * marshal.c: In the runtime invoke wrapper, reset the abort
7025 exception if it is cached. This avoids the automatic rethrowal of
7026 the exception after the catch of the wrapper. Also check for pending
7027 interruptions before calling the managed method. This is done using
7028 the new method emit_thread_force_interrupt_checkpoint, since the
7029 normal checkpoint method is ignored when running the invoke wrapper.
7030 * object.c: If the abort exception is rethrown, set the abort_exc
7031 field of the thread, so it will be rethrown aftere every catch.
7032 * threadpool.c: Only run an interruption checkpoint if what has been
7033 requested is a stop of the thread (aborts will be ignored).
7034 * threads.c: By default, a thread will now never be interrumped while
7035 running the runtime invoke wrapper (this ensures that runtime_invoke
7036 will always return to the caller if an exception pointer is provided).
7037 There is a new special method mono_thread_force_interruption_checkpoint()
7038 to force an interruption checkpoint even if running a protected
7039 wrapper, which is used by the same runtime invoke wrapper to do a check
7042 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
7044 * object.c, object-internals.h: Implemented mono_release_type_locks,
7045 which releases the cctor locks held by a thread.
7046 * threads.c, threads.h: In thread_cleanup, release cctor locks held
7047 by a thread. Added mono_thread_exit() method to be used to safely stop
7050 2004-09-28 Raja R Harinath <rharinath@novell.com>
7052 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7053 Move null check before dereference. Avoid indexing beyond the end
7054 of the 'modules' array.
7056 2004-09-28 Raja R Harinath <rharinath@novell.com>
7058 * metadata-internals.h (MonoImage): Add module_count field.
7059 * image.c (load_modules): Set image->module_count.
7060 (mono_image_load_file_for_image): Use image->module_count.
7061 * reflection.c (mono_image_load_module): Append to image->modules array
7062 of dynamic assembly.
7063 (mono_module_get_object): Fix loop to actually increment index.
7064 Use image->module_count.
7065 * assembly.c (mono_assembly_load_references): Use image->module_count.
7066 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7069 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
7071 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
7072 Avoid assert on generic types.
7074 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
7076 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
7078 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
7080 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
7081 function to convert a MarshalSpec structure to its managed counterpart.
7083 * reflection.c: Fix warnings.
7085 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
7088 * icall.c (mono_create_icall_signature): Fix build.
7090 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
7092 * icall.c: Add MakePointType icall.
7094 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
7097 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7099 * threadpool.c: reuse allocated slots in the queue.
7101 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
7103 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
7105 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
7107 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
7110 * tabledefs.h: Add constants for pinvoke attributes BestFit and
7111 ThrowOnUnmappableChar.
7113 * icall.c (ves_icall_Type_GetPacking): New icall.
7115 2004-09-24 Martin Baulig <martin@ximian.com>
7117 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
7119 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7122 (mono_domain_set): allow setting a domain that is being unloaded.
7123 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
7126 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
7128 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
7129 the GetCustomAttributes icall.
7131 2004-09-23 Martin Baulig <martin@ximian.com>
7133 * object-internals.h (MonoReflectionGenericParam): Replaced
7134 'has_ctor_constraint', `has_reference_type' and `has_value_type'
7135 with `guint32 attrs'.
7137 2004-09-23 Martin Baulig <martin@ximian.com>
7139 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
7141 2004-09-23 Martin Baulig <martin@ximian.com>
7143 * object-internals.h (GenericParameterAttributes): New enum.
7145 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
7147 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
7149 * class.c (init_events): Fill out event->other field.
7151 * class.c: Fix warnings.
7153 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
7155 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7157 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
7158 walk which doesn't supply the IL offset.
7160 2004-09-22 Martin Baulig <martin@ximian.com>
7162 * reflection.c (mono_reflection_setup_internal_class): If we're
7163 System.ValueType, System.Object or System.Enum, set
7164 `klass->instance_size' and create the vtable.
7165 (mono_reflection_create_internal_class): If we're an enum type,
7166 get the base class from our current corlib.
7168 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
7170 * reflection.h (MonoResolveTokenError): New type.
7172 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
7175 * icall.c: Add an 'error' argument to the ResolveToken icalls.
7177 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
7179 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
7180 Support also calling constructors, but only for already allocated objects.
7182 2004-09-17 Geoff Norton <gnorton@customerdna.com>
7184 * reflection.c (type_get_qualified_name): If the klass is null
7185 return the typename to avoid a NullRefEx.
7186 (encode_cattr_value): Get the qualified name of the boxed type,
7187 not the underlying enumtype. Fixes #62984.
7189 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
7191 * marshal.c: Fix problems with previous checkin.
7193 2004-09-21 <vargaz@freemail.hu>
7195 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
7196 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
7198 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
7200 2004-09-21 Geoff Norton <gnorton@customerdna.com>
7202 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
7203 should only return a type for pointers, arrays, and passbyref types.
7206 2004-09-21 Martin Baulig <martin@ximian.com>
7208 * domain.c (mono_debugger_check_runtime_version): New public
7211 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
7213 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
7215 * reflection.c: Added missing sort to the declarative security
7216 attributes table. MS implementation stops seeing the attributes if the
7217 token number regress in the table (as shown by ildasm and permview).
7219 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
7221 * object-internals.h (MonoReflectionModule): Add 'token' field.
7223 * reflection.c (mono_reflection_get_token): Add support for Module
7225 (mono_module_get_object): Set 'token' field.
7226 (mono_module_file_get_object): Set 'token' field.
7228 * icall.c: Add new Assembly and Module icalls.
7230 * appdomain.c: Bump corlib version.
7232 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
7234 * loader.h loader.c class.h class.c: Add helper functions for obtaining
7235 tokens of metadata objects.
7237 * reflection.h reflection.c (mono_reflection_get_token): New function
7238 to obtain the token of a metadata object.
7240 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
7242 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
7244 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
7246 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
7248 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
7250 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
7251 * object-internals.h: Added 3 MonoArray* members to MonoReflection
7252 AssemblyBuilder to access the permissions set in the class lib.
7253 * reflection.c: Added security attributes encoding step in
7254 mono_image_build_metadata.
7255 * tabledefs.h: Added new security actions defined in 2.0:
7256 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
7258 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
7260 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
7263 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
7265 * locales.c: nullify the ICU_collator member of CompareInfo when it is
7266 finalized. There where random SIGSEVs at program termination, when
7267 an object being finalized was trying to do a string comparison and
7268 the current culture was already finalized.
7270 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7272 * threads.c: call thread_cleanup before finishing the thread if we get
7275 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
7277 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
7278 assemblies from the parent. Fixes #65665.
7280 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
7282 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
7285 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
7287 * reflection.h: add prototype for mono_get_dbnull_object
7288 * reflection.c: add prototypes for get_default_param_value_blobs
7289 and mono_get_object_from_blob for fussier compilers
7291 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
7293 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
7294 false deadlock checks in class initialization.
7296 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
7298 * image.c (mono_image_addref): Fix comment.
7300 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
7303 2004-09-12 Jambunathan K <kjambunathan@novell.com>
7305 * reflection.c (mono_param_get_objects): Modified to return
7306 ParameterInfo.DefaultValue object.
7308 (get_default_param_value_blobs):
7309 (mono_get_object_from_blob):
7310 (mono_get_dbnull_object): New helper routines.
7312 * object.c (mono_get_constant_value_from_blob): New helper routine
7313 carved out from get_default_field_value ()
7315 * object-internals.h (mono_get_constant_value_from_blob): Added
7316 function declaration.
7318 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
7320 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
7321 referenced assemblies. Fixes #62135.
7323 * exception.h exception.c (mono_get_exception_file_not_found2): New
7326 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
7328 * class.h class.c: Add mono_type_get_underlying_type ().
7330 2004-09-09 Geoff Norton <gnorton@customerndna.com>
7332 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
7333 Fix GetTypes() to support dynamically created assemblies.
7335 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
7337 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
7339 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
7342 * reflection.h reflection.c loader.c: Allow dynamic construction of
7343 pinvoke methods. Fixes #65571.
7345 * reflection.c (mono_reflection_get_type): Revert previous change since
7346 it causes regressions.
7348 2004-09-08 Martin Baulig <martin@ximian.com>
7350 * class.c (class_compute_field_layout): Don't call
7351 mono_class_layout_fields() for open generic instances.
7353 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
7354 * threads.c appdomain.c: fix typo in GC macro
7356 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7358 * threads.c: don't call mono_thread_detach() in start_wrapper(),
7359 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
7361 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
7363 * image.c (mono_image_close): Applied patch from
7364 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
7365 assembly is loaded multiple times from data.
7367 * image.c (mono_image_open): Fix warning.
7369 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
7371 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
7374 * reflection.c (mono_reflection_create_runtime_class): Initialize
7375 klass->nested_classes. Fixes #61224.
7377 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
7379 * threads.c: sched_yield() on exit, to allow threads to quit.
7381 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
7383 * object.c (mono_unhandled_exception): Remove leftover debug code.
7385 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
7387 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
7389 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
7391 * marshal.c (emit_marshal_array): Really null terminate string arrays.
7393 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
7395 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
7397 * marshal.c (emit_marshal_array): Null terminate string arrays.
7399 * marshal.c (raise_auto_layout_exception): Fix warning.
7401 * reflection.c (mono_param_get_objects): Initialize the default value
7402 with DBNull.Value, not null. Fixes #62123.
7404 2004-09-01 Miguel de Icaza <miguel@ximian.com>
7406 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
7407 throw an exception with a cute explanation.
7409 2004-09-06 Dick Porter <dick@ximian.com>
7411 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
7412 Close the new process's thread handle, as we don't use it. The
7413 handle stays around forever otherwise.
7415 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
7417 * object.c (arith_overflow): Fix warning.
7419 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
7420 calling conventions in method refs. Fixes #65352.
7422 * reflection.c: Fix warnings.
7424 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
7426 * icall.c: Add a new icall for Array.Clear
7428 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
7430 * object.c: When allocating an array, we have to throw
7431 an overflow exception if any of the lengths are < 0.
7433 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
7435 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
7436 properly. Also move implementation of string array marshalling to
7437 managed code. Fixes #42316.
7439 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7441 * assembly.c: provide more information when loading an assembly fails.
7443 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7445 * filewatcher.c: don't expect the development fam package to be
7448 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
7450 * marshal.c: Make a copy of the signature cookie since it will be
7451 freed by the caller.
7453 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
7455 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
7457 * metadata.c (mono_metadata_free_marshal_spec): New function to free
7460 * marshal.c: More refactoring.
7462 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
7465 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
7467 * object.c: In mono_message_invoke, fill the output parameter array after
7468 calling the managed method (it was done before the call). This fixes
7471 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
7473 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
7476 2004-09-02 Martin Baulig <martin@ximian.com>
7478 * class.c (mono_class_instance_size): Don't allow generic type
7479 definitions or open generic instances.
7480 (mono_class_array_element_size): If we're a value type, call
7481 mono_class_instance_size() on the original class.
7483 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
7484 handle generic instances.
7486 * mono-debug-debugger.c (write_type): Handle generic instances
7489 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
7491 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
7492 the allocation request fails. Fixes #65089.
7494 * object.c (mono_runtime_free_method): Do not call mono_free_method.
7496 * object.c (mono_runtime_free_method): New function to free a dynamic
7499 * marshal.c (mono_delegate_free_ftnptr): New function to free the
7500 delegate trampoline.
7502 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
7503 with hasthis as dynamic,
7505 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
7507 * domain.c (mono_jit_info_table_remove): New function to remove an
7508 entry from the jit info table.
7510 * class-internals.h (MonoMethod): Add 'dynamic' field.
7512 * loader.c: Fix warnings.
7514 2004-09-01 Martin Baulig <martin@ximian.com>
7516 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
7517 instead of mono_debugger_lock() because the latter one is a no-op
7518 unless running in the debugger.
7520 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
7522 * class.c (class_compute_field_layout): Classes with auto-layout or
7523 reference fields are not blittable.
7525 2004-09-01 Dick Porter <dick@ximian.com>
7527 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
7528 mono_image_get_filename() to get the assembly location.
7531 * metadata.h: Fix compile warnings
7533 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
7535 * class.c (class_compute_field_layout): System.Object is blittable.
7537 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
7538 as in/out. Fixes #59909.
7540 2004-09-01 Martin Baulig <martin@ximian.com>
7542 * metadata.h (MONO_TYPE_ISREFERENCE): Call
7543 mono_metadata_generic_inst_is_valuetype() if we're a generic
7544 instance to check whether our underlying type is a reference type.
7546 2004-09-01 Martin Baulig <martin@ximian.com>
7548 * metadata.c (mono_type_size): If we're a generic instance, call
7549 mono_class_value_size() for value types.
7551 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
7553 * marshal.c: Implement more custom marshalling functionality. Fixes
7556 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
7558 * mono-debug.c, debug-mono-symfile.c: add some locking love.
7560 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
7562 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
7564 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
7566 * icall.c: Fix some warnings.
7568 * threads.c (abort_appdomain_thread): Fix unref errors.
7569 (mono_thread_current): Fix THREAD_DEBUG define.
7571 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
7573 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
7575 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
7577 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
7579 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
7582 2004-08-28 Martin Baulig <martin@ximian.com>
7585 (mono_metadata_generic_inst_is_valuetype): New public function.
7587 * metadata.h (MONO_TYPE_ISSTRUCT): Call
7588 mono_metadata_generic_inst_is_valuetype() if we're a generic
7589 instance to check whether our underlying type is a valuetype.
7591 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
7593 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
7596 2004-08-25 Martin Baulig <martin@ximian.com>
7598 * loader.c (mono_get_method_from_token): Abstract methods can also
7599 be generic and thus have type parameters.
7601 * metadata-internals.h
7602 (MonoDynamicImage): Added `GPtrArray *gen_params'.
7604 * reflection.c (mono_image_get_generic_param_info): Don't create a
7605 metadata row, just add an entry to the `gen_params' array.
7606 (build_compressed_metadata): Sort the `gen_params' array and then
7607 actually create the metadata.
7609 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7611 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
7613 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
7615 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
7617 2004-08-24 Martin Baulig <martin@ximian.com>
7619 * class.cs (mono_class_is_subclass_of): Like an interface, a
7620 generic instance also derives from System.Object.
7622 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
7624 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
7625 custom modifiers to be in any order. Fixes #61990.
7627 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
7629 * object.c: Register mono_object_new_fast icall.
7631 * object.c (mono_class_get_allocation_ftn): Return to calling
7632 mono_object_new_fast, since it seems faster to compute the object
7633 size in unmanaged code than passing it as a parameter.
7635 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
7637 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
7638 this function with Boehm as the oom handler, so we don't have to check
7639 the result of GC_malloc.
7641 * object.c: Remove checks for oom.
7643 * object.h object.c (mono_class_get_allocation_ftn): New function to
7644 return the icall which can be used to allocate an instance of a given
7647 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
7649 * class-internals.h: Add 'enabled' field.
7651 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
7653 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
7655 2004-08-18 Jambunathan K <kjambunathan@novell.com>
7656 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
7659 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
7661 * appdomain.c: use the Tls function for appdomain too,
7662 at Zoltan's request. Actually return in mono_context_get
7664 * appdomain.c, profiler.c, threads.c: use __thread
7666 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
7668 * appdomain.c threads.c: Call GC_CreateThread on windows.
7670 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
7671 multiple libraries since this don't work on windows.
7673 2004-08-18 Martin Baulig <martin@ximian.com>
7676 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
7679 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
7680 MonoMethodNormal since we also need it for abstract and interface
7684 (build_compressed_metadata): Sort the GenericParam table.
7685 (mono_image_create_token): Added `gboolean create_methodspec'
7686 argument; this is false when generating a MethodImpl token.
7687 (reflection_methodbuilder_to_mono_method): Abstract and interface
7688 methods may also have generic parameters.
7690 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
7692 * appdomain.c: thread local alloc
7694 2004-08-17 Martin Baulig <martin@ximian.com>
7696 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
7699 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
7702 * class.c (mono_type_get_full_name): New public function.
7703 (mono_type_get_name): Don't include the type arguments.
7705 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
7707 * Makefile.am: Build static versions of libmetadata and libmonoruntime
7708 for inclusion into the mono executable.
7710 2004-08-16 Martin Baulig <martin@ximian.com>
7712 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
7713 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
7715 2004-08-14 Martin Baulig <martin@ximian.com>
7717 * class.c (dup_type): Also copy the `byref' field.
7719 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
7721 * reflection.c (create_dynamic_mono_image): Revert the last change
7722 since it breaks bootstrap.
7724 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
7726 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
7728 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
7729 not free them with g_free.
7731 2004-08-11 Martin Baulig <martin@ximian.com>
7733 * reflection.c (mono_reflection_setup_internal_class): Also call
7734 mono_class_setup_mono_type() if we already have a `tb->type.type'.
7736 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
7738 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
7739 called during default (first) AppDomain creation. Keep track of
7740 Evidence when loading assemblies.
7742 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
7744 * opcodes.c, opcodes.h: reduce runtime relocations.
7746 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
7748 * culture-info.h, locales.c: fixes and chages to sue the new
7749 optimized format of the locale data.
7750 * culture-info-tables.h: regenerated.
7752 2004-08-06 Geoff Norton <gnorton@customerdna.com>
7754 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
7756 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
7758 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
7759 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
7760 * domain-internals.h: icall declaration.
7761 * icall.c: icall registration.
7762 * object-internals.h: New fields in MonoAssembly for CAS.
7764 2004-08-05 Duncan Mak <duncan@ximian.com>
7766 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
7769 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
7771 * reflection.c: fix to deal with object[] arrays in custom ctors
7774 2004-08-05 Martin Baulig <martin@ximian.com>
7776 * class.c (mono_class_array_element_size): Added support for
7777 generic instances and correctly handle "recursive" types.
7779 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
7781 * assembly.c: Fix warnings.
7783 2004-08-04 Martin Baulig <martin@ximian.com>
7786 (mono_type_get_name_recurse): Added `gboolean include_arity'
7787 argument specifying whether or not we should include the generic
7788 arity in the type name.
7789 (_mono_type_get_name): New static function.
7790 (mono_class_setup_vtable): If we're a generic instance, don't
7791 include the generic arity in the names of explicit method
7794 2004-08-03 Martin Baulig <martin@ximian.com>
7796 * class.c (mono_type_get_name_recurse): Enclose the generic type
7797 arguments in `<', '>'.
7799 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7801 * gc.c: make GC warning messages use the trace API, they are just
7802 noise to most of the users.
7804 2004-08-03 Martin Baulig <martin@ximian.com>
7806 * debug-mono-symfile.c (read_string): Correctly read the string.
7808 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
7810 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
7812 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
7814 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
7816 2004-07-30 Martin Baulig <martin@ximian.com>
7818 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
7819 Reflect latest symbol writer changes.
7821 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7823 * object.c: always create an object if null is passed
7824 to Invoke() where a valuetype is expected.
7826 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
7828 * marshal.c (mono_marshal_init): make managed
7829 signatures match native ones better for 64bits.
7831 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7833 * appdomain.c: hack to build correctly the private bin path on windows.
7836 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
7838 * assembly.c: Load mscorlib from the correct framework directory
7839 (mono/<version>/mscorlib.dll).
7840 * appdomain.h: Added prototypes for new functions.
7841 * internals.h: Added some prototypes.
7842 * domain.c: When initializing the runtime, get from the executable and
7843 the configuration files the runtime version that the app supports.
7844 Added support methods for reading app.exe.config. Added list of versions
7845 supported by the JIT. Added two new methods: mono_init_from_assembly,
7846 which initializes the runtime and determines the required version from
7847 the provided exe file, and mono_init_version, which initializes
7848 the runtime using the provided version.
7849 * icall.c: Get machine.config from version-specific directory.
7850 * reflection.c: When generating an image, embed the version number
7851 of the current runtime.
7853 2004-07-28 Dick Porter <dick@ximian.com>
7856 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
7857 returned sockaddr size before creating the remote address object.
7858 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
7861 2004-07-28 Dick Porter <dick@ximian.com>
7863 * locales.c (string_invariant_compare_char): Fix invariant char
7864 compares between upper and lower cases. Fixes bug 61458.
7866 2004-07-27 Ben Maurer <bmaurer@ximain.com>
7868 * marshal.c: actually cache stelem.ref wrappers.
7870 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
7872 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
7873 sections and remove the mono_cli_rva_map () function.
7875 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
7877 * debug-mono-symfile.c: fix one more endianess issue, from a patch
7878 by Geoff Norton (<gnorton@customerdna.com>).
7880 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7882 * class.c: fix class loads for pointer types (typeof(int) !=
7885 2004-07-27 Martin Baulig <martin@ximian.com>
7887 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
7888 reading the debugging information from an external ".mdb" file.
7890 2004-07-24 Martin Baulig <martin@ximian.com>
7892 * reflection.c (mono_image_get_type_info): Only write a class
7893 layout entry if we actually have a size or a packing size.
7895 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
7897 * reflection.c (type_get_fully_qualified_name):
7898 insert cast to get type checking of ?: with non-gcc compilers
7900 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
7902 * rand.c: use g_getenv for both lookups of
7905 2004-07-17 Martin Baulig <martin@ximian.com>
7907 * reflection.c (mono_reflection_bind_generic_method_parameters):
7908 Set `gmethod->reflection_info'.
7910 2004-07-17 Martin Baulig <martin@ximian.com>
7912 * class.c (mono_class_create_from_typedef): Insert the newly
7913 created class into the hash table before computing the interfaces
7914 since we could be called recursively.
7916 2004-07-16 Ben Maurer <bmaurer@ximain.com>
7918 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
7919 function to implement stelem.ref in managed code
7920 * class-internals.h, debug-helpers.c: a new wrapper type
7923 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7925 * gc.c: allow GC handles to work even when no GC is compiled in.
7926 Fix part of bug #61134 (GetAddrOfPinnedObject).
7928 2004-07-13 Peter Williams <peter@newton.cx>
7930 * process.c (complete_path): Make sure we don't attempt to execute
7933 2004-07-12 Geoff Norton <gnorton@customerdna.com>
7935 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
7936 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
7937 and will add/subtract the hour if needed
7939 2004-07-12 Martin Baulig <martin@ximian.com>
7941 * reflection.c (mono_field_get_object): If we have
7942 `field->generic_info', take the attributes from
7943 `field->generic_info->generic_type'.
7945 2004-07-12 Martin Baulig <martin@ximian.com>
7947 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
7948 This function must be called before initializing the runtime.
7949 (mono_debug_init_1): New function; call this after initializing
7950 the runtime, but before loading the assembly. It tells the
7951 debugger to load corlib and the builtin types.
7953 * mono-debug-debugger.c: Did some larger changes in the debugging
7954 code; support recursive class declarations, make sure we actually
7957 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7959 * debug-helpers.c: undo my previous patch and fixed the real issue in
7960 ../mini/exceptions-x86.c
7962 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7964 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
7965 when no HOME env. variable was set and a NullRef was thrown in a .cctor
7966 called from other .cctors.
7968 2004-07-09 Miguel de Icaza <miguel@ximian.com>
7970 * loader.c: Removed the mono_loader_wine_init hack now that we are
7971 doing a managed version of Windows.Forms.
7973 2004-07-09 Ben Maurer <bmaurer@ximian.com>
7975 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
7976 threadpool.c, threads.c: remove static data from rootset.
7978 2004-07-09 Dick Porter <dick@ximian.com>
7980 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
7981 Don't do any more processing if the matched length was 0. It was
7982 increasing the size of the string before. Fixes bug 61167.
7984 2004-07-09 Dick Porter <dick@ximian.com>
7988 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
7989 Add support for SO_PEERCRED if its available.
7991 2004-07-09 Peter Bartok <pbartok@novell.com>
7992 * loader.c: winelib.exe.so error message is now only displayed if
7993 MONO_DEBUG is set. To help us avoid questions when people are trying
7994 out the new Managed.Windows.Forms.
7996 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
7998 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
7999 for isinst and castclass wrappers.
8001 * class-internals.h icall.c: Move registration and lookup of JIT icalls
8002 to libmetadata from the JIT, so they could be used by the marshalling
8003 code and the interpreter.
8005 * marshal.c: Register marshalling related JIT icalls here instead of
8006 in mini.c. Use CEE_MONO_ICALL instead of the family of
8007 CEE_MONO_PROC<x> opcodes to call marshalling functions.
8009 * metadata.h: Remove unneeded marshalling conversions.
8011 * opcodes.c: Update for new opcodes.
8013 2004-07-08 Martin Baulig <martin@ximian.com>
8015 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
8016 (mono_debug_get_domain_data): Make this function static.
8018 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8020 * gc.c, object.h: add nice GC handle API for embedders.
8022 2004-07-06 Ben Maurer <bmaurer@ximian.com>
8024 * reflection.c: more changes for the new api
8026 * object.c: When we reflect on a field w/ a constant value, it
8027 will not have a memory location, so we must access metadata. Also,
8028 allow easier reading of strings so that we can read them from
8031 * class.c (mono_class_layout_fields): no need for literal fields here.
8033 * class-internals.h: api changes for const fields
8035 * icall.c (ves_icall_get_enum_info): use new apis for const fields
8037 2004-07-06 Martin Baulig <martin@ximian.com>
8039 * mono-debug.h: Increment version number to 44.
8041 * mono-debug.c (mono_debug_add_wrapper): The second argument is
8042 now a gpointer, rewrote this whole method.
8044 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
8045 function. Add information about the wrapper in a new "misc table".
8047 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
8048 for the new misc table.
8050 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
8052 * metadata-internals.h image.c: Add a cache for helper signatures.
8054 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
8056 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
8058 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
8059 delegates from a delegate. Fixes #61033.
8061 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
8062 marshalling of stringbuilder arrays. Fixes #59900.
8064 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
8066 * icall.c: Add EnumBuilder:setup_enum_type icall.
8068 2004-06-30 Ben Maurer <bmaurer@ximian.com>
8070 * icall.c: Added a new icall for the property version of
8073 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
8075 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
8076 it has a constant size across platforms.
8078 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
8081 2004-06-29 Martin Baulig <martin@ximian.com>
8083 * mono-debug.c (mono_debug_add_method): Protect the whole function
8084 in mono_debugger_lock(), not just parts of it.
8086 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8088 * reflection.c: make sure padding bytes in heaps are zeroed.
8090 2004-06-24 David Waite <mass@akuma.org>
8092 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
8093 image.c, loader.c, locales.c, marshal.c, metadata.c,
8094 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
8095 string-icalls.c, threads.c: change to C90-style comments from C99 /
8098 2004-06-24 Dick Porter <dick@ximian.com>
8101 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
8102 return createdNew. Fixes bug 60412.
8105 * icall.c: Add createdNew parameter to CreateMutex icall
8107 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8109 * reflection.c, object-internals.h: save default value in params.
8111 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8113 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
8114 no need to build a new path combining that with the application base.
8117 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8119 * reflection.c: fixed minor standard compliance issues.
8121 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8123 * reflection.c: fixed issue with encoding some custom attributes
8124 (arrays in properties and fields, bug #60411).
8126 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8128 * reflection.c: fix start address when copying the public key token.
8130 2004-06-23 Martin Baulig <martin@ximian.com>
8132 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8133 the `exc' object in a static object to put it into the GC's root set.
8135 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8137 * reflection.c: make mono_reflection_setup_internal_class ()
8138 callable a second time to setup a new parent class.
8140 2004-06-23 Dick Porter <dick@ximian.com>
8142 * threads.c: Check for WAIT_IO_COMPLETION return values.
8144 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
8146 * appdomain.c: Removed the g_free on the public key token. Now copy
8147 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
8148 * assembly.c: Added public key token string value when loading
8149 assemblies. Fix bug #60439.
8150 * icall.c: Added missing informations (like public key) in
8151 GetReferencedAssemblies. Fix #60519.
8152 * image.h: Changed definition for public key token from const char*
8153 public_tok_value to guchar public_key_token [17];
8154 * reflection.c: Updated for changes to public key token.
8156 2004-06-22 Lluis Sanchez Gual
8158 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
8159 for the field in base classes.
8161 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8163 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
8164 mark headers as not supported, they are installed only for use by the
8167 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
8169 * *.c, *.h: avoid namespace pollution in public headers.
8171 2004-06-21 Martin Baulig <martin@ximian.com>
8173 * exception.c (mono_get_exception_security): It's in
8174 "System.Security", not in "System".
8176 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
8177 the exception classes.
8179 2004-06-21 Martin Baulig <martin@ximian.com>
8181 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
8182 Protect the exception object from being finalized.
8184 2004-06-21 Martin Baulig <martin@ximian.com>
8186 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
8189 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
8191 * reflection.c: Load the assembly in mono_reflection_type_from_name,
8192 if it was not loaded before. Fix parts of #60439.
8194 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
8196 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
8197 code that was broken since Ben's change: wrappers are now
8198 dependent on the method signature only again.
8200 2004-06-21 Martin Baulig <martin@ximian.com>
8202 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
8203 added interface support.
8205 2004-06-21 Martin Baulig <martin@ximian.com>
8207 * class.c (mono_vtable_get_static_field_data): New public method.
8209 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
8211 * filewatcher.c : Windows build fix to be compliant with API changes.
8213 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8215 * class.h, class.c: more accessors.
8216 * metadata.h, metadata.c: prepare for hiding MonoType and
8217 MonoMethodSignature: people should use the accessors from now on
8218 outside of the tree.
8220 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8222 * *.c, *.h: more API cleanups.
8224 2004-06-18 Jackson Harper <jackson@ximian.com>
8226 * assembly.c: Trace loading assemblies.
8227 * loader.c: Trace loading native libraries.
8228 * mono-config.c: Trace loading config files.
8230 2004-06-18 Dick Porter <dick@ximian.com>
8232 * locales.c: Tell ICU the lengths of strings, it can cope with
8233 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
8235 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
8237 * image.c: swapped name/filename;
8239 2004-06-18 Martin Baulig <martin@ximian.com>
8241 * mono-debug-debugger.c (write_class): Write the parent class at
8242 the end of the header.
8244 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8246 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
8248 2004-06-17 Raja R Harinath <rharinath@novell.com>
8250 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
8251 (bundle_obj): New conditional define.
8252 (BUILT_SOURCES): Remove.
8253 ($(bundle_srcs)): Make parallel-make safe.
8254 (libmonoruntime_la_LIBADD): Make unconditional.
8255 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
8256 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
8258 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
8260 * culture-info-tables.h: It was inconsistent with the latest
8263 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
8265 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
8268 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
8271 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8273 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
8274 cleaned up public header threads.h.
8276 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8278 * Makefile.am, *.c, *.h: more API cleanups.
8280 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8282 * Makefile.am: removed monosn from compilation.
8283 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
8284 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
8285 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
8286 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
8287 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
8288 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
8290 2004-06-15 Jackson Harper <jackson@ximian.com>
8292 * assembly.c: Make locales lower case when searching the GAC for
8293 assemblies. gacutil will always make locales lowercase when
8294 installing so this effectively makes them case insensitive.
8296 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
8298 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
8299 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
8300 parameter which allows to choose whether the wait can be interrupted or
8301 not. Also added the method mono_monitor_enter(), which locks the monitor
8302 using an infinite wait and without allowing interruption.
8303 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
8305 * object.h: Added new fields in MonoThread. suspend_event holds the event
8306 used to susped/resume the thread. synch_lock is the lock object to use for
8307 modifying the thread state.
8308 * threads.c: Use the new synch_lock object for locking, instead of "this",
8309 which can generate deadlocks.
8310 Moved thread state change in Thread.Sleep and Thread.Join from managed
8311 to unmanaged code. This avoids a deadlock when the thread was suspended
8312 just after acquiring the thread lock.
8313 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
8314 Implemented Thread.Suspend using an event instead of ThreadSuspend,
8315 which is not fully implemented in the io-layer.
8316 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
8318 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
8320 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
8321 threads-types.h: more API cleanups.
8323 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8325 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
8326 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
8327 threadpool.c, threads.c: first pass at the exported API cleanup.
8329 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
8331 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
8333 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8335 * icall.c: added internalGetHome.
8337 2004-06-14 Dick Porter <dick@ximian.com>
8339 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
8340 possible to return successfully when '.' or '..' were the only
8341 entries in a directory, but were skipped. The MonoIOStat was not
8342 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
8345 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8347 * reflection.c: make binaries run on .Net 1.1 by default.
8349 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8351 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
8353 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
8355 * marshal.c: keep track of struct size with explicit layout
8358 2004-06-12 Martin Baulig <martin@ximian.com>
8360 * mono-debug-debugger.c: Comment out a debugging g_message().
8362 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8364 * reflection.c, reflection.h: do not free custom attrs that are cached.
8365 * icall.c: use braces to make code clearer.
8367 2004-06-11 Martin Baulig <martin@ximian.com>
8369 * class.h (MonoInflatedField): New type.
8370 (MonoClassField): Replaced `MonoType *generic_type' with
8371 `MonoInflatedField *generic_info'.
8374 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
8376 2004-06-11 Martin Baulig <martin@ximian.com>
8378 * reflection.c (mono_image_create_method_token): Correctly encode
8381 2004-06-11 Martin Baulig <martin@ximian.com>
8383 * metadata.c (mono_metadata_parse_method_signature): When parsing
8384 a MethodDef which has VarArgs, also set sentinelpos if we don't
8385 have any parameters.
8387 2004-06-11 Martin Baulig <martin@ximian.com>
8389 * verify.c (mono_method_verify): In CEE_CALL, use
8390 mono_method_get_signature() to get the method's signature, unless
8391 we're a PInvoke method.
8393 2004-06-10 Jackson Harper <jackson@ximian.com>
8395 * assembly.c: Use <path>/lib/mono/gac for the extra paths
8396 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
8397 logical name as the supplied path is just a prefix to the gac not
8398 the direct path to it.
8400 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
8402 * reflection.c: make the token for a created method match
8403 the token of the MethodBuilder it was created from
8404 (IKVM requires this behaviour now).
8406 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
8408 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
8409 reflection.c, socket-io.c: leak fixes.
8411 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
8413 * icall.c: handle sentinel pos in vararg methods in position different
8416 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8418 * culture-info-tables.h: freshly generated.
8420 2004-06-09 Martin Baulig <martin@ximian.com>
8422 * loader.c (mono_get_method_constrained): Call `mono_class_init
8423 (constrained_class)'.
8425 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
8427 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
8428 any methods. Fixes #59629.
8430 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
8432 * culture-info-tables.h: reflecting locale-builder updates.
8434 2004-06-08 Dick Porter <dick@ximian.com>
8437 * locales.c: Fixed compile warnings, including a real bug in
8438 CompareInfo_internal_compare.
8440 2004-06-08 Dick Porter <dick@ximian.com>
8443 (ves_icall_System_Globalization_CompareInfo_internal_index):
8444 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
8445 Double-check the resuls of usearches, because ICU currently
8446 ignores most of the collator settings here. Fixes bug 59720.
8448 2004-06-08 Dick Porter <dick@ximian.com>
8451 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
8452 Fix memory leak and segfault-causing typo. No idea how this one
8453 lasted so long without being noticed.
8455 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
8457 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
8458 any methods. Fixes #59629.
8460 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8463 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
8464 own the critical section before). Removed dead code (that's done
8465 in the preload hook).
8467 (mono_assembly_load_with_partial_name): call the preload hook.
8469 2004-06-08 Martin Baulig <martin@ximian.com>
8471 * metadata.c (mono_metadata_signature_alloc): Default
8472 `sentinelpos' to -1.
8474 * reflection.c (mono_image_get_array_token): Likewise.
8476 2004-06-08 Martin Baulig <martin@ximian.com>
8478 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
8480 * metadata.c (mono_metadata_parse_method_signature): When parsing
8481 a MethodDef which has VarArgs, set sentinelpos.
8483 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
8484 `gint16' since we're using -1 for non-varargs methods.
8487 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
8488 (method_encode_signature): Added varargs support.
8489 (method_builder_encode_signature): Likewise.
8490 (mono_image_get_varargs_method_token): New static method.
8491 (mono_image_create_method_token): New public method; this is
8492 called via an icall instead of mono_image_create_token() when
8493 calling a varargs method.
8495 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
8497 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
8499 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
8501 * culture-info-tables.h : Reflecting the latest locale-builder that
8502 fixed empty array representation ({} to {0}).
8504 2004-06-07 Jackson Harper <jackson@ximian.com>
8506 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
8507 looking up extra gac paths. This allows MONO_GAC_PATH to act
8508 exactly like a prefix.
8510 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
8512 * reflection.c (mono_reflection_type_from_name): Make a copy of the
8513 type name before modifying it. Fixes #59405.
8515 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
8517 * culture-info.h: added fields for "all datetime patterns".
8518 * locales.c: ( ves_icall_System_Globalization_CultureInfo
8519 _construct_datetime_format ()): fill xxx_patterns fields.
8520 * object.h: added fields for "all datetime patterns" to
8521 MonoDateTimeFormatInfo.
8522 * culture-info-tables.h: reflecting locale-builder updates.
8524 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
8526 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
8527 the event has no add and remove methods. Fixes #59629.
8529 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
8531 * object.c: Fixed possible integer overflow when allocating large
8534 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
8536 * culture-info-tables.h: reflecting locale-builder updates.
8538 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
8540 * culture-info-tables.h: reflecting locale-builder updates.
8542 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
8544 * culture-info-tables.h: reflecting locale-builder updates.
8546 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
8548 * threads.c: Made Thread.Sleep abortable.
8550 2004-06-02 Martin Baulig <martin@ximian.com>
8552 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
8554 * debug-mono-symfile.h: Bumped symbol file version number to 37.
8556 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
8558 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
8560 2004-05-30 Jackson Harper <jackson@ximian.com>
8562 * reflection.c: Do not hardcode assembly versions or public key
8563 tokens anymore. All of this except the corlib section was dead
8566 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
8568 * object.c (mono_runtime_invoke_array): Automatically create boxed
8569 objects for byref valuetypes if needed. Fixes #59300.
8571 * object.c (mono_method_return_message_restore): Handle
8572 MONO_TYPE_OBJECT as well.
8574 2004-05-28 Jackson Harper <jackson@ximian.com>
8576 * reflection.c: The modified type encoding was causing build
8577 problems. Reverted for now.
8579 2004-05-28 Jackson Harper <jackson@ximian.com>
8581 * reflection.c/h: Take an assembly ref so that we dont create
8582 fully qualified names when encoding types in the same assembly as
8583 the custom attribute being emitted.
8584 * appdomain.c: Increment version number.
8586 2004-05-26 Duncan Mak <duncan@ximian.com>
8589 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
8590 Set the full version number (major, minor, build, revision).
8592 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
8594 * marshal.c (emit_struct_conv): increment src/dst after blit
8595 (mono_marshal_get_managed_wrapper,
8596 mono_marshal_get_native_wrapper): make sure we have marshalling
8597 info before marshalling params (info computation affects
8600 * class.c (class_compute_field_layout): correctly deal with
8602 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
8603 value types (as per what windows dows by default)
8604 (mono_class_setup_mono_type): System.ValueType is blittable
8605 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
8608 * marshal.c (mono_marshal_load_type_info): flag types as
8609 non-blittable if the native layout doesn't match the managed
8612 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8614 * appdomain.c: don't add stuff in the private search path that is
8615 above the application base. If application base is not set, there's
8616 no private search path.
8618 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
8620 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
8621 byref struct arguments in native->managed marshalling.
8623 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
8625 * marshal.c (mono_marshal_get_runtime_invoke): correctly
8626 cache methods using signature (special case for methods
8627 that are value type or string class)
8629 * image.c (mono_image_close): clean up allocated GSList's
8630 in runtime_invoke_cache.
8632 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8634 * mono-config.c: set the correct path for mono_cfg_dir on windows when
8635 there's no MONO_CFG_DIR environment variable defined.
8637 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8639 * threads.c: windows version must be >= 0x0500 to include OpenThread.
8641 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
8643 * threadpool.c: Really wait for 500ms after the async call, even if the wait
8645 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
8646 before waiting for it, and call CloseHandle after the wait to unref it.
8647 This will make sure that handles are not disposed too early.
8649 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8654 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
8657 * object.c: se the application_base only for the domain that runs
8658 Main. Fixes bug #59216,
8660 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8663 * object.c: only the domain in which Main is run have
8664 SetupInformation.ConfigurationFile set, so moved a few lines from
8665 appdomain.c to object.c.
8667 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8669 * appdomain.c: we tried to load [name].(dll|exe), but according
8670 to bug #57710, we must also try [culture]/[name].(dll|exe) and
8671 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
8672 There's a test case attached to bug #58922.
8674 2004-05-27 Dick Porter <dick@ximian.com>
8677 * file-io.c: Implemented icalls for locking and unlocking regions
8679 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
8680 FALSE on error (fixes both compiler warning and real bug.)
8682 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
8684 * culture-info-tables.h: reflecting locale-builder updates.
8686 (Added missing ChangeLog entry for 05/26)
8688 2004-05-27 Jackson Harper <jackson@ximian.com>
8690 * locales.c: Fix some cut and paste errors.
8692 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8694 * mono-config.c: set the correct path for config. directory on windows.
8696 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
8698 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
8701 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
8703 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
8704 from pinvoke functions.
8706 * marshal.c (mono_ftnptr_to_delegate): Implement this.
8708 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
8710 * culture-info-tables.h: reflecting locale-builder updates.
8712 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
8714 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
8717 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
8719 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
8720 * icall.c: Modified icalls for RNG.
8721 * rand.c|h: Changed RNG interface to allow thread-safe usage under
8722 Windows (CryptoAPI).
8724 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
8726 * locales.c: Fix build.
8728 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
8730 * culture-info-tables.h: reflecting locale-builder updates.
8732 2004-05-25 Jackson Harper <jackson@ximian.com>
8734 * locales.c: When creating the current culture use the $LANGs
8735 specific culture. So DateTimeFormat and NumberFormat entries are created.
8737 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
8739 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
8740 a char array as parameter.
8742 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
8744 * image.c: In mono_image_open(), always use an absolute path name to
8745 look for already loaded images.
8747 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
8749 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
8750 missing in the windows build (like older cygwin include files).
8752 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
8754 * icall.c: Fixed check for possible integer overflow in Buffer_
8755 BlockCopy icall. Replaced comments style // by /* */.
8757 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
8759 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
8761 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
8762 check after MONO_VTADDR. Fixes pinvoke2.exe.
8764 * marshal.h marshal.c metadata.h: Add beginnings of support for
8765 ftnptr -> delegate marshalling.
8767 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
8769 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
8770 * threads.c: Fix warnings.
8772 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
8774 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
8775 * icall.c: Registered icalls for Suspend and Resume.
8776 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
8778 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
8779 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
8780 * process.c: Use WaitForSingleObjectEx.
8781 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
8783 * threads.c, threads.h: Make use of new Ex wait methods. Improved
8784 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
8785 for Suspend and Resume. Added new mono_thread_stop, used for stoping
8786 background threads. Added basic support for Abort in Windows.
8787 Start new threads using a managed delegate invoke wrapper. This wrapper
8788 has an interruption checkpoint that is needed since an interruption
8789 can be requested before the thread leaves the unmanaged code that starts
8791 * marshal.c: Added interruption checkpoint after every native call, and
8792 also before managed calls for wrappers called from unmanaged code to
8793 go into managed code.
8794 * object.h: Added new field in MonoThread to keep track of interruption
8797 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
8799 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
8802 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8809 * rand.c: getenv -> g_getenv (windows!)
8811 * process.c: complete_path is also used on non-windows platforms.
8813 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8815 * icall.c: new signature for Process_Start.
8817 * process.[ch]: new signature for Process_Start. If we're on windows
8818 and UseShellExecute is false, we have to search for the program by
8819 ourselves if we don't get a full path.
8821 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
8823 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
8824 marshalling and call CleanUpNativeData if needed. Fixes #58646.
8826 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8828 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
8831 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8833 * process.c: use double quotes to quote program name and arguments on
8834 windows. Fixes bug #58575.
8836 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8838 * file-io.c: don't return "." and ".." when using windows Find*File.
8840 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
8842 * marshal.c: Don't pass wrappers to message init because method
8843 addressed used to lookup metadata. part of remoting[2|3] fix.
8845 2004-05-15 Jackson Harper <jackson@ximian.com>
8847 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
8848 path is essentially the same as MONO_PATH except that it points to
8849 GACs instead of lib directories.
8850 * loader.h: The user gac is gone so we dont need function to
8852 * mono-config.c: user gac option is now gone.
8854 2004-05-15 Jackson Harper <jackson@ximian.com>
8856 * culture-info.h: Make defines more consistent, add calendar data
8857 to the culture info table.
8858 * culture-info-tables.h: Add basic calendar data. Basically
8859 everyone gets default gregorian until all the data is
8861 * locales.c: Use the new consistent defines. Set calendar data for
8862 culture info objects.
8863 * object.h: add a field for calendar data to CultureInfo
8865 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
8867 * image.c: image->runtime_invoke_cache is keyed on signatures now.
8868 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
8870 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
8871 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
8872 an extra param that is the pointer of the method to invoke. The IL for
8873 the invoke method is no longer specific to the method, but to the
8874 signature of the method. Thus, we can share the same code for multiple
8875 methods. This reduces the number of methods that have to be compiled.
8877 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
8879 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
8881 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8883 * icall.c: Optimize Buffer.BlockCopy.
8885 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8887 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
8888 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
8889 quote). Changed them to "MMMM yyyy".
8891 2004-05-12 Miguel de Icaza <miguel@ximian.com>
8894 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
8896 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
8898 * reflection.h: Updated after changes to managed structures.
8900 * appdomain.c: Bump corlib version.
8902 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8904 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
8907 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8909 * Makefile.am: link to ../os/libmonoos.la on windows.
8912 -If MONO_DEBUG, warn about non-existing directories in
8914 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
8915 compile time variable.
8916 -Removed init_default_path and call mono_set_rootdir from
8917 libmonoos.a instead (windows only).
8919 * assembly.h: declare mono_assembly_getrootdir().
8922 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
8924 * loader.c: s/getenv/g_getenv/
8926 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
8928 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
8930 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
8932 * metadata.h: Add new marshalling conversions.
8934 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
8937 * reflection.c (mono_reflection_get_type): Lookup the type in all
8938 modules of a multi-module assembly. Fixes #58291.
8940 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
8942 * threads.c: Before aborting a background, set the StopRequested
8943 state. This avoids throwing the Abort exception.
8944 In mono_thread_manage, don't continue with the shutdown until all
8945 aborted threads have actually stopped.
8947 2004-05-10 Jackson Harper <jackson@ximian.com>
8949 * locales.c: Remove the modifier from culture names.
8951 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8953 * Makefile.am: monosn is not installed any more. It has been deprecated
8956 2004-05-07 Jackson Harper <jackson@ximian.com>
8959 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
8960 Fix array construction, add bailout if the length is 0.
8962 2004-05-07 Dick Porter <dick@ximian.com>
8964 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
8965 machine doesn't have a DNS entry. Patch by Urs Muff
8966 (umuff@quark.com), fixes bug 57928.
8968 2004-05-06 Jackson Harper <jackson@ximian.com>
8970 * reflection.c: Handle null PublicTokens properly. alloc mem for
8971 assembly names culture so we dont crash when freeing it.
8973 2004-05-06 Jackson Harper <jackson@ximian.com>
8975 * assembly.c: Check the usergac when loading with partial names.
8977 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
8979 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
8980 does nothing for now (not required for Linux/Windows) but the class
8981 library can call it (and a newer or modified runtime could need it).
8982 * icall.c: Registred icall.
8984 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8986 * loader.c: prints a message on module loading error we set MONO_DEBUG
8987 environment variable.
8989 2004-05-05 Jackson Harper <jackson@ximian.com>
8991 * appdomain.c: Handle PublicKeyToken=null properly.
8993 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
8995 * environment.c|h: Added icall ves_icall_System_Environment_
8996 GetOSVersionString to get the current OS version as a string.
8997 * icall.c: Registred icall.
8999 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
9001 * object.c: in mono_object_get_virtual_method(), take into account that
9002 non-virtual methods don't have a slot in the vtable. Check needed when
9003 the object is a proxy.
9005 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
9007 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
9008 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
9010 * object.c (mono_class_compute_gc_descriptor): Fix warning.
9012 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
9013 passed when a valuetype is expected.
9015 * object.c (mono_unhandled_exception): Only set the exit code if the
9016 exception happens in the main thread. Fixes thread5.exe.
9018 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
9019 invalid names. Fixes #58047.
9021 2004-05-03 Jackson Harper <jackson@ximian.com>
9023 * assembly.c: This line was committed accidently and is unneeded.
9025 2004-05-03 Jackson Harper <jackson@ximian.com>
9027 * icall.c: Add new icall for Assembly::LoadWithPartialName
9028 * assembly.c/.h: new function that probes the GAC to load partial
9029 assembly names by Paolo Molaro.
9031 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9033 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
9034 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
9035 (type_get_fully_qualified_name): Added PublicKeyToken when building a
9038 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9040 * appdomain.c: fixed check for 'neutral' culture and removed warning.
9041 * reflection.c: fix bug when parsing a full type name and Version is not
9042 the last thing in the string.
9044 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
9046 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
9047 crashes when it is freed.
9049 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9051 * assembly.c: print the compat warning to stderr.
9053 2004-05-01 Miguel de Icaza <miguel@ximian.com>
9055 * assembly.c (mono_assembly_load_references): Add a compatibility
9056 hack to run old applications that might be still referencing the
9057 3300-based assemblies, only do this for System.xxx.
9059 2004-05-01 Jackson Harper <jackson@ximian.com>
9061 * appdomain.c: If the culture is neutral we set it to "".
9063 2004-04-29 Jackson Harper <jackson@ximian.com>
9065 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
9067 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
9069 * string-icalls.c: added low overhead function for copying chars
9070 * icall.c: added needed icall for the above function
9072 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9074 * icall.c: fix return value of get_global_assembly_cache. Implemented
9075 Environment.GetLogicalDrives.
9077 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
9079 * rand.c: try and talk to egd or prngd
9080 for random bytes if opening devices fail.
9082 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
9084 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
9085 alignment for the type using the native alignment of its members
9086 instead of using klass->min_align.
9088 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
9090 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9093 * socket-io.c: added check for sys/aio.h.
9095 2004-04-28 Dick Porter <dick@ximian.com>
9097 * threads.c: Don't abort a thread thats already aborting, when
9098 terminating everything.
9100 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9102 * icall.c: added 2 new async calls for Socket.
9104 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
9107 * threadpool.c: removed unused variable.
9109 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
9111 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
9113 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9115 * locales.c: put back string_invariant_tolower () and
9116 string_invariant_toupper ().
9118 2004-04-26 David Waite <mass@akuma.org>
9123 * unicode.h: remove comma from end of enumeration declarations
9125 2004-04-26 David Waite <mass@akuma.org>
9127 * debug-mono-symfile.h:
9130 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
9133 2004-04-26 Jackson Harper <jackson@ximian.com>
9135 * appdomain.c: Increment version number.
9137 2004-04-26 Jackson Harper <jackson@ximian.com>
9139 * appdomain.c: Set assembly references public token value when
9140 PublicKeyToken is specified, not the hash_value. Free public token
9141 values when free assembly name data. Previously the public key
9142 token was hex decoded, however we are using hex encoded public key
9143 tokens, so this is not neccasary.
9144 * assembly.c: Lookup assemblies in the gac if their public token
9145 value is set. Add function to allow enabling user gac
9146 lookups. Specify whether or not the assembly was loaded from the
9147 GAC. Compare full assembly names when checking the cache for
9148 assemblies (Temporarily disabled see comment in code). Remove
9149 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
9150 specifies trace-loader they get extra info to stdout on the
9151 loading of assemblies.
9152 * image.h: Add a field for an assembly references public token
9153 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
9154 whether an assembly has been loaded from the GAC.
9155 * image.c: Remove a corlib -> mscorlib name mapping.
9156 * loader.h: Add function to enable/disable the user gac.
9157 * mono-config.c: Check if the usergac is enabled in the config
9159 * icall.c: New icall to determine whether or not an assembly has
9160 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
9161 * tabldefs.h: Add constant for assemblyref flag that specifies a
9162 full public key is used instead of a public token.
9163 * reflection.c: Remove mscorlib -> corlib mappings. Set
9164 PublicTokenValue instead of hash value. This value is a hex
9165 string so it does not need to be expanded.
9167 2004-04-26 Martin Baulig <martin@ximian.com>
9169 * mono-debug-debugger.c (mono_debugger_initialize): Set
9170 `mono_debugger_initialized' before calling mono_debug_lock().
9172 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
9174 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
9175 InternalToUpper/InternalToLower.
9176 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
9177 removed invariant culture shortcut. This is now done in managed code.
9178 * locales.c: (string_invariant_toupper/tolower) removed.
9180 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9182 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
9183 Added Poll internal call.
9185 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
9186 call for Poll. Select was too heavy for polling a single socket.
9188 * threadpool.[ch]: added mono_threadpool_cleanup.
9189 * threads.c: use it. Don't use Thread_Abort on windows.
9191 2004-04-23 Martin Baulig <martin@ximian.com>
9193 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
9195 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
9197 * icall.c: Registred new icalls for key pair protection and added an
9198 icall for Environment.GetFolderPath on Windows.
9199 * security.c|h: Added new icalls for key pair protection.
9201 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9203 * socket-io.c: don't display the non-supported family warning for known
9204 families. Now this is not displayed on windows when checking support
9207 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9209 * class.c: don't display the layout warning for static fields.
9211 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
9213 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
9214 * locales.c, locales.h: Added new icalls for culture-specific
9215 Char.ToLower and Char.ToUpper.
9217 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9219 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
9222 2004-04-20 Martin Baulig <martin@ximian.com>
9224 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
9225 of the type name before passing it to mono_reflection_type_from_name().
9227 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
9229 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
9230 encodings here. Fixes #56965.
9232 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
9234 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9235 fix test on strstr result not that I can see anything that
9236 relies on the result.
9238 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
9240 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
9243 * marshal.c (mono_marshal_get_string_encoding): New helper function.
9245 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
9246 function to determine which marshalling to use for strings. Fixes
9249 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
9251 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
9253 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
9255 * icall.c: #include mono-config.h
9257 2004-04-15 Jackson Harper <jackson@ximian.com>
9259 * culture-info-tables.h: Fix date formats for en-US culture.
9261 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
9263 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
9264 ThreadPool.SetMinThreads.
9265 * threadpool.c: Implemented ThreadPool.GetMinThreads and
9266 ThreadPool.SetMinThreads.
9268 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9270 * mono-config.c: also load the .config file in the directory
9271 where the assembly was found.
9273 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
9275 * assembly.c: load per-assembly config files.
9276 * icall.c: decrapified code to get the config dir and moved to
9278 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
9279 per-assembly config files. When doing a dll map lookup give precedence
9280 to the per-assembly data.
9282 2004-04-14 Martin Baulig <martin@ximian.com>
9284 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
9285 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
9286 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
9288 * mono-debugger-debugger.c: While the debugger is locked, remember
9289 whether the symbol tables have changes and send one single
9290 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
9292 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
9294 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
9296 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
9299 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
9300 account when marshalling string arrays. Fixes #56965.
9302 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
9304 * icall.c: Add new icalls mapping for security.
9305 * security.c|h: Add internal calls for WindowsIdentity,
9306 WindowsImpersonationContext and WindowsPrincipal.
9308 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
9310 * class.c: Added comment to ensure the System.MonoDummy class
9311 is removed when no longer necessary
9313 2004-04-13 Miguel de Icaza <miguel@ximian.com>
9315 * appdomain.c: Pass arguments to the bootstraping exceptions to
9316 minimize JITed methods at boot
9318 * metadata.c (mono_exception_from_name_two_strings): Allow for the
9319 second string to be null.
9321 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9322 Change the protocol to minimize the JIT methods at startup. Now
9323 it Returns the internal codepage, if the value of "int_code_page"
9324 is 1 at entry, and we can not compute a suitable code page
9325 number, returns the code page as a string.
9327 2004-04-13 Jackson Harper <jackson@ximian.com>
9329 * culture-info-tables.h: Fix number of decimal digits for all
9332 2004-04-13 Jackson Harper <jackson@ximian.com>
9334 * icall.c: Clairfy out of sync error message. It is not always
9335 your corlib that is out of sync.
9337 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
9339 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
9340 properties when only the set accessor is overriden. Fixes #55874.
9342 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
9344 * assembly.c (mono_assembly_load_references): Make this thread safe.
9347 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
9349 * monosn.c: Add missing initialization calls.
9351 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
9354 ves_icall_System_Globalization_CultureInfo_construct_number_format
9355 Fix g_assert so it compiles on fussier compilers re int/ptr
9358 2004-04-08 Dick Porter <dick@ximian.com>
9361 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
9362 53992. Also rearrange the code so that the internal calls return
9363 an error value and exceptions are thrown from managed code.
9365 * icall.c: Add type info to the socket icalls.
9367 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9369 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
9372 2004-04-07 Martin Baulig <martin@ximian.com>
9374 * class.c (mono_class_from_generic_parameter): Don't default
9375 `klass->parent' to `mono_defaults.object_type'.
9377 2004-04-07 Martin Baulig <martin@ximian.com>
9379 * reflection.c (mono_reflection_initialize_generic_parameter): Set
9380 `param->pklass->reflection_info'.
9382 2004-04-07 Jackson Harper <jackson@ximian.com>
9384 * culture-info-tables.h: Fix date separator symbol.
9386 2004-04-07 Martin Baulig <martin@ximian.com>
9388 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
9389 from System.Type to System.MonoType.
9391 2004-04-07 Martin Baulig <martin@ximian.com>
9394 (MonoReflectionGenericParam): Added `has_reference_type' and
9395 `has_value_type' fields.
9397 * reflection.c (mono_image_get_generic_param_info): Encode the
9398 correct flags if we have the `class' or `struct' constraint.
9400 2004-04-07 Martin Baulig <martin@ximian.com>
9403 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
9405 2004-04-07 Jackson Harper <jackson@ximian.com>
9407 * appdomain.c: Revert extra patches, just wanted to bump the
9410 2004-04-07 Jackson Harper <jackson@ximian.com>
9412 * Makefile.am: Add culture-info private headers.
9413 * icall.c: Add new icalls for contructing locales.
9414 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
9415 * locales.h: Declare new culture info construction methods.
9416 * object.h: Add new fields used to avoid the CultureMap to
9418 * culture-info.h: Definition of structs used in the culture info
9420 * culture-info-tables.h: Autogenerated tables that contain culture
9421 info data. This file was generated with the locale-builder tool.
9422 * appdomain.c: Incement corlib version number.
9424 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
9426 * appdomain.c: (mono_runtime_init) move mono_thread_init
9427 to before mono_object_new calls so critical sections
9428 are initialized before use.
9430 2004-04-07 Martin Baulig <martin@ximian.com>
9433 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
9434 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
9435 (ves_icall_MonoGenericParam_initialize): Removed.
9436 (monogenericparam_icalls): Removed.
9437 (generictypeparambuilder_icalls): Added new table for
9438 System.Reflection.Emit.GenericTypeParameterBuilder.
9441 (mono_reflection_define_generic_parameter): Removed.
9442 (mono_reflection_initialize_generic_parameter): This is now called
9443 from GenericTypeParameterBuilder's .ctor.
9445 2004-04-06 Martin Baulig <martin@ximian.com>
9447 * class.c (mono_class_init): Don't inflate nested classes in a
9449 (mono_type_get_name_recurse): Include the generic arguments for
9450 generic instances and generic type declarations.
9451 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
9452 (_mono_class_get_instantiation_name): Removed.
9453 (mono_class_create_generic): Always use `gklass->name' as our name.
9455 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
9457 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
9458 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
9459 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
9460 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
9461 closed generic methods here.
9464 (mono_reflection_generic_inst_get_nested_types): Removed.
9465 (inflate_mono_method): Copy the generic parameters from the
9466 MonoMethodHeader into out MonoGenericMethod.
9468 2004-04-06 Martin Baulig <martin@ximian.com>
9471 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
9473 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
9475 * reflection.c (build_compressed_metadata): If we have any entries
9476 in the GenericParam, MethodSpec or GenericParamConstraint tables,
9477 set the header version to 1.1.
9479 2004-04-06 Martin Baulig <martin@ximian.com>
9481 * class.c (mono_class_init): If we're a generic instance,
9482 initialize our nested classes, too.
9483 (_mono_class_get_instantiation_name): Deal with the new `!%d'
9486 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9488 * process.c: quote the argument passed to the shell on windows.
9490 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
9492 * threads.c (mono_alloc_special_static_data): Allow this to be
9493 called during startup.
9495 2004-04-02 Martin Baulig <martin@ximian.com>
9498 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
9500 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
9502 * icall.c: Fix build.
9504 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
9506 * Makefile.am: Added security.c|h.
9507 * icall.c: Added icall for get_UserName;
9508 * security.c: New file for security related icalls. Added function
9509 get_UserName for System.Environment (fix #56144).
9510 * security.h: New. Header file for security.c
9512 2004-04-02 Dick Porter <dick@ximian.com>
9514 * icall.c: Deleted the icalls that were obsoleted some time ago
9515 by the ICU string code, and which were mixed into the icall
9516 rearranging. Fixes bug 55969.
9519 * string-icalls.c: Deleted the code that those icalls reference.
9521 2004-04-01 Martin Baulig <martin@ximian.com>
9523 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
9525 * class.c (mono_class_from_generic_parameter): Don't set
9526 TYPE_ATTRIBUTE_INTERFACE.
9527 (my_mono_class_from_generic_parameter): Likewise.
9529 2004-04-01 Martin Baulig <martin@ximian.com>
9531 * loader.c (find_method): Added an optional `MonoClass *ic'
9532 argument to search in a specific interface.
9533 (mono_get_method_constrained): New public function.
9535 2004-04-01 Martin Baulig <martin@ximian.com>
9537 * reflection.c (mono_image_get_generic_field_token): Use the
9538 `handleref' cache here.
9540 2004-04-01 Martin Baulig <martin@ximian.com>
9542 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
9544 * reflection.c (create_generic_typespec): Use the `typespec' hash
9545 here, not the `typeref' one.
9547 2004-04-01 Martin Baulig <martin@ximian.com>
9549 * class.c (mono_class_inflate_generic_type): Moved the
9550 functionality into a new static inflate_generic_type() which
9551 returns NULL if it didn't do anything. Only increment the
9552 `mono_stats.inflated_type_count' if we actually inflated
9554 (mono_class_get_full): Check the classes type to see whether we
9555 need to inflate it; also inflate MONO_TYPE_(M)VAR.
9557 2004-04-01 Jackson Harper <jackson@ximian.com>
9559 * reflection.c: Set culture for assembly references.
9561 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
9563 * reflection.[ch], icall.[ch], Fix support for pinning variables.
9565 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9568 (do_mono_assembly_open): the critical section also covers
9569 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
9571 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9574 (mono_manage_threads): abort the background threads when finishing.
9577 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9579 * gc.c: only close the done_event handle if there was no timeout.
9582 2004-03-30 Martin Baulig <martin@ximian.com>
9584 * icall.c (icall_entries): It's called "System.Activator", not
9585 "System.Activation".
9587 2004-03-30 Martin Baulig <martin@ximian.com>
9589 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
9590 (mono_class_create_from_typespec): Likewise.
9592 2004-03-30 Martin Baulig <martin@ximian.com>
9594 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
9595 `has_ctor_constraint' and `initialized'.
9597 2004-03-30 Martin Baulig <martin@ximian.com>
9599 * reflection.c (encode_new_constraint): New static function to add
9600 the constructor constraint attribute to a type parameter.
9601 (encode_constraints): Call encode_new_constraint() if necessary.
9604 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
9606 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
9608 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
9610 * reflection.c, icall.c: add support for pinning variables.
9612 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
9614 * marshal.c (mono_marshal_get_managed_wrapper):
9615 init bool local with zero rather than null.
9617 2004-03-29 Martin Baulig <martin@ximian.com>
9619 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
9620 the "official" behavior here.
9621 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
9623 2004-03-29 Martin Baulig <martin@ximian.com>
9625 * icall.c: Reflect latest API changes.
9627 2004-03-29 Martin Baulig <martin@ximian.com>
9629 * loader.c (mono_get_method_from_token): Also call
9630 mono_metadata_load_generic_params () for abstract and interface
9631 methods; replace the type arguments in the method signature with
9632 the ones which are loaded from the metadata.
9634 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
9636 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
9637 of the lock is not the current thread. MS.NET don't do it, in spite of
9638 what the documentation says. See bug #56157.
9640 2004-03-28 Martin Baulig <martin@ximian.com>
9642 * class.c (mono_class_init): Don't call init_properties() and
9643 init_events() for generic instances; set `prop->parent' when
9644 inflating properties.
9646 * reflection.c (mono_generic_inst_get_object): Call
9647 `mono_class_init (ginst->klass)'.
9648 (mono_type_get_object): Only create a MonoGenericInst if your
9649 generic type is a TypeBuilder.
9650 (do_mono_reflection_bind_generic_parameters): Only set
9651 `ginst->is_dynamic' if our generic type is a TypeBuilder.
9653 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
9655 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
9658 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9660 * icall.c: added Kill_internal icall.
9661 * process.[ch]: added Kill_internal icall.
9663 2004-03-25 Martin Baulig <martin@ximian.com>
9665 * class.h (MonoStats): Added `generic_instance_count',
9666 `inflated_method_count', `inflated_type_count' and
9667 `generics_metadata_size'.
9669 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9671 * reflection.c: no warnings now.
9673 2004-03-25 Martin Baulig <martin@ximian.com>
9675 * class.c (mono_class_get_full): New public function; does a
9676 mono_class_get(), but also takes a `MonoGenericContext *'.
9678 * loader.c (mono_field_from_memberref): Renamed to
9679 `field_from_memberref', made static and added `MonoGenericContext *'
9681 (mono_field_from_token): Added `MonoGenericInst *' argument.
9682 (method_from_memberef): Likewise.
9683 (mono_get_method_from_token): Likewise.
9684 (mono_get_method_full): New public function; does a
9685 mono_get_method(), but also takes a `MonoGenericContext *'.
9687 * verify.c (mono_method_verify): Get the method's generic context
9688 and pass it to mono_field_from_token(), mono_get_method_full() and
9689 mono_class_get_full().
9691 2004-03-25 Martin Baulig <martin@ximian.com>
9693 * class.c (mono_class_inflate_generic_type): Take a
9694 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
9695 `MonoGenericMethod *'.
9697 2004-03-25 Martin Baulig <martin@ximian.com>
9699 * loader.h (MonoMethodInflated): Store the MonoGenericContext
9700 instead of the MonoGenericMethod here.
9702 2004-03-25 Martin Baulig <martin@ximian.com>
9704 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
9705 each time we create a new MonoGenericInst, we also create a new
9706 context which points back to us.
9708 * class.c (inflate_method): Use `ginst->context' instead of
9709 creating a new context.
9711 * loader.c (method_from_memberref): Use
9712 `klass->generic_inst->context' instead of creating a new context.
9714 2004-03-25 Martin Baulig <martin@ximian.com>
9716 * class.h (MonoGenericContext): New struct.
9717 (MonoGenericMethod): Removed `generic_inst'.
9719 * class.c (mono_class_inflate_generic_method): Take a
9720 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
9722 2004-03-25 Martin Baulig <martin@ximian.com>
9724 * loader.h (MonoMethodInflated): New typedef.
9726 * metadata.h (MonoMethodSignature): Removed `gen_method', make
9727 `generic_param_count' consume just 30 bits, added `is_inflated'
9728 and `has_type_parameters' flags (one bit each).
9730 * class.c (mono_class_inflate_generic_method): Create a
9731 MonoMethodInflated instead of a MonoMethodNormal and set
9732 `is_inflated' in the method signature.
9734 * class.h (MonoGenericMethod): Removed `generic_method'.
9736 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
9738 * image.c: Make sure the name of a MonoImage is always an absolute path.
9739 This fixes bug #54415.
9741 2004-03-24 Martin Baulig <martin@ximian.com>
9743 * class.c (mono_class_setup_vtable): If we're a generic instance,
9744 use our generic type's vtable size.
9746 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
9748 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
9749 MONO_NO_UNLOAD env var as a temporary workaround for unloading
9752 2004-03-23 Martin Baulig <martin@ximian.com>
9754 * class.h (MonoDynamicGenericInst): Added `int count_events' and
9755 `MonoEvent *events'.
9757 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
9758 (typebuilder_icalls): Added "get_event_info"; calls
9759 mono_reflection_event_builder_get_event_info().
9761 * reflection.c (mono_reflection_generic_inst_initialize): Added
9762 `MonoArray *events'.
9763 (mono_reflection_event_builder_get_event_info): New function.
9765 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
9767 * object.h: add mono_type_initialization_init
9769 * object.c (mono_runtime_class_init):
9770 implement class constructor synchronization rules
9771 to cope with threading issues.
9772 add mono_type_initialization_init
9774 * appdomain.c (mono_runtime_init): call
9775 mono_type_initialization_init
9777 * class.h: removing initializing field from MonoVTable
9779 2004-03-23 Martin Baulig <martin@ximian.com>
9781 * class.c (my_mono_class_from_generic_parameter): Use
9782 `param->name' if it's not NULL.
9784 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
9786 * class.c: do not insert non-virtual methods in the vtable.
9787 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
9788 that means the method is non-virtual. This never would have
9791 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
9793 * profiler.c: Added lock for accessing coverage_hash.
9795 2004-03-22 Martin Baulig <martin@ximian.com>
9797 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
9798 `method->method->signature->generic_param_count != 0' to make it
9799 work for interface methods.
9801 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9803 * process.c: quote the string passed to the shell using g_shell_quote.
9805 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9808 (mono_threads_manage): don't remove the finalizer thread and self
9809 from the threads hash table so that mono_thread_manage can be called
9812 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9814 * process.c: quote the arguments when UseShellExecute is true. Fixes
9817 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9819 * threads.c: set mono_thread_detach as a cleanup routine for every
9820 thread. This way it's always executed upon thread termination, either
9821 aborted or finished normally. No more xsp hangs!
9823 2004-03-17 Martin Baulig <martin@ximian.com>
9825 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
9826 `int count_nested' and a `MonoType **nested'.
9828 * reflection.c (mono_reflection_bind_generic_parameters): Moved
9829 most of the functionality into a new static
9830 do_mono_reflection_bind_generic_parameters() and don't take a
9831 `MonoType *nested_in' argument any more. Don't compute nested
9833 (mono_reflection_generic_inst_get_nested_types): New public method
9834 to get nested types.
9836 * class.c (mono_class_create_generic): Set `klass->nested_in' if
9837 we're a nested class.
9839 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
9840 mono_reflection_generic_inst_get_nested_types() to compute the
9843 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
9845 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
9846 descriptive error message under windows.
9848 2004-03-17 Martin Baulig <martin@ximian.com>
9850 * class.c (dup_type): Added `const MonoType *original' argument;
9851 copy the attrs from the original type.
9853 2004-03-17 Martin Baulig <martin@ximian.com>
9855 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
9856 `m->generic_inst_cache' here.
9858 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
9860 * exception.h exception.c: Add stack_overflow_exception.
9862 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9865 (overlapped_callback): call SetEvent *after* invoking the callback.
9866 No need to call CloseHandle.
9868 2004-03-16 Martin Baulig <martin@ximian.com>
9870 * reflection.c (mono_image_get_fieldref_token): Take a
9871 `MonoReflectionField *' instead of a `MonoClassField *' and a
9872 `MonoClass *'; store the `MonoReflectionField *' in the hash.
9874 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9876 * appdomain.c: don't add the culture to the filename we're looking for
9877 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
9879 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9881 * locales.c: don't ignore symbols when doing case insensitive compares.
9882 Thanks Dick! Fixes bug #54046.
9884 * threads.c: surround 'threads' usage with enter/leave in
9887 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
9889 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
9890 implicitly marshalled as [Out]. Fixes #55450.
9892 (mono_marshal_get_runtime_invoke): Zero out the result if there is
9895 2004-03-16 Martin Baulig <martin@ximian.com>
9897 * class.c (mono_class_from_generic_parameter): Use the actual
9900 2004-03-16 Martin Baulig <martin@ximian.com>
9902 * reflection.c (type_get_signature_size): New static function.
9903 Compues the size of the type in a method signature.
9904 (method_get_signature_size): New static function; calls
9905 type_get_signature_size() to compute the actual size of the
9907 (method_encode_signature): Use method_get_signature_size() to get
9908 the signature's size rather than using `nparams * 10'.
9910 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9912 * file-io.h: define here WapiOverlapped on windows. I don't want the
9913 regular OVERLAPPED one.
9916 * threadpool.c: somehow, BindIoCompletionCallback is not found.
9917 Disabling AIO on windows.
9919 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9921 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
9924 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9926 * appdomain.c: upgraded corlib version.
9928 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
9929 and BeginWrite. Allow opening files for asynchrnous operations.
9931 * file-io.h: new struct that maps FileStreamAsyncResult.
9932 * icall.c: added new icalls.
9933 * process.[ch]: support setting child process environment variables
9934 and use the SHELL or COMSPEC when UseShellExecute is true.
9936 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
9937 callback for async. IO is here and also BindHandle.
9939 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
9942 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
9944 * reflection.c (create_custom_attr): Allow len == 0.
9946 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
9947 computation on big-endian machines.
9949 2004-03-13 Martin Baulig <martin@ximian.com>
9951 * class.h (MonoGenericInst): Added `int count_ifaces'.
9953 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
9954 `ginst->count_ifaces' instead `klass->interface_count' since we
9955 may get called before the vtable is created.
9957 * loader.c (mono_method_get_param_names): If we're a generic
9958 instance, return and don't initialize the class.
9960 * reflection.c (mono_reflection_setup_generic_class): Don't call
9961 ensure_runtime_vtable().
9962 (mono_reflection_bind_generic_parameters): Set
9963 `ginst->count_ifaces'.
9965 2004-03-11 Jackson Harper <jackson@ximian.com>
9969 * unicode.h: Remove unused System.Char icalls.
9971 2004-03-11 Miguel de Icaza <miguel@ximian.com>
9973 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
9974 code when we P/Invoke the first library in Windows.Forms, instead
9975 of when we first open the assembly.
9977 * assembly.c: Drop the lookup from here.
9979 2004-03-10 Martin Baulig <martin@ximian.com>
9981 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
9982 class for properties, fields and events. Finally fixes #54945.
9984 2004-03-10 Martin Baulig <martin@ximian.com>
9986 * metadata.c (mono_metadata_class_equal): New static function;
9987 checks whether two generic instances or two generic parameters are
9989 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
9992 2004-03-10 Martin Baulig <martin@ximian.com>
9994 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
9996 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
9997 argument and write it into the `reflection_info' field.
10000 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
10001 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
10003 2004-03-09 Jackson Harper <jackson@ximian.com>
10005 * char-conversions.h: use 8 bits for numeric data its all we need
10006 * icall.c: numeric data is only 8 bits now.
10008 2004-03-09 Martin Baulig <martin@ximian.com>
10010 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
10012 * class.c (init_properties, init_events): Initialize the new
10015 * reflection.c (typebuilder_setup_properties): Likewise.
10016 (typebuilder_setup_events): Likewise.
10018 * reflection.h (MonoEventInfo): Replaced `parent with
10019 `declaring_type' and `reflected_type'.
10021 * icall.c (ves_icall_get_property_info): Distinguish between
10022 declaring and reflected type.
10023 (ves_icall_get_event_info): Likewise.
10025 2004-03-09 Martin Baulig <martin@ximian.com>
10027 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
10028 (ves_icall_Type_GetField): Correctly set field->klass.
10030 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
10032 * loader.h: Fix warning.
10034 2004-03-08 Miguel de Icaza <miguel@ximian.com>
10036 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
10037 library routine if present. Notice that it will still continue
10038 executing even if its missing, for those working on the Gtk#
10039 edition of Windows.Forms.
10041 * assembly.c (do_mono_assembly_open): If loading the
10042 System.Windows.Forms call mono_loader_wini_init.
10044 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
10046 * class.h: Added MonoRemoteClass struct.
10047 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
10048 function for MonoStrings.
10049 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
10050 Added internal call for getting the proxy type.
10051 * marshal.c: Get the type of transparent proxies from its remote_class.
10052 Added methods that generate the IL for type checks and casts:
10053 mono_marshal_get_isinst, mono_marshal_get_castclass,
10054 mono_marshal_get_proxy_cancast.
10055 * marshal.h: Declaration of the previous new methods.
10056 * object.c: Added new moethods for creating and updating MonoRemoteClass
10057 instances: mono_remote_class, mono_upgrade_remote_class,
10058 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
10059 * verify.c: FIx transparent_proxy_fields layout.
10060 * appdomain.c: Bump corlib version.
10062 2004-03-04 Jackson Harper <jackson@ximian.com>
10064 * icall.c: Add icall to access char conversion tables.
10065 * char-conversions.h: Character conversion tables.
10066 * Makefile.am: Add char-conversions.h private header file.
10068 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
10070 * appdomain.c (unload_thread_main): Increase unloading timeout to
10071 10 sec as a temporary workaround for Nant problems.
10073 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
10075 * gc.c: Add checks for GC_enable and GC_disable.
10077 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
10078 (jaak@zd.com.pl). Fix memory corruption in String.Replace
10081 2004-02-27 Martin Baulig <martin@ximian.com>
10083 * reflection.c (mono_reflection_bind_generic_parameters): Take a
10084 `MonoReflectionType *' instead of a `MonoType *'.
10086 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
10088 * gc.c (run_finalize): Avoid finalizing the object representing the
10090 (finalizer_thread): Fix warning.
10092 2004-02-25 Martin Baulig <martin@ximian.com>
10094 * class.c (_mono_class_get_instantiation_name): Added `int offset'
10095 argument for nested types.
10096 (mono_class_create_generic): Added support for nested generictypes.
10098 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
10101 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
10103 * reflection.c (method_encode_signature): Increase the minimum
10104 value of `size' from 10 to 11.
10105 (mono_reflection_bind_generic_parameters): Take `int type_argc'
10106 and `MonoType **types' arguments instead of the `MonoArray
10107 *types'; added `MonoType *nested_in'. Recursively instantiate
10110 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
10112 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
10113 stack_overflow_ex members which are used by exception handling.
10115 * appdomain.c (mono_runtime_init): Initialize the new members.
10117 * gc.c (mono_gc_enable): New helper function.
10118 * gc.c (mono_gc_disable): New helper function.
10120 2004-02-23 Martin Baulig <martin@ximian.com>
10122 * icall.c: I must have been really stupid - make it actually work
10125 2004-02-23 Martin Baulig <martin@ximian.com>
10127 * loader.c (method_from_memberref): Only inflate the method if
10128 it's in another klass.
10130 2004-02-23 Martin Baulig <martin@ximian.com>
10132 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
10133 (mono_class_init): If we're a generic instance and an interface,
10134 compute `class->interface_id'; also create `class->interfaces'
10135 here and inflate them.
10137 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
10139 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
10141 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
10143 2004-02-15 Miguel de Icaza <miguel@ximian.com>
10145 * reflection.c (method_encode_code): Improved the error message
10146 generated by the exception.
10148 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10150 * icall.c: Martin did not do what he said in the ChangeLog for
10151 2004-02-18, but put back the changes for properties and events.
10152 Commenting those changes out again and adding comment to bug #54518.
10154 * process.c: removed warning.
10156 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
10158 * marshal.c (emit_struct_conv): Print an error message instead of
10159 asserting when a type does not have the StructLayout attribute.
10161 2004-02-20 Martin Baulig <martin@ximian.com>
10163 * reflection.c (mono_type_get_object): Also use the cache for
10165 (mono_reflection_bind_generic_parameters): Always compute
10168 2004-02-20 Martin Baulig <martin@ximian.com>
10170 * class.h (MonoGenericMethod): Removed `klass'.
10172 * class.c (mono_class_inflate_generic_method): Added `MonoClass
10175 2004-02-20 Martin Baulig <martin@ximian.com>
10177 * reflection.c (method_encode_methodspec): Actually use the
10178 uninflated signature for the memberref.
10180 2004-02-20 Martin Baulig <martin@ximian.com>
10182 * class.h (MonoGenericMethod): Removed `declaring'.
10184 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
10185 is NULL, compute it here.
10187 2004-02-20 Martin Baulig <martin@ximian.com>
10189 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
10191 * metadata.c (mono_metadata_generic_inst_hash): New method.
10192 (mono_metadata_generic_inst_equal): New method.
10194 * reflection.c (mono_reflection_bind_generic_parameters): Use the
10195 `klass->image->generic_inst_cache' cache to avoid creating
10196 duplicate MonoGenericInst's.
10198 * class.c (mono_class_inflate_generic_type): Use the cache.
10200 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
10202 * object.c: fixed gc descriptor calculation for embedded valuetypes.
10204 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10206 * icall.c: added Socket.WSAIoctl icall.
10208 * socket-io.[ch]: implemented
10209 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
10211 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
10213 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
10215 2004-02-18 Urs C Muff <umuff@quark.com>
10217 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
10218 this work on PPC and other big-endian architectures.
10220 * debug-mono-symfile.h: Prepended the names of all the `guint32'
10221 fields with an underscore to make sure they're only accessed by
10222 the read32() macro.
10224 2004-02-18 Martin Baulig <martin@ximian.com>
10226 * icall.c: Put the klass->refclass changes back for methods and
10227 fields, but not for properties and events. We're currently not
10228 distinguishing between DeclaringType and ReflectedType for
10229 properties and events, that's what caused the regressions.
10231 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10234 (mono_async_result_new): the handle can be NULL.
10236 * threadpool.c: Use an event instead of a semaphore, don't initialize
10237 it until needed. This saves quite a few semaphores from being created
10238 when using the threadpool.
10240 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
10242 * object.c (mono_string_is_interned_lookup): Fix interning of long
10243 strings. Fixes #54473.
10245 * domain.c (ldstr_equal): Optimize if the two strings are equal.
10247 * icall.c: Revert the klass->refclass changes since they introduce
10248 regressions (bug #54518).
10250 2004-02-18 Martin Baulig <martin@ximian.com>
10252 * class.c (mono_class_init): If we're a generic instance and don't
10253 come from a TypeBuilder, inflate our members here.
10254 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
10255 (mono_class_create_generic): New public method.
10256 (mono_class_initialize_generic): Removed.
10257 (get_instantiation_name): Renamed to
10258 _mono_class_get_instantiation_name() and made it public.
10260 2004-02-18 Martin Baulig <martin@ximian.com>
10262 * class.c (mono_class_inflate_generic_type): Clear the new
10263 instance's `nginst->klass' when inflating a generic instance.
10264 (mono_class_is_subclass_of): Added (basic) support for generic
10267 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
10269 * appdomain.h, domain.c: use a MonoCodeManager instead of a
10270 MonoMempool to hold compiled native code.
10272 2004-02-17 Martin Baulig <martin@ximian.com>
10274 * class.h (MonoDynamicGenericInst): Added `count_properties' and
10277 * reflection.c (mono_reflection_generic_inst_initialize): Added
10278 `MonoArray *properties' argument.
10280 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
10282 2004-02-17 Martin Baulig <martin@ximian.com>
10284 * icall.c (ves_icall_Type_GetFields): Renamed to
10285 ves_icall_Type_GetFields_internal() and added a
10286 `MonoReflectionType *rtype' argument; pass it to
10287 mono_field_get_object() to set the field's "reflected" type.
10288 (ves_icall_Type_GetConstructors): Likewise.
10289 (ves_icall_Type_GetEvents): Likewise.
10290 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
10291 argument; pass it to mono_method_get_object() to set the method's
10294 2004-02-17 Martin Baulig <martin@ximian.com>
10296 * class.h (MonoDynamicGenericInst): New type.
10297 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
10299 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
10300 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
10301 (ves_icall_MonoGenericInst_GetFields): New interncall.
10303 * class.c (mono_class_from_generic): Don't call
10304 mono_class_initialize_generic() if this is a dynamic instance;
10305 ie. it's being created from a TypeBuilder.
10306 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
10307 `class->byval_arg.type'.
10309 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
10310 to `inflate_method' and made static.
10311 (mono_reflection_inflate_field): Removed.
10312 (mono_reflection_generic_inst_initialize): New public method.
10314 * reflection.h (MonoReflectionGenericInst): Removed `methods',
10315 `ctors' and `fields'; added `initialized'.
10317 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
10319 * debug-helpers.c (mono_method_full_name): Fix output for empty
10322 2004-02-12 Martin Baulig <martin@ximian.com>
10324 * class.h (MonoClassField): Added `MonoType *generic_type'.
10326 * reflection.c (mono_image_get_fieldref_token): Added support for
10327 instantiated generic types.
10328 (field_encode_inflated_field): Removed.
10329 (mono_image_get_inflated_field_token): Removed.
10330 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
10332 * reflection.h (MonoReflectionInflatedField): Removed.
10334 2004-02-12 Martin Baulig <martin@ximian.com>
10336 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
10337 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
10339 * reflection.c (mono_image_get_methodspec_token): Take a
10340 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
10341 (mono_image_create_token): Check whether we have a
10342 `method->signature->gen_method' and call
10343 mono_image_get_methodspec_token() if appropriate.
10344 (inflated_method_get_object): Removed.
10345 (mono_reflection_bind_generic_method_parameters): Return a
10346 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
10347 (mono_reflection_inflate_method_or_ctor): Likewise.
10349 * reflection.h (MonoReflectionInflatedMethod): Removed.
10351 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
10353 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
10354 for custom valuetype marshalling.
10356 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
10358 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10360 * icall.c: fixed WSAGetLastError_internal name.
10362 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
10364 * threads.c (mono_thread_attach): Allow this to be called multiple
10365 times for a thread.
10367 * threads.c (build_wait_tids): Do not wait for ourselves.
10369 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
10370 appdomain list is empty.
10372 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
10373 memory returned by mono_string_builder_to_utf16, since it points into
10374 managed memory. Thanks to Bernie Solomon for noticing this.
10376 * icall.c: Add AppDomainSetup icalls.
10378 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
10380 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
10383 * reflection.c (reflection_methodbuilder_to_mono_method): Save
10384 custom attributes to the method_aux struct. Also fix array indexes etc.
10386 * loader.c (mono_method_get_param_names): Make dynamic case work again.
10388 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
10390 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
10391 (both static and runtime) and reduce startup time.
10393 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
10395 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
10396 AsAny marshalling conversion instead of crashing.
10398 * marshal.c: Fix warnings.
10400 2004-02-09 Martin Baulig <martin@ximian.com>
10402 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
10404 * reflection.h (MonoReflectionInflatedMethod): Removed the
10405 `declaring' field, it's now in the unmanaged MonoGenericMethod.
10407 * reflection.c (method_encode_methodspec): Removed the `method'
10408 argument; we get it from `gmethod->declaring'.
10409 (inflated_method_get_object): Removed the `declaring' argument.
10411 2004-02-09 Martin Baulig <martin@ximian.com>
10413 * class.h (MonoGenericMethod): New type.
10414 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
10417 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
10418 a `MonoGenericMethod *gen_method' one.
10420 * class.c (mono_class_inflate_generic_type): Take an additional
10421 `MonoGenericMethod * argument. This is only non-NULL if we're
10422 inflating types for a generic method.
10423 (mono_class_inflate_generic_signature): Renamed to
10424 inflate_generic_signature() and made static; take a
10425 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
10426 (inflate_generic_header): Take a `MonoGenericMethod *' argument
10427 instead of a `MonoGenericInst *' one.
10428 (mono_class_inflate_generic_method): Likewise.
10430 * reflection.c (encode_generic_method_sig): Take a
10431 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
10432 (method_encode_methodspec): Likewise.
10433 (inflated_method_get_object): Likewise.
10435 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
10436 field with a `MonoGenericMethod *gmethod' one.
10438 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
10440 * class.h (mono_class_has_parent): add parens to expansion
10443 2004-02-08 Martin Baulig <martin@ximian.com>
10445 * image.h (MonoImage): Removed `generics_cache'.
10447 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
10448 instead of a `MonoType *' argument; removed the `inflate_methods'
10449 argument. Don't inflate methods here.
10451 * loader.c (find_method): If it's a generic instance, call
10452 mono_class_init() on the `sclass->generic_inst->generic_type'.
10454 * metadata.c (mono_type_size): Make this work on uninitialized
10455 generic instances; call it on the `ginst->generic_type's class.
10457 * reflection.c (mono_reflection_bind_generic_parameters): Call
10458 mono_class_from_generic() to create the `ginst->klass'.
10460 2004-02-08 Martin Baulig <martin@ximian.com>
10462 * class.h (MonoClass): Changed type of `generic_inst' from
10463 `MonoType *' to `MonoGenericInst *'.
10465 2004-02-08 Martin Baulig <martin@ximian.com>
10467 * icall.c (ves_icall_Type_BindGenericParameters): Just call
10468 mono_type_get_object(), this is now creating a `MonoGenericInst'
10469 for MONO_TYPE_GENERICINST.
10470 (ves_icall_MonoGenericInst_GetParentType): Likewise.
10471 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
10473 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
10474 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
10475 (inflated_method_get_object): Added `MonoClass *refclass' argument.
10476 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
10477 and reflected type.
10479 * reflection.h (MonoReflectionInflatedMethod): Removed
10480 `declaring_type' and `reflected_type'.
10482 2004-02-08 Martin Baulig <martin@ximian.com>
10484 * class.h (MonoGenericInst): Added `MonoType *parent' and
10485 `MonoType **ifaces'.
10487 * reflection.h (MonoReflectionGenericInst): Removed `klass',
10488 `parent' and `interfaces'.
10490 * reflection.c (mono_reflection_bind_generic_parameters): Take a
10491 `MonoType *' argument and return a `MonoType *'.
10494 (ves_icall_MonoGenericInst_GetParentType): New interncall.
10495 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
10497 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
10499 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
10500 valuetype marshalling.
10502 2004-02-06 Martin Baulig <martin@ximian.com>
10505 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
10506 (my_mono_class_from_generic_parameter): Likewise.
10508 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
10510 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
10511 contents of the symbol files lazily.
10513 * object.h (MonoThread): Add 'name' and 'name_len' fields.
10515 * threads.h threads.c icall.c: New icalls for getting and setting the
10518 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
10520 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
10521 Raise an exception when the domain is not found.
10523 2004-02-03 Martin Baulig <martin@ximian.com>
10525 * reflection.c (mono_image_get_methodspec_token): Use the
10526 uninflated signature; fixes gen-33.
10528 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
10530 * gc.c threads.c: Make the finalizer thread a normal managed thread so
10531 the finalizer code can use thread functionality.
10533 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
10534 the finalizer thread.
10536 * threads.c: Make some functions more robust.
10538 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
10540 * metadata.h: Add new marshalling conventions.
10542 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
10543 stringbuilder marshalling. Fixes #53700.
10545 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
10547 * reflection.c (mono_image_get_type_info): Save declarative security
10550 * reflection.c (mono_image_get_field_info): Handle uninitialized
10551 unmanaged fields as well.
10553 * appdomain.c: Bump corlib version.
10555 2004-02-01 Martin Baulig <martin@ximian.com>
10557 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
10558 method type arguments.
10560 2004-01-30 Duncan Mak <duncan@ximian.com>
10562 * marshal.h: Add prototype for
10563 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
10565 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
10568 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
10570 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
10571 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
10573 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
10575 * marshal.c (mono_marshal_get_native_wrapper): Add support for
10576 custom marshalling of valuetypes.
10578 * marshal.c: Fix some warnings.
10580 2004-01-29 Martin Baulig <martin@ximian.com>
10582 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
10583 for generic method parameters.
10585 * reflection.c (method_encode_methodspec): Write the uninflated
10586 signature into the methodspec table.
10587 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
10588 is always the uninflated method.
10589 (reflection_methodbuilder_to_mono_method): Copy the generic
10590 parameters from the MethodBuilder into `header->gen_params'.
10592 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
10594 * class.c (mono_class_from_generic_parameter): Fix warning.
10596 2004-01-27 Martin Baulig <martin@ximian.com>
10598 * class.c (mono_class_from_generic_parameter): Don't create
10599 `klass->methods' here.
10601 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
10603 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
10604 extension since it does not work with libraries named lib<FOO>.dll.so.
10606 2004-01-25 Martin Baulig <martin@ximian.com>
10608 * class.c (mono_class_inflate_generic_type): Added support for
10609 MONO_TYPE_GENERICINST.
10611 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
10612 inflate methods on open constructed types.
10614 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10616 * object.c: fire ProcessExit event in the root AppDomain after running
10617 Main. Fixes bug #53299.
10619 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
10621 * socket-io.c: include the new socket-wrappers.h header.
10622 Use the wrappers instead of the unix socket functions to make the code
10625 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
10627 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
10629 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10632 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
10634 * reflection.c (mono_image_create_pefile): Handle the case when the
10635 entry point is not a MethodBuilder.
10637 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10638 field to ReflectionMethod since it is not allways a builder.
10640 * reflection.c (type_get_fully_qualified_name): New helper function to
10641 return the fully qualified name of a type.
10643 * reflection.c (encode_marshal_blob): Always emit the fully qualified
10644 type name for custom marshallers.
10646 * reflection.c (mono_marshal_spec_from_builder): Ditto.
10648 * class.c (mono_class_setup_vtable): If a parent class already
10649 implements an interface, use the implementing methods from that class.
10652 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10654 * threadpool.c: just return instead of ExitThread to allow for thread
10657 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
10659 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
10660 when closing resource modules.
10662 * reflection.c (mono_image_create_pefile): Handle the case when the
10663 entry point is not a MethodBuilder.
10665 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10666 field to ReflectionMethod since it is not allways a builder.
10668 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
10670 * marshal.c (mono_marshal_get_managed_wrapper):
10671 mono_marshal_alloc takes native int so CONV_I
10672 the arg for 64bits.
10674 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
10676 * reflection.c (fixup_cattrs): New function to fixup the methoddef
10677 tokens in the cattr table. Fixes #53108.
10679 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10681 * loader.c: don't trim ".dll" before looking up in the config file.
10682 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
10684 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
10686 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
10687 Return the module which contains the resource as well.
10688 (ves_icall_System_Reflection_Module_Close): New icall.
10690 * appdomain.c: Bump corlib version number.
10692 * image.c (mono_image_addref): New public function.
10694 * assembly.c: Call mono_image_addref.
10696 * reflection.c (mono_module_get_object): Increase reference count of
10699 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10702 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
10703 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
10704 proper exceptions on DllImport problems.
10706 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
10708 * class.c, metadata.c: eliminate CSIZE macro.
10710 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
10712 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
10713 * object.h: Added async_callback field in MonoAsyncResult.
10714 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
10715 * verify.c: Added async_callback in MonoAsyncResult layout.
10717 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
10719 * reflection.c (mono_reflection_get_custom_attrs): Add support
10722 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
10724 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
10726 (mono_marshal_method_from_wrapper): Add null pointer check.
10728 2004-01-16 Martin Baulig <martin@ximian.com>
10730 * debug-mono-symfile.h: Set version number to 36 and reflect
10731 latest symbol writer changes.
10733 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
10735 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
10736 multi-dimensional arrays.
10737 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
10738 (mono_class_from_mono_type): Use bounded_array_class_get.
10740 * class.c (mono_bounded_array_class_get): New function which takes
10741 a 'bounded' bool argument to distinguish vectors from one dimensional
10744 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
10745 bounded_array_class_get if the array has bounds.
10747 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
10748 Search modules loaded using AssemblyBuilder:AddModule as well.
10750 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10752 * appdomain.c: increased corlib version.
10753 * filewatcher.c: removed g_print.
10755 (get_property_info): only allocate what is actually requested.
10756 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
10758 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10760 * Makefile.am: added filewatcher.[ch]
10761 * filewatcher.[ch]: FileSystemWatcher runtime support.
10762 * icall.c: added new FSW icalls.
10764 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10766 * string-icalls.c: fix stringbuilder regression as suggested by
10767 Iain McCoy <iain@mccoy.id.au>.
10769 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
10771 * process.c (process_read_stringtable_block): Recognize '007f' as
10772 a language neutral stringtable block.
10774 2004-01-12 Patrik Torstensson
10776 * object.h (MonoStringBuilder) : Changed layout to support our
10777 new stringbuilder class.
10778 * marshal.c: Change marshalling to support the new layout of
10780 * appdomain.c: increased version number because new layout of
10783 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
10785 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
10786 assembly name as an string instead of an AssemblyName, since it is
10787 easier to extract info from it.
10789 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
10790 the culture subdirectories too. Fixes #52231.
10792 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10794 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
10795 It takes 2 new parameters with an optional name for the method to look
10796 for and case ignoring info.
10798 * threadpool.c: removed unused variable.
10800 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10802 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
10803 It takes 2 new parameters with an optional name for the property to look
10804 for and case ignoring info.
10807 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
10809 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
10812 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10815 * assembly.c: escape the uri before passing it to g_filename_from_uri.
10818 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
10820 * reflection.c: Add support for more than one unmanaged resource.
10822 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
10823 in field->def_value, as done in all other cases.
10825 * reflection.c (mono_reflection_get_custom_attrs): Add support for
10828 * reflection.c (mono_reflection_create_runtime_class): Remove
10829 errorneous assignment to klass->element_class, since it is already
10830 done in mono_reflection_setup_internal_class.
10832 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10834 * gc.c: added missing LeaveCriticalSection.
10835 * icall.c: indented a couple of lines.
10836 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
10837 if we call EndInvoke inside a callback. Fixes bug #52601.
10839 2004-01-07 Martin Baulig <martin@ximian.com>
10841 * mono-debug-debugger.h
10842 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
10844 2004-01-06 Miguel de Icaza <miguel@ximian.com>
10846 * appdomain.c: Use messages in NotImplementedException.
10848 * exception.c (mono_get_exception_not_implemented): Now this takes
10849 a message argument.
10851 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
10852 exception instead of g_asserting an aborting when something is not
10855 Add some inline docs.
10857 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
10859 * reflection.h: Update after changes to object layout.
10861 * reflection.c: Implement saving of unmanaged aka win32 resources.
10863 * appdomain.c: Bump version number.
10865 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
10866 Handle missing domains gracefully.
10868 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
10870 * file-io.c : On Windows, there are much more invalid_path_chars.
10872 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
10874 * class.h, object.c: prepare for GetType () speedup.
10876 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
10878 * profiler.c: workaround for --profile null reference exception on
10879 cygwin. Patch by Patrik Torstensson.
10881 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
10883 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
10884 make work for unaligned access.
10886 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
10888 * class.c: small cleanup (class->fields [i] -> field).
10889 * image.c: check address of metadata is valid.
10891 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
10893 * assembly.h assembly.c (mono_assembly_loaded): New public function to
10894 search the list of loaded assemblies.
10896 * reflection.c (mono_reflection_type_from_name): Use
10897 mono_assembly_loaded instead of mono_image_loaded.
10899 * reflection.c: Fix warnings.
10901 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
10903 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
10904 is dynamic. This is needed since an assembly can contain both dynamic and
10905 non-dynamic images.
10907 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
10910 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
10912 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
10913 to store modules loaded using AddModule.
10915 * reflection.c (mono_image_fill_file_table): Generalize this so it works
10918 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
10920 * reflection.c (mono_image_fill_export_table_from_module): New function to
10921 fill out the EXPORTEDTYPES table from a module.
10923 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
10924 into a separate function. Also handle loaded non-dynamic modules.
10926 * reflection.c (mono_image_basic_init): Fix memory allocation.
10928 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10930 * assembly.c (mono_assembly_load_references): Make this public.
10932 2003-12-19 Martin Baulig <martin@ximian.com>
10934 * class.c (mono_class_initialize_generic): Made this static, take
10935 a `MonoGenericInst *' instead of a `MonoClass *'.
10936 (mono_class_from_generic): Call mono_class_initialize_generic()
10937 unless we're already initialized or being called from
10938 do_mono_metadata_parse_generic_inst().
10940 * class.h (MonoGenericInst): Added `initialized' and
10941 `init_pending' flags.
10943 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
10944 `mono_class_init (gklass)' or mono_class_initialize_generic()
10945 here; set `generic_inst->init_pending' while parsing the
10948 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
10950 * locales.c: include string.h for memxxx prototypes
10952 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
10954 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
10955 constructor when accessing literal fields.
10957 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
10959 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10961 * reflection.c (assembly_add_resource_manifest): New function to fill
10962 the MANIFESTRESOURCE table.
10964 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
10966 * reflection.h: Update to changes in class layout.
10968 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
10969 Reenable call to mono_runtime_is_shutting_down ().
10971 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
10972 determine if the runtime is shutting down.
10974 2003-12-16 Jackson Harper <jackson@ximian.com>
10976 * icall.c: comment out call to mono_runtime_is_shutting_down to
10979 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
10981 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
10982 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
10984 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
10986 * reflection.c: move definition of swap_with_size
10987 to before its first call
10989 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
10991 * appdomain.c (mono_runtime_is_shutting_down): New public function.
10993 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
10996 * object.c: Fix warnings.
10998 * icall.c (ves_icall_Type_Get...): Only consider inherited static
10999 members if FlattenHierarchy is set.
11001 * reflection.c (mono_image_add_decl_security): New function to emit
11002 declarative security.
11004 * reflection.h reflection.c: Add support for declarative security.
11006 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11008 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
11010 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11012 * appdomain.c verify.c: Moved corlib version checking into its own
11013 function in appdomain.c since it needs to create vtables etc.
11015 2003-12-13 Patrik Torstensson <p@rxc.se>
11017 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
11018 instead of unwrapped server.
11020 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
11022 * verify.c (check_corlib): Fix field index.
11024 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
11026 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
11029 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
11031 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
11032 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
11033 cope with sizeof(size_t) != sizeof(guint32).
11035 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11037 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
11038 in case of failure.
11040 2003-12-10 Mark Crichton <crichton@gimp.org>
11042 * icall.c: removed the GetNonZeroBytes. We now handle this case
11045 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
11047 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
11049 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
11052 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
11054 * verify.c (check_corlib): Handle the case when the version field is
11055 initialized by a static constructor.
11057 2003-12-08 Patrik Torstensson <p@rxc.se>
11059 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
11061 2003-12-08 Martin Baulig <martin@ximian.com>
11063 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
11064 a MonoReflectionGenericParameter, also take the parameter index
11065 and name as arguments.
11066 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11067 (ves_icall_MonoGenericParam_initialize): New interncall.
11068 (ves_icall_Type_make_byref_type): New interncall.
11070 * reflection.h (MonoReflectionGenericParam): Derive from
11071 MonoReflectionType, not just from MonoObject. Added `refobj' and
11074 * reflection.c (mono_reflection_define_generic_parameter): Create
11075 and return a new MonoReflectionGenericParam; don't initialize the
11077 (mono_reflection_initialize_generic_parameter): New public method;
11078 initializes the constraints and creates the `param->pklass'.
11080 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
11082 * reflection.h reflection.c: Use the new fields 'num_types',
11083 'num_fields' and 'num_methods' to track the number of types etc.
11085 * verify.c (check_corlib): Check corlib version number.
11087 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
11089 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
11090 function works on all methods.
11092 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
11094 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
11095 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
11096 the custom_type_info flag of the transparent proxy.
11097 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
11098 objects that supports IRemotingTypeInfo.
11099 * object.h: Added custom_type_info field in transparent proxy.
11101 2003-12-06 Martin Baulig <martin@ximian.com>
11103 * class.c (mono_class_create_from_generic): Removed.
11104 (mono_class_from_generic): Check `ginst->klass' before doing
11105 anything else. This is important to fully support "recursive"
11108 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
11109 empty `generic_inst->klass' before doing anything else.
11111 2003-12-06 Dick Porter <dick@ximian.com>
11116 * locales.c: Use C structs to access class fields. Don't do a
11117 conversion between MonoString and UChar because both are
11118 platform-endian UTF-16. Compare now takes startindex and count
11119 parameters. Add a char overload for IndexOf. Speed up the
11120 invariant string IndexOf.
11122 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
11124 * Makefile.am (monosn_LDADD): Fix parallel build.
11126 2003-12-04 Martin Baulig <martin@ximian.com>
11129 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11130 (ves_icall_Type_make_array_type): New interncall.
11132 2003-12-04 Martin Baulig <martin@ximian.com>
11134 * locales.c: also change it in the !HAVE_ICU case.
11136 2003-12-04 Dick Porter <dick@ximian.com>
11139 * locales.c: construct_compareinfo is now in CompareInfo, not
11142 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
11144 * image.c (mono_image_load_file_for_image): Cache loaded images in the
11145 image->files array.
11147 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
11150 * assembly.c (mono_assembly_load_references): Only load references
11153 * class.c (mono_class_from_name): Avoid linear search of the
11154 EXPORTEDTYPE table.
11156 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
11158 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
11160 * image.h (MonoImage): Add 'field_cache' field.
11162 * loader.c (mono_field_from_token): Cache field lookups.
11164 * reflection.c (mono_module_get_object): Fix name property.
11166 * icall.c (ves_icall_get_enum_info): Update after changes to
11167 mono_metadata_get_constant_index ().
11169 * icall.c: Get rid of get_type_info icall, use a separate icall for
11170 each type property to avoid needless memory allocations. Fixes #51514.
11172 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
11173 to avoid needless binary searches.
11175 * class.c (class_compute_field_layout): Move the initialization of
11176 field->def_value to mono_class_vtable ().
11178 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
11181 * object.c (mono_object_allocate): Make it inline.
11183 * object.c (mono_object_allocate_spec): Make it inline.
11185 2003-12-02 Dick Porter <dick@ximian.com>
11187 * locales.c (create_NumberFormat): NumberFormatInfo construction.
11188 Patch by Mohammad DAMT (mdamt@cdl2000.com).
11190 2003-12-01 Dick Porter <dick@ximian.com>
11192 * threads.c: Fix signature and call in CreateMutex and
11195 2003-12-01 Dick Porter <dick@ximian.com>
11198 * locales.c: Implement string compares and searching
11200 * object.h: Add extra Thread field
11202 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
11204 * reflection.c (fixup_method): Add support for MonoCMethod.
11206 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
11208 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
11210 * reflection.c (assembly_name_to_aname): Allow extra characters in
11211 assembly names. Fixes #51468.
11213 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
11215 * exception.c (mono_exception_from_name_domain): New helper function.
11217 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
11218 exception object in the correct domain.
11220 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
11221 formatting + make a copy a the input data.
11223 * loader.c (mono_get_method_from_token): Methods which contain
11224 native code do not have entries in the ImplMap.
11226 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
11227 Thanks to Gonzalo for spotting this.
11229 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
11230 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
11232 * assembly.h (mono_assembly_load_from): Split the second part of
11233 assembly loading into a new public function.
11235 * exception.h (mono_get_exception_bad_image_format): New function.
11237 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
11239 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
11240 Enumerate all modules inside a dynamic assembly. Fixes #51293.
11242 * icall.c: Add new icall for creating dynamic methods.
11244 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
11246 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
11248 * reflection.c (mono_reflection_create_dynamic_method): New icall to
11249 create a dynamic method.
11251 * reflection.c (resolve_object): New helper function.
11253 * reflection.c: Generalize ReflectionMethodBuilder and the functions
11254 which manipulate it so they can also work on dynamic methods.
11256 * reflection.c (reflection_method_builder_to_mono_method): Avoid
11257 creating the MonoReflectionMethodAux structure if it is not needed.
11259 * reflection.h verify.c: Update after changes to object layout.
11261 * reflection.c (method_builder_encode_signature): Fix compilation on
11264 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
11266 * appdomain.h: Added support for context static fields. Added static_data
11267 field to MonoAppContext and renamed thread_static_fields to a more
11268 generic special_static_fields in MonoAppDomain, since it can now contain
11269 context static fields.
11270 * domain.c: Updated hashtable name.
11271 * object.c: Replaced field_is_thread_static() for a more generic
11272 field_is_special_static() which also checks for context static attribute.
11273 In mono_class_vtable(), added support for static context fields.
11274 * threads.c: Changed methods that manage thread static fields to more
11275 generic methods so they can be reused both for thread and context static
11277 * threads.h: Declared some new methods.
11279 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
11281 * reflection.h: Update after changes to the managed types.
11283 * reflection.c (encode_custom_modifiers): New helper function.
11285 * reflection.c (method_encode_signature): Emit custom modifiers.
11287 * reflection.c (field_encode_signature): Emit custom modifiers.
11289 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
11291 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
11293 * icall.c (ves_icall_System_ValueType_Equals): New optimized
11296 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
11299 * object.c (mono_field_get_value_object): New function.
11301 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
11304 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
11306 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
11307 return a preallocated out-of-memory exception instance.
11309 * object.c (out_of_memory): Use the new function.
11311 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
11312 flag is before the custom modifiers. Fixes #49802.
11314 2003-11-16 Martin Baulig <martin@ximian.com>
11316 * class.c (mono_class_is_open_constructed_type): Implemented the
11317 MONO_TYPE_GENERICINST case.
11319 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
11321 * assembly.c (mono_assembly_fill_assembly_name): New function to
11322 fill out the MonoAssemblyName structure.
11323 (mono_assembly_open): Use the new function.
11325 * icall.c (fill_reflection_assembly_name): New helper function.
11327 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
11330 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
11332 2003-11-15 Martin Baulig <martin@ximian.com>
11334 * class.c (mono_class_is_open_constructed_type): New public
11335 function; checks whether a type is an open constructed type,
11336 ie. whether it still contains type parameters.
11337 (mono_class_inflate_generic_type): If we're a type parameter and
11338 the inflated type is also a MONO_TYPE_(M)VAR, return the original
11341 * class.h (MonoGenericInst): Added `guint32 is_open'.
11343 * loader.c (method_from_methodspec): Check whether we're an open
11344 or closed constructed type and set `ginst->is_open'.
11346 * reflection.c (mono_reflection_bind_generic_parameters): Check
11347 whether we're an open or closed constructed type and set
11349 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
11350 from open constructed types.
11352 2003-11-15 Martin Baulig <martin@ximian.com>
11354 * reflection.c (mono_reflection_bind_generic_parameters): If we're
11355 a generic instance (instead of a generic type declaration) with
11356 unbound generic parameters, bind them to our actual types.
11358 2003-11-14 Martin Baulig <martin@ximian.com>
11360 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
11362 * reflection.c (mono_reflection_bind_generic_parameters): If we're
11363 an interface type, populate `res->interfaces' with instantiated
11364 versions of all the interfaces we inherit.
11366 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
11368 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
11369 when MONO_PATH is set but doesn't contain the install dir.
11371 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11374 (ves_icall_Type_GetInterfaces): don't return an interface twice when
11375 it's also implemented in base classes. Fixes bug #50927.
11377 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
11379 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
11380 if this method is called from a finalizer. Fixes #50913.
11382 2003-11-12 Miguel de Icaza <miguel@ximian.com>
11384 * threads.c: Implement VolatileRead/VolatileWrite
11386 * icall.c: Add new icalls for VolatileRead/VolatileWrite
11388 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
11390 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
11391 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
11394 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
11395 from Peter Ross (pro@missioncriticalit.com).
11397 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
11399 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
11401 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
11403 * assembly.c (mono_assembly_load_references): Disable check because it
11404 triggers on older corlibs which lots of people have.
11406 2003-11-12 Jackson Harper <jackson@ximian.com>
11408 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
11409 load corlib.dll if mscorlib.dll is not found.
11410 * assembly.h: Remove corlib name define.
11413 * image.c: Change corlib name to mscorlib.
11415 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
11417 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
11419 2003-11-11 Miguel de Icaza <miguel@ximian.com>
11421 * appdomain.h: Added loader_optimization here to sync with the C#
11422 code, and add disallow_binding_redirects field.
11424 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
11426 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
11428 * reflection.c (mono_image_build_metadata): Fix crash on modules
11431 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
11433 * icall.c (ves_icall_get_method_info): Return callingConvention as
11436 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
11437 namespaces from the EXPORTEDTYPE table as well.
11439 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
11440 from all modules inside the assembly.
11442 2003-11-11 Martin Baulig <martin@ximian.com>
11444 * reflection.c (mono_reflection_bind_generic_parameters): Make
11445 this work for interfaces.
11447 2003-11-11 Martin Baulig <martin@ximian.com>
11449 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
11451 2003-11-11 Martin Baulig <martin@ximian.com>
11453 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
11454 "MonoInflatedMethod" and "MonoInflatedCtor".
11456 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
11458 * reflection.c (resolution_scope_from_image): Use the assembly table
11459 from the manifest module, since other modules don't have it.
11461 * debug-helpers.c (mono_type_full_name): New helper function.
11463 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
11465 * image.c (mono_image_load_file_for_image): New public function which
11466 is a replacement for the load_file_for_image in class.c.
11468 * assembly.c (mono_assembly_load_module): A wrapper for the function
11469 above which does assembly association and reference loading too.
11471 * class.c (mono_class_from_name): Call mono_assembly_load_module.
11473 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11475 * appdomain.c: not all of the attributes for the full assembly name
11476 are required and the order doesn't matter. Fixes bug #50787.
11478 2003-11-10 Dick Porter <dick@ximian.com>
11480 * locales.c: Use platform-endian UTF16
11482 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
11484 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
11486 2003-11-10 Martin Baulig <martin@ximian.com>
11489 (mono_metadata_load_generic_params): Make this actually work.
11491 * reflection.c (mono_reflection_bind_generic_parameters): If our
11492 parent is a generic instance, pass all the `types' to it, no
11493 matter whether it has the same number of type parameters or not.
11495 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
11497 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
11499 * assembly.c (mono_assembly_load_references): Move the image<->assembly
11500 assignment code to this function so it gets called recursively for all
11503 * image.c (load_modules): Remove the assembly assignment since it is
11504 now done by mono_assembly_load_references.
11506 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
11507 Add 'module' argument.
11508 (mono_module_get_types): New helper function.
11509 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
11511 2003-11-08 Martin Baulig <martin@ximian.com>
11513 * class.c (mono_class_inflate_generic_method): Interface method
11514 don't have a header.
11516 * reflection.c (mono_image_get_methodspec_token): Take an
11517 additional `MonoGenericInst *' argument instead of reading it from
11518 the header; this is necessary to support interfaces.
11519 (mono_image_create_token): Pass the `MonoGenericInst *' from the
11520 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
11521 (inflated_method_get_object): Take an additional `MonoGenericInst *'
11524 * reflection.h (MonoReflectionInflatedMethod): Added
11525 `MonoGenericInst *ginst'.
11527 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
11529 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
11531 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
11533 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
11535 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
11538 (reflection_methodbuilder_from_method_builder):
11539 (reflection_methodbuilder_from_ctor_builder): New helper functions to
11540 initialize a ReflectionMethodBuilder structure.
11541 (mono_image_get_methodbuilder_token):
11542 (mono_image_get_ctorbuilder_token): New functions to emit memberref
11543 tokens which point to types in another module inside the same assembly.
11545 * reflection.c: Use the new helper functions.
11547 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
11549 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
11550 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
11552 * reflection.c (resolution_scope_from_image): Emit a moduleref if
11555 * reflection.c (mono_image_build_metadata): Emit metadata only for the
11556 current module. Emit the manifest only for the main module.
11558 * reflection.c (mono_image_create_token): Add assertion when a
11559 memberref needs to be created.
11561 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
11563 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
11564 larger buffer for the custom attribute blob. Fixes #50637.
11566 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11568 * threadpool.c: notify listener on async processing handles after
11569 invoking the async callback. Thanks to Zoltan.
11571 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
11573 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
11574 avoid code duplication.
11576 * reflection.h (MonoDynamicImage): New type which is currently unused,
11577 but will be used through the ref.emit code in place of
11578 MonoDynamicAssembly.
11580 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11583 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
11584 a MonoDynamicImage instead of just a MonoImage.
11586 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
11587 icalls to ModuleBuilder but keep their semantics, so they will work
11588 with moduleb->assemblyb. This will change later.
11590 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
11592 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11595 * reflection.c (mono_image_build_metadata): Avoid creation of a default
11596 main module, since it is now done by the managed code.
11598 2003-11-03 Martin Baulig <martin@ximian.com>
11600 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
11601 `ginst->klass' here.
11602 (method_encode_methodspec): Don't use the `ginst->generic_method's
11603 klass if it's a generic instance, use `ginst->klass' in this case.
11605 2003-11-03 Martin Baulig <martin@ximian.com>
11607 * reflection.c (mono_image_get_generic_method_param_info):
11608 Removed, use mono_image_get_generic_param_info() instead.
11609 (mono_image_get_type_info): Write the GenericParam table before
11610 the Method table. This is neccessary because in the GenericParam
11611 table, type parameters of the class (ie. '!0' etc.) must come
11612 before the ones from its generic methods (ie. '!!0' etc).
11614 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
11616 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
11618 2003-11-02 Martin Baulig <martin@ximian.com>
11620 * reflection.c (create_generic_typespec): Take a
11621 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
11622 the generic parameters from it.
11624 2003-11-02 Martin Baulig <martin@ximian.com>
11626 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
11627 instead of a `MonoClassField *' since we just need the type.
11628 (create_generic_typespec): New static function. Creates a
11629 TypeSpec token for a generic type declaration.
11630 (mono_image_get_generic_field_token): New static function.
11631 (mono_image_create_token): If we're a FieldBuilder in a generic
11632 type declaration, call mono_image_get_generic_field_token() to get
11635 2003-11-02 Martin Baulig <martin@ximian.com>
11638 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
11639 `MonoReflectionGenericInst *declaring_type' and
11640 `MonoReflectionGenericInst *reflected_type' fields.
11642 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
11643 `MonoReflectionGenericInst *declaring_type' and a
11644 `MonoReflectionGenericInst *reflected_type' argument instead of a
11645 single `MonoReflectionGenericInst *type' one. Set
11646 `res->declaring_type' and `res->reflected_type' from them.
11647 (mono_reflection_inflate_field): Likewise.
11649 2003-11-02 Martin Baulig <martin@ximian.com>
11651 * class.c (mono_class_setup_vtable): Don't store generic methods
11654 2003-11-02 Martin Baulig <martin@ximian.com>
11656 * reflection.h (MonoReflectionGenericInst): Added
11657 `MonoReflectionType *declaring_type'.
11659 * reflection.c (mono_reflection_bind_generic_parameters): Use
11660 `if (tb->parent)' instead of `klass->parent'.
11662 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
11664 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
11665 with an empty ASSEMBLY table.
11667 * reflection.c (mono_image_build_metadata): Avoid using the same loop
11668 variable in the inner and outer loops.
11670 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
11672 * metadata.h (mono_metadata_make_token): Put parentheses around macro
11675 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
11677 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
11678 icalls. Instead, do everything in managed code. This is needed since
11679 it is hard to restore the original domain etc. in unmanaged code in the
11680 presence of undeniable exceptions.
11682 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
11683 New icalls to push and pop appdomain refs.
11685 2003-10-31 Martin Baulig <martin@ximian.com>
11687 * class.c (inflate_generic_type): Renamed to
11688 mono_class_inflate_generic_type() and made it public.
11690 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
11693 * loader.c (mono_field_from_memberref): Also set the retklass for
11696 * fielder.c (mono_image_get_inflated_field_token): New static
11697 method; creates a metadata token for an inflated field.
11698 (mono_image_create_token, fixup_method): Added support for
11699 "MonoInflatedField".
11700 (fieldbuilder_to_mono_class_field): New static function.
11701 (mono_reflection_inflate_field): New public function.
11704 (MonoReflectionGenericInst): Added `MonoArray *fields'.
11705 (MonoReflectionInflatedField): New typedef.
11707 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
11709 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
11710 for Solaris and other platforms without s6_addr16
11712 2003-10-30 Martin Baulig <martin@ximian.com>
11714 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
11715 argument instead of two.
11716 (mono_class_inflate_generic_signature): Likewise.
11717 (inflate_generic_header): Likewise.
11718 (mono_class_inflate_generic_method): Likewise. In addition, if
11719 `ginst->klass' is set, it becomes the new `method->klass'.
11721 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
11724 * reflection.c (encode_generic_method_sig): Write a 0xa as the
11725 first byte. [FIXME]
11726 (method_encode_methodspec): If we have generic parameters, create
11727 a MethodSpec instead of a MethodRef.
11728 (fixup_method): Added support for "MonoInflatedMethod" and
11729 "MonoInflatedCtor".
11730 (mono_image_create_token): Added support for "MonoInflatedMethod"
11731 and "MonoInflatedCtor".
11732 (inflated_method_get_object): New static function; returns a
11733 managed "System.Reflection.MonoInflatedMethod" object.
11734 (mono_reflection_bind_generic_method_parameters): Return a
11735 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
11736 (mono_reflection_inflate_method_or_ctor): Likewise.
11737 (mono_image_get_generic_method_param_info): Initialize unused
11739 (mono_image_get_generic_param_info): Likewise.
11741 * reflection.h (MonoReflectionInflatedMethod): New public
11742 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
11743 "S.R.MonoInflatedCtor" classes.
11745 * loader.c (method_from_memberref): If we're a TypeSpec and it
11746 resolves to a generic instance, inflate the method.
11748 2003-10-28 Dick Porter <dick@ximian.com>
11750 * object.c (mono_runtime_run_main): Convert command-line arguments
11751 into utf8, falling back to the user's locale encoding to do so.
11753 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
11755 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
11758 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
11760 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
11761 up icalls at method definition time. Partially fixes #33569.
11763 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
11765 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
11766 marshalling of arrays. Fixes #50116.
11768 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
11770 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
11771 points to a vtable in the dying appdomain.
11773 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
11774 listeners into unmanaged code inside the lock.
11776 * object.c (mono_class_vtable): Turn off typed allocation in non-root
11777 domains and add some comments.
11779 2003-10-25 Martin Baulig <martin@ximian.com>
11781 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
11783 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
11785 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
11786 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
11787 currently parsing. Create the generic class and store it in
11788 `generic_inst->klass' before parsing the type arguments. This is
11789 required to support "recursive" definitions; see mcs/tests/gen-23.cs
11791 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
11792 to support recursive typespec entries.
11794 * class.c (mono_class_setup_parent): If our parent is a generic
11795 instance, we may get called before it has its name set.
11796 (mono_class_from_generic): Splitted into
11797 mono_class_create_from_generic() and mono_class_initialize_generic().
11799 2003-10-25 Martin Baulig <martin@ximian.com>
11801 * icall.c (ves_icall_Type_BindGenericParameters): Return a
11802 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
11803 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
11804 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
11806 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
11807 (create_typespec): Likewise.
11808 (mono_reflection_bind_generic_parameters): Return a
11809 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
11810 (mono_reflection_inflate_method_or_ctor): New public function.
11812 * reflection.h (MonoReflectionGenericInst): New typedef.
11814 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
11816 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
11817 inside the domain lock. Fixes #49993.
11819 * object.c (mono_class_vtable): When typed allocation is used,
11820 allocate vtables in the GC heap instead of in the mempool, since the
11821 vtables contain GC descriptors which are used by the collector even
11822 after the domain owning the mempool is unloaded.
11824 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
11826 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
11827 reflect what it does. Also invalidate mempools instead of freeing
11828 them if a define is set.
11830 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
11833 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
11834 hold the finalizable objects in this domain.
11836 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
11839 * appdomain.c (mono_domain_set): New function to set the current
11840 appdomain, but only if it is not being unloaded.
11842 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
11843 appdomain which is being unloaded.
11845 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
11846 unloading of the root appdomain.
11848 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
11849 icall to execute a method in another appdomain. Intended as a
11850 replacement for InternalSetDomain, which can confuse the code
11851 generation in the JIT.
11853 * appdomain.c (mono_domain_is_unloading): New function to determine
11854 whenever an appdomain is unloading.
11856 * appdomain.c (mono_domain_unload): New function to correctly unload
11859 * assembly.c (mono_assembly_load_references): Check that an assembly
11860 does not references itself.
11862 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
11863 domain manually, it asks the finalizer thread to do it, then waits for
11864 the result. Also added a timeout.
11866 * icall.c: Register the new icalls.
11868 * threads.h threads.c: Export the mono_gc_stop_world and
11869 mono_gc_start_world functions.
11871 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
11872 function to fill out the mempool with 0x2a.
11874 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
11876 * reflection.h (MonoReflectionMethodAux): New structure to store
11877 information which is rarely used, thus is not in the MonoMethod
11880 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
11881 store the aux info.
11883 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
11884 and marshalling info into the aux structure.
11886 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
11887 from the aux structure.
11889 * loader.c (mono_method_get_param_names): Retrieve the param names from
11892 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
11894 * exception.h exception.c: Add AppDomainUnloadedException && fix
11897 2003-10-21 Dick Porter <dick@ximian.com>
11900 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
11901 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
11903 2003-10-21 Martin Baulig <martin@ximian.com>
11905 * reflection.c (mono_reflection_bind_generic_parameters):
11906 `klass->parent' is NULL for interfaces.
11908 2003-10-21 Martin Baulig <martin@ximian.com>
11910 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11912 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
11914 * exception.c (mono_exception_from_name_msg): New helper function for
11915 creating exceptions and initializing their message field.
11917 * exception.c: Simplify functions using the new helper.
11919 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
11922 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
11923 mono_raise_exception, since otherwise gcc doesn't generate the function
11924 epilog for raise_exception, confusing the stack unwinding in the JIT.
11927 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
11928 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
11931 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11933 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
11936 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
11938 * icall.c: Removed GetUninitializedObject method because
11939 AllocateUninitializedClassInstance does the same.
11941 2003-10-18 Martin Baulig <martin@ximian.com>
11943 * class.c (inflate_generic_signature): Renamed to
11944 mono_class_inflate_generic_signature() and made it public.
11945 (my_mono_class_from_generic_parameter): New static function; if we
11946 don't already have the generic parameter's MonoClass, create a
11947 very simple one which is just used internally in the runtime and
11948 not passed back to managed code.
11950 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
11952 * metadata.h (MonoMethodSignature): Moved the
11953 `MonoGenericParam *gen_params' to the MonoMethodHeader.
11954 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
11956 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
11957 ves_icall_MonoMethod_GetGenericArguments(); this is now an
11958 interncall on the MonoMethod class, not on MethodInfo.
11959 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
11960 calling mono_reflection_bind_generic_method_parameters() directly.
11962 * loader.c (mono_method_get_signature): If this is a MethodSpec;
11963 return the already computed `method->signature'.
11964 (method_from_methodspec): New static function to load a method
11965 from a MethodSpec entry.
11966 (mono_get_method_from_token): Call the new method_from_methodspec()
11967 for MethodSpec tokens.
11968 (mono_get_method_from_token): If we're a generic method, load the
11971 * reflection.c (mono_image_get_memberref_token): Allow
11972 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
11974 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
11975 (mono_image_create_token): First check whether it's a generic
11976 method (so we'd need to create a MethodSpec), then do the other
11978 (mono_reflection_bind_generic_method_parameters): Return a
11979 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
11980 called directly from the interncall.
11982 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
11984 * reflection.c (load_public_key): Move loading of the public key
11987 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
11989 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
11992 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
11993 culture, hash_alg and public_key. Fixes #49555.
11995 2003-10-17 Martin Baulig <martin@ximian.com>
11997 * class.h (MonoGenericInst): Moved this declaration here and added
11998 `MonoMethod *generic_method'.
12001 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
12002 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
12004 * metadata.c (mono_metadata_type_equal): Two types of
12005 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
12006 index; ie. don't compare the address of the `MonoGenericParam'
12008 (mono_metadata_load_generic_params): Removed the `MonoMethod
12011 * metadata.h (MonoGenericInst): Moved declaration to class.h.
12012 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
12014 * reflection.c (method_encode_signature): Encode the number of
12015 generic parameters.
12016 (encode_generic_method_sig): New static function.
12017 (method_encode_methodspec): New static function; creates an entry
12018 in the MethodSpec table for a generic method.
12019 (mono_image_get_methodspec_token): New static function.
12020 (mono_image_create_token): Call mono_image_get_methodspec_token()
12021 for generic methods.
12022 (mono_reflection_bind_generic_method_parameters): New public
12023 function. Instantiates a generic method.
12025 2003-10-16 Martin Baulig <martin@ximian.com>
12027 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
12028 *gen_params' here from MonoMethodHeader.
12030 * metadata.c (mono_metadata_parse_method_signature): If we have
12031 generic parameters, initialize `method->gen_params' and then set
12032 the correct `type->data.generic_param' in all the parameters.
12034 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
12036 * threads.c (mono_threads_get_default_stacksize): New function to
12037 return the default stacksize.
12039 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
12040 termination of the finalizer thread, since the previous method had
12041 race conditions. Fixes #49628.
12043 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
12044 as for the other managed threads.
12046 2003-10-16 Martin Baulig <martin@ximian.com>
12048 * class.c (inflate_generic_signature): Copy `generic_param_count'
12051 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
12054 * metadata.c (mono_metadata_parse_method_signature): Actually set
12055 the `method->generic_param_count' here.
12056 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
12058 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
12060 * object.h: Add a new field to TypedRef to simplify the implementation
12061 of the REFANY opcodes in the JIT.
12063 * icall.c: Make use of the new field.
12065 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
12068 2003-10-15 Martin Baulig <martin@ximian.com>
12070 * class.c (mono_class_from_gen_param): Renamed to
12071 mono_class_from_generic_parameter() and moved most of the
12072 functionality from mono_reflection_define_generic_parameter()
12073 here; ie. we create a "real" class here.
12074 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
12075 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
12076 previously been called.
12078 * class.h (MonoGenericParam): Moved the declaration of this struct
12079 here from metadata.h and added `MonoMethod *method'.
12081 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
12084 * loader.c (mono_get_method_from_token): If we have any generic
12085 parameters, call mono_metadata_load_generic_params() to read them
12086 from the MONO_TABLE_GENERICPAR.
12088 * metadata.c (mono_metadata_load_generic_params): Added
12089 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
12091 * metadata.h (MonoMethodSignature): Replaced
12092 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
12093 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
12095 * reflection.c (mono_reflection_define_generic_parameter): Moved
12096 most of the functionality into the new
12097 mono_class_from_generic_parameter(); set the `method' field if
12098 we're a method parameter.
12100 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
12102 * marshal.c (emit_struct_conv): if native size is 0
12105 2003-10-14 Martin Baulig <martin@ximian.com>
12107 * icall.c: The generics API has changed in the spec since it was
12108 added to System.Type; these modifications make it match the spec
12110 (ves_icall_Type_GetGenericParameters): Renamed to
12111 `ves_icall_Type_GetGenericArguments'.
12112 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
12113 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
12114 `ves_icall_MonoType_get_HasGenericArguments'.
12115 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
12116 `ves_icall_MonoType_get_IsGenericParameter'.
12117 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
12118 this is no interncall anymore.
12119 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
12120 `ves_icall_TypeBuilder_get_IsGenericParameter'.
12122 2003-10-14 Martin Baulig <martin@ximian.com>
12124 * reflection.c (mono_reflection_bind_generic_parameters): Also
12125 inflate generic methods if we're reading the class from IL.
12127 2003-10-13 Martin Baulig <martin@ximian.com>
12129 * reflection.c (mono_reflection_define_generic_parameter): This
12130 method isn't called directly from the icall anymore; take a
12131 `MonoReflectionAssemblyBuilder *' so we can use this for type and
12132 method generic parameters.
12133 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
12134 (method_builder_encode_signature): Encode generic parameters.
12135 (mono_image_get_method_info): Write generic params to the
12136 MONO_TABLE_GENERICPARAM table.
12138 * reflection.h (MonoReflectionMethodBuilder): Added
12139 `MonoArray *generic_params'.
12141 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
12143 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
12144 wrapper for mono_reflection_define_generic_parameter().
12145 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
12147 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
12149 * marshal.h: Add missing function to fix build.
12151 * marshal.c (mono_marshal_get_native_wrapper): Add support for
12152 the SetLastError pinvoke attribute.
12154 * marshal.c (mono_marshal_set_last_error): New helper function called
12155 by the generated code.
12157 * marshal.c (mono_mb_emit_branch): New helper function.
12159 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
12161 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12162 classes as parameters and return values of delegates. Fixes #29256.
12164 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
12166 * locales.c: use gint32 in non HAVE_ICU case
12168 2003-10-11 Martin Baulig <martin@ximian.com>
12170 * mono-debug.c (mono_debug_add_method): Added a workaround for
12173 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
12175 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
12176 delegates passed to native code must use the STDCALL calling
12177 convention. Fixes #35987.
12179 2003-10-10 Martin Baulig <martin@ximian.com>
12181 * class.c (inflate_generic_type): If we're inflating for a generic
12182 type instance (and not for a generic method), return
12183 MONO_TYPE_MVAR unchanged.
12185 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12187 * string-icalls.c: Join ignores null strings in the source array.
12188 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
12189 * threads.c: GetAvailableTheads is slightly more accurate.
12191 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
12193 * threads.h threads.c : add mono_threads_set_default_stacksize
12194 and pass default to CreateThread calls.
12196 2003-10-09 Dick Porter <dick@ximian.com>
12200 * locales.c: Internal calls for constructing CultureInfo and
12201 related objects from libicu (if its available.)
12203 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
12205 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
12207 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12209 * threadpool.c: added an argument to async_invoke_thread that is the
12210 item to process, pass the MonoAsyncResult to the thread start function
12211 when creating a new thread. This way we don't need to acquire any lock
12212 when we're creating a new thread. Readded a semaphore for faster
12213 response times (instead of that Sleep i added).
12215 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
12217 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
12218 get daylight change dates better on Windows, fix handling
12219 of platforms without tm_gmtoff.
12221 2003-10-06 Martin Baulig <martin@ximian.com>
12223 * class.c (inflate_generic_method): Renamed to
12224 mono_class_inflate_generic_method() and made public.
12225 (mono_class_init): Don't inflate the generic methods here.
12226 (mono_class_from_generic): Added `gboolean inflate_methods'
12227 argument. Inflate the methods here.
12229 * loader.c (mono_method_get_param_names): Ignore instances of
12230 generic types for the moment.
12232 * reflection.c (fixup_method): Added support for inflated methods.
12233 (mono_image_create_token): Use mono_image_get_methodref_token()
12234 for inflated methods.
12235 (mono_custom_attrs_from_param): Ignore instances of generic types
12237 (mono_reflection_bind_generic_parameters): New public function.
12238 Moved all the functionality from
12239 ves_icall_Type_BindGenericParameters() here and added support for
12241 (mono_reflection_define_generic_parameter): Initialize
12242 `klass->methods' here.
12244 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
12245 functionality into mono_reflection_define_generic_parameter().
12246 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
12247 TypeBuilder, return that TypeBuilder.
12249 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12251 * appdomain.c: removed mono_delegate_semaphore.
12254 (mono_thread_pool_add): moved hash table creation inside and the thread
12255 creation outside of the critical region.
12256 (mono_thread_pool_finish): removed obsolete code.
12257 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
12258 continue or exit the thread depending on the queue.
12260 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
12262 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
12263 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
12264 handle more bool marshalling options
12266 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
12268 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
12269 arrays of structs. Also add a more descriptive error message when
12270 a structure member is marshalled as LPArray.
12272 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
12274 * marshal.c (mono_marshal_get_native_wrapper): Add support for
12275 marshalling arrays of complex types. Fixes #29098. Also remove an
12276 usused and incomplete function.
12278 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
12280 * gc.c: report heap_size - free_bytes as total memory allocated
12283 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
12285 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
12286 fix timezone handling problems on Windows.
12288 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
12289 asserts when the year is outside the range handled by ms the functions.
12291 * class.c (setup_interface_offsets): If the class is an interface,
12292 fill out its interface_offsets slot.
12294 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12296 * threadpool.c: mark threadpool threads as background.
12298 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
12300 * decimal.c - define DECINLINE to nothing if not using GCC
12302 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
12304 * assembly.c: More refcount fixes.
12306 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12308 * string-icalls.c: if we're not trimming, return the same string.
12309 When not splitting, don't create a new string.
12311 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12314 (mono_image_open): increment the ref_count inside the critical section.
12316 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
12318 * image.c (mono_image_open): Fix reference counting bug.
12320 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
12322 * marshal.c (mono_marshal_type_size) struct alignment changed for
12323 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
12324 64bits. Avoid leak in mono_marshal_get_native_wrapper when
12325 mono_lookup_pinvoke_call throws.
12327 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
12329 * reflection.c (mono_reflection_parse_type): Fix #49114.
12331 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
12332 temporary workaround for cygwin header problem.
12334 * object.c (mono_object_isinst): Synchronize this with the code
12335 generated by the JIT for casts.
12337 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
12339 * reflection.c (encode_type): Fix #38332.
12341 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
12343 * marshal.c (mono_marshal_method_from_wrapper): New function to return
12344 the original method from the wrapper method.
12346 2003-09-25 Martin Baulig <martin@ximian.com>
12348 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
12349 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
12350 (ves_icall_Type_get_IsGenericInstance): New interncall.
12352 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
12354 * object.c: fix cast warning in big endian code.
12356 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
12358 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
12360 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12362 * assembly.c: don't call check_env from mono_assembly_load. It's
12363 already done once in mono_assemblies_init and may cause headaches when
12364 multiple threads are loading assemblies.
12366 2003-09-19 Martin Baulig <martin@ximian.com>
12368 * reflection.c (mono_reflection_define_generic_parameter): Don't
12369 allocate `klass->methods', set `klass->flags' to
12370 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
12372 2003-09-18 Martin Baulig <martin@ximian.com>
12374 * class.c (mono_class_init): Don't create `class->methods' if it's
12375 already initialized.
12377 * metadata.c (mono_metadata_load_generic_params): Make this
12380 * reflection.c (mono_reflection_define_generic_parameter): Set
12381 parent class and interfaces from the constraints.
12383 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
12384 to keep this struct in sync with the declaration in TypeBuilder.cs.
12386 2003-09-17 Martin Baulig <martin@ximian.com>
12388 * metadata.h (MonoType): Replaced the data's `int type_param'
12389 field with `MonoGenericParam *generic_param'.
12390 (MonoGenericParam): Added `MonoClass *klass'.
12392 * class.c (mono_class_from_gen_param): Removed the
12393 `MonoImage *image' and `int type_num' arguments.
12395 * metadata.c (mono_metadata_parse_generic_param): New static
12396 method; creates a MonoGenericParam which just contains the index.
12397 (do_mono_metadata_parse_type): Call
12398 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
12401 * reflection.c (mono_image_typedef_or_ref): Generic type
12402 parameters may be in the same assembly, but never use a typedef
12404 (mono_reflection_define_generic_parameter): We're now creating a
12405 "real" class for the type parameter; it's now safe to call
12406 mono_class_from_mono_type() on the class'es type, it'll do the
12409 2003-09-16 Martin Baulig <martin@ximian.com>
12411 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
12412 `symfile->range_entry_size' and `symfile->class_entry_size' here;
12413 the `symfile' data structure must be fully initialized before it
12414 gets added to the table.
12416 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
12418 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
12420 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
12421 class init trampolines.
12423 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
12425 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
12426 to the built-in profiler to turn off time and allocation profiling
12429 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
12431 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
12434 * debug-helpers.c (mono_method_full_name): Print the wrapper type
12435 in human readable form.
12437 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
12439 * reflection.c icall.c: Fixed warnings.
12441 * image.c (load_class_names): Use a temporary hash table to hold the
12442 namespaces in order to avoid doing many string comparisons.
12444 * image.h: Fix typo.
12446 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
12447 Pass NULL instead of g_direct_equal to the GHashTable constructor
12448 since the NULL case is short-circuited inside g_hash_table_lookup,
12449 leading to better performance.
12451 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
12452 obtain the first custom attribute for a given index. Depends on the
12453 CustomAttribute table being sorted by the parent field.
12455 * reflection.c (mono_custom_attrs_from_index): Use the new function
12456 for better performance.
12458 2003-09-07 Martin Baulig <martin@ximian.com>
12460 * class.c (mono_class_init): If we're a generic instance, inflate
12461 all our methods instead of loading them from the image.
12462 (mono_class_from_generic): Set `class->methods = gklass->methods'.
12464 2003-09-07 Martin Baulig <martin@ximian.com>
12466 * mono-debug-debugger.c: Added support for constructors.
12468 2003-09-06 Martin Baulig <martin@ximian.com>
12470 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
12473 * reflection.c (mono_reflection_setup_generic_class): Call
12474 ensure_runtime_vtable() to create the vtable.
12476 2003-09-05 Martin Baulig <martin@ximian.com>
12478 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
12481 2003-09-04 Martin Baulig <martin@ximian.com>
12483 * reflection.c (mono_reflection_define_generic_parameter): Generic
12484 parameters start with zero.
12486 2003-09-04 Martin Baulig <martin@ximian.com>
12488 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12490 * reflection.h (MonoReflectionGenericParam): New typedef.
12491 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
12492 the generic parameters from the managed TypeBuilder.
12494 * reflection.c (mono_reflection_define_generic_parameter): New function.
12495 (mono_reflection_create_runtime_class): Encode generic parameters.
12496 (mono_reflection_setup_generic_class): New function; this is
12497 called after adding adding all generic params to the TypeBuilder.
12498 (encode_type): Added MONO_TYPE_VAR.
12500 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
12502 * class.h class.c (mono_class_needs_cctor_run): Moved this method
12505 * assembly.h assembly.c: Moved the AOT loading code into an assembly
12508 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
12510 * reflection.h reflection.c class.h class.c: Delete duplicate
12511 definition of mono_type_get_name () from reflection.c and export the
12514 * class.c: Class loading fixes from Bernie Solomon
12515 (bernard@ugsolutions.com).
12517 * reflection.c: Endianness fixes from Bernie Solomon
12518 (bernard@ugsolutions.com).
12520 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
12522 * assembly.h assembly.c: Define a file format version for AOT
12525 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
12527 * appdomain.h (MonoJitInfo): New field to determine whenever the
12528 code is domain neutral.
12530 2003-08-31 Miguel de Icaza <miguel@ximian.com>
12532 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
12534 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
12536 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
12537 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
12538 Avoid caching the result since strings must be domain specific. Fixes
12541 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
12543 * marshal.c (mono_marshal_init): Make this callable multiple times
12544 since it is hard to find a correct place to call it.
12546 * object.c (mono_runtime_class_init): Execute static constructors in
12547 the correct appdomain.
12549 * image.c (build_guid_table): Handle the case when multiple images have
12552 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12554 * icall.c: added a couple of icalls for System.Web.
12556 2003-08-28 Martin Baulig <martin@ximian.com>
12558 * icall.c (ves_icall_Type_BindGenericParameters): Use
12559 `klass->generic_inst' instead of `&klass->byval_arg' in the
12560 mono_type_get_object() call. The returned type must be
12561 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
12563 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
12567 * object.c (mono_class_proxy_vtable): Make it thread safe.
12569 * pedump.c: Fix warning.
12571 * object.c appdomain.h: Get rid of metadata_section.
12572 It is no longer needed and it was causing deadlocks with domain->lock.
12574 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
12576 2003-08-26 Martin Baulig <martin@ximian.com>
12578 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
12580 2003-08-26 Martin Baulig <martin@ximian.com>
12582 * pedump.c (main): Call mono_metadata_init(),
12583 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
12584 and mono_loader_init().
12586 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
12588 * loader.h: Add missing include to fix build.
12590 * image.h: mono_image_load_references is no more.
12592 * assembly.c: Reworked assembly loading to make it really thread safe.
12593 After these changes, the assembly returned by mono_assembly_open is
12594 fully initialized, i.e. all its references assemblies are loaded.
12596 * assembly.c (mono_image_load_references): Renamed to
12597 mono_assembly_load_references, and made private, since clients no
12598 longer need to call it.
12600 * class.c: Removed calls to mono_assembly_load_references, since it was
12601 a source of deadlocks.
12603 * loader.h loader.c class.h class.c: Protect data structures using a
12604 new lock, the loader lock.
12606 * class.c (mono_class_setup_vtable): Create temporary hash tables and
12607 GPtrArrays only when needed.
12609 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
12610 into empty structures by mcs. Fixes pinvoke7.cs.
12612 * domain.c (mono_init): Call a new initialization function.
12614 * appdomain.c (mono_runtime_init): Call the new initializer function
12615 of the marshal module.
12617 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
12618 inserted into empty structures by mcs. Fixes pinvoke7.cs.
12620 * marshal.h marshal.c: Added locks around the wrapper caches to make
12621 this module thread safe.
12623 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
12624 this argument. Fixes pinvoke1.exe.
12626 2003-08-25 Lluis Sanchez <lluis@ximian.com>
12628 * object.h: Added call_type field to MonoMethodMessage and the corresponding
12629 enumeration of values. Removed fields to store remote call output values in
12630 MonoAsyncResult. Not needed any more.
12631 * object.c: Initialize call_type and async_result fields in mono_message_init.
12632 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
12633 dispatching the message.
12634 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
12635 async call to finish. To do it use a message with EndInvoke call type.
12637 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
12639 * loader.h loader.c (mono_method_hash_marhal_info): New function which
12640 determines whenever a method has marshalling info.
12642 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12644 * assembly.c: fix the build on windows.
12646 2003-08-22 Lluis Sanchez <lluis@ximian.com>
12648 * object.cs: Fixed bug #47785.
12650 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
12652 * string-icalls.c (StringReplace): If their are no occurances of
12653 the old string found return a reference to the supplied
12654 string. This saves some memory and matches MS behavoir.
12656 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12658 * socket-io.c: fixed compilation for systems that define AF_INET6
12659 and don't define SOL_IP/SOL_IPV6.
12661 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
12663 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
12664 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
12666 * rawbuffer.c rawbuffer.h: Make this module thread safe.
12668 * domain.c: Make this module thread safe.
12670 * domain.c (mono_init): Call new initialization function.
12672 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
12673 reference types too. Fixes #38812.
12675 * image.c (mono_image_init): Fixed warnings.
12677 * class.c (mono_class_from_typeref): Handle assembly load failure
12680 * appdomain.c (add_assemblies_to_domain): Handle the case when
12681 the references of an assembly are not yet loaded.
12683 * metadata.c image.c assembly.c: Moved initialization of global
12684 variables to a separate function called at startup since lazy
12685 initialization of these variables is not thread safe.
12687 * image.c assembly.c: Made this module thread safe by adding locks in
12688 the appropriate places.
12690 * domain.c (mono_init): Call the new initialization functions of the
12693 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
12695 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
12696 make a direct call. It is proxy's work to make the call asynchronous.
12697 mono_delegate_end_invoke(): If the targe is a proxy, just collect
12699 * object.cs: mono_method_call_message_new(): read AsyncResult and
12700 state object from parameters list, if this info is requested.
12701 * object.h: Added fields to store remote call output values in
12702 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
12704 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12706 * object.h: add needed fields to MonoThread.
12707 * threads.c, threads.h: allow registering a function to cleanup data
12708 allocated per thread by the JIT.
12710 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12712 * loader.h: portability fix by Bernie Solomon
12713 * <bernard@ugsolutions.com>.
12715 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
12717 * reflection.h reflection.c (mono_param_get_objects): Changed this to
12718 return a MonoArray. This simplifies the code and also ensures that
12719 the cache allways contains an object reference as a value.
12721 * icall.c (ves_icall_get_parameter_info): Simplified using the new
12724 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12726 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
12727 fixes a problem with byte ordering when getting the address family for
12730 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
12732 * .cvsignore: Added monosn.
12734 * reflection.h reflection.c loader.c: Added support for parameter
12735 marshalling to dynamically created types. Fixes #47295.
12737 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
12739 * rand.c: remove useless warnings.
12741 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12743 * class.c: implemented ldtoken for methods and fieldrefs.
12745 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12747 * threadpool.c: when mono_async_invoke was called, no one took care of
12748 monitoring the queue. So if the method invoked took some time and we
12749 got new async invoke requests after 500 ms (the thread created waited
12750 that long in WaitForSingleObject), the new async invoke was not called
12751 until the previous one finished.
12753 This is fixed now. Thanks to Totte for helping with it.
12755 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12757 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
12759 2003-08-11 Martin Baulig <martin@ximian.com>
12761 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
12763 2003-08-06 Martin Baulig <martin@ximian.com>
12765 * mono-debug-debugger.c: Added support for static fields,
12766 properties and methods.
12768 2003-08-06 Martin Baulig <martin@ximian.com>
12770 * mono-debug-debugger.c: Don't store the MonoString's vtable to
12771 make this work for applications with multiple application domains.
12773 2003-08-04 Martin Baulig <martin@ximian.com>
12775 * mono-debug-debugger.c: Completely reworked the type support; the
12776 most important thing is that we're now just using one single
12777 `MonoType' instance per type.
12779 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
12781 * mono-endian.h, mono-endian.c, icall.c: Added icall
12782 ves_icall_System_Double_AssertEndianity to assert double word endianity
12783 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
12785 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12787 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
12788 support, icalls and fixes.
12790 2003-07-31 Miguel de Icaza <miguel@ximian.com>
12792 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
12793 classes that are a punctuation character in .NET is not the same a
12796 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12798 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
12800 2003-07-29 Miguel de Icaza <miguel@ximian.com>
12802 * icall.c: Add new MemCopy internalcall.
12803 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
12804 Simplified code; It is not necessary to handle all the cases here,
12805 as the C# code takes care of it. Only handle the case of the name
12806 resource embedded into the assembly.
12808 Changed signature to return the data pointer and the size of the
12811 2003-07-26 Miguel de Icaza <miguel@ximian.com>
12813 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
12814 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
12816 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
12818 * socket-io.c: ignore EINTR error in select.
12820 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
12822 * class.h, class.c: removed unused subclasses field in MonoClass.
12824 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
12826 * icall.c: improve fix of get_base_definition(). If the parent class
12827 doesn't have the mehod, look at the parent of the parent.
12828 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
12829 to check if a parameter is an in or out parameter
12830 (PARAM_ATTRIBUTE_IN is not set by default).
12831 mono_method_return_message_restore(): Use mono_class_value_size to
12832 get the size of a value type. mono_type_stack_size (parameterType)
12833 does not return the correct value if parameterType is byRef.
12834 mono_load_remote_field(), mono_load_remote_field_new(),
12835 mono_store_remote_field(), mono_store_remote_field_new():
12836 raise exception if the remote call returns an exception.
12838 2003-07-28 Martin Baulig <martin@ximian.com>
12840 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
12841 method. This is a wrapper around mono_runtime_invoke() which
12842 boxes the instance object if neccessary.
12844 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12846 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
12847 metadata.h, row-indexes.h, verify.c: first cut of generics support.
12849 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12851 * icall.c: disable mcs bug workaround.
12853 2003-07-21 Miguel de Icaza <miguel@ximian.com>
12855 * object.c (mono_runtime_class_init): Take the metadata_section
12856 mutex before obtaining the domain mutex.
12858 * appdomain.h: Added definition of metadata_section mutex here.
12860 * object.c: define metadata_mutex here.
12862 2003-07-24 Ravi Pratap <ravi@ximian.com>
12864 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
12867 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
12869 * reflection.c: Fix bug #46669
12871 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12876 * object.h: fill in the type name for TypeLoadException.
12878 2003-07-23 Ravi Pratap <ravi@ximian.com>
12880 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
12881 relationship between TypeBuilders while compiling corlib) and bug
12882 45993 (Array types returned from the runtime while compiling
12883 corlib were from the loaded corlib).
12885 2003-07-22 Martin Baulig <martin@ximian.com>
12887 * mono-debug-debugger.c: Reworked the type support a bit more;
12888 distinguish between types and classes.
12890 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
12892 * icall.c: add IsArrayImpl icall.
12894 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
12896 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
12897 initializing real_size only once. Also fix bug #46602.
12899 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
12901 * object.c: Renamed mono_metadata_section to metadata_section.
12903 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
12905 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
12906 empty array if the type is an array. Fixed.
12907 ves_icall_MonoMethod_get_base_definition: if the base method
12908 is abstract, get the MethodInfo from the list of methods of
12910 * reflection.c: ParameterInfo.PositionImpl should be zero-based
12911 and it was 1-based. Fixed in mono_param_get_objects.
12913 2003-07-20 Martin Baulig <martin@ximian.com>
12915 * mono-debug.h: Set version number to 31.
12916 (mono_debug_init): Added `MonoDomain *' argument.
12918 * mono-debug-debugger.c: Reworked the type support; explicitly
12919 tell the debugger about builtin types; pass the `klass' address to
12922 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
12924 * image.c: Allow new metadata tables to be loaded without a
12925 warning. Also update the warning message to give the new constant value.
12927 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
12929 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
12930 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
12931 array type representation changes.
12933 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
12935 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
12936 on Environment.Exit () call.
12938 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12940 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
12941 requires a matching corlib.
12943 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
12945 * Changelog: My editor decided to add a CR to each line. Sorry about that.
12946 Committed again without the CRs.
12948 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
12950 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
12951 getting it from the "this" socket instance. Did not work
12952 if the socket is a subclass of Socket.
12953 Also fixed bug #35371.
12955 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
12957 * metadata.c: fixed size for TypedByRef.
12958 * loader.c: when searching for a method, consider the vararg amrker.
12959 * unicode.c, decimal.c: constify some arrays.
12961 2003-07-15 Dick Porter <dick@ximian.com>
12963 * socket-io.c: Fixed compilation for gcc < 3.2.
12965 Fixed compilation for machines that don't have AF_INET6 (thanks to
12966 Bernie Solomon <bernard@ugsolutions.com> for that part.)
12968 Fixed compile warnings.
12970 Fixed formatting and line endings.
12972 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
12975 * socket-io.c: Added IPv6 support.
12977 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
12979 * class.c (mono_class_is_assignable_from): New function to implement
12980 the is_assignable_from logic. Used by mono_object_isinst,
12981 Type::IsAssignableFrom () and the interpreter.
12983 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
12984 Object, even interfaces.
12986 * object.c (mono_object_isinst): Implement in terms of
12987 is_assignable_from.
12989 * icall.c (ves_icall_type_is_assignable_from): New icall.
12991 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
12993 * domain.c (foreach_domain): fix compiler warning.
12995 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
12997 * image.c (load_metadata_ptrs): use g_strndup because strndup is
12998 not available on all plattforms
13000 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
13002 * image.h image.c: Store the metadata version string in MonoImage.
13003 * icall.c: New icall to retrieve the image version.
13004 * reflection.c (create_dynamic_image): Fill in the image version field
13005 * reflection.c (build_compressed_metadata): Use the image version
13006 from the image structure.
13008 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13010 * appdomain.c: modified comment.
13011 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
13012 That will be its last iteration when mono_gc_cleanup is called from
13013 mono_runtime_cleanup and before the domain is unloaded.
13017 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
13019 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
13022 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13024 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
13025 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
13026 Bernie Solomon <bernard@ugsolutions.com>.
13028 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13030 * object.c, object.h: provide mono_object_new_fast() for faster
13031 allocation in some special cases.
13033 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13035 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
13036 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
13038 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13040 * threadpool.c: fix leaks.
13042 2003-07-01 Dick Porter <dick@ximian.com>
13044 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
13045 using MonoGHashTables. Fixes threadpool bug posted to list.
13047 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13049 * image.h, image.c: added support to load an assembly from a byte array.
13050 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
13051 assembly bundle support.
13053 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
13055 * threadpool.c (mono_thread_pool_add): keep a reference to the
13056 AsyncResult to prevent GC
13058 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13060 * class.c: leak fix.
13062 2003-06-25 Dick Porter <dick@ximian.com>
13064 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
13065 for the async object, the WaitHandle object will close the handle.
13068 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13070 * class.c: in mono_array_class_get (), lookup from the hash with the
13071 same type we insert: this works around a bug in
13072 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
13073 lluis. The real fix will have to wait for after the release.
13075 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13077 * icall.c: fix memory leak when getting type members.
13079 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13081 * reflection.c: added more pubtoken special cases.
13083 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13085 * class.c: handle field offset correctly when class size
13086 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
13088 2003-06-20 Martin Baulig <martin@ximian.com>
13090 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
13093 2003-06-20 Martin Baulig <martin@ximian.com>
13095 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
13097 2003-06-20 Martin Baulig <martin@ximian.com>
13099 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
13100 just distinguish between variables in registers and variables at
13101 an offset relative to a register.
13103 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13105 * icall.c: #ifdef out latest changes until mcs is fixed.
13107 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13109 * icall.c: return members in metadata order.
13111 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13113 * icall.c: avoid infinite loop in GetTimeZoneData.
13115 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13117 * icall.c: added Marshal.Prelink/All icalls.
13119 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13121 * object.c, object.h: fix warnings and do some overflow checking
13122 when creating arrays.
13124 2003-06-17 Dick Porter <dick@ximian.com>
13127 * file-io.c: File attributes need to be tweaked slightly when
13128 passed from the managed to the w32 world.
13130 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
13131 * profiler.h profiler-private.h profiler.c: Rework last patch
13132 based on suggestion by Paolo.
13134 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
13136 * profiler.h profiler-private.h profiler.c: Added infrastructure for
13137 instruction level coverage data collection.
13138 * profiler.h profiler.c (: Added new callback function which can be
13139 used by the profiler to limit which functions should have coverage
13141 * profiler.c (mono_profiler_load): Call g_module_build_path to
13142 generate the file name of the profiler library.
13144 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13146 * profiler.c, profiler.h, profiler-private.h: added basic block
13147 coverage profiling API.
13149 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
13151 * reflection.c (mono_reflection_create_runtime_class): Add support
13152 for events in dynamically generated code.
13154 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
13157 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13159 * icall.c: when getting timezone info, return reasonable values if we
13160 can't get the actual data.
13162 2003-06-14 Dick Porter <dick@ximian.com>
13164 * threads.c (start_wrapper): Remove the reference to the thread
13165 object in the TLS data, so the thread object can be finalized.
13166 This won't be reached if the thread threw an uncaught exception,
13167 so those thread handles will stay referenced :-( (This is due to
13168 missing support for scanning thread-specific data in the Boehm GC
13169 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
13171 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
13173 * reflection.c: ensure streams and tables are first allocated with
13174 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
13176 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13178 * icall.c: fixed GetElementType for byrefs (bug# 44792).
13180 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
13182 * reflection.c (mono_reflection_create_runtime_class): Add support for
13183 properties to dynamically created classes.
13184 * reflection.c: Fix a few places where non-MonoObjects were inserted
13185 into the tokens hashtable.
13187 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13189 * object.c: some support to handle out of memory exceptions.
13191 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
13193 * marshal.c (mono_marshal_get_native_wrapper): support reference
13196 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13198 * object.h, object.c: more portability stuff from Bernie Solomon.
13199 Unexport mono_object_allocate(). Added mono_object_unbox ().
13200 Set exitcode when an unhandled exception is thrown.
13202 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
13204 * marshal.c (mono_marshal_get_native_wrapper): use custom
13205 marshaler for return types.
13207 2003-06-10 Dick Porter <dick@ximian.com>
13209 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
13210 ip_mreq is available
13212 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13214 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
13215 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
13216 by Bernie Solomon <bernard@ugsolutions.com>.
13218 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
13220 * gc.c (mono_gc_init): Avoid error message on shutdown when
13221 GC_DONT_GC=1 is used.
13223 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
13224 New icall to return the GUID of a module.
13226 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13228 * class.c: ensure instance size always includes the parent's size
13229 even whem class size is set explicitly (fixes bug#44294).
13231 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13233 * profiler.h, profiler.c: made the simple profiler thread-safe,
13234 get more accurate timing info. Allow the loading of an
13235 externally-developed profiler module.
13237 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
13239 * marshal.c (mono_marshal_get_native_wrapper): improved
13240 class/byref arguments.
13241 (mono_marshal_get_native_wrapper): better string marshaling support.
13243 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13245 * class.c: ensure .pack and .size are handled correctly and
13246 simplified layout of static fields.
13248 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
13251 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
13253 * loader.c (mono_lookup_pinvoke_call): look for modules in the
13254 current directory (fix bug 44008)
13256 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
13258 * marshal.c (mono_marshal_get_native_wrapper): started support for
13260 (mono_delegate_to_ftnptr): consider marshalling specifications
13262 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13264 * reflection.c, reflection.h: emit custom marshal info.
13266 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13268 * object.c: free the GError.
13269 * icall.c: added CloseEvent_internal.
13271 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
13274 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
13276 * loader.c (mono_method_get_signature): Add support for dynamic
13279 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13281 * reflection.c: fixed bug #43905.
13283 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13285 * class.c, domain.c, icall.c, metadata.h, object.h: support for
13286 handling TypedReference and ArgIterator.
13287 * loader.c, loader.h: added function to get signature at call site.
13289 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13291 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
13292 data readonly. Buglets and warning fixes. Some MethodSpec support.
13294 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13296 * class.h, class.c, object.c: remove relative numbering support.
13298 2003-05-26 Miguel de Icaza <miguel@ximian.com>
13300 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
13301 free the string, until we get a chance to fix Gtk#
13303 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13305 * marshal.c: revert last patch.
13307 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13309 * icall.c: updates for new mono_class_vtable() not calling
13310 the type constructor anymore.
13312 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13314 * object.h, object.c: separate vtable creation from type
13315 initialization. Make running the .cctor thread safe.
13317 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
13319 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
13321 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
13323 * loader.c (mono_get_method): consider calling convention
13325 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
13327 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
13328 to return the invisible global type for a module.
13330 * reflection.c (mono_image_build_metadata): Emit global fields too.
13332 2003-05-20 Peter Williams <peterw@ximian.com>
13334 * loader.c (mono_lookup_internal_call): Add a few newlines.
13336 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
13338 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
13341 * appdomain.c (set_domain_search_path): Recalculate search path when
13342 AppDomainSetup.PrivateBinPath changes.
13344 * object.c (mono_class_compute_gc_descriptor): It turns out some
13345 parts of the class libs (like System.Thread) holds pointers to
13346 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
13347 to treat native int a pointer type here.
13349 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
13351 * appdomain.h, domain.c: add hashtable for jump target resolution.
13353 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
13355 * reflection.h reflection.c icall.c: Added new icalls
13356 GetManifestResourceInfoInternal, GetModulesInternal and support
13359 2003-05-16 Dick Porter <dick@ximian.com>
13363 * file-io.c: Implement System.IO.MonoIO::GetTempPath
13365 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
13367 * object.c: mono_store_remote_field: little fix to previous patch.
13369 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13371 * class.c: add constructors to array classes.
13372 * icall.c: special case array construction for InternalInvoke (),
13374 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
13376 * class.h class.c reflection.c object.c: Added support for field
13377 defaults in dynamically generated classes.
13379 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13381 * reflection.c: properly encode charset for ddlimport.
13383 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13385 * threads.c: allow compiling without GC.
13387 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13389 * appdomain.h, object.c, object.h, threads.c, threads.h: added
13390 handling of thread static data.
13392 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13394 * reflection.h, reflection.c: added mono_custom_attrs_free ().
13396 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
13398 * class.c (mono_array_class_get): always set the serializable flags
13399 (mono_array_class_get): always set the SEALED attribute for array types
13401 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
13403 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
13404 attributes (fix for bug 42021).
13406 2003-05-12 Dick Porter <dick@ximian.com>
13408 * gc.c: Don't run finalizers when the finalizer thread is
13409 finishing up, because the default domain has already been
13412 2003-05-11 Miguel de Icaza <miguel@ximian.com>
13414 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
13415 value is null, we should throw an exception. This is slightly
13416 different than the other conventions used for the constructor.
13418 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13420 * socket-io.c: fixed windows build.
13422 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13424 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
13426 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
13428 * object.c (mono_string_new_wrapper): Compatibility fix for MS
13431 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
13433 * class.c (mono_class_layout_fields): Add experimental GC aware
13434 auto layout facility. Requires class library changes to work correctly.
13436 (mono_class_setup_vtable): Avoid overriding explicit interface
13437 method implementations. Fixes iface3.exe test.
13439 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
13441 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
13442 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
13444 * metadata.h: Add new type classification macro which determines
13445 whenever the type holds an object reference.
13447 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
13449 * marshal.c (mono_marshal_get_native_wrapper): cleanups
13451 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
13453 * gc.c (finalizer_thread): Work around a GC bug.
13455 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
13457 * marshal.c (emit_struct_conv): allow unions
13459 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
13461 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
13463 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
13465 2003-05-06 Martin Baulig <martin@ximian.com>
13467 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
13469 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13472 (Select_internal): allow NULLs, don't create arrays if not needed.
13473 Coupled with Socket.cs changes.
13476 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
13477 register a finalizer for it that will close the semaphore handle. This
13478 fixes the leak and make Lupus' test run with > 4080 loops.
13480 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
13482 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
13483 Jerome Laban (bug #42287)
13485 2003-05-02 Martin Baulig <martin@ximian.com>
13487 * debug-mono-symfile.h
13488 (MonoSymbolFile): Moved declaration into mono-debug.h.
13489 (MonoDebugMethodJitInfo): Likewise.
13490 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
13492 (_mono_debug_address_from_il_offset): Take a
13493 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
13496 (MonoDebugDomainData): New struct.
13497 (mono_debug_get_domain_data): New function.
13498 (mono_debug_add_method): Take an additional `MonoDomain *'
13500 (mono_debug_source_location_from_address): Likewise.
13501 (mono_debug_il_offset_from_address): Likewise.
13502 (mono_debug_address_from_il_offset): Likewise.
13504 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
13506 * reflection.c: one more check for null type in custom attrs.
13508 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13510 * reflection.c: avoid warning (comparison is always false due to limited
13511 range of data type).
13513 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13515 * icall.c: throw an exception in Type.GetField if the argument 'name'
13518 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
13520 * reflection.c: fixed handling of enums in named arguments to custom
13521 attributes (bug #42123).
13523 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13525 * reflection.c: use the right array element type and handle
13526 a null for a Type argument, too.
13528 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
13530 * reflection.c: handle arrays as arguments to custom attributes.
13532 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13534 * reflection.c: handle a string value in a custom attr
13535 ctor that takes an object.
13537 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
13539 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
13542 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
13544 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
13546 2003-04-27 Martin Baulig <martin@ximian.com>
13548 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
13549 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
13550 MONO_DEBUGGER_EVENT_BREAKPOINT.
13551 (mono_breakpoint_trampoline_code): Removed.
13552 (mono_debugger_event_handler): The last argument is now a
13554 (mono_debugger_insert_breakpoint_full): Removed the
13555 `use_trampoline' argument.
13556 (mono_debugger_method_has_breakpoint): Likewise.
13557 (mono_debugger_trampoline_breakpoint_callback): Renamed to
13558 mono_debugger_breakpoint_callback(); take the method and
13559 breakpoint number as arguments.
13561 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13563 * metadata.c: fix off by one when loading parameters attributes.
13565 2003-04-24 Martin Baulig <martin@ximian.com>
13567 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
13569 2003-04-24 Martin Baulig <martin@ximian.com>
13571 * mono-debug-debugger.c: Moved all code which interacts with the
13572 Mono Debugger here.
13574 * debug-mono-symfile.c: This code now just deals with the symbol
13575 file itself, the debugger code is now in mono-debug-debugger.c.
13577 2003-04-23 Martin Baulig <martin@ximian.com>
13579 * mono-debug.c (mono_debug_source_location_from_il_offset):
13580 New method; like mono_debug_source_location_from_address(), but
13581 takes an IL offset instead of a machine address.
13583 2003-04-23 Martin Baulig <martin@ximian.com>
13585 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
13586 `line' field; this is now computed by the debugger.
13588 2003-04-23 Martin Baulig <martin@ximian.com>
13590 * mono-debug.[ch]: New files. This is the new debugging interface.
13592 * mono-debug-debugger.[ch]: New files. Moved all code which
13593 interacts with the Mono Debugger here.
13595 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
13597 * domain.c (mono_init): initialize mono_defaults.monitor_class
13599 2003-04-21 Miguel de Icaza <miguel@ximian.com>
13601 * reflection.c (method_encode_code): Add a spicy exception to help
13602 future compiler authors.
13604 2003-04-21 Martin Baulig <martin@ximian.com>
13607 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13608 Make this work with relative pathnames; g_filename_to_uri() needs
13609 an absolute filename.
13611 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
13613 * icall.c: Track name changes in Object and ValueType.
13615 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
13617 * metadata.c (mono_type_stack_size): size should be a multiple of
13620 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13623 (internal_domain_finalize): moved into mono_domain_finalize. No need
13624 to create another thread because the finalizers will be run in the
13627 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
13628 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
13629 to be run (MS does this too).
13631 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
13633 * object.c (mono_class_compute_gc_descriptor): Update comment.
13635 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
13637 * image.h: Add synchronized wrapper cache.
13639 * image.c (do_mono_image_open): Initialize cache.
13641 * reflection.c (create_dynamic_mono_image): Initialize cache.
13643 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13645 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
13646 ves_icall_System_Buffer_ByteLengthInternal.
13648 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13650 * reflection.c: setup klass->nested_in earlier. Allow
13651 a dash in the assembly name.
13653 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
13655 * metadata.c (mono_type_to_unmanaged): dont access
13656 type->data.klass for MONO_TYPE_OBJECT
13657 (mono_type_to_unmanaged): consider System.Delegate class
13659 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
13661 * class.c: just setup supertypes in the proper place instead of
13662 initializing the full element class for arrays.
13664 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13666 * class.c: ensure the element class of arrays is initialized.
13667 Setup the supertype info for array classes, too.
13669 2003-04-14 Miguel de Icaza <miguel@ximian.com>
13671 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
13673 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13675 * Makefile.am: re-added -m option when running cygpath. This way,
13676 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
13678 * mono-config.c: same codepath for locating mono config file for WIN32
13680 * assembly.c: if mono_assembly_setrootdir is called, don't override
13683 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13685 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
13686 MONO_ASSEMBLIES variable.
13688 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13690 * icall.c: added Assembly::GetNamespaces() icall.
13692 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13694 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
13696 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
13698 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
13699 * object.c: fixed bug in the construction of vtable for proxies
13701 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
13703 * object.c (mono_array_new): Mark mono_array_new as an icall.
13705 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13707 * class.c: fixed test for public method when overriding interfaces.
13710 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13712 * appdomain.h, domain.c: added mono_domain_foreach() to
13713 be able to access the currently loaded appdomains.
13714 * object.c: make string interning work across sppdomains.
13715 Mark some functions for use as icalls.
13717 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
13719 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
13721 * reflection.h reflection.c: Allocate long living data using
13722 GC_MALLOC_ATOMIC so the collector does not need to scan it.
13724 * reflection.c: Double the allocation size in streams instead of
13725 increasing it, to prevent unneccesary copying on large assemblies.
13727 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
13728 creation if the assembly does not have the Run flag set.
13730 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13732 * class.h: avoid the C++ keywords in header files (Jerome Laban
13733 spotted and fixed this).
13735 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13738 (mono_unhandled_exception): fill in the arguments for the
13739 UnhandledException event. Only trigger that event for the default
13740 domain (as MS does).
13742 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
13744 * object.c: Improve typed allocation stuff based on suggestions from
13745 Paolo. Also turn it on if the GC library supports it.
13747 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
13749 * object.c object.h class.h: Added experimental typed allocation
13750 facility using the interfaces in gc_gcj.h.
13752 * os/gc_wrapper.h: Added new include files.
13754 2003-04-03 Martin Baulig <martin@ximian.com>
13756 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
13757 which is not yet enabled by default.
13759 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
13761 (mono_gc_lock, mono_gc_unlock): New static functions.
13763 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
13764 functions; stop/start the world for the garbage collector. This
13765 is using the windows API; we need to complete the SuspendThread()/
13766 ResumeThread() implementation in the io-layer to make this work on Unix.
13767 (mono_gc_push_all_stacks): New public function; tells the garbage
13768 collector about the stack pointers from all managed threads.
13770 2003-04-03 Martin Baulig <martin@ximian.com>
13772 * object.h (MonoThread): Added `gpointer stack_ptr'.
13774 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
13776 2003-04-03 Martin Baulig <martin@ximian.com>
13778 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
13780 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
13782 * reflection.c (typebuilder_setup_fields): Initialize field.first and
13785 2003-04-02 Miguel de Icaza <miguel@ximian.com>
13787 * loader.c (mono_lookup_internal_call): Report the corlib that is
13790 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
13792 * icall.c (ves_icall_type_GetTypeCode): fixed check for
13793 System.DBNull (it's class not valuetype).
13795 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13797 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
13798 if the array method was already assigned a token (fixes bug#40646).
13800 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
13802 * reflection.c (mono_reflection_get_type): Attempt type resolve even
13803 if no assembly is given.
13805 2003-04-01 Miguel de Icaza <miguel@ximian.com>
13807 * metadata.h: Added the new tables.
13809 * row-indexes.h: Added definitions for new tables.
13811 * metadata.c: Add schemas for new tables, and add support for
13812 computing the sizes of them.
13814 * class.c: Update for handling the new type cases.
13816 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
13818 * metadata.h (MONO_TYPE_IS_VOID): new macro
13820 2003-03-31 Martin Baulig <martin@ximian.com>
13822 * threads.h (MonoThreadCallbacks): Added `thread_created'.
13824 * threads.c (mono_thread_new_init): Call `thread_created' in the
13825 mono_thread_callbacks.
13827 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
13829 * loader.h: added marshalbyrefobject_class to mono_defaults
13830 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
13831 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
13832 generation of output parameters.
13833 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
13834 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
13835 contextbound and the target object belongs to the context of the caller.
13836 * object.h: added context and unwrapped_server variables in MonoRealProxy.
13837 * object.c: Implemented support for interfaces and abstract classes
13838 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
13839 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
13841 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
13843 * class.h class.c (mono_class_is_subclass_of): New function.
13845 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
13846 routines for most common case (calls from ArrayList::ToArray).
13848 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
13849 routine so programs which call Environment::Exit() can be profiled.
13851 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
13852 Added MONO_ARCH_SAVE_REGS.
13854 * icall.c (ves_icall_type_is_subtype_of): Use new function.
13856 2003-03-29 Miguel de Icaza <miguel@ximian.com>
13858 * blob.h: Add a couple of new MonoType types definitions.
13860 * tabledefs.h: Add a couple of new call convs.
13862 2003-03-27 Zoltan Varga <vargaz@freemail.h>
13864 * reflection.h (MonoReflectionDynamicAssembly): track changes in
13865 the layout of the class.
13867 * reflection.c (alloc_table): double the size on overflow to avoid
13868 unnecessary copying.
13870 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
13871 avoid filling out metadata tables and blobs. Also set mb->ilgen to
13872 null so it can be garbage collected.
13874 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
13876 * reflection.c (mono_reflection_get_type): Return the resolved type
13877 only if it is in the assembly we searched.
13879 * reflection.c (ensure_runtime_vtable): Initialize method slots.
13881 * class.c (mono_class_setup_vtable): Set the slot of the overriding
13884 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13887 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
13888 the right one is 'file:///blah', but MS allows it.
13890 (mono_assembly_open): allow 'file://blah'
13892 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
13894 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
13896 * socket-io.c: fixes bug #40310.
13898 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
13900 * reflection.c (mono_reflection_parse_type): handle deeply nested
13903 * reflection.c (mono_image_create_token): Use unique token values
13904 since they will be put into a hash table.
13906 * class.c (mono_class_setup_vtable): If a method occurs in more than
13907 one place in the vtable, and it gets overriden, then change the
13908 other occurances too.
13910 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
13911 object as return type.
13913 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
13915 * icall.c: Deleted "ToString" implementation for double and float
13916 because they are full implemented in managed code.
13918 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13920 * reflection.c, reflection.h: implemented and exported functions
13921 to retrieve info about custom attributes.
13923 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13925 * appdomain.c: moved Uri handling to assembly.c
13926 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
13927 work when using a file Uri in *nix and windows.
13929 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
13930 GetReferencedAssemblies.
13932 2003-03-18 Dick Porter <dick@ximian.com>
13934 * icall.c: Rename a couple of internal calls
13936 * threads.c: Set the thread state to Stopped when a thread exits.
13939 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
13941 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
13944 * object.c (mono_class_vtable): fix warning.
13946 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
13948 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
13950 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
13952 (method_encode_clauses): Create exception info structures in the right
13954 (mono_reflection_setup_internal_class): Initialize supertypes field.
13956 * class.c object.c: Handle interfaces which implement other interfaces
13959 * class.h class.c: Move the supertypes array initialization code into
13960 a separate function so it can be used for dynamic types too. Also call
13961 it earlier, in mono_class_init(), since it can be used before the
13962 type is initialized.
13964 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13968 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
13973 * object.c: remove warnings.
13975 2003-03-13 Martin Baulig <martin@ximian.com>
13977 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
13978 (MonoDebugLexicalBlockEntry): New types.
13980 * debug-mono-symfile.c
13981 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
13983 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13985 * process.c: ret can be any non-zero value accroding to MS doc.
13987 2003-03-07 Miguel de Icaza <miguel@ximian.com>
13989 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
13990 fixing a warning for a miss-used prototype, would have cause
13991 random memory corruption.
13993 2003-03-07 Martin Baulig <martin@ximian.com>
13995 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
13996 getting really annoying ....
13998 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
14000 * reflection.c (fixup_method): added support for array methods.
14002 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14004 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
14005 (pointed out by Michael Adams).
14007 2003-03-04 Dick Porter <dick@ximian.com>
14009 * icall.c: Temporarily reverted the Double and Single ToString()
14010 change, because it broke nunit.
14012 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
14014 * object.h, threads.h: make include files compatible with C++
14015 (patch by Jerome Laban <jlaban@wanadoo.fr>).
14017 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14019 * icall.c: Erased ToString helper functions for Double and Single.
14020 Now, that implementations ar all in managed code (Double and Single
14023 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
14025 * appdomain.c: Added method for initializing the default context of
14026 a domain. Added internal call for getting the default context.
14027 * appdomain.h: Added context variable in MonoDomain struct.
14028 * domain.c: mono_domain_set also sets the default context of the domain
14029 * icall.c: Mapped internal method InternalGetDefaultContext.
14030 * object.c: mono_object_get_virtual_method returns always a remoting
14031 wrapper if the object is a transparent proxy.
14032 mono_runtime_invoke_array: when creating an object by calling the
14033 constructor, if the created object is a proxy, then the constructor should
14034 be called using the a remoting wrapper.
14036 2003-03-03 Dick Porter <dick@ximian.com>
14038 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
14039 variable so it compiles on solaris. Problem spotted by
14040 Christopher Taylor <ct@cs.clemson.edu>
14042 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14045 (get_info_from_assembly_name): don't leak value.
14048 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
14051 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14053 * assembly.c: export mono_image_load_references ().
14054 * class.c: handle function pointers. mono_class_from_name() now
14055 supports nested type names directly.
14057 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
14059 * reflection.h reflection.c: Encode already created dynamic methods
14060 and fields correctly as a DEF instead of a REF.
14062 * reflection.c: Get rid of the force_ref argument to
14063 mono_image_typedef_or_ref since it was wrong in the first place.
14065 * string-icalls.c: add error checking to string constructors according
14068 * reflection.c: Emit types in the order their TypeBuilders were
14069 created. Previously, a new table index was assigned to each type before
14070 the tables were emitted. This was wrong because the signature blob
14071 might already refer to a type by its original table index.
14073 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
14075 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
14078 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14080 * Makefile.am: make assemblies dir have \ instead of / on windows.
14082 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
14084 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
14085 iterate over the NESTEDCLASS table using a linear search since the
14086 table is not guaranteed to be sorted by the secondary key.
14088 * class.c (mono_class_create_from_typedef): fixed up call to
14089 mono_metadata_nesting_typedef.
14091 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
14093 * marshal.c (mono_string_to_byvalstr): clear the memory as
14094 suggested by Jerome Laban <jlaban@wanadoo.fr>
14096 2003-02-26 Dick Porter <dick@ximian.com>
14098 * process.c: Cope with padding in .rsrc blocks
14100 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
14102 * metadata.h: reverted the filter_len change, it breaks reflection
14104 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
14106 * metadata.h: added a new field to store the filter_len
14109 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14111 * reflection.c: handle custom attributes for types and members
14112 created with Reflection.Emit (bug#38422).
14114 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
14116 * reflection.c: define RTSpecialName automatically for constructors for
14117 compatibility with MS.NET.
14119 * reflection.c (mono_reflection_create_runtime_class): initialize
14120 nested_in field of dynamically created classes.
14122 2003-02-22 Martin Baulig <martin@ximian.com>
14124 * debug-mono-symfile.h: Incremented version number.
14126 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
14128 * object.h icall.c process.c: fix warnings.
14130 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
14132 * appdomain.h appdomain.c:
14133 (mono_domain_try_type_resolve): split the
14134 name_or_tb argument into a name and a tb argument.
14135 (mono_domain_has_type_resolve): new function to check whenever the
14136 application has registered a TypeResolve event handler.
14138 * icall.c reflection.h reflection.c: move the type resolve logic into
14139 mono_reflection_get_type () so it will be invoked when
14140 Assembly::GetType () is called.
14143 (mono_reflection_get_type): renamed to get_type_internal.
14144 (mono_reflection_get_type): fixed type name generation so it works
14145 for nested types too.
14146 (mono_reflection_get_type): call has_type_resolve () to avoid the
14147 costly type name generation if there is no resolve event handler.
14149 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14151 * class.c, image.c: load exported types from file references.
14153 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
14155 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
14156 used to cache the managed methods used to create proxies and make
14157 remote invocation of methods.
14158 * class.h: Added in MonoVTable a flag to indicate that a class needs
14159 to be remotely created.
14160 * object.c: Modified the method mono_class_vtable(). It now initializes
14161 the remote flag of the vtable. Modified mono_object_new_specific(),
14162 so now it checks the remote flag.
14163 * icall.c: Added a couple of internal methods, one for enabling instance
14164 creation interception for a type, and one for creating objects bypassing
14167 2003-02-18 Martin Baulig <martin@ximian.com>
14169 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
14170 New interncall to get a method's metadata token.
14172 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
14173 New interncall for the debugger.
14175 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
14177 * class.c (mono_class_setup_vtable): allocate supertype array
14179 2003-02-18 Martin Baulig <martin@ximian.com>
14181 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
14183 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14186 (assembly_name_to_aname): jump over unknown properties (i've found
14187 something like: 'type, assembly, version=xxx, custom=null, public...',
14188 so now will ignore custom=null and still get the rest of the values).
14190 2003-02-17 Dick Porter <dick@ximian.com>
14192 * threads.c: Have Thread.Start() wait for a semaphore to signal
14193 that the thread has set up all its local data. This fixes bug
14194 34323, where Abort() raced the new thread's TLS data.
14196 Also removes the handle_store() call from start_wrapper, because
14197 threads are now always created suspended and there is no longer a
14198 race between the parent and child threads to store the info.
14200 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
14202 * image.c: explain the #- heap issue in a message, hopefully
14203 avoiding FAQs on mono-list.
14205 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14208 (GetEntryAssembly): if the domain has not invoked
14209 AppDomain.ExecuteAssembly yet, return the assembly of the default
14212 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
14214 * class.c (mono_ldtoken): make it work in dynamic assemblies.
14216 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14218 * metadata.c, reflection.c: simple speedup to type hash
14221 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
14223 * image.c, image.h, class.c, assembly.c: move module loading
14224 to MonoImage. When loading metadata, consider alignemnet from
14225 the start of metadata, not from the metadata address in memory.
14227 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
14229 * reflection.c (mono_reflection_get_custom_attrs): Added support for
14230 AssemblyBuilder objects. Factored out custom attribute creation into
14231 a separate function.
14232 (create_custom_attr): new function to create custom attributes.
14234 2003-02-12 Miguel de Icaza <miguel@ximian.com>
14236 * Makefile.am: Got tired of typing the full pathname to pedump.
14237 Until there is another option, am installing this.
14239 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
14241 * class.c (class_compute_field_layout): always set field->parent
14242 (mono_ldtoken): use mono_defaults.fieldhandle_class;
14244 2003-02-11 Dick Porter <dick@ximian.com>
14247 * monitor.c: Rewrote Monitor, making lock much faster and
14248 Pulse/Wait work as specified. Also uses much fewer handles, and only
14249 creates them as needed.
14251 * exception.c: Added SynchronizationLockException
14253 * threads.c: Deleted old Monitor implementation. The new one is
14256 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14258 * class.c: handled TypedReference type code. Set the correct size for
14259 class data. Setup interface_offsets for interface classes, too.
14261 2003-02-09 Martin Baulig <martin@ximian.com>
14263 * debug-mono-symfile.h: Reflect latest symbol writer changes.
14265 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
14267 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
14268 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
14269 * object.c: fixed mono_object_get_virtual_method () for interfaces.
14270 * verify.c: check for code that runs after the end of the method.
14272 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14274 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
14275 "System.Math::Round2".
14276 * sysmath.h: Added Floor, Round and Round2 definitions.
14277 * sysmath.c: Modified certain functions that were not 100% compliant
14278 with MS.NET (math precision) and added the implementation of Floor,
14281 2003-02-07 Martin Baulig <martin@ximian.com>
14283 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
14285 2003-02-07 Martin Baulig <martin@ximian.com>
14287 * debug-mono-symfile.c: Reflected latest symwriter changes.
14288 (mono_debug_create_mono_symbol_file): Removed.
14289 (mono_debug_open_mono_symbol_file): Take an argument which
14290 specifies whether to create a dynamic symbol file.
14292 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
14294 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
14296 2003-02-05 Martin Baulig <martin@ximian.com>
14298 * reflection.c (mono_image_build_metadata): Make this public,
14299 protect it against being called multiple times, don't create
14300 resources and don't build the compressed metadata here.
14301 (mono_image_create_pefile): Do this here.
14304 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
14306 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14308 * socket-io.c: fixed bug #36322.
14310 2003-02-06 Piers Haken <piersh@friskit.com>
14314 * debug-mono-symfile.c:
14320 * socket-io.c: warning cleanups
14322 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
14324 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
14325 function. works like remoting invoke, but does a check for the Proxy first.
14327 2003-02-05 Miguel de Icaza <miguel@ximian.com>
14329 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
14331 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
14333 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
14335 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
14336 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
14338 * object.c (mono_store_remote_field_new): used by the new jit
14339 instead of mono_store_remote_field
14340 (mono_load_remote_field_new): used by the new jit
14341 instead of mono_load_remote_field
14343 2003-02-05 Patrik Torstensson
14345 * appdomain.c: changed unload to take the domain id instead
14348 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
14351 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14353 * appdomain.c: don't look for assemblies in ApplicationBase if
14354 PrivateBinPathProbe is set.
14356 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14358 * object.c: make the first argument in main_args contain the absolute
14359 path to the assembly. Fixes bug #37511.
14361 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14363 * icall.c: get correct UTC offset for countries not using daylight
14364 time saving. Fixes bug #30030.
14366 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14368 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
14369 and 1 are the family).
14371 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
14373 * icall.c (ves_icall_InternalExecute): removed wrong assertion
14375 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
14377 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
14379 * reflection.c: added support for SignatureHelper tokens, which is
14380 needed by the Calli opcode.
14382 * reflection.h: track changes to SignatureHelper class.
14384 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
14386 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14388 * appdomain.c: fixed loading assemblies from PrivateBinPath.
14390 2003-02-03 Patrik Torstensson
14391 * appdomain.[c|h], domain.c :
14392 - Added support for getting a domain via domain id
14393 - Support for setting and getting domain from System.AppDomain
14394 (used in cross appdomain channel)
14395 - Added support for get/set for a MonoAppContext on a thread
14396 (Context class in System.Runtime.Remoting.Contexts),
14397 - Removed hack in Get/SetData and ExecuteAssembly.
14399 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
14400 the managed world to get control when a proxy is created.
14402 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
14404 2003-02-03 Miguel de Icaza <miguel@ximian.com>
14407 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14408 Populate the codebase field as well.
14410 2003-02-02 Martin Baulig <martin@ximian.com>
14412 * debug-mono-symfile.c
14413 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
14414 (mono_debug_symfile_add_method): Allow interncalls.
14416 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14418 * icall.c: throw parse exception if strtod fails or the string is empty.
14420 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
14422 * marshal.c: handle object type separately from defined
14425 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
14427 * marshal.c: handle NATIVE_LPSTR for strings when it's
14428 explicitly specified.
14430 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
14432 * reflection.c, reflection.h, icall.c: setup the reflection
14433 handle cache for ModuleBuilders and AssemblyBuilders.
14435 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
14437 * reflection.c (reflection_methodbuilder_to_mono_method): set
14440 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14442 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
14444 2003-01-29 Dick Porter <dick@ximian.com>
14446 * threads.c: No need for the fake_thread kludge now that Thread
14447 doesn't run a class constructor
14449 2003-01-29 Dick Porter <dick@ximian.com>
14451 * threads.c: Use g_direct_hash instead of the rather bogus
14454 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
14456 * marshal.c (mono_marshal_get_native_wrapper): add check for null
14457 (fix pinvoke12.exe)
14458 (mono_marshal_get_struct_to_ptr): generate valid IL code
14459 (mono_marshal_get_ptr_to_struct): generate valid IL code
14460 (*): correctly set sig->pinvoke, we need to memdup the signature
14463 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14465 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
14466 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
14468 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
14470 * profiler.c: provide more callers information.
14472 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
14474 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
14476 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
14478 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
14480 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14482 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
14483 exception instead of going into an infinite loop on dates which it
14486 * string-icalls.c (ves_icall_System_String_get_Chars): raise
14487 out-of-range exception if needed.
14489 * class.c (mono_class_setup_vtable): allow a virtual method to provide
14490 an implementation for an interface method and to override an inherited
14491 method at the same time.
14492 Imagine a scenario when a virtual method is used to override a
14493 virtual abstract method in a parent class, and this same method
14494 provides an implementation for an method inherited from an interface.
14495 In this case, the interface resolution code will set im->slot, which
14496 means that the virtual method override pass will skip this method
14497 which means a pointer to the abstract method inherited from the parent
14498 will remain in the vtable of this non-abstract class.
14500 * class.c: (mono_class_setup_vtable): continue search for a real
14501 method if only an abstract method is found.
14503 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
14505 * reflection.c: add size to encoding for ByValStr and ByValArray
14506 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
14508 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14510 * class.c (mono_class_setup_vtable): pass the override info as an
14513 * class.c (mono_class_setup_vtable): set the slot of overriding methods
14516 * reflection.c (ensure_runtime_vtable); add support for method
14519 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14521 * reflection.c (resolution_scope_from_image): Hack to work to work with
14522 dynamic assemblies.
14524 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
14525 added a 'force_ref' argument to force this function to allways return
14526 a TypeRef. This is needed by mono_image_get_memberref_token ().
14528 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14530 * reflection.c (mono_image_get_type_info): interfaces really don't have
14533 * reflection.c (mono_image_basic_init): fill out missing fields of
14536 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
14537 dynamic assemblies. This is required so dynamic assemblies show up in
14538 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
14539 Type::GetType() etc. This is consistent with MS behaviour.
14541 * image.c image.h reflection.c: add newly created classes to the name
14542 cache so mono_class_get () will find them.
14544 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14546 First part of changes to get IKVM.NET running under mono.
14548 * appdomain.h, appdomain.c: added new function
14549 mono_domain_try_type_resolve() which will emit TypeResolve events.
14550 This function will call AppDomain::DoTypeResolve to do the actual work.
14552 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
14553 moved existing code dealing with dynamic tokens to a new function
14554 called mono_reflection_lookup_dynamic_token (). This function will
14555 raise TypeResolve events when appropriate. Since reflection.c is not
14556 part of libmetadata, a new hook function called
14557 mono_lookup_dynamic_token() is added to class.c which will call this.
14559 * assembly.h assembly.c: make the invoke_load_hook function public,
14560 so it can be called for dynamic assemblies.
14562 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
14564 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
14567 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
14568 MonoGHashTable, since it contains pointers to objects which the GC
14571 * assembly.c (search_loaded): remove unused variable.
14573 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
14575 * object.c: fixed issue exposed by gcc-generated IL programs
14576 that use RVA data for pointers.
14578 2003-01-25 Martin Baulig <martin@ximian.com>
14580 * threads.c (start_wrapper): Moved the initialization of
14581 `start_func' above the mono_new_thread_init() call to which we
14582 pass it as argument.
14584 2003-01-24 Martin Baulig <martin@ximian.com>
14586 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
14587 the MonoThread pointer.
14589 2003-01-21 Miguel de Icaza <miguel@ximian.com>
14591 * icall.c: Rename `PowImpl' to Pow.
14593 2003-01-23 Dick Porter <dick@ximian.com>
14595 * threads.c (start_wrapper): Create a Thread object if needed, so
14596 the Main() thread can do the class initialisation in a subthread
14597 that has been set up to allow managed code execution.
14599 Pass the thread ID instead of the MonoThread pointer to the thread
14600 start and attach callbacks. This change is required, because the
14601 jit thread start callback must be called _before_ the Thread
14602 object can be created.
14604 (mono_thread_init): Removed much object creation code that is no
14605 longer needed. No managed code is called from here now.
14607 * object.c (mono_runtime_exec_managed_code): Create a subthread
14608 for Main, and call back to the runtime to use it.
14609 Set the exit code when Main exits.
14611 * gc.c: Make sure domain finalisation happens in a subthread.
14612 Re-enable threaded GC, fixing bug 31333 (again).
14614 * environment.c: System.Environment internall calls (so far just
14615 ExitCode is here, the others are still in icall.c)
14617 * appdomain.c (mono_runtime_cleanup): All threads running managed
14618 code should have finished before mono_runtime_cleanup() is
14619 reached, so no need to clean up threads.
14621 2003-01-22 Martin Baulig <martin@ximian.com>
14623 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
14624 `gpointer func' arguments.
14625 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
14626 but added `MonoThread *thread' argument.
14627 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
14629 * threads.c (mono_new_thread_init): Added `gpointer func' argument
14630 and pass it to the mono_thread_start_cb callback.
14631 (mono_install_thread_callbacks): New public function to install a
14632 set of callbacks which are set by the debugger.
14633 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
14635 2003-01-22 Martin Baulig <martin@ximian.com>
14637 * Makefile.am: Install debug-mono-symfile.h.
14639 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
14641 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
14643 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
14645 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
14646 * class.c (mono_ptr_class_get): correctly set access levels of pointers
14647 (mono_array_class_get): correctly set access levels of arrays
14649 2003-01-20 Patrik Torstensson
14650 * image.h (MonoAssemblyName): changed major, minor, build, revision
14651 from signed to unsigned.
14653 2003-01-20 sean kasun <skasun@azstarnet.com>
14655 * reflection.c (load_cattr_value): Now this handles
14656 MONO_TYPE_SZARRAY. Fixes bug #35629
14658 2003-01-20 Miguel de Icaza <miguel@ximian.com>
14660 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
14663 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14665 * decimal.c: fixed bug #26056.
14667 2003-01-17 Martin Baulig <martin@ximian.com>
14669 * gc.c: Raise an ExecutionEngineException instead of using g_error().
14671 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14674 (mono_get_exception_type_initialization): new function.
14676 * object.c: throw a TypeInitializationException when an exception is
14677 thrown invoking the class constructor.
14679 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14681 * reflection.c: fixed attribute reading.
14683 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14686 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
14687 provided, look for the type in the calling assembly and then in
14688 mscorlib; if the assembly name is provided, only try that one.
14690 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14692 * object.c: register the vtable before there is a chance it's
14693 queried again recursively.
14695 2003-01-13 Duncan Mak <duncan@ximian.com>
14697 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
14700 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
14702 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
14704 2003-01-11 Martin Baulig <martin@ximian.com>
14706 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
14707 this to 20 for the release.
14709 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
14711 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
14713 * loader.c (mono_method_get_marshal_info): bug fix
14715 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
14716 structures with explicit layout
14718 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14720 * profiler.c: made the output more readable (and sorted).
14721 Added caller information for the allocation profiler.
14723 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
14725 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
14727 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14729 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
14730 to get value types.
14732 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
14734 * object.c, profiler.h, profiler.c, profiler-private.h:
14735 Added object allocation profiler.
14737 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
14739 * reflection.h, reflection.c: handle global methods.
14740 Compress blob entries.
14742 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
14744 * marshal.c: fix compilation.
14746 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
14748 * loader.c (mono_method_get_marshal_info): impl.
14750 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
14752 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14754 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
14755 for reference types.
14757 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
14759 * loader.c: fixed off by one error in loaded parameter names.
14761 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
14763 * marshal.c (mono_marshal_get_icall_wrapper): like
14764 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
14765 instead of a MonoMethod.
14767 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14769 * decimal.c: fixed bug #36537.
14771 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
14773 * marshal.c: throw a missing method exception if a
14774 P/Invoke method is not found.
14776 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14778 * icall.c: allow a null this for constructors.
14780 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14782 * icall.c: raise the proper exceptions if the arguments to the
14783 internal Invoke are incorrect.
14785 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
14787 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
14789 2003-01-03 Martin Baulig <martin@ximian.com>
14791 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14793 2002-12-31 Martin Baulig <martin@ximian.com>
14795 * debug-mono-symfile.c: Completely rewrote the type section.
14796 Instead of using individual malloc()ed fields, we use one big
14797 continuous memory area and offsets into this area.
14798 See the comments in the source code for details.
14800 2002-12-30 Martin Baulig <martin@ximian.com>
14802 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
14804 2002-12-30 Martin Baulig <martin@ximian.com>
14806 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
14807 line number table in this data blob instead of using an external
14810 2002-12-28 Martin Baulig <martin@ximian.com>
14812 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14814 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
14816 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
14817 as a boxed return type.
14819 2002-12-21 Miguel de Icaza <miguel@ximian.com>
14822 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
14823 g_build_filename to properly get separators on the filename created.
14825 * object.h: Small change, introduce MonoMarshalByRefObject to
14826 track the layout of that structure in the C# universe as we make
14829 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
14831 * object.c: removed assert to allow static fields on interfaces.
14832 * loader.c: a TypeSpec may be used for any type, not just arrays.
14834 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
14836 * class.c, class.h: added mono_class_array_element_size ().
14837 Ignore static methods in interfaces.
14839 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14841 * threads.c: fixed the build under cygwin.
14843 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
14845 * reflection.c: handle nullref constants. Allocate keys for
14846 reflection handles with the GC.
14848 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14850 * threads.c, threads.h: added mono_thread_get_abort_signal()
14851 to get a suitable signal for thread abort.
14853 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14855 * metadata.c: fix handling of ExportedType table.
14857 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14859 * icall.c: added WriteWindowsDebugString internal call.
14861 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14863 * reflection.h: added fields to match C# implementation.
14865 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14867 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
14869 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
14871 * gc.h, gc-internal.h: Rename header for GC internal calls to
14872 gc-internal.h from gc.h as to not clash with Boehm GC having its
14873 header installed as <gc.h> in outside include paths.
14874 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
14875 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
14877 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14879 * icall.c: assign minor, build and revision in FillName.
14881 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
14883 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
14884 Added support for running code generated by Reflection.Emit.
14886 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14888 * appdomain.c: check for NULL argument in LoadFrom.
14890 2002-12-10 Dick Porter <dick@ximian.com>
14892 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
14894 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14896 * appdomain.c: fix buglet when building exe file name. Handle full
14897 assembly name (needed after latest changes to AssemblyName).
14899 (mono_image_close): free some hashtables.
14901 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
14903 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
14904 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
14905 on some systems (redhat 7.3)
14907 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
14909 * threads.c: delete the critical section of a sync block,
14910 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
14912 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
14914 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
14916 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14918 * appdomain.[ch]: handle the assembly preload event to try loading the
14919 assemblies using the paths we have in the current domain.
14921 * assembly.[ch]: created an assembly preload hook that is called to try
14922 loading the assembly by other means that the ones provided here.
14924 * domain.c: initialize the domain search path.
14926 From now on, assemblies (TODO: except corlib and System) are loaded
14927 according to these rules when using mono_assembly_load ():
14929 1. It tries to load the assembly from the ApplicationBase
14930 of the current domain appending .dll and .exe (TODO: have to
14931 try loading from name/name.dll and name/name.exe).
14933 2. It tries the search path specified in PrivateBinPath for the
14934 current domain (if any).
14936 3. Previous behavior.
14938 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
14940 * icall.c: implemented GetInterfaceMap() related icall.
14941 * domain.c, loader.h: load MethodInfo in mono_defaults.
14943 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
14945 * gc.c: disable the finalizer thread for now, untill all the issues
14946 with it are resolved.
14948 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
14950 * string-icalls.c: handle embedded nulls in string ctor when the
14951 length is specified.
14953 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
14955 * class.c: look for explicit interface implementation in parent
14958 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
14960 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
14962 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
14964 * gc.c: protect handles with a critical section.
14966 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14969 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
14970 parameters. If no assembly specified, try getting the type from all
14971 the assemblies in the current domain, else, load the assembly and get
14974 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14976 * marshal.c: applied patch from Aleksey Demakov that fixes
14977 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
14979 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14981 * icall.c: fixed get_location.
14983 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
14985 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
14986 declarations to make it work with older gcc.
14988 * loader.c (mono_get_method): set signature->pinvoke for native calls
14990 2002-11-20 Dick Porter <dick@ximian.com>
14992 * threads.c (mono_thread_init): Set the main thread's handle
14994 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
14996 * gc.c: allow compilation without GC support. Changed to match the
14999 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15001 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
15003 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
15005 * reflection.c: set a public key token on the core assemblies.
15007 2002-11-18 Dick Porter <dick@ximian.com>
15009 * threads.c: Split out some thread initialisation so that other
15010 files can set the start callback function.
15012 * gc.c: Run finalisers in a separate thread, to avoid stack
15013 overflow. Fixes bug 31333.
15015 * appdomain.c: Set up GC finalisation thread.
15019 * domain.c: Use gc.h macros for GC_malloc
15021 2002-11-15 Dick Porter <dick@ximian.com>
15025 * appdomain.c: Removed mono_runtime_init_with_attach(),
15026 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
15027 merging the extra parameter with the existing function. Removed
15028 unneeded code in mono_thread_attach().
15030 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
15032 * image.c (mono_image_loaded_by_guid): a method to get loaded
15034 (load_metadata_ptrs): we store the guid as string.
15036 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
15038 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
15040 * metadata.c (mono_guid_to_string): imported method form Zoltan
15041 Varga (slightly modified)
15043 * assembly.c (mono_assembly_open): load precompiled code
15045 * loader.h (MonoMethod): we store the method token for use in the
15048 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15050 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
15051 the hook function called when an assembly is loaded.
15053 * domain.c: Modified file.
15054 (mono_domain_assembly_load): removed hash table insertion of assemblies.
15058 2002-11-07 Miguel de Icaza <miguel@ximian.com>
15060 * reflection.c: Map PEFileKind to the value expected by the WinNT
15063 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15065 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
15066 Read until the buffer is filled completely.
15068 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15070 * icall.c: implemented MonoType.InternalGetEvent ().
15072 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15074 * appdomain.c: implemented InitAppDomainSetup. Delayed
15075 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
15076 the entry_assembly.
15078 * assembly.c: base_dir is now an absolute path ending with
15081 * icall.c: modified get_location according to the above changes.
15083 * object.c: init AppDomain.SetupInformation for the default domain after
15084 we have the entry assembly.
15086 * domain.c: when unloading a domain, setup = NULL.
15088 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
15090 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
15092 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
15094 * object.h, object.c: introduced mono_object_get_virtual_method ()
15095 to lookup the method invoked on an object when a callvirt is done on
15097 * icall.c: make MethodInfo::Invoke() always do a virtual call.
15099 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15101 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
15102 current domain when loaded an assembly and failed to load it.
15104 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
15106 2002-10-31 Dick Porter <dick@ximian.com>
15110 * file-io.c: Return the error status in a parameter, as the
15111 GetLastError() value has long since been blown away if we try and
15112 look it up in a subsequent internal call invocation. Delete the
15113 GetLastError() internal call, because it's useless.
15115 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
15117 * class.[ch]: added cast_class to fix bug 29517
15119 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
15121 * marshal.c: create valid IL code in the filter clause:
15122 the new JIT is less forgiving:-)
15124 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15126 * icall.c: removed get_property internal call.
15128 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
15130 * appdomain.h domain.c: Added an ID to appdomains.
15132 * threads.c threads.h icall.c: Implement icall
15133 Thread:GetDomainID(), and remove unused icall
15134 CurrentThreadDomain_internal.
15136 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15138 * icall.c: Don't recurse through the base types in GetConstructor.
15141 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15143 * mempool.h, mempool.c: added mono_mempool_empty() and
15144 mono_mempool_stats().
15146 2002-10-23 Dick Porter <dick@ximian.com>
15150 * icall.c: Added MonoIO.GetFileType internal call
15152 2002-10-17 Dick Porter <dick@ximian.com>
15154 * appdomain.c (mono_runtime_cleanup): Don't signal the async
15155 delegate semaphore before waiting for all threads to finish,
15156 because new threads can also call async delegates. Fixes bug
15159 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
15160 of 3 seconds, in case another async job is queued. (This part is
15161 needed because the bug fix reintroduced the 3s exit lag.) This
15162 makes the mono_runtime_shutdown flag superfluous.
15164 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15166 * reflection.c: include ehader size in method section headers.
15167 Really check for suplicated modules entries.
15169 2002-10-17 Martin Baulig <martin@gnome.org>
15171 * debug-mono-symfile.c: Added back support for locals.
15173 2002-10-14 Martin Baulig <martin@gnome.org>
15175 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
15178 2002-10-14 Martin Baulig <martin@gnome.org>
15180 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
15181 mono_class_get() instead of looking in the class cache.
15183 2002-10-13 Martin Baulig <martin@gnome.org>
15185 * debug-mono-symfile.c: Set version number to 28, include the
15186 signature in method names.
15188 2002-10-13 Martin Baulig <martin@gnome.org>
15190 * debug-mono-symfile.h: Set version number to 27.
15192 2002-10-11 Martin Baulig <martin@gnome.org>
15194 * gc.c: Don't register/unregister NULL pointers as disappearing links.
15196 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15198 * metadata.c, metadata.h: added helper function to allocate signatures.
15200 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15202 * icall.c: added internal call to get the location of machine.config.
15204 2002-10-08 Martin Baulig <martin@gnome.org>
15206 * debug-mono-symfile.c: Ignore classes with a pending init for the
15209 2002-10-03 Dick Porter <dick@ximian.com>
15211 * threads.c: Freebsd pthread_t is a pointer
15213 2002-10-03 Dick Porter <dick@ximian.com>
15215 * socket-io.c: Implemented GetHostName_internal
15217 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15220 (mono_config_parse_file): don't leak the text.
15222 2002-10-02 Martin Baulig <martin@gnome.org>
15224 * debug-mono-symfile.c: Added support for methods.
15226 2002-10-01 Martin Baulig <martin@gnome.org>
15228 * debug-mono-symfile.c: Don't emit methods and line numbers for
15229 the dynamic symbol file, just write the type table. We can easily
15230 have an external helper program which creates a symbol file for an
15233 2002-10-01 Dick Porter <dick@ximian.com>
15235 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
15236 Only add the handle to the cleanup array when we're about to
15237 launch the thread. Bug 31425 deadlocked when the test was run on
15240 2002-10-01 Martin Baulig <martin@gnome.org>
15242 * debug-mono-symfile.c: Added support for properties.
15244 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15246 * reflection.c: unaligned store fix from Mark Crichton
15247 <crichton@gimp.org>.
15249 2002-09-27 Martin Baulig <martin@gnome.org>
15251 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
15254 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
15256 * assembly.h, assembly.c: use a sane API to hook into the assembly
15257 loading process instead of a useless special-purpouse hack
15258 (ngen needs a hook, too, for example).
15260 2002-09-27 Dick Porter <dick@ximian.com>
15262 * threads.c (mono_thread_init): Call GetCurrentProcess() so
15263 io-layer can set up some process handle info. Not needed on w32,
15264 but doesn't hurt either.
15266 * process.c: Pass the program name in the second parameter to
15267 CreateProcess, so the path is searched. Include the working
15268 directory. Implemented process name, process enumeration, and some
15269 process detail internal calls.
15271 * icall.c: Added internal calls for process lookup, and some
15274 2002-09-26 Martin Baulig <martin@gnome.org>
15276 * assembly.c (mono_install_open_assembly_hook): New global
15277 function to install a function to be invoked each time a new
15278 assembly is loaded.
15279 (mono_assembly_open): Run this callback function if set.
15281 * debug-mono-symfile.c: Put back line numbers for the dynamic
15282 symbol file and also record the .il file as source file. This
15283 allows us to install the temporary symbol file as `file.dbg' just
15284 like a compiler-generated one.
15286 2002-09-26 Nick Zigarovich <nick@chemlab.org>
15288 * Corrected typo in gc.c (BOHEM vs BOEHM).
15290 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15292 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
15293 GetProperties. Also avoid calling g_slist_length in GetProperties and
15296 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15298 * reflection.c: avoid unaligned stores (bug spotted by
15299 Mark Crichton <crichton@gimp.org>).
15301 2002-09-25 Martin Baulig <martin@gnome.org>
15303 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
15304 instead of guint64 for addresses and added prologue/epilogue info.
15306 2002-09-25 Martin Baulig <martin@gnome.org>
15308 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
15309 store line number info. For the dynamic symbol file, we only need
15310 to provide the JIT generated dynamic line number info for the dynamic
15313 2002-09-25 Martin Baulig <martin@gnome.org>
15315 * debug-mono-symfile.h: Incremented version number.
15317 2002-09-24 Martin Baulig <martin@gnome.org>
15319 * class.c (mono_debugger_class_init_func): New global function
15321 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
15324 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
15325 function. This is called via the mono_debugger_class_init_func
15326 hook to add all types to the dynamic type table.
15327 (ves_icall_MonoDebugger_GetType): New interncall to get a class
15328 from its metadata token.
15330 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
15331 New interncall for the debugger.
15333 2002-09-24 Nick Drochak <ndrochak@gol.com>
15335 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
15336 before using it in case it is null.
15338 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15340 * metadata.c: allow custom modifiers in local var signatures
15341 (bug spotted by Zoltan Varga).
15343 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15345 * class.c: deal with the <Module> class that may have a NULL vtable.
15346 Eliminate warnings.
15348 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15350 * image.c, image.h: more strong name helpers.
15351 * monosn.c: more work: convert pem keys to cryptoapi format.
15353 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15355 * string-icalls.c: speedup IndexOf.
15357 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15359 * icall.c: updates from Zoltan.2.Varga@nokia.com.
15361 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15363 * icall.c: cleanup: use mono_object_domain ().
15365 2002-09-23 Martin Baulig <martin@gnome.org>
15367 * debug-mono-symfile.c: Improved type support.
15369 2002-09-22 Martin Baulig <martin@gnome.org>
15371 * debug-mono-symfile.c: Added support for reference types and strings.
15373 2002-09-22 Martin Baulig <martin@gnome.org>
15375 * debug-mono-symfile.c: Started to work on the type table.
15377 2002-09-21 Martin Baulig <martin@gnome.org>
15379 * debug-mono-symfile.c: Largely reworked the symbol table format.
15380 The symbol table is now incrementally updated each time a new
15381 method is added. We're now also using our own magic and version
15382 so that you don't need to recompile all your classes if the
15383 dynamic table changes.
15384 (mono_debug_update_mono_symbol_file): Removed.
15385 (mono_debug_symfile_add_method): New function to add a method.
15387 2002-09-21 Martin Baulig <martin@gnome.org>
15390 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
15393 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
15394 New interncall to get a method from its metadata token.
15396 2002-09-21 Martin Baulig <martin@gnome.org>
15398 * debug-mono-symfile.c: Create type table.
15400 2002-09-20 Martin Baulig <martin@gnome.org>
15402 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
15404 2002-09-20 Martin Baulig <martin@gnome.org>
15406 * debug-mono-symfile.c: Provide information about params and locals.
15408 2002-09-20 Martin Baulig <martin@gnome.org>
15410 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
15413 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
15414 interncall to get a method from its metadata token.
15416 2002-09-20 Martin Baulig <martin@gnome.org>
15418 * debug-mono-symfile.c: Added a few checks for method->header
15419 being non-NULL. This should never happen, but for the moment
15420 let's use a g_warning() rather than a g_assert().
15422 2002-09-19 Mark Crichton <crichton@gimp.org>
15424 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
15425 even if support for it isn't present. Added an #ifdef to fix this.
15427 * socket-io.c: Added checks back for Solaris support.
15429 2002-09-19 Martin Baulig <martin@gnome.org>
15431 * debug-mono-symfile.c (read_string, write_string): Reflect latest
15432 changes in the symbol file format.
15434 2002-09-18 Martin Baulig <martin@gnome.org>
15436 * debug-mono-symfile.c: Set version number to 21.
15438 2002-09-18 Dick Porter <dick@ximian.com>
15440 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
15441 on netbsd. Fixes bug 30051.
15443 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15446 (set_version_from_string): little fix.
15448 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15450 * monosn.c, Makefile.am: added strong name utility.
15451 * reflection.h, reflection.c: implemented delayed signing,
15452 locale, version and hash id assembly attributes.
15454 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15456 * loader.c, metadata.c: load param attributes in signatures.
15458 2002-09-16 Martin Baulig <martin@gnome.org>
15460 * debug-mono-symfile.c: Added string table with all method names.
15462 2002-09-14 Martin Baulig <martin@gnome.org>
15464 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
15465 fast method lookup.
15467 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15469 * reflection.c: record the public key token of referenced assemblies.
15471 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15473 * image.c, image.h: added functions to get the strong name and the
15474 public key of an assembly.
15475 * pedump.c: use them.
15477 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
15479 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
15481 2002-09-12 Miguel de Icaza <miguel@ximian.com>
15483 * marshal.c (mono_marshal_get_managed_wrapper): Added
15486 2002-09-11 Martin Baulig <martin@gnome.org>
15488 * gc.c: Call GC_unregister_disappearing_link() on all links when
15489 finalizing them, this is necessary to aviod a crash in boehm's
15492 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15494 * gc.c: handle GetTarget for finalized objects spotted and fixed by
15497 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
15499 * icall.c: implemented MonoType::Module.
15500 * reflection.c, reflection.h: mono_module_get_object () from
15501 Tomi Pakarinen <tomi.pakarinen@welho.com>.
15503 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15505 * icall.c: ignore overridden methods in GetMethods ().
15506 Fix for FieldInfo::SetValue().
15507 * object.c: handle float/double in runtime invoke.
15509 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15511 * object.c: allow a constructor to be called again on an object.
15513 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15515 * class.h, class.c: move field layout code to it's own function and
15516 export it. Get an interface id earlier. Move fields in MonoClass
15517 so they are more cache friendly and align the bitfields.
15518 * loader.c: temporary handle get_param_names() for a runtime method.
15519 * reflection.c, reflection.h: more code to handle runtime creation of
15522 2002-09-09 Martin Baulig <martin@gnome.org>
15524 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
15525 signature with the pinvoke field being set for the actual call.
15527 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15529 * icall.c: removed some unused icalls. Start of map of glib charsets
15530 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
15532 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15534 * debug-helpers.c: break infinite loop (found and fixed by
15535 Holger Arnold <harnold@gmx.de>).
15537 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15539 * icall.c: target may be null in create_delegate.
15541 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15543 * marshal.c: handle a boolean return type.
15545 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15547 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
15549 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15551 * gc.c: fix weakreferences.
15553 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
15555 * icall.c: added icall to get default codepage.
15557 2002-09-03 Dick Porter <dick@ximian.com>
15560 * threads.c: Use MonoThread instead of MonoObject where
15563 Store running thread objects in a hash table, so that we have all
15564 the info to hand when waiting for them to finish
15565 (means we don't need OpenThread() any more, so mingw builds should
15566 be fully functional again.)
15569 * object.h: Added thread ID to MonoThread
15571 2002-09-03 Martin Baulig <martin@gnome.org>
15573 * icall.c (System.Reflection.Assembly::get_location): New interncall.
15575 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15577 * icall.c: fixed leak in get_temp_path. Thanks lupus.
15579 2002-09-03 Martin Baulig <martin@gnome.org>
15581 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
15582 argument to store the end address of the disassembled instruction.
15584 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
15585 here from debug-symfile.h.
15586 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
15587 JIT into this struct.
15588 (MonoSymbolFile): Added `char *image_file' field.
15589 (MonoDebugGetMethodFunc): Removed.
15590 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
15591 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
15592 (mono_debug_find_method): New method.
15594 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
15595 create a full symbol file.
15596 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
15597 and static symbol files.
15598 (mono_debug_find_method): The symbol file keeps an internal method hash,
15599 call this to get a MonoDebugMethodInfo from a MonoMethod.
15601 * debug-symfile.[ch]: Removed.
15603 2002-08-29 Miguel de Icaza <miguel@ximian.com>
15605 * image.c (do_mono_image_open): Remove linker version check.
15607 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
15609 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
15610 wrappers for instance methods.
15612 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15614 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
15616 2002-08-28 Dick Porter <dick@ximian.com>
15618 * Makefile.am: Export HOST_CC for w32 builds
15620 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15622 * file-io.c process.c: MonoString are null terminated, no
15623 need for mono_string_to_utf16() anymore.
15625 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15627 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
15629 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
15631 * icall.c, reflection.h: speedup System.MonoType.
15633 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15635 * reflection.c: allow null as the value of a string argument in
15636 custom attributes constructors.
15638 2002-08-27 Martin Baulig <martin@gnome.org>
15640 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
15641 `trampoline_address' field.
15643 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
15645 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
15646 check (fixes bug #29486)
15648 2002-08-27 Martin Baulig <martin@gnome.org>
15650 * debug-mono-symfile.c: Changed the file format in a way that allows us
15651 open it read-only and to use a specially malloced area for all the
15652 dynamic data. We can now also generate a symbol file on-the-fly if we're
15653 debugging IL code and there is no MCS generated symbol file for it.
15655 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15657 * object.c: added a define for a good string and array
15658 creation speedup (not enabled by default because we need to deal with
15661 2002-08-26 Martin Baulig <martin@gnome.org>
15663 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
15664 function to create a dynamic symbol file. This is used by the
15665 debugger to create a symbol file for IL code on-the-fly.
15667 2002-08-26 Martin Baulig <martin@gnome.org>
15669 * loader.c (mono_lookup_pinvoke_call): Include the error message
15670 from g_module_error() in the error message.
15672 2002-08-24 Martin Baulig <martin@gnome.org>
15674 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
15675 function to update the symbol file. The symbol file is mmap()ed
15676 writable, but private. This allows us to install the symbol file
15677 together with the assembly.
15679 2002-08-24 Martin Baulig <martin@gnome.org>
15681 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
15682 but they can read the new symbol file format which mcs is now creating.
15684 * debug-symfile.c (mono_debug_find_source_location): Moved to
15685 debug-mono-symfile.c; this is now operating on the new symbol file.
15687 2002-08-23 Martin Baulig <martin@gnome.org>
15689 * debug-helpers.c (mono_method_desc_from_method): New function to get
15690 a MonoMethodDesc from a MonoMethod.
15692 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15694 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
15695 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
15697 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
15699 * string-icalls.[ch]: make helper methods static.
15701 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15703 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
15704 types to it and to SetValueInternal.
15706 * object.c: Moved handle_enum label to its proper place. This was the
15709 This time i compiled mcs and gtk-sharp and they both work.
15711 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15713 * icall.c: reverted partially my previous patch until
15714 object.c:set_value handles enums correcly.
15716 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15719 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
15720 (ves_icall_System_Environment_get_MachineName): removed warning when
15721 compiling under cygwin.
15723 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15725 * object.c: fixed field_get_value() for reference types.
15727 2002-08-22 Dick Porter <dick@ximian.com>
15729 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
15730 Don't free a buffer while it's still needed. Patch from Jonathan
15731 Liger <Jonathan.liger@wanadoo.fr>
15733 2002-08-21 Miguel de Icaza <miguel@ximian.com>
15735 * icall.c (ves_icall_System_Environment_get_Platform): Add new
15738 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
15740 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
15741 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
15743 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
15744 we call unmanaged code which throws exceptions.
15746 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15748 * appdomain.h: added per-domain entry_assembly.
15749 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
15751 * icall.c: Assembly::GetEntryAssembly icall.
15752 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
15753 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
15755 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15757 * appdomain.h, gc.c: added mono_domain_finalize ().
15759 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15762 (mono_print_unhandled_exception): changed g_warning by g_printerr
15763 because g_log has a 1024 characters limit (yeah, i got a big stack
15764 trace). Don't print exception name, that should be in ToString
15767 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15769 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
15770 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
15772 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15775 (mono_print_unhandled_exception): after previous commit, i realized
15776 that MS calls ToString on the exception. I changed this function to
15777 do that. This way we get stack_trace for free.
15779 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15782 (mono_print_unhandled_exception): invoke Message property instead of
15783 getting 'message' field from Exception. Don't allocate memory for
15784 'trace' and 'message' if not needed.
15786 2002-08-18 Dick Porter <dick@ximian.com>
15788 * unicode.c: Fix asserts to match Encoder.cs checks
15790 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15792 * marshal.c: fix unaligned store issue and a few wrong
15793 opcode argument types.
15795 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15797 * icall.c: added GetUninitializedObjectInternal internal call.
15799 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
15801 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
15802 to the right domain.
15804 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
15806 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
15808 * class.c (class_compute_field_layout): set blittable to false for Strings
15810 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
15812 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15814 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
15815 first chunk of code to create types at runtime. Code to
15816 handle ReflectedType/DeclaringType. Make reflection handles
15819 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
15821 * class.c: set correct name in arrays.
15823 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
15825 * appdomain.c (mono_domain_transfer_object): make it work with
15826 valuetypes. bug fixes.
15828 2002-08-12 Dick Porter <dick@ximian.com>
15830 * object.h: Rename some parameters to avoid c++ keywords (Patch
15831 from Joseph Wenninger <kde@jowenn.at>)
15833 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
15835 * icall.c: added icall to implement Assembly.GetFile*.
15837 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15839 * reflection.h, reflection.c: code to embed managed resources.
15841 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15843 * class.c: move all the type size stuff into
15844 class_compute_field_layout().
15846 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15848 * class.c: ensure enums have always the correct instance size.
15849 * unicode.c: remove wrong assert.
15851 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15853 * assembly.c: fix mem corruption issue.
15854 * image.h, image.c: added mono_image_get_resource () to access
15856 * icall.c: implemented Assembly.EntryPoint property and some
15857 Managed Resources related internalcalls.
15860 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15862 * image.c, image.h: impemented mono_image_get_entry_point ().
15863 * appdomain.c: use mono_image_get_entry_point.
15865 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15867 * reflection.c: support the object type argument when loading
15870 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
15872 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
15873 String as return type.
15875 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
15877 * reflection.c: fix encoding of named args for custom attrs to match
15878 the ms implementation. Read them back when instantiating custom
15881 2002-08-02 Radek Doulik <rodo@ximian.com>
15883 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
15884 by Dietmar as quick fix
15885 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
15886 16 as stack size, used on more places as quick fix before Dietmar
15887 will fix it properly
15889 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15891 * object.h, object.c: added accessors for fields and properties.
15893 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15895 * class.c, class.h: made mono_class_get_field_from_name ()
15896 loop on parent types.
15897 Added mono_class_get_property_from_name ().
15899 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15901 * class.c, class.h: move the code to setup the type vtable in its own
15902 function so that it can be reused also for types created at runtime.
15903 Eliminate the "class" identifier from the header file.
15904 * reflection.c: setup the vtable for enums so that we can create
15905 objects for use in SetConstant ().
15907 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
15909 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
15910 instead of the delegate itself as this pointer (bug #28383)
15912 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
15914 * marshal.c (mono_marshal_get_managed_wrapper): added return type
15917 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
15919 * loader.c: don't set the pinvoke bit on icalls.
15921 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
15923 * debug-helpers.c (mono_method_full_name): only print a number to
15924 indicate wrapper type (so that the output is more readable in traces).
15926 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
15928 * class.c (mono_class_init): include method override patch from Paolo
15930 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
15932 * icall.c: fixed GetTypeCode().
15934 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
15936 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
15937 use real delegate invoke function to make it work with multicast
15938 delegates (fix bug# 28291).
15940 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
15942 * object.c: load constant strings.
15944 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
15946 * reflection.c: no magic numbers.
15947 * tabledefs.h: security action enum.
15949 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
15951 * assembly.c: fix possible memory corruption.
15953 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15955 * reflection.h, reflection.c: added support for linking resources.
15956 * verify.c: check we have an updated corlib.
15958 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
15960 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
15962 (mono_marshal_string_array): null terminate unmanaged string arrays.
15963 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
15965 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
15967 * icall.c: Type.GetType () can now return also types from the
15970 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
15972 * loader.h, loader.c: stack walking support.
15973 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
15974 GetCallingAssembly.
15976 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
15978 * marshal.c: added optimisations for blittable types
15980 * class.c (mono_array_class_get): do not set blittable attribute on arrays
15981 (mono_class_setup_mono_type): set blittable attribute for single
15984 * marshal.c (mono_string_utf8_to_builder): impl.
15985 (mono_string_builder_to_utf8): impl.
15986 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
15988 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
15990 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
15991 (mono_marshal_get_managed_wrapper): impl. byref types
15993 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15996 (search_method): don't display debug message.
15998 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
16000 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
16002 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16004 * appdomain.c: set the missing filename when throwing exception.
16006 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
16008 * metadata.c (mono_type_size): code cleanup
16009 (mono_type_stack_size): removed some test code
16011 2002-07-21 Miguel de Icaza <miguel@ximian.com>
16013 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
16014 mono_get_exception_file_not_found now.
16016 * exception.c (mono_exception_from_name_two_strings): New version
16017 that will call a constructor with two string arguments.
16018 (mono_get_exception_file_not_found): New helper routine, used to
16019 report file-not-found errors.
16021 2002-07-20 Dick Porter <dick@ximian.com>
16024 * process.c: Pass file handles to CreateProcess
16028 * file-io.c: Implemented CreatePipe
16030 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
16032 * metadata.c (mono_get_param_info): set alignment for value types
16034 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16036 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
16037 Constify mono_domain_assembly_open().
16038 * loader.c: handle null namespace in icalls.
16040 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
16042 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
16043 (emit_str_to_ptr_conv): marshal object as structs
16045 * metadata.c (mono_type_to_unmanaged): marshal object as structs
16047 * marshal.c (mono_marshal_get_runtime_invoke): support value types
16049 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
16051 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
16052 (mono_marshal_get_native_wrapper): we an now return value types
16054 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16056 * verify.c: more checks implemented.
16058 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
16060 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
16062 (mono_marshal_get_native_wrapper): allow byref arguments
16063 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
16064 impl. PtrToStringXXX methods
16065 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
16066 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
16067 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
16068 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
16069 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
16071 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16073 * reflection.c: fix buglet in parsing an assembly name.
16075 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
16077 * marshal.c (emit_ptr_to_str_conv): first impl.
16079 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16081 * object.c, class.h: cache the vtable in the class as suggested by
16082 vargaz@freemail.hu (Zoltan Varga).
16084 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16086 * class.h, loader.c: added mono_field_from_token().
16087 * verify.c: first cut of type checking code.
16089 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
16091 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
16093 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
16095 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
16097 (mono_marshal_get_remoting_invoke): impl.
16098 (mono_delegate_begin_invoke): impl.
16099 (mono_mb_emit_save_args): impl.
16100 (mono_delegate_end_invoke): impl.
16101 (mono_marshal_get_delegate_begin_invoke):
16102 (mono_marshal_get_delegate_end_invoke):
16103 (mono_marshal_get_delegate_invoke): generate a special name for
16104 those methods (including the signature) and associate them whith
16105 the delegate class.
16107 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
16110 (mono_reflection_type_from_name): now it has a MonoImage parameter
16111 which is used as the default image to search the type in. If the image
16112 is NULL or getting the type from it fails, it defaults to corlib.
16114 * icall.c: changed 1 call to mono_reflection_type_from_name to match
16117 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16119 * reflection.c: update the parameter table index.
16121 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16123 * domain.c: don't include the mark byte in the string hash.
16125 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16127 * icall.cs: icall for Type.GetTypeCode ().
16128 * verify: a couple of fixes and disabled local initialization checks.
16130 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
16132 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
16134 * debug-helpers.c (mono_method_full_name): print the type of the
16137 * metadata.c (mono_signature_hash): a hash function for signatures
16138 (mono_signature_hash): better hash algorithm
16140 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
16142 * debug-helpers.c (mono_method_full_name): this can now generate
16143 method names with signatures
16145 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
16146 method dont have this pointers.
16148 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16150 * reflection.c: fixup typebuilder tokens.
16151 * image.c: fix buglet.
16152 * marshal.h: remove whitespace.
16153 * metadata.h, metadata.c: reinstate code that was removed.
16154 * verify.c: handle catch directives and fix another couple of bugs.
16156 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
16158 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
16159 (mono_marshal_get_native_wrapper): make it comp. with the old code
16160 (mono_marshal_get_native_wrapper): support boolean
16161 (mono_marshal_get_managed_wrapper): support more types
16163 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
16165 * class.c (class_compute_field_layout): compute class->blittable attribute.
16167 2002-07-09 Dick Porter <dick@ximian.com>
16169 * threads.c: Make the thread cleaning up cope with threads that
16172 2002-07-08 Radek Doulik <rodo@ximian.com>
16174 * reflection.c (method_encode_code): use non-translated values to
16175 compute finally_start, this fixes exception handling on ppc, yay!
16177 * decimal.h (struct signscale): fix endianess
16179 2002-07-07 Radek Doulik <rodo@ximian.com>
16181 * reflection.c: swap box_val and not val
16183 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16185 * reflection.c, reflection.h: handle full assembly info in type name.
16186 Handle Type arguments when loading custom attributes.
16187 * icall.c: updated to use new mono_reflection_type_from_name () method.
16189 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16192 (method_from_memberref): also print assembly name when method not found.
16194 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16197 (ves_icall_TypeGetProperties): fixed bug #27473.
16199 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16201 * reflection.c: display image name and token when cannot find the
16202 .ctor for an attribute.
16204 2002-07-05 Martin Baulig <martin@gnome.org>
16206 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16208 2002-07-04 Dick Porter <dick@ximian.com>
16210 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
16211 compile on mingw. This will cause mingw builds to not wait for
16212 subthreads to terminate after the main thread does. I've lodged a
16213 bug with the mingw developers for them to wrap OpenThread().
16215 2002-07-03 Dick Porter <dick@ximian.com>
16217 * threads.c: Store thread IDs instead of handles, because
16218 GetCurrentThread() returns a pseudohandle and therefore stores
16219 useless values. mono_thread_cleanup() continues checking the
16220 array of threads until it is empty, to cope with subthreads
16221 spawning new threads after the main thread has finished.
16225 * profiler-private.h: Pass the thread ID to thread profiler
16226 functions, instead of a handle
16228 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16230 * verify.c: fixes to make it more usable.
16231 * pedump.c: added --verify code to verify IL code in an assembly.
16233 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16235 * reflection.c: turn errors into warnings to allow compiling corlib.
16237 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16239 * reflection.c: add special cases to compile corlib.
16241 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16243 * reflection.c: handle properties with only a set method.
16245 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16247 * opcodes.h: add enum with opcodes in opval order.
16249 2002-07-01 Dick Porter <dick@ximian.com>
16252 * object.c (mono_runtime_run_main): Removed unneeded argument
16254 2002-06-28 Martin Baulig <martin@gnome.org>
16256 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16258 2002-06-27 Dick Porter <dick@ximian.com>
16260 * threads.c: Store the handle in both the parent thread and in the
16261 subthread, to minimise the time between starting a new thread and
16264 2002-06-26 Dick Porter <dick@ximian.com>
16266 * appdomain.c (mono_runtime_cleanup): Close the socket library
16267 after all the threads have finished, not before
16269 2002-06-26 Martin Baulig <martin@gnome.org>
16271 * debug-symfile.c (mono_debug_find_source_location): Added
16272 `guint32 *line_number' argument. If it's not NULL, store the line number
16273 there and return the file name without the line number.
16275 2002-06-25 Dick Porter <dick@ximian.com>
16279 * process.c: Process forking and other support functions
16281 2002-06-25 Dick Porter <dick@ximian.com>
16283 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
16284 things dont happen when the image is closed.
16285 (mono_image_lookup_resource): Walk the resource section looking
16286 for a particular entry
16288 * cil-coff.h: PE resource section decoding
16290 2002-06-25 Dick Porter <dick@ximian.com>
16294 (mono_assembly_foreach): Accessor functions to walk the list of
16296 (mono_assembly_set_main):
16297 (mono_assembly_get_main): Process methods need to know which
16298 assembly is the "main" one
16300 * object.c (mono_runtime_run_main): Record the main assembly
16302 * debug-helpers.c: Fix typo
16304 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
16306 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
16307 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
16309 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16311 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
16313 2002-06-21 Miguel de Icaza <miguel@ximian.com>
16315 * image.c (do_mono_image_open): Initialize reference count,
16316 otherwise we leak the MonoImage.
16318 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16320 * reflection.c: small tweak to handle self-hosting.
16322 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16324 * reflection.c: fix type name parse code.
16326 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16328 * reflection.c: break out of the loop.
16329 * image.c: special case corlib.
16331 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16333 * reflection.c: add all the custom attrs at the end to ensure the
16334 ctors have been properly initialized when the attributes are defined
16335 in the current assembly.
16337 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16339 * reflection.c: handle correctly multiple-nested types.
16341 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16343 * row-indexes.h: fix typos.
16344 * reflection.c: adjust for typos and fix method_def_or_ref
16345 encoding in MethodImpl table.
16347 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16349 * reflection.c: fix entry point patching (thanks Serge!).
16351 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
16353 * verify.c: add check for System.Exception
16355 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16357 * image.c, class.c: minifix for code just c&p'ed.
16358 * reflection.c: warning fix.
16359 * object.h, loader.h, domain.c: load also StringBuilder.
16361 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16363 * marshal.h, marshal.c: some support code to handle complex marshaling.
16365 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16367 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
16368 Better signatures with vtable error dump.
16370 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
16372 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
16374 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
16376 * icall.c (ves_icall_Type_GetField): impl.
16378 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16380 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
16381 to retrieve a marshal description blob for a field or param.
16383 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16385 * reflection.h, reflection.c: change order of nested type emission
16386 to avoid table corruption. The NestedTypes table is sorted.
16387 * icall.c: change order of GetConstructor results to workaround mcs bug.
16389 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16391 * reflection.h, reflection.c: handle field and param marshal
16394 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16396 * icall.c, marshal.c marshal.h: more Marshal class implementation.
16398 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16400 * reflection.c: fix call convention.
16402 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16404 * reflection.h, reflection.c: mono_image_get_memberref_token()
16405 takes a type instead of a class, now. Added
16406 mono_image_get_array_token() to create tokens for the special
16407 multi-dim array methods.
16409 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16411 * assembly.c: handle modules (no assembly table). Split
16412 loading references in its own function.
16413 * class.c: handle moduleref resolution scope.
16414 * image.c, image.h: cache module name in image.
16416 2002-06-07 Martin Baulig <martin@gnome.org>
16418 * reflection.c (mono_image_get_type_info): Only add a class layout entry
16419 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
16421 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16423 * icall.c: more signature fixes that used uint instead of int.
16425 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16427 * reflection.c: fixed signature of field refs.
16429 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16431 * class.c, reflection.c: handle typerefs of nested types
16432 (both on read and when writing files).
16434 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16436 * icall.c: fix method signatures that tried to workaround the previous
16439 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16441 * debug-helpers.c: fix typo.
16443 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16445 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
16446 rewrote the PE/COFF writing code (our programs are understood by the
16449 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16451 * gc.c, gc.h, icall.c: weakreference support.
16453 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16455 * Makefile.am, mono-config.c: use $(sysconfdir).
16457 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16459 * icall.c: changed default precision of Double.ToString() to 15.
16460 Fixed memory leak. Unified with Single.ToString.
16462 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16464 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
16466 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16468 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
16469 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
16470 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
16473 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16475 * debug-symfile.c, sysmath.c: yet more compilation fixes.
16477 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16479 * reflection.c, socket-io.c: more compilation fixes.
16481 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16483 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
16484 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
16485 unicode.c: warning and compiler compatibility fixes.
16487 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16489 * class.h, metadata.c: fixed warnings/compilation errors.
16491 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16493 * Makefile.am, mono-config.c, mono-config.h: configuration file
16495 * loader.c, loader.h: make Dll mapping configurable at runtime in the
16496 config file. Export methods to insert and lookup mappings.
16498 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16500 * reflection.c: handle types and boxed objects in custom attr
16503 2002-05-30 Martin Baulig <martin@gnome.org>
16506 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
16508 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
16510 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
16511 to lookup the implmap row for a P/Invoke method.
16512 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
16513 P/Invoke method from the runtime on an as needed basis.
16515 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
16517 * metadata.c (mono_metadata_parse_signature): impl.
16519 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16521 * class.c: handle .pack directive.
16523 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16525 * object.c: initialize static fields with RVA data.
16527 2002-05-25 Martin Baulig <martin@gnome.org>
16530 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
16532 2002-05-24 Martin Baulig <martin@gnome.org>
16535 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
16536 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
16537 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
16539 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16541 * object.c: special case string ctros in invoke.
16542 * gc.c: silly whitespace changes.
16544 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
16546 * threadpool.[ch]: impl. a threadpool that can
16547 be used by mint and mono.
16549 2002-05-22 Martin Baulig <martin@gnome.org>
16551 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
16552 The first argument is now a `MonoReflectionModuleBuilder *', the return
16553 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
16554 `methods' field to get the method builder. The `token' argument is the
16557 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
16558 invalid characters instead of g_assert_not_reached()ing. This seems
16559 to be the behaviour of mscorlib.
16561 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
16563 * object.c (mono_runtime_invoke_array): applied patch from Rachel
16564 Hestilow to fix bug #25104
16566 2002-05-21 Martin Baulig <martin@gnome.org>
16568 * debug-symfile.c (mono_debug_find_source_location): New function.
16569 Looks up an IL offset in the line number table and returns the source
16570 location as a string.
16572 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16575 (mono_double_ToStringImpl): changed %f by %g until we have something
16578 2002-05-21 Nick Drochak <ndrochak@gol.com>
16580 * icall.c : Use different name for Math.Pow's icall. Needed to check
16581 parameters first in C#.
16583 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16585 * icall.c, reflection.h: added icall to get info about an event.
16587 2002-05-20 Radek Doulik <rodo@ximian.com>
16589 * object.c (mono_value_box): don't use memcpy for boxing on BIG
16591 (mono_value_box): don't use memcpy for small sizes on
16592 architectures with unaligned access
16594 2002-05-20 Martin Baulig <martin@gnome.org>
16596 * reflection.c (mono_reflection_setup_internal_class): Don't crash
16597 if `tb->parent == NULL'.
16598 (mono_reflection_create_internal_class): New function. This is
16599 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
16602 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
16605 2002-05-19 Martin Baulig <martin@gnome.org>
16607 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
16608 argument to get the length, don't default to the array length.
16610 2002-05-18 Miguel de Icaza <miguel@ximian.com>
16612 * assembly.c (mono_assembly_setrootdir): New function used to
16613 override the MONO_ASSEMBLIES directory.
16615 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16617 * icall.c: ValueType_GetHashCode() initialize local var.
16619 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16621 * reflection.c: sort custom attributes table.
16623 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16625 * reflection.c: support named args in custom attributes (write support).
16627 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16629 * reflection.c: fix finally position calculation.
16631 2002-05-15 Radek Doulik <rodo@ximian.com>
16633 * reflection.c: fixed endianess at many places
16635 * icall.c (ves_icall_InitializeArray): comment out debug msg
16637 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
16639 * object.c (mono_unhandled_exception): new function to handle
16640 unhandled exceptions.
16641 (mono_unhandled_exception): call the UnhandledException event.
16642 (mono_runtime_delegate_invoke): impl.
16644 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
16646 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
16647 returns the RVA, not the direct pointer to the data. Handle the case
16648 when the class size is fixed.
16650 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16652 * reflection.c: fix some endianess issues.
16654 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
16656 * object.c (mono_runtime_invoke): is now able to catch exceptions.
16658 * threads.c (mono_thread_init): added a callback which is invoked
16661 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
16663 * icall.c: make GetHashCode return non-negative values.
16665 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
16667 * object.c, icall.c, gc.c: revert to address-based hashcode.
16669 2002-05-13 Miguel de Icaza <miguel@ximian.com>
16671 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
16673 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16675 * icall.c, class.c: special case <Module>.
16677 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
16679 * icall.c: fix bug in GetNow().
16681 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
16683 * object.c (mono_runtime_class_init): make sure that we call all
16684 static class constructors.
16686 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16688 * reflection.c: sort methodsemantics table.
16690 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16692 * reflection.h, reflection.c: honour init locals setting.
16694 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
16696 * icall.c: copied Double ToStringImpl for Single ToStringImpl
16698 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16700 * reflection.c: support ContructorBuilders in attribute blob creation.
16702 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16704 * reflection.c: some changes to build a binary that can be run
16705 directly in windows.
16707 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
16709 * loader.c: print a big message when an icall can't be found.
16711 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16713 * string-icalls.c: fix bug 24248.
16715 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16717 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
16718 icall.c, reflection.h: separate assembly loading by pathname and by
16719 assembly name. Use the MONO_PATH env var to search for assemblies.
16721 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16723 * assembly.c, image.h: add some support for assemblies
16724 with multiple modules.
16725 * class.c, class.h: export mono_class_from_typeref().
16726 * loader.c: remove duplicated code and use mono_class_from_typeref(),
16729 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16731 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
16732 documentation says (the ECMA one is correct).
16734 2002-05-02 Dick Porter <dick@ximian.com>
16736 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
16737 Don't name the synchronisation mutex.
16739 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
16742 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
16743 Make the prototypes match.
16744 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
16748 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
16749 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
16750 all systems have tm.tm_zone, so use strftime() with %Z to print
16751 the timezone abreviation into a temp string.
16753 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
16754 rather than mono_array_addr() on a MonoString on Big Endian
16757 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
16759 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
16762 2002-04-30 Dick Porter <dick@ximian.com>
16764 * socket-io.c: Cope with SOCKET being an integer rather than a
16767 * threads.c: Added Thread_free_internal, to deal with thread
16768 handle cleanup. Moved calls to handle_store() and handle_remove()
16769 to start_wrapper(), so each can only be called once. Allocate
16770 synchronisation blocks with GC_malloc(), and use GC finalisation
16771 to close the handles.
16773 * icall.c: added System.Threading.Thread::Thread_free_internal
16775 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16777 * icall.c: support Environment.Exit, CommandLineArgs().
16779 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16781 * object.c, object.h: added mono_runtime_run_main () and
16782 mono_runtime_get_main_args () for use in System.Environment.
16784 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16786 * gc.c: fix thinko, enable actual finalization since the jit is now
16789 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16791 * gc.c, object.c: take into account that an object may be offset wrt the address
16792 returned by GC_malloc().
16794 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
16796 * image.c: handle files without entries in the assembly table (modules).
16798 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
16800 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
16801 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
16802 allowed to be null when it's System.Object class setup.
16804 2002-04-27 Martin Baulig <martin@gnome.org>
16806 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
16807 if `tb->parent == NULL' rather than crashing.
16809 2002-04-28 Nick Drochak <ndrochak@gol.com>
16811 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
16812 calling acos() where asin() should have been called.
16814 2002-04-26 Martin Baulig <martin@gnome.org>
16816 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
16817 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
16818 there's a subdirectory called `System', but we don't want to read that
16819 subdirectory as an assembly.
16821 2002-04-25 Martin Baulig <martin@gnome.org>
16823 * debug-symfile.c: Reflect latest MonoString changes.
16825 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16827 * rand.c, rand.h: instance method icalls need to have an explicit
16828 this pointer as first argument in the C implementation.
16830 2002-04-25 Nick Drochak <ndrochak@gol.com>
16832 * icall.c: Fix typo in map for GetNonZeroBytes
16834 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
16836 * string-icalls.c : String does now passes unit tests without any
16837 errors, the following changes has been made:
16839 Implemented replace methods.
16840 Renaming of methods to (try) follow the standard.
16841 Fixed compare ordinal
16842 Made all memory allocated directly to function instead of via icall function.
16843 Small performance fix in is_in_array function
16845 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
16847 c (mono_string_Internal_ctor_charp_int_int):
16848 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
16849 sindex < 0, throw ArgumentOutOfRangeException instead of
16850 ArgumentNullException.
16852 Added new check for length == 0, however
16853 I need to make it return String.Empty from the C code.
16855 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
16856 that calculate the length for us here.
16858 (mono_string_Internal_ctor_sbytep_int_int): Replaced
16859 mono_string_new_utf16 with mono_string_new, since value is utf8.
16861 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16863 * object.c: register the object for finalization if needed.
16864 Allocate one more char in the string for the terminating 0 char.
16866 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16868 * class.c, class.h, image.c: check if a type implemenst a destructor.
16869 Use the proper key for array class lookups.
16870 * icall.c: register the icalls in the System.GC class.
16871 * gc.c, gc.h: GC-related functions and icalls.
16873 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16877 * unicode.c: free some strings gotten from mono_string_to_utf8 and
16878 changed a couple of free () by g_free ().
16880 * decimal.c: one-liner in the comments for decimal2string ().
16882 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
16884 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
16886 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
16888 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
16889 * object.c (mono_runtime_invoke_array) : handle null in params
16891 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
16893 * string-icalls.c: fixed bug in split (one off bug)
16895 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
16897 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
16898 * icalls.c: added String::Equals as internal method
16900 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
16902 * threads.c: fixed bug in the double interlocked functions
16904 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
16906 * threads.c: implemented all of the new interlocked icalls.
16907 * string-icalls.c: fix a bug in insert.
16908 * icalls.c: added the icalls for interlocked, removed old string functions.
16910 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
16912 * loader.c: fix off-by-one error when reading argument names.
16914 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16916 * profiler.c: win32 counter implementation (untested).
16917 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
16918 (the latter needs testing and more complete impl. from win32 folks).
16920 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
16922 * object.c: mono_array_new_full workaround mono_array_class_get
16925 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
16927 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
16928 * object.h (mono_string_chars): Changed casting type.
16930 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
16932 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
16933 method signatures to use gunichar2 instead of gint16.
16935 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
16937 * object.h, object.c: domain-specific versions of mono_object_new and
16940 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
16942 * object.c: changed String layout
16944 * string-icalls.c (mono_string_Internal_ctor_chara): added
16945 internal string constructors.
16947 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
16949 * threads.c: pass 'this' to the thread start routine.
16951 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16953 * string-icalls.c: fix IndexOf and LastIndexOf. Now
16954 InternalCompareStr don't call twice mono_string_cmp_char for the last
16955 character. Improved performance in mono_string_cmp_char.
16957 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16959 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
16960 code into its own library: libmonoruntime.
16962 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
16964 * object.h, object.c: changed array format so that szarrays do not
16965 require a bounds structure.
16966 * icall.c, appdomain.c: support for new szarray format.
16968 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
16970 * metadata.c: compare also the retuns type when comparing signatures:
16971 we didn't do this as an optimization since really overloaded methods
16972 must differ also in the arguments, but this doesn't work with
16973 low-level IL code (or when using explicit conversion operators: see
16974 bug#23498 for an example).
16976 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16978 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
16980 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
16982 * icall.c: make MonoType::GetElementType its own icall.
16984 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16986 * icall.c: remove MonoMethod_get_Name().
16987 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
16990 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
16992 * string-icalls.c: optimized a few methods.
16994 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
16996 * icall.c: added all new string internal calls
16997 * string-icalls.c: added, new string internal call implementation.
16998 * object.c: added mono_string_new_size for allocating a string a size
17000 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
17002 * object.c (mono_object_isinst): use the same code as in the
17003 optimized x86 version.
17005 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17007 * profiler.c: TSC-based timer code (faster and more accurate).
17008 Not hooked up in configure, yet (set USE_X86TSC to 1).
17010 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
17012 * profiler.c, profiler.h: track time spent compiling methods.
17013 * threads.c: track thread creation/destruction.
17015 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
17017 * profiler.c, profiler.h, profiler-private.h: profiling interface
17018 and sample implementation. Moved here so that it can be used also by
17021 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
17023 * reflection.c, reflection.h: keep types and other handles separate in
17024 the hash tables for referred tokens. Add guid for modules.
17026 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17028 * assembly.c: fix bugs found with valgrind.
17029 * metadata.h, metadata.c: added mono_metadata_guid_heap().
17031 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
17033 * threads: added icall support for getting current domain for
17036 2002-04-13 Martin Baulig <martin@gnome.org>
17038 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
17039 (MonoDebugVarInfo): Added `index' field for register based addresses.
17040 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
17041 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
17042 `MonoDebugVarInfo *params' and `guint32 this_offset' with
17043 `MonoDebugVarInfo *this_var'.
17045 * debug-symfile.c (relocate_variable): New static function to write
17046 a location description for a local variable or method parameter.
17048 2002-04-12 Martin Baulig <martin@gnome.org>
17050 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
17051 stack offset and begin/end scope address of a local variable.
17052 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
17053 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
17054 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
17056 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
17057 Added new relocation types for start/end scope of a local variable.
17059 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17061 * object.h: add mono_object_domain() macro.
17062 * reflection.c: handle typespecs.
17063 * icall.c: MonoMethod::get_Name() implementation.
17065 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17067 * icall.c: String::GetHashCode() icall implementation.
17069 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17071 * icall.c: String::IndexOfAny icall.
17072 * object.c, object.h: make array->max_length more useful.
17073 Intrduced mono_object_class() and mono_string_length() macros.
17075 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17077 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
17078 instead of g_unichar_isdigit.
17080 2002-04-11 Nick Drochak <ndrochak@gol.com>
17082 * icall.c: Implement a simple Double.ToString().
17084 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17086 * appdomain.h: only io-layer.h is supposed to be included.
17087 * icall.c: explicitly import environ. Fix warning.
17089 2002-04-10 Nick Drochak <ndrochak@gol.com>
17091 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
17092 return true even if it's not Daylight Savings time.
17093 Only return false for the case where the function isn't
17094 implemented for a plaform (read Windows).
17096 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17098 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
17101 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
17103 * mempool.c (mono_mempool_alloc): only use g_malloc when
17104 absolutely necessary.
17106 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
17108 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
17110 * class.c (mono_class_vtable): use domain mempool to allocate vtable
17111 (mono_class_proxy_vtable): use domain mempool
17113 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17115 * appdomain.h, appdomain.c: split initialization that requires the
17116 execution engine support into mono_runtime_init().
17118 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
17120 * class.c (mono_class_init): don't include vtable inside MonoClass
17121 to save some memory, gather some statistics.
17122 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
17124 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17126 * icall.c: internalcall implementation for ValueType.Equals().
17128 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
17130 * object.c (mono_message_init): moved
17131 (mono_runtime_exec_main): new arch. independent impl.
17132 (mono_runtime_invoke_array): new method - like
17133 mono_runtime_invoke, but you can pass an array of objects.
17134 (mono_remoting_invoke): new arch. independent impl.
17135 (mono_message_invoke): new arch. independent impl.
17136 (mono_runtime_class_init): new arch. independent impl.
17137 (mono_runtime_object_init): new arch. independent impl.
17139 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17141 * metadata.c, object.c, reflection.c: documented the exported
17144 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17146 * icall.c: simpler code to pass the assembly builder data to corlib.
17147 Implement GetNestedTypes() internalcall.
17149 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17151 * class.c: warn if a type can't be loaded.
17153 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
17155 * image.h: typedef MonoImageOpenStatus
17156 * types.h: removed unused file
17158 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
17160 * icall.c: Enum_ToObject accepts enum value arguments.
17162 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17164 * class.c: move initialization of properties, events and nested
17165 classes, so that they happen for interfaces, too.
17167 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17169 * icall.c: cleanup some ugly casts in Array_SetValue*.
17171 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17173 * icall.c: the values array fro enums is of the correct type, now.
17174 Implement (correctly) getFullName instead of assQualifiedName for
17176 * reflection.h, reflection.c: added mono_type_get_name ().
17178 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17180 * assembly.c, image.h: for each MonoImage, record from wich assembly
17182 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
17183 Make Type.Assembly work.
17185 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
17187 * debug-symfile.h: use char* instead of gpointer to avoid
17190 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
17192 * icall.c (ves_icall_InternalExecute): impl. FielSetter
17193 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
17195 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
17197 * icall.c (mono_message_init): impl. (code cleanup)
17198 (ves_icall_InternalExecute): impl. FieldGetter
17200 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
17201 defined we call all (non-static)methods through the vtable.
17203 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
17205 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
17206 finalizer even though the memory is still referenced (and the chunk of
17207 memory is not freed).
17209 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17211 * assembly.c: fix brokeness.
17213 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
17215 * class.c: kill some warnings. Check explicit interface method
17216 implementation also without considering the namespace.
17217 Load also literal strings in static class data.
17219 2002-03-29 Miguel de Icaza <miguel@ximian.com>
17221 * assembly.c (default_assembly_name_resolver): Kill memory leak.
17222 (default_assembly_name_resolver): Make the resolver take the
17223 "base" directory where the assembly was originally defined, so we
17224 can load DLLs that are in the same directory as the assembly that
17225 is being referenced.
17227 2002-03-28 Dick Porter <dick@ximian.com>
17233 * unicode.c: Warning cleanups
17235 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
17237 * object.h, reflection.h: use the correct type instead of MonoObject.
17239 2002-03-28 Martin Baulig <martin@gnome.org>
17241 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
17242 (mono_debug_update_symbol_file): Initialize classes if necessary.
17244 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17246 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
17247 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
17249 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
17251 * assembly.h: fix function prototype.
17252 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
17253 * mono-endian.h: use const cast.
17255 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
17257 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
17259 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17261 * loader.c: don't assert when a typeref can't be loaded, give
17262 a chance to the runtime to trow an exception instead.
17263 * loader.h: fix warning.
17265 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
17267 * class.c (mono_class_proxy_vtable): added proxy support
17269 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
17271 * icall.c: removed last of PAL calls, added System.Environment
17272 * file-io.h, file-io.c: MonoIO implementation
17273 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
17275 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17277 * appdomain.c: do not use the byte marker in ldstr table lookup.
17278 * debug-helpers.c: allow two ':' to separate class and method name.
17279 * object.c: allocate arrays bounds with the GC, too.
17280 * verify: add a few more checks.
17282 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
17284 * reflection.c: output also literal strings. Allocate parameter data
17285 with GC_malloc() (thanks, Martin, for catching this!).
17287 2002-03-26 Martin Baulig <martin@gnome.org>
17289 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
17290 include the `this' offset in the `param_offsets'.
17292 2002-03-25 Martin Baulig <martin@gnome.org>
17294 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
17295 mono_debug_get_class() function to get the classes. Added new
17296 relocation types for arrays and strings.
17297 (mono_debug_get_class): New static function to search in all
17298 referenced assemblies for a metadata token.
17300 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
17302 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17304 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
17305 hold gc-allocated objects. Make the string heap a stream like the
17306 others. Removed duplicated code when writing stream info.
17307 Added asserts to catch possible buffer overflows. Set the sorted map
17308 for tables that need sorting. Added some documentation.
17310 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
17312 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
17313 for interned strings and vtables.
17315 2002-03-24 Martin Baulig <martin@gnome.org>
17317 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
17318 it in the array since it was created with g_slist_prepend().
17320 2002-03-24 Martin Baulig <martin@gnome.org>
17322 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
17323 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
17324 (mono_debug_method_from_token): Renamed to
17325 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
17326 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
17328 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
17331 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
17333 2002-03-24 Martin Baulig <martin@gnome.org>
17335 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
17336 (mono_debug_method_from_token): New func.
17338 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
17339 New interncall, calls mono_debug_local_type_from_signature().
17340 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
17341 calls mono_debug_method_from_token().
17343 2002-03-23 Martin Baulig <martin@gnome.org>
17345 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
17346 specifies the number of bytes to be converted, not the array size.
17347 Return the number of chars, not the number of bytes.
17348 (ves_icall_iconv_get_chars): The `byteCount' argument
17349 specifies the number of bytes to be converted, not the array size.
17351 2002-03-23 Martin Baulig <martin@gnome.org>
17353 * reflection.h (MonoReflectionSigHelper): New type.
17355 * reflection.c (mono_reflection_sighelper_get_signature_local),
17356 (mono_reflection_sighelper_get_signature_local): New functions.
17358 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
17359 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
17362 2002-03-23 Martin Baulig <martin@gnome.org>
17364 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
17365 is_writeable is set.
17366 (mono_raw_buffer_update): New function to write the modified map
17369 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
17371 * debug-symfile.c (mono_debug_update_symbol_file): Call
17372 mono_raw_buffer_update() when done writing.
17374 2002-03-23 Martin Baulig <martin@gnome.org>
17376 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
17378 * debug-symfile.c: Added support for arguments and local variables.
17380 2002-03-23 Dick Porter <dick@ximian.com>
17382 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
17383 protected by ifdefs, hence breaking the w32 build.
17385 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17387 * object.c: implement is_interned() the right way.
17389 2002-03-21 Martin Baulig <martin@gnome.org>
17391 * debug-symfile.[ch]: New files to handle debugging information
17392 files. There's also support to dynamically update these symbol
17393 files to include machine dependent information.
17395 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
17397 * threads.c (mono_thread_create): new function to create thread
17400 2002-03-20 Martin Baulig <martin@gnome.org>
17402 * icall.c (ves_icall_InternalInvoke): Create a new object if the
17403 method is a constructor.
17404 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
17405 points to ves_icall_InternalInvoke().
17407 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
17409 * file-io.c: Flush shouldn't throw exceptions.
17411 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
17413 * file-io.c: FileStream flush support; FileSetLength now
17414 restores file pointer.
17416 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17418 * class.c: set image for pointer classes.
17420 2002/03/19 Nick Drochak <ndrochak@gol.com>
17422 * sysmath.c: Forgot one.
17424 2002-03-18 Miguel de Icaza <miguel@ximian.com>
17426 * sysmath.c: Avoid redefining existing names.
17428 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
17430 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
17431 handled by runtime as icall rather than dllimport from libm.so
17432 * file-io.c, file-io.h: fixed handle argument type.
17434 2002-03-18 Dick Porter <dick@ximian.com>
17436 * reflection.c (mono_image_get_type_info): rename interface to
17437 iface, because of "#define interface struct" on windows.
17439 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
17441 * class.c, class.h: rename and export mono_ptr_class_get().
17442 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
17443 * reflection.c, reflection.h, icall.c: better/saner type name
17444 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
17447 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
17449 * class.c (mono_class_init): removed hardcoded GHC_SLOT
17451 * icall.c (ves_icall_InternalInvoke): impl.
17453 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17455 * reflection.c: output the interface map table, too.
17457 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
17459 * class.c (class_compute_field_layout): separate computation of
17460 static field layout
17462 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
17464 * icall.c: added System.Buffer support.
17465 * file-io.c: moved file icalls from PAL to FileStream.
17467 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
17469 * icall.c (ves_icall_System_Object_GetHashCode): impl.
17471 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
17473 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
17475 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17477 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
17479 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
17481 * debug-helpers.{c,h}: moved here from monograph some useful functions
17482 to locate a method by name/signature in a class or image. Included
17483 also a small and flexible IL disassembler.
17485 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17487 * reflection.c: fixup tokens in methods with small header size, too.
17489 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
17491 * object.c (mono_string_to_utf8): remove assert(!error), instead
17494 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
17496 * icall.c: update to the new mono_Array_class_get interface.
17498 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
17500 * appdomain.c, object.c: Boehm-GC enable.
17501 * icall.c: make get_data_chunk() support split data requests.
17502 Ensure a class is initialized in more cases. Return only the first
17503 property found in GetProperties() or the compiler gets confused.
17504 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
17505 * reflection.h, reflection.c: add fixup mechanism for field and method
17506 tokens. Initialize assembly->typeref in a single place. Output
17507 properties after events. Support custom attributes for events, too.
17508 Typo fix for paramter custom attrs.
17510 2002-03-07 Martin Baulig <martin@gnome.org>
17512 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
17514 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
17516 * class.c (mono_array_class_get): fix. for multi. dim. arrays
17518 2002-03-06 Martin Baulig <martin@gnome.org>
17520 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
17521 non-zero lower bounds. See testcases #F10-#F13.
17523 2002-03-05 Martin Baulig <martin@gnome.org>
17525 * exception.c (mono_get_exception_argument_out_of_range): New exception.
17527 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
17528 ves_icall_System_Array_GetValue(), only calculate the absolute array position
17530 (ves_icall_System_Array_SetValue): Likewise.
17531 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
17532 as argument and does the actual work. This function is used when copying a
17533 multi-dimensional array.
17534 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
17535 now do all the widening conversions of value types.
17536 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
17538 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17540 * class.c: remove some magic numbers and use the smbolic names,
17541 instead. Added init_events() to load event info at class init time.
17542 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
17543 and mono_metadata_methods_from_event().
17544 * reflection.h, reflection.c: added support for writing out the evnets
17545 related information.
17547 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17549 * reflection.h, icall.c: use a different method (GetInterfaces)
17550 to gather interface info and add isbyref, isprimitive and
17551 ispointer to the ves_icall_get_type_info() return value.
17553 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
17555 * class.h: stared adding support for events.
17556 * icall.c: split find_members implementation. Added debug icall to get
17557 the address of an object.
17558 * reflection.c: handle TypeBuilders in mono_type_get_object().
17560 2002-03-01 Martin Baulig <martin@gnome.org>
17562 * icall.c (ves_icall_System_Array_GetLength): This must throw an
17563 ArgumentOutOfRangeException(), not an ArgumentException().
17564 (ves_icall_System_Array_GetLowerBound): Likewise.
17565 (ves_icall_System_Array_GetValue): Improved argument checking.
17566 (ves_icall_System_Array_SetValue): Improved argument checking.
17568 2002-03-01 Martin Baulig <martin@gnome.org>
17570 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
17571 called with invalid arguments rather than just dying with g_assert().
17572 (ves_icall_System_Array_SetValue): Likewise.
17573 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
17574 raise a NotImplementedException instead.
17575 (ves_icall_System_Array_GetLength): Added argument checking.
17576 (ves_icall_System_Array_GetLowerBound): Added argument checking.
17578 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
17580 * object.h (mono_assert): new macros mono_assert and
17581 mono_assert_not_reached
17583 2002-02-28 Martin Baulig <martin@gnome.org>
17585 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
17586 and "System::String::IsInterned" to "System::String::_IsInterned".
17588 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
17590 * icall.c: remove hacks for typebuilder. Added icall to create a
17591 modified type from a tybebuilder.
17592 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
17593 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
17594 to create a backing MonoClass for a TypeBuilder.
17596 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17598 * class.c, class.h: more refactoring of class init.
17599 Export mono_class_setup_mono_type() and mono_class_setup_parent().
17601 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
17603 * marshal.c, marshal.h: start of marshaling interface.
17605 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
17607 * icall.c: fix order in assembly qualified name icall.
17609 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
17611 * class.c: do not free str, since we store it in the hash table.
17612 * reflection.h: add label field to MonoILExceptionInfo.
17613 * reflection.c: handle references to more than one assembly. Handle
17614 case when there isn't a module created in the assembly.
17616 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17618 * class.c: Fix typo. Start refactoring of class init code.
17620 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17622 * appdomain.c: exit with 1 on error.
17623 * class.c: we already have the name in MonoClassField.
17624 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
17625 MonoStreamHeader instead of an offset of image->raw_metadata.
17627 2002-02-26 Miguel de Icaza <miguel@ximian.com>
17629 * appdomain.c (mono_init): Be even more descriptive about the error.
17631 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
17633 * appdomain.c: give the user an informative message when corlib can't
17636 2002-02-26 Martin Baulig <martin@gnome.org>
17638 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17639 New icall to get the time zone data.
17641 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17643 * reflection.c: set virtual and raw size of section correctly.
17644 * threads.c: transfer domain information to newly created threads.
17646 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
17648 * class.c: when instancing a class in a domain, load the default
17649 vaules for static fields from the constant table. Fix System.Enum to
17651 * icall.c: implement Object::GetType() internalcall. Implemented
17652 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
17653 Fixed checking of binding flags in find_members().
17654 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
17655 * reflection.c: handle enumerations when writing to the constant
17656 table. Use a different object cache for types.
17659 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
17661 * object.c (mono_object_isinst): fix for arrays
17663 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
17665 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
17667 * object.c: don't use mprotect () and fix intern pool hash table
17668 lookup for big endian systems.
17670 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17672 * icall.c: change type_is_subtype_of () signature.
17674 2002-02-21 Mark Crichton <crichton@gimp.org>
17676 * rand.c, rand.h: Added random number generator for
17677 System.Security.Cryptography classes.
17679 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
17681 * icall.c: Added System.Security.Cryptography calls.
17683 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
17685 * class.c, icall.c, metadata.c: better support for pointer types.
17686 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
17687 * reflection.c: Add support for getting custom attrs for properties
17688 and simplify some code.
17690 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17692 * icall.c: change getToken () and add custom attribute GetBlob()helper
17694 * reflection.h: add custom attrs array to the reflection builder structures.
17695 * reflection.c: encode and emit custom attributes for all the relevant
17696 reflection objects. Cache fieldref and methodref tokens. Change
17697 mono_image_create_token() interface to take a MonoDynamicAssembly.
17698 More complete custom attributes decoder. Load custom attributes for
17699 Assembly, Field, Method and Constructor objects, too. Make the
17700 returned array an Attribute[] one, not object[]. Added
17701 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
17702 custom attribute constructor.
17704 2002-02-20 Dick Porter <dick@ximian.com>
17708 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
17709 problem code out for now).
17711 2002-02-19 Radek Doulik <rodo@ximian.com>
17713 * object.c (mono_ldstr): use hash table to avoid multiple swapping
17715 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
17717 * icall.c: register the GetCustomAttributes method.
17718 * object.c, object.h: add mono_string_new_len ().
17719 * reflection.h, reflection.c: added mono_runtime_invoke(),
17720 mono_install_runtime_invoke(). Added
17721 mono_reflection_get_custom_attrs () to load custom attributes and
17722 create the attribute objects.
17724 2002-02-19 Dick Porter <dick@ximian.com>
17725 * threads-dummy-types.c:
17726 * threads-dummy-types.h:
17729 * threads-pthread-types.c:
17730 * threads-pthread-types.h:
17731 * threads-pthread.c:
17732 * threads-pthread.h: Deleted obsolete files
17734 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
17736 * class.c (mono_class_vtable): runtime init the class when we
17737 allocate static class data.
17739 * icall.c (ves_icall_System_Array_SetValue): check for null values.
17741 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
17742 and String - but we will need generic marshalling support in the
17744 (mono_init): set the domain name in a ms compatible way
17746 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
17749 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
17751 * object.c (mono_array_clone): use alloca() instead of g_malloc
17754 * appdomain.c (mono_domain_unload): impl.
17756 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17758 * appdomain.c, object.c: fix intern pool implementation.
17759 * class.c: fix alignment code.
17761 2002-02-16 Radek Doulik <rodo@ximian.com>
17763 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
17764 and s2 > s1, just copy lower bytes to be compatible with little
17765 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
17766 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
17768 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
17769 force big_endian to be 1 for big endian machines
17770 (ves_icall_iconv_new_decoder): ditto
17772 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
17774 * socket-io.c (convert_sockopt_level_and_name): If the system
17775 doesn't define SOL_IP or SOL_TCP, get them by hand using
17776 getprotobyname() and caching the values (because this could be a
17778 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
17779 Use the appropriate struct when the system does support it. Ie,
17780 not all systems have struct ip_mreqn so use struct ip_mreq when
17783 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
17785 * reflection.c: handle finally clauses.
17787 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
17789 * socket-io.c: use g_snprintf() instead of snprintf.
17791 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
17793 * reflection.c (mono_param_get_objects): Cast second argument to
17794 mono_method_get_param_names to a const char** to silence the
17797 * appdomain.c (mono_domain_assembly_open): Put parens around the
17798 truth statement in the for-loop.
17800 * unicode.c (iconv_convert): Got rid of a compiler warning about
17801 int i being unused when the system has a new iconv.
17802 (iconv_get_length): Same.
17804 * image.c (load_class_names): Cast the second argument to
17805 g_hash_table_insert() to char* to hush compiler warnings about the
17807 (mono_image_open): Same here.
17809 * socket-io.c: Don't conditionally include sys/filio.h or
17810 sys/sockio.h here anymore since we now get them from
17811 io-layer/io-layer.h
17812 (inet_pton): If the system doesn't support inet_aton, implement
17813 using inet_addr and also #define INADDR_NONE if it isn't defined
17816 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
17818 * metadata.c, metadata.h: added function to get packing and size info
17820 * reflection.h, reflection.c: handle field RVA data. Save info about
17821 the table layout if needed. Assign typedef indexes to all the types
17822 before dumping the info about them to avoid forward reference problems.
17824 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
17826 * socket-io.c (convert_sockopt_level_and_name): ifdef
17827 SO_ACCEPTCONN because it is not defined on my system (old debian)
17829 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17831 * opcode.c: use stddef.h to get NULL.
17833 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
17835 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
17836 for FIONBIO, FIONREAD and SIOCATMARK.
17837 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
17838 define INADDR_NONE and besides, inet_addr() is deprecated and
17839 should not be used. Use inet_pton() instead - it also has the
17840 added bonus that it can easily handle IPv6 addresses as well.
17841 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
17843 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17845 * decimal.c: remove _MSC_VER conditional.
17847 2002-02-13 Dick Porter <dick@ximian.com>
17850 * icall.c: Internal calls for Blocking, Select, Shutdown,
17851 GetSocketOption and SetSocketOption
17853 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17855 * assembly.cs: better resolver: use it instead of some kludgy
17858 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
17860 * reflection.c: the best way to speed-up the compiler is to avoid
17863 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
17865 * class.c (mono_class_vtable): changed the object layout
17866 (obj->vtable->class).
17867 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
17869 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17871 * assembly.c: look for assemblies in the assembly dir, too.
17873 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17875 * class.c: fix thinko in mono_class_from_type().
17877 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17879 * exception.h, exception.c: added TypeLoadException.
17880 * object.h, object.c: added mono_array_clone ().
17881 * icall.c: handle throwOnError in AssemblyGetType().
17882 Added Array.Clone().
17883 * opcode.h, opcode.c: use a single value for the opcode val.
17884 Compile fix for non-gcc compilers.
17886 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
17888 * opcodes.c, opcodes.h: export interesting info about opcodes.
17890 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
17892 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
17895 * class.c (class_compute_field_layout): set element_class for enums
17896 (mono_class_create_from_typedef): set element_class for normal classes
17898 * icall.c (ves_icall_System_Enum_get_value): impl.
17900 * class.c (mono_class_create_from_typedef): do not set valuetype
17901 flag for System.ValueType and System.Enum
17903 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
17905 * unicode.c (iconv_convert): fix big endian problem.
17907 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17909 * class.c: add asserts if we are ever going to scribble over memory.
17910 * socket-io.c: not all systems have AF_IRDA defined.
17912 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
17914 * class.c (class_compute_field_layout): do not consider static
17915 fields to compute alignment
17917 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
17919 * appdomain.c (mono_appdomain_get): impl.
17920 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
17922 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
17924 * icall.c: ignore "file://" prefix when loading an assembly.
17926 2002-01-23 Dick Porter <dick@ximian.com>
17930 * Makefile.am: Added socket support
17932 2002-01-23 Miguel de Icaza <miguel@ximian.com>
17934 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
17935 code back. This should return the assemblies that are loaded by
17936 the runtime on behalf of an application domain.
17938 The current implementation is still broken, it just returns every
17939 assembly loaded, but until we get real applications domain this
17942 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
17944 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
17947 2002-01-23 Miguel de Icaza <miguel@ximian.com>
17949 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
17950 the mono_class_from_name lookup.
17951 (ves_icall_get_parameter_info): ditto.
17952 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
17954 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
17956 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
17958 * class.c: load also nested classes on class init.
17959 System.ValueType instance methods gets passed boxed
17960 values, unless methods in derived classed that get a pointer to the
17962 * icall.c: use better name parsing code in GetType().
17963 * image.c, image.h: add mono_image_loaded ().
17964 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
17965 * reflection.c, reflection.h: added mono_reflection_parse_type().
17967 2002-01-22 Veronica De Santis <veron78@interfree.it>
17969 * icall.c : Added mapping of internal calls for Manual and Auto reset events
17970 * threads.c : Added the implementation of internal calls for events
17971 * threads.h : Added prototypes of internal calls for events
17973 2002-01-21 Radek Doulik <rodo@ximian.com>
17975 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
17977 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
17979 * class.c (mono_class_init): set min_align to 1 (instead of 0)
17980 (mono_class_value_size): use min_align
17982 2002-01-20 Dick Porter <dick@ximian.com>
17985 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
17986 so it compiles on w32.
17988 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
17990 * metadata.c (mono_type_stack_size): impl.
17992 * class.c (mono_class_get_field): impl. memberref token
17994 2002-01-16 Veronica De Santis <veron78@@interfree.it>
17996 * icall.h : Added the internal calls mapping for CreateMutex_internal
17997 and ReleaseMutex_internal.
17998 * threads.h : Added the prototype of mutexes internal calls.
17999 * threads.c : Added the implementations of mutexes internal calls.
18001 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18003 * metaparse.h: removed unused file.
18004 * reflection.c, reflection.h: added stream_data_align () function
18005 to align data in streams and keep stream aligned. Add support for
18006 exception support in method headers.
18008 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
18010 * unicode.c: make iconv_convert () return the number of bytess written
18011 in the output buffer.
18013 2002-01-15 Dick Porter <dick@ximian.com>
18014 * threads.c: Make the runtime's idea of infinite timeouts coincide
18015 with the class library's
18017 Fix a particularly egregious bug in mono_thread_cleanup(). That
18018 code was so utterly bogus it must have been written on a Monday.
18020 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18022 * reflection.h: add subtypes field to TypeBuilder.
18023 * reflection.c: encode constants for literal fields.
18024 Handle subtypes. Fix user string token (and add a zero byte)
18027 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
18029 * class.c (mono_class_init): bug fix: assign slot numbers for
18032 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18034 * reflection.c: don't try to output a code RVA for abstract methods.
18035 Small fixes for method header format. Output parameter info to the
18036 ParamDef table. Save method overriding info to MethodImpl table.
18037 Fix property support. Allow typedef.extends to be a type in the
18039 * verify.c: fix off-by-one error.
18041 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
18043 * class.c: fix mono_class_from_mono_type () for szarray types.
18044 Remove unused cache check in mono_class_from_type_spec().
18045 * icall.c: *type_from_name () functions handle simple arrays and byref.
18046 * reflection.c: handle byref and szarray types. Handle methods without
18047 body (gets P/Invoke compilation working). Handle types and fields in
18049 * reflection.h: add rank to MonoTypeInfo.
18051 2002-01-10 Dick Porter <dick@ximian.com>
18053 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
18056 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18058 * icall.c: initialize class in type_from_handle ().
18059 Loop also in parent classes for get_method ().
18060 * reflection.c: properly encode class and valuetype types.
18061 Start on encoding TypeBuilder types. Handle fieldrefs.
18062 Use correct length when registering a user string.
18063 Handle ConstructorBuilder and MonoMethod in get_token ().
18064 Make mono_type_get_object () aware of cached types.
18065 * object.c: back out change to mono_string_new ().
18067 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
18068 * object.c: mono_string_new should return a NULL when the string
18069 passed in is NULL -- not try to deference it.
18071 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18073 * icall.c: hack to make IsSubType work for TypeBuilders.
18074 * reflection.c: emit constructors before methods.
18075 Retrieve param names in mono_param_get_objects().
18077 2002/01/05 Nick Drochak <ndrochak@gol.com>
18079 * Makefile.am: fix list of headers and sources so automake 1.5
18080 doesn't complain. Removed \# at end of list.
18082 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18084 * reflection.c: get token for a method ref. Set return type of
18085 constructor to void.
18086 * loader.c: debug message.
18087 * class.c: typo fix.
18089 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
18091 * icall.c: fix array init with rank > 1. FindMembers
18092 loops in parent class as well.
18093 * image.c: do not insert nested types in name cache.
18094 * reflection.c: warning fix.
18095 * reflection.h: add override method (for interface impl).
18097 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
18099 * metadata.c: fix customattr decoding.
18101 2001-12-21 Miguel de Icaza <miguel@ximian.com>
18103 * rawbuffer.cs: Added native Win32 implementation, avoids using
18104 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
18106 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
18108 * class.c: make the low-level routines handle the cache.
18110 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
18112 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
18114 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
18116 * class.c: fix mono_array_element_size() for objects.
18117 * class.h, class.c: add properties to MonoClass and load them
18119 * icall.c: check with isinst() when assigning a value to an array
18120 instead of requiring the classes to match exactly.
18121 Implemented icall for System.Type::GetType().
18122 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
18123 enums. Handle bindingflags when looking for methods and fields.
18124 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
18125 and mono_metadata_methods_from_property().
18126 * reflection.h, reflection.c: added structures for propreties,
18127 parameters and enums. Implemented mono_property_get_object() and
18128 mono_param_get_objects().
18130 2001-12-18 Dick Porter <dick@ximian.com>
18132 * file-io.c: Use mono_string_to_utf16() instead of
18133 mono_string_chars()
18135 * object.c: Added mono_string_to_utf16(), which copies the non
18136 NULL-terminated MonoString into a new double-null-terminated
18139 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
18141 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
18143 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
18145 * file-io.c: raise exceptions if handle is invalid.
18147 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
18149 * assembly.c: yet another check for mscorlib.
18150 * class.c, class.h: load nesting info for classes.
18151 * icall.c: many new functions to support the Reflection classes.
18152 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
18153 * reflection.h, reflection.c: mono_image_create_token(),
18154 mono_assembly_get_object(), mono_type_get_object(),
18155 mono_method_get_object(), mono_field_get_object(): methods to return
18156 objects that parallel the C representation of assemblies, types,
18159 2001-12-11 Dick Porter <dick@ximian.com>
18162 * file-io.c: Internal calls for file IO.
18164 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
18166 * tabledefs.h: missing FileAttributes.
18167 * verify.h, verify.c: use is_valid_string () to simplify and check for
18168 valid strings more correctly. Fix warnings and speeling.
18169 Check more tables: Filed, File, ModuleRef, StandAloneSig.
18170 Check code: branches, maxstack, method calls.
18172 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
18174 * object.c (mono_object_allocate): removed static, so that the jit
18175 can allocate value types.
18177 * icall.c (ves_icall_System_DateTime_GetNow): impl.
18179 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18181 * class.c: init enum types right away and register the
18182 token->MonoClass map in mono_class_create_from_typedef ().
18183 * verify.h, verify.c: first cut of the verifier.
18184 * pedump.c: add --verify switch to verify metadata tables.
18185 * tabledefs.h: add some missing enums.
18187 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
18189 * class.c (mono_install_runtime_class_init): impl.
18190 (mono_class_init): renamed mono_class_metadata_init to
18191 mono_class_init, also removed the metadata_inited flag
18193 * object.c (mono_object_isinst): use faster algorithm
18195 2001-11-30 Radek Doulik <rodo@ximian.com>
18197 * mono-endian.h: reverted last change
18198 added function prototypes
18200 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
18201 add mono-endian.c back
18203 * mono-endian.c: returned back, as Paolo pointed out, it's needed
18204 for unaligned access, I've mistaked it with endianess. I am
18206 (mono_read16): fix reverted endianess
18207 (mono_read64): ditto
18208 (mono_read32): ditto
18210 2001-11-30 Dick Porter <dick@ximian.com>
18212 * exception.c: Implement mono_exception_from_name()
18214 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18216 * metadata.h, metadata.c: remove params_size and locals_size and their
18217 calculation from the metadata code: they are only usefult to the
18220 2001-11-29 Radek Doulik <rodo@ximian.com>
18222 * object.c (mono_ldstr): swap bytes here, it's probably not the
18223 best place, but works for me now, I'll redo it once I know mono
18224 better, also note that I add PROT_WRITE and don't reset back, also
18225 note that it's only affects big endians, so x86 should be OK
18227 * mono-endian.h (read16): use just glib macros for both endians
18229 * mono-endian.c: removed as glib macros are used in in
18230 mono-endian.h so we don't need to care about endianess for read
18231 macros as glib does that for us already
18233 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
18235 * class.h, class.h: take minimum alignment into consideration so
18236 that the fields of a class remain aligned also when in an array.
18238 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18240 * loader.h, loader.c: add mono_method_get_param_names().
18241 * class.c: 0-init class fields.
18243 2001-11-26 Dick Porter <dick@ximian.com>
18247 * threads.c: New file that handles System.Threading on all platforms
18250 * object.h: Remove the synchronisation struct from MonoObject,
18251 replace it with a pointer that gets initialised on demand
18253 * Makefile.am: Replace all the system-specific threading code with
18254 a single file that uses the new wrapper library
18256 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
18258 * class.c, class.h: add mono_install_trampoline() so that the runtime
18259 can register a function to create a trampoline: removes the ugly
18260 requirement that a runtime needed to export arch_create_jit_trampoline.
18261 * object.h, object.c: added mono_install_handler() so that the runtime
18262 can install an handler for exceptions generated in C code (with
18263 mono_raise_exception()). Added C struct for System.Delegate.
18264 * pedump.c: removed arch_create_jit_trampoline.
18265 * reflection.c: some cleanups to allow registering user strings and
18266 later getting a token for methodrefs and fieldrefs before the assembly
18268 * row-indexes.h: updates and fixes from the new ECMA specs.
18270 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
18272 * class.h, class.c: add enum_basetype field to MonoClass.
18273 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
18274 to get index in the constant table reated to a field, param or
18276 * reflection.h, reflection.c: handle constructors. Set public-key and
18277 version number of the built assembly to 0.
18278 * row-indexes.h: update from new ECMA spec.
18280 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18282 * class.h, class.c: add a max_interface_id to MonoClass.
18283 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
18284 since it's used to do that. Added mono_type_type_from_obj().
18285 Make GetType() return NULL instead of segfaulting if the type was not
18286 found. Handle simple arrays in assQualifiedName.
18287 * object.h: add a struct to represent an Exception.
18288 * reflection.c: output call convention in method signature.
18289 Add code to support P/Invoke methods and fixed offsets for fields.
18291 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
18293 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
18295 * icall.c: use mono_array_addr instead of array->vector: fixes the
18296 reflection image writing.
18297 * reflection.c: init call convention byte to 0 in method signature.
18298 Encode the property signature. Don't output property-related methods
18299 twice. Really process the properties for a type (don't cast a field to
18300 a property, my mom always told me that).
18301 Fix 64 bit issues in pointer alignment in a different and more
18304 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
18306 * loader.h: Removed type class from MonoDefaults, added monotype
18308 * loader.c: Loaded MonoType, removed loading of Type
18310 * icall.c (my_mono_new_object): Now returns a System.MonoType,
18311 and fills in System.Type._impl with a RuntimeTypeHandle rather
18312 than the actual MonoClass *
18314 (ves_icall_type_from_handle): change from type_class to
18317 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
18320 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
18323 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
18325 (ves_icall_System_Reflection_Assembly_GetType): implemented
18327 (ves_icall_System_MonoType_assQualifiedName): implemented
18329 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
18331 2001-11-09 Miguel de Icaza <miguel@ximian.com>
18333 * assembly.c (mono_assembly_open): Implement a cache for the
18336 (mono_assembly_close): only destroy the assembly when the last
18339 2001-11-09 Dick Porter <dick@ximian.com>
18341 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
18343 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
18345 * class.c (mono_class_metadata_init): bug fix: compute the right slot
18347 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18349 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
18350 from Martin Weindel.
18351 * object.h: add mono_string_chars ().
18353 2001-11-07 Miguel de Icaza <miguel@ximian.com>
18355 * reflection.c (build_compressed_metadata): Eliminates warnings
18356 and uses 64-bit clean code.
18358 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
18359 (mono_type_equal): Change signature to eliminate warnings.
18361 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18363 * icall.c, loader.c: remove the internalcall array constructors.
18364 Changes to match the new MonoArray structure.
18365 * object.h, object.c: an array object doesn't allocate an extra
18366 vector. Add mono_array_new_full () to create jagged arrays easily.
18368 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18370 * metadata.h, metadata.c: add mono_metadata_field_info () to
18371 retreive all the info about a field from vairous tables.
18372 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
18373 * class.h, class.c: augment MonoClassField with more info.
18374 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
18375 policy and load a field's RVA if needed.
18377 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
18379 * class.c (mono_class_metadata_init): create a trampoline for all
18380 virtual functions instead of actually compiling them.
18382 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
18384 * class.h, class.c: include name in MonoClassField.
18385 * class.c: fix fundamental type of System.Object and System.String.
18386 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
18388 * icall.c: remove internalcalls for the Reflection stuff that is now
18390 * loader.c: mono_field_from_memberref () implementation.
18391 * mono-endian.c: thinko (s/struct/union/g).
18392 * object.c, object.h: make the mono_string_* prototypes actually use
18393 MonoString instead of MonoObject.
18394 * reflection.c, reflection.h: updates for changes in the reflection
18395 code in corlib: we use C structures that map to the actual C# classes.
18396 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
18397 fat method header if needed and use the info from the ILGenerator for
18398 methods. Handle fields in types. Misc fixes.
18400 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
18402 * class.c (mono_class_metadata_init): bug fix: always allocate
18403 space for static class data
18405 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
18407 * class.c (mono_compute_relative_numbering): use relative
18408 numbering to support fast runtime type checks.
18410 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
18412 * class.c (mono_class_create_from_typeref): added debugging output
18413 to print class name when MonoDummy is returned instead of real class
18415 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
18417 * class.c (mono_class_metadata_init): interface offset table now
18418 contains pointers into the vtable - this is more efficient for the jit
18420 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
18422 * class.c (mono_class_metadata_init): use a temporary vtable (the
18423 old algorithm only worked for the interpreter, but not for the jit)
18425 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
18427 * loader.c (method_from_memberref): use mono_class_get to get the
18428 class of an array instead of using System.Array directly.
18429 (mono_get_method): also add MEMBERREF methods to the method cache
18430 which usefull for arrays.
18432 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
18434 * pedump.c (arch_compile_method): added to compute vtable entry
18436 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
18437 number of interfaces.
18439 * class.h: merged MonoArrayClass into MonoClass
18441 * class.c (mono_class_create_from_typedef): compute the vtable size and
18442 allocate space to include the vtable inside MonoClass
18443 (mono_class_metadata_init): initialize the vtable
18445 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
18447 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
18448 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
18449 * image.c: endian fixes by Laurent Rioux.
18450 * object.h, object.c: rename MonoStringObject to MonoString and
18451 MonoArrayObject to MonoArray. Change some function names to conform to
18452 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
18453 guint16* as first argument, so don't use char*.
18454 Provide macros to do the interesting things on arrays in a portable way.
18455 * threads-pthread.c: updates for the API changes and #include <sched.h>
18456 (required for sched_yield()).
18457 * icall.c: updates for the API changes above.
18458 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
18459 platforms that need them.
18461 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18463 * class.c: set the correct type for all the fundamental
18464 type when loading the class.
18466 2001-10-05 Dick Porter <dick@ximian.com>
18468 * threads-pthread.c (pthread_mutex_timedlock): Simple
18469 compatibility version for C libraries that lack this call.
18471 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18473 * class.c: MonoTypes stored in MonoClass are stored as
18474 fundamental MonoTypes when the class represents a
18475 fundamental type (System.Int32, ...).
18476 The TypeHandle return by ldtoken is a MonoType*.
18477 * icall.c: ves_icall_get_data_chunk () write out all the
18478 PE/COFF stuff. Implement ves_icall_define_method (),
18479 ves_icall_set_method_body (), ves_icall_type_from_handle ().
18480 * image.c: properly skip unknown streams.
18481 * loader.h, loader.c: add type_class to mono_defaults.
18482 * metadata.c, metadata.h: export compute_size () as
18483 mono_metadata_compute_size () with a better interface.
18484 Typo and C&P fixes.
18485 * pedump.c: don't try to print the entry point RVA if there is no entry point.
18486 * reflection.c, reflection.h: many cleanups, fixes, output method
18487 signatures and headers, typedef and typeref info, compress the metadata
18488 tables, output all the heap streams, cli header etc.
18489 * row-indexes.h: typo fixes.
18491 2001-10-04 Dick Porter <dick@ximian.com>
18493 * object.h: Add a synchronisation mutex struct to MonoObject
18495 * object.c (mono_new_object): Initialise the object
18496 synchronisation mutexes
18498 * icall.c: System.Threading.Monitor internal calls
18500 * threads-pthread.h:
18501 * threads-pthread.c: System.Threading.Monitor internal calls
18503 * threads-types.h: New file, includes the system-specific thread
18506 * threads-pthread-types.h:
18507 * threads-pthread-types.c: New files, handle pthread-specific
18508 synchronisation types
18510 * threads-dummy-types.h:
18511 * threads-dummy-types.c: New files of dummy support for
18512 thread-specific types
18516 * pedump.c: include mono-endian.h not endian.h
18518 * Makefile.am: More threads files.
18519 Name mono-endian.h not endian.h
18521 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
18523 * Makefile.am, reflection.h, reflection.c: move here the reflection related
18524 stuff and implement a few more bits.
18525 * icall.c: a field needs to be dereferenced twice. Do not use the same
18526 name for two variables in the same scope.
18527 * image.c, image.h: cleanups.
18529 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
18531 * class.c (mono_class_metadata_init): bug fix: compute the right size
18533 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
18535 * icall.c: implemented some of the Reflection internalcalls.
18536 * image.c, image.h: start writing out the PE/COFF image.
18537 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
18538 that does the reverse than decode_blob_size ().
18539 * object.c: use mono_metadata_encode_value (). Move here
18540 temporary implementation of mono_string_to_utf8 ().
18541 * rawbuffer.c: make malloc_map static.
18543 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18545 * metadata.c: fix type comparison for arrays.
18546 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
18547 Added a couple of new classes to monodefaults.
18548 * icall.c: added a couple of Reflection-related internalcalls.
18549 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
18550 Added a byval_arg MonoType to MonoClass.
18552 2001-09-28 Dick Porter <dick@ximian.com>
18555 * threads-pthread.h:
18556 * threads-pthread.c: Implemented internal calls for
18557 LocalDataStoreSlot operations. Applied mutexes around all shared
18558 data. Reworked the thread creation and Start() operations to
18559 avoid a race condition.
18562 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
18564 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
18566 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
18568 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
18570 * class.c, loader.c: warn and return NULL instead of erroring out.
18571 * icall.c: added System.AppDomain::getCurDomain().
18572 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
18574 2001-09-25 Dick Porter <dick@ximian.com>
18576 * threads-pthread.h:
18577 * threads-pthread.c: Implemented timed thread joining and added
18578 System.Threading.Thread::Join_internal internal call
18580 * icall.c: Added System.Threading.Thread::Join_internal internal call
18583 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
18585 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
18587 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
18588 mono_string_intern () to implement the semantics of the ldstr opcode
18589 and the interning of System.Strings.
18590 * icall.c: provide hooks to make String::IsIntern and String::Intern
18593 2001-09-23 Dick Porter <dick@ximian.com>
18596 * threads-dummy.h: New files of dummy threading routines
18598 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
18599 support code based on system specifics
18601 Rename PTHREAD_LIBS to THREAD_LIBS
18603 2001-09-23 Dick Porter <dick@ximian.com>
18605 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
18606 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
18608 (mono_thread_init): Set up a Thread object instance to return when
18609 the main thread calls Thread.CurrentThread
18610 (mono_thread_cleanup): Wait for all subthreads to exit
18612 * icall.c: New internal calls for System.Threading.Thread::Sleep
18613 (including Schedule) and CurrentThread
18615 * threads.h: New file, to insulate thread-specific stuff from the
18618 2001-09-21 Dick Porter <dick@ximian.com>
18620 * threads-pthread.h:
18621 * threads-pthread.c: New file, for handling pthreads-style
18622 threading support. Start() now starts a new thread and executes
18623 the ThreadStart delegate instance.
18625 * icall.c: Added the internalcall for
18626 System.Threading.Thread::Start_internal
18628 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
18630 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
18632 * loader.c: work around the different signatures for delegates
18633 constructors csc generates in compiled code vs the ones compiled in mscorlib.
18635 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18637 * class.h, class.c: add mono_class_get_field_from_name ().
18638 * *: Fix C comments and other ANSI C issues.
18640 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
18642 * endian.h, assembly.c: fix some endianness issues.
18644 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
18646 * loader.h, load.c: add delegate_class to mono_defaults.
18647 Handle runtime provided methods in mono_get_method ().
18649 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
18651 * loader.c (mono_get_method): use pinvoke for internal call
18653 * icall.c: use pinvoke for internal call
18655 * loader.c (method_from_memberref): set the method name
18657 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
18659 * metadata.c: help the compiler generate better code for
18660 mono_class_from_mono_type ().
18662 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
18664 * class.c (mono_class_metadata_init): delayed computing of the
18665 class size to mono_class_metadata_init ()
18667 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
18669 * class.c, class.h: add an interfaces member to MonoClass.
18670 * image.c, image.h: add assembly_name field to MonoImage
18671 from the assembly table.
18672 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
18674 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18676 * class.c: Handle Array in mono_class_from_mono_type ().
18677 * metadata.c, pedump.c: some endian fixes.
18679 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18681 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
18682 * metadata.c: fix small problem introduced with the latest commit.
18684 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
18686 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
18687 We don't need a MonoMetadata pointer anymore to compare signatures in
18688 mono_metadata_signature_equal (), update callers.
18689 Reduced memory usage an number of allocations for MonoMethodHeader and
18690 MonoMethodSignature.
18692 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
18694 * metadata.c: added compare for szarray.
18696 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
18698 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
18699 and add a couple more types to it and mono_defaults. Give an hint on
18700 classes that need implementing in our corlib and are referenced
18703 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
18705 * class.h, class.c: keep track if a class is also an Enum.
18706 * loader.c: Implement a couple more types for use in libffi
18707 marshalling. Gives better diagnostics when failing to dlopen
18708 a library. Set method->klass for P/Invoke methods, too.
18710 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
18712 * class.c, class.h: add a MonoType this_arg to MonoClass that
18713 represents a pointer to an object of the class' type that
18714 can be used by the interpreter and later the type cache.
18715 Add best guess alignment info for valuetype objects.
18717 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
18719 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
18720 into MonoType: one less level of indirection and allocation and
18721 simplifies quite a bit of code. Added cache for MonoTypes that are
18722 used frequently, so that we don't need to allocate them all the time.
18724 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
18726 * class.c (mono_class_create_from_typedef): System.Enum is also a
18727 value type, although it does not derive from System.ValueType
18728 (maybe a bug in the ms compiler?)
18730 * metadata.c (mono_type_size): return the right size for value types
18732 * loader.c (mono_get_method): only initialize method header if not abstract
18734 * class.c (mono_class_from_mono_type): use mono_default values.
18736 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
18738 * *: use MonoClass pointers instead of <type_tokens>
18740 * class.h: new flag: metadata_inited.
18742 * class.c (mono_class_metadata_init): impl.
18743 (mono_class_instance_size): impl.
18744 (mono_class_data_size): impl.
18746 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18748 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
18749 MonoClass now has the name and name_space fields.
18750 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
18751 mono_get_method () takes and optional MonoClass as argument.
18752 Removed mono_typedef_from_name() and added mono_class_token_from_name()
18753 instead that takes advantage of a map from class names to typedef
18754 tokens in MonoImage.
18756 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
18758 * metadata.c: zero is not a valid alignment boundary.
18759 Merge MONO_TYPE_VOID in default decoding code.
18761 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
18763 * image.h: merged MonoMetadata into MonoImage
18765 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
18766 identify the type of elements.
18768 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
18770 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
18771 * cil-coff.h: split MonoMSDOSHeader and add size info.
18772 * image.c: add some consistency checks.
18773 * metadata.c: fix row size computation: one programmer
18774 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
18775 add explanation for the locator routine.
18776 Fix decoding of size in method header.
18778 2001-08-20 Miguel de Icaza <miguel@ximian.com>
18780 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
18781 (g_concat_dir_and_file): Bring g_concat_dir_and_file
18782 function from gnome-libs. This uses the right path separator
18783 based on the OS, and also works around a bug in some systems where
18784 a double slash is not allowed.
18785 (default_assembly_name_resolver): Use g_concat_dir_and_file
18786 (mono_assembly_open): ditto.
18788 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
18790 * metadata.c (mono_metadata_signature_equal): impl.
18792 * *: void is now a realy MonoType (instead of using NULL)
18794 * metadata.c (do_mono_metadata_parse_type): use
18795 mono_metadata_parse_type to parse void value.
18797 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
18799 * metadata.c, metadata.h: in the signature and method header store
18800 only the space required for holding the loca vars and incoming arguments.
18802 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
18804 * metadata.c (do_mono_metadata_parse_type): treat void like any
18805 other type (instead of assigning NULL);
18807 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
18809 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
18811 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
18813 * image.c (do_mono_image_open): added a cache for arrays.
18815 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18817 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
18818 decode a single column from a row in a metadata table and changes
18819 to take advantage of it in the typedef locator (gives a nice speed up).
18820 Store offset info for function params.
18822 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
18824 * image.h (MONO_IMAGE_IS_CORLIB): removed
18826 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
18828 * assembly.c: how could mono_assembly_close () had ever worked?
18829 * metadata.c, metadata.h: provide offset info for local vars.
18830 Implement mono_type_size () to take care of alignment as well
18831 as size (it was mono_field_type_size in cli/class.c before).
18833 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
18835 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
18837 * assembly.h (CORLIB_NAME): set to corlib.dll
18839 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
18841 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18843 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
18844 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
18845 tokentype.h: massive namespace cleanup.
18847 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18849 * metadata.h, metadata.c: decode exception clauses when parsing method header.
18851 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
18853 * metadata.c (mono_metadata_free_type): added check for type !=
18854 NULL (void) before calling mono_metadata_free_type()
18856 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
18858 * metadata.h, row_indexes.h: added header with enumerations to use
18859 to index in the columns from tables in metadata and to decode coded
18860 tokens: we should start using this instead of embedding magic numbers
18863 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
18865 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
18866 Move metadata_t info from cli_image_info_t to MonoImage, where
18867 it's easily accessible. Changed all the uses accordingly.
18868 Added the method and class caches to MonoImage.
18869 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
18870 and mono_metadata_decode_value () signature to be more consistent
18871 with the other parse functions (and simplify code). Taken advantage
18872 of zero-length array allocation with GCC. Removed reduntant (and
18873 wrong) MonoFieldType struct and use MonoParam instead. Changed
18874 mono_metadata_parse_field_type () to use common code for parsing.
18875 Added mono_metadata_typedef_from_field () and
18876 mono_metadata_typedef_from_method () to lookup a typedef index from a
18877 field or method token.
18878 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
18880 2001-07-23 Miguel de Icaza <miguel@ximian.com>
18882 * metadata.c (mono_metadata_parse_field_type): Implement.
18883 (do_mono_metadata_parse_type): Split engine from
18884 mono_metadata_parse_type, so that we can create smaller structures
18885 for things that just have one pointer to the MonoType (look at
18888 2001-07-20 Miguel de Icaza <miguel@ximian.com>
18890 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
18891 as Jan Gray found out, it is incorrect.
18893 2001-07-18 Miguel de Icaza <miguel@ximian.com>
18895 * assembly.c: Implement asssembly loading. This loads an image
18896 and loads all the referenced assemblies. Come to think of it, we
18897 could always do lazy loading of the assemblies.
18899 * image.c (mono_image_open): Keep loaded images in a hashtable.
18901 * image.h (MonoImage): Add reference count.
18903 2001-07-17 Miguel de Icaza <miguel@ximian.com>
18905 * assembly.c (mono_assembly_open): Keep track of the file name in
18906 case the assembly has no ASSEMBLY table.
18908 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
18911 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
18913 * metadata.c, metadata.h: decode local vars in method header
18914 parse function. Change callers accordingly.
18916 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
18918 * metadata.h, cil-coff.h: protect against multiple inclusion.
18919 Added some new structures to hold information decoded from metadata:
18920 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
18921 and relevant decoding/free functions.
18922 * metadata.c: implement decoding functions. Add warning for out of bounds
18923 index in mono_metadata_locate(). Implement mono_get_method () to retreive
18924 all the info about a method signature and invocation. Remove check on
18925 uninitialized local var in parse_mh() and fix memory leak.
18927 2001-07-12 Miguel de Icaza <miguel@ximian.com>
18929 * metadata.h: More macros.
18931 * tokentype.h: New file.
18933 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
18935 * assembly.c: added a consistency check and initialize
18936 some structures with g_new0().
18937 * metadata.c: fixed a couple more bugs in table size computation
18938 and add other checks for out-of bound access to metadata.
18940 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
18942 * metatada.c: fix bugs computing table sizes. Spew a
18943 warning when index in string heap is out of bounds.
18945 2001-07-04 Miguel de Icaza <miguel@ximian.com>
18947 * metadata.h: Add a couple of macros to manipulate tokens.
18949 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18951 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
18952 cli_section_tables).
18954 2001-07-01 Miguel de Icaza <miguel@ximian.com>
18956 * metadata.c (mono_metadata_user_string): New function, provides
18957 access to the UserString heap.
18959 2001-06-27 Miguel de Icaza <miguel@ximian.com>
18961 * metadata.c: Add inline documentation.
18963 2001-06-26 Miguel de Icaza <miguel@ximian.com>
18965 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
18968 2001-06-22 Miguel de Icaza <miguel@ximian.com>
18970 * typeattr.h: New file, TypeAttribute flags.
18972 2001-06-21 Miguel de Icaza <miguel@ximian.com>
18974 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
18975 mono_assembly_ensure_section): Section loading code.
18976 (load_section_tables): Load the sections.
18978 * mono/metadata/metadata.c (mono_metadata_locate_token,
18979 mono_metadata_locate): Functions to locate the information
18980 definition given a token or a table and an index.
18981 (mono_metadata_compute_table_bases): New.
18982 (compute_size): New function to compute the sizes of the various
18985 * mono/metadata/metadata.h: Finish listing the different index
18988 * mono/metadata/pedump.c: Improve to dump new information.
18990 2001-06-19 Miguel de Icaza <miguel@ximian.com>
18992 * mono/metadata/metadata.c: Entered all the tables matching
18995 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2