1 2006-07-14 Dick Porter <dick@ximian.com>
3 * object.c (mono_type_initialization_cleanup): Fix a race
4 condition by temporarily commenting out the critical section
7 2006-07-14 Zoltan Varga <vargaz@gmail.com>
9 * reflection.c (create_custom_attr): Fix some warnings.
10 (create_custom_attr_data): Ditto.
11 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
14 2006-07-11 Zoltan Varga <vargaz@gmail.com>
16 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
18 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
20 2006-07-08 Zoltan Varga <vargaz@gmail.com>
22 * reflection.c (resolve_object): Add support for DynamicMethod.
24 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
25 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
27 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
29 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
30 don't leak GPtrArray's pdata has we have no use (nor free) for it.
32 2006-07-01 Zoltan Varga <vargaz@gmail.com>
34 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
37 2006-06-30 Raja R Harinath <rharinath@novell.com>
39 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
40 slightly: remove a shadow local variable.
42 2006-06-29 Raja R Harinath <rharinath@novell.com>
44 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
45 definition that introduces the virtual function slot.
46 Also fix Coverity #105.
48 2006-06-29 Zoltan Varga <vargaz@gmail.com>
50 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
51 for dynamic assemblies. Fixes #78724.
53 2006-06-28 Zoltan Varga <vargaz@gmail.com>
55 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
58 2006-06-21 Martin Baulig <martin@ximian.com>
61 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
64 2006-06-21 Zoltan Varga <vargaz@gmail.com>
66 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
68 2006-06-20 Raja R Harinath <rharinath@novell.com>
70 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
72 * class.c (mono_class_create_from_typespec): Add 'context' argument.
73 Inflate result if necessary.
74 (mono_class_get_full): Remove old version. Rename from
75 'mono_class_get' and add 'context' argument. Pass it to
76 ..._create_from_typespec.
77 (mono_class_get): New. Simple wrapper to mono_class_get_full.
78 (mono_ldtoken): Revert change below.
80 2006-06-20 Martin Baulig <martin@ximian.com>
82 * class.c (mono_ldtoken): Don't pass the generic context to
83 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
85 2006-06-15 Zoltan Varga <vargaz@gmail.com>
87 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
88 and later freeing it. Fixes #78638.
90 2006-06-15 Miguel de Icaza <miguel@novell.com>
92 * icall.c (mono_class_get_throw): Revert over-zealous error
93 throwing, the caller for mono_class_get_throw will cope with
94 errors when classes are not properly initialized already.
96 The code still copes with loader exceptions though.
98 Fixes the regression in reftype1 and reftype3 from the CAS tests.
100 2006-06-14 Miguel de Icaza <miguel@novell.com>
102 Fixes the `make run1' version of RuntimeAbort (to be commited,
103 source is in Bugzilla).
105 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
106 FALSE on class loading failure instead of returning true.
108 * class.c (mono_class_create_from_typedef): It is possible for
109 mono_metadata_interfaces_from_typedef_full to fail if a class is
110 not found, cope with this.
113 2006-06-14 Dick Porter <dick@ximian.com>
116 * process.c: Fix a bunch of signed/unsigned warnings from gcc
119 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
121 * culture-info-table.h : oops, forgot to make it nsync with r61548.
123 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
125 * icall.c: Another fix for building mono in Visual Studio.
127 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
129 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
131 2006-06-09 Martin Baulig <martin@ximian.com>
133 * debug-mono-symfile.c: Put this back and really fix it this
134 time. Sorry for all the trouble.
136 2006-06-08 Zoltan Varga <vargaz@gmail.com>
138 * icall.c (mono_class_get_throw): Fix a warning.
139 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
140 ReflectionTypeLoadException if needed. Fixes #78606.
142 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
143 (mono_class_init): Ditto.
145 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
147 (mono_loader_clear_error): Make this work even if there is no error.
149 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
151 * object-internals.h marshal.c marshal.h icall.c: Implement method
152 Marshal.GetComSlotForMethodInfo using internal call.
154 2006-06-07 Zoltan Varga <vargaz@gmail.com>
156 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
157 a function for signalling it.
159 * class.c (mono_class_from_typeref): Use the new kind of loader error when
160 a referenced assembly is not found.
162 * loader.c (mono_loader_error_prepare_exception): Add support for
163 LOADER_ERROR_ASSEMBLY. Fix formatting.
165 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
167 * domain.c appdomain.c class-internals.h marshal.c: Add support
168 for VARIANT marshalling on windows and increment corlib version
169 since Variant struct was added.
171 2006-06-03 Miguel de Icaza <miguel@novell.com>
173 * debug-mono-symfile.c: Revert Martin's previous patch which broke
174 stack trace line information:
176 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
177 (Martin) when looking up B which is between A and C, return A not C.
181 Thanks to Alexander Olk for tracking this down.
183 2006-06-02 Zoltan Varga <vargaz@gmail.com>
185 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
187 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
188 avoid clobbering its value.
189 (mono_string_to_lpstr): Fix a warning on windows.
191 2006-05-31 Zoltan Varga <vargaz@gmail.com>
193 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
195 * reflection.c loader.c: Removed references to 'dummy' flag.
197 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
199 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
202 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
205 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
207 * marshal.c threadpool.c: Update callers of mono_async_result_new.
209 * appdomain.c: Bump corlib version.
211 2006-05-30 Zoltan Varga <vargaz@gmail.com>
213 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
214 CEE_STIND_REF when working with object references.
216 2006-05-31 Zoltan Varga <vargaz@gmail.com>
218 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
221 2006-05-30 Miguel de Icaza <miguel@novell.com>
223 * loader.c (method_from_memberref): Fix argument value for
224 mono_loader_set_error_method_load (I was passing the MonoClass
225 instead of the class name char *).
227 2006-05-30 Zoltan Varga <vargaz@gmail.com>
229 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
230 CEE_STIND_REF when working with object references.
232 2006-05-30 Martin Baulig <martin@ximian.com>
234 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
235 mono_method_full_name() change and replace the ':' with a '.'
238 2006-05-30 Martin Baulig <martin@ximian.com>
240 * debug-mono-symfile.c
241 (mono_debug_symfile_lookup_location): Fix the algorithm:
242 when looking up B which is between A and C, return A not C.
244 2006-05-29 Martin Baulig <martin@ximian.com>
247 (MonoDebugMethodInfo): Make the typedef public.
248 (MonoDebugSourceLocation): New public struct.
251 (mono_debug_source_location_from_address): Removed.
252 (mono_debug_source_location_from_il_offset): Removed.
253 (mono_debug_il_offset_from_address): Removed.
254 (mono_debug_address_from_il_offset): Removed.
255 (mono_debug_lookup_method): New public function.
256 (mono_debug_lookup_source_location): New public function; replaces
257 the old mono_debug_source_location_from_*() functions; see the
258 inline documentation.
259 (mono_debug_free_source_location): New public function.
260 (mono_debug_print_stack_frame): New public function; see the
261 inline documentation.
263 * debug-mono-symfile.c
264 (mono_debug_find_source_location): Renamed into
265 mono_debug_symfile_lookup_location(); only take a
266 `MonoDebugMethodInfo *' and an `offset' argument; added inline
268 (mono_debug_find_method): Renamed into
269 mono_debug_symfile_lookup_method().
271 2006-05-27 Zoltan Varga <vargaz@gmail.com>
273 * assembly.c (mono_assembly_open_full): Dont overwrite the status
274 returned by mono_image_open_full ().
276 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
277 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
280 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
283 2006-05-27 Miguel de Icaza <miguel@novell.com>
285 * class.c (mono_class_from_typeref): handle missing images
286 earlier, deals with bug #78418. Refactor code;
288 Fix a warning introduced in my previous commit (some stale code
289 from before I revisited my patch).
291 * class.c (mono_class_create_from_typedef): On failure, remove the
292 class from the MonoImage->class_cache as the class is not
293 initialized; Fixes the leak pointed out by Paolo.
295 2006-05-25 Dick Porter <dick@ximian.com>
297 * threads.c (mono_thread_cleanup): Build fix. Comment out the
298 DeleteCriticalSections until I figure out which one may still be
299 sometimes locked when mono_thread_cleanup is called.
301 2006-05-24 Dick Porter <dick@ximian.com>
303 * threads.c (mono_thread_cleanup): Move the threading cleanup out
304 of mono_thread_manage and back into its own function, so it can be
305 called after the finalizer thread has finished.
307 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
309 2006-05-24 Zoltan Varga <vargaz@gmail.com>
311 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
314 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
315 with non-blittable elements.
316 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
318 2006-05-24 Martin Baulig <martin@ximian.com>
320 * mono-debug-debugger.h (MonoDebuggerEvent): Added
321 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
323 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
324 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
325 `mono_debugger_event_handler' to NULL.
327 2006-05-24 Martin Baulig <martin@ximian.com>
329 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
331 2006-05-24 Martin Baulig <martin@ximian.com>
333 * mono-debug-debugger.h
334 (mono_debugger_create_notification_function): Added
335 `MonoCodeManager *' argument.
337 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
339 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
341 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
343 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
344 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
347 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
349 * icall.c: precise GC support: objects can't be stored in unmanaged
350 memory anymore, even if they are kept alive by other references: since
351 they can move the GC needs to be able to always find them.
353 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
355 * object.c: precise GC support for static fields. Support
356 for moving GCs: write barriers and pinned allocation for interned
359 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
361 * domain.c, domain-internals.h: precise GC support for the MonoDomain
364 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
366 * class.c, gc.c: sgen and precise GC updates.
368 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
370 * marshal.h, marshal.c: added write barrier wrapper and precise type
373 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
375 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
378 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
380 * reflection.c: precise and sgen GC updates.
382 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
384 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
386 2006-05-22 Zoltan Varga <vargaz@gmail.com>
388 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
390 2006-05-20 Zoltan Varga <vargaz@gmail.com>
392 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
393 MONO_TYPE_OBJECT. Fixes #78462.
395 2006-05-18 Zoltan Varga <vargaz@gmail.com>
397 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
400 2006-05-17 Miguel de Icaza <miguel@novell.com>
402 * class.c (mono_class_get_exception_for_failure): Implement parts
403 of a TODO: if the loader error is set (instead of the class
404 error), we return a Loader exception that can be properly thrown
407 This was exposed by some Winforms 2.0 code that I tried to run
408 (Atsushi pointed me to it).
410 2006-05-17 Zoltan Varga <vargaz@gmail.com>
412 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
413 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
415 * marshal.c (emit_marshal_vtype): Add limited support for
416 UnmanagedType.LPStruct. Fixes #78427.
418 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
419 Applied a patch from kangaroo to fix #77523.
421 2006-05-17 Martin Baulig <martin@ximian.com>
424 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
425 (debugger_thread_created): Removed.
426 (debugger_thread_exited): Removed.
428 2006-05-15 Zoltan Varga <vargaz@gmail.com>
430 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
432 * object-internals.h (MonoReflectionResource): Sync with managed version.
434 2006-05-12 Wade Berrier <wberrier@novell.com>
436 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
438 2006-05-12 Zoltan Varga <vargaz@gmail.com>
440 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
441 functions try to allocate from the image mempool.
443 2006-05-12 Dick Porter <dick@ximian.com>
445 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
447 2006-05-12 Lluis Sanchez <lluis@ximian.com>
449 * object.c: The FieldGetter and FieldSetter methods require the full
450 name of the class, not only the name. Fixes bug #78277.
452 2006-05-11 Miguel de Icaza <miguel@novell.com>
454 * loader.c (method_from_memberref): Do not pass the NULL klass to
455 mono_loader_set_error_() methods. Pass the non-NULL value
458 2006-05-11 Zoltan Varga <vargaz@gmail.com>
460 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
461 (mono_assembly_close): Null out assembly->image->references after freeing it.
463 * image.c (mono_image_close): Free image->references.
465 * reflection.c (mono_image_basic_init): Fix a small memory leak.
467 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
469 * marshal.c: In function mono_mb_add_local don't use the mb pointer
470 before checking if it's NULL (g_assert).
472 2006-05-10 Martin Baulig <martin@ximian.com>
474 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
475 I thought I already killed that two months ago, but now it somehow reappeared.
477 2006-05-10 Martin Baulig <martin@ximian.com>
479 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
481 2006-05-10 Zoltan Varga <vargaz@gmail.com>
483 * reflection.c: Allocate memory for dynamically created methods in the image
486 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
488 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
489 don't use the ad pointer before checking if it's NULL (g_assert).
491 2006-05-09 Zoltan Varga <vargaz@gmail.com>
493 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
494 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
496 * marshal.c: Allocate all signatures from mempools.
498 * marshal.c: Allocate some more signatures from mempools.
500 2006-05-09 Miguel de Icaza <miguel@novell.com>
502 * object.c (mono_load_remote_field): The code used to provide a
503 temporary variable for returning results if the user did not
504 provide a result pointer. But our temporary variable was allocted
507 Fix calling code to always pass a result area. Coverity ID 103.
509 2006-05-06 Zoltan Varga <vargaz@gmail.com>
511 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
512 value, not the old. Fixes #78312.
513 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
515 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
516 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
519 * assembly.c (mono_assembly_close): Free image->references.
521 * assembly.c (mono_assembly_names_equal): Fix a warning.
522 (mono_assemblies_cleanup): Cleanup more global data.
524 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
526 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
527 ptr_cache and image->modules.
529 * image.c (mono_image_init): Allocate array_cache lazily.
531 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
533 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
534 behavior was changed recently and has bad side effects.
536 2006-05-05 Zoltan Varga <vargaz@gmail.com>
538 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
540 * assembly.c (mono_assembly_close): Remove a debug printf.
542 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
544 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
545 to also allow for temporary references between mono_image_open ()/close ().
547 * domain.c (get_runtimes_from_exe): Add a FIXME.
549 2006-05-04 Zoltan Varga <vargaz@gmail.com>
551 * marshal.c: Fix support for dynamic methods.
553 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
555 * marshal.c (mono_marshal_cleanup): New cleanup function.
557 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
560 * class.c (mono_class_init): Fix leaking class->nested_classes.
562 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
564 * image.c (mono_image_init): Initialize the new cashes.
566 * image.c (mono_image_close): Destroy the new cashes.
568 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
570 * mempool.c (mono_mempool_strdup): New helper function.
572 * class-internals.h: Add prototype for mono_loader_unlock ().
574 * domain.c (mono_jit_info_table_find): Fix a warning.
575 (mono_debugger_check_runtime_version): Ditto.
577 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
578 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
579 functions to these modules.
581 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
584 * marshal.c (mono_free_bstr): Fix a warning.
586 * assembly.c (mono_assembly_open_full): Fix another small leak.
588 * object.c: Fix some unload leaks in the remoting code.
590 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
593 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
595 * reflection.c: Fix some unload leaks in dynamic assemblies.
597 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
599 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
600 * marshal.h: Add BSTR support on Win32
601 * icall.c: Add BSTR icalls
602 * metadata.h: Add BSTR enums
604 2006-04-28 Miguel de Icaza <miguel@novell.com>
606 Work to catch the crash from #76795 and turn it into an
607 exception. As I stubbed out pieces of the VisualBasic support,
608 I found a number of places where the code was failing and I added
609 checks to those places.
611 * metadata.c (do_mono_metadata_parse_generic_class): Make this
612 function return a status code. If we fail to parse the signature
613 from mono_metadata_parse_generic_inst, return FALSE.
615 * loader.c (mono_get_method_from_token): If we fail to load the
616 method (mono_class_get) return NULL.
618 * (method_from_memberref): Return NULL if we are unable to parse
621 (mono_loader_error_prepare_exception): Since we now use the
622 loader_error flag internally to stop processing, and obtaining
623 exceptions that might be thrown will walk this code path the
624 proper way of going from a MonoLoaderError into a
625 MonoException was convoluted. This new routine encapsulates the
626 process of turning the error into an exception and *clearing* the
629 2006-04-27 Miguel de Icaza <miguel@novell.com>
631 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
632 with missing assemblies), and to cope with:
634 * Missing fieldref from a non-existing assembly.
635 * Missing methodref from a non-existing assembly.
637 The first batch of work to address *some* of the issues from 76661.
639 * object.c (mono_class_create_runtime_vtable): If we fail to
640 initialize the class raise the exception here.
642 * metadata.c (mono_class_get_overrides_full): If any methods fail
643 to load return the failure to the caller.
645 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
646 flagging assemblies that failed to load.
648 Do not crash if we are unable to load the assembly.
650 (mono_assembly_close): Do nothing with REFERENCE_MISSING
653 * loader.c (mono_loader_set_error_type_load): Change the
654 convention to always pass unallocated strings, so we make our own
655 copies (I know our own code had duplicated strings before, but
656 this keeps the normal conventions).
657 (method_from_memberref): Call mono_loader_set_error_method_load
658 for all possible failures of loading the class.
659 Remove assert, turn into a loader error.
661 (mono_loader_error_to_exception): Move this routine from mini
662 (mini_loader_error_to_exception) there was no need to have that in
665 * class.c (mono_class_from_typeref): If we were not able to load
666 the assembly with mono_assembly_load_reference, call the
667 mono_loader_set_error_type_load to register the problem.
669 (mono_class_setup_fields): If we fail to load the type from
670 mono_metadata_parse_type_full, call mono_class_set_failure and
673 If class->exception_type is set, we do not layout the fields as
674 that might crash the runtime, and instead return (from breaking
675 from the previous loop).
677 (mono_class_setup_vtable): This now returns a boolean indicating
678 whether the table was properly setup. The decision is driven by
679 mono_class_get_overrides_full which might run into non-existing
682 (mono_class_init): Returns TRUE on success or FALSE if there was a
683 problem in loading the type (incorrect assemblies, missing
684 assemblies, methods, etc).
686 When we call mono_class_setup_fields we also check for a potential
687 error inside this call (either a class exception or a general
690 (mono_class_create_from_typedef): If the parent fails to load
691 (calling mono_class_get_full) return NULL.
695 calls to mono_metadata_parse_type_full should be checked
696 everywhere and set the mono_class_set_failure
697 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
699 The current patch checks the places where my manually constructed
700 tests show the errors are showing up, but we should do it
705 mono_class_init return values should be tested everywhere, like
706 the previous case this is something that we should audit
707 everywhere and not only on the cases exposed by the tests I
710 2006-04-26 Miguel de Icaza <miguel@novell.com>
712 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
713 boolean parameter and instead pass the information on `options'
714 parameter (FileOptions).
716 * icall.c: Register the new signature for MonoIO.Open.
718 * debug-helpers.c (dis_one): Trying to understand how coverity
719 works. Fix Run 5, item 78.
721 2006-04-26 Dick Porter <dick@ximian.com>
723 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
726 2006-04-25 Martin Baulig <martin@ximian.com>
728 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
730 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
731 debugger_thread_created().
732 (debugger_gc_push_all_stacks): Don't handle the main thread in any
734 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
735 (mono_debugger_finalize_threads): New function; undo the effects
736 of mono_debugger_init_threads().
737 (mono_debugger_create_all_threads): Removed.
739 2006-04-24 Zoltan Varga <vargaz@gmail.com>
741 * image.c (mono_image_close): Tidy up trace messages.
743 * assembly.c (mono_assembly_close): Ditto.
745 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
746 no longer references an already freed assembly. Fixes #78168.
748 2006-04-21 Dick Porter <dick@ximian.com>
750 * threads.c (mono_thread_detach): Fix reference counting when
753 2006-04-21 Zoltan Varga <vargaz@gmail.com>
755 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
758 2006-04-19 Zoltan Varga <vargaz@gmail.com>
760 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
761 (mono_type_to_stind): Ditto.
763 * marshal.c: Use the new helper functions to simplify code.
765 * image.c (mono_image_close): Add some code for help debug assembly unloading
768 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
771 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
772 assembly was already loaded in another appdomain. Fixes #78083.
774 2006-04-13 Zoltan Varga <vargaz@gmail.com>
776 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
777 referenced assemblies.
778 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
780 * domain.c (mono_domain_free): Add a trace message.
782 * appdomain.c (add_assemblies_to_domain): Ditto.
784 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
787 2006-04-12 Zoltan Varga <vargaz@gmail.com>
789 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
791 2006-04-12 Martin Baulig <martin@ximian.com>
793 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
794 `USE_INCLUDED_LIBGC'.
796 2006-04-12 Zoltan Varga <vargaz@gmail.com>
798 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
799 the patch contains ../ and a small directory name later. Hopefully fixes
802 2006-04-10 Martin Baulig <martin@ximian.com>
804 Clean up the debugger's thread-handling code.
806 The debugger's thread-handling code has been moved from
807 ../mini/debug-debugger.c to threads.c. We now iterate directly
808 over the `threads' hash, keep track of exiting threads and also
811 We can now debug XSP and XSP based applications with the debugger.
813 * object-internals.h (MonoThread): Added `gpointer end_stack'.
816 (MonoThreadCallbacks): Removed; this was only used by the debugger.
817 (mono_install_thread_callbacks): Likewise.
819 * threads.c (mono_thread_callbacks): Removed.
820 (debugger_thread_created, debugger_thread_exited): New static functions.
821 (start_wrapper): Call debugger_thread_created().
822 (thread_cleanup): Call debugger_thread_exited().
823 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
824 (mono_debugger_init_threads): New public function.
825 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
826 iterate directly over the `threads' hash and also use proper locking.
828 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
830 * mono-debug-debugger.h
831 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
833 2006-04-10 Zoltan Varga <vargaz@gmail.com>
835 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
836 argument type=array. Fixes #78057.
838 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
840 * culture-info-table.h : regenerated. Fixed bug #69652.
842 2006-04-07 Zoltan Varga <vargaz@gmail.com>
844 * loader.c metadata.c: Reapply a variant r59116.
846 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
848 * class.c (mono_class_setup_interface_offsets): New internal function.
850 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
851 interfaces too. Fixes #77398.
853 * reflection.c (encode_cattr_value): Add support for
854 parameter type=object, argument type=array.
855 (load_cattr_value): Ditto. Fixes #77916.
857 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
858 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
860 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
861 a byval char array and CharSet is Ansi.
863 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
865 2006-04-06 Zoltan Varga <vargaz@gmail.com>
867 * metadata.c: Add some locking comments.
869 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
871 (mono_metadata_free_method_signature): Don't free the signature itself.
873 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
875 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
876 reference the same MonoImage.
877 (mono_assembly_load_from_full): Add an assert.
879 2006-04-05 Zoltan Varga <vargaz@gmail.com>
881 * image.c (mono_image_close): Don't put the image we are about to free into the
882 loaded_images_guid_hash.
884 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
885 to reduce code duplication.
887 * marshal.c: Register the native functions called by this module as icalls, to
888 somewhat centralize the creation of MonoMethodSignature's.
890 * loader.c (mono_method_signature): Add a cache for method signatures.
892 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
893 the parameter attributes of a method.
894 (mono_metadata_parse_method_signature_full): Refactored the computation of
895 parameter attributes into a separate function. Also avoid one allocation in
898 * assembly.c (mono_assembly_close): Ditto.
900 * image.c (mono_image_close): Log trace messages with INFO level.
902 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
904 * image.c reflection.c: Correct reference counting of image modules.
906 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
907 of this function from the image mempool.
909 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
910 to allow more cached types to be used.
912 * mono-debug.c (mono_debug_add_method): Appled patch from
913 David S. Miller <davem@sunset.davemloft.net>: Access
914 minfo->lexical_blocks[] entry elements using read32().
916 2006-04-04 Zoltan Varga <vargaz@gmail.com>
918 * loader.c (mono_free_method): No longer free the method header for non-dynamic
919 methods as it is allocated from the mempool.
921 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
924 * metadata-internals.h: Add comments describing the reference counting scheme
925 used for MonoImage and MonoAssembly.
927 * image.c assembly.c reflection.c: Rework reference counting of images and
928 assemblies so they are freed when the runtime is shut down. Free some
929 additional memory structures when an image is unloaded.
931 2006-04-03 Zoltan Varga <vargaz@gmail.com>
933 * class.c loader.c reflection.c: Allocate more data structures in
936 2006-03-31 Miguel de Icaza <miguel@novell.com>
939 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
940 build on pre glib 2.4 systems.
942 2006-03-31 Zoltan Varga <vargaz@gmail.com>
944 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
946 * icall.c: Fix some warnings.
948 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
950 * culture-info-table.h : regenerated.
952 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
954 * threads.c, object-internals.h, verify.c: changed the culture caching
955 code to use a normal MonoArray for storage so the GC can keep track of
956 them easily. Fixed bits of the cache logic, too and simplified the
959 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
961 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
962 thread for non-Boehm GCs.
964 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
966 * domain.c, object.c, domain-internals.h: reduce the amount of memory
967 needed to keep track of the data for static fields.
969 2006-03-29 Raja R Harinath <rharinath@novell.com>
972 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
973 for interface classes. Use 'num_methods' instead.
974 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
975 before using '->vtable_size' field.
977 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
979 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
980 doesn't contain managed pointers, so use a normal hashtable.
982 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
984 * reflection.c, class-internals.h, domain.c: fixed handling of types
985 used as values for objects in custom attributes (bug #77915):
987 2006-03-24 Martin Baulig <martin@ximian.com>
989 * class.c (mono_class_setup_fields): Added support for generic
990 instances; fixes #77580.
992 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
994 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
996 2006-03-24 Dick Porter <dick@ximian.com>
998 * file-io.c (get_file_attributes): More stat macro breakage.
1001 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
1003 * profiler.c: added the file=filename option in the default profiler
1004 to output the profile data to filename.
1006 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1008 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
1011 2006-03-22 Martin Baulig <martin@ximian.com>
1013 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
1014 allocated `MonoClassField *' in `fb->handle'.
1016 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
1018 * class.c, image.c, metadata-internals.h: implemented new mechanism to
1019 allocate interface ID to save memory and allow better ID reuse on
1020 appdomain unload. setup_generic_vtable () removal from Martin.
1022 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1024 * object.h, appdomain.c, domain.c, exception.c, icall.c,
1025 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
1026 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
1027 write barriers for reference stores with managed objects accessed with
1028 C structures in the runtime and in embedding programs.
1030 2006-03-20 Raja R Harinath <rharinath@novell.com>
1032 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
1033 'interface_id' and 'max_interface_id' fields of MonoClasses
1034 representing open generic types.
1036 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
1038 * object.h, object.c, icall.c: added functions to deal with
1039 storing valuetypes that contain references in managed objects.
1040 * reflection.c, string-icalls.c, threads.c, marshal.c: small
1041 fixes and comments around uses of mono_array_addr ().
1043 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
1045 * object.h, icall.c, monitor.c: object.GetHashCode ()
1046 implementation that supports the moving garbage collector.
1048 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
1050 * icall.c, threads-types.h, threads.c: implemented finalizer for
1053 2006-03-15 Zoltan Varga <vargaz@gmail.com>
1055 * metadata.c (mono_type_size): Add a fixme.
1056 (mono_type_stack_size): Ditto.
1058 * object-internals.h (MonoReflectionAssemblyBuilder): Added
1059 'type_forwarders' field.
1061 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
1062 attribute from net 2.0.
1064 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
1067 * class.c (mono_class_setup_fields): Fix a warning.
1069 * class.c (mono_class_from_name): Add support for assemblyref entries
1070 in the EXPORTEDTYPE table.
1072 * reflection.c: Add support for handling type forwarders under net 2.0.
1074 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1076 2006-03-14 Zoltan Varga <vargaz@gmail.com>
1078 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
1079 overwriting entries in ModuleBuild->types, also clean up the code
1080 a little. Fixes #77774.
1082 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
1084 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
1085 load friend assembly info when present.
1087 2006-03-14 Raja R Harinath <rharinath@novell.com>
1089 Fix crasher on gtest-158.cs.
1090 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
1091 the return value if the MonoClass we want is yet in an
1093 * class.c (mono_class_create_from_typedef): Add an comment
1094 explaining an order dependency between mono_class_setup_parent and
1095 mono_class_setup_mono_type.
1097 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
1099 * class.c: documentation updates and events bug fix.
1101 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
1103 * class.c: some cleanup, locking fixes.
1105 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
1107 * class.c: fix the generics code to setup nested
1108 type info to the instantiated type (bug #77770).
1110 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
1112 * marshal.c: fixed a few type correctness issues.
1114 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1116 * loader.c: the Set/Get/Addrtess array methods should be public.
1118 2006-03-11 Zoltan Varga <vargaz@gmail.com>
1120 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
1122 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
1125 2006-03-10 Zoltan Varga <vargaz@gmail.com>
1127 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
1129 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
1131 * mempool.c (mono_mempool_alloc): Speed this up a bit.
1132 (mono_mempool_alloc0): Ditto.
1134 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1137 (create_object_from_sockaddr): it was allocating 4 extra bytes
1138 for the AF_UNIX data. Fixes bug #77747.
1140 2006-03-09 Zoltan Varga <vargaz@gmail.com>
1142 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
1144 2006-03-09 Dick Porter <dick@ximian.com>
1146 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
1147 Fixes bug 76966 again.
1149 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
1151 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
1153 * appdomain.c: Bumped corlib version to 48 (due to r57532)
1155 2006-03-07 Martin Baulig <martin@ximian.com>
1158 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
1160 2006-03-07 Martin Baulig <martin@ximian.com>
1163 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
1164 regression introduced in r56970; see gtest-252.cs.
1166 * loader.c (mono_get_method_constrained): Correctly handle generic
1167 methods; see gtest-253.cs.
1169 2006-03-04 Zoltan Varga <vargaz@gmail.com>
1171 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
1173 2006-03-04 Martin Baulig <martin@ximian.com>
1175 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
1176 compute the parent type at runtime, just like we're already doing
1180 (mono_reflection_bind_generic_parameters): Don't compute the
1181 parent type anymore.
1183 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
1185 2006-03-04 Martin Baulig <martin@ximian.com>
1187 * mono-debug-debugger.h
1188 (mono_debugger_create_notification_function): Allocate memory at
1189 runtime and return a pointer to it.
1191 2006-03-03 Zoltan Varga <vargaz@gmail.com>
1193 * assembly.c: Fix windows build.
1195 * assembly.c: Fix build.
1197 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
1199 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
1201 2006-03-03 Dick Porter <dick@ximian.com>
1204 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
1205 Check parameters before dereferencing them. Fixes Aaron's part of
1208 2006-03-03 Raja R Harinath <rharinath@novell.com>
1210 Fix performance regression.
1211 * loader.c (find_method_in_class): Add 'from_class' argument.
1212 Rename 'klass' argument to 'in_class'. The signature is compared
1213 against the method in 'in_class', and the corresponding method is
1214 returned from 'from_class'.
1215 (find_method): Walk both 'in_class' and 'from_class' in parallel.
1216 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
1217 type definition and generic instantiation in parallel.
1218 (mono_get_method_constrained): Update to changes.
1220 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
1222 * threads.c: make sure the domain is correct, too when doing
1223 mono_thread_attach ().
1225 2006-03-01 Zoltan Varga <vargaz@gmail.com>
1227 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
1228 windows. Fixes #77683.
1230 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
1232 * object.h, *: introduced specific way to set elements of an array
1233 of references to be used as write barrier. Still need to audit the
1234 uses of mono_array_addr.
1236 2006-03-01 Miguel de Icaza <miguel@novell.com>
1238 * object-internals.h: New field to cache the assmebly name, patch
1239 from Tambet Ingo (tambet@ximian.com)
1241 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
1243 * decimal.h, class-internals.h, metadata-internals.h,
1244 file-io.h: mark a few function declarations as internal, to
1245 reduce the number of PLT entries.
1247 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1249 * file-io.c: fix typo in warning message.
1251 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
1253 * loader.c: on unix, lookup the "*A" version of a function
1254 if charset is auto as a second option before failing.
1256 2006-02-28 Raja R Harinath <rharinath@novell.com>
1258 * class.h (mono_class_inflate_generic_method): Revert to two
1260 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
1261 (mono_class_inflate_generic_method_full): Add.
1262 * class.c (mono_class_inflate_generic_method_full): Rename from
1263 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
1264 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
1265 * loader.c, reflection.c: Update to changes.
1267 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
1269 * icall.c: const fixes and small improvements.
1271 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1273 * threadpool.c: for asynchronous connect(), enable the same workaround
1274 for BSD 6 as for the Mac. Fixes bug #77637.
1276 2006-02-24 Zoltan Varga <vargaz@gmail.com>
1278 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
1279 formatted classes. Fixes #77524.
1281 2006-02-24 Raja R Harinath <rharinath@novell.com>
1283 * class.c (inflate_generic_type): Add a couple more
1284 micro-optimizations.
1285 (inflate_generic_context): Don't use the 'gmethod' from
1287 (mono_class_inflate_generic_method): If the method has generic
1288 parameters, but the passed-in context doesn't have a 'gmethod',
1289 create one. Use the possibly simplified generic instantiation
1290 from the declaring class instead of the one passed in.
1292 2006-02-24 Raja R Harinath <harinath@gmail.com>
1294 Make generic method signature and method header handling lazy.
1295 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
1296 (inflate_generic_header): Likewise.
1297 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
1298 parameter to avoid inflating types.
1299 (mono_get_inflated_method): Empty out.
1300 * class.h (mono_class_inflate_generic_method): Update to changes.
1301 * loader.c (mono_get_method_from_token): Don't parse signature for
1302 generic methods, nor methods of generic classes.
1303 (mono_method_signature): Rename from 'mono_method_signature'.
1304 Inflate signature on demand.
1305 (mono_method_get_header): Inflate method header on demand.
1306 * reflection.c: Update to changes.
1308 2006-02-23 Raja R Harinath <rharinath@novell.com>
1310 * metadata.c (mono_metadata_inflate_generic_inst): If the
1311 instantiation is closed, don't bother expanding it in the new
1313 * class.c (inflate_generic_class): If the generic instantiation
1314 doesn't change after inflation, return the argument itself.
1315 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
1317 (inflate_generic_context): If neither the generic class nor the
1318 generic method instantiations change, return the original context.
1319 * reflection.c (mono_method_get_object): Do
1320 'mono_get_inflated_method' before accessing the ->klass field.
1321 (inflate_mono_method): Don't create a MonoGenericMethod unless
1323 (inflate_method): Don't pass a constructed type as the declaring
1324 type of a methodbuilder.
1326 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
1328 * object.c: fix memory overwrite.
1330 2006-02-22 Dick Porter <dick@ximian.com>
1332 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
1333 it doesn't work any more.
1334 (mono_threads_request_thread_dump): Fix unused variable warnings.
1336 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
1338 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
1339 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
1340 the public header file.
1342 2006-02-21 Zoltan Varga <vargaz@gmail.com>
1344 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
1346 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
1348 * class-internals.h, object.c: reduce the size of MonoVTable
1349 and store the interface_offsets array at negative offsets.
1351 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
1353 * metadata.c: tweak table descriptors data structures to reduce
1354 size and runtime relocations.
1356 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1358 * marshal.c: fix some types and opcodes to be type-safe
1359 in marshaling wrappers.
1361 2006-02-21 Ankit Jain <jankit@novell.com>
1363 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
1365 2006-02-21 Raja R Harinath <rharinath@novell.com>
1367 * metadata.c (get_constraints): Relax debugging checks for monodis.
1369 2006-02-21 Ankit Jain <jankit@novell.com>
1371 * metadata.c (mono_metadata_load_generic_params): Move the code
1372 checking for ambiguous generic params from here to mono/dis/get.c
1373 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
1375 2006-02-21 Raja R Harinath <harinath@gmail.com>
1377 Fix assertion triggered when compiling nemerle.
1378 * class.c (mono_get_shared_generic_inst): Rename from
1379 get_shared_inst and make non-static.
1380 * loader.c (mono_get_shared_generic_method): New. Used to create
1381 the MonoGenericContext-equivalent of a MonoGenericContainer.
1382 (mono_get_method_from_token): Initialize the 'context' field of
1383 the created MonoGenericContainer.
1384 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
1385 * metadata.c (get_constraints): Add sanity check.
1386 * class-internals.h: Add new internal methods.
1388 * reflection.c (verify_safe_for_managed_space): New sanity check.
1389 Currently checks that owner-less generic parameters aren't allowed
1391 (mono_type_get_object): Use it.
1392 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
1393 that are now in mono_type_get_object.
1394 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
1396 2006-02-19 Raja R Harinath <harinath@gmail.com>
1398 * metadata.c (mono_type_create_from_typespec): Rename from
1399 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
1400 argument and caching of types in the generic container.
1401 (unwrap_arrays, find_generic_param): Remove.
1402 * metadata-internals.h: Update.
1403 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
1405 2006-02-18 Zoltan Varga <vargaz@gmail.com>
1407 * class.c (mono_class_get_exception_for_failure): Fix a warning.
1409 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
1410 return values. Fixes #77581.
1412 * class.c (mono_fnptr_class_get): Switch name and name_space.
1414 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
1415 classes and add support for [In, Out] attributes.
1416 (mono_marshal_free_asany): Ditto. Fixes #77524.
1418 2006-02-18 Raja R Harinath <harinath@gmail.com>
1420 * class.c (mono_class_from_generic_parameter): Make more robust to
1421 incomplete MonoGenericContainers from monodis.
1423 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1425 * class-internals.h: added some more exception types.
1426 * class.c, metadata.c: added a few checks to handle missing
1429 2006-02-17 Raja R Harinath <rharinath@novell.com>
1431 Use owner-less generic-params some more.
1432 * class.c (my_mono_class_from_generic_parameter): Remove.
1433 (mono_class_from_generic_parameter): Handle null image,
1434 param->name and param->owner.
1435 (mono_class_from_mono_type): Update.
1436 (mono_class_create_from_typespec): Remove 'container' parameter.
1437 If that parameter is non-null, the result is always inflated by
1438 'mono_class_get_full' anyway.
1439 (mono_class_get): Rename from _mono_class_get. Remove 'container'
1441 (mono_class_get_full): Update.
1443 * class.c (inflate_generic_type) [GENERICINST]: If the generic
1444 instance is not open, don't bother inflating.
1445 (mono_class_setup_fields): Hoist some loop-invariants. Don't
1446 parse metadata for inflated classes.
1447 (_mono_class_get): Change GenericContext* parameter to
1449 (mono_class_create_from_typespec): Likewise. Simplify, and
1450 implement trivially. All the cases are handled in
1451 mono_class_from_mono_type. Don't inflate returned class.
1452 (mono_class_get_full): Delegate GENERICINST optimization to
1453 inflate_generic_type.
1454 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
1456 2006-02-16 Dick Porter <dick@ximian.com>
1458 * socket-io.c (create_object_from_sockaddr): Fix typo.
1459 (create_sockaddr_from_object): Check array lengths before
1460 potentially accessing items off the end.
1461 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
1462 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
1463 (ves_icall_System_Net_Sockets_Socket_Send_internal)
1464 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
1465 length checks to avoid wraparound overflows.
1466 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
1467 contents of the array of sockets
1468 (hostent_to_IPHostEntry2)
1469 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
1470 Check return value of inet_ntop ().
1471 (addrinfo_to_IPHostEntry): Fix typo
1473 2006-02-16 Raja R Harinath <rharinath@novell.com>
1475 Type metadata parsing doesn't use generic-instantiation information.
1476 * metadata.c (mono_metadata_parse_array_full): Change
1477 MonoGenericContext* parameter to MonoGenericContainer*.
1478 (mono_metadata_parse_type_full): Likewise.
1479 (mono_type_create_from_typespec_full): Likewise.
1480 (mono_metadata_parse_mh_full): Likewise.
1481 (mono_metadata_parse_generic_inst): Likewise.
1482 (do_mono_metadata_parse_generic_class): Likewise.
1483 (do_mono_metadata_parse_type): Likewise.
1484 * metadata-internals.h: Update to changes.
1485 * class.c (mono_class_find_enum_basetype): Likewise.
1486 (mono_class_setup_fields): Likewise.
1487 (mono_class_create_from_typespec): Likewise.
1488 * loader.c (method_from_methodspec): Likewise.
1489 (mono_get_method_from_token): Likewise.
1490 (mono_method_get_header): Likewise.
1492 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
1494 * marshal.c: handle additional GENERICINST case (patch from
1495 Thong Nguyen <tum@veridicus.com>).
1496 Fix a few cases where LDIND_I/STIND_I was used for references.
1498 2006-02-16 Raja R Harinath <rharinath@novell.com>
1500 * reflection.c (mono_reflection_get_token): Remove unused variable.
1502 2006-02-16 Martin Baulig <martin@ximian.com>
1504 * reflection.c (mono_reflection_get_token): Add support for fields
1505 in instantiated generic types.
1508 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
1510 2006-02-15 Martin Baulig <martin@ximian.com>
1513 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
1514 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
1515 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
1516 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
1518 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
1520 * class.c, metadata.c, metadata.h, object.c, icall.c,
1521 marshal.c: changed mono_type_get_underlying_type () to do
1522 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
1523 Fixed handling of instantiated generic valuetypes (bug #75479).
1525 2006-02-15 Raja R Harinath <rharinath@novell.com>
1527 * metadata.c (mono_metadata_decode_signed_value): Simplify.
1528 Delegate to mono_metadata_decode_value, and work on the returned value.
1530 * icall.c (ves_icall_MonoType_GetGenericArguments):
1531 Add consistency check here too.
1533 2006-02-15 Ankit Jain <jankit@novell.com>
1535 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
1538 2006-02-15 Ankit Jain <jankit@novell.com>
1540 * metadata.c (mono_metadata_decode_signed_value): New function to decode
1541 signed values, used only for representing lower bounds of arrays.
1542 (mono_metadata_parse_array_full): Use new
1543 mono_metadata_decode_signed_value to decode lower bounds.
1545 2006-02-14 Martin Baulig <martin@ximian.com>
1548 (mono_reflection_get_token): Support "MonoGenericMethod" and
1549 "MonoGenericCMethod" and allow generic instances / methods.
1551 2006-02-11 Zoltan Varga <vargaz@gmail.com>
1553 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
1554 to obtain the terminal size using an ioctl.
1556 * object.c (mono_nullable_init): Revert this as nullable reference
1557 types are not valid.
1558 (mono_nullable_box): Ditto.
1560 2006-02-09 Dick Porter <dick@ximian.com>
1562 * threads.c (mono_thread_detach): Drop a reference to the thread
1565 2006-02-09 Zoltan Varga <vargaz@gmail.com>
1567 * object.c (mono_nullable_init): Handle nullable reference types.
1568 (mono_nullable_box): Ditto. Fixes #77446.
1570 2006-02-07 Martin Baulig <martin@ximian.com>
1572 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
1574 2006-02-07 Ankit Jain <jankit@novell.com>
1576 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
1577 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
1578 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
1579 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
1580 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
1581 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
1583 2006-02-02 Zoltan Varga <vargaz@gmail.com>
1585 * class.c (mono_class_create_generic): Set type_token as well.
1587 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
1590 2006-02-02 Martin Baulig <martin@ximian.com>
1592 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
1593 has never been used so far.
1595 2006-02-02 Martin Baulig <martin@ximian.com>
1597 * mono-debug-debugger.h: Changed comment at the top of this file;
1598 the header is not installed, but it's safe to #include it from
1601 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
1602 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
1604 2006-02-02 Martin Baulig <martin@ximian.com>
1607 (MonoSymbolTable): Removed the `metadata_info' field.
1610 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
1612 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1613 (mono_debugger_add_builtin_types): Removed.
1614 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
1615 (mono_debugger_create_notification_function): We now operate on a
1616 pre-allocated area; take a `gpointer' and return `void'.
1618 * mono-debug-debugger.c
1619 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
1620 (mono_debugger_add_builtin_types): Removed.
1622 2006-02-02 Martin Baulig <martin@ximian.com>
1624 * threads.c (mono_debugger_create_all_threads): New public method.
1626 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
1628 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
1629 breaks on several platforms.
1631 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
1633 * assembly.c: the VS.NET build doesn't supply default values for
1634 MONO_ASSEMBLIES and MONO_CFG_DIR.
1636 2006-02-01 Zoltan Varga <vargaz@gmail.com>
1638 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
1641 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
1643 * loader.c (method_from_memberref): Fix a warning.
1645 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
1647 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
1648 with explicit layout. Fixes #77433.
1650 2006-01-31 Zoltan Varga <vargaz@gmail.com>
1652 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
1653 max_interface_id is initialized before using it. Fixes #77398.
1654 (ves_icall_Type_GetInterfaces): Ditto.
1656 2006-01-30 Raja R Harinath <rharinath@novell.com>
1658 * metadata.c (mono_metadata_parse_method_signature_full): Don't
1659 allocate memory for parameter attributes when parsing memberref
1661 * loader.c (mono_loader_set_error_method_load): Don't warn.
1662 (method_from_memberref): Ensure MissingMethodException gets thrown
1663 if method is not found. Make warning more informative.
1665 2006-01-29 Raja R Harinath <harinath@gmail.com>
1668 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
1669 return true if is byref.
1670 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
1671 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
1672 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
1674 2006-01-27 Raja R Harinath <rharinath@novell.com>
1676 Fix tests/find-method.2.il
1677 * loader.c (find_method, find_method_in_class): Remove is_inflated
1678 argument. Revert 2006-01-18 change.
1679 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
1680 is generic, search for method in its generic definition.
1681 * class.c (mono_class_setup_vtable_general): Print generic
1682 arguments of generic types in debugging printf.
1684 2006-01-26 Zoltan Varga <vargaz@gmail.com>
1686 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
1688 * threads.c (mono_threads_request_thread_dump): New helper function.
1690 2006-01-25 Raja R Harinath <rharinath@novell.com>
1692 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
1694 2006-01-25 Ankit Jain <jankit@novell.com>
1696 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
1697 move definition to ..
1698 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
1700 2006-01-25 Ankit Jain <jankit@novell.com>
1701 Raja R Harinath <rharinath@novell.com>
1703 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
1704 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
1707 2006-01-25 Martin Baulig <martin@ximian.com>
1709 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
1710 `MonoDebuggerThread' into debug-debugger.c.
1712 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
1714 * profiler.c: fix printing of data.
1716 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
1718 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
1719 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
1721 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
1723 * object.c: fix deadlock related to string interning.
1725 2006-01-23 Martin Baulig <martin@ximian.com>
1727 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
1729 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
1731 2006-01-23 Martin Baulig <martin@ximian.com>
1733 * mono-debug.h: Moved the prototypes of some functions which are
1734 used by the JIT here from mono-debug-debugger.h.
1736 2006-01-21 Martin Baulig <martin@ximian.com>
1738 * Makefile.am: Don't install mono-debug-debugger.h.
1740 2006-01-21 Martin Baulig <martin@ximian.com>
1742 * mono-debug-debugger.h: Enforce the private status of this header
1743 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
1744 Moved some stuff from mono-debugger-jit-wrapper.h here.
1746 2006-01-20 Raja R Harinath <rharinath@novell.com>
1748 * class.c (mono_class_from_typeref): Add a sanity test to help
1749 catch lack of assembly load/search hooks.
1751 2006-01-19 Zoltan Varga <vargaz@gmail.com>
1753 * marshal.c (emit_struct_conv): Relax the fields with same offset
1754 check even more. Fixes #77230.
1756 2006-01-18 Martin Baulig <martin@ximian.com>
1758 * loader.c (find_method_in_class): Added `gboolean is_inflated'
1759 argument; if false, we compare the uninstantiated signatures.
1760 (method_from_memberref): Compare the uninstantiated signatures;
1763 2006-01-18 Robert Jordan <robertj@gmx.net>
1765 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
1766 Clear the weak link. Fixes bug #77170.
1768 * gc.c (mono_gchandle_free):
1769 Reflect *-gc.c changes (tiny optimization).
1771 2006-01-18 Zoltan Varga <vargaz@gmail.com>
1773 * metadata.c (mono_metadata_signature_dup): Applied patch from
1774 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
1777 2006-01-17 Zoltan Varga <vargaz@gmail.com>
1779 * marshal.c (emit_struct_conv): Allow fields with the same offset when
1780 marshalling from native to managed code. Fixes #77230.
1782 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1784 * threadpool.c: fix problem (Mac only) when more than one asynchronous
1785 connect. Fixes bug #77020.
1787 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
1789 * class.c: fixed id assignement for nested interfaces (bug #77275).
1790 Added also better info for --print-vtable debugging.
1792 2006-01-12 Martin Baulig <martin@ximian.com>
1794 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
1795 interfaces on-the-fly; fixes #76625.
1798 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
1799 don't need that anymore.
1801 2006-01-12 Miguel de Icaza <miguel@novell.com>
1804 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
1805 To avoid initing the nested_classes when not needed I turned the
1806 PeerCredData as a toplevel internal class, as it has to be shared
1809 Fixes the CASA issue.
1811 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
1813 * domain.c: Accessors for MonoJitInfo
1815 * profiler-private.h: Add jitinfo to the end jit hook
1817 * profiler.[ch]: Define new hooks, called after jitting which give
1818 the MonoJitInfo that was compiled
1820 2006-01-10 Martin Baulig <martin@ximian.com>
1822 * class.c (mono_class_setup_events): Add support for generic
1823 classes; fixes #76440.
1825 2006-01-06 Raja R Harinath <rharinath@novell.com>
1828 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
1829 on passed-in method.
1831 2006-01-03 Zoltan Varga <vargaz@gmail.com>
1833 * object.c (mono_runtime_invoke_array): Add Nullable support.
1835 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
1837 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
1839 * file-io.c: Don't consider sockets as directory and avoid an endless
1840 loop. Fix bug #76966.
1842 2006-01-03 Zoltan Varga <vargaz@gmail.com>
1844 * object.c (mono_nullable_init): New helper function.
1845 (mono_nullable_box): Ditto.
1847 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
1849 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
1851 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
1853 2006-01-02 Zoltan Varga <vargaz@gmail.com>
1855 * class.c (mono_class_is_assignable_from): Make T assignable to
1858 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
1860 * appdomain.c: Bump corlib version to 46.
1861 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
1862 serialization purpose) and changed ves_icall_System_Reflection_
1863 Assembly_get_code_base signature to accept a boolean (to escape, or
1864 not, the assembly code base).
1866 2005-12-23 Dick Porter <dick@ximian.com>
1870 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
1871 CreateEvent icall now returns "created" boolean parameter.
1873 2005-12-22 Zoltan Varga <vargaz@gmail.com>
1875 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
1878 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
1879 when attr_klass is an interface. Fixes #77045.
1881 2005-12-20 Zoltan Varga <vargaz@gmail.com>
1883 * marshal.c (emit_struct_conv): Fix previous patch.
1885 * marshal.c (emit_struct_conv): Add a check for fields with the same
1888 2005-12-20 Raja R Harinath <rharinath@novell.com>
1890 Fix regression in Mono.C5.
1891 * class.c (mono_class_create_generic): If 'klass' is an interface
1892 set up the interface offsets.
1893 (mono_class_is_assignable_from): Don't throw away generic arguments.
1895 2005-12-19 Raja R Harinath <rharinath@novell.com>
1897 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
1900 2005-12-15 Raja R Harinath <rharinath@novell.com>
1902 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
1904 (do_mono_metadata_parse_generic_class): Don't pass the current
1905 generic context when parsing the type being instantiated: it
1906 cannot use it, anyway.
1908 * loader.c (method_from_memberref): Don't inflate a signature if
1909 it doesn't contain any type parameters.
1911 2005-12-15 Zoltan Varga <vargaz@gmail.com>
1913 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
1915 2005-12-14 Martin Baulig <martin@ximian.com>
1918 (mono_type_get_name_recurse): Don't return null for type
1919 parameters and open generic classes.
1920 (mono_class_setup_methods): Don't exclude generic instances.
1921 (mono_get_unique_iid): Use different IDs for different
1922 instantiations of the same generic type.
1923 (mono_class_setup_vtable): Only use setup_generic_vtable() for
1924 open generic instances; create a normal vtable for closed generic
1926 (mono_class_setup_vtable_general): We're now also called for
1927 closed generic instances.
1930 (mono_reflection_bind_generic_parameters): Correctly use
1931 mono_metadata_lookup_generic_inst() everywhere.
1933 2005-12-14 Zoltan Varga <vargaz@gmail.com>
1935 * object.c (mono_class_create_runtime_vtable): Call
1936 mono_class_setup_vtable ().
1938 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
1940 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
1943 * loader.c (mono_loader_set_error_type_load): Print the type load
1944 warnings to the console so they are more visible to the user.
1945 (mono_loader_set_error_method_load): Ditto.
1947 * reflection.c (ensure_runtime_vtable): Revert the last change as it
1950 * reflection.c (ensure_runtime_vtable): Fix build.
1952 * reflection.c (ensure_runtime_vtable): Disable an optimization which
1953 doesn't work in all cases.
1955 2005-12-13 Zoltan Varga <vargaz@gmail.com>
1957 * object.c (mono_array_new_full): Treat a single dimensional array
1958 with 0 lower bounds as an szarray. Fixes #76973.
1960 * reflection.c (custom_attr_visible): Really fix this.
1962 2005-12-12 Zoltan Varga <vargaz@gmail.com>
1964 * reflection.c (custom_attr_visible): Allow nested public attributes
1967 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
1970 2005-12-12 Raja R Harinath <harinath@gmail.com>
1972 * class.c (set_generic_param_owner): Delete.
1973 (mono_class_create_from_typedef): Don't set ->owner field of
1974 generic parameters to "param containers" of enclosing classes.
1975 * reflection.c (mono_reflection_initialize_generic_parameter):
1978 2005-12-11 Zoltan Varga <vargaz@gmail.com>
1980 * reflection.c (custom_attr_visible): Fix build.
1982 2005-12-10 Zoltan Varga <vargaz@gmail.com>
1984 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
1987 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
1988 handling of null parameter defaults.
1990 2005-12-09 Raja R Harinath <rharinath@novell.com>
1992 * class.c (mono_class_from_generic_parameter): Don't set
1993 klass->generic_container.
1994 (my_mono_class_from_generic_parameter): Likewise.
1996 2005-12-07 Zoltan Varga <vargaz@gmail.com>
1998 * reflection.c (load_public_key): Fix a warning.
1999 (method_encode_code): Fix unaligned accesses.
2001 2005-12-07 Martin Baulig <martin@ximian.com>
2003 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
2006 (write_generic_param_entry): Encode our custom attrs.
2008 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
2010 2005-12-07 Martin Baulig <martin@ximian.com>
2012 * reflection.c (encode_new_constraint): Removed; we don't use the
2013 `NewConstraintAttribute' anymore.
2015 2005-12-06 Zoltan Varga <vargaz@gmail.com>
2017 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
2018 not fire a TypeResolve event when Assembly.GetType () is called.
2020 2005-12-05 Ben Maurer <bmaurer@ximian.com>
2022 Beginning of support for nullable types in the runtime. Parts of
2023 this patch are from Martin.
2025 * appdomain.c (MONO_CORLIB_VERSION): Bump
2027 * domain.c (mono_init_internal): get the nullable type
2029 * class.c (mono_class_is_nullable): New method
2030 (mono_class_get_nullable_param): New mehod
2031 (mono_class_create_generic): In types T? set cast_class to T
2033 * class-internals.h (MonoDefaults): new nullable default class
2034 (mono_class_get_nullable_param, mono_class_get_nullable_param):
2037 2005-12-05 Raja R Harinath <rharinath@novell.com>
2039 * metadata.c (select_container): New. Refactor code to select the
2040 appropriate GenericContainer given the type of generic parameter
2042 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
2043 not a MonoGenericContext. Use select_container. Update parameters.
2044 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
2046 (unwrap_arrays): Remove duplicate tests.
2047 (find_generic_param): Rename from 'has_same_context'. Now walks a
2048 generic instantiated class to find any arguments that are generic
2050 (mono_type_create_from_typespec_full): Use find_generic_param to
2051 avoid evicting some generic instantiations from the typespec
2054 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
2056 * reflection.c: fixed writing of doubles on ARM FPA.
2058 2005-12-02 Robert Jordan <robertj@gmx.net>
2060 * icall.c: Fixed EventInfo.ReflectedType (#76829).
2062 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2064 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
2065 least on SUSE 10 they are not the same (on debian, they are just the
2068 2005-12-01 Raja R Harinath <rharinath@novell.com>
2070 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
2071 DeclaringType for VARs and MVARs.
2072 * class.c (set_generic_param_owner): Fix initialization of owner
2075 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
2077 * icall.c: fixed Enum.ToObject() to correctly convert the values.
2079 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2081 * threadpool.c: workaround for a bug that shows up on the Mac:
2082 select()+connect() on a blocking socket is not like it should
2083 be, so we proceed to connect() in that case, wasting the I/O
2084 threadpool thread until connect succeedes. Fixes bug #75436.
2086 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2088 * threadpool.c: fix typo when setting file descriptor states.
2090 2005-11-28 Raja R Harinath <rharinath@novell.com>
2092 * class-internals.h (MonoGenericContainer.is_signature): Remove.
2093 * metadata.c (mono_metadata_parse_method_signature_full): Don't
2094 create a temporary signature container.
2095 (mono_metadata_parse_generic_param): Update to changes.
2096 (mono_type_create_from_typespec_full): Update to changes.
2097 * loader.c (method_from_memberref): Don't use a
2098 MonoGenericContainer while parsing a memberref signature.
2099 (method_from_methodspec): Remove dead-store of the 'container'
2100 variable. It's overwritten before use.
2102 * metadata.c (mono_type_create_from_typespec_full): Make debugging
2104 (mono_metadata_parse_generic_param): Likewise.
2105 * loader.c (find_method_in_class): Does not need a
2106 MonoGenericContainer. Use 'mono_method_signature' rather than
2107 'mono_method_signature_full'.
2108 (find_method, mono_get_method_constrained, method_from_memberref):
2111 * metadata.c (mono_type_create_from_typespec_full): Ensure that
2112 owner-less generic-parameters are never evicted from the typespec
2115 * loader.c (method_from_memberref): Don't use the current context
2116 when parsing signatures.
2117 (method_from_methodspec, mono_get_method_from_token): Update to changes.
2119 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
2120 side-effects in g_assert.
2121 * loader.c (mono_get_method_from_token): Resolve klass earlier so
2122 that we don't potentially lose information.
2124 2005-11-26 Dick Porter <dick@ximian.com>
2127 * threads.c: icalls to implement basic (ie, not named)
2128 System.Threading.Semaphore.
2130 2005-11-24 Dick Porter <dick@ximian.com>
2133 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
2134 Use GetProcessId() if it's available.
2136 2005-11-23 Zoltan Varga <vargaz@gmail.com>
2138 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
2140 2005-11-23 Raja R Harinath <rharinath@novell.com>
2141 Ankit Jain <jankit@novell.com>
2143 * loader.c (mono_get_method_from_token): Initialize 'method' field
2144 of all generic parameters before parsing the signature. Remove
2145 code that "fixed"-up MVAR references.
2147 2005-11-23 Ankit Jain <jankit@novell.com>
2149 * metadata.c (mono_metadata_has_generic_params):
2150 (mono_metadata_load_generic_param_constraints):
2151 (mono_metadata_load_generic_params): Move duplicate code ...
2152 (mono_metadata_get_generic_param_row): ... here. Returns the
2153 first row-id in GenericParam table for a given owner (token).
2154 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
2157 2005-11-23 Raja R Harinath <rharinath@novell.com>
2158 Ankit Jain <jankit@novell.com>
2160 * metadata.c (mono_metadata_class_equal): Pass signature_only when
2162 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
2163 type->data.generic_param only if the type is an MVAR.
2164 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
2165 leak owner-less VARs and MVARs into managed space.
2167 2005-11-21 Martin Baulig <martin@ximian.com>
2170 (MonoMethod): Moved the `generic_container' here from
2171 `MonoMethodNormal' since we now also need it for
2172 `MonoMethodPInvoke';
2173 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
2174 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
2175 an union containing both `MonoMethodNormal' and
2176 `MonoMethodPInvoke'.
2179 (mono_get_method_from_token): Allow implementing generic methods
2183 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
2186 2005-11-17 Dick Porter <dick@ximian.com>
2190 * process.c: Split the Process Start_internal icall into
2191 ShellExecuteEx_internal and CreateProcess_internal, which are
2192 called depending on whether UseShellExecute is true. Fixes bug
2195 * appdomain.c (MONO_CORLIB_VERSION): Incremented
2197 2005-11-17 Zoltan Varga <vargaz@gmail.com>
2199 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
2200 'msize' parameters, use the information in 'mspec' instead.
2201 (emit_object_to_ptr_conv): Ditto.
2203 * marshal.c (emit_struct_conv): Handle explicit layout structs with
2204 fields out of order. Fixes #76733.
2206 2005-11-17 Ankit Jain <jankit@novell.com>
2208 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
2210 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
2212 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
2215 2005-11-16 Zoltan Varga <vargaz@gmail.com>
2217 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
2218 for types with non-auto layout. Fixes #76717.
2220 2005-11-16 Ankit Jain <jankit@novell.com>
2222 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
2223 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
2224 if generic_context is null.
2225 (mono_metadata_generic_param_equal): param->owner can be null.
2226 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
2229 2005-11-16 Zoltan Varga <vargaz@gmail.com>
2231 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
2234 2005-11-15 Martin Baulig <martin@ximian.com>
2236 * object.c (set_value): Use mono_class_from_mono_type() instead of
2237 the hack for generic instances; fixes #76136.
2239 2005-11-15 Zoltan Varga <vargaz@gmail.com>
2241 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
2244 * image.c (load_metadata_ptrs): Initialize the new fields.
2246 * reflection.c (create_dynamic_mono_image): Ditto.
2248 * reflection.c (build_compressed_metadata): Use the new fields.
2250 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
2253 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
2256 2005-11-15 Ankit Jain <jankit@novell.com>
2257 Raja R Harinath <harinath@gmail.com>
2259 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
2260 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
2261 new per-generic_container cache if the cached MonoType's context matches
2262 the current context.
2263 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
2264 to the expected context.
2265 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
2267 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2269 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
2270 we changed the signature of an icall.
2271 * icall.c: Modify to mono_double_ParseImpl return true/false
2272 depending on the success, instead of throwing the exception. This will
2273 help us in Double.TryParse methods.
2275 2005-11-14 Zoltan Varga <vargaz@gmail.com>
2277 * marshal.c (emit_marshal_object): Throw an exception when
2278 marshalling 'object' instead of crashing. Fixes #76696.
2280 2005-11-11 Zoltan Varga <vargaz@gmail.com>
2282 * class-internals.h: Add prototype for mono_type_get_full_name ().
2284 2005-11-11 Dick Porter <dick@ximian.com>
2286 * threads.c (mono_thread_manage): Make sure the main thread has
2287 abandoned all its mutexes when cleaning up. Fixes bug 74680.
2289 2005-11-11 Zoltan Varga <vargaz@gmail.com>
2291 * loader.c (mono_loader_set_error_type_load): Log a warning to the
2292 console about the missing type.
2293 (mono_loader_set_error_method_load): Ditto.
2295 2005-11-09 Miguel de Icaza <miguel@novell.com>
2297 * mono-config.c (mono_get_config_dir): Set the system defaults if
2300 * assembly.c (mono_set_dirs): New API entry point to set the
2301 assembly and the config directory in one call
2303 2005-11-09 Zoltan Varga <vargaz@gmail.com>
2305 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
2306 the ftnptr was created from a delegate in a domain other than the
2307 current domain. Fixes #75377.
2309 * exception.h exception.c: Add mono_get_exception_not_supported ().
2311 2005-11-08 Martin Baulig <martin@ximian.com>
2313 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
2315 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
2317 * security-manager.h: Added definitions to deal with strongname key
2318 pairs bigger (and smaller) than 1024 bits.
2319 * reflection.c: Remove hardcoded strongname size (128 bytes) and
2320 adjust wrt the public key length being used.
2322 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
2324 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
2325 Windows build (r51396-51397).
2327 2005-11-03 Martin Baulig <martin@ximian.com>
2329 * class.c (mono_class_setup_vtable_general): Also add generic
2330 methods to the vtable; fixes #76581.
2332 2005-11-01 Miguel de Icaza <miguel@novell.com>
2334 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
2335 sure that we lookup GetString method from the System.Text.Encoding
2336 class, not the derived class or we get an empty method.
2340 2005-10-25 Miguel de Icaza <miguel@novell.com>
2342 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
2343 if it has been previously set (embedders).
2345 Make mono_set_rootdir available also on Unix.
2347 005-10-24 Robert Jordan <robertj@gmx.net>
2349 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
2351 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
2353 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
2354 only calls which are made to native code use this flag.
2356 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
2358 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
2360 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
2361 Add support for FieldBuilders.
2363 2005-10-29 Martin Baulig <martin@ximian.com>
2366 (mono_debug_using_mono_debugger): New public method; returns
2367 whether we're running inside the debugger.
2369 2005-10-27 Zoltan Varga <vargaz@gmail.com>
2371 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
2372 for Method/Constructor/FieldBuilders.
2374 2005-10-26 Zoltan Varga <vargaz@gmail.com>
2376 * reflection.c (module_add_cattrs): Save custom attributes for global methods
2379 2005-10-26 Martin Baulig <martin@ximian.com>
2381 * mono-debug-debugger.c
2382 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
2384 2005-10-24 Raja R Harinath <harinath@gmail.com>
2386 * icall.c (base64_to_byte_array): Don't pass an out-of-range
2389 2005-10-21 Zoltan Varga <vargaz@gmail.com>
2391 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
2392 when passing valuetypes byref. Fixes #76502.
2394 2005-10-19 Jackson Harper <jackson@ximian.com>
2396 * profiler.c: Don't put a . in front of types that are not in a
2399 2005-10-18 Zoltan Varga <vargaz@gmail.com>
2401 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
2403 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
2405 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
2407 (mono_marshal_get_ldflda_wrapper): Fix a warning.
2409 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2411 * assembly.c metadata-internals.h icall.c: Define an additional
2412 parameter for mono_assembly_name_parse_full, so we can avoid creating
2413 S.R.AssemblyName.Version when no version info wasn't passed.
2415 2005-10-09 Miguel de Icaza <miguel@novell.com>
2417 * class.c (mono_type_get_full_name): Reimplement method that was
2420 * image.c: Some docs
2422 2005-10-10 Zoltan Varga <vargaz@gmail.com>
2424 * profiler.c (output_newobj_profile): Fix printing of Total memory
2427 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
2429 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
2431 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
2433 * threads.c: remove debug output.
2435 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
2437 * threads.c (mono_thread_manage): Fix crashes if more than 64
2438 threads need to be aborted. Hopefully fixes #75899.
2440 * assembly.c (mono_stringify_assembly_name): New helper function.
2442 * class.c: Use mono_stringify_assembly_name instead of the similar
2445 * assembly.h assembly.c: Add support for calling a postload search
2446 hook if an assembly cannot be loaded.
2448 * appdomain.c: Register new search hooks which call the AssemblyResolve
2449 events in AppDomain. Fixes #75231
2451 2005-10-07 Martin Baulig <martin@ximian.com>
2453 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
2454 methods without debug info.
2456 2005-10-07 Zoltan Varga <vargaz@gmail.com>
2458 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
2461 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2463 * file-io.c: now that we return symlinks, use lstat and, when the file
2464 is a symbolic link, stat, to get the file attributes. Also avoid the
2465 conversion to/from utf16/external.
2467 2005-10-06 Zoltan Varga <vargaz@gmail.com>
2469 * class.c (mono_class_layout_fields): Compute klass->has_references
2470 correctly if an embedded valuetype is not yet initialized. Fixes
2473 2005-10-04 Martin Baulig <martin@ximian.com>
2476 (mono_metadata_load_generic_param_constraints): New public
2477 function; splitted the constraints loading out from
2478 mono_metadata_load_generic_params().
2480 * class.c (mono_class_create_from_typedef): Call
2481 mono_metadata_load_generic_param_constraints() after setting up
2482 the type and creating our parent; fixes #75329.
2484 2005-10-04 Martin Baulig <martin@ximian.com>
2486 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
2487 non-dynamic parent classes.
2489 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
2491 * file-io.c : win32 build fix (ETXTBSY seems not found).
2493 2005-10-04 Martin Baulig <martin@ximian.com>
2496 (mono_image_get_methodspec_token): Make the cache actually work;
2499 2005-10-04 Martin Baulig <martin@ximian.com>
2501 * class.c (mono_class_name_from_token): Removed the unneccessary
2502 `MonoGenericContext *' argument.
2504 2005-10-04 Martin Baulig <martin@ximian.com>
2507 (method_from_methodspec): Make the caching work again; fixes the
2508 performance regression from #76262.
2510 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2514 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
2515 GetFileSystemEntries that performs the same work but without going
2516 into io-layer, locking, etc.
2518 2005-09-30 Zoltan Varga <vargaz@gmail.com>
2520 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
2521 ThreadState_Stopped as well. Fixes #76047.
2523 2005-09-29 Martin Baulig <martin@ximian.com>
2526 (inflate_generic_context): If the new context has a `gmethod', set
2527 its `container' that that gmethod's `container'.
2530 (mono_metadata_parse_generic_param): Simplify things;
2531 `generic_container = generic_context->container;' is just fine.
2533 * loader.c (method_from_methodspec): Code cleanups.
2535 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
2537 * decimal.c: fix warning (and let gcc generate correct
2538 code on ARM with optimizations).
2540 2005-09-28 Martin Baulig <martin@ximian.com>
2543 (method_from_memberref): Added `MonoGenericContext *class_context'
2544 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
2545 (method_from_methodspec): If we're a memberref, use the enclosing
2546 context when parsing its parent. Fixes #76262; see gtest-206.cs.
2548 2005-09-28 Martin Baulig <martin@ximian.com>
2550 * object.c (mono_runtime_invoke_array): Added support for
2551 MONO_TYPE_GENERICINST; fixes #75917.
2553 2005-09-27 Martin Baulig <martin@ximian.com>
2555 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
2556 `k->byval_arg.type' to determine the actual type.
2558 * loader.c (method_from_methodspec): Removed some hacks.
2560 2005-09-27 Ben Maurer <bmaurer@ximian.com>
2562 * class-internals.h (mono_field_is_deleted): Do the test for
2563 rtspecialname before we check the actual name of the field. This
2564 prevents us from dereferencing a pointer into the string table,
2565 saving us from accessing a few pages
2567 * *.c: Replace the use of {Enter,Leave}CriticalSection with
2568 macros. This will allow a deadlock debugger to easily be plugged
2571 2005-09-27 Martin Baulig <martin@ximian.com>
2573 * loader.c (method_from_methodspec): Create a "signature"
2574 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
2576 2005-09-27 Martin Baulig <martin@ximian.com>
2579 (inflate_generic_class): Correctly set the new context's
2583 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
2584 instead of a `MonoGenericContext *'.
2585 (mono_method_signature_full): Take a `MonoGenericContainer *'
2586 instead of a `MonoGenericContext *'.
2589 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
2590 instead of a `MonoGenericContext *'.
2591 (mono_metadata_parse_method_signature_full): Likewise.
2593 2005-09-26 Martin Baulig <martin@ximian.com>
2596 (mono_class_from_generic_parameter): Set `klass->generic_container'
2597 (mono_class_from_generic_parameter): Likewise.
2598 (mono_bounded_array_class_get): We inherit the generic container
2599 from the element class.
2602 (find_method, find_method_in_class): Take a `MonoGenericContext *'
2603 argument rather than computing it here.
2604 (method_from_memberref): Correctly set the generic context before
2605 parsing the signature. Fixes #75681.
2607 2005-09-26 Zoltan Varga <vargaz@gmail.com>
2609 * object.c (mono_class_has_special_static_fields): Fix warnings.
2611 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2613 * assembly.c: Add parse_public_key function, to
2614 par the public keys. Also added mono_assembly_name_parse_full,
2615 to define it the parsed key should be freed or not.
2616 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
2617 to parse a long format assembly name.
2618 * metadata-internals.h: Keep mono_assembly_name_parse_full as
2619 private, since calling it to preserve the key requires
2620 freeing it manually.
2622 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
2624 * locales.c : removed HAVE_ICU part.
2626 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
2628 * object.c (mono_class_create_runtime_vtable): Avoid calling
2629 field_is_special_static if the klass has no special static fields.
2631 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
2632 (MonoCachedClassInfo): Likewise.
2634 * object.c (mono_class_has_special_static_fields): New helper function.
2636 2005-09-23 Zoltan Varga <vargaz@gmail.com>
2638 * class.c (mono_class_create_from_typedef): Don't call
2639 interfaces_from_typedef_full for enums.
2640 (mono_class_create_from_typedef): Compute the base types of enums directly
2641 without calling mono_class_setup_fields ().
2642 (mono_class_find_enum_basetype): New helper function.
2644 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
2645 one place inside the string heap.
2647 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
2649 * class.c: locking fixes, code cleanups, some docs added.
2650 Allocate some data structures in the image mempool.
2652 2005-09-23 Zoltan Varga <vargaz@gmail.com>
2654 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2657 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
2659 * class-internals.h, class.c, reflection.c: reduce memory taken by
2662 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
2664 * metadata.c, metadata.h, loader.h: documentation updates, code and
2667 2005-09-23 Zoltan Varga <vargaz@gmail.com>
2669 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
2672 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
2673 page faults caused by the runtime while reading metadata.
2675 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2677 * socket-io.c: the field names were changed 3 months ago and no one
2678 realized until bug #76077 got filed!
2680 2005-09-20 Martin Baulig <martin@ximian.com>
2682 * icall.c (assembly_icalls): Removed some unused debugger icalls.
2684 2005-09-20 Martin Baulig <martin@ximian.com>
2686 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
2687 write the rank into the class entry.
2689 2005-09-20 Martin Baulig <martin@ximian.com>
2691 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
2693 2005-09-19 Zoltan Varga <vargaz@gmail.com>
2695 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2697 * icall.c (custom_attrs_defined_internal): New icall.
2699 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
2701 (mono_custom_attrs_construct_by_type): New helper function.
2703 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
2705 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
2706 terminate the resulting string. Fixes #76123.
2708 2005-09-16 Martin Baulig <martin@ximian.com>
2711 (mono_debug_add_method): Ignore inflated methods for the moment.
2713 2005-09-14 Martin Baulig <martin@ximian.com>
2715 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
2717 2005-09-13 Zoltan Varga <vargaz@gmail.com>
2719 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
2720 return a success/failure indication.
2721 (mono_metadata_interfaces_from_typedef_full): Ditto.
2722 (get_constraints): Ditto.
2724 2005-09-12 Zoltan Varga <vargaz@gmail.com>
2726 * marshal.c (emit_marshal_array): Fix handling of null arrays.
2728 * marshal.c (emit_marshal_array): Add support for returning string
2729 arrays from delegates. Fixes #76063.
2731 * marshal.c: Use the emit_ldloc/stloc macros where possible.
2733 2005-09-11 Zoltan Varga <vargaz@gmail.com>
2735 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
2738 2005-09-09 Zoltan Varga <vargaz@gmail.com>
2740 * reflection.c icall.c: Fix after mono_get_exception_type_load
2743 * assembly.c (mono_assembly_get_assemblyref): New helper function.
2744 (mono_assembly_load_reference): Use the new helper.
2746 * class-internals.h (MonoLoaderError): New structure containing
2747 information about type loading errors.
2749 * class-internals.h loader.c: Add APIs to store per-thread loader
2752 * loader.c class.c: Set the loader error if needed.
2754 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
2756 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
2758 * decimal.c: fixed to handle the broken ARM fp format.
2760 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
2762 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
2765 2005-09-06 Martin Baulig <martin@ximian.com>
2767 * domain.c (supported_runtimes): Added v2.0.50727.
2769 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
2771 * culture-info.h: reduce the size of some structures.
2773 2005-09-05 Martin Baulig <martin@ximian.com>
2775 Reflect latest API changes in the August CTP.
2778 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
2779 ("MonoType.HasGenericArguments"): Removed.
2780 ("MonoMethod.BindGenericParameters"): Renamed to
2781 "MakeGenericMethod".
2782 ("MethodBuilder.BindGenericParameters"): Renamed to
2783 "MakeGenericMethod".
2785 2005-09-05 Martin Baulig <martin@ximian.com>
2787 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
2789 2005-09-05 Martin Baulig <martin@ximian.com>
2791 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2793 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
2794 generic_container is non-NULL.
2796 2005-09-05 Martin Baulig <martin@ximian.com>
2798 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2800 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
2802 2005-08-29 Michal Moskal <malekith@nemerle.org>
2804 * reflection.c (encode_locals,
2805 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
2806 for large generic types.
2808 2005-09-05 Martin Baulig <martin@ximian.com>
2810 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2812 * class.c (mono_dup_array_type): New public method.
2813 (mono_metadata_signature_deep_dup): New public method.
2814 (dup_type): Correctly duplicate array and function types.
2816 2005-09-05 Martin Baulig <martin@ximian.com>
2818 Applying a patch from Michal Moskal <malekith@nemerle.org>.
2820 * reflection.c (get_default_param_value_blobs): Handle generic types
2821 and generic methods.
2823 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
2825 * class.c: Fixed error reporting (method/class were inversed) for
2826 inheritance demands.
2827 * security-manager.c|h: Added the AppDomain when calling the managed
2828 System.Security.SecurityManager.InheritanceDemand method.
2830 2005-09-01 Raja R Harinath <rharinath@novell.com>
2832 * reflection.c (encode_marshal_blob): 'marshaltype' and
2833 'marshaltyperef' are alternate sources for the custom marshaler
2836 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
2838 * class.c: fix creation of array classes with rank == 1
2839 (patch by Ankit Jain <jankit@novell.com>).
2841 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
2843 * object.c: fix check for creating the bound data for arrays vs
2846 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2848 * object.c: configuration file name is now based on the executable name,
2849 not the image name. Fixes bug #75931.
2851 2005-08-29 Zoltan Varga <vargaz@gmail.com>
2853 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
2854 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
2856 2005-08-25 Zoltan Varga <vargaz@gmail.com>
2858 * rand.c: Use wincrypt.h instead of WinCrypt.h.
2860 2005-08-24 Ankit Jain <jankit@novell.com>
2861 Raja R Harinath <rharinath@novell.com>
2863 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
2864 called by it recursively.
2865 (mono_class_init): Remove special case in pending_init handling, since it's
2866 superseded by the fix to mono_class_from_typeref.
2868 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
2870 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
2871 BROKEN_THREAD_START stuff.
2873 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
2875 * class-internals.h object.c: Add a new kind of trampoline called a delegate
2878 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
2880 * object.c (mono_delegate_ctor): Replace the original function address with
2881 a delegate trampoline.
2883 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
2885 * icall.c: add boolean argument to base64_to_byte_array and
2886 InternalFromBase64String to control whether a whitespace-only string
2887 is allowed (or should casue a FormatException to be thrown). We need
2888 this as the behavior has changed between MS.NET 1.x and 2.0, and we
2889 to match the MS behaviour in both profiles.
2890 * appdomain.c: Bump corlib version.
2892 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
2894 This patch implements a big portion of publisher policy
2895 support, used to bind assembly versions and redirect
2896 one assembly from version A to version B.
2899 New GSList loaded_assembly_bindings, for storing the cached
2901 (assembly_binding_maps_name): New static function for checking if a
2902 assembly binding information maps an assembly name.
2903 (mono_assembly_binding_info_free): New function for freeing
2904 assembly binding information resources.
2905 (get_publisher_policy_info): New static function for retrieving
2906 assembly binding information from a MonoImage.
2907 (compare_versions): New static function for comparing an assembly
2908 binding information data and the version of an assembly name.
2909 (check_policy_versions): New static function for checking if an
2910 assembly binding info mapping an assembly name is valid for it.
2911 (mono_assembly_load_publisher_policy): New static function for
2912 loading the 'policy.major.minor.MyAssembly' image for an assembly
2913 with an assembly name 'aname'.
2914 (mono_assembly_bind_version): New static function for updating
2915 assembly redirection.
2916 (mono_assembly_apply_binding): New static function for applying
2918 (search_binding_loaded): New static function for searching
2919 loaded assembly binding infos in the cache domain.
2920 (mono_assembly_load_full): Don't apply assembly binding for
2921 reflection only assemblies.
2923 * metadata-internals.h: Add MonoAssemblyBindingInfo,
2924 which contains information about assembly binding. Also
2925 declare signature for mono_config_parse_publisher_policy ()
2926 function, used to retrieve pub policy info.
2929 (publisher_policy_start): New static function used to parse publisher
2930 policy config files.
2931 (publisher_policy_parser): New static MonoParseHandler containing
2932 the functions used when parsing config files.
2933 (mono_config_parse_publisher_policy): New function for parsing
2934 publisher policy files.
2936 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
2938 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
2940 * marshal.c (mono_delegate_free_ftnptr): Ditto.
2942 * object.c (mono_get_addr_from_ftnptr): New helper function.
2944 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
2946 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
2948 2005-08-19 Dick Porter <dick@ximian.com>
2950 * threads.c, threads.h, appdomain.c, appdomain.h,
2951 profiler-private.h, monitor.c, object.c, object-internals.h,
2952 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
2953 store the thread ID, so it can hold a 64 bit value if needed.
2955 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
2957 * reflection.c (mono_reflection_create_dynamic_method): Store the
2958 handle class into the method references as well so ldtoken works in
2961 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
2964 2005-08-19 Ankit Jain <jankit@novell.com>
2967 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
2968 here rather than using the method signature of a arbitrary function
2969 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
2971 Hack done with Harinath.
2973 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2975 * threadpool.c: disable printing stack traces when we get a exception
2976 in a threadpool thread. I need to do more testing to figure out which
2977 cases actually print this. Fixes bug #75828.
2979 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2981 * icall.c: there might be ignored whitespace after the last '='. This
2982 fixes length computation and bug #75840.
2984 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
2986 * assembly.c (mono_assembly_load_full): Consider .exe extension as
2989 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
2992 * reflection.c (create_custom_attr_data): Ditto.
2994 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
2996 * locales.c, culture-info.h : removed RegionLCIDMap.
2997 * culture-info-tables.h : regenerated.
2999 2005-08-16 Martin Baulig <martin@ximian.com>
3001 * class.c (mono_type_get_name_recurse): Small fix.
3003 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
3005 * locales.c : indentation fixie.
3007 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
3009 * object-internals.h,
3013 icall.c : added RegionInfo table support.
3014 * culture-info-table.h : regenerated for region support.
3016 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
3018 * reflection.c (resolve_object): handle all kinds of MonoMethod
3019 including generic ones
3021 2005-08-12 Ankit Jain <jankit@novell.com>
3023 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
3024 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
3026 2005-09-12 Lluis Sanchez <lluis@ximian.com>
3028 * process.c: Don't close a thread handle when it's NULL. This is a
3029 workaround for bug #75733.
3031 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
3033 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
3035 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
3037 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
3039 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3041 * threadpool.c: if a work item in the thread pool has a callback that
3042 catches a exception, don't propagate it after invoking the callback.
3045 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
3047 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
3049 * class-internals.h (MonoCachedClassInfo): Add some new fields.
3051 * class.c (mono_class_init): Load field info lazily in the AOT case.
3053 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
3055 2005-08-03 Ankit Jain <jankit@novell.com>
3058 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
3059 PInvoke calling convention is 0.
3061 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
3063 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
3064 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
3066 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
3068 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
3069 to handle threads not started by the GC (patch by Michael Meeks
3070 <michael.meeks@novell.com>).
3072 2005-07-31 Kamil Skalski <nazgul@omega.pl>
3074 * reflection.c: Make buffer used in emitting types larger for some
3075 big generic types (patch by Michal Moskal).
3077 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
3079 * mono-debug.c: Fix some (not all) alignment problems.
3081 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3083 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
3084 Invoke mono_image_load_from_data_full passing the refonly
3088 (mono_assembly_open_from_bundle): Add the refonly argument,
3089 in order to pass it to other methods it calls to.
3090 (do_mono_assembly_open): Add the refonly argument, in order
3091 to pass it to other methods it calls to.
3092 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
3093 the refonly parameter to it.
3095 * image.c: Add loaded_images_refonly_hash and
3096 loaded_images_refonly_guid_hash to cache the reflection
3098 (mono_images_init): Initialize the hash tables used for
3099 caching the reflection only images.
3100 (load_modules): Invoke mono_image_open_full passing the refonly
3101 parameter to load the modules the correct way.
3102 (build_guid_table): Add the refonly argument, to re-build the
3104 (do_mono_image_open): Added the refonly argument, in order to
3105 define it for the loaded image.
3106 (mono_image_loaded_full): New function, which receives an
3107 additional parameter to look for the image in the refonly or
3108 non-refonly section.
3109 (mono_image_loaded): Updated, using mono_image_loaded_full.
3110 (mono_image_loaded_by_guid_full): The same case that happens
3111 with mono_image_loaded_full.
3112 (mono_image_loaded_by_guid): Likewise.
3113 (register_image): Use the ref_only variable inside MonoImage
3114 to decide in which hash table store the current image.
3115 (mono_image_open_from_data_full): Rename
3116 mono_image_open_from_data to mono_image_open_from_data_full,
3117 adding the refonly argument, to define the ref_only variable
3119 (mono_image_open_from_data): Return
3120 mono_image_open_from_data_full.
3121 (mono_image_open_full): Rename mono_image_open to
3122 mono_image_open_full, receiving the new refonly argument,
3123 to pass it to inner methods.
3124 (mono_pe_file_open): Update this function, to open
3125 a MonoImage as a non-refonly image.
3126 (mono_image_close): Use the refonly variable inside
3127 MonoImage to remove the image from the correct caches.
3129 * image.h: Add the signatures of mono_image_open_full,
3130 mono_image_open_from_data_full, mono_image_loaded_full,
3131 mono_image_loaded_by_guid_full.
3133 * metadata-internals.h: Add the ref_only field to
3136 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3138 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
3139 Fix the last behavior, which used to load the assemblies and
3140 extract MonoReflectionAssemblyName information, instead of
3141 extract it from the metadata tables. Needed for Reflection
3144 2005-07-29 Martin Baulig <martin@ximian.com>
3146 * mono-debug-debugger.c
3147 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
3151 (mono_debug_address_from_il_offset): Check whether we have
3152 debugging support before attempting to take the lock.
3153 (mono_debug_source_location_from_address): Likewise.
3154 (mono_debug_source_location_from_il_offset): Likewise.
3155 (mono_debug_il_offset_from_address): Likewise.
3156 (mono_debug_address_from_il_offset): Likewise.
3158 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
3160 * class.c (mono_class_from_name_case): Add support for dynamic images.
3163 * object.c (mono_class_compute_gc_descriptor): Add a workaround
3166 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
3168 * reflection.c (mono_method_get_object): Fix warning.
3170 2005-07-28 Martin Baulig <martin@ximian.com>
3173 (mono_debug_add_wrapper): Also write the wrapper type.
3175 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
3177 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
3179 * class.c (mono_class_init): Avoid reading nested classes if the AOT
3180 data indicates the class has none.
3182 2005-07-26 Ben Maurer <bmaurer@ximian.com>
3184 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
3185 loader lock with the debugger lock. Prevents deadlocks for beagle.
3187 Beagle can now run on an smp box for a weekend without any
3190 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
3192 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
3193 in a module. Fixes #75629.
3195 2005-07-26 Martin Baulig <martin@ximian.com>
3197 * mono-debug.c (mono_debug_add_wrapper): New static method.
3198 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
3199 interncall or a wrapper.
3201 * mono-debug.h (MonoDebugWrapperData): New public typedef.
3202 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
3203 (MONO_DEBUGGER_VERSION): Bump to 51.
3205 * mono-debug-debugger.c
3206 (mono_debugger_add_type): Removed this empty function.
3207 (mono_debugger_add_method): Likewise.
3209 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
3211 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
3212 before accessing method->slot.
3214 2005-07-21 Jb Evain <jbevain@gmail.com>
3216 * reflection.c (method_encode_clauses/class): Handle filters clauses.
3219 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
3221 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
3224 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
3226 * image.h image.c: Add mono_image_get_guid () API function.
3228 2005-07-19 Ben Maurer <bmaurer@ximian.com>
3230 There were issues when multiple threads tried to load
3231 assemblies. A deadlock was created between assemblies_mutex and
3232 mono_domain_assemblies_lock. This fixes the issue by making the
3233 assembly ref counting be lock free. See bug 75586.
3235 * image.c (mono_image_close): The add ref function here was using
3236 Interlocked operations while the unref was using a mutex and a
3237 --. I don't think this was ever a bug that would be exposed in a
3238 non-pendantic way (ie, by an embedder doing a ref on one thread
3239 and an unref on another), but for the sake of correctness, this is
3242 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
3243 (mono_assembly_load_reference): Call mono_assembly_addref rather
3244 than touching the refcount ourselves.
3245 (mono_assembly_close): Use InterlockedDecrement to unref the
3246 assembly. Don't acquire the lock unless it is actually needed.
3248 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
3250 * class.c (mono_class_layout_fields): Fix calculation of has_references
3253 2005-07-12 Martin Baulig <martin@ximian.com>
3255 Applying a patch from Michal Moskal <malekith@nemerle.org>.
3258 (mono_type_hash): Provide better hashing for generic instances.
3259 (mono_generic_inst_hash): Improve hashing.
3260 (mono_generic_class_hash): Likewise.
3262 * reflection.c (mymono_metadata_type_hash): Improve hashing for
3265 2005-07-12 Martin Baulig <martin@ximian.com>
3267 * reflection.c (mono_reflection_create_runtime_class): Remove the
3268 hack for generic type definitions and non-`Run' assemblies.
3269 (mono_reflection_bind_generic_parameters): Also use
3270 `klass->wastypebuilder' to check for TypeBuilders.
3272 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
3274 * class.c (mono_class_layout_fields): Fix calculation of has_references
3277 * class.c (inflate_generic_class): Fix a leak.
3278 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
3281 2005-07-11 Martin Baulig <martin@ximian.com>
3283 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
3286 2005-07-11 Martin Baulig <martin@ximian.com>
3288 * loader.c (find_method): Also lookup in
3289 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
3291 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3293 * appdomain.c (mono_domain_unload): Don't free the error message
3294 before passing it to mono_get_exception_...
3296 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
3298 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
3300 * threads.c: try to better guess an available RT signal (bug #75387).
3302 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3304 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
3307 2005-07-07 Martin Baulig <martin@ximian.com>
3309 * class.c (mono_type_get_name_full): Return NULL for
3310 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
3313 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
3315 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
3316 exit the appdomain as well being aborted.
3318 * threadpool.c: Create all threadpool threads inside the root appdomain, and
3319 change back to the root domain after calling managed code. This enables
3320 appdomains using threadpools to be unloaded.
3322 2005-07-07 Martin Baulig <martin@ximian.com>
3325 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
3326 into `MonoDynamicGenericClass' since we only need it for dynamic
3329 * reflection.c (mono_class_bind_generic_parameters): We don't need
3330 to compute the `parent' here.
3332 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
3334 * culture-info-table.h : regenerated.
3336 2005-07-06 Martin Baulig <martin@ximian.com>
3339 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
3341 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
3343 2005-07-06 Martin Baulig <martin@ximian.com>
3345 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
3346 we're doing a signature-only comparision; fixes #74945.
3348 2005-07-06 Martin Baulig <martin@ximian.com>
3350 * class-internals.h (MonoGenericClass): Moved some things out into
3351 a new `MonoInflatedGenericClass' type.
3352 (MonoInflatedGenericClass): New type; the `klass' of a
3353 `MonoGenericClass' is now computed lazyly in
3354 mono_get_inflated_generic_class().
3356 * class.c (mono_get_inflated_generic_class): New public function.
3357 (mono_class_inflate_generic_method): Removed the unused
3358 `MonoClass *' argument.
3359 (setup_generic_vtable): Don't call mono_get_inflated_method() on
3361 (mono_class_create_generic): Make this static and merge it with
3362 mono_class_create_generic_2(); we're now called automatically from
3363 mono_get_inflated_generic_class().
3365 * loader.c (mono_method_signature): Call
3366 mono_get_inflated_method() here.
3368 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
3370 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
3371 type of fields with RVA.
3373 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
3374 for this pseudo class.
3375 (my_mono_class_from_generic_parameter): Likewise.
3376 (mono_class_init): Allow interfaces to have cctors.
3378 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
3380 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
3381 lazily for AOT methods.
3383 2005-07-05 Martin Baulig <martin@ximian.com>
3385 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
3386 returns FALSE for a successful match, not TRUE.
3388 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
3390 * loader.c (mono_method_get_index): Optimize this a bit.
3392 2005-07-04 Martin Baulig <martin@ximian.com>
3395 (class_compute_field_layout): Move the check for generic type
3396 definitions into mono_class_layout_fields(). Fixes #74684.
3397 (mono_class_from_generic_parameter): Correctly compute
3398 `klass->parent'; fixes #75457.
3400 * reflection.c (register_assembly, register_module): Make sure
3401 `domain->rejobject_hash' is already created.
3403 2005-07-02 Martin Baulig <martin@ximian.com>
3406 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
3407 `MonoDynamicGenericClass'.
3409 2005-07-01 Lluis Sanchez <lluis@ximian.com>
3411 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
3412 returned by a field getter is null, since null is a valid value.
3414 2005-07-01 Martin Baulig <martin@ximian.com>
3416 * reflection.c (mono_reflection_generic_class_initialize): Update
3417 the `dgclass->fields [i].parent' to the correct class.
3418 (mono_image_get_fieldref_token): Use the declaring type, not the
3421 2005-07-01 Martin Baulig <martin@ximian.com>
3423 * loader.c (find_method): Also look in the interfaces; fixes #75429.
3425 2005-06-30 Ben Maurer <bmaurer@ximian.com>
3427 * threads.c (thread_cleanup): assert that thread != NULL
3428 (wait_for_tids_or_state_change): We were using the wrong variable
3429 when accessing wait->threads. `i' was always out of the bounds of
3432 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3434 * loader.c: map user32 and kernel32 to libMonoSupportW
3436 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
3438 * appdomain.c (unload_thread_main): Mark this as WINAPI.
3440 2005-06-28 Martin Baulig <martin@ximian.com>
3442 * loader.c (method_from_methodspec): Fix #75334.
3444 2005-06-28 Martin Baulig <martin@ximian.com>
3446 Fix #74953 - Arrays now implement the generic IList<T> interface
3447 on the 2.0 platform.
3449 * class-internals.h (MonoDefaults): Added `generic_array_class'.
3451 * reflection.c (mono_class_bind_generic_parameters): New public
3452 function; similar to mono_reflection_bind_generic_parameters(),
3453 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
3455 * domain.c (mono_init_internal): Try to initialize.
3456 `mono_defaults.generic_array_class' here; this'll only succeed if
3457 we're using the 2.0 corlib.
3460 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
3461 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
3462 (mono_lookup_internal_call): Added support for nested classes.
3465 (mono_get_method_from_token): Set `result->signature->pinvoke' if
3466 we're an interncall and have generic arguments.
3469 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
3470 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
3471 instance of System.Array.InternalArray<T> for arrays, so they
3472 implement the generic IList<T> interface.
3474 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
3476 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
3477 (chastamar@yahoo.com). Fixes #75374.
3479 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
3481 * culture-info-table.h: regenerated.
3483 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3485 * icall.c: handle spaces correctly for base64 strings.
3487 2005-06-26 Ben Maurer <bmaurer@ximian.com>
3489 * *.c: Kill some warnings.
3491 2005-06-23 Duncan Mak <duncan@novell.com>
3493 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
3494 that this builds on Solaris 10 (x86).
3496 2005-06-23 Martin Baulig <martin@ximian.com>
3499 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
3500 generic type definitions.
3502 2005-06-23 Martin Baulig <martin@ximian.com>
3506 * metadata.c (mono_class_get_overrides): Renamed to
3507 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
3508 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
3509 pass it to mono_get_method_full().
3511 2005-06-22 Ben Maurer <bmaurer@ximian.com>
3513 * reflection.c (mono_reflection_create_runtime_class): take the
3514 mono_domain_lock in this method. Prevents deadlocks
3516 2005-06-22 Martin Baulig <martin@ximian.com>
3518 * loader.c (method_from_methodspec): Fix #75330.
3520 2005-06-22 Martin Baulig <martin@ximian.com>
3522 * reflection.c (type_get_qualified_name): Use
3523 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
3524 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
3525 argument; use it if we don't have an assembly name.
3527 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
3529 * object.c: In mono_message_init, set "copy out" flag for in
3530 parameters with the [Out] flag.
3532 2005-06-21 Martin Baulig <martin@ximian.com>
3535 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
3538 2005-06-21 Martin Baulig <martin@ximian.com>
3540 * class.c (mono_class_init): Don't initialize `class->fields' for
3541 generic instances since they're initialized again in
3542 compute_field_layout().
3543 (compute_field_layout): Set the field's `generic_info' here; fix
3546 2005-06-21 Martin Baulig <martin@ximian.com>
3549 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
3551 * metadata.c (mono_metadata_generic_method_equal): Also
3552 distinguish the `generic_class'; fixes #75334.
3554 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3558 * domain-internals.h:
3559 * reflection.c: 'domain_assemblies' field is now protected by its own
3560 lock. Don't call into managed code to run the AssemblyLoad event if we
3561 now there are no registered delegates for it.
3563 2005-06-20 Martin Baulig <martin@ximian.com>
3565 * class.c (mono_class_is_assignable_from): Use a custom version of
3566 mono_class_has_parent() to make things work for generic instances;
3569 2005-06-20 Martin Baulig <martin@ximian.com>
3571 * loader.c (method_from_methodspec): Apply a patch from
3572 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
3574 2005-06-20 Martin Baulig <martin@ximian.com>
3576 * class.c (mono_class_init): Reverted Zoltan's last change; it
3579 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
3581 * threads.c (wait_for_tids_or_state_change): Add missing locking.
3583 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3585 * socket-io.c: fix the index in the socket array for writable/error
3586 sockets. Fixes bug #75306.
3588 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
3590 * class.c (mono_class_init): Allow interfaces to have static ctors.
3592 2005-06-17 Martin Baulig <martin@ximian.com>
3594 * loader.c (method_from_methodspec): Use `context->container' when
3595 parsing the `gmethod->inst'.
3597 2005-06-17 Martin Baulig <martin@ximian.com>
3599 * class.c (mono_type_get_name_recurse): Don't add the assembly
3600 name for type arguments.
3602 2005-06-15 Martin Baulig <martin@ximian.com>
3604 * reflection.c (mono_image_get_inflated_method_token): Encode
3605 correct klass; fixes #75260.
3607 2005-06-13 Michal Moskal <malekith@nemerle.org>
3609 * icall.c: Make GetCorrespondingMethod/Constructor take
3610 MonoReflectionMethod method not MonoMethod. Removed
3611 MonoType.GetCorrespondingField, and make
3612 MonoGenericType.GetCorrespondingField take name not
3615 2005-06-13 Michal Moskal <malekith@nemerle.org>
3617 * reflection.c (field_encode_signature, encode_locals):
3618 Make sizes of buffers for types larger (for big generic types).
3619 (create_generic_typespec,
3620 mono_reflection_sighelper_get_signature_local,
3621 mono_reflection_sighelper_get_signature_field):
3622 Add asserts for too small buffers.
3624 2005-06-15 Martin Baulig <martin@ximian.com>
3626 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
3627 if our parent is not a dynamic type.
3629 2005-06-15 Martin Baulig <martin@ximian.com>
3631 * class-internals.h (MonoTypeNameFormat): New enum.
3634 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
3635 (mono_type_get_full_name): Removed.
3636 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
3637 argument instead of the boolean's.
3639 * icall.c (ves_icall_System_MonoType_getFullName):
3640 Added `gboolean assembly_qualified'.
3643 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
3645 * reflection.c (mono_reflection_parse_type): Parse the new type
3648 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3650 * icall.c: no need to convert from utf16 to utf8 and then back again
3651 after the call to GetLogicalDrives.
3653 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3655 * icall.c: frombase64. Fix problems exposed by new tests.
3657 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3659 * icall.c: added internal calls for converting char [] and strings in
3660 base64 into byte [].
3662 2005-06-10 Martin Baulig <martin@ximian.com>
3664 * class.c (mono_class_create_generic_2): Read the nested classes
3665 from the metadata rather than from `gklass->nested_classes' since
3666 `gklass' might not be initialized yet.
3668 2005-06-09 Duncan Mak <duncan@novell.com>
3670 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
3671 all public headers. Fixes #74919.
3673 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
3675 * domain.c: The key for proxy_vtable_hash is now a pointer
3676 array. Added new GHashFunc and GCompareFunc functions for this.
3678 * class.h: The list of interfaces in MonoRemoteClass is known in
3679 advance and can't grow (we create a new MonoRemoteClass if needed),
3680 so now the interface array can be allocated together with
3683 * object.c: Added a new method create_remote_class_key.
3684 Fixed mono_remote_class so it does not depend on
3685 mono_upgrade_remote_class.
3686 Removed extend_interface_array.
3687 Added new method clone_remote_class(), which makes a copy of a remote
3688 class and adds a new interface or class to it.
3689 mono_upgrade_remote_class() now creates a new remote class (or gets
3690 it from the cache) if an vtable upgrade is needed. In this way
3691 we make sure that other objects sharing the same remote class
3692 don't get the new vtable with unwanted interfaces.
3694 * object-internals.h:
3695 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
3697 * marshal.c: Track changes in mono_upgrade_remote_class().
3699 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
3700 * icall.c: Add runtime methods for obtaining members of inflated
3701 class, which were created from supplied non-inflated members. It
3702 is used in internal Get{Method,Constructor,Field} methods in
3705 2005-06-09 Martin Baulig <martin@ximian.com>
3708 (mono_reflection_bind_generic_method_parameters): Fix #75169.
3710 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3711 * reflection.c (mono_image_basic_init): Define
3712 Version in MonoDynamicAssembly.
3714 2005-06-08 Martin Baulig <martin@ximian.com>
3719 (mono_method_signature_full): New public method; takes a
3720 `MonoGenericContext *'.
3721 (find_method): Use mono_method_signature_full() and pass the
3722 klass'es context to it.
3724 * class.c (mono_class_is_inflated_method): Use
3725 mono_method_signature_full() and pass the context to it.
3727 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
3729 * object.c: add proper locking in mono_remote_class_vtable(),
3730 fixes possible memory corruption.
3732 2005-06-08 Michael Meeks <michael.meeks@novell.com>
3734 * marshal.c (mono_remoting_marshal_init): set
3735 initialized after initialization.
3737 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
3741 2005-06-06 Michael Meeks <michael.meeks@novell.com>
3743 * object.c (extend_interface_array): fix really silly
3744 memory corrupting / comparison bug.
3746 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3748 * reflection.c: Functions added to support the creation
3749 of CustomAttributeData, which includes Attribute data
3750 used by ReflectionOnly methods.
3752 * reflection.h: mono_reflection_get_custom_attrs_data and
3753 mono_custom_attrs_data_construct added (functions exposed).
3755 * icall.c: Added mono_reflection_get_custom_attrs_data
3758 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
3760 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
3763 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
3765 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
3767 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
3768 dynamic DllImportAttribute.
3770 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
3771 dynamic DllImportAttribute.
3773 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
3776 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3778 * threads.c: avoid segfault when an unstarted thread is aborted.
3780 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
3782 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
3783 Returns the name and version of the runtime for reporting.
3785 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3787 * appdomain.c: bump corlib version.
3788 * object-internals.h: new field in MonoReflectionAssembly.
3790 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3792 * object-internals.h: Carlos forgot to add this field.
3794 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
3796 * icall.c: Added create_version to create instances
3797 of Version of MonoReflectionAssemblyName. This change helps
3798 the AssemblyName tests to keep running fine.
3800 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
3802 * object.c (mono_method_return_message_restore): A somehow less
3803 intrusive fix for #75138.
3805 2005-06-03 Raja R Harinath <rharinath@novell.com>
3807 * object.c (mono_method_return_message_restore): Fix computation
3808 of expected number of out args.
3810 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
3812 * reflection.c (mono_image_get_method_info): Fix the case when the
3815 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
3817 * object.c: Added missing null check in
3818 mono_method_return_message_restore.
3820 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
3822 * reflection.c (mono_image_get_method_info): Handle the case when
3825 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
3827 * object.c: When creating the vtable for a proxy, take into account
3828 all inherited interfaces, not only the ones registered in
3829 iclass->interfaces. This fixs bug #74996.
3830 Also, in mono_method_return_message_restore, verify that the array
3831 of out args has the expected lengh.
3833 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3835 * socket-io.c: update the timeout in Poll when the call is interrupte.
3837 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3839 * socket-io.c: support abort/suspend in Select_internal after last
3842 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3844 * threadpool.c: remove warning.
3846 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3849 * socket-io.[ch]: Select_internal uses poll() now when available, thus
3850 removing the 1024 limit from select(). Runtime part of the fix for
3853 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3855 * socket-io.c: when resolving the addresses for the same
3856 host returned by gethostname(), get the local IPs from the interface
3857 list. Loopback addresses are discarded if the are interfaces up with
3858 non-loopback ones. Fixes bug #63265.
3860 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
3862 * appdomain.c, verify.c, object-internals.h, reflection.c:
3863 bumped corlib number to 36, and added new extra_flags field
3864 to ReflectionMethodBuilder and friends. Fixes #75060.
3866 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
3868 * gc.c: register a new weak link only if the object is non-null
3871 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
3873 * culture-info.h : short time pattern too.
3875 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
3877 * culture-info.h : expand long time pattern string length.
3879 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
3881 * culture-info-table.h : update (more French date format; #72788).
3883 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
3885 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
3886 the method is static. Fixes #75029.
3888 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
3890 * reflection.c: Update the table_idx field of method builders after
3891 saving the module, since it can change. This is a workaround for
3894 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
3896 * culture-info-table.h : update (additional French date format).
3898 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
3900 * icall.c (ves_icall_type_Equals): Revert last change.
3902 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
3904 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
3906 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
3908 * class-internals.h: Added executioncontext_class field to
3909 MonoDefaults structure.
3910 * domain.c: Cache System.Threading.ExecutionContext class in
3912 * object.c: Capture the ExecutionContext for asynchroneous calls in
3913 mono_async_result_new.
3914 * object-internals.h: Added execution_context and original_context
3915 fields to MonoAsyncResult. Added execution_context to MonoThread.
3916 * security-manager.c|.h: Added mono_get_context_capture_method to
3917 return the capture method (if required by the security manager or by
3918 the framework version used).
3919 * threadpool.c: Apply capture (if present) ExecutionContext in
3920 mono_async_invoke and revert to original context after it completes.
3922 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
3924 * culture-info-table.h : updated (real hacky solution for zh-CHT).
3926 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
3928 * culture-info-table.h : zh-CHT related workaround.
3930 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
3932 * marshal.c (emit_marshal_custom): Add some error checking and call the
3933 methods in the ICustomMarshaler interface. Fixes #74875.
3935 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
3936 native->managed wrappers.
3938 2005-05-12 Martin Baulig <martin@ximian.com>
3940 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
3941 here and use the loader lock.
3943 * mono-debug.c: Properly lock when the debugger is not attached.
3944 (mono_debug_init): Release the initial lock if we're not running
3947 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
3949 * marshal.c (emit_marshal_custom): Pass through NULL values without
3950 calling the custom marshalling routines.
3952 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
3953 conversion in structures. Fixes #74882.
3955 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
3957 * culture-info-table.h : zh-* cultures were missing.
3959 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
3961 * threads.c: Added a new event background_change_event which is signaled
3962 when a thread changes its background mode.
3963 Moved here several checks previously done in managed code. The checks
3964 require the thread lock, and using the thread lock in managed code
3965 can result in deadlocks.
3966 Merged Start_internal and Thread_internal into a single method. Now
3967 Thread_internal does all work of creating and starting a thread.
3968 Added icalls for setting and getting the state of the object. Moved from
3969 managed code to avoid locking there.
3970 Added wait_for_tids_or_state_change() which is called instad of
3971 wait_for_tids when waiting for non-backround threads to end. This method
3972 will return if one of the threads ends or the background_change_event
3974 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
3975 the background mode. This method signals the background_change_event
3978 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
3979 removed Start_internal.
3981 2005-05-11 Martin Baulig <martin@ximian.com>
3983 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
3984 to order of some fields to get proper alignment on 64-bit machines.
3986 2005-05-11 Martin Baulig <martin@ximian.com>
3988 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
3989 changes as they're broken and completely fuck up the debugger.
3991 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
3993 2005-05-10 Martin Baulig <martin@ximian.com>
3995 * reflection.c (mono_reflection_generic_class_initialize): Don't
3996 call mono_class_setup_parent() here.
3998 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4000 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
4001 send/receive timeout use an integer in milliseconds. We were using a
4004 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4007 (internal_get_cultures): reserve the first slot of the array for the
4008 InvariantCulture, which will be filled in managed code.
4010 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
4012 * reflection.c (mono_image_fill_module_table): Initialize the
4013 GENERATION field as well.
4015 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4017 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
4018 Monitor.Enter on the object.
4020 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
4022 * threads.c: Enable the wait for running threads when exiting.
4023 * icall.c: Suspend all threads before exiting.
4025 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
4027 * assembly.c (mono_assembly_load_reference): Fix warning.
4029 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4031 * threadpool.c: changed the default number of threads per cpu. From now
4032 on, the default will be 20 + (5 * number of cpus) instead of 50.
4034 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
4036 * loader.c (mono_method_get_signature_full): Add locking here.
4038 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
4040 * appdomain.c: Moved methods for parsing and freeing assembly
4041 names to assembly.c.
4042 * assembly.c, domain-internals.h: Created public methods for parsing
4043 assembly names. Fixed mono_assembly_load_with_partial_name:
4044 it now finds the best match, taking into account the version,
4045 token and culture specified in the partial name. Also return
4046 the latest version if no version information is specified.
4048 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
4050 * threadpool.c: replace check for SocketAsyncCall class.
4052 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4054 * threadpool-internals.h:
4055 * Makefile.am: added threadpool-internals.h
4057 * threadpool.c: call mono_unhandled_exception on exceptions not handled
4058 that happen in threadpool threads (tested on MS).
4059 (mono_thread_pool_remove_socket): new function that dispatch any pending
4060 AIO call on a socket that is closing. By now only epoll really needs it,
4061 as select/poll wake up when the socket closes.
4064 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
4066 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
4068 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
4070 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
4072 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
4074 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
4076 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
4077 has an abort request, convert it into a suspend request.
4079 2005-04-30 Ben Maurer <bmaurer@ximian.com>
4081 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
4082 warning for the usage of `UnmanagedFunctionPointerAttribute' which
4083 is not supported yet.
4085 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4087 * image.c: register assemblies loaded from data (bundles) in the loaded
4088 assemblies hash. Fixes bug #74772.
4090 2005-04-29 Martin Baulig <martin@ximian.com>
4092 * class.c (mono_type_get_name_recurse): Update to the new naming
4093 schema from the latest .NET 2.x beta2.
4094 (mono_class_setup_vtable_general): If we're a generic instance,
4095 copy the vtable from our generic type definition and inflate all
4098 * loader.c (find_method): Update to the new naming schema from the
4099 latest .NET 2.x beta2.
4101 2005-04-29 Raja R Harinath <harinath@gmail.com>
4103 * class.c (mono_class_init): Add a mono_loader_unlock to the
4106 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
4108 * icall.c (ves_icall_System_Environment_Exit): Remove the
4109 suspend_all_other_threads () call for the time being, since it can hang.
4111 * threads.c (mono_thread_manage): Similarly, disable the waiting for
4112 the background threads to exit, since it can also hang.
4114 * class.c (mono_class_init): Applied patch from Ankit Jain
4115 (radical@gmail.com). Avoid pending init errors when a field refers
4116 to a nested class using a typeref. Fixes #74734.
4118 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
4119 this for dynamic modules.
4121 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4123 * threads.c: don't wait for threads that are in the process of aborting
4124 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
4125 and waiting for background threads to finish. This makes xsp and
4126 mod-mono-server exit without random length delays and/or hangs.
4128 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4130 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
4132 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
4134 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
4135 dynamic types to prevent infinite loops. Fixes #74727.
4137 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
4138 ..._is_assignable_to.
4140 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
4142 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
4144 2005-04-25 Martin Baulig <martin@ximian.com>
4146 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
4149 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
4151 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
4153 * reflection.c (build_compressed_metadata): Set metadata header
4156 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
4158 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
4159 number into an integral and a decimal part. Fixes #70473.
4161 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
4163 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
4165 * culture-info-table.h : reflected the latest locale-builder output.
4167 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4169 * threadpool.c: check for SuspendRequested too when deciding if
4170 mono_thread_interruption_checkpoint should be called.
4172 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4174 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
4175 * threads.c: remove interruption_mutex and use Interlocked instead. When
4176 suspending all the threads, wait for all the suspended events at once.
4177 If we're shutting down and get an APC that is going to be queued,
4178 call mono_thread_execute_interruption immediately, as the thread might
4179 be sleeping on a pthread condition or mutex.
4181 * icall.c: call mono_runtime_set_shutting_down before suspending the
4184 Fixes bug #74693. And now xsp is happier when exiting.
4186 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
4188 * loader.c (mono_stack_walk): Fix #74690.
4190 2005-04-22 Martin Baulig <martin@ximian.com>
4192 * mono-debug.h (MonoDebugMethodJitInfo): Added
4193 `MonoDebugMethodJitInfo *jit'.
4195 * mono-debug.c (mono_debug_read_method): Cache the
4196 MonoDebugMethodJitInfo in `address->jit'.
4197 (mono_debug_free_method_jit_info): New public method.
4199 2005-04-22 Martin Baulig <martin@ximian.com>
4201 * class.c (mono_class_is_assignable_from): Disallow
4202 type parameter -> interface.
4204 2005-04-21 Dick Porter <dick@ximian.com>
4206 * threads.c (mono_thread_create): Turn an assertion into an error.
4208 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
4210 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
4212 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
4213 Fix some gcc 4.0 warnings.
4215 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
4217 * file-io.c: fix alt dir separator char on unix systems
4218 and cleanup (fixes bug #71214).
4220 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
4222 * marshal.c: Use CALLVIRT instead of CALL when dispatching
4223 a call to a remote domain, since the method may be an
4224 interface method in the client domain. This fixes bug #74192.
4226 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4228 * threadpool.c: recv/send are now performed before going back to managed
4229 code to save one transition.
4231 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4233 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
4235 * metadata/threadpool.c: removed hack to workaround the bug above.
4239 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
4241 * reflection.c reflection.h: Fix handling of parameter defaults in
4242 dynamic methods. Also fixes handling of parameter attributes.
4245 * mono-debug.c (mono_debug_close_image): Fix warning.
4247 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4249 * socket-io.h: replaced old unused field with new 'blocking'.
4250 * threadpool.c: restore socket blocking state on windows(tm).
4252 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
4254 * icall.c: don't return the codebase in the AssemblyName[] returned by
4255 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
4256 * object-internals.h: Removed FIXME (fields were presents) and fixed
4257 versioncompat declaration.
4259 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4261 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
4262 not closed, so don't cleanup when it happens.
4264 2005-04-13 Chris Toshok <toshok@ximian.com>
4266 * mono-debug-debugger.h: change prototype for
4267 mono_debugger_lookup_type.
4269 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
4270 this function, although it should probably be named
4271 mono_debugger_init_type.
4273 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4275 * threadpool.c: fix non-AIO case.
4277 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
4279 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
4280 the built-in profiler to measure just JIT compilation times.
4282 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4284 * threadpool.c: the epollfd might be closed by another thread at
4285 any time, so ignore EBADF at treat it as a "we're closing" sign.
4287 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4289 * threadpool.c: release the semaphores with a count equals to the number
4290 of working threads in both IO and regular pools. Fixed typo that messed
4291 up the count of IO pool threads. Don't initialize the pipe handles if
4294 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4296 * threadpool.c: some systems don't like a NULL when deleting the socket
4299 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4301 * threadpool.c: fix semaphore allocation.
4303 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4305 * threadpool.c: added epoll() based implementation for asynchronous IO
4306 that is used instead of the default poll() when available.
4307 It can be disabled by setting MONO_DISABLE_AIO.
4309 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4311 * threadpool.c: windows needs 'closesocket' and instead of returning
4312 0 when the stream is closed while in select, it returns -1. Fixes bug
4315 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
4317 * class.c (class_compute_field_layout): Fix the regression caused by
4320 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4322 * threadpool.c: separate pool for socket async. IO.
4323 * threadpool.h: mono_max_worker_threads is not a global any more.
4325 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
4327 * class.c (class_compute_field_layout): Fix #74549.
4329 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4331 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
4332 use 2 connected sockets instead.
4334 2005-04-08 Miguel de Icaza <miguel@novell.com>
4336 * mono-config.c: Add new entry point for mkbundle
4337 mono_config_parse_memory.
4339 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4341 * threadpool.c: removed another unused function.
4343 2005-04-08 Ankit Jain <radical@corewars.org>
4345 * reflection.c (get_default_param_value_blobs): Add 'types'
4346 parameter to get the types encoded in the constant table.
4347 (mono_param_get_objects): Use the type from the constant table,
4348 not the type of the parameter, when creating default values.
4349 Handle null default values correctly.
4351 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4358 * socket-io.c: removed dead code for async IO.
4360 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4362 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
4364 * threadpool.c: intercept socket async. calls and pass them to a thread
4365 that is polling and dispatching the job items to the threadpool as
4366 socket become ready. Fixes bugs #71217, #71933.
4368 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
4369 between char and short/ushort arrays.
4371 * socket-io.c: remove dead code.
4373 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
4376 icall.c : removed InternalToUpper_Comp() and
4377 InternalToLower_Comp().
4379 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
4381 * char-conversions.h : The tables were incorrectly generated. Should
4382 be generated against invariant culture.
4384 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
4386 * object.c (mono_runtime_invoke_array): Fix return value when
4387 passing pre-created valuetype objects to ctors.
4389 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
4390 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
4393 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
4395 * domain.c: removed g_assert for runtimesecurityframe_class. This is
4396 only used with --security and hides the wrong corlib version error.
4398 2005-03-30 Joshua Tauberer <tauberer@for.net>
4400 * class.c: Changed mono_class_name_from_token so that types
4401 outside of a namespace don't have an initial period. Improved
4402 the g_warning message used in _mono_class_get when loading
4404 * assembly.c: In mono_assembly_load_reference, when an assembly
4405 can't be found, "No such file or directory" is misleading and
4406 unhelpful because a few paths were checked for the presence of
4407 the assembly. When that happens (ENOENT), display a nicer
4408 message indicating the directories that were searched. In all
4409 cases, the warning is made easier to read for non-hackers.
4411 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
4413 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
4415 * appdomain.h|domain.c: Removed inline from functions.
4416 * appdomain.c: Reduced warnings when compiling on windows.
4417 * icall.c: Fixed output_debug declaration to gunichar2*.
4418 * mono-config.c: Reduced warnings when compiling on windows.
4419 * rand.c: Added missing "windows.h". Added missing return value.
4420 * rawbuffer.c: Added missing winsock2.h for windows.
4421 * sysmath.h: Added mono-compiler.h header to allow/ease
4422 compilation with non-GCC compilers.
4423 * threads.c: Fixed declarations to compile with VS.NET C compiler.
4424 Removed cast warnings.
4426 Adapted from the work of J Lothian (for VC6).
4428 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
4430 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
4433 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
4435 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
4438 2005-03-27 Raja R Harinath <harinath@gmail.com>
4440 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
4441 has to be in $(exec_prefix). $(prefix) is for arch-independent
4442 stuff, and it would probably use $(prefix)/share rather than
4445 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4447 * console-io.c: added 2 includes that might be missing.
4449 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
4451 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
4454 * reflection.c (create_custom_attr): Allocate the params array using
4455 alloca so it gets GC tracking.
4457 2005-03-23 Chris Toshok <toshok@ximian.com>
4459 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
4462 2005-03-24 Raja R Harinath <rharinath@novell.com>
4464 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
4465 changes to pick up any changes in prefix, etc.
4467 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
4469 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
4471 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
4472 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
4474 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
4476 * class-internals.h object-internals.h class.c reflection.c: Extend the
4477 mono_lookup_dynamic_token () function to return the class of the
4480 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
4483 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
4485 * security-manager.c: Skip inheritance checks for intra-corlib
4486 class inheritance and method overrides. This skips a lot of checks
4487 and (anyway) permissions cannot work until corlib is loaded.
4489 2005-03-23 Martin Baulig <martin@ximian.com>
4491 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
4492 MONO_TYPE_GENERICINST.
4494 2005-03-23 Martin Baulig <martin@ximian.com>
4496 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
4498 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4500 * class.c: added locking comments to some functions.
4501 Cache the interface offsets arrays (saves about 20 KB
4502 of runtime memory in a typical app).
4503 Reduce the time overhead in mono_class_setup_supertypes ().
4505 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
4507 * icall.c: speedup and fix leaks in GetMethodsByName and
4508 GetPropertiesByName.
4510 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
4512 * reflection.c: some locking fixes.
4514 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
4516 * metadata.c: added missing break in case statement.
4518 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
4520 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4521 typedbyref return values. Fixes #73941.
4523 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
4525 * security-manager.c|h: Added demandunmanaged method and
4526 suppressunmanagedcodesecurity class to MonoSecurityManager.
4527 Renamed aptc class to allowpartiallytrustedcallers.
4529 2005-03-17 Martin Baulig <martin@ximian.com>
4531 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
4533 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4535 * file-io.c: disabled file async. IO using aio_*. It uses the
4536 threadpool now. Workaround for bug #73718.
4538 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
4540 * assembly.h, mono-config.c: added code to deal with bundled configs
4541 for bundled assemblies.
4543 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
4545 * *.c, private.h: cleanup, removing old private.h header file.
4547 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
4549 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
4550 and throw_on_unmappable_char attributes.
4552 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
4554 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
4555 _ProcessName_internal.
4557 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
4559 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
4562 * icall.c threads.c threads-types.h: Remove slothash icalls as they
4565 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
4567 * object.c (compute_class_bitmap): Add support for generics. Fixes
4570 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
4572 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
4574 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4576 * filewatcher.c: commented out the code for windows watcher, as we don't
4577 use it (we use the managed implementation instead).
4579 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
4581 * object-internals.h (MonoThread): Remove 'unused1' field.
4583 * appdomain.c: Bump corlib version.
4585 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
4587 * reflection.c (mono_reflection_create_runtime_class): Remove the
4588 AssemblyBuilder.Save optimization since it causes too many problems.
4590 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
4592 * exception.c|h: Added mono_get_exception_reflection_type_load to
4593 create a ReflectionTypeLoadException object.
4594 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
4595 to return NULL is a InheritanceDemand fails during reflection. Updated
4596 ves_icall_System_Reflection_Assembly_GetTypes to throw a
4597 ReflectionTypeLoadException if an InheritanceDemand fails during
4598 reflection. Added icall mapping for GetLinkDemandSecurity.
4599 * security-manager.c|h: Added ves_icall_System_Security_
4600 SecurityManager_GetLinkDemandSecurity internal call to return the
4601 class and methods permissions set for a LinkDemand. Removed unused
4602 fields in MonoSecurityManager.
4604 2005-03-10 Martin Baulig <martin@ximian.com>
4606 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
4607 it's a generic instance.
4609 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
4611 * reflection.c (mono_get_object_from_blob): Applied patch from
4612 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
4614 * class.c (mono_class_is_assignable_from): Another try at fixing
4615 #73469 without breaking anything.
4617 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
4619 * class.c: (mono_class_is_assignable_from): Revert the last changes
4620 since they don't work with generics.
4622 * class.c (mono_class_is_assignable_from): Fix build bustage.
4624 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
4625 the managed IsAssignableFrom method. Fixes #73469.
4627 * reflection.c (mono_reflection_call_is_assignable_from): New helper
4630 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
4632 * object.c (mono_load_remote_field_new): Fix returning uninitialized
4633 memory when the remoting callback does not sets the out arguments.
4636 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
4639 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
4641 * object-internals.h (MonoStackFrame): Sync with managed object layout.
4643 * appdomain.c: Bump corlib version.
4645 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
4647 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
4650 * threads.c (mono_thread_attach): Detect threads which are not started
4651 by the GC pthread wrappers.
4653 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
4655 * icall.c: Added new icall for RNG.
4656 * rand.c|h: Added new icall to open the RNG. This allows to share a
4657 single handle on Linux to access /dev/urandom and fix #73183.
4659 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
4661 * object.c: setting the new vtable in a transparent proxy object must
4662 not change the GC descriptor.
4664 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4666 * object.c: fixed compilation without GCJ support.
4667 * reflection.c: for runtime-created types ensure klass->has_references
4668 is correct (bug #73215).
4670 2005-03-02 Martin Baulig <martin@ximian.com>
4672 * class.c (mono_class_is_assignable_from): Make this work if
4673 `oklass' is a generic instance; fixes #72831.
4675 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
4677 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
4680 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
4682 * marshal.c: Reorganize native->managed marshalling code to also use
4683 the emit_marshal_... functions.
4685 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4687 * object.c: typed allocs have issues with bitmap sizes > 30,
4688 so check for max_set >= 30.
4690 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
4692 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
4693 managed code. Fixes #73012.
4695 * metadata.h (MonoMarshalSpec): Add elem_mult field.
4697 * metadata.c reflection.c: Load/Emit elem_mult as well.
4699 * metadata.h (MonoMarshalSpec): Add comment.
4701 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
4703 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
4704 num_elem to -1 if not given.
4706 * object-internals.h (MonoReflectionMarshal): Add has_size field.
4708 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
4711 2005-03-01 Marek Safar <marek.safar@seznam.cz>
4713 * null-gc.c (mono_gc_free_fixed): Was not compilable.
4715 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
4717 * reflection.c (encode_marshal_blob): Encode param_num field as well.
4719 * object-internals.h (MonoReflectionMarshal): Add param_num field.
4721 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
4723 * object.c: generalized the reference bitmap creation
4724 and added hooks for the new GC.
4725 * class-internals.c: removed the gc_bitmap field from MonoClass.
4727 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4729 * domain.c: help the compiler to produce better code
4730 in mono_jit_info_table_find ().
4732 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4734 * object.c: make all allocations look typed.
4736 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4738 * socket-io.c: load Mono.Posix if it's not loaded already
4741 2005-02-24 Martin Baulig <martin@ximian.com>
4743 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
4744 * reflection.c (dup_type): Likewise.
4746 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
4748 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
4749 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
4751 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4753 * domain.c, threads.c, object-internals.h: make the critical thread
4754 local vars use the fast access mode (even when we're compiled in
4755 a lib). Provide accessors to be used by the jit during codegen.
4757 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
4759 * appdomain.c: Changed hook functios behavior to include
4760 support for the reflection only assemblies. Some icalls were changed
4761 to support the mentioned assemblies too. Signatures of static methods
4762 try_assembly_resolve and real_load now have an additional parameter:
4765 * assembly.c: General changes to mono_assembly_ methods to support
4766 reflection only api. Functions mono_assembly_open, mono_assembly_load,
4767 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
4768 suffix, to support an additional gbool parameter to specify whether
4769 the assembli is reflection only or not. Created some new hook functions
4770 to add support for reflection only assemblies. Signatures of static
4771 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
4772 have now an additional parameter: refonly.
4774 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
4775 indicating whether the assembly is reflection only or not.
4777 * exception.c: Add mono_get_exception_invalid_operation.
4779 * icall.c: Throw an InvalidOperationException when trying to invoke
4780 a property/method/event, or trying to set/get the value of a field.
4781 Also add an icall to retrieve the ref_only flag to the
4782 MonoReflectionAssembly.
4784 2005-02-23 Chris Toshok <toshok@ximian.com>
4786 Part of fix for #72827.
4787 * mono-debug.c (mono_debug_add_method): add lexical block data to
4788 the info we write. Kind of a hack at the moment - we copy the
4789 lexical block info from the MonoDebugMethodInfo to the
4790 MonoDebugMethodJitInfo here, before writing it.
4791 (mono_debug_read_method): read the lexical block info.
4793 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
4795 * debug-mono-symfile.h: add lexical block support.
4797 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
4800 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
4802 * loader.c (mono_lookup_pinvoke_call): Fix warning.
4804 * object.c (mono_runtime_free_method): Call mono_free_method () and
4805 put the TODOs there.
4807 * loader.c (mono_free_method): Free up most memory allocated for
4810 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4812 * reflection.c: properly flag a Type argument to a
4813 named custom attr value (bug #72248).
4815 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4817 * reflection.c: reduce code duplication in named custom
4820 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
4822 * reflection.c: properly encode custom attrs of type object
4825 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
4827 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
4829 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
4831 * socket-io.c: load System.dll if it's not loaded already
4832 (bug #72850 and #70477).
4834 2005-02-21 Martin Baulig <martin@ximian.com>
4836 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
4839 2005-02-21 Martin Baulig <martin@ximian.com>
4841 * reflection.c (mono_image_build_metadata): We also need to
4842 "fixup" the MethodImpl table after we computed the final method
4843 indices. Call fixup_methodimpl() to do that.
4844 (fixup_methodimpl): New private method.
4846 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
4848 * assembly.c: special case mscorlib.dll (bug#72536),
4849 patch from Carlos Alberto Cortez.
4851 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
4853 * threads-types.h threads.c: Fix build bustage.
4855 * threads.c: Use a union for long<->double conversions.
4857 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
4858 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
4860 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
4861 containing the checkpoint call with NOT_TAKEN.
4863 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
4864 checkpoint before pushing the arguments, so they won't have to be
4867 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
4869 * domain.c, assembly.c, domain-internals.h: make some data
4870 const and relocation-free.
4872 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
4874 * object.c, appdomain.c, class-internals.h: introduce the
4875 MonoClassRuntimeInfo structure to hold the info needed to
4876 use a class at runtime. Made mono_class_vtable() lock-free
4877 for all the appdomains.
4879 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
4881 * metadata-internals.h, image.c: introduce a per-image mempool to
4882 be used for memory that has the same lifetime as the image.
4884 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
4886 * domain.c: In mono_init_internal(), instead of selecting the first
4887 runtime version supported by an executable, get a list of all
4888 supported versions and select the one for which an mscorlib exists
4889 (since even if the runtime supports a given version, it doesn't mean
4890 that the framework for that version is installed).
4891 Modified get_runtimes_from_exe to support this behavior.
4892 In supported_runtimes, added information about additional system
4895 * assembly.c: Added support for more than one system assembly version
4896 per runtime version. Updated the assembly list.
4897 In mono_assembly_remap_version, removed the initial version check,
4898 since we don't know to which version we need to compare until we
4899 get the version set on which the assembly is based.
4900 Moved the code for loading corlib into the new method
4901 mono_assembly_load_corlib(), so it can be used by the initialization
4904 * domain-internals.h: Updated data structures and added declaration
4905 for mono_assembly_load_corlib.
4907 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
4909 * reflection.c (resolve_object): Fix the creation of the signature in
4910 the SignatureHelper case.
4912 * assembly.c (mono_assembly_remap_version): Fix binary search.
4914 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
4916 * class.c: Added inheritance check when a method is overloaded (from a
4917 virtual method or when implementing an interface) and when a class is
4918 inherited. Added functions to set a failure for a class and to
4919 retreive the exception from a failure.
4920 * class-internals.h: Added fields to MonoClass to keep the exception
4921 information status for inheritance (or other exceptions) to be thrown
4922 later (i.e. not at load time).
4923 * object.c: Throw the inheritance SecurityException when a type is to
4924 be created with either class or method inheritance violations.
4925 * reflection.c|h: Fix when getting declsec from a class. Removed
4926 unrequired code for class. Improved sanity in parameter naming.
4927 * security-manager.c|h: Added functions to check for class and method
4930 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
4932 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
4933 and has_finalize in dynamic types as well.
4935 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
4937 * culture-info-table.h : fixed currency format for en-GB (and so on).
4939 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
4941 * gc.c: ensure the GC handles never have 0 as a value.
4943 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
4945 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
4946 a pointer to a struct to unmanaged code. Fixes #72625.
4948 2005-02-16 Martin Baulig <martin@ximian.com>
4950 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
4952 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
4954 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
4956 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
4958 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
4960 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
4961 UnmanagedFunctionPointerAttribute, use it for determining calling convention
4964 * reflection.c (mono_custom_attrs_get_attr): New helper function.
4966 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
4968 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
4970 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
4971 changes to make the current context a field in MonoThread.
4973 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
4975 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
4978 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
4979 extracted from mono_marshal_get_native_wrapper.
4981 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
4982 to create wrappers around native functions.
4984 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
4985 delegates for arbitrary function pointers. Fixes #71472.
4987 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
4989 * threads.c: cleaned up the code a little.
4991 2005-02-15 Martin Baulig <martin@ximian.com>
4993 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
4996 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
4997 allocate larger chunks if needed.
4999 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
5001 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
5004 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
5006 * domain.c: keep the domains in an array and ensure the domain ids
5007 are kept small, so they can be used as indexes to domain-specific data
5008 with a small memory overhead.
5010 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
5012 * icall.c: Handle byref types in Type icalls. Fixes #72544.
5014 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
5016 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
5018 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
5020 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
5022 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
5025 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
5027 2005-02-12 Ben Maurer <bmaurer@ximian.com>
5029 * domain-internals.h: add the hashtable here.
5031 * class-internals.h: Remove `info' from MonoMethod
5033 * domain.c: Add a new hashtable, jit_trampoline_hash
5035 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5037 * object.c: don't set the value of static fields
5040 2005-02-11 Martin Baulig <martin@ximian.com>
5042 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
5043 (mono_debug_add_method): Silently ignore the method if it's too big.
5044 (mono_debug_add_type): Likewise.
5046 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
5048 * threads.c, appdomain.c: remove #ifdefs from the code.
5050 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
5052 * metadata-internals.h: Added flags to MonoAssembly to cache the most
5053 common security informations. This allows us to stay in unmanaged code
5054 when doing LinkDemand and it's special cases (except for the first
5055 time for initialization). The flags a very much used with --security.
5056 * reflection.c|h: Added code to get declarative security attributes
5057 for LinkDemand and InheritanceDemand. This required to refactor the
5058 existing code for Demand.
5059 * security-manager.c|h: Added new method fields for the special cases
5062 2005-02-10 Martin Baulig <martin@ximian.com>
5064 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
5065 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
5067 2005-02-10 Martin Baulig <martin@ximian.com>
5069 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
5070 debugging code; this is almost a complete rewrite.
5072 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
5074 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5076 * domain.c, object.h: expose mono_string_equal () and
5077 mono_string_hash ().
5078 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
5079 it's implemented in managed code.
5081 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5083 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
5084 lo leak objects between appdomains.
5086 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5088 * assembly.c: old compilers compilation fix from
5089 robertj@gmx.net (Robert Jordan).
5091 2005-02-09 Ben Maurer <bmaurer@ximian.com>
5093 * class-internals.h: Little reminder for the future.
5095 * debug-helpers.c: Fix up wrapper_type_names
5097 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5099 * image.c, metadata-internals.h: when loading an image from a file,
5100 mmap all of it and use the same codepaths as when using a
5101 in-memory image: the code is simpler and we use less memory
5102 (both writable and readonly).
5104 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5106 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
5107 API to alloc runtime data structures that need to be tracked by the
5108 GC and contain pointers.
5109 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
5110 make the code more readable and eventually use a different GC.
5112 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
5114 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
5117 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
5119 * object.c: In release_type_locks(), don't release the cctor lock
5120 if it has already been released. This fixes a crash in the
5123 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
5125 * gc.c, marshal.c, icall.c: register a delegate for finalization
5126 only when the native function pointer has been allocated for it.
5128 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5130 * object.c: cleaned up some code, allocate objects that are
5131 pointer free with the atomic malloc variant. Allocate memory
5132 for static data from the mempool if it's pointer-free.
5133 Allocate the bounds array at the end of the array data, when needed.
5134 * object-internals.h, object.h: move a private function in a private
5136 * class.c: handle missing case in tracking references in fields.
5138 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
5140 * class.c, class-internals.h: keep track if a type has
5141 reference fields in either the instance or static fields.
5143 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
5145 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
5146 and renamed to MonoRuntimeInfo. Added fields to store the expected
5147 framework assembly version. Changed mono_get_framework_version and
5148 mono_get_runtime_version for a single mono_get_runtime_info method.
5150 * assembly.c: Added method to remap system assembly versions to the
5151 current executing runtime version. Removed old mapping code.
5152 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
5154 * icall.c, reflection.c: Track api changes.
5156 2005-02-06 Miguel de Icaza <miguel@novell.com>
5158 * loader.c (method_from_memberref): Improve error reporting,
5159 produce the class name instead of the typeref/typedef index.
5161 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
5163 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
5165 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5167 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
5168 stdcall and charset name mangling. Reorganize the code and add
5171 2005-02-05 Ben Maurer <bmaurer@ximian.com>
5173 * monodiet.c: More iters!
5175 * marshal.c: Iter usage.
5177 * icall.c: Iter usage.
5179 * object.c: Use iters.
5181 * debug-helpers.c: More iters
5183 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5185 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
5188 2005-02-05 Ben Maurer <bmaurer@ximian.com>
5190 * mono-debug-debugger.c: use iters
5192 * class.c, class-internals.h: mono_class_setup_events is static
5195 * All callers: use iters
5197 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
5199 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
5200 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
5202 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
5204 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
5206 * marshal.h: Add prototypes for ldfld/stfld_remote.
5208 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
5209 this is called during startup.
5211 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
5213 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
5214 MonoThreadsSync struct private in monitor.c. Changed the way
5215 MonoThreadsSync is allocated so it's faster and there is no
5216 need to keep track of it with a finalizer and it uses less memory.
5217 This also finally allows us to allocate mono objects as ptrfree when
5218 there are no reference fields.
5220 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
5222 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
5223 disappearing link to the GC interface and use them to simplify
5226 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
5228 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
5229 stfld_remote which call mono_load/store_field_new. This allows methods
5230 calling ldfld/stfld wrappers to be AOTed.
5232 * console-io.c: Include sys/filio.h under solaris.
5234 * console-io.c: Include curses.h if needed correctly.
5236 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
5238 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
5239 method->klass as well.
5241 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
5243 * class.c (mono_class_init): Switch on lazy initialization of
5246 * class.c (mono_class_get_finalizer): Handle the case when the
5247 finalizer is inherited.
5249 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5251 * console-io.c: <curses.h> is needed by term.h on solaris.
5253 2005-02-03 Ben Maurer <bmaurer@ximian.com>
5255 * icall.c, class-internals.h, monodiet.c, class.c: Remove
5256 mono_class_setup_properties where possible. Remove this ftn from
5257 the header file, and make it static.
5259 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
5261 * loader.c: Add missing setup_... call.
5263 * class.c: Add missing setup_... calls.
5265 * class.c (mono_class_init): Switch on lazy initialization of
5268 * class.c (mono_class_init): Fix generics broken by the recent changes.
5270 * monodiet.c (handle_type): Add missing setup_... calls.
5272 * class.c: Back out garbage in previous patch.
5274 * class.c: Add missing setup_... calls.
5276 * class.c (mono_class_get_method_from_name_flags): Avoid calling
5277 mono_class_setup_methods () if possible.
5279 * class-internals.h (MonoClass): Add 'has_cctor' flag.
5281 * class-internals.h (MonoCachedClassInfo): New structure.
5283 * class.c: Initialize properties and events fields of MonoClass lazily.
5285 * class.c: Add infrastructure for lazily initializing the methods and
5286 vtable fields of MonoClass. Not yet used.
5288 * class.c (mono_class_get_finalizer): New helper function.
5290 * class.c: Add infrastructure for loading some class related data from
5293 * object.c: Add infrastructure for initializing the vtable from data
5296 * gc.c (run_finalize): Use mono_class_get_finalizer ().
5298 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
5299 appropriate initialization function before accessing parts of the
5300 MonoClass structure.
5302 * marshal.c: Fix warnings.
5304 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
5306 * mono-debug-debugger.c (get_exception_message): Use
5307 mono_class_get_method_from_name_flags ().
5309 2005-02-02 Ben Maurer <bmaurer@ximian.com>
5311 * reflection.c, appdomain.c: Replace a few manual searches that
5312 Zoltan missed. (Paolo approved this part of my initial patch).
5314 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
5316 * profiler.c: disable recording statistical events at report time.
5318 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5320 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
5321 to byteswap arrays of enum values, too (bug #72080).
5323 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
5325 * appdomain.c (set_domain_search_path): Allow this to be called if
5326 domain->setup is not yet set.
5328 * loader.c (mono_method_get_index): New helper function.
5330 * loader.c reflection.c: Use mono_method_get_index ().
5332 * class.c (mono_class_get_method_from_name_flags): New helper method.
5334 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
5337 * class.c (mono_class_get_cctor): New helper method.
5339 * string-icalls.c object.c class.c marshal.c reflection.c: Use
5340 mono_class_get_method () to look up methods.
5342 2005-02-01 Miguel de Icaza <miguel@novell.com>
5344 * console-io.c: Fix the build, this should work on Windows.
5346 2005-01-31 Ben Maurer <bmaurer@ximian.com>
5348 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
5349 be set to null to keep things valid
5351 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5353 * icall.c: added Console 2.0 icalls.
5354 * Makefile.am: added console-io.[ch]
5355 * console-io.[ch]: internal calls for Console 2.0 API.
5357 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5359 * class.c: make sure we consider all the interfaces
5360 when calculating max_interface_id (bug found by
5361 Jeroen Frijters running ikvm).
5363 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
5365 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
5366 valuetype fields to null.
5368 * object.c (set_value): Ditto. Fixes #71669.
5370 2005-01-31 Martin Baulig <martin@ximian.com>
5372 * metadata.c (mono_metadata_has_generic_params): New public
5373 function; checks whether something is a generic method.
5375 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
5377 * appdomain.c: fix infinite recursion when adding assemblies.
5379 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
5381 * object.c: Fix small typo to return all items for Environment.
5384 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
5386 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
5387 reflection.c: more domain and assembly-unload related fixes
5388 and memory leaks plugs.
5390 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
5392 * 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.
5394 2005-01-29 Ben Maurer <bmaurer@ximian.com>
5396 * loader.c (mono_method_signature): Make this method lazy
5397 (mono_get_method_from_token): Don't computate the signature here.
5399 Doing this saves quite a bit of memory. I got 90 kb on starting up
5400 monodoc. It should also save some disk reads on startup.
5402 * *: MonoMethod->signature might be NULL now. You *MUST* use
5403 mono_method_signature.
5405 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
5407 * object.c (mono_runtime_get_main_args): Return an array from the
5408 current domain here. Fixes #71938.
5410 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
5412 * monitor.c: formatting changes to comply with the
5413 mono coding style and remove #ifdefs from the code.
5415 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5417 * metadata.c, private.h: remove some unneeded data
5418 and use a more compact representation for table schemas.
5420 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
5422 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
5423 to get a better distribution in hash tables.
5424 * *.c: use mono_aligned_addr_hash() where appropriate.
5425 * assembly.c: make var static.
5427 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
5429 * domain-internals.h: Put MonoJitInfo on a diet.
5431 * domain.c: Fix a warning.
5433 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5435 * gc.c: rework the gc handles code to reuse handles
5438 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
5440 * domain.c: fixed long standing bug in mono_string_equal() which
5441 was brought to light with the ldstr changes.
5443 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
5445 * reflection.c: Remove warning by adding missing include for marshal.h
5447 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
5449 * domain.c, object.c: change the ldstr_table to hold
5450 MonoString* as keys: makes the runtime isinterned lookup
5451 faster and simplifies memory management.
5453 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
5455 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
5456 possible to add imperative security checks before calling the icall.
5457 * reflection.c: Return security attributes on the original MonoMethod
5458 (and not the wrapped one). This fix permissions on icalls.
5460 2005-01-25 Dick Porter <dick@ximian.com>
5462 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
5463 the check for mktime() support actually test the mktime() return
5464 value. "Fixes" bug 71682, though the output is still different to
5467 2005-01-25 Martin Baulig <martin@ximian.com>
5469 * class.c (mono_class_is_assignable_from): Make this work for
5472 2005-01-24 Ben Maurer <bmaurer@ximian.com>
5474 * marshal.c (mono_string_utf8_to_builder)
5475 (mono_string_builder_to_utf16): We might not have ownership of the
5476 string. In thise case, we need to create a new buffer.
5478 * object-internals.h (mono_stringbuilder_capacity): sb->str might
5479 be null, in which case, use the default capacity.
5481 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
5483 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
5484 GC events to the profiler.
5486 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
5488 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
5489 if you don't want the GC to run.
5491 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
5493 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
5494 start providing a GC API and keeping different implementations in
5496 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
5498 2005-01-22 Ben Maurer <bmaurer@ximian.com>
5500 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
5501 mmap rather than allocating a huge buffer.
5502 (mono_debug_close_mono_symbol_file): Free the buffer allocated
5505 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
5507 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
5508 and CheckExecutionRights.
5509 * reflection.c|h: Keep the index of the declarative security to be
5510 used, instead of the pointer, when AOT compiler is used. Also add
5511 class initialization when requesting demands.
5512 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
5513 CheckExecutionRights. Both properties are now FALSE by default, and
5514 unmodifiable, unless the --security option is used.
5516 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5518 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
5519 reflection.c: properly refcount images and assemblies, many leaks fixed.
5521 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5523 * threadpool.c: increase the timeout for threads in the thread pool to
5524 10s. Fixes bug #67159.
5526 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
5528 * class-internals.h: Sun's compiler insists on explicit
5529 signed on bit fields to handle then correctly.
5531 2005-01-19 Miguel de Icaza <miguel@ximian.com>
5533 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
5534 Make the size of the array fit only the number of invalid path
5537 * class.c (_mono_class_get): Improve the error reporting when a
5538 class referenced is not found, to assist debugging.
5540 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
5542 * threads.c: fix off-by-one error.
5543 * domain.c: free data allocated in the domain.
5545 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
5547 * reflection.c (mono_method_body_get_object): Fill out exception info
5550 * object-internals.h: Add MonoReflectionExceptionHandlingClause
5553 2005-01-19 Martin Baulig <martin@ximian.com>
5555 * loader.c (mono_get_method_constrained): Make this work again.
5557 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
5559 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
5560 guint16 to match the managed side.
5562 * reflection.c (mono_reflection_body_get_object): Fill out local
5565 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
5568 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
5569 'local_var_sig_token'.
5571 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
5573 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
5576 * reflection.c (mono_method_body_get_object): Handle abstract and
5579 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
5581 * marshal.c, loader.c, class-internals.h, reflection.c:
5582 store the emthod data for a wrapper in an array instead of a list.
5584 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
5586 * marshal.c: change the code to allocate memory more
5587 conservatively for method wrappers.
5589 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
5591 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
5592 fields from MonoClass to the marshal info structure where they belong.
5594 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
5596 * class.c, object.c, class-internals.h, marshal.c: rearrange
5597 some fields and tweak some types to lower memory usage.
5599 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
5601 * threads.c (signal_thread_state_change): Handle the case when the
5602 target thread is the current thread.
5604 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
5606 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
5607 emit_ptr_to_object_conv.
5609 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
5610 marshalling. Fixes #71352.
5612 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
5614 * metadata.h, blob.h: move table enum to blob.h so it can be included
5616 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
5617 cut the size of MonoImage/MonoDynamicImage.
5619 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
5621 * profiler.c (mono_profiler_install_simple): Fix default arguments.
5623 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
5625 * reflection.c, reflection.h, icall.c: add a function to check
5626 if an attribute type is defined for a metadata object.
5628 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
5630 * object-internals.h: Added some needed fields from StringBuilder class.
5631 * marshal.c: Set the maxCapacity when creating a StringBuilder.
5633 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
5635 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
5636 threads before shutting down the runtime.
5638 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
5640 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
5642 * object-internal.h, threads.c: implement stacksize and
5643 parameterized thread start functionality (requires
5644 matching corlib). Marked broken code for later removal.
5646 2005-01-12 Martin Baulig <martin@ximian.com>
5648 * class-internals.h (MonoGenericClass): Moved the `initialized'
5649 flag to MonoDynamicGenericClass, removed `init_pending'.
5650 (MonoGenericInst): Added `is_reference' flag.
5652 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
5654 * reflection.c (mono_image_create_pefile): Only set the pe_offset
5655 inside the MSDOS header. Fixes #71201.
5657 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
5659 (mono_domain_finalize): Ditto.
5661 2005-01-12 Martin Baulig <martin@ximian.com>
5663 * class.c (mono_get_shared_generic_class): Use the cache for
5664 non-dynamic generic classes.
5666 * class-internals.h (mono_class_create_generic_2): Removed
5667 function prototype, this function is now static inside class.c.
5669 * class.c (mono_class_create_generic_2): Made this static, only
5670 call it from mono_class_init() and mono_class_setup_parent().
5671 (collect_implemented_interfaces_aux): Call mono_class_init() on
5672 the interfaces we collect.
5673 (mono_class_setup_vtable): Call mono_class_init (class->parent).
5675 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
5677 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
5678 it a real thread handle.
5680 * domain-internals.h: Move exvar_offset from MonoJitInfo to
5681 MonoJitExceptionInfo, since each catch clause needs its own variable.
5683 2005-01-11 Dick Porter <dick@ximian.com>
5685 * image.c (mono_pe_file_open): New variant on mono_image_open()
5686 that does not set up the CLI metadata; used for FileVersionInfo so
5687 it can get the data for windows binaries too.
5689 * process.c (process_read_string_block): Don't read off the end of
5690 the StringTable block.
5692 These both fix bug 70766.
5694 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
5696 * gc.c: set some fields to NULL at GC cleanup time.
5697 * threads.c: if we quit the main thread, call exit ().
5699 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
5701 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
5703 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
5705 * threads.h, threads.c, object.c: added accessor and settor for
5706 main_thread. Handle it specially when exiting from it: wait
5707 for other foreground threads to exit.
5709 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
5711 * process.c, verify.c: remove some bloat.
5713 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
5715 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
5716 the calling convention to cdecl under win32.
5718 2005-01-08 Ben Maurer <bmaurer@ximian.com>
5720 * object.c (mono_object_get_size): New function to get the size of
5723 * profiler.c (simple_allocation): Use above.
5725 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
5727 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
5728 ves_icall_System_AppDomain_getRootDomain (as it's not required to
5729 get an appdomain by it's id and we can't assume the root's id is 0).
5730 * domain-internals.h: Change the function prototype to match.
5731 * icall.c: Change the icall table for AppDomain.
5733 2005-01-08 Miguel de Icaza <miguel@ximian.com>
5735 * locales.c (string_invariant_compare_char): Only compute
5736 GUnicodeTypes in the case where we need them. Test for ordinality
5737 first and return if so.
5742 * FIXME: here we must use the information from c1type and c2type
5743 * to find out the proper collation, even on the InvariantCulture, the
5744 * sorting is not done by computing the unicode values, but their
5745 * actual sort order.
5748 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
5750 * loader.c: for P/Invoke methods, allow the "Internal" shared
5751 library name to refer to the calling process symbol namespace.
5753 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
5755 * Makefile.am: Add the security manager to the build.
5756 * security-manager.c|h: New. Initialization of the security manager.
5758 2005-01-07 Dick Porter <dick@ximian.com>
5761 * monitor.c: Update thread state during Monitor and WaitHandle
5762 waits. Fixes bug 71031.
5764 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
5766 * reflection.c (property_encode_signature): Correctly handle when the
5767 property has no methods.
5769 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
5771 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
5773 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
5774 fields from mb, not rmb. Fixes #71017.
5776 * marshal.c (emit_ptr_to_str_conv): Add support for
5777 ByValTStr -> string conversion. Fixes #71015.
5779 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
5781 * mempool.c (mono_mempool_contains_addr): New helper function.
5783 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
5785 * metadata.c (mono_metadata_compute_size): Fix size calculation of
5786 HasSematics encoded fields.
5788 * metadata.c (mono_type_to_unmanaged): Improve error message for
5789 invalid string marshalling.
5791 * metadata.c: Fix warnings.
5793 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
5795 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
5798 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
5800 * domain.c object.c domain-internals.h: Revert part of r38077 since the
5801 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
5804 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
5806 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
5807 so methods containing these can be AOTed.
5809 2005-01-03 Martin Baulig <martin@ximian.com>
5811 * loader.c (find_method): Removed the hack for generic instances.
5812 (method_from_memberref): If our parent is a generic instance, pass
5813 its generic type definition to find_method() and then inflate the
5815 (mono_get_method_constrained): Pass the generic type definition to
5816 find_method() and inflate the method later.
5818 * class-internals.h (MonoStats): Added `generic_class_count'.
5820 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
5821 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
5823 * reflection.c (mono_custom_attrs_from_params): Don't ignore
5824 generic type definitions.
5826 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
5828 * loader.c icall.c: Fix warnings.
5830 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
5832 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
5833 blittable types. Fixes #70864.
5835 2004-12-29 Martin Baulig <martin@ximian.com>
5838 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
5840 * reflection.c (mono_method_get_object): Create a
5841 "System.Reflection.MonoGenericMethod" for inflated methods; don't
5842 call mono_get_inflated_method().
5844 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
5846 2004-12-27 Martin Baulig <martin@ximian.com>
5848 * class-internals.h (MonoMethod): Added `is_inflated' flag.
5849 (MonoMethodInflated): Added `inflated' field.
5851 * class.c (mono_class_inflate_generic_method): Don't really
5852 inflate the method here; just set the `is_inflated' flag in the
5854 (mono_class_get_inflated_method): Actually inflate the method here
5855 if it's not already inflated; we use the MonoMethodInflated's new
5856 `inflated' field as a cache.
5858 2004-12-26 Martin Baulig <martin@ximian.com>
5861 (inflate_generic_class): Moved some code out of inflate_generic_type().
5862 (mono_class_inflate_generic_method): If we're already inflated,
5863 inflate the context and use the declaring method; ie. make sure
5864 the declaring method of an inflated method is always the generic
5866 (mono_class_create_from_typedef): Create
5867 `class->generic_container->context->gclass'.
5869 2004-12-24 Ben Maurer <bmaurer@ximian.com>
5871 * metadata-internals.h, marshal.c, reflection.c: More
5872 MonoGHashTable->GHashTable.
5874 * domain-internals.h, class.c: Change MonoGHashTable's into
5875 GHashTables for some cases where no gc stuff is used
5877 All users: update apis
5879 2004-12-23 Ben Maurer <bmaurer@ximian.com>
5881 * metadata.c (builtin_types): Make this `const'. Makes this get
5882 put into the shareable section.
5883 (mono_metadata_init): Casts to make gcc happy.
5885 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
5887 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
5889 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
5891 * icall.c: Added an internal call to retrieve the position and length
5892 of assembly-level declarative security attributes (RequestMinimum,
5893 RequestOptional and RequestRefuse). This is used by the Assembly class
5894 to re-create the corresponding permission sets.
5896 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
5898 * marshal.c: fix the stelemref wrapper to be type correct
5901 2004-12-20 Ben Maurer <bmaurer@ximian.com>
5903 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
5904 to do key & 0x7fffffff. Hashtable already does this. It just
5905 results in longer code.
5907 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
5909 * appdomain.c: Bump corlib version.
5910 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
5911 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
5912 * reflection.c|h: Add functions to get declarative security infos
5913 (blob position and length) for assemblies, classes and methods.
5915 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
5917 * reflection.c: sort the constant table (bug #70693).
5919 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
5921 * object-internals.h, threads.c, domain.c: add accessors for
5922 the MonoThread and MonoDomain tls keys.
5924 2004-12-18 Martin Baulig <martin@ximian.com>
5926 * class.c (inflate_generic_type): If we're inflating a generic
5927 instance, set `ngclass->context->container = context->container';
5928 ie. the container we inflated into.
5930 * metadata.c (mono_metadata_parse_generic_param): Reflect above
5931 inflate_generic_type() changes.
5933 2004-12-17 Martin Baulig <martin@ximian.com>
5936 (MonoGenericClass): Replaced `MonoType *generic_type' with
5937 `MonoClass *generic_class'. Removed `dynamic_info'; if
5938 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
5939 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
5941 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
5943 * exception.c (mono_exception_from_token): New helper function.
5945 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
5947 * assembly.c (mono_assembly_load_with_partial_name): Call
5948 mono_assembly_loaded before invoking the preload hooks. Fixes
5951 * object-internals.h (MonoThread): Change culture_info and
5952 ui_culture_info into an array.
5954 * threads.c: Cache culture info objects from more than one appdomain.
5956 * threads.c threads-types.h icall.c: Add icalls for manipulating the
5959 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
5961 * threads.h threads.c appdomain.c: Clear the culture_info field of
5962 all threads during unloading if they point to an object in the dying
5965 2004-12-13 Ben Maurer <bmaurer@ximian.com>
5967 * culture-info.h (TextInfoEntry): New struct
5968 * object-internals.h: sync with managed
5969 * locales.c: fill the `text_info_data' field
5970 * culture-info-tables.h: update
5972 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
5974 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
5977 2004-12-12 Ben Maurer <bmaurer@ximian.com>
5979 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
5980 (ves_icall_ModuleBuilder_getMethodToken): Ditto
5982 2004-12-12 Martin Baulig <martin@ximian.com>
5984 * mono-debug-debugger.c (write_type): If we're an enum and the
5985 builtin types have already been initialized, call mono_class_init().
5987 2004-12-11 Martin Baulig <martin@ximian.com>
5989 * metadata.c (mono_metadata_load_generic_params): Added
5990 `MonoGenericContainer *parent_container' argument; automatically
5991 compute `container->is_method'; pass the correct owner to
5994 * reflection.c (compare_genericparam): Sort the GenericParam table
5995 according to increasing owners.
5997 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
5999 * profiler.c: allow disabling the default profiler.
6001 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
6003 * decimal.c, icall.c: allow disabling System.Decimal support.
6005 2004-12-09 Marek Safar <marek.safar@seznam.cz>
6007 * reflection.c: Add support for null attribute arguments.
6009 2004-12-09 Martin Baulig <martin@ximian.com>
6011 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
6012 names to get rid of compiler warnings.
6014 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
6016 * marshal.c (mono_marshal_get_struct_to_ptr): Call
6017 mono_marshal_load_type_info (). Fixes #69625.
6018 (mono_marshal_get_ptr_to_struct): Likewise.
6020 2004-12-08 Martin Baulig <martin@ximian.com>
6022 * mono-debug.h: Bumped version number to 47.
6024 * mono-debug-debugger.c
6025 (mono_debugger_event_handler, mono_debugger_event): Take two
6026 guint64 arguments insteed of a gpointer and a guint32.
6028 2004-12-08 Martin Baulig <martin@ximian.com>
6030 * debug-mono-symfile.h
6031 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
6032 `address' to `native_offset'.
6034 2004-12-08 Martin Baulig <martin@ximian.com>
6036 * class.c (mono_class_create_from_typespec): Only inflate if we
6037 either have `context->gclass' or `context->gmethod'.
6039 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
6041 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
6043 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
6045 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
6047 * reflection.c (mono_assembly_get_object): Remove the workaround put
6050 * appdomain.c: Use the corlib_internal field from MonoAssembly.
6052 * appdomain.c: Bump corlib version.
6054 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
6055 be visible in other appdomains.
6057 2004-12-07 Ben Maurer <bmaurer@ximian.com>
6059 * threads.c: Interlocked inc and dec for longs were messed up,
6060 use a KISS based impl for this. Fixes 70234
6062 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
6064 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
6066 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
6068 * icall.c: fix to follow policy not to allow struct
6069 arguments in icalls.
6071 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6073 * process.c: make the patch that handles spaces in file paths work
6074 on mono/windows too.
6076 2004-12-06 Martin Baulig <martin@ximian.com>
6078 * class.c (mono_class_create_generic): Call
6079 mono_class_setup_supertypes() if we're dynamic.
6080 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
6082 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
6084 * object-internals.h: Add new fields to MonoThread.
6086 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6088 * icall.c threads-types.h threads.c: Add new icalls.
6090 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
6092 * object-internals.h (MonoReflectionAssembly): Sync object layout with
6095 * appdomain.c: Bump corlib version.
6097 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
6098 internal assemblies. Fixes #69181.
6100 2004-12-05 Martin Baulig <martin@ximian.com>
6102 * class.c (mono_class_inflate_generic_signature): Make this a
6103 no-op if `context' is NULL or we don't have any type parameters;
6104 also copy `sentinelpos'.
6106 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
6108 * image.c: Add unbox_wrapper_cache.
6110 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
6112 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
6115 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
6118 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
6120 2004-12-04 Martin Baulig <martin@ximian.com>
6122 * loader.c (mono_method_get_signature_full): New public function;
6123 like mono_method_get_signature(), but with an additional
6124 `MonoGenericContext *' argument.
6126 * class.c (mono_class_inflate_generic_signature): Formerly known
6127 as inflate_generic_signature(); make this public.
6129 2004-12-04 Martin Baulig <martin@ximian.com>
6132 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
6133 instead of a `MonoGenericContainer *'.
6134 (mono_metadata_parse_array_full): Likewise.
6135 (mono_metadata_parse_signature_full): Likewise.
6136 (mono_metadata_parse_method_signature_full): Likewise.
6137 (mono_metadata_parse_generic_inst): Likewise.
6138 (mono_metadata_parse_generic_param): Likewise.
6139 (mono_metadata_parse_mh_full): Likewise.
6140 (mono_type_create_from_typespec_full): Likewise.
6142 2004-12-03 Martin Baulig <martin@ximian.com>
6144 * class-internals.h (MonoGenericContainer): Replaced the
6145 `MonoGenericContext * pointer with a `MonoGenericContext'
6146 structure and made it the first element.
6148 2004-12-03 Martin Baulig <martin@ximian.com>
6151 (inflate_generic_type): Set the `context->container' when creating
6152 a new MonoGenericContext.
6153 (mono_class_inflate_generic_method): Likewise.
6154 (mono_class_create_from_typespec): Just use `context->container'
6155 to get the container.
6157 * loader.c (method_from_methodspec): Set `context->parent' from
6158 `context->container' - and if that's a method container, use its
6159 parent. Also set the `context->container' when creating a new
6161 (mono_get_method_from_token): Use just `context->container' to get
6164 * metadata.c (do_mono_metadata_parse_generic_class): Also set
6165 `gclass->context->container'.
6167 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
6168 the `context->container' when creating a new MonoGenericContext.
6170 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
6172 * reflection.c (compare_genericparam): Sort params with identical
6173 owner by their number. Fixes gen-111 on sparc.
6175 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
6177 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
6178 around the domain changes.
6180 * appdomain.c (mono_domain_unload): Handle the case when the thread
6181 calling Unload is itself being aborted during unloading. Fixes #70022.
6183 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
6185 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
6186 checkpoint_func as an icall so it gets a wrapper.
6187 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
6188 in the cross-appdomain wrappers too.
6190 * threads.c (mono_thread_has_appdomain_ref): Make this public.
6192 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
6194 * reflection.c: Fix some memory leaks.
6196 2004-12-02 Martin Baulig <martin@ximian.com>
6198 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
6200 * metadata.c (generic_class_cache): New static hashtable.
6201 (mono_metadata_lookup_generic_class): New public method.
6203 2004-12-02 Martin Baulig <martin@ximian.com>
6205 * class.c (mono_class_create_from_typedef): Call
6206 mono_class_setup_parent() and mono_class_create_mono_type() before
6207 parsing the interfaces.
6209 2004-12-02 Martin Baulig <martin@ximian.com>
6211 * metadata.c (generic_inst_cache): New static hashtable.
6212 (mono_metadata_lookup_generic_inst): New public function.
6213 (mono_metadata_inflate_generic_inst): New public function.
6214 (mono_metadata_parse_generic_inst): New public function.
6215 (do_mono_metadata_parse_generic_class): Use the new
6216 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
6217 since this'll also use the cache.
6219 * reflection.c (mono_reflection_bind_generic_method_parameters):
6220 Use mono_metadata_lookup_generic_inst() to use the new cache.
6222 * class.c (inflate_mono_type): Use
6223 mono_metadata_inflate_generic_inst() to inflate a generic
6224 instance; this'll also use the new cache.
6226 * loader.c (method_from_methodspec): Use
6227 mono_metadata_parse_generic_inst() and
6228 mono_metadata_inflate_generic_inst() rather than parsing it
6229 manually, so we can use the new cache.
6231 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
6233 * threads.c (wait_for_tids): Do not incorrectly free threads when
6236 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6238 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
6239 iter->args based on whether parameters are passed in registers (i.e.
6240 MONO_ARCH_REGPARMS is defined)
6242 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
6244 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
6245 the exception message. Fixes #70070.
6246 (method_from_methodspec): Fix warnings.
6248 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6250 * process.c: (complete_path) return the path quoted
6252 2004-12-01 Martin Baulig <martin@ximian.com>
6254 * class-internals.h (MonoGenericInst): New structure.
6255 (MonoGenericClass): Replaced `type_argc', `type_argv' and
6256 `is_open' with `MonoGenericInst *inst'.
6257 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
6258 `is_open' with `MonoGenericInst *inst'.
6260 2004-11-30 Martin Baulig <martin@ximian.com>
6262 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
6264 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
6265 to `generic_class_cache'.
6268 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
6269 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
6270 (mono_generic_inst_is_valuetype): Renamed to
6271 mono_generic_class_is_valuetype().
6274 (MonoGenericInst): Renamed to MonoGenericClass.
6275 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
6276 (MonoClass): Renamed `generic_inst' to `generic_class'.
6277 (MonoGenericContext): Renamed `ginst' to `gclass'.
6279 * object-internals.h
6280 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
6282 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
6283 mono_reflection_generic_class_initialize().
6285 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
6286 now known as "System.Reflection.MonoGenericClass".
6287 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
6289 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
6291 * class-internals.h: Added a flag field to MonoClass to cache the
6292 declarative security attributes actions associated with the class.
6293 * domain-internals.h: Added booleans to MonoJitInfo to cache the
6294 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
6295 applicable to the JITted method.
6296 * reflection.c|h: Added functions to extract (as flags) which security
6297 actions are available (declaratively) for a method, class or assembly.
6298 * metadata.c|h: Added functions to search the declarative security
6299 table in the metadata.
6301 2004-11-29 Ben Maurer <bmaurer@ximian.com>
6303 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
6304 EXPORTEDTYPES are already in the class name cache, so there is no
6305 need to add extra code here to look at them. Just removes a bit of
6308 (ves_icall_System_Environment_get_TickCount): No need for #if
6309 WINDOWS. We already have the code in io-layer.
6311 2004-11-28 Martin Baulig <martin@ximian.com>
6314 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
6317 2004-11-27 Miguel de Icaza <miguel@ximian.com>
6319 * assembly.c (do_mono_assembly_open): Instead of having a
6320 conditional WITH_BUNDLE, incorporate support for bundles here, by
6321 having a global `bundles' variable holding a pointer to the actual
6324 (mono_register_bundled_assemblies): New API call used by the
6327 See mkbundle.1 for details.
6329 2004-11-27 Martin Baulig <martin@ximian.com>
6331 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
6332 the vtable for generic methods.
6334 2004-11-26 Martin Baulig <martin@ximian.com>
6337 (mono_metadata_generic_method_hash): New public function.
6338 (mono_metadata_generic_method_equal): Likewise.
6341 (MonoGenericContainer): Added `GHashTable *method_hash'.
6343 * reflection.c (ReflectionMethodBuilder): Added
6344 `MonoGenericContainer *generic_container'.
6345 (reflection_methodbuilder_to_mono_method): Don't create a new
6346 MonoGenericContainer each time we're called.
6347 (mono_reflection_bind_generic_method_parameters): Use
6348 `container->method_hash' to cache the results so we don't create a
6349 different method if we're called several times with the same
6352 * loader.c (method_from_methodspec): Use the new
6353 `container->method_hash' here, too.
6355 2004-11-26 Martin Baulig <martin@ximian.com>
6357 * class.c (inflate_generic_signature): Correctly compute
6358 `res->has_type_parameters'.
6359 (mono_class_vtable): Use the `has_type_parameters' flag to
6360 determine whether we're a generic method.
6362 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
6364 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
6366 * object.c (mono_runtime_run_main): Fix a small memory leak.
6368 2004-11-25 Martin Baulig <martin@ximian.com>
6370 * class.c (set_generic_param_owner): Fixed the loop.
6372 2004-11-25 Martin Baulig <martin@ximian.com>
6374 * object.c (mono_class_vtable): Don't create any JIT wrappers for
6377 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
6379 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
6380 names. Fixes #69787.
6382 2004-11-24 Martin Baulig <martin@ximian.com>
6384 * class.c (mono_class_create_generic_2): If we don't have a
6385 `ginst->parent', inflate `gklass->parent' to get our parent.
6387 2004-11-24 Martin Baulig <martin@ximian.com>
6389 * reflection.c (compare_genericparam): Correctly sort the
6390 GenericParam table; fixes #69779.
6392 2004-11-23 Ben Maurer <bmaurer@ximian.com>
6394 * reflection.c: When writing a PE file, don't create a huge
6395 buffer in memory. Just write the arrays we have to the file.
6396 This reduces memory usage.
6398 * metadata-internals.h: MonoDynamicStream pefile is no longer used
6401 2004-11-17 Martin Baulig <martin@ximian.com>
6403 * class.c (mono_class_init): Don't setup `class->parent' for
6404 dynamic instances; moved this to mono_class_generic_2().
6405 (mono_class_create_generic): Also set `klass->inited' for dynamic
6407 (mono_class_create_generic_2): Don't do anything for dynamic
6408 generic instances. Set `klass->parent' here and also call
6409 mono_class_setup_parent() here.
6411 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
6412 `MonoType *parent' argument; set `ginst->parent' before calling
6413 mono_class_create_generic_2(), so we set the correct parent.
6415 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
6417 * reflection.c: allow getting attributes from ModuleBuilder
6420 2004-11-17 Martin Baulig <martin@ximian.com>
6422 * class.c (mono_class_create_from_typedef): If a type parameter is
6423 inherited from an outer class, set its owner to that class.
6425 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
6427 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
6428 for (int*) written size. This fixes bug #69592.
6430 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
6432 * icall.c: Added IsAuthenticodePresnet internal call.
6433 * image.c|h: New function that check a MonoImage for an Authenticode
6434 signature in the certificate PE data directory.
6435 * security.c|h: New internal call to ask the runtime if an
6436 Authenticode signature seems referenced in the PE header.
6438 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
6440 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
6442 * reflection.c (mono_image_create_pefile): Free the assembly streams
6443 after writing out the assembly file.
6445 * object.c (mono_runtime_run_main): Fix small memory leak.
6447 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
6448 property access modifiers. Fixes #69389.
6450 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
6452 * domain.c, object.c, object-internals.h, domain-internals.h,
6453 object.h, marshal.c: keep dynamic code info per domain.
6455 2004-11-15 Martin Baulig <martin@ximian.com>
6457 * class.c (mono_type_get_name_recurse): Put type arguments in
6458 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
6461 2004-11-15 Martin Baulig <martin@ximian.com>
6463 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
6464 (mono_class_setup_vtable): When computing `the_cname' for a
6465 generic instance, don't include the namespace since we'd otherwise
6468 2004-11-15 Martin Baulig <martin@ximian.com>
6470 * class.c (mono_class_create_generic): Changed return type to void.
6471 (mono_class_create_generic_2): New public function; setup
6472 `class->method', `class->field' and `class->interfaces' here
6473 instead of in mono_class_init().
6475 * class.h (mono_class_create_generic): Moved to class-internals.h.
6477 2004-11-14 Ben Maurer <bmaurer@ximian.com>
6479 * reflection.c (mono_image_create_pefile): take a file HANDLE.
6480 rather than writing to memory, write to this file. Right now,
6481 we are just writting into a buffer, and copying that. However
6482 we can avoid the buffer later.
6484 (mono_dynamic_stream_reset): new function
6486 * icall.c, object-internals.h: update for the above.
6488 2004-11-13 Ben Maurer <bmaurer@ximian.com>
6490 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
6491 have been using gc'd memory. First it is slower, unlikely
6492 the comment in the source code said, secondly, it increases
6493 our footprint to do it in the gc.
6495 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
6496 the method so that it does not have to copy to managed code.
6498 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
6500 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
6502 2004-11-12 Martin Baulig <martin@localhost>
6504 * reflection.c (mono_image_create_token): Allow generic method
6505 definitions here, since they may appear in an `.override'; see
6506 gen-98/gen-99 for an example.
6508 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
6510 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
6513 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
6516 2004-11-11 Martin Baulig <martin@ximian.com>
6518 * class.c (mono_class_setup_vtable): In an explicit interface
6519 implementation, the method name now includes the arity.
6521 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
6523 * object.c (mono_array_full_copy): Fix warning.
6525 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
6527 * appdomain.c: Removed look_for_method_by_name(). Use the new method
6528 mono_class_get_method_from_name() instead.
6530 * class-internals.h: Added two new types of wrappers.
6531 Added MonoRemotingTarget enum. Added new trampoline function type, which
6532 takes an additional MonoRemotingTarget value as parameter, so it is
6533 possible to request a trampoline for a specific target.
6535 * class.c: Added new mono_class_get_method_from_name() method.
6537 * class.h: In MonoRemoteClass, we can have now to vtables, one for
6538 general remoting sinks and one specific for cross domain calls.
6540 * debug-helpers.c: Added new wrapper names.
6542 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
6545 * image.c: Porperly delete value objects form the remoting invoke hashtable.
6547 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
6548 with several other methods (mono_marshal_get_xappdomain_dispatch,
6549 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
6550 and others) can generate a fast remoting wrapper for cross domain calls.
6551 More information can be found in docs/remoting.
6552 Other changes: Removed mono_find_method_by_name, and used
6553 mono_class_get_method_from_name instead.
6554 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
6555 is stored in the remoting invoke hashtable.
6557 * marshal.h: published the new method for getting the xdomain wrapper,
6558 and also added a method for getting the adequate wrapper for a given
6561 * object-internals.h, object.c: Added a couple of methods for capying and
6563 Modified mono_install_remoting_trampoline, which takes the new remoting
6564 trampoline that has a remoting target as parameter.
6565 mono_class_proxy_vtable now also takes a remoting target as parameter, and
6566 will return the most suitable vtable for the target.
6567 Added mono_remote_class_vtable, which returns the vtable of a remote class
6568 (which can be the normal remoting vtable or the xdomain vtable).
6570 * threads.c: the xdomain invoke and dispatch wrappers must also be
6571 protected against interruptions.
6573 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6575 * icall.c: use memmove in BlockCopyInternal when the source and
6576 destination arrays are the same.
6578 2004-11-09 Martin Baulig <martin@ximian.com>
6580 * class-internals.h (MonoGenericContainer): Removed `method' and
6581 `signature', replaced them with `is_method' and `is_signature'
6582 flags. Added `context'.
6584 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
6585 instead of a `MonoGenericContainer *'.
6587 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
6588 for dynamic type parameters.
6589 (mono_metadata_load_generic_params): Setup `container->context'.
6591 * reflection.c (mono_reflection_setup_generic_class): Setup
6592 `tb->generic_container->context'.
6593 (do_mono_reflection_bind_generic_parameters): Use
6594 mono_class_inflate_generic_type() to correctly inflate types,
6595 rather than using our own hack just for MONO_TYPE_VAR.
6597 2004-11-09 Martin Baulig <martin@ximian.com>
6599 * class.c (mono_class_inflate_generic_method): Small fix; don't
6603 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
6604 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
6605 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
6606 (ves_icall_Type_BindGenericParameters): Likewise.
6607 (ves_icall_Type_get_IsGenericInstance): Likewise.
6608 (ves_icall_Type_GetGenericParameterPosition): Likewise.
6609 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
6610 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
6611 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
6613 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
6615 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
6616 assembly versions and public key tokens. Fixes #69113.
6618 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
6620 * metadata.c: fix bug introduced with the type cache changes
6623 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
6625 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
6626 the MonoClass pointer instead of the token in exception clauses.
6627 * reflection.c: updates for the above and make the code not depend
6628 on the structure of MonoExceptionClause.
6630 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
6632 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
6633 Add support for dynamic assemblies. Fixes #69114.
6635 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
6637 2004-11-07 Ben Maurer <bmaurer@ximian.com>
6639 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
6640 since most only those methods use it. the code member of
6641 MonoMethodPInvoke was dead, so that can be removed too. Also,
6642 remove inline_count (again, not used), and move slot so that it
6643 can share bits with some other flags. This saves 8 bytes in the
6644 structure and gives us about 50 kb back for mcs helloworld.cs
6646 * *.[ch]: Do naming changes for the above.
6648 * loader.c (mono_method_get_header): Lazily init the header
6650 (mono_get_method_from_token): don't init the header here
6651 (mono_free_method): the header may never be allocated
6653 Overall, this saves 150 kb of unmanaged allocations
6654 for mcs helloworld.cs. That accounts for 10% of the unmanaged
6657 * loader.c, loader.h (mono_method_get_header): new accessor.
6659 * *.[ch]: use the above method. Prepares us to lazily load
6662 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
6663 three warnings, which are actual bugs (see 69206).
6665 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
6666 unused. Saves a cool 4 bytes / method.
6668 2004-11-06 Ben Maurer <bmaurer@ximian.com>
6670 * metadata.c (builtin_types): Add types for System.Object here.
6671 (mono_metadata_parse_type_full): Cache MonoType*'s that are
6672 for a class or valuetype from klass->this_arg or klass->byval_arg.
6674 On mcs for a hello world, this gets us down from 21836 MonoType's
6677 (mono_metadata_free_type): Account for the above change.
6679 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
6681 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
6682 exception instead of asserting if name is null.
6683 (ves_icall_System_AppDomain_GetData): Ditto.
6685 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
6687 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
6690 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
6691 Return NULL when the domain does not have entry_assembly set.
6693 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
6694 Add a 'resource_modules' argument.
6695 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
6697 * reflection.c (mono_reflection_create_runtime_class): Move setting
6698 of wastypebuilder here, so mono_get_type_object () returns a MonoType
6701 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
6702 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
6703 Throw an ArgumentNullException if 'ptr' is null.
6705 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
6706 assemblies here. Fixes #69020.
6708 2004-11-05 Geoff Norton <gnorton@customerdna.com>
6710 * reflection.c (build_compressed_metadata): Fix the previous patch for
6711 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
6714 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
6716 * assembly.c (mono_assembly_names_equal): Allow a match if one of
6717 the cultures is false. Fixes #69090.
6719 * reflection.c (build_compressed_metadata): Fix invalid memory read
6720 detected by valgrind.
6722 * reflection.c (mono_reflection_get_type): Avoid triggering a
6723 TypeResolve multiple times for the same type. Fixes #65577.
6725 2004-11-04 Ben Maurer <bmaurer@ximian.com>
6727 * marshal.c: Avoid using ldftn to call managed functions. It is
6728 much slower than just a call.
6730 * reflection.c (mono_module_get_object): free the basename we
6731 allocate here from glib.
6733 * reflection.c (ensure_runtime_vtable): make sure to free
6734 overrides. Also, we were allocating an array of MonoMethod not an
6735 array of MonoMethod*.
6737 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
6739 * image.c (mono_image_close): free image->guid here.
6741 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
6743 * reflection.c: Fix some spec conformance issues with the PE file
6744 structures so mcs compiled apps run on the Net 2.0 beta.
6746 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
6748 * string-icalls.c (ves_icall_System_String_ctor_encoding):
6749 Implement this. Fixes #67264.
6751 * debug-helpers.h debug-helpers.c marshal.c: Move
6752 mono_find_method_by_name to debug-helpers.c.
6754 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
6756 * object.c (mono_release_type_locks): type_initialization_hash is
6759 * reflection.c object.c object-internals.h: Fix warnings.
6761 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
6762 without accessors. Fixes #61561.
6764 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
6765 application base from the root domain if not set. Fixes #65641.
6766 (mono_runtime_init): Fix warning.
6768 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6770 * appdomain.c: call mono_thread_pool_init.
6771 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
6772 of worker threads based on the number of CPUs and the environment
6773 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
6774 for non-windows (windows) systems.
6776 2004-10-27 Chris Toshok <toshok@ximian.com>
6778 * mono-debug-debugger.c (write_class): don't call mono_class_init
6779 here, as even with the check for (!klass->init_pending), we get
6780 into a situation where we're hitting cycles in class
6781 initialization. Fixes #68816.
6783 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
6785 * image.c: Avoid overwriting values in the loaded_images_hash when an
6786 assembly is loaded multiple times. Fixes #61152.
6788 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
6789 so multiple satellite assemblies for the same name can be loaded.
6792 * mono_domain_assembly_preload: Actually return the loaded assembly,
6795 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
6796 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
6798 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
6799 pending finalizers are not invoked after the appdomain has been
6800 unloaded. Fixes #67862.
6802 2004-10-22 Martin Baulig <martin@ximian.com>
6804 * mono-debug-debugger.c
6805 (mono_debugger_runtime_invoke): Don't box valuetypes.
6807 2004-10-22 Chris Toshok <toshok@ximian.com>
6809 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
6810 don't hide private methods.
6812 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
6814 * icall.c: Allows the runtime to "share" (when known) the public key
6815 token of an assembly. This avoid the need to recalculate the token
6816 (from the public key) in managed code.
6818 2004-10-21 Chris Toshok <toshok@ximian.com>
6820 * debug-helpers.c (append_class_name): argh, revert last patch.
6822 2004-10-21 Chris Toshok <toshok@ximian.com>
6824 * debug-helpers.c (append_class_name): use '+' as the delimiter,
6825 not '/', so that it matches what the debugger uses to look up
6828 2004-10-21 Martin Baulig <martin@ximian.com>
6830 * mono-debug-debugger.c (mono_debugger_throw_exception): New
6831 public method; this is called each time an exception is thrown and
6832 allows the debugger to use exception catch points.
6834 2004-10-21 Martin Baulig <martin@ximian.com>
6836 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
6837 the stack pointer and the exception object in some struct and pass
6838 that to the debugger.
6840 2004-10-21 Chris Toshok <toshok@ximian.com>
6842 * mono-debug-debugger.c (do_write_class): add instance/static
6843 event support. We don't expose "raise" or "other" yet.
6844 (event_is_static): new method.
6846 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
6848 * mono-debug-debugger.c
6849 (mono_debugger_handle_exception): Remove
6850 bogus return value for fussy compilers.
6852 2004-10-20 Martin Baulig <martin@ximian.com>
6854 * mono-debug-debugger.c
6855 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
6856 (mono_debugger_handled_exception): Likewise.
6858 2004-10-20 Martin Baulig <martin@ximian.com>
6860 * mono-debug-debugger.h (MonoDebuggerEvent): Added
6861 MONO_DEBUGGER_EVENT_EXCEPTION.
6863 * mono-debug-debugger.c (mono_debugger_handle_exception): New
6864 public function to send the debugger a notification for an
6865 exception and inform it about a catch/finally clause.
6867 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
6869 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
6870 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
6873 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
6875 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
6877 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
6878 marshalled as [In,Out]. Fixes #58325.
6880 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
6882 * reflection.c (mono_method_body_get_object): Implement some fields.
6884 2004-10-12 Martin Baulig <martin@ximian.com>
6886 * reflection.c (mono_reflection_bind_generic_parameters): Small
6887 fix, correctly retrieve our parent from a generic instance.
6889 2004-10-12 Martin Baulig <martin@ximian.com>
6891 * metadata.c (mono_metadata_generic_param_equal): We always have
6895 (mono_class_from_generic_parameter): We need to have an owner.
6896 (my_mono_class_from_generic_parameter): Likewise.
6898 * reflection.c (mono_reflection_setup_generic_class): Renamed to
6899 mono_reflection_create_generic_class() and added a new
6900 mono_reflection_setup_generic_class().
6901 (mono_reflection_initialize_generic_param): If we're a nested
6902 generic type and inherited from the containing class, set our
6903 owner to the outer class.
6905 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
6907 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
6909 * reflection.c (mono_method_body_get_object): New function to create
6910 a MethodBody object.
6912 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
6914 2004-10-11 Martin Baulig <martin@ximian.com>
6916 * metadata.c (_mono_metadata_type_equal): Renamed to
6917 do_mono_metadata_type_equal() and made static.
6919 2004-10-11 Martin Baulig <martin@ximian.com>
6921 * appdomain.c: Bump corlib version number to 28.
6923 2004-10-10 Martin Baulig <martin@ximian.com>
6926 (MonoGenericInst): Added `MonoGenericContainer *container'.
6927 (MonoGenericMethod): Likewise.
6928 (MonoGenericContext): Likewise.
6929 (MonoGenericParam): Added `MonoGenericContainer *owner'.
6932 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
6933 (do_mono_metadata_parse_generic_inst): Likewise.
6934 (mono_metadata_parse_type_full): New public method. This is the actual
6935 mono_metadata_parse_type() implementation - with an additional
6936 `MonoGenericContainer *' argument.
6937 (mono_metadata_parse_array_full): Likewise.
6938 (mono_metadata_parse_signature_full): Likewise.
6939 (mono_metadata_parse_method_signature_full): Likewise.
6940 (mono_metadata_parse_mh_full): Likewise.
6941 (mono_type_create_from_typespec): Likewise.
6942 (mono_metadata_interfaces_from_typedef_full): New public method;
6943 this is similar to the other _full() methods, but we take a
6944 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
6945 (mono_metadata_parse_generic_param): Take an additional
6946 `MonoGenericContainer *' argument and lookup the MonoGenericParam
6947 from that container.
6948 (mono_metadata_generic_param_equal): New static method to compare
6949 two type parameters.
6950 (_mono_metadata_type_equal): New static method; takes an
6951 additional `gboolean signature_only' argument - if true, we don't
6952 compare the owners of generic parameters.
6953 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
6954 with a TRUE argument - do a signature-only comparision.
6956 * loader.c: Use the new _full() methods and pass the
6957 MonoGenericContainer to them.
6959 * object-internals.h (MonoReflectionTypeBuilder): Added
6960 `MonoGenericContainer *generic_container' field.
6961 (MonoReflectionMethodBuilder): Likewise.
6963 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
6965 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
6966 case initial images of dynamic assemblies.
6968 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
6970 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
6972 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
6973 length of event->other array.
6974 (typebuilder_setup_events): Ditto.
6976 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
6977 'assembly_by_name' and add an 'assemblies' list.
6979 * assembly.h assembly.c: Add a new search hook for determining whenever
6980 an assembly is already loaded. Use this instead of searching in the
6981 loaded_assemblies list.
6983 * domain.c appdomain.c: Implement the new search hook so loaded
6984 assemblies are now scoped by appdomain. Fixes #67727.
6986 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
6988 * threads.c (mono_thread_attach): Initialize synch_lock field so
6989 mono_thread_detach works again.
6991 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
6992 'lib' too. Fixes #63130.
6994 2004-10-06 Jackson Harper <jackson@ximian.com>
6996 * culture-info-tables.h: regenerated.
6998 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
7000 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
7001 implemented by other interfaces in the result. Fixes #65764.
7003 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7004 Handle unloadable modules without crashing.
7006 * image.c (load_modules): Revert the previous patch since modules must
7007 have a fixed index inside the array.
7009 * image.c (load_modules): Don't include native modules in the modules
7012 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
7014 * reflection.h: Add param_defaults field.
7016 * reflection.c: Add support for parameter defaults in dynamic methods.
7019 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
7020 an empty string when a type has no namespace. Fixes #64230.
7022 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
7024 * tabledefs.h: Added "internal" security actions to support non-CAS
7025 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
7026 Note: they do not seems to be used anymore in 2.0 (new metadata format)
7028 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
7030 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
7031 constructor of abstract class. Fixes #61689.
7033 2004-10-04 Martin Baulig <martin@ximian.com>
7035 * class-internals.h (MonoGenericContainer): New type.
7036 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
7037 `MonoGenericContainer *generic_container'.
7038 (MonoClass): Replaced `gen_params' and `num_gen_params' with
7039 `MonoGenericContainer *generic_container'.
7041 * metadata.c (mono_metadata_load_generic_params): Return a
7042 `MonoGenericContainer *' instead of a `MonoGenericParam *';
7043 removed the `num' argument.
7045 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
7047 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
7050 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
7053 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
7055 * reflection.c: Save pe_kind and machine values into the generated
7058 * appdomain.c: Bump corlib version number.
7060 * object-internals.h: Reorganize layout of LocalBuilder.
7062 * class-internals.h class.c (mono_class_get_implemented_interfaces):
7063 New helper function.
7065 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
7066 created MonoType for dynamic types. Fixes #66180.
7068 2004-10-02 Ben Maurer <bmaurer@ximian.com>
7070 * threadpool.c: the ares hashtable needs a critical section around it.
7071 this prevents some nasty segfaults
7073 2004-10-02 Massimiliano Mantione <massi@ximian.com>
7075 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
7076 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
7079 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
7081 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
7083 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
7085 * image.c: Always canonicalize image file names, to avoid loading
7086 the same assembly twice when referenced using a relative path.
7088 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
7090 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
7092 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
7094 * marshal.c: Fix warnings.
7096 2004-09-29 Geoff Norton <gnorton@customerdna.com>
7098 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
7099 attempting to marshal the delegate_trampoline as the method_addr.
7100 This patch has a static hashtable of marshalled delegates so that
7101 we can map delegate_trampoline addresses back to delegates. This
7102 allows a delegate passed to managed code to be passed back into native
7105 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
7107 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
7109 * reflection.c (method_encode_code): Align method headers properly.
7112 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
7114 * marshal.c: In the runtime invoke wrapper, reset the abort
7115 exception if it is cached. This avoids the automatic rethrowal of
7116 the exception after the catch of the wrapper. Also check for pending
7117 interruptions before calling the managed method. This is done using
7118 the new method emit_thread_force_interrupt_checkpoint, since the
7119 normal checkpoint method is ignored when running the invoke wrapper.
7120 * object.c: If the abort exception is rethrown, set the abort_exc
7121 field of the thread, so it will be rethrown aftere every catch.
7122 * threadpool.c: Only run an interruption checkpoint if what has been
7123 requested is a stop of the thread (aborts will be ignored).
7124 * threads.c: By default, a thread will now never be interrumped while
7125 running the runtime invoke wrapper (this ensures that runtime_invoke
7126 will always return to the caller if an exception pointer is provided).
7127 There is a new special method mono_thread_force_interruption_checkpoint()
7128 to force an interruption checkpoint even if running a protected
7129 wrapper, which is used by the same runtime invoke wrapper to do a check
7132 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
7134 * object.c, object-internals.h: Implemented mono_release_type_locks,
7135 which releases the cctor locks held by a thread.
7136 * threads.c, threads.h: In thread_cleanup, release cctor locks held
7137 by a thread. Added mono_thread_exit() method to be used to safely stop
7140 2004-09-28 Raja R Harinath <rharinath@novell.com>
7142 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7143 Move null check before dereference. Avoid indexing beyond the end
7144 of the 'modules' array.
7146 2004-09-28 Raja R Harinath <rharinath@novell.com>
7148 * metadata-internals.h (MonoImage): Add module_count field.
7149 * image.c (load_modules): Set image->module_count.
7150 (mono_image_load_file_for_image): Use image->module_count.
7151 * reflection.c (mono_image_load_module): Append to image->modules array
7152 of dynamic assembly.
7153 (mono_module_get_object): Fix loop to actually increment index.
7154 Use image->module_count.
7155 * assembly.c (mono_assembly_load_references): Use image->module_count.
7156 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
7159 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
7161 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
7162 Avoid assert on generic types.
7164 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
7166 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
7168 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
7170 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
7171 function to convert a MarshalSpec structure to its managed counterpart.
7173 * reflection.c: Fix warnings.
7175 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
7178 * icall.c (mono_create_icall_signature): Fix build.
7180 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
7182 * icall.c: Add MakePointType icall.
7184 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
7187 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7189 * threadpool.c: reuse allocated slots in the queue.
7191 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
7193 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
7195 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
7197 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
7200 * tabledefs.h: Add constants for pinvoke attributes BestFit and
7201 ThrowOnUnmappableChar.
7203 * icall.c (ves_icall_Type_GetPacking): New icall.
7205 2004-09-24 Martin Baulig <martin@ximian.com>
7207 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
7209 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7212 (mono_domain_set): allow setting a domain that is being unloaded.
7213 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
7216 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
7218 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
7219 the GetCustomAttributes icall.
7221 2004-09-23 Martin Baulig <martin@ximian.com>
7223 * object-internals.h (MonoReflectionGenericParam): Replaced
7224 'has_ctor_constraint', `has_reference_type' and `has_value_type'
7225 with `guint32 attrs'.
7227 2004-09-23 Martin Baulig <martin@ximian.com>
7229 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
7231 2004-09-23 Martin Baulig <martin@ximian.com>
7233 * object-internals.h (GenericParameterAttributes): New enum.
7235 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
7237 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
7239 * class.c (init_events): Fill out event->other field.
7241 * class.c: Fix warnings.
7243 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
7245 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7247 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
7248 walk which doesn't supply the IL offset.
7250 2004-09-22 Martin Baulig <martin@ximian.com>
7252 * reflection.c (mono_reflection_setup_internal_class): If we're
7253 System.ValueType, System.Object or System.Enum, set
7254 `klass->instance_size' and create the vtable.
7255 (mono_reflection_create_internal_class): If we're an enum type,
7256 get the base class from our current corlib.
7258 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
7260 * reflection.h (MonoResolveTokenError): New type.
7262 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
7265 * icall.c: Add an 'error' argument to the ResolveToken icalls.
7267 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
7269 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
7270 Support also calling constructors, but only for already allocated objects.
7272 2004-09-17 Geoff Norton <gnorton@customerdna.com>
7274 * reflection.c (type_get_qualified_name): If the klass is null
7275 return the typename to avoid a NullRefEx.
7276 (encode_cattr_value): Get the qualified name of the boxed type,
7277 not the underlying enumtype. Fixes #62984.
7279 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
7281 * marshal.c: Fix problems with previous checkin.
7283 2004-09-21 <vargaz@freemail.hu>
7285 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
7286 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
7288 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
7290 2004-09-21 Geoff Norton <gnorton@customerdna.com>
7292 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
7293 should only return a type for pointers, arrays, and passbyref types.
7296 2004-09-21 Martin Baulig <martin@ximian.com>
7298 * domain.c (mono_debugger_check_runtime_version): New public
7301 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
7303 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
7305 * reflection.c: Added missing sort to the declarative security
7306 attributes table. MS implementation stops seeing the attributes if the
7307 token number regress in the table (as shown by ildasm and permview).
7309 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
7311 * object-internals.h (MonoReflectionModule): Add 'token' field.
7313 * reflection.c (mono_reflection_get_token): Add support for Module
7315 (mono_module_get_object): Set 'token' field.
7316 (mono_module_file_get_object): Set 'token' field.
7318 * icall.c: Add new Assembly and Module icalls.
7320 * appdomain.c: Bump corlib version.
7322 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
7324 * loader.h loader.c class.h class.c: Add helper functions for obtaining
7325 tokens of metadata objects.
7327 * reflection.h reflection.c (mono_reflection_get_token): New function
7328 to obtain the token of a metadata object.
7330 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
7332 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
7334 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
7336 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
7338 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
7340 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
7341 * object-internals.h: Added 3 MonoArray* members to MonoReflection
7342 AssemblyBuilder to access the permissions set in the class lib.
7343 * reflection.c: Added security attributes encoding step in
7344 mono_image_build_metadata.
7345 * tabledefs.h: Added new security actions defined in 2.0:
7346 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
7348 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
7350 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
7353 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
7355 * locales.c: nullify the ICU_collator member of CompareInfo when it is
7356 finalized. There where random SIGSEVs at program termination, when
7357 an object being finalized was trying to do a string comparison and
7358 the current culture was already finalized.
7360 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7362 * threads.c: call thread_cleanup before finishing the thread if we get
7365 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
7367 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
7368 assemblies from the parent. Fixes #65665.
7370 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
7372 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
7375 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
7377 * reflection.h: add prototype for mono_get_dbnull_object
7378 * reflection.c: add prototypes for get_default_param_value_blobs
7379 and mono_get_object_from_blob for fussier compilers
7381 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
7383 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
7384 false deadlock checks in class initialization.
7386 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
7388 * image.c (mono_image_addref): Fix comment.
7390 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
7393 2004-09-12 Jambunathan K <kjambunathan@novell.com>
7395 * reflection.c (mono_param_get_objects): Modified to return
7396 ParameterInfo.DefaultValue object.
7398 (get_default_param_value_blobs):
7399 (mono_get_object_from_blob):
7400 (mono_get_dbnull_object): New helper routines.
7402 * object.c (mono_get_constant_value_from_blob): New helper routine
7403 carved out from get_default_field_value ()
7405 * object-internals.h (mono_get_constant_value_from_blob): Added
7406 function declaration.
7408 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
7410 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
7411 referenced assemblies. Fixes #62135.
7413 * exception.h exception.c (mono_get_exception_file_not_found2): New
7416 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
7418 * class.h class.c: Add mono_type_get_underlying_type ().
7420 2004-09-09 Geoff Norton <gnorton@customerndna.com>
7422 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
7423 Fix GetTypes() to support dynamically created assemblies.
7425 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
7427 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
7429 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
7432 * reflection.h reflection.c loader.c: Allow dynamic construction of
7433 pinvoke methods. Fixes #65571.
7435 * reflection.c (mono_reflection_get_type): Revert previous change since
7436 it causes regressions.
7438 2004-09-08 Martin Baulig <martin@ximian.com>
7440 * class.c (class_compute_field_layout): Don't call
7441 mono_class_layout_fields() for open generic instances.
7443 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
7444 * threads.c appdomain.c: fix typo in GC macro
7446 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7448 * threads.c: don't call mono_thread_detach() in start_wrapper(),
7449 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
7451 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
7453 * image.c (mono_image_close): Applied patch from
7454 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
7455 assembly is loaded multiple times from data.
7457 * image.c (mono_image_open): Fix warning.
7459 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
7461 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
7464 * reflection.c (mono_reflection_create_runtime_class): Initialize
7465 klass->nested_classes. Fixes #61224.
7467 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
7469 * threads.c: sched_yield() on exit, to allow threads to quit.
7471 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
7473 * object.c (mono_unhandled_exception): Remove leftover debug code.
7475 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
7477 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
7479 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
7481 * marshal.c (emit_marshal_array): Really null terminate string arrays.
7483 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
7485 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
7487 * marshal.c (emit_marshal_array): Null terminate string arrays.
7489 * marshal.c (raise_auto_layout_exception): Fix warning.
7491 * reflection.c (mono_param_get_objects): Initialize the default value
7492 with DBNull.Value, not null. Fixes #62123.
7494 2004-09-01 Miguel de Icaza <miguel@ximian.com>
7496 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
7497 throw an exception with a cute explanation.
7499 2004-09-06 Dick Porter <dick@ximian.com>
7501 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
7502 Close the new process's thread handle, as we don't use it. The
7503 handle stays around forever otherwise.
7505 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
7507 * object.c (arith_overflow): Fix warning.
7509 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
7510 calling conventions in method refs. Fixes #65352.
7512 * reflection.c: Fix warnings.
7514 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
7516 * icall.c: Add a new icall for Array.Clear
7518 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
7520 * object.c: When allocating an array, we have to throw
7521 an overflow exception if any of the lengths are < 0.
7523 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
7525 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
7526 properly. Also move implementation of string array marshalling to
7527 managed code. Fixes #42316.
7529 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7531 * assembly.c: provide more information when loading an assembly fails.
7533 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7535 * filewatcher.c: don't expect the development fam package to be
7538 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
7540 * marshal.c: Make a copy of the signature cookie since it will be
7541 freed by the caller.
7543 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
7545 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
7547 * metadata.c (mono_metadata_free_marshal_spec): New function to free
7550 * marshal.c: More refactoring.
7552 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
7555 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
7557 * object.c: In mono_message_invoke, fill the output parameter array after
7558 calling the managed method (it was done before the call). This fixes
7561 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
7563 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
7566 2004-09-02 Martin Baulig <martin@ximian.com>
7568 * class.c (mono_class_instance_size): Don't allow generic type
7569 definitions or open generic instances.
7570 (mono_class_array_element_size): If we're a value type, call
7571 mono_class_instance_size() on the original class.
7573 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
7574 handle generic instances.
7576 * mono-debug-debugger.c (write_type): Handle generic instances
7579 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
7581 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
7582 the allocation request fails. Fixes #65089.
7584 * object.c (mono_runtime_free_method): Do not call mono_free_method.
7586 * object.c (mono_runtime_free_method): New function to free a dynamic
7589 * marshal.c (mono_delegate_free_ftnptr): New function to free the
7590 delegate trampoline.
7592 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
7593 with hasthis as dynamic,
7595 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
7597 * domain.c (mono_jit_info_table_remove): New function to remove an
7598 entry from the jit info table.
7600 * class-internals.h (MonoMethod): Add 'dynamic' field.
7602 * loader.c: Fix warnings.
7604 2004-09-01 Martin Baulig <martin@ximian.com>
7606 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
7607 instead of mono_debugger_lock() because the latter one is a no-op
7608 unless running in the debugger.
7610 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
7612 * class.c (class_compute_field_layout): Classes with auto-layout or
7613 reference fields are not blittable.
7615 2004-09-01 Dick Porter <dick@ximian.com>
7617 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
7618 mono_image_get_filename() to get the assembly location.
7621 * metadata.h: Fix compile warnings
7623 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
7625 * class.c (class_compute_field_layout): System.Object is blittable.
7627 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
7628 as in/out. Fixes #59909.
7630 2004-09-01 Martin Baulig <martin@ximian.com>
7632 * metadata.h (MONO_TYPE_ISREFERENCE): Call
7633 mono_metadata_generic_inst_is_valuetype() if we're a generic
7634 instance to check whether our underlying type is a reference type.
7636 2004-09-01 Martin Baulig <martin@ximian.com>
7638 * metadata.c (mono_type_size): If we're a generic instance, call
7639 mono_class_value_size() for value types.
7641 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
7643 * marshal.c: Implement more custom marshalling functionality. Fixes
7646 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
7648 * mono-debug.c, debug-mono-symfile.c: add some locking love.
7650 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
7652 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
7654 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
7656 * icall.c: Fix some warnings.
7658 * threads.c (abort_appdomain_thread): Fix unref errors.
7659 (mono_thread_current): Fix THREAD_DEBUG define.
7661 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
7663 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
7665 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
7667 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
7669 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
7672 2004-08-28 Martin Baulig <martin@ximian.com>
7675 (mono_metadata_generic_inst_is_valuetype): New public function.
7677 * metadata.h (MONO_TYPE_ISSTRUCT): Call
7678 mono_metadata_generic_inst_is_valuetype() if we're a generic
7679 instance to check whether our underlying type is a valuetype.
7681 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
7683 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
7686 2004-08-25 Martin Baulig <martin@ximian.com>
7688 * loader.c (mono_get_method_from_token): Abstract methods can also
7689 be generic and thus have type parameters.
7691 * metadata-internals.h
7692 (MonoDynamicImage): Added `GPtrArray *gen_params'.
7694 * reflection.c (mono_image_get_generic_param_info): Don't create a
7695 metadata row, just add an entry to the `gen_params' array.
7696 (build_compressed_metadata): Sort the `gen_params' array and then
7697 actually create the metadata.
7699 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7701 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
7703 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
7705 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
7707 2004-08-24 Martin Baulig <martin@ximian.com>
7709 * class.cs (mono_class_is_subclass_of): Like an interface, a
7710 generic instance also derives from System.Object.
7712 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
7714 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
7715 custom modifiers to be in any order. Fixes #61990.
7717 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
7719 * object.c: Register mono_object_new_fast icall.
7721 * object.c (mono_class_get_allocation_ftn): Return to calling
7722 mono_object_new_fast, since it seems faster to compute the object
7723 size in unmanaged code than passing it as a parameter.
7725 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
7727 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
7728 this function with Boehm as the oom handler, so we don't have to check
7729 the result of GC_malloc.
7731 * object.c: Remove checks for oom.
7733 * object.h object.c (mono_class_get_allocation_ftn): New function to
7734 return the icall which can be used to allocate an instance of a given
7737 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
7739 * class-internals.h: Add 'enabled' field.
7741 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
7743 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
7745 2004-08-18 Jambunathan K <kjambunathan@novell.com>
7746 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
7749 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
7751 * appdomain.c: use the Tls function for appdomain too,
7752 at Zoltan's request. Actually return in mono_context_get
7754 * appdomain.c, profiler.c, threads.c: use __thread
7756 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
7758 * appdomain.c threads.c: Call GC_CreateThread on windows.
7760 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
7761 multiple libraries since this don't work on windows.
7763 2004-08-18 Martin Baulig <martin@ximian.com>
7766 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
7769 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
7770 MonoMethodNormal since we also need it for abstract and interface
7774 (build_compressed_metadata): Sort the GenericParam table.
7775 (mono_image_create_token): Added `gboolean create_methodspec'
7776 argument; this is false when generating a MethodImpl token.
7777 (reflection_methodbuilder_to_mono_method): Abstract and interface
7778 methods may also have generic parameters.
7780 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
7782 * appdomain.c: thread local alloc
7784 2004-08-17 Martin Baulig <martin@ximian.com>
7786 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
7789 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
7792 * class.c (mono_type_get_full_name): New public function.
7793 (mono_type_get_name): Don't include the type arguments.
7795 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
7797 * Makefile.am: Build static versions of libmetadata and libmonoruntime
7798 for inclusion into the mono executable.
7800 2004-08-16 Martin Baulig <martin@ximian.com>
7802 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
7803 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
7805 2004-08-14 Martin Baulig <martin@ximian.com>
7807 * class.c (dup_type): Also copy the `byref' field.
7809 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
7811 * reflection.c (create_dynamic_mono_image): Revert the last change
7812 since it breaks bootstrap.
7814 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
7816 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
7818 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
7819 not free them with g_free.
7821 2004-08-11 Martin Baulig <martin@ximian.com>
7823 * reflection.c (mono_reflection_setup_internal_class): Also call
7824 mono_class_setup_mono_type() if we already have a `tb->type.type'.
7826 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
7828 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
7829 called during default (first) AppDomain creation. Keep track of
7830 Evidence when loading assemblies.
7832 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
7834 * opcodes.c, opcodes.h: reduce runtime relocations.
7836 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
7838 * culture-info.h, locales.c: fixes and chages to sue the new
7839 optimized format of the locale data.
7840 * culture-info-tables.h: regenerated.
7842 2004-08-06 Geoff Norton <gnorton@customerdna.com>
7844 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
7846 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
7848 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
7849 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
7850 * domain-internals.h: icall declaration.
7851 * icall.c: icall registration.
7852 * object-internals.h: New fields in MonoAssembly for CAS.
7854 2004-08-05 Duncan Mak <duncan@ximian.com>
7856 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
7859 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
7861 * reflection.c: fix to deal with object[] arrays in custom ctors
7864 2004-08-05 Martin Baulig <martin@ximian.com>
7866 * class.c (mono_class_array_element_size): Added support for
7867 generic instances and correctly handle "recursive" types.
7869 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
7871 * assembly.c: Fix warnings.
7873 2004-08-04 Martin Baulig <martin@ximian.com>
7876 (mono_type_get_name_recurse): Added `gboolean include_arity'
7877 argument specifying whether or not we should include the generic
7878 arity in the type name.
7879 (_mono_type_get_name): New static function.
7880 (mono_class_setup_vtable): If we're a generic instance, don't
7881 include the generic arity in the names of explicit method
7884 2004-08-03 Martin Baulig <martin@ximian.com>
7886 * class.c (mono_type_get_name_recurse): Enclose the generic type
7887 arguments in `<', '>'.
7889 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7891 * gc.c: make GC warning messages use the trace API, they are just
7892 noise to most of the users.
7894 2004-08-03 Martin Baulig <martin@ximian.com>
7896 * debug-mono-symfile.c (read_string): Correctly read the string.
7898 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
7900 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
7902 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
7904 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
7906 2004-07-30 Martin Baulig <martin@ximian.com>
7908 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
7909 Reflect latest symbol writer changes.
7911 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
7913 * object.c: always create an object if null is passed
7914 to Invoke() where a valuetype is expected.
7916 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
7918 * marshal.c (mono_marshal_init): make managed
7919 signatures match native ones better for 64bits.
7921 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7923 * appdomain.c: hack to build correctly the private bin path on windows.
7926 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
7928 * assembly.c: Load mscorlib from the correct framework directory
7929 (mono/<version>/mscorlib.dll).
7930 * appdomain.h: Added prototypes for new functions.
7931 * internals.h: Added some prototypes.
7932 * domain.c: When initializing the runtime, get from the executable and
7933 the configuration files the runtime version that the app supports.
7934 Added support methods for reading app.exe.config. Added list of versions
7935 supported by the JIT. Added two new methods: mono_init_from_assembly,
7936 which initializes the runtime and determines the required version from
7937 the provided exe file, and mono_init_version, which initializes
7938 the runtime using the provided version.
7939 * icall.c: Get machine.config from version-specific directory.
7940 * reflection.c: When generating an image, embed the version number
7941 of the current runtime.
7943 2004-07-28 Dick Porter <dick@ximian.com>
7946 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
7947 returned sockaddr size before creating the remote address object.
7948 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
7951 2004-07-28 Dick Porter <dick@ximian.com>
7953 * locales.c (string_invariant_compare_char): Fix invariant char
7954 compares between upper and lower cases. Fixes bug 61458.
7956 2004-07-27 Ben Maurer <bmaurer@ximain.com>
7958 * marshal.c: actually cache stelem.ref wrappers.
7960 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
7962 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
7963 sections and remove the mono_cli_rva_map () function.
7965 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
7967 * debug-mono-symfile.c: fix one more endianess issue, from a patch
7968 by Geoff Norton (<gnorton@customerdna.com>).
7970 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
7972 * class.c: fix class loads for pointer types (typeof(int) !=
7975 2004-07-27 Martin Baulig <martin@ximian.com>
7977 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
7978 reading the debugging information from an external ".mdb" file.
7980 2004-07-24 Martin Baulig <martin@ximian.com>
7982 * reflection.c (mono_image_get_type_info): Only write a class
7983 layout entry if we actually have a size or a packing size.
7985 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
7987 * reflection.c (type_get_fully_qualified_name):
7988 insert cast to get type checking of ?: with non-gcc compilers
7990 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
7992 * rand.c: use g_getenv for both lookups of
7995 2004-07-17 Martin Baulig <martin@ximian.com>
7997 * reflection.c (mono_reflection_bind_generic_method_parameters):
7998 Set `gmethod->reflection_info'.
8000 2004-07-17 Martin Baulig <martin@ximian.com>
8002 * class.c (mono_class_create_from_typedef): Insert the newly
8003 created class into the hash table before computing the interfaces
8004 since we could be called recursively.
8006 2004-07-16 Ben Maurer <bmaurer@ximain.com>
8008 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
8009 function to implement stelem.ref in managed code
8010 * class-internals.h, debug-helpers.c: a new wrapper type
8013 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
8015 * gc.c: allow GC handles to work even when no GC is compiled in.
8016 Fix part of bug #61134 (GetAddrOfPinnedObject).
8018 2004-07-13 Peter Williams <peter@newton.cx>
8020 * process.c (complete_path): Make sure we don't attempt to execute
8023 2004-07-12 Geoff Norton <gnorton@customerdna.com>
8025 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
8026 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
8027 and will add/subtract the hour if needed
8029 2004-07-12 Martin Baulig <martin@ximian.com>
8031 * reflection.c (mono_field_get_object): If we have
8032 `field->generic_info', take the attributes from
8033 `field->generic_info->generic_type'.
8035 2004-07-12 Martin Baulig <martin@ximian.com>
8037 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
8038 This function must be called before initializing the runtime.
8039 (mono_debug_init_1): New function; call this after initializing
8040 the runtime, but before loading the assembly. It tells the
8041 debugger to load corlib and the builtin types.
8043 * mono-debug-debugger.c: Did some larger changes in the debugging
8044 code; support recursive class declarations, make sure we actually
8047 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8049 * debug-helpers.c: undo my previous patch and fixed the real issue in
8050 ../mini/exceptions-x86.c
8052 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8054 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
8055 when no HOME env. variable was set and a NullRef was thrown in a .cctor
8056 called from other .cctors.
8058 2004-07-09 Miguel de Icaza <miguel@ximian.com>
8060 * loader.c: Removed the mono_loader_wine_init hack now that we are
8061 doing a managed version of Windows.Forms.
8063 2004-07-09 Ben Maurer <bmaurer@ximian.com>
8065 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
8066 threadpool.c, threads.c: remove static data from rootset.
8068 2004-07-09 Dick Porter <dick@ximian.com>
8070 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
8071 Don't do any more processing if the matched length was 0. It was
8072 increasing the size of the string before. Fixes bug 61167.
8074 2004-07-09 Dick Porter <dick@ximian.com>
8078 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
8079 Add support for SO_PEERCRED if its available.
8081 2004-07-09 Peter Bartok <pbartok@novell.com>
8082 * loader.c: winelib.exe.so error message is now only displayed if
8083 MONO_DEBUG is set. To help us avoid questions when people are trying
8084 out the new Managed.Windows.Forms.
8086 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
8088 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
8089 for isinst and castclass wrappers.
8091 * class-internals.h icall.c: Move registration and lookup of JIT icalls
8092 to libmetadata from the JIT, so they could be used by the marshalling
8093 code and the interpreter.
8095 * marshal.c: Register marshalling related JIT icalls here instead of
8096 in mini.c. Use CEE_MONO_ICALL instead of the family of
8097 CEE_MONO_PROC<x> opcodes to call marshalling functions.
8099 * metadata.h: Remove unneeded marshalling conversions.
8101 * opcodes.c: Update for new opcodes.
8103 2004-07-08 Martin Baulig <martin@ximian.com>
8105 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
8106 (mono_debug_get_domain_data): Make this function static.
8108 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8110 * gc.c, object.h: add nice GC handle API for embedders.
8112 2004-07-06 Ben Maurer <bmaurer@ximian.com>
8114 * reflection.c: more changes for the new api
8116 * object.c: When we reflect on a field w/ a constant value, it
8117 will not have a memory location, so we must access metadata. Also,
8118 allow easier reading of strings so that we can read them from
8121 * class.c (mono_class_layout_fields): no need for literal fields here.
8123 * class-internals.h: api changes for const fields
8125 * icall.c (ves_icall_get_enum_info): use new apis for const fields
8127 2004-07-06 Martin Baulig <martin@ximian.com>
8129 * mono-debug.h: Increment version number to 44.
8131 * mono-debug.c (mono_debug_add_wrapper): The second argument is
8132 now a gpointer, rewrote this whole method.
8134 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
8135 function. Add information about the wrapper in a new "misc table".
8137 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
8138 for the new misc table.
8140 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
8142 * metadata-internals.h image.c: Add a cache for helper signatures.
8144 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
8146 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
8148 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
8149 delegates from a delegate. Fixes #61033.
8151 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
8152 marshalling of stringbuilder arrays. Fixes #59900.
8154 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
8156 * icall.c: Add EnumBuilder:setup_enum_type icall.
8158 2004-06-30 Ben Maurer <bmaurer@ximian.com>
8160 * icall.c: Added a new icall for the property version of
8163 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
8165 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
8166 it has a constant size across platforms.
8168 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
8171 2004-06-29 Martin Baulig <martin@ximian.com>
8173 * mono-debug.c (mono_debug_add_method): Protect the whole function
8174 in mono_debugger_lock(), not just parts of it.
8176 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
8178 * reflection.c: make sure padding bytes in heaps are zeroed.
8180 2004-06-24 David Waite <mass@akuma.org>
8182 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
8183 image.c, loader.c, locales.c, marshal.c, metadata.c,
8184 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
8185 string-icalls.c, threads.c: change to C90-style comments from C99 /
8188 2004-06-24 Dick Porter <dick@ximian.com>
8191 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
8192 return createdNew. Fixes bug 60412.
8195 * icall.c: Add createdNew parameter to CreateMutex icall
8197 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8199 * reflection.c, object-internals.h: save default value in params.
8201 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8203 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
8204 no need to build a new path combining that with the application base.
8207 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
8209 * reflection.c: fixed minor standard compliance issues.
8211 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
8213 * reflection.c: fixed issue with encoding some custom attributes
8214 (arrays in properties and fields, bug #60411).
8216 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8218 * reflection.c: fix start address when copying the public key token.
8220 2004-06-23 Martin Baulig <martin@ximian.com>
8222 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
8223 the `exc' object in a static object to put it into the GC's root set.
8225 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
8227 * reflection.c: make mono_reflection_setup_internal_class ()
8228 callable a second time to setup a new parent class.
8230 2004-06-23 Dick Porter <dick@ximian.com>
8232 * threads.c: Check for WAIT_IO_COMPLETION return values.
8234 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
8236 * appdomain.c: Removed the g_free on the public key token. Now copy
8237 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
8238 * assembly.c: Added public key token string value when loading
8239 assemblies. Fix bug #60439.
8240 * icall.c: Added missing informations (like public key) in
8241 GetReferencedAssemblies. Fix #60519.
8242 * image.h: Changed definition for public key token from const char*
8243 public_tok_value to guchar public_key_token [17];
8244 * reflection.c: Updated for changes to public key token.
8246 2004-06-22 Lluis Sanchez Gual
8248 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
8249 for the field in base classes.
8251 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8253 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
8254 mark headers as not supported, they are installed only for use by the
8257 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
8259 * *.c, *.h: avoid namespace pollution in public headers.
8261 2004-06-21 Martin Baulig <martin@ximian.com>
8263 * exception.c (mono_get_exception_security): It's in
8264 "System.Security", not in "System".
8266 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
8267 the exception classes.
8269 2004-06-21 Martin Baulig <martin@ximian.com>
8271 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
8272 Protect the exception object from being finalized.
8274 2004-06-21 Martin Baulig <martin@ximian.com>
8276 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
8279 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
8281 * reflection.c: Load the assembly in mono_reflection_type_from_name,
8282 if it was not loaded before. Fix parts of #60439.
8284 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
8286 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
8287 code that was broken since Ben's change: wrappers are now
8288 dependent on the method signature only again.
8290 2004-06-21 Martin Baulig <martin@ximian.com>
8292 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
8293 added interface support.
8295 2004-06-21 Martin Baulig <martin@ximian.com>
8297 * class.c (mono_vtable_get_static_field_data): New public method.
8299 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
8301 * filewatcher.c : Windows build fix to be compliant with API changes.
8303 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8305 * class.h, class.c: more accessors.
8306 * metadata.h, metadata.c: prepare for hiding MonoType and
8307 MonoMethodSignature: people should use the accessors from now on
8308 outside of the tree.
8310 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
8312 * *.c, *.h: more API cleanups.
8314 2004-06-18 Jackson Harper <jackson@ximian.com>
8316 * assembly.c: Trace loading assemblies.
8317 * loader.c: Trace loading native libraries.
8318 * mono-config.c: Trace loading config files.
8320 2004-06-18 Dick Porter <dick@ximian.com>
8322 * locales.c: Tell ICU the lengths of strings, it can cope with
8323 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
8325 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
8327 * image.c: swapped name/filename;
8329 2004-06-18 Martin Baulig <martin@ximian.com>
8331 * mono-debug-debugger.c (write_class): Write the parent class at
8332 the end of the header.
8334 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
8336 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
8338 2004-06-17 Raja R Harinath <rharinath@novell.com>
8340 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
8341 (bundle_obj): New conditional define.
8342 (BUILT_SOURCES): Remove.
8343 ($(bundle_srcs)): Make parallel-make safe.
8344 (libmonoruntime_la_LIBADD): Make unconditional.
8345 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
8346 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
8348 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
8350 * culture-info-tables.h: It was inconsistent with the latest
8353 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
8355 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
8358 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
8361 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
8363 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
8364 cleaned up public header threads.h.
8366 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
8368 * Makefile.am, *.c, *.h: more API cleanups.
8370 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
8372 * Makefile.am: removed monosn from compilation.
8373 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
8374 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
8375 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
8376 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
8377 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
8378 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
8380 2004-06-15 Jackson Harper <jackson@ximian.com>
8382 * assembly.c: Make locales lower case when searching the GAC for
8383 assemblies. gacutil will always make locales lowercase when
8384 installing so this effectively makes them case insensitive.
8386 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
8388 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
8389 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
8390 parameter which allows to choose whether the wait can be interrupted or
8391 not. Also added the method mono_monitor_enter(), which locks the monitor
8392 using an infinite wait and without allowing interruption.
8393 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
8395 * object.h: Added new fields in MonoThread. suspend_event holds the event
8396 used to susped/resume the thread. synch_lock is the lock object to use for
8397 modifying the thread state.
8398 * threads.c: Use the new synch_lock object for locking, instead of "this",
8399 which can generate deadlocks.
8400 Moved thread state change in Thread.Sleep and Thread.Join from managed
8401 to unmanaged code. This avoids a deadlock when the thread was suspended
8402 just after acquiring the thread lock.
8403 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
8404 Implemented Thread.Suspend using an event instead of ThreadSuspend,
8405 which is not fully implemented in the io-layer.
8406 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
8408 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
8410 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
8411 threads-types.h: more API cleanups.
8413 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
8415 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
8416 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
8417 threadpool.c, threads.c: first pass at the exported API cleanup.
8419 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
8421 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
8423 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8425 * icall.c: added internalGetHome.
8427 2004-06-14 Dick Porter <dick@ximian.com>
8429 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
8430 possible to return successfully when '.' or '..' were the only
8431 entries in a directory, but were skipped. The MonoIOStat was not
8432 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
8435 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
8437 * reflection.c: make binaries run on .Net 1.1 by default.
8439 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
8441 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
8443 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
8445 * marshal.c: keep track of struct size with explicit layout
8448 2004-06-12 Martin Baulig <martin@ximian.com>
8450 * mono-debug-debugger.c: Comment out a debugging g_message().
8452 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
8454 * reflection.c, reflection.h: do not free custom attrs that are cached.
8455 * icall.c: use braces to make code clearer.
8457 2004-06-11 Martin Baulig <martin@ximian.com>
8459 * class.h (MonoInflatedField): New type.
8460 (MonoClassField): Replaced `MonoType *generic_type' with
8461 `MonoInflatedField *generic_info'.
8464 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
8466 2004-06-11 Martin Baulig <martin@ximian.com>
8468 * reflection.c (mono_image_create_method_token): Correctly encode
8471 2004-06-11 Martin Baulig <martin@ximian.com>
8473 * metadata.c (mono_metadata_parse_method_signature): When parsing
8474 a MethodDef which has VarArgs, also set sentinelpos if we don't
8475 have any parameters.
8477 2004-06-11 Martin Baulig <martin@ximian.com>
8479 * verify.c (mono_method_verify): In CEE_CALL, use
8480 mono_method_get_signature() to get the method's signature, unless
8481 we're a PInvoke method.
8483 2004-06-10 Jackson Harper <jackson@ximian.com>
8485 * assembly.c: Use <path>/lib/mono/gac for the extra paths
8486 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
8487 logical name as the supplied path is just a prefix to the gac not
8488 the direct path to it.
8490 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
8492 * reflection.c: make the token for a created method match
8493 the token of the MethodBuilder it was created from
8494 (IKVM requires this behaviour now).
8496 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
8498 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
8499 reflection.c, socket-io.c: leak fixes.
8501 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
8503 * icall.c: handle sentinel pos in vararg methods in position different
8506 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8508 * culture-info-tables.h: freshly generated.
8510 2004-06-09 Martin Baulig <martin@ximian.com>
8512 * loader.c (mono_get_method_constrained): Call `mono_class_init
8513 (constrained_class)'.
8515 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
8517 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
8518 any methods. Fixes #59629.
8520 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
8522 * culture-info-tables.h: reflecting locale-builder updates.
8524 2004-06-08 Dick Porter <dick@ximian.com>
8527 * locales.c: Fixed compile warnings, including a real bug in
8528 CompareInfo_internal_compare.
8530 2004-06-08 Dick Porter <dick@ximian.com>
8533 (ves_icall_System_Globalization_CompareInfo_internal_index):
8534 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
8535 Double-check the resuls of usearches, because ICU currently
8536 ignores most of the collator settings here. Fixes bug 59720.
8538 2004-06-08 Dick Porter <dick@ximian.com>
8541 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
8542 Fix memory leak and segfault-causing typo. No idea how this one
8543 lasted so long without being noticed.
8545 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
8547 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
8548 any methods. Fixes #59629.
8550 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8553 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
8554 own the critical section before). Removed dead code (that's done
8555 in the preload hook).
8557 (mono_assembly_load_with_partial_name): call the preload hook.
8559 2004-06-08 Martin Baulig <martin@ximian.com>
8561 * metadata.c (mono_metadata_signature_alloc): Default
8562 `sentinelpos' to -1.
8564 * reflection.c (mono_image_get_array_token): Likewise.
8566 2004-06-08 Martin Baulig <martin@ximian.com>
8568 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
8570 * metadata.c (mono_metadata_parse_method_signature): When parsing
8571 a MethodDef which has VarArgs, set sentinelpos.
8573 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
8574 `gint16' since we're using -1 for non-varargs methods.
8577 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
8578 (method_encode_signature): Added varargs support.
8579 (method_builder_encode_signature): Likewise.
8580 (mono_image_get_varargs_method_token): New static method.
8581 (mono_image_create_method_token): New public method; this is
8582 called via an icall instead of mono_image_create_token() when
8583 calling a varargs method.
8585 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
8587 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
8589 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
8591 * culture-info-tables.h : Reflecting the latest locale-builder that
8592 fixed empty array representation ({} to {0}).
8594 2004-06-07 Jackson Harper <jackson@ximian.com>
8596 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
8597 looking up extra gac paths. This allows MONO_GAC_PATH to act
8598 exactly like a prefix.
8600 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
8602 * reflection.c (mono_reflection_type_from_name): Make a copy of the
8603 type name before modifying it. Fixes #59405.
8605 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
8607 * culture-info.h: added fields for "all datetime patterns".
8608 * locales.c: ( ves_icall_System_Globalization_CultureInfo
8609 _construct_datetime_format ()): fill xxx_patterns fields.
8610 * object.h: added fields for "all datetime patterns" to
8611 MonoDateTimeFormatInfo.
8612 * culture-info-tables.h: reflecting locale-builder updates.
8614 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
8616 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
8617 the event has no add and remove methods. Fixes #59629.
8619 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
8621 * object.c: Fixed possible integer overflow when allocating large
8624 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
8626 * culture-info-tables.h: reflecting locale-builder updates.
8628 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
8630 * culture-info-tables.h: reflecting locale-builder updates.
8632 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
8634 * culture-info-tables.h: reflecting locale-builder updates.
8636 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
8638 * threads.c: Made Thread.Sleep abortable.
8640 2004-06-02 Martin Baulig <martin@ximian.com>
8642 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
8644 * debug-mono-symfile.h: Bumped symbol file version number to 37.
8646 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
8648 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
8650 2004-05-30 Jackson Harper <jackson@ximian.com>
8652 * reflection.c: Do not hardcode assembly versions or public key
8653 tokens anymore. All of this except the corlib section was dead
8656 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
8658 * object.c (mono_runtime_invoke_array): Automatically create boxed
8659 objects for byref valuetypes if needed. Fixes #59300.
8661 * object.c (mono_method_return_message_restore): Handle
8662 MONO_TYPE_OBJECT as well.
8664 2004-05-28 Jackson Harper <jackson@ximian.com>
8666 * reflection.c: The modified type encoding was causing build
8667 problems. Reverted for now.
8669 2004-05-28 Jackson Harper <jackson@ximian.com>
8671 * reflection.c/h: Take an assembly ref so that we dont create
8672 fully qualified names when encoding types in the same assembly as
8673 the custom attribute being emitted.
8674 * appdomain.c: Increment version number.
8676 2004-05-26 Duncan Mak <duncan@ximian.com>
8679 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
8680 Set the full version number (major, minor, build, revision).
8682 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
8684 * marshal.c (emit_struct_conv): increment src/dst after blit
8685 (mono_marshal_get_managed_wrapper,
8686 mono_marshal_get_native_wrapper): make sure we have marshalling
8687 info before marshalling params (info computation affects
8690 * class.c (class_compute_field_layout): correctly deal with
8692 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
8693 value types (as per what windows dows by default)
8694 (mono_class_setup_mono_type): System.ValueType is blittable
8695 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
8698 * marshal.c (mono_marshal_load_type_info): flag types as
8699 non-blittable if the native layout doesn't match the managed
8702 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8704 * appdomain.c: don't add stuff in the private search path that is
8705 above the application base. If application base is not set, there's
8706 no private search path.
8708 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
8710 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
8711 byref struct arguments in native->managed marshalling.
8713 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
8715 * marshal.c (mono_marshal_get_runtime_invoke): correctly
8716 cache methods using signature (special case for methods
8717 that are value type or string class)
8719 * image.c (mono_image_close): clean up allocated GSList's
8720 in runtime_invoke_cache.
8722 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8724 * mono-config.c: set the correct path for mono_cfg_dir on windows when
8725 there's no MONO_CFG_DIR environment variable defined.
8727 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8729 * threads.c: windows version must be >= 0x0500 to include OpenThread.
8731 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
8733 * threadpool.c: Really wait for 500ms after the async call, even if the wait
8735 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
8736 before waiting for it, and call CloseHandle after the wait to unref it.
8737 This will make sure that handles are not disposed too early.
8739 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8744 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
8747 * object.c: se the application_base only for the domain that runs
8748 Main. Fixes bug #59216,
8750 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8753 * object.c: only the domain in which Main is run have
8754 SetupInformation.ConfigurationFile set, so moved a few lines from
8755 appdomain.c to object.c.
8757 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8759 * appdomain.c: we tried to load [name].(dll|exe), but according
8760 to bug #57710, we must also try [culture]/[name].(dll|exe) and
8761 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
8762 There's a test case attached to bug #58922.
8764 2004-05-27 Dick Porter <dick@ximian.com>
8767 * file-io.c: Implemented icalls for locking and unlocking regions
8769 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
8770 FALSE on error (fixes both compiler warning and real bug.)
8772 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
8774 * culture-info-tables.h: reflecting locale-builder updates.
8776 (Added missing ChangeLog entry for 05/26)
8778 2004-05-27 Jackson Harper <jackson@ximian.com>
8780 * locales.c: Fix some cut and paste errors.
8782 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8784 * mono-config.c: set the correct path for config. directory on windows.
8786 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
8788 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
8791 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
8793 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
8794 from pinvoke functions.
8796 * marshal.c (mono_ftnptr_to_delegate): Implement this.
8798 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
8800 * culture-info-tables.h: reflecting locale-builder updates.
8802 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
8804 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
8807 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
8809 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
8810 * icall.c: Modified icalls for RNG.
8811 * rand.c|h: Changed RNG interface to allow thread-safe usage under
8812 Windows (CryptoAPI).
8814 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
8816 * locales.c: Fix build.
8818 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
8820 * culture-info-tables.h: reflecting locale-builder updates.
8822 2004-05-25 Jackson Harper <jackson@ximian.com>
8824 * locales.c: When creating the current culture use the $LANGs
8825 specific culture. So DateTimeFormat and NumberFormat entries are created.
8827 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
8829 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
8830 a char array as parameter.
8832 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
8834 * image.c: In mono_image_open(), always use an absolute path name to
8835 look for already loaded images.
8837 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
8839 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
8840 missing in the windows build (like older cygwin include files).
8842 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
8844 * icall.c: Fixed check for possible integer overflow in Buffer_
8845 BlockCopy icall. Replaced comments style // by /* */.
8847 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
8849 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
8851 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
8852 check after MONO_VTADDR. Fixes pinvoke2.exe.
8854 * marshal.h marshal.c metadata.h: Add beginnings of support for
8855 ftnptr -> delegate marshalling.
8857 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
8859 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
8860 * threads.c: Fix warnings.
8862 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
8864 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
8865 * icall.c: Registered icalls for Suspend and Resume.
8866 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
8868 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
8869 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
8870 * process.c: Use WaitForSingleObjectEx.
8871 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
8873 * threads.c, threads.h: Make use of new Ex wait methods. Improved
8874 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
8875 for Suspend and Resume. Added new mono_thread_stop, used for stoping
8876 background threads. Added basic support for Abort in Windows.
8877 Start new threads using a managed delegate invoke wrapper. This wrapper
8878 has an interruption checkpoint that is needed since an interruption
8879 can be requested before the thread leaves the unmanaged code that starts
8881 * marshal.c: Added interruption checkpoint after every native call, and
8882 also before managed calls for wrappers called from unmanaged code to
8883 go into managed code.
8884 * object.h: Added new field in MonoThread to keep track of interruption
8887 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
8889 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
8892 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8899 * rand.c: getenv -> g_getenv (windows!)
8901 * process.c: complete_path is also used on non-windows platforms.
8903 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8905 * icall.c: new signature for Process_Start.
8907 * process.[ch]: new signature for Process_Start. If we're on windows
8908 and UseShellExecute is false, we have to search for the program by
8909 ourselves if we don't get a full path.
8911 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
8913 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
8914 marshalling and call CleanUpNativeData if needed. Fixes #58646.
8916 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8918 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
8921 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8923 * process.c: use double quotes to quote program name and arguments on
8924 windows. Fixes bug #58575.
8926 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8928 * file-io.c: don't return "." and ".." when using windows Find*File.
8930 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
8932 * marshal.c: Don't pass wrappers to message init because method
8933 addressed used to lookup metadata. part of remoting[2|3] fix.
8935 2004-05-15 Jackson Harper <jackson@ximian.com>
8937 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
8938 path is essentially the same as MONO_PATH except that it points to
8939 GACs instead of lib directories.
8940 * loader.h: The user gac is gone so we dont need function to
8942 * mono-config.c: user gac option is now gone.
8944 2004-05-15 Jackson Harper <jackson@ximian.com>
8946 * culture-info.h: Make defines more consistent, add calendar data
8947 to the culture info table.
8948 * culture-info-tables.h: Add basic calendar data. Basically
8949 everyone gets default gregorian until all the data is
8951 * locales.c: Use the new consistent defines. Set calendar data for
8952 culture info objects.
8953 * object.h: add a field for calendar data to CultureInfo
8955 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
8957 * image.c: image->runtime_invoke_cache is keyed on signatures now.
8958 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
8960 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
8961 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
8962 an extra param that is the pointer of the method to invoke. The IL for
8963 the invoke method is no longer specific to the method, but to the
8964 signature of the method. Thus, we can share the same code for multiple
8965 methods. This reduces the number of methods that have to be compiled.
8967 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
8969 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
8971 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
8973 * icall.c: Optimize Buffer.BlockCopy.
8975 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8977 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
8978 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
8979 quote). Changed them to "MMMM yyyy".
8981 2004-05-12 Miguel de Icaza <miguel@ximian.com>
8984 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
8986 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
8988 * reflection.h: Updated after changes to managed structures.
8990 * appdomain.c: Bump corlib version.
8992 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8994 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
8997 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8999 * Makefile.am: link to ../os/libmonoos.la on windows.
9002 -If MONO_DEBUG, warn about non-existing directories in
9004 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
9005 compile time variable.
9006 -Removed init_default_path and call mono_set_rootdir from
9007 libmonoos.a instead (windows only).
9009 * assembly.h: declare mono_assembly_getrootdir().
9012 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
9014 * loader.c: s/getenv/g_getenv/
9016 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
9018 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
9020 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
9022 * metadata.h: Add new marshalling conversions.
9024 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
9027 * reflection.c (mono_reflection_get_type): Lookup the type in all
9028 modules of a multi-module assembly. Fixes #58291.
9030 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
9032 * threads.c: Before aborting a background, set the StopRequested
9033 state. This avoids throwing the Abort exception.
9034 In mono_thread_manage, don't continue with the shutdown until all
9035 aborted threads have actually stopped.
9037 2004-05-10 Jackson Harper <jackson@ximian.com>
9039 * locales.c: Remove the modifier from culture names.
9041 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9043 * Makefile.am: monosn is not installed any more. It has been deprecated
9046 2004-05-07 Jackson Harper <jackson@ximian.com>
9049 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
9050 Fix array construction, add bailout if the length is 0.
9052 2004-05-07 Dick Porter <dick@ximian.com>
9054 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
9055 machine doesn't have a DNS entry. Patch by Urs Muff
9056 (umuff@quark.com), fixes bug 57928.
9058 2004-05-06 Jackson Harper <jackson@ximian.com>
9060 * reflection.c: Handle null PublicTokens properly. alloc mem for
9061 assembly names culture so we dont crash when freeing it.
9063 2004-05-06 Jackson Harper <jackson@ximian.com>
9065 * assembly.c: Check the usergac when loading with partial names.
9067 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
9069 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
9070 does nothing for now (not required for Linux/Windows) but the class
9071 library can call it (and a newer or modified runtime could need it).
9072 * icall.c: Registred icall.
9074 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9076 * loader.c: prints a message on module loading error we set MONO_DEBUG
9077 environment variable.
9079 2004-05-05 Jackson Harper <jackson@ximian.com>
9081 * appdomain.c: Handle PublicKeyToken=null properly.
9083 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
9085 * environment.c|h: Added icall ves_icall_System_Environment_
9086 GetOSVersionString to get the current OS version as a string.
9087 * icall.c: Registred icall.
9089 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
9091 * object.c: in mono_object_get_virtual_method(), take into account that
9092 non-virtual methods don't have a slot in the vtable. Check needed when
9093 the object is a proxy.
9095 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
9097 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
9098 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
9100 * object.c (mono_class_compute_gc_descriptor): Fix warning.
9102 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
9103 passed when a valuetype is expected.
9105 * object.c (mono_unhandled_exception): Only set the exit code if the
9106 exception happens in the main thread. Fixes thread5.exe.
9108 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
9109 invalid names. Fixes #58047.
9111 2004-05-03 Jackson Harper <jackson@ximian.com>
9113 * assembly.c: This line was committed accidently and is unneeded.
9115 2004-05-03 Jackson Harper <jackson@ximian.com>
9117 * icall.c: Add new icall for Assembly::LoadWithPartialName
9118 * assembly.c/.h: new function that probes the GAC to load partial
9119 assembly names by Paolo Molaro.
9121 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9123 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
9124 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
9125 (type_get_fully_qualified_name): Added PublicKeyToken when building a
9128 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9130 * appdomain.c: fixed check for 'neutral' culture and removed warning.
9131 * reflection.c: fix bug when parsing a full type name and Version is not
9132 the last thing in the string.
9134 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
9136 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
9137 crashes when it is freed.
9139 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9141 * assembly.c: print the compat warning to stderr.
9143 2004-05-01 Miguel de Icaza <miguel@ximian.com>
9145 * assembly.c (mono_assembly_load_references): Add a compatibility
9146 hack to run old applications that might be still referencing the
9147 3300-based assemblies, only do this for System.xxx.
9149 2004-05-01 Jackson Harper <jackson@ximian.com>
9151 * appdomain.c: If the culture is neutral we set it to "".
9153 2004-04-29 Jackson Harper <jackson@ximian.com>
9155 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
9157 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
9159 * string-icalls.c: added low overhead function for copying chars
9160 * icall.c: added needed icall for the above function
9162 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9164 * icall.c: fix return value of get_global_assembly_cache. Implemented
9165 Environment.GetLogicalDrives.
9167 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
9169 * rand.c: try and talk to egd or prngd
9170 for random bytes if opening devices fail.
9172 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
9174 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
9175 alignment for the type using the native alignment of its members
9176 instead of using klass->min_align.
9178 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
9180 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9183 * socket-io.c: added check for sys/aio.h.
9185 2004-04-28 Dick Porter <dick@ximian.com>
9187 * threads.c: Don't abort a thread thats already aborting, when
9188 terminating everything.
9190 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9192 * icall.c: added 2 new async calls for Socket.
9194 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
9197 * threadpool.c: removed unused variable.
9199 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
9201 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
9203 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
9205 * locales.c: put back string_invariant_tolower () and
9206 string_invariant_toupper ().
9208 2004-04-26 David Waite <mass@akuma.org>
9213 * unicode.h: remove comma from end of enumeration declarations
9215 2004-04-26 David Waite <mass@akuma.org>
9217 * debug-mono-symfile.h:
9220 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
9223 2004-04-26 Jackson Harper <jackson@ximian.com>
9225 * appdomain.c: Increment version number.
9227 2004-04-26 Jackson Harper <jackson@ximian.com>
9229 * appdomain.c: Set assembly references public token value when
9230 PublicKeyToken is specified, not the hash_value. Free public token
9231 values when free assembly name data. Previously the public key
9232 token was hex decoded, however we are using hex encoded public key
9233 tokens, so this is not neccasary.
9234 * assembly.c: Lookup assemblies in the gac if their public token
9235 value is set. Add function to allow enabling user gac
9236 lookups. Specify whether or not the assembly was loaded from the
9237 GAC. Compare full assembly names when checking the cache for
9238 assemblies (Temporarily disabled see comment in code). Remove
9239 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
9240 specifies trace-loader they get extra info to stdout on the
9241 loading of assemblies.
9242 * image.h: Add a field for an assembly references public token
9243 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
9244 whether an assembly has been loaded from the GAC.
9245 * image.c: Remove a corlib -> mscorlib name mapping.
9246 * loader.h: Add function to enable/disable the user gac.
9247 * mono-config.c: Check if the usergac is enabled in the config
9249 * icall.c: New icall to determine whether or not an assembly has
9250 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
9251 * tabldefs.h: Add constant for assemblyref flag that specifies a
9252 full public key is used instead of a public token.
9253 * reflection.c: Remove mscorlib -> corlib mappings. Set
9254 PublicTokenValue instead of hash value. This value is a hex
9255 string so it does not need to be expanded.
9257 2004-04-26 Martin Baulig <martin@ximian.com>
9259 * mono-debug-debugger.c (mono_debugger_initialize): Set
9260 `mono_debugger_initialized' before calling mono_debug_lock().
9262 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
9264 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
9265 InternalToUpper/InternalToLower.
9266 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
9267 removed invariant culture shortcut. This is now done in managed code.
9268 * locales.c: (string_invariant_toupper/tolower) removed.
9270 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9272 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
9273 Added Poll internal call.
9275 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
9276 call for Poll. Select was too heavy for polling a single socket.
9278 * threadpool.[ch]: added mono_threadpool_cleanup.
9279 * threads.c: use it. Don't use Thread_Abort on windows.
9281 2004-04-23 Martin Baulig <martin@ximian.com>
9283 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
9285 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
9287 * icall.c: Registred new icalls for key pair protection and added an
9288 icall for Environment.GetFolderPath on Windows.
9289 * security.c|h: Added new icalls for key pair protection.
9291 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9293 * socket-io.c: don't display the non-supported family warning for known
9294 families. Now this is not displayed on windows when checking support
9297 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9299 * class.c: don't display the layout warning for static fields.
9301 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
9303 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
9304 * locales.c, locales.h: Added new icalls for culture-specific
9305 Char.ToLower and Char.ToUpper.
9307 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9309 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
9312 2004-04-20 Martin Baulig <martin@ximian.com>
9314 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
9315 of the type name before passing it to mono_reflection_type_from_name().
9317 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
9319 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
9320 encodings here. Fixes #56965.
9322 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
9324 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9325 fix test on strstr result not that I can see anything that
9326 relies on the result.
9328 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
9330 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
9333 * marshal.c (mono_marshal_get_string_encoding): New helper function.
9335 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
9336 function to determine which marshalling to use for strings. Fixes
9339 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
9341 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
9343 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
9345 * icall.c: #include mono-config.h
9347 2004-04-15 Jackson Harper <jackson@ximian.com>
9349 * culture-info-tables.h: Fix date formats for en-US culture.
9351 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
9353 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
9354 ThreadPool.SetMinThreads.
9355 * threadpool.c: Implemented ThreadPool.GetMinThreads and
9356 ThreadPool.SetMinThreads.
9358 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
9360 * mono-config.c: also load the .config file in the directory
9361 where the assembly was found.
9363 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
9365 * assembly.c: load per-assembly config files.
9366 * icall.c: decrapified code to get the config dir and moved to
9368 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
9369 per-assembly config files. When doing a dll map lookup give precedence
9370 to the per-assembly data.
9372 2004-04-14 Martin Baulig <martin@ximian.com>
9374 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
9375 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
9376 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
9378 * mono-debugger-debugger.c: While the debugger is locked, remember
9379 whether the symbol tables have changes and send one single
9380 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
9382 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
9384 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
9386 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
9389 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
9390 account when marshalling string arrays. Fixes #56965.
9392 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
9394 * icall.c: Add new icalls mapping for security.
9395 * security.c|h: Add internal calls for WindowsIdentity,
9396 WindowsImpersonationContext and WindowsPrincipal.
9398 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
9400 * class.c: Added comment to ensure the System.MonoDummy class
9401 is removed when no longer necessary
9403 2004-04-13 Miguel de Icaza <miguel@ximian.com>
9405 * appdomain.c: Pass arguments to the bootstraping exceptions to
9406 minimize JITed methods at boot
9408 * metadata.c (mono_exception_from_name_two_strings): Allow for the
9409 second string to be null.
9411 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
9412 Change the protocol to minimize the JIT methods at startup. Now
9413 it Returns the internal codepage, if the value of "int_code_page"
9414 is 1 at entry, and we can not compute a suitable code page
9415 number, returns the code page as a string.
9417 2004-04-13 Jackson Harper <jackson@ximian.com>
9419 * culture-info-tables.h: Fix number of decimal digits for all
9422 2004-04-13 Jackson Harper <jackson@ximian.com>
9424 * icall.c: Clairfy out of sync error message. It is not always
9425 your corlib that is out of sync.
9427 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
9429 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
9430 properties when only the set accessor is overriden. Fixes #55874.
9432 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
9434 * assembly.c (mono_assembly_load_references): Make this thread safe.
9437 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
9439 * monosn.c: Add missing initialization calls.
9441 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
9444 ves_icall_System_Globalization_CultureInfo_construct_number_format
9445 Fix g_assert so it compiles on fussier compilers re int/ptr
9448 2004-04-08 Dick Porter <dick@ximian.com>
9451 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
9452 53992. Also rearrange the code so that the internal calls return
9453 an error value and exceptions are thrown from managed code.
9455 * icall.c: Add type info to the socket icalls.
9457 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9459 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
9462 2004-04-07 Martin Baulig <martin@ximian.com>
9464 * class.c (mono_class_from_generic_parameter): Don't default
9465 `klass->parent' to `mono_defaults.object_type'.
9467 2004-04-07 Martin Baulig <martin@ximian.com>
9469 * reflection.c (mono_reflection_initialize_generic_parameter): Set
9470 `param->pklass->reflection_info'.
9472 2004-04-07 Jackson Harper <jackson@ximian.com>
9474 * culture-info-tables.h: Fix date separator symbol.
9476 2004-04-07 Martin Baulig <martin@ximian.com>
9478 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
9479 from System.Type to System.MonoType.
9481 2004-04-07 Martin Baulig <martin@ximian.com>
9484 (MonoReflectionGenericParam): Added `has_reference_type' and
9485 `has_value_type' fields.
9487 * reflection.c (mono_image_get_generic_param_info): Encode the
9488 correct flags if we have the `class' or `struct' constraint.
9490 2004-04-07 Martin Baulig <martin@ximian.com>
9493 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
9495 2004-04-07 Jackson Harper <jackson@ximian.com>
9497 * appdomain.c: Revert extra patches, just wanted to bump the
9500 2004-04-07 Jackson Harper <jackson@ximian.com>
9502 * Makefile.am: Add culture-info private headers.
9503 * icall.c: Add new icalls for contructing locales.
9504 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
9505 * locales.h: Declare new culture info construction methods.
9506 * object.h: Add new fields used to avoid the CultureMap to
9508 * culture-info.h: Definition of structs used in the culture info
9510 * culture-info-tables.h: Autogenerated tables that contain culture
9511 info data. This file was generated with the locale-builder tool.
9512 * appdomain.c: Incement corlib version number.
9514 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
9516 * appdomain.c: (mono_runtime_init) move mono_thread_init
9517 to before mono_object_new calls so critical sections
9518 are initialized before use.
9520 2004-04-07 Martin Baulig <martin@ximian.com>
9523 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
9524 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
9525 (ves_icall_MonoGenericParam_initialize): Removed.
9526 (monogenericparam_icalls): Removed.
9527 (generictypeparambuilder_icalls): Added new table for
9528 System.Reflection.Emit.GenericTypeParameterBuilder.
9531 (mono_reflection_define_generic_parameter): Removed.
9532 (mono_reflection_initialize_generic_parameter): This is now called
9533 from GenericTypeParameterBuilder's .ctor.
9535 2004-04-06 Martin Baulig <martin@ximian.com>
9537 * class.c (mono_class_init): Don't inflate nested classes in a
9539 (mono_type_get_name_recurse): Include the generic arguments for
9540 generic instances and generic type declarations.
9541 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
9542 (_mono_class_get_instantiation_name): Removed.
9543 (mono_class_create_generic): Always use `gklass->name' as our name.
9545 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
9547 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
9548 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
9549 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
9550 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
9551 closed generic methods here.
9554 (mono_reflection_generic_inst_get_nested_types): Removed.
9555 (inflate_mono_method): Copy the generic parameters from the
9556 MonoMethodHeader into out MonoGenericMethod.
9558 2004-04-06 Martin Baulig <martin@ximian.com>
9561 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
9563 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
9565 * reflection.c (build_compressed_metadata): If we have any entries
9566 in the GenericParam, MethodSpec or GenericParamConstraint tables,
9567 set the header version to 1.1.
9569 2004-04-06 Martin Baulig <martin@ximian.com>
9571 * class.c (mono_class_init): If we're a generic instance,
9572 initialize our nested classes, too.
9573 (_mono_class_get_instantiation_name): Deal with the new `!%d'
9576 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9578 * process.c: quote the argument passed to the shell on windows.
9580 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
9582 * threads.c (mono_alloc_special_static_data): Allow this to be
9583 called during startup.
9585 2004-04-02 Martin Baulig <martin@ximian.com>
9588 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
9590 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
9592 * icall.c: Fix build.
9594 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
9596 * Makefile.am: Added security.c|h.
9597 * icall.c: Added icall for get_UserName;
9598 * security.c: New file for security related icalls. Added function
9599 get_UserName for System.Environment (fix #56144).
9600 * security.h: New. Header file for security.c
9602 2004-04-02 Dick Porter <dick@ximian.com>
9604 * icall.c: Deleted the icalls that were obsoleted some time ago
9605 by the ICU string code, and which were mixed into the icall
9606 rearranging. Fixes bug 55969.
9609 * string-icalls.c: Deleted the code that those icalls reference.
9611 2004-04-01 Martin Baulig <martin@ximian.com>
9613 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
9615 * class.c (mono_class_from_generic_parameter): Don't set
9616 TYPE_ATTRIBUTE_INTERFACE.
9617 (my_mono_class_from_generic_parameter): Likewise.
9619 2004-04-01 Martin Baulig <martin@ximian.com>
9621 * loader.c (find_method): Added an optional `MonoClass *ic'
9622 argument to search in a specific interface.
9623 (mono_get_method_constrained): New public function.
9625 2004-04-01 Martin Baulig <martin@ximian.com>
9627 * reflection.c (mono_image_get_generic_field_token): Use the
9628 `handleref' cache here.
9630 2004-04-01 Martin Baulig <martin@ximian.com>
9632 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
9634 * reflection.c (create_generic_typespec): Use the `typespec' hash
9635 here, not the `typeref' one.
9637 2004-04-01 Martin Baulig <martin@ximian.com>
9639 * class.c (mono_class_inflate_generic_type): Moved the
9640 functionality into a new static inflate_generic_type() which
9641 returns NULL if it didn't do anything. Only increment the
9642 `mono_stats.inflated_type_count' if we actually inflated
9644 (mono_class_get_full): Check the classes type to see whether we
9645 need to inflate it; also inflate MONO_TYPE_(M)VAR.
9647 2004-04-01 Jackson Harper <jackson@ximian.com>
9649 * reflection.c: Set culture for assembly references.
9651 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
9653 * reflection.[ch], icall.[ch], Fix support for pinning variables.
9655 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9658 (do_mono_assembly_open): the critical section also covers
9659 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
9661 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9664 (mono_manage_threads): abort the background threads when finishing.
9667 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9669 * gc.c: only close the done_event handle if there was no timeout.
9672 2004-03-30 Martin Baulig <martin@ximian.com>
9674 * icall.c (icall_entries): It's called "System.Activator", not
9675 "System.Activation".
9677 2004-03-30 Martin Baulig <martin@ximian.com>
9679 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
9680 (mono_class_create_from_typespec): Likewise.
9682 2004-03-30 Martin Baulig <martin@ximian.com>
9684 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
9685 `has_ctor_constraint' and `initialized'.
9687 2004-03-30 Martin Baulig <martin@ximian.com>
9689 * reflection.c (encode_new_constraint): New static function to add
9690 the constructor constraint attribute to a type parameter.
9691 (encode_constraints): Call encode_new_constraint() if necessary.
9694 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
9696 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
9698 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
9700 * reflection.c, icall.c: add support for pinning variables.
9702 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
9704 * marshal.c (mono_marshal_get_managed_wrapper):
9705 init bool local with zero rather than null.
9707 2004-03-29 Martin Baulig <martin@ximian.com>
9709 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
9710 the "official" behavior here.
9711 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
9713 2004-03-29 Martin Baulig <martin@ximian.com>
9715 * icall.c: Reflect latest API changes.
9717 2004-03-29 Martin Baulig <martin@ximian.com>
9719 * loader.c (mono_get_method_from_token): Also call
9720 mono_metadata_load_generic_params () for abstract and interface
9721 methods; replace the type arguments in the method signature with
9722 the ones which are loaded from the metadata.
9724 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
9726 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
9727 of the lock is not the current thread. MS.NET don't do it, in spite of
9728 what the documentation says. See bug #56157.
9730 2004-03-28 Martin Baulig <martin@ximian.com>
9732 * class.c (mono_class_init): Don't call init_properties() and
9733 init_events() for generic instances; set `prop->parent' when
9734 inflating properties.
9736 * reflection.c (mono_generic_inst_get_object): Call
9737 `mono_class_init (ginst->klass)'.
9738 (mono_type_get_object): Only create a MonoGenericInst if your
9739 generic type is a TypeBuilder.
9740 (do_mono_reflection_bind_generic_parameters): Only set
9741 `ginst->is_dynamic' if our generic type is a TypeBuilder.
9743 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
9745 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
9748 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9750 * icall.c: added Kill_internal icall.
9751 * process.[ch]: added Kill_internal icall.
9753 2004-03-25 Martin Baulig <martin@ximian.com>
9755 * class.h (MonoStats): Added `generic_instance_count',
9756 `inflated_method_count', `inflated_type_count' and
9757 `generics_metadata_size'.
9759 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9761 * reflection.c: no warnings now.
9763 2004-03-25 Martin Baulig <martin@ximian.com>
9765 * class.c (mono_class_get_full): New public function; does a
9766 mono_class_get(), but also takes a `MonoGenericContext *'.
9768 * loader.c (mono_field_from_memberref): Renamed to
9769 `field_from_memberref', made static and added `MonoGenericContext *'
9771 (mono_field_from_token): Added `MonoGenericInst *' argument.
9772 (method_from_memberef): Likewise.
9773 (mono_get_method_from_token): Likewise.
9774 (mono_get_method_full): New public function; does a
9775 mono_get_method(), but also takes a `MonoGenericContext *'.
9777 * verify.c (mono_method_verify): Get the method's generic context
9778 and pass it to mono_field_from_token(), mono_get_method_full() and
9779 mono_class_get_full().
9781 2004-03-25 Martin Baulig <martin@ximian.com>
9783 * class.c (mono_class_inflate_generic_type): Take a
9784 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
9785 `MonoGenericMethod *'.
9787 2004-03-25 Martin Baulig <martin@ximian.com>
9789 * loader.h (MonoMethodInflated): Store the MonoGenericContext
9790 instead of the MonoGenericMethod here.
9792 2004-03-25 Martin Baulig <martin@ximian.com>
9794 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
9795 each time we create a new MonoGenericInst, we also create a new
9796 context which points back to us.
9798 * class.c (inflate_method): Use `ginst->context' instead of
9799 creating a new context.
9801 * loader.c (method_from_memberref): Use
9802 `klass->generic_inst->context' instead of creating a new context.
9804 2004-03-25 Martin Baulig <martin@ximian.com>
9806 * class.h (MonoGenericContext): New struct.
9807 (MonoGenericMethod): Removed `generic_inst'.
9809 * class.c (mono_class_inflate_generic_method): Take a
9810 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
9812 2004-03-25 Martin Baulig <martin@ximian.com>
9814 * loader.h (MonoMethodInflated): New typedef.
9816 * metadata.h (MonoMethodSignature): Removed `gen_method', make
9817 `generic_param_count' consume just 30 bits, added `is_inflated'
9818 and `has_type_parameters' flags (one bit each).
9820 * class.c (mono_class_inflate_generic_method): Create a
9821 MonoMethodInflated instead of a MonoMethodNormal and set
9822 `is_inflated' in the method signature.
9824 * class.h (MonoGenericMethod): Removed `generic_method'.
9826 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
9828 * image.c: Make sure the name of a MonoImage is always an absolute path.
9829 This fixes bug #54415.
9831 2004-03-24 Martin Baulig <martin@ximian.com>
9833 * class.c (mono_class_setup_vtable): If we're a generic instance,
9834 use our generic type's vtable size.
9836 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
9838 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
9839 MONO_NO_UNLOAD env var as a temporary workaround for unloading
9842 2004-03-23 Martin Baulig <martin@ximian.com>
9844 * class.h (MonoDynamicGenericInst): Added `int count_events' and
9845 `MonoEvent *events'.
9847 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
9848 (typebuilder_icalls): Added "get_event_info"; calls
9849 mono_reflection_event_builder_get_event_info().
9851 * reflection.c (mono_reflection_generic_inst_initialize): Added
9852 `MonoArray *events'.
9853 (mono_reflection_event_builder_get_event_info): New function.
9855 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
9857 * object.h: add mono_type_initialization_init
9859 * object.c (mono_runtime_class_init):
9860 implement class constructor synchronization rules
9861 to cope with threading issues.
9862 add mono_type_initialization_init
9864 * appdomain.c (mono_runtime_init): call
9865 mono_type_initialization_init
9867 * class.h: removing initializing field from MonoVTable
9869 2004-03-23 Martin Baulig <martin@ximian.com>
9871 * class.c (my_mono_class_from_generic_parameter): Use
9872 `param->name' if it's not NULL.
9874 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
9876 * class.c: do not insert non-virtual methods in the vtable.
9877 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
9878 that means the method is non-virtual. This never would have
9881 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
9883 * profiler.c: Added lock for accessing coverage_hash.
9885 2004-03-22 Martin Baulig <martin@ximian.com>
9887 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
9888 `method->method->signature->generic_param_count != 0' to make it
9889 work for interface methods.
9891 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9893 * process.c: quote the string passed to the shell using g_shell_quote.
9895 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9898 (mono_threads_manage): don't remove the finalizer thread and self
9899 from the threads hash table so that mono_thread_manage can be called
9902 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9904 * process.c: quote the arguments when UseShellExecute is true. Fixes
9907 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9909 * threads.c: set mono_thread_detach as a cleanup routine for every
9910 thread. This way it's always executed upon thread termination, either
9911 aborted or finished normally. No more xsp hangs!
9913 2004-03-17 Martin Baulig <martin@ximian.com>
9915 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
9916 `int count_nested' and a `MonoType **nested'.
9918 * reflection.c (mono_reflection_bind_generic_parameters): Moved
9919 most of the functionality into a new static
9920 do_mono_reflection_bind_generic_parameters() and don't take a
9921 `MonoType *nested_in' argument any more. Don't compute nested
9923 (mono_reflection_generic_inst_get_nested_types): New public method
9924 to get nested types.
9926 * class.c (mono_class_create_generic): Set `klass->nested_in' if
9927 we're a nested class.
9929 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
9930 mono_reflection_generic_inst_get_nested_types() to compute the
9933 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
9935 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
9936 descriptive error message under windows.
9938 2004-03-17 Martin Baulig <martin@ximian.com>
9940 * class.c (dup_type): Added `const MonoType *original' argument;
9941 copy the attrs from the original type.
9943 2004-03-17 Martin Baulig <martin@ximian.com>
9945 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
9946 `m->generic_inst_cache' here.
9948 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
9950 * exception.h exception.c: Add stack_overflow_exception.
9952 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9955 (overlapped_callback): call SetEvent *after* invoking the callback.
9956 No need to call CloseHandle.
9958 2004-03-16 Martin Baulig <martin@ximian.com>
9960 * reflection.c (mono_image_get_fieldref_token): Take a
9961 `MonoReflectionField *' instead of a `MonoClassField *' and a
9962 `MonoClass *'; store the `MonoReflectionField *' in the hash.
9964 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9966 * appdomain.c: don't add the culture to the filename we're looking for
9967 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
9969 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9971 * locales.c: don't ignore symbols when doing case insensitive compares.
9972 Thanks Dick! Fixes bug #54046.
9974 * threads.c: surround 'threads' usage with enter/leave in
9977 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
9979 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
9980 implicitly marshalled as [Out]. Fixes #55450.
9982 (mono_marshal_get_runtime_invoke): Zero out the result if there is
9985 2004-03-16 Martin Baulig <martin@ximian.com>
9987 * class.c (mono_class_from_generic_parameter): Use the actual
9990 2004-03-16 Martin Baulig <martin@ximian.com>
9992 * reflection.c (type_get_signature_size): New static function.
9993 Compues the size of the type in a method signature.
9994 (method_get_signature_size): New static function; calls
9995 type_get_signature_size() to compute the actual size of the
9997 (method_encode_signature): Use method_get_signature_size() to get
9998 the signature's size rather than using `nparams * 10'.
10000 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10002 * file-io.h: define here WapiOverlapped on windows. I don't want the
10003 regular OVERLAPPED one.
10006 * threadpool.c: somehow, BindIoCompletionCallback is not found.
10007 Disabling AIO on windows.
10009 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10011 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
10014 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10016 * appdomain.c: upgraded corlib version.
10018 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
10019 and BeginWrite. Allow opening files for asynchrnous operations.
10021 * file-io.h: new struct that maps FileStreamAsyncResult.
10022 * icall.c: added new icalls.
10023 * process.[ch]: support setting child process environment variables
10024 and use the SHELL or COMSPEC when UseShellExecute is true.
10026 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
10027 callback for async. IO is here and also BindHandle.
10029 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
10032 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
10034 * reflection.c (create_custom_attr): Allow len == 0.
10036 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
10037 computation on big-endian machines.
10039 2004-03-13 Martin Baulig <martin@ximian.com>
10041 * class.h (MonoGenericInst): Added `int count_ifaces'.
10043 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
10044 `ginst->count_ifaces' instead `klass->interface_count' since we
10045 may get called before the vtable is created.
10047 * loader.c (mono_method_get_param_names): If we're a generic
10048 instance, return and don't initialize the class.
10050 * reflection.c (mono_reflection_setup_generic_class): Don't call
10051 ensure_runtime_vtable().
10052 (mono_reflection_bind_generic_parameters): Set
10053 `ginst->count_ifaces'.
10055 2004-03-11 Jackson Harper <jackson@ximian.com>
10059 * unicode.h: Remove unused System.Char icalls.
10061 2004-03-11 Miguel de Icaza <miguel@ximian.com>
10063 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
10064 code when we P/Invoke the first library in Windows.Forms, instead
10065 of when we first open the assembly.
10067 * assembly.c: Drop the lookup from here.
10069 2004-03-10 Martin Baulig <martin@ximian.com>
10071 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
10072 class for properties, fields and events. Finally fixes #54945.
10074 2004-03-10 Martin Baulig <martin@ximian.com>
10076 * metadata.c (mono_metadata_class_equal): New static function;
10077 checks whether two generic instances or two generic parameters are
10079 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
10082 2004-03-10 Martin Baulig <martin@ximian.com>
10084 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
10086 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
10087 argument and write it into the `reflection_info' field.
10090 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
10091 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
10093 2004-03-09 Jackson Harper <jackson@ximian.com>
10095 * char-conversions.h: use 8 bits for numeric data its all we need
10096 * icall.c: numeric data is only 8 bits now.
10098 2004-03-09 Martin Baulig <martin@ximian.com>
10100 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
10102 * class.c (init_properties, init_events): Initialize the new
10105 * reflection.c (typebuilder_setup_properties): Likewise.
10106 (typebuilder_setup_events): Likewise.
10108 * reflection.h (MonoEventInfo): Replaced `parent with
10109 `declaring_type' and `reflected_type'.
10111 * icall.c (ves_icall_get_property_info): Distinguish between
10112 declaring and reflected type.
10113 (ves_icall_get_event_info): Likewise.
10115 2004-03-09 Martin Baulig <martin@ximian.com>
10117 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
10118 (ves_icall_Type_GetField): Correctly set field->klass.
10120 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
10122 * loader.h: Fix warning.
10124 2004-03-08 Miguel de Icaza <miguel@ximian.com>
10126 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
10127 library routine if present. Notice that it will still continue
10128 executing even if its missing, for those working on the Gtk#
10129 edition of Windows.Forms.
10131 * assembly.c (do_mono_assembly_open): If loading the
10132 System.Windows.Forms call mono_loader_wini_init.
10134 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
10136 * class.h: Added MonoRemoteClass struct.
10137 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
10138 function for MonoStrings.
10139 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
10140 Added internal call for getting the proxy type.
10141 * marshal.c: Get the type of transparent proxies from its remote_class.
10142 Added methods that generate the IL for type checks and casts:
10143 mono_marshal_get_isinst, mono_marshal_get_castclass,
10144 mono_marshal_get_proxy_cancast.
10145 * marshal.h: Declaration of the previous new methods.
10146 * object.c: Added new moethods for creating and updating MonoRemoteClass
10147 instances: mono_remote_class, mono_upgrade_remote_class,
10148 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
10149 * verify.c: FIx transparent_proxy_fields layout.
10150 * appdomain.c: Bump corlib version.
10152 2004-03-04 Jackson Harper <jackson@ximian.com>
10154 * icall.c: Add icall to access char conversion tables.
10155 * char-conversions.h: Character conversion tables.
10156 * Makefile.am: Add char-conversions.h private header file.
10158 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
10160 * appdomain.c (unload_thread_main): Increase unloading timeout to
10161 10 sec as a temporary workaround for Nant problems.
10163 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
10165 * gc.c: Add checks for GC_enable and GC_disable.
10167 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
10168 (jaak@zd.com.pl). Fix memory corruption in String.Replace
10171 2004-02-27 Martin Baulig <martin@ximian.com>
10173 * reflection.c (mono_reflection_bind_generic_parameters): Take a
10174 `MonoReflectionType *' instead of a `MonoType *'.
10176 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
10178 * gc.c (run_finalize): Avoid finalizing the object representing the
10180 (finalizer_thread): Fix warning.
10182 2004-02-25 Martin Baulig <martin@ximian.com>
10184 * class.c (_mono_class_get_instantiation_name): Added `int offset'
10185 argument for nested types.
10186 (mono_class_create_generic): Added support for nested generictypes.
10188 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
10191 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
10193 * reflection.c (method_encode_signature): Increase the minimum
10194 value of `size' from 10 to 11.
10195 (mono_reflection_bind_generic_parameters): Take `int type_argc'
10196 and `MonoType **types' arguments instead of the `MonoArray
10197 *types'; added `MonoType *nested_in'. Recursively instantiate
10200 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
10202 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
10203 stack_overflow_ex members which are used by exception handling.
10205 * appdomain.c (mono_runtime_init): Initialize the new members.
10207 * gc.c (mono_gc_enable): New helper function.
10208 * gc.c (mono_gc_disable): New helper function.
10210 2004-02-23 Martin Baulig <martin@ximian.com>
10212 * icall.c: I must have been really stupid - make it actually work
10215 2004-02-23 Martin Baulig <martin@ximian.com>
10217 * loader.c (method_from_memberref): Only inflate the method if
10218 it's in another klass.
10220 2004-02-23 Martin Baulig <martin@ximian.com>
10222 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
10223 (mono_class_init): If we're a generic instance and an interface,
10224 compute `class->interface_id'; also create `class->interfaces'
10225 here and inflate them.
10227 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
10229 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
10231 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
10233 2004-02-15 Miguel de Icaza <miguel@ximian.com>
10235 * reflection.c (method_encode_code): Improved the error message
10236 generated by the exception.
10238 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10240 * icall.c: Martin did not do what he said in the ChangeLog for
10241 2004-02-18, but put back the changes for properties and events.
10242 Commenting those changes out again and adding comment to bug #54518.
10244 * process.c: removed warning.
10246 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
10248 * marshal.c (emit_struct_conv): Print an error message instead of
10249 asserting when a type does not have the StructLayout attribute.
10251 2004-02-20 Martin Baulig <martin@ximian.com>
10253 * reflection.c (mono_type_get_object): Also use the cache for
10255 (mono_reflection_bind_generic_parameters): Always compute
10258 2004-02-20 Martin Baulig <martin@ximian.com>
10260 * class.h (MonoGenericMethod): Removed `klass'.
10262 * class.c (mono_class_inflate_generic_method): Added `MonoClass
10265 2004-02-20 Martin Baulig <martin@ximian.com>
10267 * reflection.c (method_encode_methodspec): Actually use the
10268 uninflated signature for the memberref.
10270 2004-02-20 Martin Baulig <martin@ximian.com>
10272 * class.h (MonoGenericMethod): Removed `declaring'.
10274 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
10275 is NULL, compute it here.
10277 2004-02-20 Martin Baulig <martin@ximian.com>
10279 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
10281 * metadata.c (mono_metadata_generic_inst_hash): New method.
10282 (mono_metadata_generic_inst_equal): New method.
10284 * reflection.c (mono_reflection_bind_generic_parameters): Use the
10285 `klass->image->generic_inst_cache' cache to avoid creating
10286 duplicate MonoGenericInst's.
10288 * class.c (mono_class_inflate_generic_type): Use the cache.
10290 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
10292 * object.c: fixed gc descriptor calculation for embedded valuetypes.
10294 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10296 * icall.c: added Socket.WSAIoctl icall.
10298 * socket-io.[ch]: implemented
10299 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
10301 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
10303 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
10305 2004-02-18 Urs C Muff <umuff@quark.com>
10307 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
10308 this work on PPC and other big-endian architectures.
10310 * debug-mono-symfile.h: Prepended the names of all the `guint32'
10311 fields with an underscore to make sure they're only accessed by
10312 the read32() macro.
10314 2004-02-18 Martin Baulig <martin@ximian.com>
10316 * icall.c: Put the klass->refclass changes back for methods and
10317 fields, but not for properties and events. We're currently not
10318 distinguishing between DeclaringType and ReflectedType for
10319 properties and events, that's what caused the regressions.
10321 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10324 (mono_async_result_new): the handle can be NULL.
10326 * threadpool.c: Use an event instead of a semaphore, don't initialize
10327 it until needed. This saves quite a few semaphores from being created
10328 when using the threadpool.
10330 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
10332 * object.c (mono_string_is_interned_lookup): Fix interning of long
10333 strings. Fixes #54473.
10335 * domain.c (ldstr_equal): Optimize if the two strings are equal.
10337 * icall.c: Revert the klass->refclass changes since they introduce
10338 regressions (bug #54518).
10340 2004-02-18 Martin Baulig <martin@ximian.com>
10342 * class.c (mono_class_init): If we're a generic instance and don't
10343 come from a TypeBuilder, inflate our members here.
10344 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
10345 (mono_class_create_generic): New public method.
10346 (mono_class_initialize_generic): Removed.
10347 (get_instantiation_name): Renamed to
10348 _mono_class_get_instantiation_name() and made it public.
10350 2004-02-18 Martin Baulig <martin@ximian.com>
10352 * class.c (mono_class_inflate_generic_type): Clear the new
10353 instance's `nginst->klass' when inflating a generic instance.
10354 (mono_class_is_subclass_of): Added (basic) support for generic
10357 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
10359 * appdomain.h, domain.c: use a MonoCodeManager instead of a
10360 MonoMempool to hold compiled native code.
10362 2004-02-17 Martin Baulig <martin@ximian.com>
10364 * class.h (MonoDynamicGenericInst): Added `count_properties' and
10367 * reflection.c (mono_reflection_generic_inst_initialize): Added
10368 `MonoArray *properties' argument.
10370 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
10372 2004-02-17 Martin Baulig <martin@ximian.com>
10374 * icall.c (ves_icall_Type_GetFields): Renamed to
10375 ves_icall_Type_GetFields_internal() and added a
10376 `MonoReflectionType *rtype' argument; pass it to
10377 mono_field_get_object() to set the field's "reflected" type.
10378 (ves_icall_Type_GetConstructors): Likewise.
10379 (ves_icall_Type_GetEvents): Likewise.
10380 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
10381 argument; pass it to mono_method_get_object() to set the method's
10384 2004-02-17 Martin Baulig <martin@ximian.com>
10386 * class.h (MonoDynamicGenericInst): New type.
10387 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
10389 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
10390 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
10391 (ves_icall_MonoGenericInst_GetFields): New interncall.
10393 * class.c (mono_class_from_generic): Don't call
10394 mono_class_initialize_generic() if this is a dynamic instance;
10395 ie. it's being created from a TypeBuilder.
10396 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
10397 `class->byval_arg.type'.
10399 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
10400 to `inflate_method' and made static.
10401 (mono_reflection_inflate_field): Removed.
10402 (mono_reflection_generic_inst_initialize): New public method.
10404 * reflection.h (MonoReflectionGenericInst): Removed `methods',
10405 `ctors' and `fields'; added `initialized'.
10407 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
10409 * debug-helpers.c (mono_method_full_name): Fix output for empty
10412 2004-02-12 Martin Baulig <martin@ximian.com>
10414 * class.h (MonoClassField): Added `MonoType *generic_type'.
10416 * reflection.c (mono_image_get_fieldref_token): Added support for
10417 instantiated generic types.
10418 (field_encode_inflated_field): Removed.
10419 (mono_image_get_inflated_field_token): Removed.
10420 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
10422 * reflection.h (MonoReflectionInflatedField): Removed.
10424 2004-02-12 Martin Baulig <martin@ximian.com>
10426 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
10427 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
10429 * reflection.c (mono_image_get_methodspec_token): Take a
10430 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
10431 (mono_image_create_token): Check whether we have a
10432 `method->signature->gen_method' and call
10433 mono_image_get_methodspec_token() if appropriate.
10434 (inflated_method_get_object): Removed.
10435 (mono_reflection_bind_generic_method_parameters): Return a
10436 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
10437 (mono_reflection_inflate_method_or_ctor): Likewise.
10439 * reflection.h (MonoReflectionInflatedMethod): Removed.
10441 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
10443 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
10444 for custom valuetype marshalling.
10446 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
10448 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10450 * icall.c: fixed WSAGetLastError_internal name.
10452 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
10454 * threads.c (mono_thread_attach): Allow this to be called multiple
10455 times for a thread.
10457 * threads.c (build_wait_tids): Do not wait for ourselves.
10459 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
10460 appdomain list is empty.
10462 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
10463 memory returned by mono_string_builder_to_utf16, since it points into
10464 managed memory. Thanks to Bernie Solomon for noticing this.
10466 * icall.c: Add AppDomainSetup icalls.
10468 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
10470 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
10473 * reflection.c (reflection_methodbuilder_to_mono_method): Save
10474 custom attributes to the method_aux struct. Also fix array indexes etc.
10476 * loader.c (mono_method_get_param_names): Make dynamic case work again.
10478 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
10480 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
10481 (both static and runtime) and reduce startup time.
10483 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
10485 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
10486 AsAny marshalling conversion instead of crashing.
10488 * marshal.c: Fix warnings.
10490 2004-02-09 Martin Baulig <martin@ximian.com>
10492 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
10494 * reflection.h (MonoReflectionInflatedMethod): Removed the
10495 `declaring' field, it's now in the unmanaged MonoGenericMethod.
10497 * reflection.c (method_encode_methodspec): Removed the `method'
10498 argument; we get it from `gmethod->declaring'.
10499 (inflated_method_get_object): Removed the `declaring' argument.
10501 2004-02-09 Martin Baulig <martin@ximian.com>
10503 * class.h (MonoGenericMethod): New type.
10504 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
10507 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
10508 a `MonoGenericMethod *gen_method' one.
10510 * class.c (mono_class_inflate_generic_type): Take an additional
10511 `MonoGenericMethod * argument. This is only non-NULL if we're
10512 inflating types for a generic method.
10513 (mono_class_inflate_generic_signature): Renamed to
10514 inflate_generic_signature() and made static; take a
10515 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
10516 (inflate_generic_header): Take a `MonoGenericMethod *' argument
10517 instead of a `MonoGenericInst *' one.
10518 (mono_class_inflate_generic_method): Likewise.
10520 * reflection.c (encode_generic_method_sig): Take a
10521 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
10522 (method_encode_methodspec): Likewise.
10523 (inflated_method_get_object): Likewise.
10525 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
10526 field with a `MonoGenericMethod *gmethod' one.
10528 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
10530 * class.h (mono_class_has_parent): add parens to expansion
10533 2004-02-08 Martin Baulig <martin@ximian.com>
10535 * image.h (MonoImage): Removed `generics_cache'.
10537 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
10538 instead of a `MonoType *' argument; removed the `inflate_methods'
10539 argument. Don't inflate methods here.
10541 * loader.c (find_method): If it's a generic instance, call
10542 mono_class_init() on the `sclass->generic_inst->generic_type'.
10544 * metadata.c (mono_type_size): Make this work on uninitialized
10545 generic instances; call it on the `ginst->generic_type's class.
10547 * reflection.c (mono_reflection_bind_generic_parameters): Call
10548 mono_class_from_generic() to create the `ginst->klass'.
10550 2004-02-08 Martin Baulig <martin@ximian.com>
10552 * class.h (MonoClass): Changed type of `generic_inst' from
10553 `MonoType *' to `MonoGenericInst *'.
10555 2004-02-08 Martin Baulig <martin@ximian.com>
10557 * icall.c (ves_icall_Type_BindGenericParameters): Just call
10558 mono_type_get_object(), this is now creating a `MonoGenericInst'
10559 for MONO_TYPE_GENERICINST.
10560 (ves_icall_MonoGenericInst_GetParentType): Likewise.
10561 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
10563 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
10564 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
10565 (inflated_method_get_object): Added `MonoClass *refclass' argument.
10566 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
10567 and reflected type.
10569 * reflection.h (MonoReflectionInflatedMethod): Removed
10570 `declaring_type' and `reflected_type'.
10572 2004-02-08 Martin Baulig <martin@ximian.com>
10574 * class.h (MonoGenericInst): Added `MonoType *parent' and
10575 `MonoType **ifaces'.
10577 * reflection.h (MonoReflectionGenericInst): Removed `klass',
10578 `parent' and `interfaces'.
10580 * reflection.c (mono_reflection_bind_generic_parameters): Take a
10581 `MonoType *' argument and return a `MonoType *'.
10584 (ves_icall_MonoGenericInst_GetParentType): New interncall.
10585 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
10587 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
10589 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
10590 valuetype marshalling.
10592 2004-02-06 Martin Baulig <martin@ximian.com>
10595 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
10596 (my_mono_class_from_generic_parameter): Likewise.
10598 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
10600 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
10601 contents of the symbol files lazily.
10603 * object.h (MonoThread): Add 'name' and 'name_len' fields.
10605 * threads.h threads.c icall.c: New icalls for getting and setting the
10608 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
10610 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
10611 Raise an exception when the domain is not found.
10613 2004-02-03 Martin Baulig <martin@ximian.com>
10615 * reflection.c (mono_image_get_methodspec_token): Use the
10616 uninflated signature; fixes gen-33.
10618 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
10620 * gc.c threads.c: Make the finalizer thread a normal managed thread so
10621 the finalizer code can use thread functionality.
10623 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
10624 the finalizer thread.
10626 * threads.c: Make some functions more robust.
10628 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
10630 * metadata.h: Add new marshalling conventions.
10632 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
10633 stringbuilder marshalling. Fixes #53700.
10635 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
10637 * reflection.c (mono_image_get_type_info): Save declarative security
10640 * reflection.c (mono_image_get_field_info): Handle uninitialized
10641 unmanaged fields as well.
10643 * appdomain.c: Bump corlib version.
10645 2004-02-01 Martin Baulig <martin@ximian.com>
10647 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
10648 method type arguments.
10650 2004-01-30 Duncan Mak <duncan@ximian.com>
10652 * marshal.h: Add prototype for
10653 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
10655 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
10658 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
10660 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
10661 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
10663 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
10665 * marshal.c (mono_marshal_get_native_wrapper): Add support for
10666 custom marshalling of valuetypes.
10668 * marshal.c: Fix some warnings.
10670 2004-01-29 Martin Baulig <martin@ximian.com>
10672 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
10673 for generic method parameters.
10675 * reflection.c (method_encode_methodspec): Write the uninflated
10676 signature into the methodspec table.
10677 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
10678 is always the uninflated method.
10679 (reflection_methodbuilder_to_mono_method): Copy the generic
10680 parameters from the MethodBuilder into `header->gen_params'.
10682 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
10684 * class.c (mono_class_from_generic_parameter): Fix warning.
10686 2004-01-27 Martin Baulig <martin@ximian.com>
10688 * class.c (mono_class_from_generic_parameter): Don't create
10689 `klass->methods' here.
10691 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
10693 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
10694 extension since it does not work with libraries named lib<FOO>.dll.so.
10696 2004-01-25 Martin Baulig <martin@ximian.com>
10698 * class.c (mono_class_inflate_generic_type): Added support for
10699 MONO_TYPE_GENERICINST.
10701 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
10702 inflate methods on open constructed types.
10704 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10706 * object.c: fire ProcessExit event in the root AppDomain after running
10707 Main. Fixes bug #53299.
10709 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
10711 * socket-io.c: include the new socket-wrappers.h header.
10712 Use the wrappers instead of the unix socket functions to make the code
10715 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
10717 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
10719 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10722 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
10724 * reflection.c (mono_image_create_pefile): Handle the case when the
10725 entry point is not a MethodBuilder.
10727 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10728 field to ReflectionMethod since it is not allways a builder.
10730 * reflection.c (type_get_fully_qualified_name): New helper function to
10731 return the fully qualified name of a type.
10733 * reflection.c (encode_marshal_blob): Always emit the fully qualified
10734 type name for custom marshallers.
10736 * reflection.c (mono_marshal_spec_from_builder): Ditto.
10738 * class.c (mono_class_setup_vtable): If a parent class already
10739 implements an interface, use the implementing methods from that class.
10742 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10744 * threadpool.c: just return instead of ExitThread to allow for thread
10747 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
10749 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
10750 when closing resource modules.
10752 * reflection.c (mono_image_create_pefile): Handle the case when the
10753 entry point is not a MethodBuilder.
10755 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
10756 field to ReflectionMethod since it is not allways a builder.
10758 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
10760 * marshal.c (mono_marshal_get_managed_wrapper):
10761 mono_marshal_alloc takes native int so CONV_I
10762 the arg for 64bits.
10764 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
10766 * reflection.c (fixup_cattrs): New function to fixup the methoddef
10767 tokens in the cattr table. Fixes #53108.
10769 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10771 * loader.c: don't trim ".dll" before looking up in the config file.
10772 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
10774 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
10776 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
10777 Return the module which contains the resource as well.
10778 (ves_icall_System_Reflection_Module_Close): New icall.
10780 * appdomain.c: Bump corlib version number.
10782 * image.c (mono_image_addref): New public function.
10784 * assembly.c: Call mono_image_addref.
10786 * reflection.c (mono_module_get_object): Increase reference count of
10789 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
10792 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
10793 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
10794 proper exceptions on DllImport problems.
10796 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
10798 * class.c, metadata.c: eliminate CSIZE macro.
10800 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
10802 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
10803 * object.h: Added async_callback field in MonoAsyncResult.
10804 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
10805 * verify.c: Added async_callback in MonoAsyncResult layout.
10807 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
10809 * reflection.c (mono_reflection_get_custom_attrs): Add support
10812 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
10814 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
10816 (mono_marshal_method_from_wrapper): Add null pointer check.
10818 2004-01-16 Martin Baulig <martin@ximian.com>
10820 * debug-mono-symfile.h: Set version number to 36 and reflect
10821 latest symbol writer changes.
10823 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
10825 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
10826 multi-dimensional arrays.
10827 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
10828 (mono_class_from_mono_type): Use bounded_array_class_get.
10830 * class.c (mono_bounded_array_class_get): New function which takes
10831 a 'bounded' bool argument to distinguish vectors from one dimensional
10834 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
10835 bounded_array_class_get if the array has bounds.
10837 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
10838 Search modules loaded using AssemblyBuilder:AddModule as well.
10840 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10842 * appdomain.c: increased corlib version.
10843 * filewatcher.c: removed g_print.
10845 (get_property_info): only allocate what is actually requested.
10846 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
10848 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10850 * Makefile.am: added filewatcher.[ch]
10851 * filewatcher.[ch]: FileSystemWatcher runtime support.
10852 * icall.c: added new FSW icalls.
10854 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10856 * string-icalls.c: fix stringbuilder regression as suggested by
10857 Iain McCoy <iain@mccoy.id.au>.
10859 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
10861 * process.c (process_read_stringtable_block): Recognize '007f' as
10862 a language neutral stringtable block.
10864 2004-01-12 Patrik Torstensson
10866 * object.h (MonoStringBuilder) : Changed layout to support our
10867 new stringbuilder class.
10868 * marshal.c: Change marshalling to support the new layout of
10870 * appdomain.c: increased version number because new layout of
10873 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
10875 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
10876 assembly name as an string instead of an AssemblyName, since it is
10877 easier to extract info from it.
10879 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
10880 the culture subdirectories too. Fixes #52231.
10882 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10884 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
10885 It takes 2 new parameters with an optional name for the method to look
10886 for and case ignoring info.
10888 * threadpool.c: removed unused variable.
10890 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10892 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
10893 It takes 2 new parameters with an optional name for the property to look
10894 for and case ignoring info.
10897 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
10899 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
10902 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10905 * assembly.c: escape the uri before passing it to g_filename_from_uri.
10908 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
10910 * reflection.c: Add support for more than one unmanaged resource.
10912 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
10913 in field->def_value, as done in all other cases.
10915 * reflection.c (mono_reflection_get_custom_attrs): Add support for
10918 * reflection.c (mono_reflection_create_runtime_class): Remove
10919 errorneous assignment to klass->element_class, since it is already
10920 done in mono_reflection_setup_internal_class.
10922 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10924 * gc.c: added missing LeaveCriticalSection.
10925 * icall.c: indented a couple of lines.
10926 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
10927 if we call EndInvoke inside a callback. Fixes bug #52601.
10929 2004-01-07 Martin Baulig <martin@ximian.com>
10931 * mono-debug-debugger.h
10932 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
10934 2004-01-06 Miguel de Icaza <miguel@ximian.com>
10936 * appdomain.c: Use messages in NotImplementedException.
10938 * exception.c (mono_get_exception_not_implemented): Now this takes
10939 a message argument.
10941 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
10942 exception instead of g_asserting an aborting when something is not
10945 Add some inline docs.
10947 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
10949 * reflection.h: Update after changes to object layout.
10951 * reflection.c: Implement saving of unmanaged aka win32 resources.
10953 * appdomain.c: Bump version number.
10955 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
10956 Handle missing domains gracefully.
10958 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
10960 * file-io.c : On Windows, there are much more invalid_path_chars.
10962 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
10964 * class.h, object.c: prepare for GetType () speedup.
10966 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
10968 * profiler.c: workaround for --profile null reference exception on
10969 cygwin. Patch by Patrik Torstensson.
10971 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
10973 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
10974 make work for unaligned access.
10976 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
10978 * class.c: small cleanup (class->fields [i] -> field).
10979 * image.c: check address of metadata is valid.
10981 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
10983 * assembly.h assembly.c (mono_assembly_loaded): New public function to
10984 search the list of loaded assemblies.
10986 * reflection.c (mono_reflection_type_from_name): Use
10987 mono_assembly_loaded instead of mono_image_loaded.
10989 * reflection.c: Fix warnings.
10991 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
10993 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
10994 is dynamic. This is needed since an assembly can contain both dynamic and
10995 non-dynamic images.
10997 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
11000 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
11002 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
11003 to store modules loaded using AddModule.
11005 * reflection.c (mono_image_fill_file_table): Generalize this so it works
11008 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
11010 * reflection.c (mono_image_fill_export_table_from_module): New function to
11011 fill out the EXPORTEDTYPES table from a module.
11013 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
11014 into a separate function. Also handle loaded non-dynamic modules.
11016 * reflection.c (mono_image_basic_init): Fix memory allocation.
11018 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11020 * assembly.c (mono_assembly_load_references): Make this public.
11022 2003-12-19 Martin Baulig <martin@ximian.com>
11024 * class.c (mono_class_initialize_generic): Made this static, take
11025 a `MonoGenericInst *' instead of a `MonoClass *'.
11026 (mono_class_from_generic): Call mono_class_initialize_generic()
11027 unless we're already initialized or being called from
11028 do_mono_metadata_parse_generic_inst().
11030 * class.h (MonoGenericInst): Added `initialized' and
11031 `init_pending' flags.
11033 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
11034 `mono_class_init (gklass)' or mono_class_initialize_generic()
11035 here; set `generic_inst->init_pending' while parsing the
11038 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
11040 * locales.c: include string.h for memxxx prototypes
11042 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
11044 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
11045 constructor when accessing literal fields.
11047 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
11049 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
11051 * reflection.c (assembly_add_resource_manifest): New function to fill
11052 the MANIFESTRESOURCE table.
11054 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
11056 * reflection.h: Update to changes in class layout.
11058 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
11059 Reenable call to mono_runtime_is_shutting_down ().
11061 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
11062 determine if the runtime is shutting down.
11064 2003-12-16 Jackson Harper <jackson@ximian.com>
11066 * icall.c: comment out call to mono_runtime_is_shutting_down to
11069 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
11071 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
11072 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
11074 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
11076 * reflection.c: move definition of swap_with_size
11077 to before its first call
11079 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
11081 * appdomain.c (mono_runtime_is_shutting_down): New public function.
11083 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
11086 * object.c: Fix warnings.
11088 * icall.c (ves_icall_Type_Get...): Only consider inherited static
11089 members if FlattenHierarchy is set.
11091 * reflection.c (mono_image_add_decl_security): New function to emit
11092 declarative security.
11094 * reflection.h reflection.c: Add support for declarative security.
11096 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11098 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
11100 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
11102 * appdomain.c verify.c: Moved corlib version checking into its own
11103 function in appdomain.c since it needs to create vtables etc.
11105 2003-12-13 Patrik Torstensson <p@rxc.se>
11107 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
11108 instead of unwrapped server.
11110 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
11112 * verify.c (check_corlib): Fix field index.
11114 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
11116 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
11119 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
11121 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
11122 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
11123 cope with sizeof(size_t) != sizeof(guint32).
11125 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11127 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
11128 in case of failure.
11130 2003-12-10 Mark Crichton <crichton@gimp.org>
11132 * icall.c: removed the GetNonZeroBytes. We now handle this case
11135 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
11137 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
11139 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
11142 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
11144 * verify.c (check_corlib): Handle the case when the version field is
11145 initialized by a static constructor.
11147 2003-12-08 Patrik Torstensson <p@rxc.se>
11149 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
11151 2003-12-08 Martin Baulig <martin@ximian.com>
11153 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
11154 a MonoReflectionGenericParameter, also take the parameter index
11155 and name as arguments.
11156 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
11157 (ves_icall_MonoGenericParam_initialize): New interncall.
11158 (ves_icall_Type_make_byref_type): New interncall.
11160 * reflection.h (MonoReflectionGenericParam): Derive from
11161 MonoReflectionType, not just from MonoObject. Added `refobj' and
11164 * reflection.c (mono_reflection_define_generic_parameter): Create
11165 and return a new MonoReflectionGenericParam; don't initialize the
11167 (mono_reflection_initialize_generic_parameter): New public method;
11168 initializes the constraints and creates the `param->pklass'.
11170 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
11172 * reflection.h reflection.c: Use the new fields 'num_types',
11173 'num_fields' and 'num_methods' to track the number of types etc.
11175 * verify.c (check_corlib): Check corlib version number.
11177 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
11179 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
11180 function works on all methods.
11182 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
11184 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
11185 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
11186 the custom_type_info flag of the transparent proxy.
11187 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
11188 objects that supports IRemotingTypeInfo.
11189 * object.h: Added custom_type_info field in transparent proxy.
11191 2003-12-06 Martin Baulig <martin@ximian.com>
11193 * class.c (mono_class_create_from_generic): Removed.
11194 (mono_class_from_generic): Check `ginst->klass' before doing
11195 anything else. This is important to fully support "recursive"
11198 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
11199 empty `generic_inst->klass' before doing anything else.
11201 2003-12-06 Dick Porter <dick@ximian.com>
11206 * locales.c: Use C structs to access class fields. Don't do a
11207 conversion between MonoString and UChar because both are
11208 platform-endian UTF-16. Compare now takes startindex and count
11209 parameters. Add a char overload for IndexOf. Speed up the
11210 invariant string IndexOf.
11212 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
11214 * Makefile.am (monosn_LDADD): Fix parallel build.
11216 2003-12-04 Martin Baulig <martin@ximian.com>
11219 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
11220 (ves_icall_Type_make_array_type): New interncall.
11222 2003-12-04 Martin Baulig <martin@ximian.com>
11224 * locales.c: also change it in the !HAVE_ICU case.
11226 2003-12-04 Dick Porter <dick@ximian.com>
11229 * locales.c: construct_compareinfo is now in CompareInfo, not
11232 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
11234 * image.c (mono_image_load_file_for_image): Cache loaded images in the
11235 image->files array.
11237 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
11240 * assembly.c (mono_assembly_load_references): Only load references
11243 * class.c (mono_class_from_name): Avoid linear search of the
11244 EXPORTEDTYPE table.
11246 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
11248 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
11250 * image.h (MonoImage): Add 'field_cache' field.
11252 * loader.c (mono_field_from_token): Cache field lookups.
11254 * reflection.c (mono_module_get_object): Fix name property.
11256 * icall.c (ves_icall_get_enum_info): Update after changes to
11257 mono_metadata_get_constant_index ().
11259 * icall.c: Get rid of get_type_info icall, use a separate icall for
11260 each type property to avoid needless memory allocations. Fixes #51514.
11262 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
11263 to avoid needless binary searches.
11265 * class.c (class_compute_field_layout): Move the initialization of
11266 field->def_value to mono_class_vtable ().
11268 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
11271 * object.c (mono_object_allocate): Make it inline.
11273 * object.c (mono_object_allocate_spec): Make it inline.
11275 2003-12-02 Dick Porter <dick@ximian.com>
11277 * locales.c (create_NumberFormat): NumberFormatInfo construction.
11278 Patch by Mohammad DAMT (mdamt@cdl2000.com).
11280 2003-12-01 Dick Porter <dick@ximian.com>
11282 * threads.c: Fix signature and call in CreateMutex and
11285 2003-12-01 Dick Porter <dick@ximian.com>
11288 * locales.c: Implement string compares and searching
11290 * object.h: Add extra Thread field
11292 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
11294 * reflection.c (fixup_method): Add support for MonoCMethod.
11296 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
11298 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
11300 * reflection.c (assembly_name_to_aname): Allow extra characters in
11301 assembly names. Fixes #51468.
11303 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
11305 * exception.c (mono_exception_from_name_domain): New helper function.
11307 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
11308 exception object in the correct domain.
11310 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
11311 formatting + make a copy a the input data.
11313 * loader.c (mono_get_method_from_token): Methods which contain
11314 native code do not have entries in the ImplMap.
11316 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
11317 Thanks to Gonzalo for spotting this.
11319 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
11320 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
11322 * assembly.h (mono_assembly_load_from): Split the second part of
11323 assembly loading into a new public function.
11325 * exception.h (mono_get_exception_bad_image_format): New function.
11327 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
11329 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
11330 Enumerate all modules inside a dynamic assembly. Fixes #51293.
11332 * icall.c: Add new icall for creating dynamic methods.
11334 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
11336 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
11338 * reflection.c (mono_reflection_create_dynamic_method): New icall to
11339 create a dynamic method.
11341 * reflection.c (resolve_object): New helper function.
11343 * reflection.c: Generalize ReflectionMethodBuilder and the functions
11344 which manipulate it so they can also work on dynamic methods.
11346 * reflection.c (reflection_method_builder_to_mono_method): Avoid
11347 creating the MonoReflectionMethodAux structure if it is not needed.
11349 * reflection.h verify.c: Update after changes to object layout.
11351 * reflection.c (method_builder_encode_signature): Fix compilation on
11354 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
11356 * appdomain.h: Added support for context static fields. Added static_data
11357 field to MonoAppContext and renamed thread_static_fields to a more
11358 generic special_static_fields in MonoAppDomain, since it can now contain
11359 context static fields.
11360 * domain.c: Updated hashtable name.
11361 * object.c: Replaced field_is_thread_static() for a more generic
11362 field_is_special_static() which also checks for context static attribute.
11363 In mono_class_vtable(), added support for static context fields.
11364 * threads.c: Changed methods that manage thread static fields to more
11365 generic methods so they can be reused both for thread and context static
11367 * threads.h: Declared some new methods.
11369 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
11371 * reflection.h: Update after changes to the managed types.
11373 * reflection.c (encode_custom_modifiers): New helper function.
11375 * reflection.c (method_encode_signature): Emit custom modifiers.
11377 * reflection.c (field_encode_signature): Emit custom modifiers.
11379 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
11381 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
11383 * icall.c (ves_icall_System_ValueType_Equals): New optimized
11386 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
11389 * object.c (mono_field_get_value_object): New function.
11391 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
11394 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
11396 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
11397 return a preallocated out-of-memory exception instance.
11399 * object.c (out_of_memory): Use the new function.
11401 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
11402 flag is before the custom modifiers. Fixes #49802.
11404 2003-11-16 Martin Baulig <martin@ximian.com>
11406 * class.c (mono_class_is_open_constructed_type): Implemented the
11407 MONO_TYPE_GENERICINST case.
11409 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
11411 * assembly.c (mono_assembly_fill_assembly_name): New function to
11412 fill out the MonoAssemblyName structure.
11413 (mono_assembly_open): Use the new function.
11415 * icall.c (fill_reflection_assembly_name): New helper function.
11417 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
11420 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
11422 2003-11-15 Martin Baulig <martin@ximian.com>
11424 * class.c (mono_class_is_open_constructed_type): New public
11425 function; checks whether a type is an open constructed type,
11426 ie. whether it still contains type parameters.
11427 (mono_class_inflate_generic_type): If we're a type parameter and
11428 the inflated type is also a MONO_TYPE_(M)VAR, return the original
11431 * class.h (MonoGenericInst): Added `guint32 is_open'.
11433 * loader.c (method_from_methodspec): Check whether we're an open
11434 or closed constructed type and set `ginst->is_open'.
11436 * reflection.c (mono_reflection_bind_generic_parameters): Check
11437 whether we're an open or closed constructed type and set
11439 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
11440 from open constructed types.
11442 2003-11-15 Martin Baulig <martin@ximian.com>
11444 * reflection.c (mono_reflection_bind_generic_parameters): If we're
11445 a generic instance (instead of a generic type declaration) with
11446 unbound generic parameters, bind them to our actual types.
11448 2003-11-14 Martin Baulig <martin@ximian.com>
11450 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
11452 * reflection.c (mono_reflection_bind_generic_parameters): If we're
11453 an interface type, populate `res->interfaces' with instantiated
11454 versions of all the interfaces we inherit.
11456 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
11458 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
11459 when MONO_PATH is set but doesn't contain the install dir.
11461 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11464 (ves_icall_Type_GetInterfaces): don't return an interface twice when
11465 it's also implemented in base classes. Fixes bug #50927.
11467 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
11469 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
11470 if this method is called from a finalizer. Fixes #50913.
11472 2003-11-12 Miguel de Icaza <miguel@ximian.com>
11474 * threads.c: Implement VolatileRead/VolatileWrite
11476 * icall.c: Add new icalls for VolatileRead/VolatileWrite
11478 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
11480 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
11481 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
11484 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
11485 from Peter Ross (pro@missioncriticalit.com).
11487 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
11489 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
11491 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
11493 * assembly.c (mono_assembly_load_references): Disable check because it
11494 triggers on older corlibs which lots of people have.
11496 2003-11-12 Jackson Harper <jackson@ximian.com>
11498 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
11499 load corlib.dll if mscorlib.dll is not found.
11500 * assembly.h: Remove corlib name define.
11503 * image.c: Change corlib name to mscorlib.
11505 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
11507 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
11509 2003-11-11 Miguel de Icaza <miguel@ximian.com>
11511 * appdomain.h: Added loader_optimization here to sync with the C#
11512 code, and add disallow_binding_redirects field.
11514 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
11516 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
11518 * reflection.c (mono_image_build_metadata): Fix crash on modules
11521 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
11523 * icall.c (ves_icall_get_method_info): Return callingConvention as
11526 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
11527 namespaces from the EXPORTEDTYPE table as well.
11529 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
11530 from all modules inside the assembly.
11532 2003-11-11 Martin Baulig <martin@ximian.com>
11534 * reflection.c (mono_reflection_bind_generic_parameters): Make
11535 this work for interfaces.
11537 2003-11-11 Martin Baulig <martin@ximian.com>
11539 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
11541 2003-11-11 Martin Baulig <martin@ximian.com>
11543 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
11544 "MonoInflatedMethod" and "MonoInflatedCtor".
11546 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
11548 * reflection.c (resolution_scope_from_image): Use the assembly table
11549 from the manifest module, since other modules don't have it.
11551 * debug-helpers.c (mono_type_full_name): New helper function.
11553 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
11555 * image.c (mono_image_load_file_for_image): New public function which
11556 is a replacement for the load_file_for_image in class.c.
11558 * assembly.c (mono_assembly_load_module): A wrapper for the function
11559 above which does assembly association and reference loading too.
11561 * class.c (mono_class_from_name): Call mono_assembly_load_module.
11563 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11565 * appdomain.c: not all of the attributes for the full assembly name
11566 are required and the order doesn't matter. Fixes bug #50787.
11568 2003-11-10 Dick Porter <dick@ximian.com>
11570 * locales.c: Use platform-endian UTF16
11572 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
11574 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
11576 2003-11-10 Martin Baulig <martin@ximian.com>
11579 (mono_metadata_load_generic_params): Make this actually work.
11581 * reflection.c (mono_reflection_bind_generic_parameters): If our
11582 parent is a generic instance, pass all the `types' to it, no
11583 matter whether it has the same number of type parameters or not.
11585 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
11587 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
11589 * assembly.c (mono_assembly_load_references): Move the image<->assembly
11590 assignment code to this function so it gets called recursively for all
11593 * image.c (load_modules): Remove the assembly assignment since it is
11594 now done by mono_assembly_load_references.
11596 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
11597 Add 'module' argument.
11598 (mono_module_get_types): New helper function.
11599 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
11601 2003-11-08 Martin Baulig <martin@ximian.com>
11603 * class.c (mono_class_inflate_generic_method): Interface method
11604 don't have a header.
11606 * reflection.c (mono_image_get_methodspec_token): Take an
11607 additional `MonoGenericInst *' argument instead of reading it from
11608 the header; this is necessary to support interfaces.
11609 (mono_image_create_token): Pass the `MonoGenericInst *' from the
11610 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
11611 (inflated_method_get_object): Take an additional `MonoGenericInst *'
11614 * reflection.h (MonoReflectionInflatedMethod): Added
11615 `MonoGenericInst *ginst'.
11617 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
11619 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
11621 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
11623 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
11625 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
11628 (reflection_methodbuilder_from_method_builder):
11629 (reflection_methodbuilder_from_ctor_builder): New helper functions to
11630 initialize a ReflectionMethodBuilder structure.
11631 (mono_image_get_methodbuilder_token):
11632 (mono_image_get_ctorbuilder_token): New functions to emit memberref
11633 tokens which point to types in another module inside the same assembly.
11635 * reflection.c: Use the new helper functions.
11637 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
11639 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
11640 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
11642 * reflection.c (resolution_scope_from_image): Emit a moduleref if
11645 * reflection.c (mono_image_build_metadata): Emit metadata only for the
11646 current module. Emit the manifest only for the main module.
11648 * reflection.c (mono_image_create_token): Add assertion when a
11649 memberref needs to be created.
11651 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
11653 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
11654 larger buffer for the custom attribute blob. Fixes #50637.
11656 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11658 * threadpool.c: notify listener on async processing handles after
11659 invoking the async callback. Thanks to Zoltan.
11661 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
11663 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
11664 avoid code duplication.
11666 * reflection.h (MonoDynamicImage): New type which is currently unused,
11667 but will be used through the ref.emit code in place of
11668 MonoDynamicAssembly.
11670 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11673 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
11674 a MonoDynamicImage instead of just a MonoImage.
11676 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
11677 icalls to ModuleBuilder but keep their semantics, so they will work
11678 with moduleb->assemblyb. This will change later.
11680 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
11682 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
11685 * reflection.c (mono_image_build_metadata): Avoid creation of a default
11686 main module, since it is now done by the managed code.
11688 2003-11-03 Martin Baulig <martin@ximian.com>
11690 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
11691 `ginst->klass' here.
11692 (method_encode_methodspec): Don't use the `ginst->generic_method's
11693 klass if it's a generic instance, use `ginst->klass' in this case.
11695 2003-11-03 Martin Baulig <martin@ximian.com>
11697 * reflection.c (mono_image_get_generic_method_param_info):
11698 Removed, use mono_image_get_generic_param_info() instead.
11699 (mono_image_get_type_info): Write the GenericParam table before
11700 the Method table. This is neccessary because in the GenericParam
11701 table, type parameters of the class (ie. '!0' etc.) must come
11702 before the ones from its generic methods (ie. '!!0' etc).
11704 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
11706 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
11708 2003-11-02 Martin Baulig <martin@ximian.com>
11710 * reflection.c (create_generic_typespec): Take a
11711 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
11712 the generic parameters from it.
11714 2003-11-02 Martin Baulig <martin@ximian.com>
11716 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
11717 instead of a `MonoClassField *' since we just need the type.
11718 (create_generic_typespec): New static function. Creates a
11719 TypeSpec token for a generic type declaration.
11720 (mono_image_get_generic_field_token): New static function.
11721 (mono_image_create_token): If we're a FieldBuilder in a generic
11722 type declaration, call mono_image_get_generic_field_token() to get
11725 2003-11-02 Martin Baulig <martin@ximian.com>
11728 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
11729 `MonoReflectionGenericInst *declaring_type' and
11730 `MonoReflectionGenericInst *reflected_type' fields.
11732 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
11733 `MonoReflectionGenericInst *declaring_type' and a
11734 `MonoReflectionGenericInst *reflected_type' argument instead of a
11735 single `MonoReflectionGenericInst *type' one. Set
11736 `res->declaring_type' and `res->reflected_type' from them.
11737 (mono_reflection_inflate_field): Likewise.
11739 2003-11-02 Martin Baulig <martin@ximian.com>
11741 * class.c (mono_class_setup_vtable): Don't store generic methods
11744 2003-11-02 Martin Baulig <martin@ximian.com>
11746 * reflection.h (MonoReflectionGenericInst): Added
11747 `MonoReflectionType *declaring_type'.
11749 * reflection.c (mono_reflection_bind_generic_parameters): Use
11750 `if (tb->parent)' instead of `klass->parent'.
11752 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
11754 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
11755 with an empty ASSEMBLY table.
11757 * reflection.c (mono_image_build_metadata): Avoid using the same loop
11758 variable in the inner and outer loops.
11760 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
11762 * metadata.h (mono_metadata_make_token): Put parentheses around macro
11765 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
11767 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
11768 icalls. Instead, do everything in managed code. This is needed since
11769 it is hard to restore the original domain etc. in unmanaged code in the
11770 presence of undeniable exceptions.
11772 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
11773 New icalls to push and pop appdomain refs.
11775 2003-10-31 Martin Baulig <martin@ximian.com>
11777 * class.c (inflate_generic_type): Renamed to
11778 mono_class_inflate_generic_type() and made it public.
11780 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
11783 * loader.c (mono_field_from_memberref): Also set the retklass for
11786 * fielder.c (mono_image_get_inflated_field_token): New static
11787 method; creates a metadata token for an inflated field.
11788 (mono_image_create_token, fixup_method): Added support for
11789 "MonoInflatedField".
11790 (fieldbuilder_to_mono_class_field): New static function.
11791 (mono_reflection_inflate_field): New public function.
11794 (MonoReflectionGenericInst): Added `MonoArray *fields'.
11795 (MonoReflectionInflatedField): New typedef.
11797 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
11799 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
11800 for Solaris and other platforms without s6_addr16
11802 2003-10-30 Martin Baulig <martin@ximian.com>
11804 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
11805 argument instead of two.
11806 (mono_class_inflate_generic_signature): Likewise.
11807 (inflate_generic_header): Likewise.
11808 (mono_class_inflate_generic_method): Likewise. In addition, if
11809 `ginst->klass' is set, it becomes the new `method->klass'.
11811 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
11814 * reflection.c (encode_generic_method_sig): Write a 0xa as the
11815 first byte. [FIXME]
11816 (method_encode_methodspec): If we have generic parameters, create
11817 a MethodSpec instead of a MethodRef.
11818 (fixup_method): Added support for "MonoInflatedMethod" and
11819 "MonoInflatedCtor".
11820 (mono_image_create_token): Added support for "MonoInflatedMethod"
11821 and "MonoInflatedCtor".
11822 (inflated_method_get_object): New static function; returns a
11823 managed "System.Reflection.MonoInflatedMethod" object.
11824 (mono_reflection_bind_generic_method_parameters): Return a
11825 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
11826 (mono_reflection_inflate_method_or_ctor): Likewise.
11827 (mono_image_get_generic_method_param_info): Initialize unused
11829 (mono_image_get_generic_param_info): Likewise.
11831 * reflection.h (MonoReflectionInflatedMethod): New public
11832 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
11833 "S.R.MonoInflatedCtor" classes.
11835 * loader.c (method_from_memberref): If we're a TypeSpec and it
11836 resolves to a generic instance, inflate the method.
11838 2003-10-28 Dick Porter <dick@ximian.com>
11840 * object.c (mono_runtime_run_main): Convert command-line arguments
11841 into utf8, falling back to the user's locale encoding to do so.
11843 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
11845 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
11848 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
11850 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
11851 up icalls at method definition time. Partially fixes #33569.
11853 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
11855 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
11856 marshalling of arrays. Fixes #50116.
11858 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
11860 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
11861 points to a vtable in the dying appdomain.
11863 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
11864 listeners into unmanaged code inside the lock.
11866 * object.c (mono_class_vtable): Turn off typed allocation in non-root
11867 domains and add some comments.
11869 2003-10-25 Martin Baulig <martin@ximian.com>
11871 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
11873 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
11875 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
11876 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
11877 currently parsing. Create the generic class and store it in
11878 `generic_inst->klass' before parsing the type arguments. This is
11879 required to support "recursive" definitions; see mcs/tests/gen-23.cs
11881 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
11882 to support recursive typespec entries.
11884 * class.c (mono_class_setup_parent): If our parent is a generic
11885 instance, we may get called before it has its name set.
11886 (mono_class_from_generic): Splitted into
11887 mono_class_create_from_generic() and mono_class_initialize_generic().
11889 2003-10-25 Martin Baulig <martin@ximian.com>
11891 * icall.c (ves_icall_Type_BindGenericParameters): Return a
11892 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
11893 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
11894 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
11896 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
11897 (create_typespec): Likewise.
11898 (mono_reflection_bind_generic_parameters): Return a
11899 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
11900 (mono_reflection_inflate_method_or_ctor): New public function.
11902 * reflection.h (MonoReflectionGenericInst): New typedef.
11904 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
11906 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
11907 inside the domain lock. Fixes #49993.
11909 * object.c (mono_class_vtable): When typed allocation is used,
11910 allocate vtables in the GC heap instead of in the mempool, since the
11911 vtables contain GC descriptors which are used by the collector even
11912 after the domain owning the mempool is unloaded.
11914 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
11916 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
11917 reflect what it does. Also invalidate mempools instead of freeing
11918 them if a define is set.
11920 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
11923 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
11924 hold the finalizable objects in this domain.
11926 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
11929 * appdomain.c (mono_domain_set): New function to set the current
11930 appdomain, but only if it is not being unloaded.
11932 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
11933 appdomain which is being unloaded.
11935 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
11936 unloading of the root appdomain.
11938 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
11939 icall to execute a method in another appdomain. Intended as a
11940 replacement for InternalSetDomain, which can confuse the code
11941 generation in the JIT.
11943 * appdomain.c (mono_domain_is_unloading): New function to determine
11944 whenever an appdomain is unloading.
11946 * appdomain.c (mono_domain_unload): New function to correctly unload
11949 * assembly.c (mono_assembly_load_references): Check that an assembly
11950 does not references itself.
11952 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
11953 domain manually, it asks the finalizer thread to do it, then waits for
11954 the result. Also added a timeout.
11956 * icall.c: Register the new icalls.
11958 * threads.h threads.c: Export the mono_gc_stop_world and
11959 mono_gc_start_world functions.
11961 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
11962 function to fill out the mempool with 0x2a.
11964 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
11966 * reflection.h (MonoReflectionMethodAux): New structure to store
11967 information which is rarely used, thus is not in the MonoMethod
11970 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
11971 store the aux info.
11973 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
11974 and marshalling info into the aux structure.
11976 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
11977 from the aux structure.
11979 * loader.c (mono_method_get_param_names): Retrieve the param names from
11982 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
11984 * exception.h exception.c: Add AppDomainUnloadedException && fix
11987 2003-10-21 Dick Porter <dick@ximian.com>
11990 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
11991 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
11993 2003-10-21 Martin Baulig <martin@ximian.com>
11995 * reflection.c (mono_reflection_bind_generic_parameters):
11996 `klass->parent' is NULL for interfaces.
11998 2003-10-21 Martin Baulig <martin@ximian.com>
12000 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12002 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
12004 * exception.c (mono_exception_from_name_msg): New helper function for
12005 creating exceptions and initializing their message field.
12007 * exception.c: Simplify functions using the new helper.
12009 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
12012 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
12013 mono_raise_exception, since otherwise gcc doesn't generate the function
12014 epilog for raise_exception, confusing the stack unwinding in the JIT.
12017 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
12018 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
12021 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12023 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
12026 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
12028 * icall.c: Removed GetUninitializedObject method because
12029 AllocateUninitializedClassInstance does the same.
12031 2003-10-18 Martin Baulig <martin@ximian.com>
12033 * class.c (inflate_generic_signature): Renamed to
12034 mono_class_inflate_generic_signature() and made it public.
12035 (my_mono_class_from_generic_parameter): New static function; if we
12036 don't already have the generic parameter's MonoClass, create a
12037 very simple one which is just used internally in the runtime and
12038 not passed back to managed code.
12040 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
12042 * metadata.h (MonoMethodSignature): Moved the
12043 `MonoGenericParam *gen_params' to the MonoMethodHeader.
12044 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
12046 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
12047 ves_icall_MonoMethod_GetGenericArguments(); this is now an
12048 interncall on the MonoMethod class, not on MethodInfo.
12049 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
12050 calling mono_reflection_bind_generic_method_parameters() directly.
12052 * loader.c (mono_method_get_signature): If this is a MethodSpec;
12053 return the already computed `method->signature'.
12054 (method_from_methodspec): New static function to load a method
12055 from a MethodSpec entry.
12056 (mono_get_method_from_token): Call the new method_from_methodspec()
12057 for MethodSpec tokens.
12058 (mono_get_method_from_token): If we're a generic method, load the
12061 * reflection.c (mono_image_get_memberref_token): Allow
12062 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
12064 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
12065 (mono_image_create_token): First check whether it's a generic
12066 method (so we'd need to create a MethodSpec), then do the other
12068 (mono_reflection_bind_generic_method_parameters): Return a
12069 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
12070 called directly from the interncall.
12072 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
12074 * reflection.c (load_public_key): Move loading of the public key
12077 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
12079 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
12082 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
12083 culture, hash_alg and public_key. Fixes #49555.
12085 2003-10-17 Martin Baulig <martin@ximian.com>
12087 * class.h (MonoGenericInst): Moved this declaration here and added
12088 `MonoMethod *generic_method'.
12091 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
12092 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
12094 * metadata.c (mono_metadata_type_equal): Two types of
12095 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
12096 index; ie. don't compare the address of the `MonoGenericParam'
12098 (mono_metadata_load_generic_params): Removed the `MonoMethod
12101 * metadata.h (MonoGenericInst): Moved declaration to class.h.
12102 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
12104 * reflection.c (method_encode_signature): Encode the number of
12105 generic parameters.
12106 (encode_generic_method_sig): New static function.
12107 (method_encode_methodspec): New static function; creates an entry
12108 in the MethodSpec table for a generic method.
12109 (mono_image_get_methodspec_token): New static function.
12110 (mono_image_create_token): Call mono_image_get_methodspec_token()
12111 for generic methods.
12112 (mono_reflection_bind_generic_method_parameters): New public
12113 function. Instantiates a generic method.
12115 2003-10-16 Martin Baulig <martin@ximian.com>
12117 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
12118 *gen_params' here from MonoMethodHeader.
12120 * metadata.c (mono_metadata_parse_method_signature): If we have
12121 generic parameters, initialize `method->gen_params' and then set
12122 the correct `type->data.generic_param' in all the parameters.
12124 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
12126 * threads.c (mono_threads_get_default_stacksize): New function to
12127 return the default stacksize.
12129 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
12130 termination of the finalizer thread, since the previous method had
12131 race conditions. Fixes #49628.
12133 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
12134 as for the other managed threads.
12136 2003-10-16 Martin Baulig <martin@ximian.com>
12138 * class.c (inflate_generic_signature): Copy `generic_param_count'
12141 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
12144 * metadata.c (mono_metadata_parse_method_signature): Actually set
12145 the `method->generic_param_count' here.
12146 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
12148 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
12150 * object.h: Add a new field to TypedRef to simplify the implementation
12151 of the REFANY opcodes in the JIT.
12153 * icall.c: Make use of the new field.
12155 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
12158 2003-10-15 Martin Baulig <martin@ximian.com>
12160 * class.c (mono_class_from_gen_param): Renamed to
12161 mono_class_from_generic_parameter() and moved most of the
12162 functionality from mono_reflection_define_generic_parameter()
12163 here; ie. we create a "real" class here.
12164 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
12165 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
12166 previously been called.
12168 * class.h (MonoGenericParam): Moved the declaration of this struct
12169 here from metadata.h and added `MonoMethod *method'.
12171 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
12174 * loader.c (mono_get_method_from_token): If we have any generic
12175 parameters, call mono_metadata_load_generic_params() to read them
12176 from the MONO_TABLE_GENERICPAR.
12178 * metadata.c (mono_metadata_load_generic_params): Added
12179 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
12181 * metadata.h (MonoMethodSignature): Replaced
12182 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
12183 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
12185 * reflection.c (mono_reflection_define_generic_parameter): Moved
12186 most of the functionality into the new
12187 mono_class_from_generic_parameter(); set the `method' field if
12188 we're a method parameter.
12190 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
12192 * marshal.c (emit_struct_conv): if native size is 0
12195 2003-10-14 Martin Baulig <martin@ximian.com>
12197 * icall.c: The generics API has changed in the spec since it was
12198 added to System.Type; these modifications make it match the spec
12200 (ves_icall_Type_GetGenericParameters): Renamed to
12201 `ves_icall_Type_GetGenericArguments'.
12202 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
12203 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
12204 `ves_icall_MonoType_get_HasGenericArguments'.
12205 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
12206 `ves_icall_MonoType_get_IsGenericParameter'.
12207 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
12208 this is no interncall anymore.
12209 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
12210 `ves_icall_TypeBuilder_get_IsGenericParameter'.
12212 2003-10-14 Martin Baulig <martin@ximian.com>
12214 * reflection.c (mono_reflection_bind_generic_parameters): Also
12215 inflate generic methods if we're reading the class from IL.
12217 2003-10-13 Martin Baulig <martin@ximian.com>
12219 * reflection.c (mono_reflection_define_generic_parameter): This
12220 method isn't called directly from the icall anymore; take a
12221 `MonoReflectionAssemblyBuilder *' so we can use this for type and
12222 method generic parameters.
12223 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
12224 (method_builder_encode_signature): Encode generic parameters.
12225 (mono_image_get_method_info): Write generic params to the
12226 MONO_TABLE_GENERICPARAM table.
12228 * reflection.h (MonoReflectionMethodBuilder): Added
12229 `MonoArray *generic_params'.
12231 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
12233 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
12234 wrapper for mono_reflection_define_generic_parameter().
12235 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
12237 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
12239 * marshal.h: Add missing function to fix build.
12241 * marshal.c (mono_marshal_get_native_wrapper): Add support for
12242 the SetLastError pinvoke attribute.
12244 * marshal.c (mono_marshal_set_last_error): New helper function called
12245 by the generated code.
12247 * marshal.c (mono_mb_emit_branch): New helper function.
12249 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
12251 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
12252 classes as parameters and return values of delegates. Fixes #29256.
12254 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
12256 * locales.c: use gint32 in non HAVE_ICU case
12258 2003-10-11 Martin Baulig <martin@ximian.com>
12260 * mono-debug.c (mono_debug_add_method): Added a workaround for
12263 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
12265 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
12266 delegates passed to native code must use the STDCALL calling
12267 convention. Fixes #35987.
12269 2003-10-10 Martin Baulig <martin@ximian.com>
12271 * class.c (inflate_generic_type): If we're inflating for a generic
12272 type instance (and not for a generic method), return
12273 MONO_TYPE_MVAR unchanged.
12275 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12277 * string-icalls.c: Join ignores null strings in the source array.
12278 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
12279 * threads.c: GetAvailableTheads is slightly more accurate.
12281 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
12283 * threads.h threads.c : add mono_threads_set_default_stacksize
12284 and pass default to CreateThread calls.
12286 2003-10-09 Dick Porter <dick@ximian.com>
12290 * locales.c: Internal calls for constructing CultureInfo and
12291 related objects from libicu (if its available.)
12293 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
12295 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
12297 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12299 * threadpool.c: added an argument to async_invoke_thread that is the
12300 item to process, pass the MonoAsyncResult to the thread start function
12301 when creating a new thread. This way we don't need to acquire any lock
12302 when we're creating a new thread. Readded a semaphore for faster
12303 response times (instead of that Sleep i added).
12305 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
12307 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
12308 get daylight change dates better on Windows, fix handling
12309 of platforms without tm_gmtoff.
12311 2003-10-06 Martin Baulig <martin@ximian.com>
12313 * class.c (inflate_generic_method): Renamed to
12314 mono_class_inflate_generic_method() and made public.
12315 (mono_class_init): Don't inflate the generic methods here.
12316 (mono_class_from_generic): Added `gboolean inflate_methods'
12317 argument. Inflate the methods here.
12319 * loader.c (mono_method_get_param_names): Ignore instances of
12320 generic types for the moment.
12322 * reflection.c (fixup_method): Added support for inflated methods.
12323 (mono_image_create_token): Use mono_image_get_methodref_token()
12324 for inflated methods.
12325 (mono_custom_attrs_from_param): Ignore instances of generic types
12327 (mono_reflection_bind_generic_parameters): New public function.
12328 Moved all the functionality from
12329 ves_icall_Type_BindGenericParameters() here and added support for
12331 (mono_reflection_define_generic_parameter): Initialize
12332 `klass->methods' here.
12334 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
12335 functionality into mono_reflection_define_generic_parameter().
12336 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
12337 TypeBuilder, return that TypeBuilder.
12339 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12341 * appdomain.c: removed mono_delegate_semaphore.
12344 (mono_thread_pool_add): moved hash table creation inside and the thread
12345 creation outside of the critical region.
12346 (mono_thread_pool_finish): removed obsolete code.
12347 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
12348 continue or exit the thread depending on the queue.
12350 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
12352 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
12353 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
12354 handle more bool marshalling options
12356 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
12358 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
12359 arrays of structs. Also add a more descriptive error message when
12360 a structure member is marshalled as LPArray.
12362 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
12364 * marshal.c (mono_marshal_get_native_wrapper): Add support for
12365 marshalling arrays of complex types. Fixes #29098. Also remove an
12366 usused and incomplete function.
12368 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
12370 * gc.c: report heap_size - free_bytes as total memory allocated
12373 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
12375 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
12376 fix timezone handling problems on Windows.
12378 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
12379 asserts when the year is outside the range handled by ms the functions.
12381 * class.c (setup_interface_offsets): If the class is an interface,
12382 fill out its interface_offsets slot.
12384 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12386 * threadpool.c: mark threadpool threads as background.
12388 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
12390 * decimal.c - define DECINLINE to nothing if not using GCC
12392 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
12394 * assembly.c: More refcount fixes.
12396 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12398 * string-icalls.c: if we're not trimming, return the same string.
12399 When not splitting, don't create a new string.
12401 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12404 (mono_image_open): increment the ref_count inside the critical section.
12406 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
12408 * image.c (mono_image_open): Fix reference counting bug.
12410 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
12412 * marshal.c (mono_marshal_type_size) struct alignment changed for
12413 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
12414 64bits. Avoid leak in mono_marshal_get_native_wrapper when
12415 mono_lookup_pinvoke_call throws.
12417 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
12419 * reflection.c (mono_reflection_parse_type): Fix #49114.
12421 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
12422 temporary workaround for cygwin header problem.
12424 * object.c (mono_object_isinst): Synchronize this with the code
12425 generated by the JIT for casts.
12427 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
12429 * reflection.c (encode_type): Fix #38332.
12431 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
12433 * marshal.c (mono_marshal_method_from_wrapper): New function to return
12434 the original method from the wrapper method.
12436 2003-09-25 Martin Baulig <martin@ximian.com>
12438 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
12439 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
12440 (ves_icall_Type_get_IsGenericInstance): New interncall.
12442 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
12444 * object.c: fix cast warning in big endian code.
12446 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
12448 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
12450 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12452 * assembly.c: don't call check_env from mono_assembly_load. It's
12453 already done once in mono_assemblies_init and may cause headaches when
12454 multiple threads are loading assemblies.
12456 2003-09-19 Martin Baulig <martin@ximian.com>
12458 * reflection.c (mono_reflection_define_generic_parameter): Don't
12459 allocate `klass->methods', set `klass->flags' to
12460 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
12462 2003-09-18 Martin Baulig <martin@ximian.com>
12464 * class.c (mono_class_init): Don't create `class->methods' if it's
12465 already initialized.
12467 * metadata.c (mono_metadata_load_generic_params): Make this
12470 * reflection.c (mono_reflection_define_generic_parameter): Set
12471 parent class and interfaces from the constraints.
12473 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
12474 to keep this struct in sync with the declaration in TypeBuilder.cs.
12476 2003-09-17 Martin Baulig <martin@ximian.com>
12478 * metadata.h (MonoType): Replaced the data's `int type_param'
12479 field with `MonoGenericParam *generic_param'.
12480 (MonoGenericParam): Added `MonoClass *klass'.
12482 * class.c (mono_class_from_gen_param): Removed the
12483 `MonoImage *image' and `int type_num' arguments.
12485 * metadata.c (mono_metadata_parse_generic_param): New static
12486 method; creates a MonoGenericParam which just contains the index.
12487 (do_mono_metadata_parse_type): Call
12488 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
12491 * reflection.c (mono_image_typedef_or_ref): Generic type
12492 parameters may be in the same assembly, but never use a typedef
12494 (mono_reflection_define_generic_parameter): We're now creating a
12495 "real" class for the type parameter; it's now safe to call
12496 mono_class_from_mono_type() on the class'es type, it'll do the
12499 2003-09-16 Martin Baulig <martin@ximian.com>
12501 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
12502 `symfile->range_entry_size' and `symfile->class_entry_size' here;
12503 the `symfile' data structure must be fully initialized before it
12504 gets added to the table.
12506 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
12508 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
12510 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
12511 class init trampolines.
12513 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
12515 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
12516 to the built-in profiler to turn off time and allocation profiling
12519 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
12521 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
12524 * debug-helpers.c (mono_method_full_name): Print the wrapper type
12525 in human readable form.
12527 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
12529 * reflection.c icall.c: Fixed warnings.
12531 * image.c (load_class_names): Use a temporary hash table to hold the
12532 namespaces in order to avoid doing many string comparisons.
12534 * image.h: Fix typo.
12536 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
12537 Pass NULL instead of g_direct_equal to the GHashTable constructor
12538 since the NULL case is short-circuited inside g_hash_table_lookup,
12539 leading to better performance.
12541 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
12542 obtain the first custom attribute for a given index. Depends on the
12543 CustomAttribute table being sorted by the parent field.
12545 * reflection.c (mono_custom_attrs_from_index): Use the new function
12546 for better performance.
12548 2003-09-07 Martin Baulig <martin@ximian.com>
12550 * class.c (mono_class_init): If we're a generic instance, inflate
12551 all our methods instead of loading them from the image.
12552 (mono_class_from_generic): Set `class->methods = gklass->methods'.
12554 2003-09-07 Martin Baulig <martin@ximian.com>
12556 * mono-debug-debugger.c: Added support for constructors.
12558 2003-09-06 Martin Baulig <martin@ximian.com>
12560 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
12563 * reflection.c (mono_reflection_setup_generic_class): Call
12564 ensure_runtime_vtable() to create the vtable.
12566 2003-09-05 Martin Baulig <martin@ximian.com>
12568 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
12571 2003-09-04 Martin Baulig <martin@ximian.com>
12573 * reflection.c (mono_reflection_define_generic_parameter): Generic
12574 parameters start with zero.
12576 2003-09-04 Martin Baulig <martin@ximian.com>
12578 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
12580 * reflection.h (MonoReflectionGenericParam): New typedef.
12581 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
12582 the generic parameters from the managed TypeBuilder.
12584 * reflection.c (mono_reflection_define_generic_parameter): New function.
12585 (mono_reflection_create_runtime_class): Encode generic parameters.
12586 (mono_reflection_setup_generic_class): New function; this is
12587 called after adding adding all generic params to the TypeBuilder.
12588 (encode_type): Added MONO_TYPE_VAR.
12590 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
12592 * class.h class.c (mono_class_needs_cctor_run): Moved this method
12595 * assembly.h assembly.c: Moved the AOT loading code into an assembly
12598 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
12600 * reflection.h reflection.c class.h class.c: Delete duplicate
12601 definition of mono_type_get_name () from reflection.c and export the
12604 * class.c: Class loading fixes from Bernie Solomon
12605 (bernard@ugsolutions.com).
12607 * reflection.c: Endianness fixes from Bernie Solomon
12608 (bernard@ugsolutions.com).
12610 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
12612 * assembly.h assembly.c: Define a file format version for AOT
12615 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
12617 * appdomain.h (MonoJitInfo): New field to determine whenever the
12618 code is domain neutral.
12620 2003-08-31 Miguel de Icaza <miguel@ximian.com>
12622 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
12624 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
12626 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
12627 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
12628 Avoid caching the result since strings must be domain specific. Fixes
12631 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
12633 * marshal.c (mono_marshal_init): Make this callable multiple times
12634 since it is hard to find a correct place to call it.
12636 * object.c (mono_runtime_class_init): Execute static constructors in
12637 the correct appdomain.
12639 * image.c (build_guid_table): Handle the case when multiple images have
12642 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12644 * icall.c: added a couple of icalls for System.Web.
12646 2003-08-28 Martin Baulig <martin@ximian.com>
12648 * icall.c (ves_icall_Type_BindGenericParameters): Use
12649 `klass->generic_inst' instead of `&klass->byval_arg' in the
12650 mono_type_get_object() call. The returned type must be
12651 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
12653 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
12657 * object.c (mono_class_proxy_vtable): Make it thread safe.
12659 * pedump.c: Fix warning.
12661 * object.c appdomain.h: Get rid of metadata_section.
12662 It is no longer needed and it was causing deadlocks with domain->lock.
12664 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
12666 2003-08-26 Martin Baulig <martin@ximian.com>
12668 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
12670 2003-08-26 Martin Baulig <martin@ximian.com>
12672 * pedump.c (main): Call mono_metadata_init(),
12673 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
12674 and mono_loader_init().
12676 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
12678 * loader.h: Add missing include to fix build.
12680 * image.h: mono_image_load_references is no more.
12682 * assembly.c: Reworked assembly loading to make it really thread safe.
12683 After these changes, the assembly returned by mono_assembly_open is
12684 fully initialized, i.e. all its references assemblies are loaded.
12686 * assembly.c (mono_image_load_references): Renamed to
12687 mono_assembly_load_references, and made private, since clients no
12688 longer need to call it.
12690 * class.c: Removed calls to mono_assembly_load_references, since it was
12691 a source of deadlocks.
12693 * loader.h loader.c class.h class.c: Protect data structures using a
12694 new lock, the loader lock.
12696 * class.c (mono_class_setup_vtable): Create temporary hash tables and
12697 GPtrArrays only when needed.
12699 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
12700 into empty structures by mcs. Fixes pinvoke7.cs.
12702 * domain.c (mono_init): Call a new initialization function.
12704 * appdomain.c (mono_runtime_init): Call the new initializer function
12705 of the marshal module.
12707 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
12708 inserted into empty structures by mcs. Fixes pinvoke7.cs.
12710 * marshal.h marshal.c: Added locks around the wrapper caches to make
12711 this module thread safe.
12713 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
12714 this argument. Fixes pinvoke1.exe.
12716 2003-08-25 Lluis Sanchez <lluis@ximian.com>
12718 * object.h: Added call_type field to MonoMethodMessage and the corresponding
12719 enumeration of values. Removed fields to store remote call output values in
12720 MonoAsyncResult. Not needed any more.
12721 * object.c: Initialize call_type and async_result fields in mono_message_init.
12722 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
12723 dispatching the message.
12724 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
12725 async call to finish. To do it use a message with EndInvoke call type.
12727 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
12729 * loader.h loader.c (mono_method_hash_marhal_info): New function which
12730 determines whenever a method has marshalling info.
12732 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12734 * assembly.c: fix the build on windows.
12736 2003-08-22 Lluis Sanchez <lluis@ximian.com>
12738 * object.cs: Fixed bug #47785.
12740 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
12742 * string-icalls.c (StringReplace): If their are no occurances of
12743 the old string found return a reference to the supplied
12744 string. This saves some memory and matches MS behavoir.
12746 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12748 * socket-io.c: fixed compilation for systems that define AF_INET6
12749 and don't define SOL_IP/SOL_IPV6.
12751 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
12753 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
12754 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
12756 * rawbuffer.c rawbuffer.h: Make this module thread safe.
12758 * domain.c: Make this module thread safe.
12760 * domain.c (mono_init): Call new initialization function.
12762 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
12763 reference types too. Fixes #38812.
12765 * image.c (mono_image_init): Fixed warnings.
12767 * class.c (mono_class_from_typeref): Handle assembly load failure
12770 * appdomain.c (add_assemblies_to_domain): Handle the case when
12771 the references of an assembly are not yet loaded.
12773 * metadata.c image.c assembly.c: Moved initialization of global
12774 variables to a separate function called at startup since lazy
12775 initialization of these variables is not thread safe.
12777 * image.c assembly.c: Made this module thread safe by adding locks in
12778 the appropriate places.
12780 * domain.c (mono_init): Call the new initialization functions of the
12783 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
12785 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
12786 make a direct call. It is proxy's work to make the call asynchronous.
12787 mono_delegate_end_invoke(): If the targe is a proxy, just collect
12789 * object.cs: mono_method_call_message_new(): read AsyncResult and
12790 state object from parameters list, if this info is requested.
12791 * object.h: Added fields to store remote call output values in
12792 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
12794 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
12796 * object.h: add needed fields to MonoThread.
12797 * threads.c, threads.h: allow registering a function to cleanup data
12798 allocated per thread by the JIT.
12800 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12802 * loader.h: portability fix by Bernie Solomon
12803 * <bernard@ugsolutions.com>.
12805 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
12807 * reflection.h reflection.c (mono_param_get_objects): Changed this to
12808 return a MonoArray. This simplifies the code and also ensures that
12809 the cache allways contains an object reference as a value.
12811 * icall.c (ves_icall_get_parameter_info): Simplified using the new
12814 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12816 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
12817 fixes a problem with byte ordering when getting the address family for
12820 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
12822 * .cvsignore: Added monosn.
12824 * reflection.h reflection.c loader.c: Added support for parameter
12825 marshalling to dynamically created types. Fixes #47295.
12827 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
12829 * rand.c: remove useless warnings.
12831 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
12833 * class.c: implemented ldtoken for methods and fieldrefs.
12835 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12837 * threadpool.c: when mono_async_invoke was called, no one took care of
12838 monitoring the queue. So if the method invoked took some time and we
12839 got new async invoke requests after 500 ms (the thread created waited
12840 that long in WaitForSingleObject), the new async invoke was not called
12841 until the previous one finished.
12843 This is fixed now. Thanks to Totte for helping with it.
12845 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12847 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
12849 2003-08-11 Martin Baulig <martin@ximian.com>
12851 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
12853 2003-08-06 Martin Baulig <martin@ximian.com>
12855 * mono-debug-debugger.c: Added support for static fields,
12856 properties and methods.
12858 2003-08-06 Martin Baulig <martin@ximian.com>
12860 * mono-debug-debugger.c: Don't store the MonoString's vtable to
12861 make this work for applications with multiple application domains.
12863 2003-08-04 Martin Baulig <martin@ximian.com>
12865 * mono-debug-debugger.c: Completely reworked the type support; the
12866 most important thing is that we're now just using one single
12867 `MonoType' instance per type.
12869 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
12871 * mono-endian.h, mono-endian.c, icall.c: Added icall
12872 ves_icall_System_Double_AssertEndianity to assert double word endianity
12873 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
12875 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12877 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
12878 support, icalls and fixes.
12880 2003-07-31 Miguel de Icaza <miguel@ximian.com>
12882 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
12883 classes that are a punctuation character in .NET is not the same a
12886 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
12888 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
12890 2003-07-29 Miguel de Icaza <miguel@ximian.com>
12892 * icall.c: Add new MemCopy internalcall.
12893 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
12894 Simplified code; It is not necessary to handle all the cases here,
12895 as the C# code takes care of it. Only handle the case of the name
12896 resource embedded into the assembly.
12898 Changed signature to return the data pointer and the size of the
12901 2003-07-26 Miguel de Icaza <miguel@ximian.com>
12903 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
12904 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
12906 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
12908 * socket-io.c: ignore EINTR error in select.
12910 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
12912 * class.h, class.c: removed unused subclasses field in MonoClass.
12914 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
12916 * icall.c: improve fix of get_base_definition(). If the parent class
12917 doesn't have the mehod, look at the parent of the parent.
12918 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
12919 to check if a parameter is an in or out parameter
12920 (PARAM_ATTRIBUTE_IN is not set by default).
12921 mono_method_return_message_restore(): Use mono_class_value_size to
12922 get the size of a value type. mono_type_stack_size (parameterType)
12923 does not return the correct value if parameterType is byRef.
12924 mono_load_remote_field(), mono_load_remote_field_new(),
12925 mono_store_remote_field(), mono_store_remote_field_new():
12926 raise exception if the remote call returns an exception.
12928 2003-07-28 Martin Baulig <martin@ximian.com>
12930 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
12931 method. This is a wrapper around mono_runtime_invoke() which
12932 boxes the instance object if neccessary.
12934 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
12936 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
12937 metadata.h, row-indexes.h, verify.c: first cut of generics support.
12939 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
12941 * icall.c: disable mcs bug workaround.
12943 2003-07-21 Miguel de Icaza <miguel@ximian.com>
12945 * object.c (mono_runtime_class_init): Take the metadata_section
12946 mutex before obtaining the domain mutex.
12948 * appdomain.h: Added definition of metadata_section mutex here.
12950 * object.c: define metadata_mutex here.
12952 2003-07-24 Ravi Pratap <ravi@ximian.com>
12954 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
12957 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
12959 * reflection.c: Fix bug #46669
12961 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12966 * object.h: fill in the type name for TypeLoadException.
12968 2003-07-23 Ravi Pratap <ravi@ximian.com>
12970 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
12971 relationship between TypeBuilders while compiling corlib) and bug
12972 45993 (Array types returned from the runtime while compiling
12973 corlib were from the loaded corlib).
12975 2003-07-22 Martin Baulig <martin@ximian.com>
12977 * mono-debug-debugger.c: Reworked the type support a bit more;
12978 distinguish between types and classes.
12980 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
12982 * icall.c: add IsArrayImpl icall.
12984 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
12986 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
12987 initializing real_size only once. Also fix bug #46602.
12989 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
12991 * object.c: Renamed mono_metadata_section to metadata_section.
12993 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
12995 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
12996 empty array if the type is an array. Fixed.
12997 ves_icall_MonoMethod_get_base_definition: if the base method
12998 is abstract, get the MethodInfo from the list of methods of
13000 * reflection.c: ParameterInfo.PositionImpl should be zero-based
13001 and it was 1-based. Fixed in mono_param_get_objects.
13003 2003-07-20 Martin Baulig <martin@ximian.com>
13005 * mono-debug.h: Set version number to 31.
13006 (mono_debug_init): Added `MonoDomain *' argument.
13008 * mono-debug-debugger.c: Reworked the type support; explicitly
13009 tell the debugger about builtin types; pass the `klass' address to
13012 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
13014 * image.c: Allow new metadata tables to be loaded without a
13015 warning. Also update the warning message to give the new constant value.
13017 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
13019 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
13020 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
13021 array type representation changes.
13023 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13025 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
13026 on Environment.Exit () call.
13028 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
13030 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
13031 requires a matching corlib.
13033 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
13035 * Changelog: My editor decided to add a CR to each line. Sorry about that.
13036 Committed again without the CRs.
13038 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
13040 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
13041 getting it from the "this" socket instance. Did not work
13042 if the socket is a subclass of Socket.
13043 Also fixed bug #35371.
13045 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13047 * metadata.c: fixed size for TypedByRef.
13048 * loader.c: when searching for a method, consider the vararg amrker.
13049 * unicode.c, decimal.c: constify some arrays.
13051 2003-07-15 Dick Porter <dick@ximian.com>
13053 * socket-io.c: Fixed compilation for gcc < 3.2.
13055 Fixed compilation for machines that don't have AF_INET6 (thanks to
13056 Bernie Solomon <bernard@ugsolutions.com> for that part.)
13058 Fixed compile warnings.
13060 Fixed formatting and line endings.
13062 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
13065 * socket-io.c: Added IPv6 support.
13067 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
13069 * class.c (mono_class_is_assignable_from): New function to implement
13070 the is_assignable_from logic. Used by mono_object_isinst,
13071 Type::IsAssignableFrom () and the interpreter.
13073 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
13074 Object, even interfaces.
13076 * object.c (mono_object_isinst): Implement in terms of
13077 is_assignable_from.
13079 * icall.c (ves_icall_type_is_assignable_from): New icall.
13081 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
13083 * domain.c (foreach_domain): fix compiler warning.
13085 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
13087 * image.c (load_metadata_ptrs): use g_strndup because strndup is
13088 not available on all plattforms
13090 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
13092 * image.h image.c: Store the metadata version string in MonoImage.
13093 * icall.c: New icall to retrieve the image version.
13094 * reflection.c (create_dynamic_image): Fill in the image version field
13095 * reflection.c (build_compressed_metadata): Use the image version
13096 from the image structure.
13098 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13100 * appdomain.c: modified comment.
13101 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
13102 That will be its last iteration when mono_gc_cleanup is called from
13103 mono_runtime_cleanup and before the domain is unloaded.
13107 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
13109 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
13112 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13114 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
13115 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
13116 Bernie Solomon <bernard@ugsolutions.com>.
13118 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13120 * object.c, object.h: provide mono_object_new_fast() for faster
13121 allocation in some special cases.
13123 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13125 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
13126 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
13128 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
13130 * threadpool.c: fix leaks.
13132 2003-07-01 Dick Porter <dick@ximian.com>
13134 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
13135 using MonoGHashTables. Fixes threadpool bug posted to list.
13137 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
13139 * image.h, image.c: added support to load an assembly from a byte array.
13140 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
13141 assembly bundle support.
13143 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
13145 * threadpool.c (mono_thread_pool_add): keep a reference to the
13146 AsyncResult to prevent GC
13148 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13150 * class.c: leak fix.
13152 2003-06-25 Dick Porter <dick@ximian.com>
13154 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
13155 for the async object, the WaitHandle object will close the handle.
13158 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13160 * class.c: in mono_array_class_get (), lookup from the hash with the
13161 same type we insert: this works around a bug in
13162 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
13163 lluis. The real fix will have to wait for after the release.
13165 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13167 * icall.c: fix memory leak when getting type members.
13169 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13171 * reflection.c: added more pubtoken special cases.
13173 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
13175 * class.c: handle field offset correctly when class size
13176 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
13178 2003-06-20 Martin Baulig <martin@ximian.com>
13180 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
13183 2003-06-20 Martin Baulig <martin@ximian.com>
13185 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
13187 2003-06-20 Martin Baulig <martin@ximian.com>
13189 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
13190 just distinguish between variables in registers and variables at
13191 an offset relative to a register.
13193 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13195 * icall.c: #ifdef out latest changes until mcs is fixed.
13197 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13199 * icall.c: return members in metadata order.
13201 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
13203 * icall.c: avoid infinite loop in GetTimeZoneData.
13205 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
13207 * icall.c: added Marshal.Prelink/All icalls.
13209 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
13211 * object.c, object.h: fix warnings and do some overflow checking
13212 when creating arrays.
13214 2003-06-17 Dick Porter <dick@ximian.com>
13217 * file-io.c: File attributes need to be tweaked slightly when
13218 passed from the managed to the w32 world.
13220 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
13221 * profiler.h profiler-private.h profiler.c: Rework last patch
13222 based on suggestion by Paolo.
13224 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
13226 * profiler.h profiler-private.h profiler.c: Added infrastructure for
13227 instruction level coverage data collection.
13228 * profiler.h profiler.c (: Added new callback function which can be
13229 used by the profiler to limit which functions should have coverage
13231 * profiler.c (mono_profiler_load): Call g_module_build_path to
13232 generate the file name of the profiler library.
13234 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
13236 * profiler.c, profiler.h, profiler-private.h: added basic block
13237 coverage profiling API.
13239 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
13241 * reflection.c (mono_reflection_create_runtime_class): Add support
13242 for events in dynamically generated code.
13244 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
13247 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
13249 * icall.c: when getting timezone info, return reasonable values if we
13250 can't get the actual data.
13252 2003-06-14 Dick Porter <dick@ximian.com>
13254 * threads.c (start_wrapper): Remove the reference to the thread
13255 object in the TLS data, so the thread object can be finalized.
13256 This won't be reached if the thread threw an uncaught exception,
13257 so those thread handles will stay referenced :-( (This is due to
13258 missing support for scanning thread-specific data in the Boehm GC
13259 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
13261 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
13263 * reflection.c: ensure streams and tables are first allocated with
13264 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
13266 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13268 * icall.c: fixed GetElementType for byrefs (bug# 44792).
13270 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
13272 * reflection.c (mono_reflection_create_runtime_class): Add support for
13273 properties to dynamically created classes.
13274 * reflection.c: Fix a few places where non-MonoObjects were inserted
13275 into the tokens hashtable.
13277 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13279 * object.c: some support to handle out of memory exceptions.
13281 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
13283 * marshal.c (mono_marshal_get_native_wrapper): support reference
13286 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13288 * object.h, object.c: more portability stuff from Bernie Solomon.
13289 Unexport mono_object_allocate(). Added mono_object_unbox ().
13290 Set exitcode when an unhandled exception is thrown.
13292 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
13294 * marshal.c (mono_marshal_get_native_wrapper): use custom
13295 marshaler for return types.
13297 2003-06-10 Dick Porter <dick@ximian.com>
13299 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
13300 ip_mreq is available
13302 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
13304 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
13305 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
13306 by Bernie Solomon <bernard@ugsolutions.com>.
13308 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
13310 * gc.c (mono_gc_init): Avoid error message on shutdown when
13311 GC_DONT_GC=1 is used.
13313 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
13314 New icall to return the GUID of a module.
13316 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
13318 * class.c: ensure instance size always includes the parent's size
13319 even whem class size is set explicitly (fixes bug#44294).
13321 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13323 * profiler.h, profiler.c: made the simple profiler thread-safe,
13324 get more accurate timing info. Allow the loading of an
13325 externally-developed profiler module.
13327 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
13329 * marshal.c (mono_marshal_get_native_wrapper): improved
13330 class/byref arguments.
13331 (mono_marshal_get_native_wrapper): better string marshaling support.
13333 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13335 * class.c: ensure .pack and .size are handled correctly and
13336 simplified layout of static fields.
13338 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
13341 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
13343 * loader.c (mono_lookup_pinvoke_call): look for modules in the
13344 current directory (fix bug 44008)
13346 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
13348 * marshal.c (mono_marshal_get_native_wrapper): started support for
13350 (mono_delegate_to_ftnptr): consider marshalling specifications
13352 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13354 * reflection.c, reflection.h: emit custom marshal info.
13356 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13358 * object.c: free the GError.
13359 * icall.c: added CloseEvent_internal.
13361 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
13364 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
13366 * loader.c (mono_method_get_signature): Add support for dynamic
13369 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13371 * reflection.c: fixed bug #43905.
13373 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
13375 * class.c, domain.c, icall.c, metadata.h, object.h: support for
13376 handling TypedReference and ArgIterator.
13377 * loader.c, loader.h: added function to get signature at call site.
13379 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13381 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
13382 data readonly. Buglets and warning fixes. Some MethodSpec support.
13384 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13386 * class.h, class.c, object.c: remove relative numbering support.
13388 2003-05-26 Miguel de Icaza <miguel@ximian.com>
13390 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
13391 free the string, until we get a chance to fix Gtk#
13393 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13395 * marshal.c: revert last patch.
13397 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
13399 * icall.c: updates for new mono_class_vtable() not calling
13400 the type constructor anymore.
13402 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13404 * object.h, object.c: separate vtable creation from type
13405 initialization. Make running the .cctor thread safe.
13407 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
13409 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
13411 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
13413 * loader.c (mono_get_method): consider calling convention
13415 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
13417 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
13418 to return the invisible global type for a module.
13420 * reflection.c (mono_image_build_metadata): Emit global fields too.
13422 2003-05-20 Peter Williams <peterw@ximian.com>
13424 * loader.c (mono_lookup_internal_call): Add a few newlines.
13426 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
13428 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
13431 * appdomain.c (set_domain_search_path): Recalculate search path when
13432 AppDomainSetup.PrivateBinPath changes.
13434 * object.c (mono_class_compute_gc_descriptor): It turns out some
13435 parts of the class libs (like System.Thread) holds pointers to
13436 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
13437 to treat native int a pointer type here.
13439 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
13441 * appdomain.h, domain.c: add hashtable for jump target resolution.
13443 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
13445 * reflection.h reflection.c icall.c: Added new icalls
13446 GetManifestResourceInfoInternal, GetModulesInternal and support
13449 2003-05-16 Dick Porter <dick@ximian.com>
13453 * file-io.c: Implement System.IO.MonoIO::GetTempPath
13455 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
13457 * object.c: mono_store_remote_field: little fix to previous patch.
13459 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
13461 * class.c: add constructors to array classes.
13462 * icall.c: special case array construction for InternalInvoke (),
13464 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
13466 * class.h class.c reflection.c object.c: Added support for field
13467 defaults in dynamically generated classes.
13469 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13471 * reflection.c: properly encode charset for ddlimport.
13473 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
13475 * threads.c: allow compiling without GC.
13477 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
13479 * appdomain.h, object.c, object.h, threads.c, threads.h: added
13480 handling of thread static data.
13482 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13484 * reflection.h, reflection.c: added mono_custom_attrs_free ().
13486 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
13488 * class.c (mono_array_class_get): always set the serializable flags
13489 (mono_array_class_get): always set the SEALED attribute for array types
13491 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
13493 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
13494 attributes (fix for bug 42021).
13496 2003-05-12 Dick Porter <dick@ximian.com>
13498 * gc.c: Don't run finalizers when the finalizer thread is
13499 finishing up, because the default domain has already been
13502 2003-05-11 Miguel de Icaza <miguel@ximian.com>
13504 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
13505 value is null, we should throw an exception. This is slightly
13506 different than the other conventions used for the constructor.
13508 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13510 * socket-io.c: fixed windows build.
13512 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13514 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
13516 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
13518 * object.c (mono_string_new_wrapper): Compatibility fix for MS
13521 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
13523 * class.c (mono_class_layout_fields): Add experimental GC aware
13524 auto layout facility. Requires class library changes to work correctly.
13526 (mono_class_setup_vtable): Avoid overriding explicit interface
13527 method implementations. Fixes iface3.exe test.
13529 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
13531 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
13532 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
13534 * metadata.h: Add new type classification macro which determines
13535 whenever the type holds an object reference.
13537 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
13539 * marshal.c (mono_marshal_get_native_wrapper): cleanups
13541 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
13543 * gc.c (finalizer_thread): Work around a GC bug.
13545 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
13547 * marshal.c (emit_struct_conv): allow unions
13549 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
13551 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
13553 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
13555 2003-05-06 Martin Baulig <martin@ximian.com>
13557 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
13559 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13562 (Select_internal): allow NULLs, don't create arrays if not needed.
13563 Coupled with Socket.cs changes.
13566 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
13567 register a finalizer for it that will close the semaphore handle. This
13568 fixes the leak and make Lupus' test run with > 4080 loops.
13570 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
13572 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
13573 Jerome Laban (bug #42287)
13575 2003-05-02 Martin Baulig <martin@ximian.com>
13577 * debug-mono-symfile.h
13578 (MonoSymbolFile): Moved declaration into mono-debug.h.
13579 (MonoDebugMethodJitInfo): Likewise.
13580 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
13582 (_mono_debug_address_from_il_offset): Take a
13583 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
13586 (MonoDebugDomainData): New struct.
13587 (mono_debug_get_domain_data): New function.
13588 (mono_debug_add_method): Take an additional `MonoDomain *'
13590 (mono_debug_source_location_from_address): Likewise.
13591 (mono_debug_il_offset_from_address): Likewise.
13592 (mono_debug_address_from_il_offset): Likewise.
13594 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
13596 * reflection.c: one more check for null type in custom attrs.
13598 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13600 * reflection.c: avoid warning (comparison is always false due to limited
13601 range of data type).
13603 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13605 * icall.c: throw an exception in Type.GetField if the argument 'name'
13608 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
13610 * reflection.c: fixed handling of enums in named arguments to custom
13611 attributes (bug #42123).
13613 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13615 * reflection.c: use the right array element type and handle
13616 a null for a Type argument, too.
13618 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
13620 * reflection.c: handle arrays as arguments to custom attributes.
13622 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
13624 * reflection.c: handle a string value in a custom attr
13625 ctor that takes an object.
13627 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
13629 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
13632 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
13634 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
13636 2003-04-27 Martin Baulig <martin@ximian.com>
13638 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
13639 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
13640 MONO_DEBUGGER_EVENT_BREAKPOINT.
13641 (mono_breakpoint_trampoline_code): Removed.
13642 (mono_debugger_event_handler): The last argument is now a
13644 (mono_debugger_insert_breakpoint_full): Removed the
13645 `use_trampoline' argument.
13646 (mono_debugger_method_has_breakpoint): Likewise.
13647 (mono_debugger_trampoline_breakpoint_callback): Renamed to
13648 mono_debugger_breakpoint_callback(); take the method and
13649 breakpoint number as arguments.
13651 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13653 * metadata.c: fix off by one when loading parameters attributes.
13655 2003-04-24 Martin Baulig <martin@ximian.com>
13657 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
13659 2003-04-24 Martin Baulig <martin@ximian.com>
13661 * mono-debug-debugger.c: Moved all code which interacts with the
13662 Mono Debugger here.
13664 * debug-mono-symfile.c: This code now just deals with the symbol
13665 file itself, the debugger code is now in mono-debug-debugger.c.
13667 2003-04-23 Martin Baulig <martin@ximian.com>
13669 * mono-debug.c (mono_debug_source_location_from_il_offset):
13670 New method; like mono_debug_source_location_from_address(), but
13671 takes an IL offset instead of a machine address.
13673 2003-04-23 Martin Baulig <martin@ximian.com>
13675 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
13676 `line' field; this is now computed by the debugger.
13678 2003-04-23 Martin Baulig <martin@ximian.com>
13680 * mono-debug.[ch]: New files. This is the new debugging interface.
13682 * mono-debug-debugger.[ch]: New files. Moved all code which
13683 interacts with the Mono Debugger here.
13685 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
13687 * domain.c (mono_init): initialize mono_defaults.monitor_class
13689 2003-04-21 Miguel de Icaza <miguel@ximian.com>
13691 * reflection.c (method_encode_code): Add a spicy exception to help
13692 future compiler authors.
13694 2003-04-21 Martin Baulig <martin@ximian.com>
13697 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
13698 Make this work with relative pathnames; g_filename_to_uri() needs
13699 an absolute filename.
13701 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
13703 * icall.c: Track name changes in Object and ValueType.
13705 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
13707 * metadata.c (mono_type_stack_size): size should be a multiple of
13710 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13713 (internal_domain_finalize): moved into mono_domain_finalize. No need
13714 to create another thread because the finalizers will be run in the
13717 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
13718 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
13719 to be run (MS does this too).
13721 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
13723 * object.c (mono_class_compute_gc_descriptor): Update comment.
13725 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
13727 * image.h: Add synchronized wrapper cache.
13729 * image.c (do_mono_image_open): Initialize cache.
13731 * reflection.c (create_dynamic_mono_image): Initialize cache.
13733 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13735 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
13736 ves_icall_System_Buffer_ByteLengthInternal.
13738 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13740 * reflection.c: setup klass->nested_in earlier. Allow
13741 a dash in the assembly name.
13743 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
13745 * metadata.c (mono_type_to_unmanaged): dont access
13746 type->data.klass for MONO_TYPE_OBJECT
13747 (mono_type_to_unmanaged): consider System.Delegate class
13749 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
13751 * class.c: just setup supertypes in the proper place instead of
13752 initializing the full element class for arrays.
13754 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13756 * class.c: ensure the element class of arrays is initialized.
13757 Setup the supertype info for array classes, too.
13759 2003-04-14 Miguel de Icaza <miguel@ximian.com>
13761 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
13763 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13765 * Makefile.am: re-added -m option when running cygpath. This way,
13766 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
13768 * mono-config.c: same codepath for locating mono config file for WIN32
13770 * assembly.c: if mono_assembly_setrootdir is called, don't override
13773 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13775 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
13776 MONO_ASSEMBLIES variable.
13778 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
13780 * icall.c: added Assembly::GetNamespaces() icall.
13782 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13784 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
13786 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
13788 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
13789 * object.c: fixed bug in the construction of vtable for proxies
13791 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
13793 * object.c (mono_array_new): Mark mono_array_new as an icall.
13795 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13797 * class.c: fixed test for public method when overriding interfaces.
13800 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13802 * appdomain.h, domain.c: added mono_domain_foreach() to
13803 be able to access the currently loaded appdomains.
13804 * object.c: make string interning work across sppdomains.
13805 Mark some functions for use as icalls.
13807 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
13809 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
13811 * reflection.h reflection.c: Allocate long living data using
13812 GC_MALLOC_ATOMIC so the collector does not need to scan it.
13814 * reflection.c: Double the allocation size in streams instead of
13815 increasing it, to prevent unneccesary copying on large assemblies.
13817 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
13818 creation if the assembly does not have the Run flag set.
13820 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13822 * class.h: avoid the C++ keywords in header files (Jerome Laban
13823 spotted and fixed this).
13825 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13828 (mono_unhandled_exception): fill in the arguments for the
13829 UnhandledException event. Only trigger that event for the default
13830 domain (as MS does).
13832 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
13834 * object.c: Improve typed allocation stuff based on suggestions from
13835 Paolo. Also turn it on if the GC library supports it.
13837 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
13839 * object.c object.h class.h: Added experimental typed allocation
13840 facility using the interfaces in gc_gcj.h.
13842 * os/gc_wrapper.h: Added new include files.
13844 2003-04-03 Martin Baulig <martin@ximian.com>
13846 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
13847 which is not yet enabled by default.
13849 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
13851 (mono_gc_lock, mono_gc_unlock): New static functions.
13853 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
13854 functions; stop/start the world for the garbage collector. This
13855 is using the windows API; we need to complete the SuspendThread()/
13856 ResumeThread() implementation in the io-layer to make this work on Unix.
13857 (mono_gc_push_all_stacks): New public function; tells the garbage
13858 collector about the stack pointers from all managed threads.
13860 2003-04-03 Martin Baulig <martin@ximian.com>
13862 * object.h (MonoThread): Added `gpointer stack_ptr'.
13864 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
13866 2003-04-03 Martin Baulig <martin@ximian.com>
13868 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
13870 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
13872 * reflection.c (typebuilder_setup_fields): Initialize field.first and
13875 2003-04-02 Miguel de Icaza <miguel@ximian.com>
13877 * loader.c (mono_lookup_internal_call): Report the corlib that is
13880 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
13882 * icall.c (ves_icall_type_GetTypeCode): fixed check for
13883 System.DBNull (it's class not valuetype).
13885 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13887 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
13888 if the array method was already assigned a token (fixes bug#40646).
13890 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
13892 * reflection.c (mono_reflection_get_type): Attempt type resolve even
13893 if no assembly is given.
13895 2003-04-01 Miguel de Icaza <miguel@ximian.com>
13897 * metadata.h: Added the new tables.
13899 * row-indexes.h: Added definitions for new tables.
13901 * metadata.c: Add schemas for new tables, and add support for
13902 computing the sizes of them.
13904 * class.c: Update for handling the new type cases.
13906 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
13908 * metadata.h (MONO_TYPE_IS_VOID): new macro
13910 2003-03-31 Martin Baulig <martin@ximian.com>
13912 * threads.h (MonoThreadCallbacks): Added `thread_created'.
13914 * threads.c (mono_thread_new_init): Call `thread_created' in the
13915 mono_thread_callbacks.
13917 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
13919 * loader.h: added marshalbyrefobject_class to mono_defaults
13920 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
13921 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
13922 generation of output parameters.
13923 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
13924 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
13925 contextbound and the target object belongs to the context of the caller.
13926 * object.h: added context and unwrapped_server variables in MonoRealProxy.
13927 * object.c: Implemented support for interfaces and abstract classes
13928 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
13929 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
13931 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
13933 * class.h class.c (mono_class_is_subclass_of): New function.
13935 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
13936 routines for most common case (calls from ArrayList::ToArray).
13938 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
13939 routine so programs which call Environment::Exit() can be profiled.
13941 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
13942 Added MONO_ARCH_SAVE_REGS.
13944 * icall.c (ves_icall_type_is_subtype_of): Use new function.
13946 2003-03-29 Miguel de Icaza <miguel@ximian.com>
13948 * blob.h: Add a couple of new MonoType types definitions.
13950 * tabledefs.h: Add a couple of new call convs.
13952 2003-03-27 Zoltan Varga <vargaz@freemail.h>
13954 * reflection.h (MonoReflectionDynamicAssembly): track changes in
13955 the layout of the class.
13957 * reflection.c (alloc_table): double the size on overflow to avoid
13958 unnecessary copying.
13960 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
13961 avoid filling out metadata tables and blobs. Also set mb->ilgen to
13962 null so it can be garbage collected.
13964 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
13966 * reflection.c (mono_reflection_get_type): Return the resolved type
13967 only if it is in the assembly we searched.
13969 * reflection.c (ensure_runtime_vtable): Initialize method slots.
13971 * class.c (mono_class_setup_vtable): Set the slot of the overriding
13974 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13977 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
13978 the right one is 'file:///blah', but MS allows it.
13980 (mono_assembly_open): allow 'file://blah'
13982 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
13984 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
13986 * socket-io.c: fixes bug #40310.
13988 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
13990 * reflection.c (mono_reflection_parse_type): handle deeply nested
13993 * reflection.c (mono_image_create_token): Use unique token values
13994 since they will be put into a hash table.
13996 * class.c (mono_class_setup_vtable): If a method occurs in more than
13997 one place in the vtable, and it gets overriden, then change the
13998 other occurances too.
14000 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
14001 object as return type.
14003 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14005 * icall.c: Deleted "ToString" implementation for double and float
14006 because they are full implemented in managed code.
14008 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14010 * reflection.c, reflection.h: implemented and exported functions
14011 to retrieve info about custom attributes.
14013 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14015 * appdomain.c: moved Uri handling to assembly.c
14016 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
14017 work when using a file Uri in *nix and windows.
14019 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
14020 GetReferencedAssemblies.
14022 2003-03-18 Dick Porter <dick@ximian.com>
14024 * icall.c: Rename a couple of internal calls
14026 * threads.c: Set the thread state to Stopped when a thread exits.
14029 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
14031 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
14034 * object.c (mono_class_vtable): fix warning.
14036 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
14038 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
14040 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
14042 (method_encode_clauses): Create exception info structures in the right
14044 (mono_reflection_setup_internal_class): Initialize supertypes field.
14046 * class.c object.c: Handle interfaces which implement other interfaces
14049 * class.h class.c: Move the supertypes array initialization code into
14050 a separate function so it can be used for dynamic types too. Also call
14051 it earlier, in mono_class_init(), since it can be used before the
14052 type is initialized.
14054 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14058 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
14063 * object.c: remove warnings.
14065 2003-03-13 Martin Baulig <martin@ximian.com>
14067 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
14068 (MonoDebugLexicalBlockEntry): New types.
14070 * debug-mono-symfile.c
14071 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
14073 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14075 * process.c: ret can be any non-zero value accroding to MS doc.
14077 2003-03-07 Miguel de Icaza <miguel@ximian.com>
14079 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
14080 fixing a warning for a miss-used prototype, would have cause
14081 random memory corruption.
14083 2003-03-07 Martin Baulig <martin@ximian.com>
14085 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
14086 getting really annoying ....
14088 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
14090 * reflection.c (fixup_method): added support for array methods.
14092 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14094 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
14095 (pointed out by Michael Adams).
14097 2003-03-04 Dick Porter <dick@ximian.com>
14099 * icall.c: Temporarily reverted the Double and Single ToString()
14100 change, because it broke nunit.
14102 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
14104 * object.h, threads.h: make include files compatible with C++
14105 (patch by Jerome Laban <jlaban@wanadoo.fr>).
14107 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14109 * icall.c: Erased ToString helper functions for Double and Single.
14110 Now, that implementations ar all in managed code (Double and Single
14113 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
14115 * appdomain.c: Added method for initializing the default context of
14116 a domain. Added internal call for getting the default context.
14117 * appdomain.h: Added context variable in MonoDomain struct.
14118 * domain.c: mono_domain_set also sets the default context of the domain
14119 * icall.c: Mapped internal method InternalGetDefaultContext.
14120 * object.c: mono_object_get_virtual_method returns always a remoting
14121 wrapper if the object is a transparent proxy.
14122 mono_runtime_invoke_array: when creating an object by calling the
14123 constructor, if the created object is a proxy, then the constructor should
14124 be called using the a remoting wrapper.
14126 2003-03-03 Dick Porter <dick@ximian.com>
14128 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
14129 variable so it compiles on solaris. Problem spotted by
14130 Christopher Taylor <ct@cs.clemson.edu>
14132 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14135 (get_info_from_assembly_name): don't leak value.
14138 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
14141 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14143 * assembly.c: export mono_image_load_references ().
14144 * class.c: handle function pointers. mono_class_from_name() now
14145 supports nested type names directly.
14147 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
14149 * reflection.h reflection.c: Encode already created dynamic methods
14150 and fields correctly as a DEF instead of a REF.
14152 * reflection.c: Get rid of the force_ref argument to
14153 mono_image_typedef_or_ref since it was wrong in the first place.
14155 * string-icalls.c: add error checking to string constructors according
14158 * reflection.c: Emit types in the order their TypeBuilders were
14159 created. Previously, a new table index was assigned to each type before
14160 the tables were emitted. This was wrong because the signature blob
14161 might already refer to a type by its original table index.
14163 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
14165 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
14168 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14170 * Makefile.am: make assemblies dir have \ instead of / on windows.
14172 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
14174 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
14175 iterate over the NESTEDCLASS table using a linear search since the
14176 table is not guaranteed to be sorted by the secondary key.
14178 * class.c (mono_class_create_from_typedef): fixed up call to
14179 mono_metadata_nesting_typedef.
14181 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
14183 * marshal.c (mono_string_to_byvalstr): clear the memory as
14184 suggested by Jerome Laban <jlaban@wanadoo.fr>
14186 2003-02-26 Dick Porter <dick@ximian.com>
14188 * process.c: Cope with padding in .rsrc blocks
14190 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
14192 * metadata.h: reverted the filter_len change, it breaks reflection
14194 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
14196 * metadata.h: added a new field to store the filter_len
14199 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14201 * reflection.c: handle custom attributes for types and members
14202 created with Reflection.Emit (bug#38422).
14204 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
14206 * reflection.c: define RTSpecialName automatically for constructors for
14207 compatibility with MS.NET.
14209 * reflection.c (mono_reflection_create_runtime_class): initialize
14210 nested_in field of dynamically created classes.
14212 2003-02-22 Martin Baulig <martin@ximian.com>
14214 * debug-mono-symfile.h: Incremented version number.
14216 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
14218 * object.h icall.c process.c: fix warnings.
14220 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
14222 * appdomain.h appdomain.c:
14223 (mono_domain_try_type_resolve): split the
14224 name_or_tb argument into a name and a tb argument.
14225 (mono_domain_has_type_resolve): new function to check whenever the
14226 application has registered a TypeResolve event handler.
14228 * icall.c reflection.h reflection.c: move the type resolve logic into
14229 mono_reflection_get_type () so it will be invoked when
14230 Assembly::GetType () is called.
14233 (mono_reflection_get_type): renamed to get_type_internal.
14234 (mono_reflection_get_type): fixed type name generation so it works
14235 for nested types too.
14236 (mono_reflection_get_type): call has_type_resolve () to avoid the
14237 costly type name generation if there is no resolve event handler.
14239 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14241 * class.c, image.c: load exported types from file references.
14243 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
14245 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
14246 used to cache the managed methods used to create proxies and make
14247 remote invocation of methods.
14248 * class.h: Added in MonoVTable a flag to indicate that a class needs
14249 to be remotely created.
14250 * object.c: Modified the method mono_class_vtable(). It now initializes
14251 the remote flag of the vtable. Modified mono_object_new_specific(),
14252 so now it checks the remote flag.
14253 * icall.c: Added a couple of internal methods, one for enabling instance
14254 creation interception for a type, and one for creating objects bypassing
14257 2003-02-18 Martin Baulig <martin@ximian.com>
14259 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
14260 New interncall to get a method's metadata token.
14262 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
14263 New interncall for the debugger.
14265 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
14267 * class.c (mono_class_setup_vtable): allocate supertype array
14269 2003-02-18 Martin Baulig <martin@ximian.com>
14271 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
14273 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14276 (assembly_name_to_aname): jump over unknown properties (i've found
14277 something like: 'type, assembly, version=xxx, custom=null, public...',
14278 so now will ignore custom=null and still get the rest of the values).
14280 2003-02-17 Dick Porter <dick@ximian.com>
14282 * threads.c: Have Thread.Start() wait for a semaphore to signal
14283 that the thread has set up all its local data. This fixes bug
14284 34323, where Abort() raced the new thread's TLS data.
14286 Also removes the handle_store() call from start_wrapper, because
14287 threads are now always created suspended and there is no longer a
14288 race between the parent and child threads to store the info.
14290 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
14292 * image.c: explain the #- heap issue in a message, hopefully
14293 avoiding FAQs on mono-list.
14295 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14298 (GetEntryAssembly): if the domain has not invoked
14299 AppDomain.ExecuteAssembly yet, return the assembly of the default
14302 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
14304 * class.c (mono_ldtoken): make it work in dynamic assemblies.
14306 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14308 * metadata.c, reflection.c: simple speedup to type hash
14311 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
14313 * image.c, image.h, class.c, assembly.c: move module loading
14314 to MonoImage. When loading metadata, consider alignemnet from
14315 the start of metadata, not from the metadata address in memory.
14317 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
14319 * reflection.c (mono_reflection_get_custom_attrs): Added support for
14320 AssemblyBuilder objects. Factored out custom attribute creation into
14321 a separate function.
14322 (create_custom_attr): new function to create custom attributes.
14324 2003-02-12 Miguel de Icaza <miguel@ximian.com>
14326 * Makefile.am: Got tired of typing the full pathname to pedump.
14327 Until there is another option, am installing this.
14329 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
14331 * class.c (class_compute_field_layout): always set field->parent
14332 (mono_ldtoken): use mono_defaults.fieldhandle_class;
14334 2003-02-11 Dick Porter <dick@ximian.com>
14337 * monitor.c: Rewrote Monitor, making lock much faster and
14338 Pulse/Wait work as specified. Also uses much fewer handles, and only
14339 creates them as needed.
14341 * exception.c: Added SynchronizationLockException
14343 * threads.c: Deleted old Monitor implementation. The new one is
14346 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14348 * class.c: handled TypedReference type code. Set the correct size for
14349 class data. Setup interface_offsets for interface classes, too.
14351 2003-02-09 Martin Baulig <martin@ximian.com>
14353 * debug-mono-symfile.h: Reflect latest symbol writer changes.
14355 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
14357 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
14358 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
14359 * object.c: fixed mono_object_get_virtual_method () for interfaces.
14360 * verify.c: check for code that runs after the end of the method.
14362 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
14364 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
14365 "System.Math::Round2".
14366 * sysmath.h: Added Floor, Round and Round2 definitions.
14367 * sysmath.c: Modified certain functions that were not 100% compliant
14368 with MS.NET (math precision) and added the implementation of Floor,
14371 2003-02-07 Martin Baulig <martin@ximian.com>
14373 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
14375 2003-02-07 Martin Baulig <martin@ximian.com>
14377 * debug-mono-symfile.c: Reflected latest symwriter changes.
14378 (mono_debug_create_mono_symbol_file): Removed.
14379 (mono_debug_open_mono_symbol_file): Take an argument which
14380 specifies whether to create a dynamic symbol file.
14382 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
14384 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
14386 2003-02-05 Martin Baulig <martin@ximian.com>
14388 * reflection.c (mono_image_build_metadata): Make this public,
14389 protect it against being called multiple times, don't create
14390 resources and don't build the compressed metadata here.
14391 (mono_image_create_pefile): Do this here.
14394 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
14396 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14398 * socket-io.c: fixed bug #36322.
14400 2003-02-06 Piers Haken <piersh@friskit.com>
14404 * debug-mono-symfile.c:
14410 * socket-io.c: warning cleanups
14412 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
14414 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
14415 function. works like remoting invoke, but does a check for the Proxy first.
14417 2003-02-05 Miguel de Icaza <miguel@ximian.com>
14419 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
14421 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
14423 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
14425 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
14426 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
14428 * object.c (mono_store_remote_field_new): used by the new jit
14429 instead of mono_store_remote_field
14430 (mono_load_remote_field_new): used by the new jit
14431 instead of mono_load_remote_field
14433 2003-02-05 Patrik Torstensson
14435 * appdomain.c: changed unload to take the domain id instead
14438 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
14441 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14443 * appdomain.c: don't look for assemblies in ApplicationBase if
14444 PrivateBinPathProbe is set.
14446 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14448 * object.c: make the first argument in main_args contain the absolute
14449 path to the assembly. Fixes bug #37511.
14451 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14453 * icall.c: get correct UTC offset for countries not using daylight
14454 time saving. Fixes bug #30030.
14456 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14458 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
14459 and 1 are the family).
14461 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
14463 * icall.c (ves_icall_InternalExecute): removed wrong assertion
14465 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
14467 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
14469 * reflection.c: added support for SignatureHelper tokens, which is
14470 needed by the Calli opcode.
14472 * reflection.h: track changes to SignatureHelper class.
14474 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
14476 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14478 * appdomain.c: fixed loading assemblies from PrivateBinPath.
14480 2003-02-03 Patrik Torstensson
14481 * appdomain.[c|h], domain.c :
14482 - Added support for getting a domain via domain id
14483 - Support for setting and getting domain from System.AppDomain
14484 (used in cross appdomain channel)
14485 - Added support for get/set for a MonoAppContext on a thread
14486 (Context class in System.Runtime.Remoting.Contexts),
14487 - Removed hack in Get/SetData and ExecuteAssembly.
14489 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
14490 the managed world to get control when a proxy is created.
14492 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
14494 2003-02-03 Miguel de Icaza <miguel@ximian.com>
14497 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
14498 Populate the codebase field as well.
14500 2003-02-02 Martin Baulig <martin@ximian.com>
14502 * debug-mono-symfile.c
14503 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
14504 (mono_debug_symfile_add_method): Allow interncalls.
14506 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14508 * icall.c: throw parse exception if strtod fails or the string is empty.
14510 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
14512 * marshal.c: handle object type separately from defined
14515 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
14517 * marshal.c: handle NATIVE_LPSTR for strings when it's
14518 explicitly specified.
14520 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
14522 * reflection.c, reflection.h, icall.c: setup the reflection
14523 handle cache for ModuleBuilders and AssemblyBuilders.
14525 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
14527 * reflection.c (reflection_methodbuilder_to_mono_method): set
14530 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14532 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
14534 2003-01-29 Dick Porter <dick@ximian.com>
14536 * threads.c: No need for the fake_thread kludge now that Thread
14537 doesn't run a class constructor
14539 2003-01-29 Dick Porter <dick@ximian.com>
14541 * threads.c: Use g_direct_hash instead of the rather bogus
14544 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
14546 * marshal.c (mono_marshal_get_native_wrapper): add check for null
14547 (fix pinvoke12.exe)
14548 (mono_marshal_get_struct_to_ptr): generate valid IL code
14549 (mono_marshal_get_ptr_to_struct): generate valid IL code
14550 (*): correctly set sig->pinvoke, we need to memdup the signature
14553 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14555 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
14556 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
14558 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
14560 * profiler.c: provide more callers information.
14562 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
14564 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
14566 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
14568 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
14570 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14572 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
14573 exception instead of going into an infinite loop on dates which it
14576 * string-icalls.c (ves_icall_System_String_get_Chars): raise
14577 out-of-range exception if needed.
14579 * class.c (mono_class_setup_vtable): allow a virtual method to provide
14580 an implementation for an interface method and to override an inherited
14581 method at the same time.
14582 Imagine a scenario when a virtual method is used to override a
14583 virtual abstract method in a parent class, and this same method
14584 provides an implementation for an method inherited from an interface.
14585 In this case, the interface resolution code will set im->slot, which
14586 means that the virtual method override pass will skip this method
14587 which means a pointer to the abstract method inherited from the parent
14588 will remain in the vtable of this non-abstract class.
14590 * class.c: (mono_class_setup_vtable): continue search for a real
14591 method if only an abstract method is found.
14593 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
14595 * reflection.c: add size to encoding for ByValStr and ByValArray
14596 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
14598 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14600 * class.c (mono_class_setup_vtable): pass the override info as an
14603 * class.c (mono_class_setup_vtable): set the slot of overriding methods
14606 * reflection.c (ensure_runtime_vtable); add support for method
14609 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14611 * reflection.c (resolution_scope_from_image): Hack to work to work with
14612 dynamic assemblies.
14614 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
14615 added a 'force_ref' argument to force this function to allways return
14616 a TypeRef. This is needed by mono_image_get_memberref_token ().
14618 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14620 * reflection.c (mono_image_get_type_info): interfaces really don't have
14623 * reflection.c (mono_image_basic_init): fill out missing fields of
14626 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
14627 dynamic assemblies. This is required so dynamic assemblies show up in
14628 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
14629 Type::GetType() etc. This is consistent with MS behaviour.
14631 * image.c image.h reflection.c: add newly created classes to the name
14632 cache so mono_class_get () will find them.
14634 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
14636 First part of changes to get IKVM.NET running under mono.
14638 * appdomain.h, appdomain.c: added new function
14639 mono_domain_try_type_resolve() which will emit TypeResolve events.
14640 This function will call AppDomain::DoTypeResolve to do the actual work.
14642 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
14643 moved existing code dealing with dynamic tokens to a new function
14644 called mono_reflection_lookup_dynamic_token (). This function will
14645 raise TypeResolve events when appropriate. Since reflection.c is not
14646 part of libmetadata, a new hook function called
14647 mono_lookup_dynamic_token() is added to class.c which will call this.
14649 * assembly.h assembly.c: make the invoke_load_hook function public,
14650 so it can be called for dynamic assemblies.
14652 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
14654 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
14657 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
14658 MonoGHashTable, since it contains pointers to objects which the GC
14661 * assembly.c (search_loaded): remove unused variable.
14663 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
14665 * object.c: fixed issue exposed by gcc-generated IL programs
14666 that use RVA data for pointers.
14668 2003-01-25 Martin Baulig <martin@ximian.com>
14670 * threads.c (start_wrapper): Moved the initialization of
14671 `start_func' above the mono_new_thread_init() call to which we
14672 pass it as argument.
14674 2003-01-24 Martin Baulig <martin@ximian.com>
14676 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
14677 the MonoThread pointer.
14679 2003-01-21 Miguel de Icaza <miguel@ximian.com>
14681 * icall.c: Rename `PowImpl' to Pow.
14683 2003-01-23 Dick Porter <dick@ximian.com>
14685 * threads.c (start_wrapper): Create a Thread object if needed, so
14686 the Main() thread can do the class initialisation in a subthread
14687 that has been set up to allow managed code execution.
14689 Pass the thread ID instead of the MonoThread pointer to the thread
14690 start and attach callbacks. This change is required, because the
14691 jit thread start callback must be called _before_ the Thread
14692 object can be created.
14694 (mono_thread_init): Removed much object creation code that is no
14695 longer needed. No managed code is called from here now.
14697 * object.c (mono_runtime_exec_managed_code): Create a subthread
14698 for Main, and call back to the runtime to use it.
14699 Set the exit code when Main exits.
14701 * gc.c: Make sure domain finalisation happens in a subthread.
14702 Re-enable threaded GC, fixing bug 31333 (again).
14704 * environment.c: System.Environment internall calls (so far just
14705 ExitCode is here, the others are still in icall.c)
14707 * appdomain.c (mono_runtime_cleanup): All threads running managed
14708 code should have finished before mono_runtime_cleanup() is
14709 reached, so no need to clean up threads.
14711 2003-01-22 Martin Baulig <martin@ximian.com>
14713 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
14714 `gpointer func' arguments.
14715 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
14716 but added `MonoThread *thread' argument.
14717 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
14719 * threads.c (mono_new_thread_init): Added `gpointer func' argument
14720 and pass it to the mono_thread_start_cb callback.
14721 (mono_install_thread_callbacks): New public function to install a
14722 set of callbacks which are set by the debugger.
14723 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
14725 2003-01-22 Martin Baulig <martin@ximian.com>
14727 * Makefile.am: Install debug-mono-symfile.h.
14729 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
14731 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
14733 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
14735 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
14736 * class.c (mono_ptr_class_get): correctly set access levels of pointers
14737 (mono_array_class_get): correctly set access levels of arrays
14739 2003-01-20 Patrik Torstensson
14740 * image.h (MonoAssemblyName): changed major, minor, build, revision
14741 from signed to unsigned.
14743 2003-01-20 sean kasun <skasun@azstarnet.com>
14745 * reflection.c (load_cattr_value): Now this handles
14746 MONO_TYPE_SZARRAY. Fixes bug #35629
14748 2003-01-20 Miguel de Icaza <miguel@ximian.com>
14750 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
14753 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14755 * decimal.c: fixed bug #26056.
14757 2003-01-17 Martin Baulig <martin@ximian.com>
14759 * gc.c: Raise an ExecutionEngineException instead of using g_error().
14761 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14764 (mono_get_exception_type_initialization): new function.
14766 * object.c: throw a TypeInitializationException when an exception is
14767 thrown invoking the class constructor.
14769 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14771 * reflection.c: fixed attribute reading.
14773 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14776 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
14777 provided, look for the type in the calling assembly and then in
14778 mscorlib; if the assembly name is provided, only try that one.
14780 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14782 * object.c: register the vtable before there is a chance it's
14783 queried again recursively.
14785 2003-01-13 Duncan Mak <duncan@ximian.com>
14787 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
14790 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
14792 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
14794 2003-01-11 Martin Baulig <martin@ximian.com>
14796 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
14797 this to 20 for the release.
14799 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
14801 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
14803 * loader.c (mono_method_get_marshal_info): bug fix
14805 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
14806 structures with explicit layout
14808 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14810 * profiler.c: made the output more readable (and sorted).
14811 Added caller information for the allocation profiler.
14813 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
14815 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
14817 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14819 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
14820 to get value types.
14822 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
14824 * object.c, profiler.h, profiler.c, profiler-private.h:
14825 Added object allocation profiler.
14827 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
14829 * reflection.h, reflection.c: handle global methods.
14830 Compress blob entries.
14832 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
14834 * marshal.c: fix compilation.
14836 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
14838 * loader.c (mono_method_get_marshal_info): impl.
14840 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
14842 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14844 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
14845 for reference types.
14847 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
14849 * loader.c: fixed off by one error in loaded parameter names.
14851 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
14853 * marshal.c (mono_marshal_get_icall_wrapper): like
14854 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
14855 instead of a MonoMethod.
14857 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14859 * decimal.c: fixed bug #36537.
14861 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
14863 * marshal.c: throw a missing method exception if a
14864 P/Invoke method is not found.
14866 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14868 * icall.c: allow a null this for constructors.
14870 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14872 * icall.c: raise the proper exceptions if the arguments to the
14873 internal Invoke are incorrect.
14875 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
14877 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
14879 2003-01-03 Martin Baulig <martin@ximian.com>
14881 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14883 2002-12-31 Martin Baulig <martin@ximian.com>
14885 * debug-mono-symfile.c: Completely rewrote the type section.
14886 Instead of using individual malloc()ed fields, we use one big
14887 continuous memory area and offsets into this area.
14888 See the comments in the source code for details.
14890 2002-12-30 Martin Baulig <martin@ximian.com>
14892 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
14894 2002-12-30 Martin Baulig <martin@ximian.com>
14896 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
14897 line number table in this data blob instead of using an external
14900 2002-12-28 Martin Baulig <martin@ximian.com>
14902 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
14904 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
14906 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
14907 as a boxed return type.
14909 2002-12-21 Miguel de Icaza <miguel@ximian.com>
14912 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
14913 g_build_filename to properly get separators on the filename created.
14915 * object.h: Small change, introduce MonoMarshalByRefObject to
14916 track the layout of that structure in the C# universe as we make
14919 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
14921 * object.c: removed assert to allow static fields on interfaces.
14922 * loader.c: a TypeSpec may be used for any type, not just arrays.
14924 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
14926 * class.c, class.h: added mono_class_array_element_size ().
14927 Ignore static methods in interfaces.
14929 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14931 * threads.c: fixed the build under cygwin.
14933 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
14935 * reflection.c: handle nullref constants. Allocate keys for
14936 reflection handles with the GC.
14938 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14940 * threads.c, threads.h: added mono_thread_get_abort_signal()
14941 to get a suitable signal for thread abort.
14943 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
14945 * metadata.c: fix handling of ExportedType table.
14947 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14949 * icall.c: added WriteWindowsDebugString internal call.
14951 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14953 * reflection.h: added fields to match C# implementation.
14955 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14957 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
14959 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
14961 * gc.h, gc-internal.h: Rename header for GC internal calls to
14962 gc-internal.h from gc.h as to not clash with Boehm GC having its
14963 header installed as <gc.h> in outside include paths.
14964 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
14965 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
14967 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14969 * icall.c: assign minor, build and revision in FillName.
14971 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
14973 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
14974 Added support for running code generated by Reflection.Emit.
14976 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14978 * appdomain.c: check for NULL argument in LoadFrom.
14980 2002-12-10 Dick Porter <dick@ximian.com>
14982 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
14984 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14986 * appdomain.c: fix buglet when building exe file name. Handle full
14987 assembly name (needed after latest changes to AssemblyName).
14989 (mono_image_close): free some hashtables.
14991 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
14993 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
14994 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
14995 on some systems (redhat 7.3)
14997 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
14999 * threads.c: delete the critical section of a sync block,
15000 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
15002 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
15004 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
15006 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15008 * appdomain.[ch]: handle the assembly preload event to try loading the
15009 assemblies using the paths we have in the current domain.
15011 * assembly.[ch]: created an assembly preload hook that is called to try
15012 loading the assembly by other means that the ones provided here.
15014 * domain.c: initialize the domain search path.
15016 From now on, assemblies (TODO: except corlib and System) are loaded
15017 according to these rules when using mono_assembly_load ():
15019 1. It tries to load the assembly from the ApplicationBase
15020 of the current domain appending .dll and .exe (TODO: have to
15021 try loading from name/name.dll and name/name.exe).
15023 2. It tries the search path specified in PrivateBinPath for the
15024 current domain (if any).
15026 3. Previous behavior.
15028 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
15030 * icall.c: implemented GetInterfaceMap() related icall.
15031 * domain.c, loader.h: load MethodInfo in mono_defaults.
15033 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
15035 * gc.c: disable the finalizer thread for now, untill all the issues
15036 with it are resolved.
15038 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
15040 * string-icalls.c: handle embedded nulls in string ctor when the
15041 length is specified.
15043 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
15045 * class.c: look for explicit interface implementation in parent
15048 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
15050 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
15052 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
15054 * gc.c: protect handles with a critical section.
15056 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15059 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
15060 parameters. If no assembly specified, try getting the type from all
15061 the assemblies in the current domain, else, load the assembly and get
15064 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15066 * marshal.c: applied patch from Aleksey Demakov that fixes
15067 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
15069 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15071 * icall.c: fixed get_location.
15073 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
15075 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
15076 declarations to make it work with older gcc.
15078 * loader.c (mono_get_method): set signature->pinvoke for native calls
15080 2002-11-20 Dick Porter <dick@ximian.com>
15082 * threads.c (mono_thread_init): Set the main thread's handle
15084 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
15086 * gc.c: allow compilation without GC support. Changed to match the
15089 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
15091 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
15093 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
15095 * reflection.c: set a public key token on the core assemblies.
15097 2002-11-18 Dick Porter <dick@ximian.com>
15099 * threads.c: Split out some thread initialisation so that other
15100 files can set the start callback function.
15102 * gc.c: Run finalisers in a separate thread, to avoid stack
15103 overflow. Fixes bug 31333.
15105 * appdomain.c: Set up GC finalisation thread.
15109 * domain.c: Use gc.h macros for GC_malloc
15111 2002-11-15 Dick Porter <dick@ximian.com>
15115 * appdomain.c: Removed mono_runtime_init_with_attach(),
15116 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
15117 merging the extra parameter with the existing function. Removed
15118 unneeded code in mono_thread_attach().
15120 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
15122 * image.c (mono_image_loaded_by_guid): a method to get loaded
15124 (load_metadata_ptrs): we store the guid as string.
15126 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
15128 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
15130 * metadata.c (mono_guid_to_string): imported method form Zoltan
15131 Varga (slightly modified)
15133 * assembly.c (mono_assembly_open): load precompiled code
15135 * loader.h (MonoMethod): we store the method token for use in the
15138 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15140 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
15141 the hook function called when an assembly is loaded.
15143 * domain.c: Modified file.
15144 (mono_domain_assembly_load): removed hash table insertion of assemblies.
15148 2002-11-07 Miguel de Icaza <miguel@ximian.com>
15150 * reflection.c: Map PEFileKind to the value expected by the WinNT
15153 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15155 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
15156 Read until the buffer is filled completely.
15158 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15160 * icall.c: implemented MonoType.InternalGetEvent ().
15162 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15164 * appdomain.c: implemented InitAppDomainSetup. Delayed
15165 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
15166 the entry_assembly.
15168 * assembly.c: base_dir is now an absolute path ending with
15171 * icall.c: modified get_location according to the above changes.
15173 * object.c: init AppDomain.SetupInformation for the default domain after
15174 we have the entry assembly.
15176 * domain.c: when unloading a domain, setup = NULL.
15178 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
15180 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
15182 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
15184 * object.h, object.c: introduced mono_object_get_virtual_method ()
15185 to lookup the method invoked on an object when a callvirt is done on
15187 * icall.c: make MethodInfo::Invoke() always do a virtual call.
15189 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15191 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
15192 current domain when loaded an assembly and failed to load it.
15194 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
15196 2002-10-31 Dick Porter <dick@ximian.com>
15200 * file-io.c: Return the error status in a parameter, as the
15201 GetLastError() value has long since been blown away if we try and
15202 look it up in a subsequent internal call invocation. Delete the
15203 GetLastError() internal call, because it's useless.
15205 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
15207 * class.[ch]: added cast_class to fix bug 29517
15209 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
15211 * marshal.c: create valid IL code in the filter clause:
15212 the new JIT is less forgiving:-)
15214 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15216 * icall.c: removed get_property internal call.
15218 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
15220 * appdomain.h domain.c: Added an ID to appdomains.
15222 * threads.c threads.h icall.c: Implement icall
15223 Thread:GetDomainID(), and remove unused icall
15224 CurrentThreadDomain_internal.
15226 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15228 * icall.c: Don't recurse through the base types in GetConstructor.
15231 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
15233 * mempool.h, mempool.c: added mono_mempool_empty() and
15234 mono_mempool_stats().
15236 2002-10-23 Dick Porter <dick@ximian.com>
15240 * icall.c: Added MonoIO.GetFileType internal call
15242 2002-10-17 Dick Porter <dick@ximian.com>
15244 * appdomain.c (mono_runtime_cleanup): Don't signal the async
15245 delegate semaphore before waiting for all threads to finish,
15246 because new threads can also call async delegates. Fixes bug
15249 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
15250 of 3 seconds, in case another async job is queued. (This part is
15251 needed because the bug fix reintroduced the 3s exit lag.) This
15252 makes the mono_runtime_shutdown flag superfluous.
15254 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
15256 * reflection.c: include ehader size in method section headers.
15257 Really check for suplicated modules entries.
15259 2002-10-17 Martin Baulig <martin@gnome.org>
15261 * debug-mono-symfile.c: Added back support for locals.
15263 2002-10-14 Martin Baulig <martin@gnome.org>
15265 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
15268 2002-10-14 Martin Baulig <martin@gnome.org>
15270 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
15271 mono_class_get() instead of looking in the class cache.
15273 2002-10-13 Martin Baulig <martin@gnome.org>
15275 * debug-mono-symfile.c: Set version number to 28, include the
15276 signature in method names.
15278 2002-10-13 Martin Baulig <martin@gnome.org>
15280 * debug-mono-symfile.h: Set version number to 27.
15282 2002-10-11 Martin Baulig <martin@gnome.org>
15284 * gc.c: Don't register/unregister NULL pointers as disappearing links.
15286 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15288 * metadata.c, metadata.h: added helper function to allocate signatures.
15290 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15292 * icall.c: added internal call to get the location of machine.config.
15294 2002-10-08 Martin Baulig <martin@gnome.org>
15296 * debug-mono-symfile.c: Ignore classes with a pending init for the
15299 2002-10-03 Dick Porter <dick@ximian.com>
15301 * threads.c: Freebsd pthread_t is a pointer
15303 2002-10-03 Dick Porter <dick@ximian.com>
15305 * socket-io.c: Implemented GetHostName_internal
15307 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15310 (mono_config_parse_file): don't leak the text.
15312 2002-10-02 Martin Baulig <martin@gnome.org>
15314 * debug-mono-symfile.c: Added support for methods.
15316 2002-10-01 Martin Baulig <martin@gnome.org>
15318 * debug-mono-symfile.c: Don't emit methods and line numbers for
15319 the dynamic symbol file, just write the type table. We can easily
15320 have an external helper program which creates a symbol file for an
15323 2002-10-01 Dick Porter <dick@ximian.com>
15325 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
15326 Only add the handle to the cleanup array when we're about to
15327 launch the thread. Bug 31425 deadlocked when the test was run on
15330 2002-10-01 Martin Baulig <martin@gnome.org>
15332 * debug-mono-symfile.c: Added support for properties.
15334 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15336 * reflection.c: unaligned store fix from Mark Crichton
15337 <crichton@gimp.org>.
15339 2002-09-27 Martin Baulig <martin@gnome.org>
15341 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
15344 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
15346 * assembly.h, assembly.c: use a sane API to hook into the assembly
15347 loading process instead of a useless special-purpouse hack
15348 (ngen needs a hook, too, for example).
15350 2002-09-27 Dick Porter <dick@ximian.com>
15352 * threads.c (mono_thread_init): Call GetCurrentProcess() so
15353 io-layer can set up some process handle info. Not needed on w32,
15354 but doesn't hurt either.
15356 * process.c: Pass the program name in the second parameter to
15357 CreateProcess, so the path is searched. Include the working
15358 directory. Implemented process name, process enumeration, and some
15359 process detail internal calls.
15361 * icall.c: Added internal calls for process lookup, and some
15364 2002-09-26 Martin Baulig <martin@gnome.org>
15366 * assembly.c (mono_install_open_assembly_hook): New global
15367 function to install a function to be invoked each time a new
15368 assembly is loaded.
15369 (mono_assembly_open): Run this callback function if set.
15371 * debug-mono-symfile.c: Put back line numbers for the dynamic
15372 symbol file and also record the .il file as source file. This
15373 allows us to install the temporary symbol file as `file.dbg' just
15374 like a compiler-generated one.
15376 2002-09-26 Nick Zigarovich <nick@chemlab.org>
15378 * Corrected typo in gc.c (BOHEM vs BOEHM).
15380 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15382 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
15383 GetProperties. Also avoid calling g_slist_length in GetProperties and
15386 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15388 * reflection.c: avoid unaligned stores (bug spotted by
15389 Mark Crichton <crichton@gimp.org>).
15391 2002-09-25 Martin Baulig <martin@gnome.org>
15393 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
15394 instead of guint64 for addresses and added prologue/epilogue info.
15396 2002-09-25 Martin Baulig <martin@gnome.org>
15398 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
15399 store line number info. For the dynamic symbol file, we only need
15400 to provide the JIT generated dynamic line number info for the dynamic
15403 2002-09-25 Martin Baulig <martin@gnome.org>
15405 * debug-mono-symfile.h: Incremented version number.
15407 2002-09-24 Martin Baulig <martin@gnome.org>
15409 * class.c (mono_debugger_class_init_func): New global function
15411 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
15414 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
15415 function. This is called via the mono_debugger_class_init_func
15416 hook to add all types to the dynamic type table.
15417 (ves_icall_MonoDebugger_GetType): New interncall to get a class
15418 from its metadata token.
15420 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
15421 New interncall for the debugger.
15423 2002-09-24 Nick Drochak <ndrochak@gol.com>
15425 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
15426 before using it in case it is null.
15428 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
15430 * metadata.c: allow custom modifiers in local var signatures
15431 (bug spotted by Zoltan Varga).
15433 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
15435 * class.c: deal with the <Module> class that may have a NULL vtable.
15436 Eliminate warnings.
15438 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15440 * image.c, image.h: more strong name helpers.
15441 * monosn.c: more work: convert pem keys to cryptoapi format.
15443 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
15445 * string-icalls.c: speedup IndexOf.
15447 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15449 * icall.c: updates from Zoltan.2.Varga@nokia.com.
15451 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15453 * icall.c: cleanup: use mono_object_domain ().
15455 2002-09-23 Martin Baulig <martin@gnome.org>
15457 * debug-mono-symfile.c: Improved type support.
15459 2002-09-22 Martin Baulig <martin@gnome.org>
15461 * debug-mono-symfile.c: Added support for reference types and strings.
15463 2002-09-22 Martin Baulig <martin@gnome.org>
15465 * debug-mono-symfile.c: Started to work on the type table.
15467 2002-09-21 Martin Baulig <martin@gnome.org>
15469 * debug-mono-symfile.c: Largely reworked the symbol table format.
15470 The symbol table is now incrementally updated each time a new
15471 method is added. We're now also using our own magic and version
15472 so that you don't need to recompile all your classes if the
15473 dynamic table changes.
15474 (mono_debug_update_mono_symbol_file): Removed.
15475 (mono_debug_symfile_add_method): New function to add a method.
15477 2002-09-21 Martin Baulig <martin@gnome.org>
15480 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
15483 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
15484 New interncall to get a method from its metadata token.
15486 2002-09-21 Martin Baulig <martin@gnome.org>
15488 * debug-mono-symfile.c: Create type table.
15490 2002-09-20 Martin Baulig <martin@gnome.org>
15492 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
15494 2002-09-20 Martin Baulig <martin@gnome.org>
15496 * debug-mono-symfile.c: Provide information about params and locals.
15498 2002-09-20 Martin Baulig <martin@gnome.org>
15500 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
15503 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
15504 interncall to get a method from its metadata token.
15506 2002-09-20 Martin Baulig <martin@gnome.org>
15508 * debug-mono-symfile.c: Added a few checks for method->header
15509 being non-NULL. This should never happen, but for the moment
15510 let's use a g_warning() rather than a g_assert().
15512 2002-09-19 Mark Crichton <crichton@gimp.org>
15514 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
15515 even if support for it isn't present. Added an #ifdef to fix this.
15517 * socket-io.c: Added checks back for Solaris support.
15519 2002-09-19 Martin Baulig <martin@gnome.org>
15521 * debug-mono-symfile.c (read_string, write_string): Reflect latest
15522 changes in the symbol file format.
15524 2002-09-18 Martin Baulig <martin@gnome.org>
15526 * debug-mono-symfile.c: Set version number to 21.
15528 2002-09-18 Dick Porter <dick@ximian.com>
15530 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
15531 on netbsd. Fixes bug 30051.
15533 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15536 (set_version_from_string): little fix.
15538 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15540 * monosn.c, Makefile.am: added strong name utility.
15541 * reflection.h, reflection.c: implemented delayed signing,
15542 locale, version and hash id assembly attributes.
15544 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
15546 * loader.c, metadata.c: load param attributes in signatures.
15548 2002-09-16 Martin Baulig <martin@gnome.org>
15550 * debug-mono-symfile.c: Added string table with all method names.
15552 2002-09-14 Martin Baulig <martin@gnome.org>
15554 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
15555 fast method lookup.
15557 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15559 * reflection.c: record the public key token of referenced assemblies.
15561 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
15563 * image.c, image.h: added functions to get the strong name and the
15564 public key of an assembly.
15565 * pedump.c: use them.
15567 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
15569 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
15571 2002-09-12 Miguel de Icaza <miguel@ximian.com>
15573 * marshal.c (mono_marshal_get_managed_wrapper): Added
15576 2002-09-11 Martin Baulig <martin@gnome.org>
15578 * gc.c: Call GC_unregister_disappearing_link() on all links when
15579 finalizing them, this is necessary to aviod a crash in boehm's
15582 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15584 * gc.c: handle GetTarget for finalized objects spotted and fixed by
15587 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
15589 * icall.c: implemented MonoType::Module.
15590 * reflection.c, reflection.h: mono_module_get_object () from
15591 Tomi Pakarinen <tomi.pakarinen@welho.com>.
15593 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
15595 * icall.c: ignore overridden methods in GetMethods ().
15596 Fix for FieldInfo::SetValue().
15597 * object.c: handle float/double in runtime invoke.
15599 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
15601 * object.c: allow a constructor to be called again on an object.
15603 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15605 * class.h, class.c: move field layout code to it's own function and
15606 export it. Get an interface id earlier. Move fields in MonoClass
15607 so they are more cache friendly and align the bitfields.
15608 * loader.c: temporary handle get_param_names() for a runtime method.
15609 * reflection.c, reflection.h: more code to handle runtime creation of
15612 2002-09-09 Martin Baulig <martin@gnome.org>
15614 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
15615 signature with the pinvoke field being set for the actual call.
15617 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
15619 * icall.c: removed some unused icalls. Start of map of glib charsets
15620 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
15622 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15624 * debug-helpers.c: break infinite loop (found and fixed by
15625 Holger Arnold <harnold@gmx.de>).
15627 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
15629 * icall.c: target may be null in create_delegate.
15631 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
15633 * marshal.c: handle a boolean return type.
15635 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
15637 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
15639 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15641 * gc.c: fix weakreferences.
15643 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
15645 * icall.c: added icall to get default codepage.
15647 2002-09-03 Dick Porter <dick@ximian.com>
15650 * threads.c: Use MonoThread instead of MonoObject where
15653 Store running thread objects in a hash table, so that we have all
15654 the info to hand when waiting for them to finish
15655 (means we don't need OpenThread() any more, so mingw builds should
15656 be fully functional again.)
15659 * object.h: Added thread ID to MonoThread
15661 2002-09-03 Martin Baulig <martin@gnome.org>
15663 * icall.c (System.Reflection.Assembly::get_location): New interncall.
15665 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15667 * icall.c: fixed leak in get_temp_path. Thanks lupus.
15669 2002-09-03 Martin Baulig <martin@gnome.org>
15671 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
15672 argument to store the end address of the disassembled instruction.
15674 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
15675 here from debug-symfile.h.
15676 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
15677 JIT into this struct.
15678 (MonoSymbolFile): Added `char *image_file' field.
15679 (MonoDebugGetMethodFunc): Removed.
15680 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
15681 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
15682 (mono_debug_find_method): New method.
15684 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
15685 create a full symbol file.
15686 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
15687 and static symbol files.
15688 (mono_debug_find_method): The symbol file keeps an internal method hash,
15689 call this to get a MonoDebugMethodInfo from a MonoMethod.
15691 * debug-symfile.[ch]: Removed.
15693 2002-08-29 Miguel de Icaza <miguel@ximian.com>
15695 * image.c (do_mono_image_open): Remove linker version check.
15697 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
15699 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
15700 wrappers for instance methods.
15702 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15704 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
15706 2002-08-28 Dick Porter <dick@ximian.com>
15708 * Makefile.am: Export HOST_CC for w32 builds
15710 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
15712 * file-io.c process.c: MonoString are null terminated, no
15713 need for mono_string_to_utf16() anymore.
15715 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15717 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
15719 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
15721 * icall.c, reflection.h: speedup System.MonoType.
15723 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
15725 * reflection.c: allow null as the value of a string argument in
15726 custom attributes constructors.
15728 2002-08-27 Martin Baulig <martin@gnome.org>
15730 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
15731 `trampoline_address' field.
15733 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
15735 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
15736 check (fixes bug #29486)
15738 2002-08-27 Martin Baulig <martin@gnome.org>
15740 * debug-mono-symfile.c: Changed the file format in a way that allows us
15741 open it read-only and to use a specially malloced area for all the
15742 dynamic data. We can now also generate a symbol file on-the-fly if we're
15743 debugging IL code and there is no MCS generated symbol file for it.
15745 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
15747 * object.c: added a define for a good string and array
15748 creation speedup (not enabled by default because we need to deal with
15751 2002-08-26 Martin Baulig <martin@gnome.org>
15753 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
15754 function to create a dynamic symbol file. This is used by the
15755 debugger to create a symbol file for IL code on-the-fly.
15757 2002-08-26 Martin Baulig <martin@gnome.org>
15759 * loader.c (mono_lookup_pinvoke_call): Include the error message
15760 from g_module_error() in the error message.
15762 2002-08-24 Martin Baulig <martin@gnome.org>
15764 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
15765 function to update the symbol file. The symbol file is mmap()ed
15766 writable, but private. This allows us to install the symbol file
15767 together with the assembly.
15769 2002-08-24 Martin Baulig <martin@gnome.org>
15771 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
15772 but they can read the new symbol file format which mcs is now creating.
15774 * debug-symfile.c (mono_debug_find_source_location): Moved to
15775 debug-mono-symfile.c; this is now operating on the new symbol file.
15777 2002-08-23 Martin Baulig <martin@gnome.org>
15779 * debug-helpers.c (mono_method_desc_from_method): New function to get
15780 a MonoMethodDesc from a MonoMethod.
15782 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
15784 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
15785 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
15787 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
15789 * string-icalls.[ch]: make helper methods static.
15791 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15793 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
15794 types to it and to SetValueInternal.
15796 * object.c: Moved handle_enum label to its proper place. This was the
15799 This time i compiled mcs and gtk-sharp and they both work.
15801 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15803 * icall.c: reverted partially my previous patch until
15804 object.c:set_value handles enums correcly.
15806 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15809 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
15810 (ves_icall_System_Environment_get_MachineName): removed warning when
15811 compiling under cygwin.
15813 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
15815 * object.c: fixed field_get_value() for reference types.
15817 2002-08-22 Dick Porter <dick@ximian.com>
15819 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
15820 Don't free a buffer while it's still needed. Patch from Jonathan
15821 Liger <Jonathan.liger@wanadoo.fr>
15823 2002-08-21 Miguel de Icaza <miguel@ximian.com>
15825 * icall.c (ves_icall_System_Environment_get_Platform): Add new
15828 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
15830 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
15831 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
15833 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
15834 we call unmanaged code which throws exceptions.
15836 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15838 * appdomain.h: added per-domain entry_assembly.
15839 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
15841 * icall.c: Assembly::GetEntryAssembly icall.
15842 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
15843 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
15845 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15847 * appdomain.h, gc.c: added mono_domain_finalize ().
15849 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15852 (mono_print_unhandled_exception): changed g_warning by g_printerr
15853 because g_log has a 1024 characters limit (yeah, i got a big stack
15854 trace). Don't print exception name, that should be in ToString
15857 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15859 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
15860 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
15862 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15865 (mono_print_unhandled_exception): after previous commit, i realized
15866 that MS calls ToString on the exception. I changed this function to
15867 do that. This way we get stack_trace for free.
15869 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15872 (mono_print_unhandled_exception): invoke Message property instead of
15873 getting 'message' field from Exception. Don't allocate memory for
15874 'trace' and 'message' if not needed.
15876 2002-08-18 Dick Porter <dick@ximian.com>
15878 * unicode.c: Fix asserts to match Encoder.cs checks
15880 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
15882 * marshal.c: fix unaligned store issue and a few wrong
15883 opcode argument types.
15885 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15887 * icall.c: added GetUninitializedObjectInternal internal call.
15889 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
15891 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
15892 to the right domain.
15894 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
15896 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
15898 * class.c (class_compute_field_layout): set blittable to false for Strings
15900 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
15902 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
15904 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
15905 first chunk of code to create types at runtime. Code to
15906 handle ReflectedType/DeclaringType. Make reflection handles
15909 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
15911 * class.c: set correct name in arrays.
15913 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
15915 * appdomain.c (mono_domain_transfer_object): make it work with
15916 valuetypes. bug fixes.
15918 2002-08-12 Dick Porter <dick@ximian.com>
15920 * object.h: Rename some parameters to avoid c++ keywords (Patch
15921 from Joseph Wenninger <kde@jowenn.at>)
15923 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
15925 * icall.c: added icall to implement Assembly.GetFile*.
15927 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15929 * reflection.h, reflection.c: code to embed managed resources.
15931 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
15933 * class.c: move all the type size stuff into
15934 class_compute_field_layout().
15936 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
15938 * class.c: ensure enums have always the correct instance size.
15939 * unicode.c: remove wrong assert.
15941 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
15943 * assembly.c: fix mem corruption issue.
15944 * image.h, image.c: added mono_image_get_resource () to access
15946 * icall.c: implemented Assembly.EntryPoint property and some
15947 Managed Resources related internalcalls.
15950 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
15952 * image.c, image.h: impemented mono_image_get_entry_point ().
15953 * appdomain.c: use mono_image_get_entry_point.
15955 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15957 * reflection.c: support the object type argument when loading
15960 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
15962 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
15963 String as return type.
15965 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
15967 * reflection.c: fix encoding of named args for custom attrs to match
15968 the ms implementation. Read them back when instantiating custom
15971 2002-08-02 Radek Doulik <rodo@ximian.com>
15973 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
15974 by Dietmar as quick fix
15975 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
15976 16 as stack size, used on more places as quick fix before Dietmar
15977 will fix it properly
15979 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
15981 * object.h, object.c: added accessors for fields and properties.
15983 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
15985 * class.c, class.h: made mono_class_get_field_from_name ()
15986 loop on parent types.
15987 Added mono_class_get_property_from_name ().
15989 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
15991 * class.c, class.h: move the code to setup the type vtable in its own
15992 function so that it can be reused also for types created at runtime.
15993 Eliminate the "class" identifier from the header file.
15994 * reflection.c: setup the vtable for enums so that we can create
15995 objects for use in SetConstant ().
15997 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
15999 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
16000 instead of the delegate itself as this pointer (bug #28383)
16002 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
16004 * marshal.c (mono_marshal_get_managed_wrapper): added return type
16007 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16009 * loader.c: don't set the pinvoke bit on icalls.
16011 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
16013 * debug-helpers.c (mono_method_full_name): only print a number to
16014 indicate wrapper type (so that the output is more readable in traces).
16016 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
16018 * class.c (mono_class_init): include method override patch from Paolo
16020 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
16022 * icall.c: fixed GetTypeCode().
16024 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
16026 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
16027 use real delegate invoke function to make it work with multicast
16028 delegates (fix bug# 28291).
16030 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16032 * object.c: load constant strings.
16034 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16036 * reflection.c: no magic numbers.
16037 * tabledefs.h: security action enum.
16039 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16041 * assembly.c: fix possible memory corruption.
16043 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16045 * reflection.h, reflection.c: added support for linking resources.
16046 * verify.c: check we have an updated corlib.
16048 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
16050 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
16052 (mono_marshal_string_array): null terminate unmanaged string arrays.
16053 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
16055 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16057 * icall.c: Type.GetType () can now return also types from the
16060 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16062 * loader.h, loader.c: stack walking support.
16063 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
16064 GetCallingAssembly.
16066 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
16068 * marshal.c: added optimisations for blittable types
16070 * class.c (mono_array_class_get): do not set blittable attribute on arrays
16071 (mono_class_setup_mono_type): set blittable attribute for single
16074 * marshal.c (mono_string_utf8_to_builder): impl.
16075 (mono_string_builder_to_utf8): impl.
16076 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
16078 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
16080 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
16081 (mono_marshal_get_managed_wrapper): impl. byref types
16083 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16086 (search_method): don't display debug message.
16088 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
16090 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
16092 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
16094 * appdomain.c: set the missing filename when throwing exception.
16096 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
16098 * metadata.c (mono_type_size): code cleanup
16099 (mono_type_stack_size): removed some test code
16101 2002-07-21 Miguel de Icaza <miguel@ximian.com>
16103 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
16104 mono_get_exception_file_not_found now.
16106 * exception.c (mono_exception_from_name_two_strings): New version
16107 that will call a constructor with two string arguments.
16108 (mono_get_exception_file_not_found): New helper routine, used to
16109 report file-not-found errors.
16111 2002-07-20 Dick Porter <dick@ximian.com>
16114 * process.c: Pass file handles to CreateProcess
16118 * file-io.c: Implemented CreatePipe
16120 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
16122 * metadata.c (mono_get_param_info): set alignment for value types
16124 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16126 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
16127 Constify mono_domain_assembly_open().
16128 * loader.c: handle null namespace in icalls.
16130 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
16132 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
16133 (emit_str_to_ptr_conv): marshal object as structs
16135 * metadata.c (mono_type_to_unmanaged): marshal object as structs
16137 * marshal.c (mono_marshal_get_runtime_invoke): support value types
16139 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
16141 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
16142 (mono_marshal_get_native_wrapper): we an now return value types
16144 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16146 * verify.c: more checks implemented.
16148 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
16150 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
16152 (mono_marshal_get_native_wrapper): allow byref arguments
16153 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
16154 impl. PtrToStringXXX methods
16155 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
16156 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
16157 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
16158 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
16159 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
16161 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16163 * reflection.c: fix buglet in parsing an assembly name.
16165 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
16167 * marshal.c (emit_ptr_to_str_conv): first impl.
16169 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16171 * object.c, class.h: cache the vtable in the class as suggested by
16172 vargaz@freemail.hu (Zoltan Varga).
16174 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16176 * class.h, loader.c: added mono_field_from_token().
16177 * verify.c: first cut of type checking code.
16179 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
16181 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
16183 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
16185 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
16187 (mono_marshal_get_remoting_invoke): impl.
16188 (mono_delegate_begin_invoke): impl.
16189 (mono_mb_emit_save_args): impl.
16190 (mono_delegate_end_invoke): impl.
16191 (mono_marshal_get_delegate_begin_invoke):
16192 (mono_marshal_get_delegate_end_invoke):
16193 (mono_marshal_get_delegate_invoke): generate a special name for
16194 those methods (including the signature) and associate them whith
16195 the delegate class.
16197 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
16200 (mono_reflection_type_from_name): now it has a MonoImage parameter
16201 which is used as the default image to search the type in. If the image
16202 is NULL or getting the type from it fails, it defaults to corlib.
16204 * icall.c: changed 1 call to mono_reflection_type_from_name to match
16207 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16209 * reflection.c: update the parameter table index.
16211 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16213 * domain.c: don't include the mark byte in the string hash.
16215 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16217 * icall.cs: icall for Type.GetTypeCode ().
16218 * verify: a couple of fixes and disabled local initialization checks.
16220 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
16222 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
16224 * debug-helpers.c (mono_method_full_name): print the type of the
16227 * metadata.c (mono_signature_hash): a hash function for signatures
16228 (mono_signature_hash): better hash algorithm
16230 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
16232 * debug-helpers.c (mono_method_full_name): this can now generate
16233 method names with signatures
16235 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
16236 method dont have this pointers.
16238 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
16240 * reflection.c: fixup typebuilder tokens.
16241 * image.c: fix buglet.
16242 * marshal.h: remove whitespace.
16243 * metadata.h, metadata.c: reinstate code that was removed.
16244 * verify.c: handle catch directives and fix another couple of bugs.
16246 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
16248 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
16249 (mono_marshal_get_native_wrapper): make it comp. with the old code
16250 (mono_marshal_get_native_wrapper): support boolean
16251 (mono_marshal_get_managed_wrapper): support more types
16253 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
16255 * class.c (class_compute_field_layout): compute class->blittable attribute.
16257 2002-07-09 Dick Porter <dick@ximian.com>
16259 * threads.c: Make the thread cleaning up cope with threads that
16262 2002-07-08 Radek Doulik <rodo@ximian.com>
16264 * reflection.c (method_encode_code): use non-translated values to
16265 compute finally_start, this fixes exception handling on ppc, yay!
16267 * decimal.h (struct signscale): fix endianess
16269 2002-07-07 Radek Doulik <rodo@ximian.com>
16271 * reflection.c: swap box_val and not val
16273 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16275 * reflection.c, reflection.h: handle full assembly info in type name.
16276 Handle Type arguments when loading custom attributes.
16277 * icall.c: updated to use new mono_reflection_type_from_name () method.
16279 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16282 (method_from_memberref): also print assembly name when method not found.
16284 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16287 (ves_icall_TypeGetProperties): fixed bug #27473.
16289 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16291 * reflection.c: display image name and token when cannot find the
16292 .ctor for an attribute.
16294 2002-07-05 Martin Baulig <martin@gnome.org>
16296 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16298 2002-07-04 Dick Porter <dick@ximian.com>
16300 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
16301 compile on mingw. This will cause mingw builds to not wait for
16302 subthreads to terminate after the main thread does. I've lodged a
16303 bug with the mingw developers for them to wrap OpenThread().
16305 2002-07-03 Dick Porter <dick@ximian.com>
16307 * threads.c: Store thread IDs instead of handles, because
16308 GetCurrentThread() returns a pseudohandle and therefore stores
16309 useless values. mono_thread_cleanup() continues checking the
16310 array of threads until it is empty, to cope with subthreads
16311 spawning new threads after the main thread has finished.
16315 * profiler-private.h: Pass the thread ID to thread profiler
16316 functions, instead of a handle
16318 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16320 * verify.c: fixes to make it more usable.
16321 * pedump.c: added --verify code to verify IL code in an assembly.
16323 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16325 * reflection.c: turn errors into warnings to allow compiling corlib.
16327 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
16329 * reflection.c: add special cases to compile corlib.
16331 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16333 * reflection.c: handle properties with only a set method.
16335 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16337 * opcodes.h: add enum with opcodes in opval order.
16339 2002-07-01 Dick Porter <dick@ximian.com>
16342 * object.c (mono_runtime_run_main): Removed unneeded argument
16344 2002-06-28 Martin Baulig <martin@gnome.org>
16346 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
16348 2002-06-27 Dick Porter <dick@ximian.com>
16350 * threads.c: Store the handle in both the parent thread and in the
16351 subthread, to minimise the time between starting a new thread and
16354 2002-06-26 Dick Porter <dick@ximian.com>
16356 * appdomain.c (mono_runtime_cleanup): Close the socket library
16357 after all the threads have finished, not before
16359 2002-06-26 Martin Baulig <martin@gnome.org>
16361 * debug-symfile.c (mono_debug_find_source_location): Added
16362 `guint32 *line_number' argument. If it's not NULL, store the line number
16363 there and return the file name without the line number.
16365 2002-06-25 Dick Porter <dick@ximian.com>
16369 * process.c: Process forking and other support functions
16371 2002-06-25 Dick Porter <dick@ximian.com>
16373 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
16374 things dont happen when the image is closed.
16375 (mono_image_lookup_resource): Walk the resource section looking
16376 for a particular entry
16378 * cil-coff.h: PE resource section decoding
16380 2002-06-25 Dick Porter <dick@ximian.com>
16384 (mono_assembly_foreach): Accessor functions to walk the list of
16386 (mono_assembly_set_main):
16387 (mono_assembly_get_main): Process methods need to know which
16388 assembly is the "main" one
16390 * object.c (mono_runtime_run_main): Record the main assembly
16392 * debug-helpers.c: Fix typo
16394 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
16396 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
16397 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
16399 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16401 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
16403 2002-06-21 Miguel de Icaza <miguel@ximian.com>
16405 * image.c (do_mono_image_open): Initialize reference count,
16406 otherwise we leak the MonoImage.
16408 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16410 * reflection.c: small tweak to handle self-hosting.
16412 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
16414 * reflection.c: fix type name parse code.
16416 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16418 * reflection.c: break out of the loop.
16419 * image.c: special case corlib.
16421 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16423 * reflection.c: add all the custom attrs at the end to ensure the
16424 ctors have been properly initialized when the attributes are defined
16425 in the current assembly.
16427 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16429 * reflection.c: handle correctly multiple-nested types.
16431 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
16433 * row-indexes.h: fix typos.
16434 * reflection.c: adjust for typos and fix method_def_or_ref
16435 encoding in MethodImpl table.
16437 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16439 * reflection.c: fix entry point patching (thanks Serge!).
16441 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
16443 * verify.c: add check for System.Exception
16445 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
16447 * image.c, class.c: minifix for code just c&p'ed.
16448 * reflection.c: warning fix.
16449 * object.h, loader.h, domain.c: load also StringBuilder.
16451 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
16453 * marshal.h, marshal.c: some support code to handle complex marshaling.
16455 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16457 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
16458 Better signatures with vtable error dump.
16460 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
16462 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
16464 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
16466 * icall.c (ves_icall_Type_GetField): impl.
16468 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16470 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
16471 to retrieve a marshal description blob for a field or param.
16473 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
16475 * reflection.h, reflection.c: change order of nested type emission
16476 to avoid table corruption. The NestedTypes table is sorted.
16477 * icall.c: change order of GetConstructor results to workaround mcs bug.
16479 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16481 * reflection.h, reflection.c: handle field and param marshal
16484 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16486 * icall.c, marshal.c marshal.h: more Marshal class implementation.
16488 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16490 * reflection.c: fix call convention.
16492 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16494 * reflection.h, reflection.c: mono_image_get_memberref_token()
16495 takes a type instead of a class, now. Added
16496 mono_image_get_array_token() to create tokens for the special
16497 multi-dim array methods.
16499 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16501 * assembly.c: handle modules (no assembly table). Split
16502 loading references in its own function.
16503 * class.c: handle moduleref resolution scope.
16504 * image.c, image.h: cache module name in image.
16506 2002-06-07 Martin Baulig <martin@gnome.org>
16508 * reflection.c (mono_image_get_type_info): Only add a class layout entry
16509 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
16511 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16513 * icall.c: more signature fixes that used uint instead of int.
16515 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16517 * reflection.c: fixed signature of field refs.
16519 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16521 * class.c, reflection.c: handle typerefs of nested types
16522 (both on read and when writing files).
16524 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
16526 * icall.c: fix method signatures that tried to workaround the previous
16529 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
16531 * debug-helpers.c: fix typo.
16533 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
16535 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
16536 rewrote the PE/COFF writing code (our programs are understood by the
16539 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
16541 * gc.c, gc.h, icall.c: weakreference support.
16543 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
16545 * Makefile.am, mono-config.c: use $(sysconfdir).
16547 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
16549 * icall.c: changed default precision of Double.ToString() to 15.
16550 Fixed memory leak. Unified with Single.ToString.
16552 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
16554 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
16556 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
16558 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
16559 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
16560 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
16563 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16565 * debug-symfile.c, sysmath.c: yet more compilation fixes.
16567 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
16569 * reflection.c, socket-io.c: more compilation fixes.
16571 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16573 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
16574 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
16575 unicode.c: warning and compiler compatibility fixes.
16577 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16579 * class.h, metadata.c: fixed warnings/compilation errors.
16581 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
16583 * Makefile.am, mono-config.c, mono-config.h: configuration file
16585 * loader.c, loader.h: make Dll mapping configurable at runtime in the
16586 config file. Export methods to insert and lookup mappings.
16588 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
16590 * reflection.c: handle types and boxed objects in custom attr
16593 2002-05-30 Martin Baulig <martin@gnome.org>
16596 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
16598 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
16600 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
16601 to lookup the implmap row for a P/Invoke method.
16602 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
16603 P/Invoke method from the runtime on an as needed basis.
16605 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
16607 * metadata.c (mono_metadata_parse_signature): impl.
16609 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16611 * class.c: handle .pack directive.
16613 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
16615 * object.c: initialize static fields with RVA data.
16617 2002-05-25 Martin Baulig <martin@gnome.org>
16620 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
16622 2002-05-24 Martin Baulig <martin@gnome.org>
16625 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
16626 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
16627 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
16629 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
16631 * object.c: special case string ctros in invoke.
16632 * gc.c: silly whitespace changes.
16634 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
16636 * threadpool.[ch]: impl. a threadpool that can
16637 be used by mint and mono.
16639 2002-05-22 Martin Baulig <martin@gnome.org>
16641 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
16642 The first argument is now a `MonoReflectionModuleBuilder *', the return
16643 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
16644 `methods' field to get the method builder. The `token' argument is the
16647 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
16648 invalid characters instead of g_assert_not_reached()ing. This seems
16649 to be the behaviour of mscorlib.
16651 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
16653 * object.c (mono_runtime_invoke_array): applied patch from Rachel
16654 Hestilow to fix bug #25104
16656 2002-05-21 Martin Baulig <martin@gnome.org>
16658 * debug-symfile.c (mono_debug_find_source_location): New function.
16659 Looks up an IL offset in the line number table and returns the source
16660 location as a string.
16662 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16665 (mono_double_ToStringImpl): changed %f by %g until we have something
16668 2002-05-21 Nick Drochak <ndrochak@gol.com>
16670 * icall.c : Use different name for Math.Pow's icall. Needed to check
16671 parameters first in C#.
16673 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16675 * icall.c, reflection.h: added icall to get info about an event.
16677 2002-05-20 Radek Doulik <rodo@ximian.com>
16679 * object.c (mono_value_box): don't use memcpy for boxing on BIG
16681 (mono_value_box): don't use memcpy for small sizes on
16682 architectures with unaligned access
16684 2002-05-20 Martin Baulig <martin@gnome.org>
16686 * reflection.c (mono_reflection_setup_internal_class): Don't crash
16687 if `tb->parent == NULL'.
16688 (mono_reflection_create_internal_class): New function. This is
16689 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
16692 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
16695 2002-05-19 Martin Baulig <martin@gnome.org>
16697 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
16698 argument to get the length, don't default to the array length.
16700 2002-05-18 Miguel de Icaza <miguel@ximian.com>
16702 * assembly.c (mono_assembly_setrootdir): New function used to
16703 override the MONO_ASSEMBLIES directory.
16705 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
16707 * icall.c: ValueType_GetHashCode() initialize local var.
16709 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
16711 * reflection.c: sort custom attributes table.
16713 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16715 * reflection.c: support named args in custom attributes (write support).
16717 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
16719 * reflection.c: fix finally position calculation.
16721 2002-05-15 Radek Doulik <rodo@ximian.com>
16723 * reflection.c: fixed endianess at many places
16725 * icall.c (ves_icall_InitializeArray): comment out debug msg
16727 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
16729 * object.c (mono_unhandled_exception): new function to handle
16730 unhandled exceptions.
16731 (mono_unhandled_exception): call the UnhandledException event.
16732 (mono_runtime_delegate_invoke): impl.
16734 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
16736 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
16737 returns the RVA, not the direct pointer to the data. Handle the case
16738 when the class size is fixed.
16740 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
16742 * reflection.c: fix some endianess issues.
16744 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
16746 * object.c (mono_runtime_invoke): is now able to catch exceptions.
16748 * threads.c (mono_thread_init): added a callback which is invoked
16751 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
16753 * icall.c: make GetHashCode return non-negative values.
16755 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
16757 * object.c, icall.c, gc.c: revert to address-based hashcode.
16759 2002-05-13 Miguel de Icaza <miguel@ximian.com>
16761 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
16763 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
16765 * icall.c, class.c: special case <Module>.
16767 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
16769 * icall.c: fix bug in GetNow().
16771 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
16773 * object.c (mono_runtime_class_init): make sure that we call all
16774 static class constructors.
16776 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
16778 * reflection.c: sort methodsemantics table.
16780 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
16782 * reflection.h, reflection.c: honour init locals setting.
16784 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
16786 * icall.c: copied Double ToStringImpl for Single ToStringImpl
16788 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
16790 * reflection.c: support ContructorBuilders in attribute blob creation.
16792 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
16794 * reflection.c: some changes to build a binary that can be run
16795 directly in windows.
16797 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
16799 * loader.c: print a big message when an icall can't be found.
16801 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16803 * string-icalls.c: fix bug 24248.
16805 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
16807 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
16808 icall.c, reflection.h: separate assembly loading by pathname and by
16809 assembly name. Use the MONO_PATH env var to search for assemblies.
16811 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
16813 * assembly.c, image.h: add some support for assemblies
16814 with multiple modules.
16815 * class.c, class.h: export mono_class_from_typeref().
16816 * loader.c: remove duplicated code and use mono_class_from_typeref(),
16819 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16821 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
16822 documentation says (the ECMA one is correct).
16824 2002-05-02 Dick Porter <dick@ximian.com>
16826 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
16827 Don't name the synchronisation mutex.
16829 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
16832 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
16833 Make the prototypes match.
16834 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
16838 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
16839 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
16840 all systems have tm.tm_zone, so use strftime() with %Z to print
16841 the timezone abreviation into a temp string.
16843 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
16844 rather than mono_array_addr() on a MonoString on Big Endian
16847 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
16849 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
16852 2002-04-30 Dick Porter <dick@ximian.com>
16854 * socket-io.c: Cope with SOCKET being an integer rather than a
16857 * threads.c: Added Thread_free_internal, to deal with thread
16858 handle cleanup. Moved calls to handle_store() and handle_remove()
16859 to start_wrapper(), so each can only be called once. Allocate
16860 synchronisation blocks with GC_malloc(), and use GC finalisation
16861 to close the handles.
16863 * icall.c: added System.Threading.Thread::Thread_free_internal
16865 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16867 * icall.c: support Environment.Exit, CommandLineArgs().
16869 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
16871 * object.c, object.h: added mono_runtime_run_main () and
16872 mono_runtime_get_main_args () for use in System.Environment.
16874 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
16876 * gc.c: fix thinko, enable actual finalization since the jit is now
16879 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
16881 * gc.c, object.c: take into account that an object may be offset wrt the address
16882 returned by GC_malloc().
16884 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
16886 * image.c: handle files without entries in the assembly table (modules).
16888 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
16890 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
16891 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
16892 allowed to be null when it's System.Object class setup.
16894 2002-04-27 Martin Baulig <martin@gnome.org>
16896 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
16897 if `tb->parent == NULL' rather than crashing.
16899 2002-04-28 Nick Drochak <ndrochak@gol.com>
16901 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
16902 calling acos() where asin() should have been called.
16904 2002-04-26 Martin Baulig <martin@gnome.org>
16906 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
16907 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
16908 there's a subdirectory called `System', but we don't want to read that
16909 subdirectory as an assembly.
16911 2002-04-25 Martin Baulig <martin@gnome.org>
16913 * debug-symfile.c: Reflect latest MonoString changes.
16915 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
16917 * rand.c, rand.h: instance method icalls need to have an explicit
16918 this pointer as first argument in the C implementation.
16920 2002-04-25 Nick Drochak <ndrochak@gol.com>
16922 * icall.c: Fix typo in map for GetNonZeroBytes
16924 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
16926 * string-icalls.c : String does now passes unit tests without any
16927 errors, the following changes has been made:
16929 Implemented replace methods.
16930 Renaming of methods to (try) follow the standard.
16931 Fixed compare ordinal
16932 Made all memory allocated directly to function instead of via icall function.
16933 Small performance fix in is_in_array function
16935 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
16937 c (mono_string_Internal_ctor_charp_int_int):
16938 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
16939 sindex < 0, throw ArgumentOutOfRangeException instead of
16940 ArgumentNullException.
16942 Added new check for length == 0, however
16943 I need to make it return String.Empty from the C code.
16945 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
16946 that calculate the length for us here.
16948 (mono_string_Internal_ctor_sbytep_int_int): Replaced
16949 mono_string_new_utf16 with mono_string_new, since value is utf8.
16951 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
16953 * object.c: register the object for finalization if needed.
16954 Allocate one more char in the string for the terminating 0 char.
16956 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
16958 * class.c, class.h, image.c: check if a type implemenst a destructor.
16959 Use the proper key for array class lookups.
16960 * icall.c: register the icalls in the System.GC class.
16961 * gc.c, gc.h: GC-related functions and icalls.
16963 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16967 * unicode.c: free some strings gotten from mono_string_to_utf8 and
16968 changed a couple of free () by g_free ().
16970 * decimal.c: one-liner in the comments for decimal2string ().
16972 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
16974 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
16976 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
16978 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
16979 * object.c (mono_runtime_invoke_array) : handle null in params
16981 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
16983 * string-icalls.c: fixed bug in split (one off bug)
16985 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
16987 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
16988 * icalls.c: added String::Equals as internal method
16990 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
16992 * threads.c: fixed bug in the double interlocked functions
16994 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
16996 * threads.c: implemented all of the new interlocked icalls.
16997 * string-icalls.c: fix a bug in insert.
16998 * icalls.c: added the icalls for interlocked, removed old string functions.
17000 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17002 * loader.c: fix off-by-one error when reading argument names.
17004 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17006 * profiler.c: win32 counter implementation (untested).
17007 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
17008 (the latter needs testing and more complete impl. from win32 folks).
17010 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
17012 * object.c: mono_array_new_full workaround mono_array_class_get
17015 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17017 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
17018 * object.h (mono_string_chars): Changed casting type.
17020 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17022 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
17023 method signatures to use gunichar2 instead of gint16.
17025 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
17027 * object.h, object.c: domain-specific versions of mono_object_new and
17030 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
17032 * object.c: changed String layout
17034 * string-icalls.c (mono_string_Internal_ctor_chara): added
17035 internal string constructors.
17037 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
17039 * threads.c: pass 'this' to the thread start routine.
17041 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17043 * string-icalls.c: fix IndexOf and LastIndexOf. Now
17044 InternalCompareStr don't call twice mono_string_cmp_char for the last
17045 character. Improved performance in mono_string_cmp_char.
17047 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
17049 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
17050 code into its own library: libmonoruntime.
17052 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
17054 * object.h, object.c: changed array format so that szarrays do not
17055 require a bounds structure.
17056 * icall.c, appdomain.c: support for new szarray format.
17058 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
17060 * metadata.c: compare also the retuns type when comparing signatures:
17061 we didn't do this as an optimization since really overloaded methods
17062 must differ also in the arguments, but this doesn't work with
17063 low-level IL code (or when using explicit conversion operators: see
17064 bug#23498 for an example).
17066 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
17068 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
17070 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
17072 * icall.c: make MonoType::GetElementType its own icall.
17074 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
17076 * icall.c: remove MonoMethod_get_Name().
17077 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
17080 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17082 * string-icalls.c: optimized a few methods.
17084 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
17086 * icall.c: added all new string internal calls
17087 * string-icalls.c: added, new string internal call implementation.
17088 * object.c: added mono_string_new_size for allocating a string a size
17090 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
17092 * object.c (mono_object_isinst): use the same code as in the
17093 optimized x86 version.
17095 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
17097 * profiler.c: TSC-based timer code (faster and more accurate).
17098 Not hooked up in configure, yet (set USE_X86TSC to 1).
17100 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
17102 * profiler.c, profiler.h: track time spent compiling methods.
17103 * threads.c: track thread creation/destruction.
17105 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
17107 * profiler.c, profiler.h, profiler-private.h: profiling interface
17108 and sample implementation. Moved here so that it can be used also by
17111 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
17113 * reflection.c, reflection.h: keep types and other handles separate in
17114 the hash tables for referred tokens. Add guid for modules.
17116 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
17118 * assembly.c: fix bugs found with valgrind.
17119 * metadata.h, metadata.c: added mono_metadata_guid_heap().
17121 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
17123 * threads: added icall support for getting current domain for
17126 2002-04-13 Martin Baulig <martin@gnome.org>
17128 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
17129 (MonoDebugVarInfo): Added `index' field for register based addresses.
17130 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
17131 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
17132 `MonoDebugVarInfo *params' and `guint32 this_offset' with
17133 `MonoDebugVarInfo *this_var'.
17135 * debug-symfile.c (relocate_variable): New static function to write
17136 a location description for a local variable or method parameter.
17138 2002-04-12 Martin Baulig <martin@gnome.org>
17140 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
17141 stack offset and begin/end scope address of a local variable.
17142 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
17143 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
17144 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
17146 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
17147 Added new relocation types for start/end scope of a local variable.
17149 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
17151 * object.h: add mono_object_domain() macro.
17152 * reflection.c: handle typespecs.
17153 * icall.c: MonoMethod::get_Name() implementation.
17155 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17157 * icall.c: String::GetHashCode() icall implementation.
17159 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17161 * icall.c: String::IndexOfAny icall.
17162 * object.c, object.h: make array->max_length more useful.
17163 Intrduced mono_object_class() and mono_string_length() macros.
17165 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17167 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
17168 instead of g_unichar_isdigit.
17170 2002-04-11 Nick Drochak <ndrochak@gol.com>
17172 * icall.c: Implement a simple Double.ToString().
17174 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
17176 * appdomain.h: only io-layer.h is supposed to be included.
17177 * icall.c: explicitly import environ. Fix warning.
17179 2002-04-10 Nick Drochak <ndrochak@gol.com>
17181 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
17182 return true even if it's not Daylight Savings time.
17183 Only return false for the case where the function isn't
17184 implemented for a plaform (read Windows).
17186 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
17188 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
17191 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
17193 * mempool.c (mono_mempool_alloc): only use g_malloc when
17194 absolutely necessary.
17196 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
17198 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
17200 * class.c (mono_class_vtable): use domain mempool to allocate vtable
17201 (mono_class_proxy_vtable): use domain mempool
17203 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
17205 * appdomain.h, appdomain.c: split initialization that requires the
17206 execution engine support into mono_runtime_init().
17208 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
17210 * class.c (mono_class_init): don't include vtable inside MonoClass
17211 to save some memory, gather some statistics.
17212 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
17214 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17216 * icall.c: internalcall implementation for ValueType.Equals().
17218 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
17220 * object.c (mono_message_init): moved
17221 (mono_runtime_exec_main): new arch. independent impl.
17222 (mono_runtime_invoke_array): new method - like
17223 mono_runtime_invoke, but you can pass an array of objects.
17224 (mono_remoting_invoke): new arch. independent impl.
17225 (mono_message_invoke): new arch. independent impl.
17226 (mono_runtime_class_init): new arch. independent impl.
17227 (mono_runtime_object_init): new arch. independent impl.
17229 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
17231 * metadata.c, object.c, reflection.c: documented the exported
17234 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
17236 * icall.c: simpler code to pass the assembly builder data to corlib.
17237 Implement GetNestedTypes() internalcall.
17239 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
17241 * class.c: warn if a type can't be loaded.
17243 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
17245 * image.h: typedef MonoImageOpenStatus
17246 * types.h: removed unused file
17248 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
17250 * icall.c: Enum_ToObject accepts enum value arguments.
17252 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
17254 * class.c: move initialization of properties, events and nested
17255 classes, so that they happen for interfaces, too.
17257 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
17259 * icall.c: cleanup some ugly casts in Array_SetValue*.
17261 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
17263 * icall.c: the values array fro enums is of the correct type, now.
17264 Implement (correctly) getFullName instead of assQualifiedName for
17266 * reflection.h, reflection.c: added mono_type_get_name ().
17268 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
17270 * assembly.c, image.h: for each MonoImage, record from wich assembly
17272 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
17273 Make Type.Assembly work.
17275 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
17277 * debug-symfile.h: use char* instead of gpointer to avoid
17280 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
17282 * icall.c (ves_icall_InternalExecute): impl. FielSetter
17283 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
17285 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
17287 * icall.c (mono_message_init): impl. (code cleanup)
17288 (ves_icall_InternalExecute): impl. FieldGetter
17290 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
17291 defined we call all (non-static)methods through the vtable.
17293 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
17295 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
17296 finalizer even though the memory is still referenced (and the chunk of
17297 memory is not freed).
17299 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
17301 * assembly.c: fix brokeness.
17303 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
17305 * class.c: kill some warnings. Check explicit interface method
17306 implementation also without considering the namespace.
17307 Load also literal strings in static class data.
17309 2002-03-29 Miguel de Icaza <miguel@ximian.com>
17311 * assembly.c (default_assembly_name_resolver): Kill memory leak.
17312 (default_assembly_name_resolver): Make the resolver take the
17313 "base" directory where the assembly was originally defined, so we
17314 can load DLLs that are in the same directory as the assembly that
17315 is being referenced.
17317 2002-03-28 Dick Porter <dick@ximian.com>
17323 * unicode.c: Warning cleanups
17325 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
17327 * object.h, reflection.h: use the correct type instead of MonoObject.
17329 2002-03-28 Martin Baulig <martin@gnome.org>
17331 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
17332 (mono_debug_update_symbol_file): Initialize classes if necessary.
17334 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17336 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
17337 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
17339 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
17341 * assembly.h: fix function prototype.
17342 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
17343 * mono-endian.h: use const cast.
17345 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
17347 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
17349 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17351 * loader.c: don't assert when a typeref can't be loaded, give
17352 a chance to the runtime to trow an exception instead.
17353 * loader.h: fix warning.
17355 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
17357 * class.c (mono_class_proxy_vtable): added proxy support
17359 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
17361 * icall.c: removed last of PAL calls, added System.Environment
17362 * file-io.h, file-io.c: MonoIO implementation
17363 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
17365 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17367 * appdomain.c: do not use the byte marker in ldstr table lookup.
17368 * debug-helpers.c: allow two ':' to separate class and method name.
17369 * object.c: allocate arrays bounds with the GC, too.
17370 * verify: add a few more checks.
17372 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
17374 * reflection.c: output also literal strings. Allocate parameter data
17375 with GC_malloc() (thanks, Martin, for catching this!).
17377 2002-03-26 Martin Baulig <martin@gnome.org>
17379 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
17380 include the `this' offset in the `param_offsets'.
17382 2002-03-25 Martin Baulig <martin@gnome.org>
17384 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
17385 mono_debug_get_class() function to get the classes. Added new
17386 relocation types for arrays and strings.
17387 (mono_debug_get_class): New static function to search in all
17388 referenced assemblies for a metadata token.
17390 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
17392 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
17394 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
17395 hold gc-allocated objects. Make the string heap a stream like the
17396 others. Removed duplicated code when writing stream info.
17397 Added asserts to catch possible buffer overflows. Set the sorted map
17398 for tables that need sorting. Added some documentation.
17400 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
17402 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
17403 for interned strings and vtables.
17405 2002-03-24 Martin Baulig <martin@gnome.org>
17407 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
17408 it in the array since it was created with g_slist_prepend().
17410 2002-03-24 Martin Baulig <martin@gnome.org>
17412 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
17413 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
17414 (mono_debug_method_from_token): Renamed to
17415 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
17416 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
17418 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
17421 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
17423 2002-03-24 Martin Baulig <martin@gnome.org>
17425 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
17426 (mono_debug_method_from_token): New func.
17428 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
17429 New interncall, calls mono_debug_local_type_from_signature().
17430 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
17431 calls mono_debug_method_from_token().
17433 2002-03-23 Martin Baulig <martin@gnome.org>
17435 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
17436 specifies the number of bytes to be converted, not the array size.
17437 Return the number of chars, not the number of bytes.
17438 (ves_icall_iconv_get_chars): The `byteCount' argument
17439 specifies the number of bytes to be converted, not the array size.
17441 2002-03-23 Martin Baulig <martin@gnome.org>
17443 * reflection.h (MonoReflectionSigHelper): New type.
17445 * reflection.c (mono_reflection_sighelper_get_signature_local),
17446 (mono_reflection_sighelper_get_signature_local): New functions.
17448 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
17449 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
17452 2002-03-23 Martin Baulig <martin@gnome.org>
17454 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
17455 is_writeable is set.
17456 (mono_raw_buffer_update): New function to write the modified map
17459 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
17461 * debug-symfile.c (mono_debug_update_symbol_file): Call
17462 mono_raw_buffer_update() when done writing.
17464 2002-03-23 Martin Baulig <martin@gnome.org>
17466 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
17468 * debug-symfile.c: Added support for arguments and local variables.
17470 2002-03-23 Dick Porter <dick@ximian.com>
17472 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
17473 protected by ifdefs, hence breaking the w32 build.
17475 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17477 * object.c: implement is_interned() the right way.
17479 2002-03-21 Martin Baulig <martin@gnome.org>
17481 * debug-symfile.[ch]: New files to handle debugging information
17482 files. There's also support to dynamically update these symbol
17483 files to include machine dependent information.
17485 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
17487 * threads.c (mono_thread_create): new function to create thread
17490 2002-03-20 Martin Baulig <martin@gnome.org>
17492 * icall.c (ves_icall_InternalInvoke): Create a new object if the
17493 method is a constructor.
17494 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
17495 points to ves_icall_InternalInvoke().
17497 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
17499 * file-io.c: Flush shouldn't throw exceptions.
17501 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
17503 * file-io.c: FileStream flush support; FileSetLength now
17504 restores file pointer.
17506 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17508 * class.c: set image for pointer classes.
17510 2002/03/19 Nick Drochak <ndrochak@gol.com>
17512 * sysmath.c: Forgot one.
17514 2002-03-18 Miguel de Icaza <miguel@ximian.com>
17516 * sysmath.c: Avoid redefining existing names.
17518 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
17520 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
17521 handled by runtime as icall rather than dllimport from libm.so
17522 * file-io.c, file-io.h: fixed handle argument type.
17524 2002-03-18 Dick Porter <dick@ximian.com>
17526 * reflection.c (mono_image_get_type_info): rename interface to
17527 iface, because of "#define interface struct" on windows.
17529 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
17531 * class.c, class.h: rename and export mono_ptr_class_get().
17532 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
17533 * reflection.c, reflection.h, icall.c: better/saner type name
17534 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
17537 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
17539 * class.c (mono_class_init): removed hardcoded GHC_SLOT
17541 * icall.c (ves_icall_InternalInvoke): impl.
17543 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17545 * reflection.c: output the interface map table, too.
17547 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
17549 * class.c (class_compute_field_layout): separate computation of
17550 static field layout
17552 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
17554 * icall.c: added System.Buffer support.
17555 * file-io.c: moved file icalls from PAL to FileStream.
17557 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
17559 * icall.c (ves_icall_System_Object_GetHashCode): impl.
17561 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
17563 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
17565 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17567 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
17569 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
17571 * debug-helpers.{c,h}: moved here from monograph some useful functions
17572 to locate a method by name/signature in a class or image. Included
17573 also a small and flexible IL disassembler.
17575 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17577 * reflection.c: fixup tokens in methods with small header size, too.
17579 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
17581 * object.c (mono_string_to_utf8): remove assert(!error), instead
17584 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
17586 * icall.c: update to the new mono_Array_class_get interface.
17588 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
17590 * appdomain.c, object.c: Boehm-GC enable.
17591 * icall.c: make get_data_chunk() support split data requests.
17592 Ensure a class is initialized in more cases. Return only the first
17593 property found in GetProperties() or the compiler gets confused.
17594 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
17595 * reflection.h, reflection.c: add fixup mechanism for field and method
17596 tokens. Initialize assembly->typeref in a single place. Output
17597 properties after events. Support custom attributes for events, too.
17598 Typo fix for paramter custom attrs.
17600 2002-03-07 Martin Baulig <martin@gnome.org>
17602 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
17604 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
17606 * class.c (mono_array_class_get): fix. for multi. dim. arrays
17608 2002-03-06 Martin Baulig <martin@gnome.org>
17610 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
17611 non-zero lower bounds. See testcases #F10-#F13.
17613 2002-03-05 Martin Baulig <martin@gnome.org>
17615 * exception.c (mono_get_exception_argument_out_of_range): New exception.
17617 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
17618 ves_icall_System_Array_GetValue(), only calculate the absolute array position
17620 (ves_icall_System_Array_SetValue): Likewise.
17621 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
17622 as argument and does the actual work. This function is used when copying a
17623 multi-dimensional array.
17624 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
17625 now do all the widening conversions of value types.
17626 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
17628 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17630 * class.c: remove some magic numbers and use the smbolic names,
17631 instead. Added init_events() to load event info at class init time.
17632 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
17633 and mono_metadata_methods_from_event().
17634 * reflection.h, reflection.c: added support for writing out the evnets
17635 related information.
17637 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
17639 * reflection.h, icall.c: use a different method (GetInterfaces)
17640 to gather interface info and add isbyref, isprimitive and
17641 ispointer to the ves_icall_get_type_info() return value.
17643 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
17645 * class.h: stared adding support for events.
17646 * icall.c: split find_members implementation. Added debug icall to get
17647 the address of an object.
17648 * reflection.c: handle TypeBuilders in mono_type_get_object().
17650 2002-03-01 Martin Baulig <martin@gnome.org>
17652 * icall.c (ves_icall_System_Array_GetLength): This must throw an
17653 ArgumentOutOfRangeException(), not an ArgumentException().
17654 (ves_icall_System_Array_GetLowerBound): Likewise.
17655 (ves_icall_System_Array_GetValue): Improved argument checking.
17656 (ves_icall_System_Array_SetValue): Improved argument checking.
17658 2002-03-01 Martin Baulig <martin@gnome.org>
17660 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
17661 called with invalid arguments rather than just dying with g_assert().
17662 (ves_icall_System_Array_SetValue): Likewise.
17663 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
17664 raise a NotImplementedException instead.
17665 (ves_icall_System_Array_GetLength): Added argument checking.
17666 (ves_icall_System_Array_GetLowerBound): Added argument checking.
17668 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
17670 * object.h (mono_assert): new macros mono_assert and
17671 mono_assert_not_reached
17673 2002-02-28 Martin Baulig <martin@gnome.org>
17675 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
17676 and "System::String::IsInterned" to "System::String::_IsInterned".
17678 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
17680 * icall.c: remove hacks for typebuilder. Added icall to create a
17681 modified type from a tybebuilder.
17682 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
17683 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
17684 to create a backing MonoClass for a TypeBuilder.
17686 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17688 * class.c, class.h: more refactoring of class init.
17689 Export mono_class_setup_mono_type() and mono_class_setup_parent().
17691 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
17693 * marshal.c, marshal.h: start of marshaling interface.
17695 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
17697 * icall.c: fix order in assembly qualified name icall.
17699 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
17701 * class.c: do not free str, since we store it in the hash table.
17702 * reflection.h: add label field to MonoILExceptionInfo.
17703 * reflection.c: handle references to more than one assembly. Handle
17704 case when there isn't a module created in the assembly.
17706 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
17708 * class.c: Fix typo. Start refactoring of class init code.
17710 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
17712 * appdomain.c: exit with 1 on error.
17713 * class.c: we already have the name in MonoClassField.
17714 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
17715 MonoStreamHeader instead of an offset of image->raw_metadata.
17717 2002-02-26 Miguel de Icaza <miguel@ximian.com>
17719 * appdomain.c (mono_init): Be even more descriptive about the error.
17721 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
17723 * appdomain.c: give the user an informative message when corlib can't
17726 2002-02-26 Martin Baulig <martin@gnome.org>
17728 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
17729 New icall to get the time zone data.
17731 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17733 * reflection.c: set virtual and raw size of section correctly.
17734 * threads.c: transfer domain information to newly created threads.
17736 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
17738 * class.c: when instancing a class in a domain, load the default
17739 vaules for static fields from the constant table. Fix System.Enum to
17741 * icall.c: implement Object::GetType() internalcall. Implemented
17742 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
17743 Fixed checking of binding flags in find_members().
17744 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
17745 * reflection.c: handle enumerations when writing to the constant
17746 table. Use a different object cache for types.
17749 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
17751 * object.c (mono_object_isinst): fix for arrays
17753 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
17755 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
17757 * object.c: don't use mprotect () and fix intern pool hash table
17758 lookup for big endian systems.
17760 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17762 * icall.c: change type_is_subtype_of () signature.
17764 2002-02-21 Mark Crichton <crichton@gimp.org>
17766 * rand.c, rand.h: Added random number generator for
17767 System.Security.Cryptography classes.
17769 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
17771 * icall.c: Added System.Security.Cryptography calls.
17773 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
17775 * class.c, icall.c, metadata.c: better support for pointer types.
17776 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
17777 * reflection.c: Add support for getting custom attrs for properties
17778 and simplify some code.
17780 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
17782 * icall.c: change getToken () and add custom attribute GetBlob()helper
17784 * reflection.h: add custom attrs array to the reflection builder structures.
17785 * reflection.c: encode and emit custom attributes for all the relevant
17786 reflection objects. Cache fieldref and methodref tokens. Change
17787 mono_image_create_token() interface to take a MonoDynamicAssembly.
17788 More complete custom attributes decoder. Load custom attributes for
17789 Assembly, Field, Method and Constructor objects, too. Make the
17790 returned array an Attribute[] one, not object[]. Added
17791 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
17792 custom attribute constructor.
17794 2002-02-20 Dick Porter <dick@ximian.com>
17798 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
17799 problem code out for now).
17801 2002-02-19 Radek Doulik <rodo@ximian.com>
17803 * object.c (mono_ldstr): use hash table to avoid multiple swapping
17805 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
17807 * icall.c: register the GetCustomAttributes method.
17808 * object.c, object.h: add mono_string_new_len ().
17809 * reflection.h, reflection.c: added mono_runtime_invoke(),
17810 mono_install_runtime_invoke(). Added
17811 mono_reflection_get_custom_attrs () to load custom attributes and
17812 create the attribute objects.
17814 2002-02-19 Dick Porter <dick@ximian.com>
17815 * threads-dummy-types.c:
17816 * threads-dummy-types.h:
17819 * threads-pthread-types.c:
17820 * threads-pthread-types.h:
17821 * threads-pthread.c:
17822 * threads-pthread.h: Deleted obsolete files
17824 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
17826 * class.c (mono_class_vtable): runtime init the class when we
17827 allocate static class data.
17829 * icall.c (ves_icall_System_Array_SetValue): check for null values.
17831 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
17832 and String - but we will need generic marshalling support in the
17834 (mono_init): set the domain name in a ms compatible way
17836 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
17839 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
17841 * object.c (mono_array_clone): use alloca() instead of g_malloc
17844 * appdomain.c (mono_domain_unload): impl.
17846 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17848 * appdomain.c, object.c: fix intern pool implementation.
17849 * class.c: fix alignment code.
17851 2002-02-16 Radek Doulik <rodo@ximian.com>
17853 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
17854 and s2 > s1, just copy lower bytes to be compatible with little
17855 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
17856 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
17858 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
17859 force big_endian to be 1 for big endian machines
17860 (ves_icall_iconv_new_decoder): ditto
17862 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
17864 * socket-io.c (convert_sockopt_level_and_name): If the system
17865 doesn't define SOL_IP or SOL_TCP, get them by hand using
17866 getprotobyname() and caching the values (because this could be a
17868 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
17869 Use the appropriate struct when the system does support it. Ie,
17870 not all systems have struct ip_mreqn so use struct ip_mreq when
17873 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
17875 * reflection.c: handle finally clauses.
17877 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
17879 * socket-io.c: use g_snprintf() instead of snprintf.
17881 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
17883 * reflection.c (mono_param_get_objects): Cast second argument to
17884 mono_method_get_param_names to a const char** to silence the
17887 * appdomain.c (mono_domain_assembly_open): Put parens around the
17888 truth statement in the for-loop.
17890 * unicode.c (iconv_convert): Got rid of a compiler warning about
17891 int i being unused when the system has a new iconv.
17892 (iconv_get_length): Same.
17894 * image.c (load_class_names): Cast the second argument to
17895 g_hash_table_insert() to char* to hush compiler warnings about the
17897 (mono_image_open): Same here.
17899 * socket-io.c: Don't conditionally include sys/filio.h or
17900 sys/sockio.h here anymore since we now get them from
17901 io-layer/io-layer.h
17902 (inet_pton): If the system doesn't support inet_aton, implement
17903 using inet_addr and also #define INADDR_NONE if it isn't defined
17906 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
17908 * metadata.c, metadata.h: added function to get packing and size info
17910 * reflection.h, reflection.c: handle field RVA data. Save info about
17911 the table layout if needed. Assign typedef indexes to all the types
17912 before dumping the info about them to avoid forward reference problems.
17914 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
17916 * socket-io.c (convert_sockopt_level_and_name): ifdef
17917 SO_ACCEPTCONN because it is not defined on my system (old debian)
17919 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
17921 * opcode.c: use stddef.h to get NULL.
17923 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
17925 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
17926 for FIONBIO, FIONREAD and SIOCATMARK.
17927 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
17928 define INADDR_NONE and besides, inet_addr() is deprecated and
17929 should not be used. Use inet_pton() instead - it also has the
17930 added bonus that it can easily handle IPv6 addresses as well.
17931 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
17933 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
17935 * decimal.c: remove _MSC_VER conditional.
17937 2002-02-13 Dick Porter <dick@ximian.com>
17940 * icall.c: Internal calls for Blocking, Select, Shutdown,
17941 GetSocketOption and SetSocketOption
17943 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17945 * assembly.cs: better resolver: use it instead of some kludgy
17948 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
17950 * reflection.c: the best way to speed-up the compiler is to avoid
17953 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
17955 * class.c (mono_class_vtable): changed the object layout
17956 (obj->vtable->class).
17957 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
17959 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
17961 * assembly.c: look for assemblies in the assembly dir, too.
17963 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
17965 * class.c: fix thinko in mono_class_from_type().
17967 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
17969 * exception.h, exception.c: added TypeLoadException.
17970 * object.h, object.c: added mono_array_clone ().
17971 * icall.c: handle throwOnError in AssemblyGetType().
17972 Added Array.Clone().
17973 * opcode.h, opcode.c: use a single value for the opcode val.
17974 Compile fix for non-gcc compilers.
17976 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
17978 * opcodes.c, opcodes.h: export interesting info about opcodes.
17980 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
17982 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
17985 * class.c (class_compute_field_layout): set element_class for enums
17986 (mono_class_create_from_typedef): set element_class for normal classes
17988 * icall.c (ves_icall_System_Enum_get_value): impl.
17990 * class.c (mono_class_create_from_typedef): do not set valuetype
17991 flag for System.ValueType and System.Enum
17993 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
17995 * unicode.c (iconv_convert): fix big endian problem.
17997 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
17999 * class.c: add asserts if we are ever going to scribble over memory.
18000 * socket-io.c: not all systems have AF_IRDA defined.
18002 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
18004 * class.c (class_compute_field_layout): do not consider static
18005 fields to compute alignment
18007 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
18009 * appdomain.c (mono_appdomain_get): impl.
18010 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
18012 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
18014 * icall.c: ignore "file://" prefix when loading an assembly.
18016 2002-01-23 Dick Porter <dick@ximian.com>
18020 * Makefile.am: Added socket support
18022 2002-01-23 Miguel de Icaza <miguel@ximian.com>
18024 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
18025 code back. This should return the assemblies that are loaded by
18026 the runtime on behalf of an application domain.
18028 The current implementation is still broken, it just returns every
18029 assembly loaded, but until we get real applications domain this
18032 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
18034 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
18037 2002-01-23 Miguel de Icaza <miguel@ximian.com>
18039 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
18040 the mono_class_from_name lookup.
18041 (ves_icall_get_parameter_info): ditto.
18042 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
18044 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
18046 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
18048 * class.c: load also nested classes on class init.
18049 System.ValueType instance methods gets passed boxed
18050 values, unless methods in derived classed that get a pointer to the
18052 * icall.c: use better name parsing code in GetType().
18053 * image.c, image.h: add mono_image_loaded ().
18054 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
18055 * reflection.c, reflection.h: added mono_reflection_parse_type().
18057 2002-01-22 Veronica De Santis <veron78@interfree.it>
18059 * icall.c : Added mapping of internal calls for Manual and Auto reset events
18060 * threads.c : Added the implementation of internal calls for events
18061 * threads.h : Added prototypes of internal calls for events
18063 2002-01-21 Radek Doulik <rodo@ximian.com>
18065 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
18067 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
18069 * class.c (mono_class_init): set min_align to 1 (instead of 0)
18070 (mono_class_value_size): use min_align
18072 2002-01-20 Dick Porter <dick@ximian.com>
18075 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
18076 so it compiles on w32.
18078 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
18080 * metadata.c (mono_type_stack_size): impl.
18082 * class.c (mono_class_get_field): impl. memberref token
18084 2002-01-16 Veronica De Santis <veron78@@interfree.it>
18086 * icall.h : Added the internal calls mapping for CreateMutex_internal
18087 and ReleaseMutex_internal.
18088 * threads.h : Added the prototype of mutexes internal calls.
18089 * threads.c : Added the implementations of mutexes internal calls.
18091 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
18093 * metaparse.h: removed unused file.
18094 * reflection.c, reflection.h: added stream_data_align () function
18095 to align data in streams and keep stream aligned. Add support for
18096 exception support in method headers.
18098 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
18100 * unicode.c: make iconv_convert () return the number of bytess written
18101 in the output buffer.
18103 2002-01-15 Dick Porter <dick@ximian.com>
18104 * threads.c: Make the runtime's idea of infinite timeouts coincide
18105 with the class library's
18107 Fix a particularly egregious bug in mono_thread_cleanup(). That
18108 code was so utterly bogus it must have been written on a Monday.
18110 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
18112 * reflection.h: add subtypes field to TypeBuilder.
18113 * reflection.c: encode constants for literal fields.
18114 Handle subtypes. Fix user string token (and add a zero byte)
18117 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
18119 * class.c (mono_class_init): bug fix: assign slot numbers for
18122 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
18124 * reflection.c: don't try to output a code RVA for abstract methods.
18125 Small fixes for method header format. Output parameter info to the
18126 ParamDef table. Save method overriding info to MethodImpl table.
18127 Fix property support. Allow typedef.extends to be a type in the
18129 * verify.c: fix off-by-one error.
18131 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
18133 * class.c: fix mono_class_from_mono_type () for szarray types.
18134 Remove unused cache check in mono_class_from_type_spec().
18135 * icall.c: *type_from_name () functions handle simple arrays and byref.
18136 * reflection.c: handle byref and szarray types. Handle methods without
18137 body (gets P/Invoke compilation working). Handle types and fields in
18139 * reflection.h: add rank to MonoTypeInfo.
18141 2002-01-10 Dick Porter <dick@ximian.com>
18143 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
18146 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
18148 * icall.c: initialize class in type_from_handle ().
18149 Loop also in parent classes for get_method ().
18150 * reflection.c: properly encode class and valuetype types.
18151 Start on encoding TypeBuilder types. Handle fieldrefs.
18152 Use correct length when registering a user string.
18153 Handle ConstructorBuilder and MonoMethod in get_token ().
18154 Make mono_type_get_object () aware of cached types.
18155 * object.c: back out change to mono_string_new ().
18157 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
18158 * object.c: mono_string_new should return a NULL when the string
18159 passed in is NULL -- not try to deference it.
18161 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
18163 * icall.c: hack to make IsSubType work for TypeBuilders.
18164 * reflection.c: emit constructors before methods.
18165 Retrieve param names in mono_param_get_objects().
18167 2002/01/05 Nick Drochak <ndrochak@gol.com>
18169 * Makefile.am: fix list of headers and sources so automake 1.5
18170 doesn't complain. Removed \# at end of list.
18172 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
18174 * reflection.c: get token for a method ref. Set return type of
18175 constructor to void.
18176 * loader.c: debug message.
18177 * class.c: typo fix.
18179 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
18181 * icall.c: fix array init with rank > 1. FindMembers
18182 loops in parent class as well.
18183 * image.c: do not insert nested types in name cache.
18184 * reflection.c: warning fix.
18185 * reflection.h: add override method (for interface impl).
18187 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
18189 * metadata.c: fix customattr decoding.
18191 2001-12-21 Miguel de Icaza <miguel@ximian.com>
18193 * rawbuffer.cs: Added native Win32 implementation, avoids using
18194 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
18196 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
18198 * class.c: make the low-level routines handle the cache.
18200 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
18202 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
18204 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
18206 * class.c: fix mono_array_element_size() for objects.
18207 * class.h, class.c: add properties to MonoClass and load them
18209 * icall.c: check with isinst() when assigning a value to an array
18210 instead of requiring the classes to match exactly.
18211 Implemented icall for System.Type::GetType().
18212 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
18213 enums. Handle bindingflags when looking for methods and fields.
18214 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
18215 and mono_metadata_methods_from_property().
18216 * reflection.h, reflection.c: added structures for propreties,
18217 parameters and enums. Implemented mono_property_get_object() and
18218 mono_param_get_objects().
18220 2001-12-18 Dick Porter <dick@ximian.com>
18222 * file-io.c: Use mono_string_to_utf16() instead of
18223 mono_string_chars()
18225 * object.c: Added mono_string_to_utf16(), which copies the non
18226 NULL-terminated MonoString into a new double-null-terminated
18229 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
18231 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
18233 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
18235 * file-io.c: raise exceptions if handle is invalid.
18237 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
18239 * assembly.c: yet another check for mscorlib.
18240 * class.c, class.h: load nesting info for classes.
18241 * icall.c: many new functions to support the Reflection classes.
18242 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
18243 * reflection.h, reflection.c: mono_image_create_token(),
18244 mono_assembly_get_object(), mono_type_get_object(),
18245 mono_method_get_object(), mono_field_get_object(): methods to return
18246 objects that parallel the C representation of assemblies, types,
18249 2001-12-11 Dick Porter <dick@ximian.com>
18252 * file-io.c: Internal calls for file IO.
18254 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
18256 * tabledefs.h: missing FileAttributes.
18257 * verify.h, verify.c: use is_valid_string () to simplify and check for
18258 valid strings more correctly. Fix warnings and speeling.
18259 Check more tables: Filed, File, ModuleRef, StandAloneSig.
18260 Check code: branches, maxstack, method calls.
18262 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
18264 * object.c (mono_object_allocate): removed static, so that the jit
18265 can allocate value types.
18267 * icall.c (ves_icall_System_DateTime_GetNow): impl.
18269 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18271 * class.c: init enum types right away and register the
18272 token->MonoClass map in mono_class_create_from_typedef ().
18273 * verify.h, verify.c: first cut of the verifier.
18274 * pedump.c: add --verify switch to verify metadata tables.
18275 * tabledefs.h: add some missing enums.
18277 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
18279 * class.c (mono_install_runtime_class_init): impl.
18280 (mono_class_init): renamed mono_class_metadata_init to
18281 mono_class_init, also removed the metadata_inited flag
18283 * object.c (mono_object_isinst): use faster algorithm
18285 2001-11-30 Radek Doulik <rodo@ximian.com>
18287 * mono-endian.h: reverted last change
18288 added function prototypes
18290 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
18291 add mono-endian.c back
18293 * mono-endian.c: returned back, as Paolo pointed out, it's needed
18294 for unaligned access, I've mistaked it with endianess. I am
18296 (mono_read16): fix reverted endianess
18297 (mono_read64): ditto
18298 (mono_read32): ditto
18300 2001-11-30 Dick Porter <dick@ximian.com>
18302 * exception.c: Implement mono_exception_from_name()
18304 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18306 * metadata.h, metadata.c: remove params_size and locals_size and their
18307 calculation from the metadata code: they are only usefult to the
18310 2001-11-29 Radek Doulik <rodo@ximian.com>
18312 * object.c (mono_ldstr): swap bytes here, it's probably not the
18313 best place, but works for me now, I'll redo it once I know mono
18314 better, also note that I add PROT_WRITE and don't reset back, also
18315 note that it's only affects big endians, so x86 should be OK
18317 * mono-endian.h (read16): use just glib macros for both endians
18319 * mono-endian.c: removed as glib macros are used in in
18320 mono-endian.h so we don't need to care about endianess for read
18321 macros as glib does that for us already
18323 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
18325 * class.h, class.h: take minimum alignment into consideration so
18326 that the fields of a class remain aligned also when in an array.
18328 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18330 * loader.h, loader.c: add mono_method_get_param_names().
18331 * class.c: 0-init class fields.
18333 2001-11-26 Dick Porter <dick@ximian.com>
18337 * threads.c: New file that handles System.Threading on all platforms
18340 * object.h: Remove the synchronisation struct from MonoObject,
18341 replace it with a pointer that gets initialised on demand
18343 * Makefile.am: Replace all the system-specific threading code with
18344 a single file that uses the new wrapper library
18346 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
18348 * class.c, class.h: add mono_install_trampoline() so that the runtime
18349 can register a function to create a trampoline: removes the ugly
18350 requirement that a runtime needed to export arch_create_jit_trampoline.
18351 * object.h, object.c: added mono_install_handler() so that the runtime
18352 can install an handler for exceptions generated in C code (with
18353 mono_raise_exception()). Added C struct for System.Delegate.
18354 * pedump.c: removed arch_create_jit_trampoline.
18355 * reflection.c: some cleanups to allow registering user strings and
18356 later getting a token for methodrefs and fieldrefs before the assembly
18358 * row-indexes.h: updates and fixes from the new ECMA specs.
18360 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
18362 * class.h, class.c: add enum_basetype field to MonoClass.
18363 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
18364 to get index in the constant table reated to a field, param or
18366 * reflection.h, reflection.c: handle constructors. Set public-key and
18367 version number of the built assembly to 0.
18368 * row-indexes.h: update from new ECMA spec.
18370 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18372 * class.h, class.c: add a max_interface_id to MonoClass.
18373 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
18374 since it's used to do that. Added mono_type_type_from_obj().
18375 Make GetType() return NULL instead of segfaulting if the type was not
18376 found. Handle simple arrays in assQualifiedName.
18377 * object.h: add a struct to represent an Exception.
18378 * reflection.c: output call convention in method signature.
18379 Add code to support P/Invoke methods and fixed offsets for fields.
18381 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
18383 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
18385 * icall.c: use mono_array_addr instead of array->vector: fixes the
18386 reflection image writing.
18387 * reflection.c: init call convention byte to 0 in method signature.
18388 Encode the property signature. Don't output property-related methods
18389 twice. Really process the properties for a type (don't cast a field to
18390 a property, my mom always told me that).
18391 Fix 64 bit issues in pointer alignment in a different and more
18394 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
18396 * loader.h: Removed type class from MonoDefaults, added monotype
18398 * loader.c: Loaded MonoType, removed loading of Type
18400 * icall.c (my_mono_new_object): Now returns a System.MonoType,
18401 and fills in System.Type._impl with a RuntimeTypeHandle rather
18402 than the actual MonoClass *
18404 (ves_icall_type_from_handle): change from type_class to
18407 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
18410 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
18413 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
18415 (ves_icall_System_Reflection_Assembly_GetType): implemented
18417 (ves_icall_System_MonoType_assQualifiedName): implemented
18419 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
18421 2001-11-09 Miguel de Icaza <miguel@ximian.com>
18423 * assembly.c (mono_assembly_open): Implement a cache for the
18426 (mono_assembly_close): only destroy the assembly when the last
18429 2001-11-09 Dick Porter <dick@ximian.com>
18431 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
18433 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
18435 * class.c (mono_class_metadata_init): bug fix: compute the right slot
18437 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
18439 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
18440 from Martin Weindel.
18441 * object.h: add mono_string_chars ().
18443 2001-11-07 Miguel de Icaza <miguel@ximian.com>
18445 * reflection.c (build_compressed_metadata): Eliminates warnings
18446 and uses 64-bit clean code.
18448 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
18449 (mono_type_equal): Change signature to eliminate warnings.
18451 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
18453 * icall.c, loader.c: remove the internalcall array constructors.
18454 Changes to match the new MonoArray structure.
18455 * object.h, object.c: an array object doesn't allocate an extra
18456 vector. Add mono_array_new_full () to create jagged arrays easily.
18458 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
18460 * metadata.h, metadata.c: add mono_metadata_field_info () to
18461 retreive all the info about a field from vairous tables.
18462 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
18463 * class.h, class.c: augment MonoClassField with more info.
18464 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
18465 policy and load a field's RVA if needed.
18467 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
18469 * class.c (mono_class_metadata_init): create a trampoline for all
18470 virtual functions instead of actually compiling them.
18472 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
18474 * class.h, class.c: include name in MonoClassField.
18475 * class.c: fix fundamental type of System.Object and System.String.
18476 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
18478 * icall.c: remove internalcalls for the Reflection stuff that is now
18480 * loader.c: mono_field_from_memberref () implementation.
18481 * mono-endian.c: thinko (s/struct/union/g).
18482 * object.c, object.h: make the mono_string_* prototypes actually use
18483 MonoString instead of MonoObject.
18484 * reflection.c, reflection.h: updates for changes in the reflection
18485 code in corlib: we use C structures that map to the actual C# classes.
18486 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
18487 fat method header if needed and use the info from the ILGenerator for
18488 methods. Handle fields in types. Misc fixes.
18490 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
18492 * class.c (mono_class_metadata_init): bug fix: always allocate
18493 space for static class data
18495 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
18497 * class.c (mono_compute_relative_numbering): use relative
18498 numbering to support fast runtime type checks.
18500 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
18502 * class.c (mono_class_create_from_typeref): added debugging output
18503 to print class name when MonoDummy is returned instead of real class
18505 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
18507 * class.c (mono_class_metadata_init): interface offset table now
18508 contains pointers into the vtable - this is more efficient for the jit
18510 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
18512 * class.c (mono_class_metadata_init): use a temporary vtable (the
18513 old algorithm only worked for the interpreter, but not for the jit)
18515 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
18517 * loader.c (method_from_memberref): use mono_class_get to get the
18518 class of an array instead of using System.Array directly.
18519 (mono_get_method): also add MEMBERREF methods to the method cache
18520 which usefull for arrays.
18522 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
18524 * pedump.c (arch_compile_method): added to compute vtable entry
18526 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
18527 number of interfaces.
18529 * class.h: merged MonoArrayClass into MonoClass
18531 * class.c (mono_class_create_from_typedef): compute the vtable size and
18532 allocate space to include the vtable inside MonoClass
18533 (mono_class_metadata_init): initialize the vtable
18535 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
18537 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
18538 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
18539 * image.c: endian fixes by Laurent Rioux.
18540 * object.h, object.c: rename MonoStringObject to MonoString and
18541 MonoArrayObject to MonoArray. Change some function names to conform to
18542 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
18543 guint16* as first argument, so don't use char*.
18544 Provide macros to do the interesting things on arrays in a portable way.
18545 * threads-pthread.c: updates for the API changes and #include <sched.h>
18546 (required for sched_yield()).
18547 * icall.c: updates for the API changes above.
18548 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
18549 platforms that need them.
18551 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18553 * class.c: set the correct type for all the fundamental
18554 type when loading the class.
18556 2001-10-05 Dick Porter <dick@ximian.com>
18558 * threads-pthread.c (pthread_mutex_timedlock): Simple
18559 compatibility version for C libraries that lack this call.
18561 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18563 * class.c: MonoTypes stored in MonoClass are stored as
18564 fundamental MonoTypes when the class represents a
18565 fundamental type (System.Int32, ...).
18566 The TypeHandle return by ldtoken is a MonoType*.
18567 * icall.c: ves_icall_get_data_chunk () write out all the
18568 PE/COFF stuff. Implement ves_icall_define_method (),
18569 ves_icall_set_method_body (), ves_icall_type_from_handle ().
18570 * image.c: properly skip unknown streams.
18571 * loader.h, loader.c: add type_class to mono_defaults.
18572 * metadata.c, metadata.h: export compute_size () as
18573 mono_metadata_compute_size () with a better interface.
18574 Typo and C&P fixes.
18575 * pedump.c: don't try to print the entry point RVA if there is no entry point.
18576 * reflection.c, reflection.h: many cleanups, fixes, output method
18577 signatures and headers, typedef and typeref info, compress the metadata
18578 tables, output all the heap streams, cli header etc.
18579 * row-indexes.h: typo fixes.
18581 2001-10-04 Dick Porter <dick@ximian.com>
18583 * object.h: Add a synchronisation mutex struct to MonoObject
18585 * object.c (mono_new_object): Initialise the object
18586 synchronisation mutexes
18588 * icall.c: System.Threading.Monitor internal calls
18590 * threads-pthread.h:
18591 * threads-pthread.c: System.Threading.Monitor internal calls
18593 * threads-types.h: New file, includes the system-specific thread
18596 * threads-pthread-types.h:
18597 * threads-pthread-types.c: New files, handle pthread-specific
18598 synchronisation types
18600 * threads-dummy-types.h:
18601 * threads-dummy-types.c: New files of dummy support for
18602 thread-specific types
18606 * pedump.c: include mono-endian.h not endian.h
18608 * Makefile.am: More threads files.
18609 Name mono-endian.h not endian.h
18611 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
18613 * Makefile.am, reflection.h, reflection.c: move here the reflection related
18614 stuff and implement a few more bits.
18615 * icall.c: a field needs to be dereferenced twice. Do not use the same
18616 name for two variables in the same scope.
18617 * image.c, image.h: cleanups.
18619 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
18621 * class.c (mono_class_metadata_init): bug fix: compute the right size
18623 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
18625 * icall.c: implemented some of the Reflection internalcalls.
18626 * image.c, image.h: start writing out the PE/COFF image.
18627 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
18628 that does the reverse than decode_blob_size ().
18629 * object.c: use mono_metadata_encode_value (). Move here
18630 temporary implementation of mono_string_to_utf8 ().
18631 * rawbuffer.c: make malloc_map static.
18633 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18635 * metadata.c: fix type comparison for arrays.
18636 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
18637 Added a couple of new classes to monodefaults.
18638 * icall.c: added a couple of Reflection-related internalcalls.
18639 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
18640 Added a byval_arg MonoType to MonoClass.
18642 2001-09-28 Dick Porter <dick@ximian.com>
18645 * threads-pthread.h:
18646 * threads-pthread.c: Implemented internal calls for
18647 LocalDataStoreSlot operations. Applied mutexes around all shared
18648 data. Reworked the thread creation and Start() operations to
18649 avoid a race condition.
18652 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
18654 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
18656 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
18658 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
18660 * class.c, loader.c: warn and return NULL instead of erroring out.
18661 * icall.c: added System.AppDomain::getCurDomain().
18662 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
18664 2001-09-25 Dick Porter <dick@ximian.com>
18666 * threads-pthread.h:
18667 * threads-pthread.c: Implemented timed thread joining and added
18668 System.Threading.Thread::Join_internal internal call
18670 * icall.c: Added System.Threading.Thread::Join_internal internal call
18673 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
18675 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
18677 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
18678 mono_string_intern () to implement the semantics of the ldstr opcode
18679 and the interning of System.Strings.
18680 * icall.c: provide hooks to make String::IsIntern and String::Intern
18683 2001-09-23 Dick Porter <dick@ximian.com>
18686 * threads-dummy.h: New files of dummy threading routines
18688 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
18689 support code based on system specifics
18691 Rename PTHREAD_LIBS to THREAD_LIBS
18693 2001-09-23 Dick Porter <dick@ximian.com>
18695 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
18696 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
18698 (mono_thread_init): Set up a Thread object instance to return when
18699 the main thread calls Thread.CurrentThread
18700 (mono_thread_cleanup): Wait for all subthreads to exit
18702 * icall.c: New internal calls for System.Threading.Thread::Sleep
18703 (including Schedule) and CurrentThread
18705 * threads.h: New file, to insulate thread-specific stuff from the
18708 2001-09-21 Dick Porter <dick@ximian.com>
18710 * threads-pthread.h:
18711 * threads-pthread.c: New file, for handling pthreads-style
18712 threading support. Start() now starts a new thread and executes
18713 the ThreadStart delegate instance.
18715 * icall.c: Added the internalcall for
18716 System.Threading.Thread::Start_internal
18718 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
18720 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
18722 * loader.c: work around the different signatures for delegates
18723 constructors csc generates in compiled code vs the ones compiled in mscorlib.
18725 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
18727 * class.h, class.c: add mono_class_get_field_from_name ().
18728 * *: Fix C comments and other ANSI C issues.
18730 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
18732 * endian.h, assembly.c: fix some endianness issues.
18734 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
18736 * loader.h, load.c: add delegate_class to mono_defaults.
18737 Handle runtime provided methods in mono_get_method ().
18739 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
18741 * loader.c (mono_get_method): use pinvoke for internal call
18743 * icall.c: use pinvoke for internal call
18745 * loader.c (method_from_memberref): set the method name
18747 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
18749 * metadata.c: help the compiler generate better code for
18750 mono_class_from_mono_type ().
18752 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
18754 * class.c (mono_class_metadata_init): delayed computing of the
18755 class size to mono_class_metadata_init ()
18757 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
18759 * class.c, class.h: add an interfaces member to MonoClass.
18760 * image.c, image.h: add assembly_name field to MonoImage
18761 from the assembly table.
18762 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
18764 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18766 * class.c: Handle Array in mono_class_from_mono_type ().
18767 * metadata.c, pedump.c: some endian fixes.
18769 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
18771 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
18772 * metadata.c: fix small problem introduced with the latest commit.
18774 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
18776 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
18777 We don't need a MonoMetadata pointer anymore to compare signatures in
18778 mono_metadata_signature_equal (), update callers.
18779 Reduced memory usage an number of allocations for MonoMethodHeader and
18780 MonoMethodSignature.
18782 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
18784 * metadata.c: added compare for szarray.
18786 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
18788 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
18789 and add a couple more types to it and mono_defaults. Give an hint on
18790 classes that need implementing in our corlib and are referenced
18793 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
18795 * class.h, class.c: keep track if a class is also an Enum.
18796 * loader.c: Implement a couple more types for use in libffi
18797 marshalling. Gives better diagnostics when failing to dlopen
18798 a library. Set method->klass for P/Invoke methods, too.
18800 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
18802 * class.c, class.h: add a MonoType this_arg to MonoClass that
18803 represents a pointer to an object of the class' type that
18804 can be used by the interpreter and later the type cache.
18805 Add best guess alignment info for valuetype objects.
18807 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
18809 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
18810 into MonoType: one less level of indirection and allocation and
18811 simplifies quite a bit of code. Added cache for MonoTypes that are
18812 used frequently, so that we don't need to allocate them all the time.
18814 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
18816 * class.c (mono_class_create_from_typedef): System.Enum is also a
18817 value type, although it does not derive from System.ValueType
18818 (maybe a bug in the ms compiler?)
18820 * metadata.c (mono_type_size): return the right size for value types
18822 * loader.c (mono_get_method): only initialize method header if not abstract
18824 * class.c (mono_class_from_mono_type): use mono_default values.
18826 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
18828 * *: use MonoClass pointers instead of <type_tokens>
18830 * class.h: new flag: metadata_inited.
18832 * class.c (mono_class_metadata_init): impl.
18833 (mono_class_instance_size): impl.
18834 (mono_class_data_size): impl.
18836 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
18838 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
18839 MonoClass now has the name and name_space fields.
18840 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
18841 mono_get_method () takes and optional MonoClass as argument.
18842 Removed mono_typedef_from_name() and added mono_class_token_from_name()
18843 instead that takes advantage of a map from class names to typedef
18844 tokens in MonoImage.
18846 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
18848 * metadata.c: zero is not a valid alignment boundary.
18849 Merge MONO_TYPE_VOID in default decoding code.
18851 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
18853 * image.h: merged MonoMetadata into MonoImage
18855 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
18856 identify the type of elements.
18858 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
18860 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
18861 * cil-coff.h: split MonoMSDOSHeader and add size info.
18862 * image.c: add some consistency checks.
18863 * metadata.c: fix row size computation: one programmer
18864 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
18865 add explanation for the locator routine.
18866 Fix decoding of size in method header.
18868 2001-08-20 Miguel de Icaza <miguel@ximian.com>
18870 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
18871 (g_concat_dir_and_file): Bring g_concat_dir_and_file
18872 function from gnome-libs. This uses the right path separator
18873 based on the OS, and also works around a bug in some systems where
18874 a double slash is not allowed.
18875 (default_assembly_name_resolver): Use g_concat_dir_and_file
18876 (mono_assembly_open): ditto.
18878 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
18880 * metadata.c (mono_metadata_signature_equal): impl.
18882 * *: void is now a realy MonoType (instead of using NULL)
18884 * metadata.c (do_mono_metadata_parse_type): use
18885 mono_metadata_parse_type to parse void value.
18887 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
18889 * metadata.c, metadata.h: in the signature and method header store
18890 only the space required for holding the loca vars and incoming arguments.
18892 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
18894 * metadata.c (do_mono_metadata_parse_type): treat void like any
18895 other type (instead of assigning NULL);
18897 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
18899 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
18901 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
18903 * image.c (do_mono_image_open): added a cache for arrays.
18905 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18907 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
18908 decode a single column from a row in a metadata table and changes
18909 to take advantage of it in the typedef locator (gives a nice speed up).
18910 Store offset info for function params.
18912 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
18914 * image.h (MONO_IMAGE_IS_CORLIB): removed
18916 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
18918 * assembly.c: how could mono_assembly_close () had ever worked?
18919 * metadata.c, metadata.h: provide offset info for local vars.
18920 Implement mono_type_size () to take care of alignment as well
18921 as size (it was mono_field_type_size in cli/class.c before).
18923 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
18925 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
18927 * assembly.h (CORLIB_NAME): set to corlib.dll
18929 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
18931 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
18933 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
18934 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
18935 tokentype.h: massive namespace cleanup.
18937 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
18939 * metadata.h, metadata.c: decode exception clauses when parsing method header.
18941 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
18943 * metadata.c (mono_metadata_free_type): added check for type !=
18944 NULL (void) before calling mono_metadata_free_type()
18946 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
18948 * metadata.h, row_indexes.h: added header with enumerations to use
18949 to index in the columns from tables in metadata and to decode coded
18950 tokens: we should start using this instead of embedding magic numbers
18953 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
18955 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
18956 Move metadata_t info from cli_image_info_t to MonoImage, where
18957 it's easily accessible. Changed all the uses accordingly.
18958 Added the method and class caches to MonoImage.
18959 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
18960 and mono_metadata_decode_value () signature to be more consistent
18961 with the other parse functions (and simplify code). Taken advantage
18962 of zero-length array allocation with GCC. Removed reduntant (and
18963 wrong) MonoFieldType struct and use MonoParam instead. Changed
18964 mono_metadata_parse_field_type () to use common code for parsing.
18965 Added mono_metadata_typedef_from_field () and
18966 mono_metadata_typedef_from_method () to lookup a typedef index from a
18967 field or method token.
18968 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
18970 2001-07-23 Miguel de Icaza <miguel@ximian.com>
18972 * metadata.c (mono_metadata_parse_field_type): Implement.
18973 (do_mono_metadata_parse_type): Split engine from
18974 mono_metadata_parse_type, so that we can create smaller structures
18975 for things that just have one pointer to the MonoType (look at
18978 2001-07-20 Miguel de Icaza <miguel@ximian.com>
18980 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
18981 as Jan Gray found out, it is incorrect.
18983 2001-07-18 Miguel de Icaza <miguel@ximian.com>
18985 * assembly.c: Implement asssembly loading. This loads an image
18986 and loads all the referenced assemblies. Come to think of it, we
18987 could always do lazy loading of the assemblies.
18989 * image.c (mono_image_open): Keep loaded images in a hashtable.
18991 * image.h (MonoImage): Add reference count.
18993 2001-07-17 Miguel de Icaza <miguel@ximian.com>
18995 * assembly.c (mono_assembly_open): Keep track of the file name in
18996 case the assembly has no ASSEMBLY table.
18998 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
19001 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
19003 * metadata.c, metadata.h: decode local vars in method header
19004 parse function. Change callers accordingly.
19006 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
19008 * metadata.h, cil-coff.h: protect against multiple inclusion.
19009 Added some new structures to hold information decoded from metadata:
19010 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
19011 and relevant decoding/free functions.
19012 * metadata.c: implement decoding functions. Add warning for out of bounds
19013 index in mono_metadata_locate(). Implement mono_get_method () to retreive
19014 all the info about a method signature and invocation. Remove check on
19015 uninitialized local var in parse_mh() and fix memory leak.
19017 2001-07-12 Miguel de Icaza <miguel@ximian.com>
19019 * metadata.h: More macros.
19021 * tokentype.h: New file.
19023 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
19025 * assembly.c: added a consistency check and initialize
19026 some structures with g_new0().
19027 * metadata.c: fixed a couple more bugs in table size computation
19028 and add other checks for out-of bound access to metadata.
19030 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
19032 * metatada.c: fix bugs computing table sizes. Spew a
19033 warning when index in string heap is out of bounds.
19035 2001-07-04 Miguel de Icaza <miguel@ximian.com>
19037 * metadata.h: Add a couple of macros to manipulate tokens.
19039 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
19041 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
19042 cli_section_tables).
19044 2001-07-01 Miguel de Icaza <miguel@ximian.com>
19046 * metadata.c (mono_metadata_user_string): New function, provides
19047 access to the UserString heap.
19049 2001-06-27 Miguel de Icaza <miguel@ximian.com>
19051 * metadata.c: Add inline documentation.
19053 2001-06-26 Miguel de Icaza <miguel@ximian.com>
19055 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
19058 2001-06-22 Miguel de Icaza <miguel@ximian.com>
19060 * typeattr.h: New file, TypeAttribute flags.
19062 2001-06-21 Miguel de Icaza <miguel@ximian.com>
19064 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
19065 mono_assembly_ensure_section): Section loading code.
19066 (load_section_tables): Load the sections.
19068 * mono/metadata/metadata.c (mono_metadata_locate_token,
19069 mono_metadata_locate): Functions to locate the information
19070 definition given a token or a table and an index.
19071 (mono_metadata_compute_table_bases): New.
19072 (compute_size): New function to compute the sizes of the various
19075 * mono/metadata/metadata.h: Finish listing the different index
19078 * mono/metadata/pedump.c: Improve to dump new information.
19080 2001-06-19 Miguel de Icaza <miguel@ximian.com>
19082 * mono/metadata/metadata.c: Entered all the tables matching
19085 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2