1 2004-09-09 Geoff Norton <gnorton@customerndna.com>
3 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
4 Fix GetTypes() to support dynamically created assemblies.
6 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
8 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
10 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
13 * reflection.h reflection.c loader.c: Allow dynamic construction of
14 pinvoke methods. Fixes #65571.
16 * reflection.c (mono_reflection_get_type): Revert previous change since
17 it causes regressions.
19 2004-09-08 Martin Baulig <martin@ximian.com>
21 * class.c (class_compute_field_layout): Don't call
22 mono_class_layout_fields() for open generic instances.
24 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
25 * threads.c appdomain.c: fix typo in GC macro
27 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29 * threads.c: don't call mono_thread_detach() in start_wrapper(),
30 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
32 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
34 * image.c (mono_image_close): Applied patch from
35 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
36 assembly is loaded multiple times from data.
38 * image.c (mono_image_open): Fix warning.
40 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
42 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
45 * reflection.c (mono_reflection_create_runtime_class): Initialize
46 klass->nested_classes. Fixes #61224.
48 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
50 * threads.c: sched_yield() on exit, to allow threads to quit.
52 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
54 * object.c (mono_unhandled_exception): Remove leftover debug code.
56 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
58 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
60 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
62 * marshal.c (emit_marshal_array): Really null terminate string arrays.
64 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
66 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
68 * marshal.c (emit_marshal_array): Null terminate string arrays.
70 * marshal.c (raise_auto_layout_exception): Fix warning.
72 * reflection.c (mono_param_get_objects): Initialize the default value
73 with DBNull.Value, not null. Fixes #62123.
75 2004-09-01 Miguel de Icaza <miguel@ximian.com>
77 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
78 throw an exception with a cute explanation.
80 2004-09-06 Dick Porter <dick@ximian.com>
82 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
83 Close the new process's thread handle, as we don't use it. The
84 handle stays around forever otherwise.
86 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
88 * object.c (arith_overflow): Fix warning.
90 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
91 calling conventions in method refs. Fixes #65352.
93 * reflection.c: Fix warnings.
95 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
97 * icall.c: Add a new icall for Array.Clear
99 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
101 * object.c: When allocating an array, we have to throw
102 an overflow exception if any of the lengths are < 0.
104 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
106 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
107 properly. Also move implementation of string array marshalling to
108 managed code. Fixes #42316.
110 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
112 * assembly.c: provide more information when loading an assembly fails.
114 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
116 * filewatcher.c: don't expect the development fam package to be
119 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
121 * marshal.c: Make a copy of the signature cookie since it will be
124 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
126 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
128 * metadata.c (mono_metadata_free_marshal_spec): New function to free
131 * marshal.c: More refactoring.
133 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
136 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
138 * object.c: In mono_message_invoke, fill the output parameter array after
139 calling the managed method (it was done before the call). This fixes
142 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
144 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
147 2004-09-02 Martin Baulig <martin@ximian.com>
149 * class.c (mono_class_instance_size): Don't allow generic type
150 definitions or open generic instances.
151 (mono_class_array_element_size): If we're a value type, call
152 mono_class_instance_size() on the original class.
154 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
155 handle generic instances.
157 * mono-debug-debugger.c (write_type): Handle generic instances
160 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
162 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
163 the allocation request fails. Fixes #65089.
165 * object.c (mono_runtime_free_method): Do not call mono_free_method.
167 * object.c (mono_runtime_free_method): New function to free a dynamic
170 * marshal.c (mono_delegate_free_ftnptr): New function to free the
173 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
174 with hasthis as dynamic,
176 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
178 * domain.c (mono_jit_info_table_remove): New function to remove an
179 entry from the jit info table.
181 * class-internals.h (MonoMethod): Add 'dynamic' field.
183 * loader.c: Fix warnings.
185 2004-09-01 Martin Baulig <martin@ximian.com>
187 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
188 instead of mono_debugger_lock() because the latter one is a no-op
189 unless running in the debugger.
191 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
193 * class.c (class_compute_field_layout): Classes with auto-layout or
194 reference fields are not blittable.
196 2004-09-01 Dick Porter <dick@ximian.com>
198 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
199 mono_image_get_filename() to get the assembly location.
202 * metadata.h: Fix compile warnings
204 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
206 * class.c (class_compute_field_layout): System.Object is blittable.
208 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
209 as in/out. Fixes #59909.
211 2004-09-01 Martin Baulig <martin@ximian.com>
213 * metadata.h (MONO_TYPE_ISREFERENCE): Call
214 mono_metadata_generic_inst_is_valuetype() if we're a generic
215 instance to check whether our underlying type is a reference type.
217 2004-09-01 Martin Baulig <martin@ximian.com>
219 * metadata.c (mono_type_size): If we're a generic instance, call
220 mono_class_value_size() for value types.
222 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
224 * marshal.c: Implement more custom marshalling functionality. Fixes
227 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
229 * mono-debug.c, debug-mono-symfile.c: add some locking love.
231 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
233 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
235 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
237 * icall.c: Fix some warnings.
239 * threads.c (abort_appdomain_thread): Fix unref errors.
240 (mono_thread_current): Fix THREAD_DEBUG define.
242 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
244 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
246 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
248 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
250 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
253 2004-08-28 Martin Baulig <martin@ximian.com>
256 (mono_metadata_generic_inst_is_valuetype): New public function.
258 * metadata.h (MONO_TYPE_ISSTRUCT): Call
259 mono_metadata_generic_inst_is_valuetype() if we're a generic
260 instance to check whether our underlying type is a valuetype.
262 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
264 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
267 2004-08-25 Martin Baulig <martin@ximian.com>
269 * loader.c (mono_get_method_from_token): Abstract methods can also
270 be generic and thus have type parameters.
272 * metadata-internals.h
273 (MonoDynamicImage): Added `GPtrArray *gen_params'.
275 * reflection.c (mono_image_get_generic_param_info): Don't create a
276 metadata row, just add an entry to the `gen_params' array.
277 (build_compressed_metadata): Sort the `gen_params' array and then
278 actually create the metadata.
280 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
282 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
284 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
286 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
288 2004-08-24 Martin Baulig <martin@ximian.com>
290 * class.cs (mono_class_is_subclass_of): Like an interface, a
291 generic instance also derives from System.Object.
293 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
295 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
296 custom modifiers to be in any order. Fixes #61990.
298 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
300 * object.c: Register mono_object_new_fast icall.
302 * object.c (mono_class_get_allocation_ftn): Return to calling
303 mono_object_new_fast, since it seems faster to compute the object
304 size in unmanaged code than passing it as a parameter.
306 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
308 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
309 this function with Boehm as the oom handler, so we don't have to check
310 the result of GC_malloc.
312 * object.c: Remove checks for oom.
314 * object.h object.c (mono_class_get_allocation_ftn): New function to
315 return the icall which can be used to allocate an instance of a given
318 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
320 * class-internals.h: Add 'enabled' field.
322 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
324 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
326 2004-08-18 Jambunathan K <kjambunathan@novell.com>
327 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
330 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
332 * appdomain.c: use the Tls function for appdomain too,
333 at Zoltan's request. Actually return in mono_context_get
335 * appdomain.c, profiler.c, threads.c: use __thread
337 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
339 * appdomain.c threads.c: Call GC_CreateThread on windows.
341 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
342 multiple libraries since this don't work on windows.
344 2004-08-18 Martin Baulig <martin@ximian.com>
347 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
350 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
351 MonoMethodNormal since we also need it for abstract and interface
355 (build_compressed_metadata): Sort the GenericParam table.
356 (mono_image_create_token): Added `gboolean create_methodspec'
357 argument; this is false when generating a MethodImpl token.
358 (reflection_methodbuilder_to_mono_method): Abstract and interface
359 methods may also have generic parameters.
361 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
363 * appdomain.c: thread local alloc
365 2004-08-17 Martin Baulig <martin@ximian.com>
367 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
370 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
373 * class.c (mono_type_get_full_name): New public function.
374 (mono_type_get_name): Don't include the type arguments.
376 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
378 * Makefile.am: Build static versions of libmetadata and libmonoruntime
379 for inclusion into the mono executable.
381 2004-08-16 Martin Baulig <martin@ximian.com>
383 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
384 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
386 2004-08-14 Martin Baulig <martin@ximian.com>
388 * class.c (dup_type): Also copy the `byref' field.
390 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
392 * reflection.c (create_dynamic_mono_image): Revert the last change
393 since it breaks bootstrap.
395 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
397 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
399 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
400 not free them with g_free.
402 2004-08-11 Martin Baulig <martin@ximian.com>
404 * reflection.c (mono_reflection_setup_internal_class): Also call
405 mono_class_setup_mono_type() if we already have a `tb->type.type'.
407 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
409 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
410 called during default (first) AppDomain creation. Keep track of
411 Evidence when loading assemblies.
413 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
415 * opcodes.c, opcodes.h: reduce runtime relocations.
417 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
419 * culture-info.h, locales.c: fixes and chages to sue the new
420 optimized format of the locale data.
421 * culture-info-tables.h: regenerated.
423 2004-08-06 Geoff Norton <gnorton@customerdna.com>
425 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
427 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
429 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
430 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
431 * domain-internals.h: icall declaration.
432 * icall.c: icall registration.
433 * object-internals.h: New fields in MonoAssembly for CAS.
435 2004-08-05 Duncan Mak <duncan@ximian.com>
437 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
440 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
442 * reflection.c: fix to deal with object[] arrays in custom ctors
445 2004-08-05 Martin Baulig <martin@ximian.com>
447 * class.c (mono_class_array_element_size): Added support for
448 generic instances and correctly handle "recursive" types.
450 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
452 * assembly.c: Fix warnings.
454 2004-08-04 Martin Baulig <martin@ximian.com>
457 (mono_type_get_name_recurse): Added `gboolean include_arity'
458 argument specifying whether or not we should include the generic
459 arity in the type name.
460 (_mono_type_get_name): New static function.
461 (mono_class_setup_vtable): If we're a generic instance, don't
462 include the generic arity in the names of explicit method
465 2004-08-03 Martin Baulig <martin@ximian.com>
467 * class.c (mono_type_get_name_recurse): Enclose the generic type
468 arguments in `<', '>'.
470 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
472 * gc.c: make GC warning messages use the trace API, they are just
473 noise to most of the users.
475 2004-08-03 Martin Baulig <martin@ximian.com>
477 * debug-mono-symfile.c (read_string): Correctly read the string.
479 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
481 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
483 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
485 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
487 2004-07-30 Martin Baulig <martin@ximian.com>
489 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
490 Reflect latest symbol writer changes.
492 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
494 * object.c: always create an object if null is passed
495 to Invoke() where a valuetype is expected.
497 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
499 * marshal.c (mono_marshal_init): make managed
500 signatures match native ones better for 64bits.
502 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
504 * appdomain.c: hack to build correctly the private bin path on windows.
507 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
509 * assembly.c: Load mscorlib from the correct framework directory
510 (mono/<version>/mscorlib.dll).
511 * appdomain.h: Added prototypes for new functions.
512 * internals.h: Added some prototypes.
513 * domain.c: When initializing the runtime, get from the executable and
514 the configuration files the runtime version that the app supports.
515 Added support methods for reading app.exe.config. Added list of versions
516 supported by the JIT. Added two new methods: mono_init_from_assembly,
517 which initializes the runtime and determines the required version from
518 the provided exe file, and mono_init_version, which initializes
519 the runtime using the provided version.
520 * icall.c: Get machine.config from version-specific directory.
521 * reflection.c: When generating an image, embed the version number
522 of the current runtime.
524 2004-07-28 Dick Porter <dick@ximian.com>
527 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
528 returned sockaddr size before creating the remote address object.
529 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
532 2004-07-28 Dick Porter <dick@ximian.com>
534 * locales.c (string_invariant_compare_char): Fix invariant char
535 compares between upper and lower cases. Fixes bug 61458.
537 2004-07-27 Ben Maurer <bmaurer@ximain.com>
539 * marshal.c: actually cache stelem.ref wrappers.
541 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
543 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
544 sections and remove the mono_cli_rva_map () function.
546 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
548 * debug-mono-symfile.c: fix one more endianess issue, from a patch
549 by Geoff Norton (<gnorton@customerdna.com>).
551 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
553 * class.c: fix class loads for pointer types (typeof(int) !=
556 2004-07-27 Martin Baulig <martin@ximian.com>
558 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
559 reading the debugging information from an external ".mdb" file.
561 2004-07-24 Martin Baulig <martin@ximian.com>
563 * reflection.c (mono_image_get_type_info): Only write a class
564 layout entry if we actually have a size or a packing size.
566 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
568 * reflection.c (type_get_fully_qualified_name):
569 insert cast to get type checking of ?: with non-gcc compilers
571 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
573 * rand.c: use g_getenv for both lookups of
576 2004-07-17 Martin Baulig <martin@ximian.com>
578 * reflection.c (mono_reflection_bind_generic_method_parameters):
579 Set `gmethod->reflection_info'.
581 2004-07-17 Martin Baulig <martin@ximian.com>
583 * class.c (mono_class_create_from_typedef): Insert the newly
584 created class into the hash table before computing the interfaces
585 since we could be called recursively.
587 2004-07-16 Ben Maurer <bmaurer@ximain.com>
589 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
590 function to implement stelem.ref in managed code
591 * class-internals.h, debug-helpers.c: a new wrapper type
594 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
596 * gc.c: allow GC handles to work even when no GC is compiled in.
597 Fix part of bug #61134 (GetAddrOfPinnedObject).
599 2004-07-13 Peter Williams <peter@newton.cx>
601 * process.c (complete_path): Make sure we don't attempt to execute
604 2004-07-12 Geoff Norton <gnorton@customerdna.com>
606 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
607 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
608 and will add/subtract the hour if needed
610 2004-07-12 Martin Baulig <martin@ximian.com>
612 * reflection.c (mono_field_get_object): If we have
613 `field->generic_info', take the attributes from
614 `field->generic_info->generic_type'.
616 2004-07-12 Martin Baulig <martin@ximian.com>
618 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
619 This function must be called before initializing the runtime.
620 (mono_debug_init_1): New function; call this after initializing
621 the runtime, but before loading the assembly. It tells the
622 debugger to load corlib and the builtin types.
624 * mono-debug-debugger.c: Did some larger changes in the debugging
625 code; support recursive class declarations, make sure we actually
628 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
630 * debug-helpers.c: undo my previous patch and fixed the real issue in
631 ../mini/exceptions-x86.c
633 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
635 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
636 when no HOME env. variable was set and a NullRef was thrown in a .cctor
637 called from other .cctors.
639 2004-07-09 Miguel de Icaza <miguel@ximian.com>
641 * loader.c: Removed the mono_loader_wine_init hack now that we are
642 doing a managed version of Windows.Forms.
644 2004-07-09 Ben Maurer <bmaurer@ximian.com>
646 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
647 threadpool.c, threads.c: remove static data from rootset.
649 2004-07-09 Dick Porter <dick@ximian.com>
651 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
652 Don't do any more processing if the matched length was 0. It was
653 increasing the size of the string before. Fixes bug 61167.
655 2004-07-09 Dick Porter <dick@ximian.com>
659 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
660 Add support for SO_PEERCRED if its available.
662 2004-07-09 Peter Bartok <pbartok@novell.com>
663 * loader.c: winelib.exe.so error message is now only displayed if
664 MONO_DEBUG is set. To help us avoid questions when people are trying
665 out the new Managed.Windows.Forms.
667 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
669 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
670 for isinst and castclass wrappers.
672 * class-internals.h icall.c: Move registration and lookup of JIT icalls
673 to libmetadata from the JIT, so they could be used by the marshalling
674 code and the interpreter.
676 * marshal.c: Register marshalling related JIT icalls here instead of
677 in mini.c. Use CEE_MONO_ICALL instead of the family of
678 CEE_MONO_PROC<x> opcodes to call marshalling functions.
680 * metadata.h: Remove unneeded marshalling conversions.
682 * opcodes.c: Update for new opcodes.
684 2004-07-08 Martin Baulig <martin@ximian.com>
686 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
687 (mono_debug_get_domain_data): Make this function static.
689 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
691 * gc.c, object.h: add nice GC handle API for embedders.
693 2004-07-06 Ben Maurer <bmaurer@ximian.com>
695 * reflection.c: more changes for the new api
697 * object.c: When we reflect on a field w/ a constant value, it
698 will not have a memory location, so we must access metadata. Also,
699 allow easier reading of strings so that we can read them from
702 * class.c (mono_class_layout_fields): no need for literal fields here.
704 * class-internals.h: api changes for const fields
706 * icall.c (ves_icall_get_enum_info): use new apis for const fields
708 2004-07-06 Martin Baulig <martin@ximian.com>
710 * mono-debug.h: Increment version number to 44.
712 * mono-debug.c (mono_debug_add_wrapper): The second argument is
713 now a gpointer, rewrote this whole method.
715 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
716 function. Add information about the wrapper in a new "misc table".
718 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
719 for the new misc table.
721 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
723 * metadata-internals.h image.c: Add a cache for helper signatures.
725 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
727 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
729 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
730 delegates from a delegate. Fixes #61033.
732 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
733 marshalling of stringbuilder arrays. Fixes #59900.
735 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
737 * icall.c: Add EnumBuilder:setup_enum_type icall.
739 2004-06-30 Ben Maurer <bmaurer@ximian.com>
741 * icall.c: Added a new icall for the property version of
744 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
746 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
747 it has a constant size across platforms.
749 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
752 2004-06-29 Martin Baulig <martin@ximian.com>
754 * mono-debug.c (mono_debug_add_method): Protect the whole function
755 in mono_debugger_lock(), not just parts of it.
757 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
759 * reflection.c: make sure padding bytes in heaps are zeroed.
761 2004-06-24 David Waite <mass@akuma.org>
763 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
764 image.c, loader.c, locales.c, marshal.c, metadata.c,
765 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
766 string-icalls.c, threads.c: change to C90-style comments from C99 /
769 2004-06-24 Dick Porter <dick@ximian.com>
772 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
773 return createdNew. Fixes bug 60412.
776 * icall.c: Add createdNew parameter to CreateMutex icall
778 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
780 * reflection.c, object-internals.h: save default value in params.
782 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
784 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
785 no need to build a new path combining that with the application base.
788 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
790 * reflection.c: fixed minor standard compliance issues.
792 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
794 * reflection.c: fixed issue with encoding some custom attributes
795 (arrays in properties and fields, bug #60411).
797 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
799 * reflection.c: fix start address when copying the public key token.
801 2004-06-23 Martin Baulig <martin@ximian.com>
803 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
804 the `exc' object in a static object to put it into the GC's root set.
806 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
808 * reflection.c: make mono_reflection_setup_internal_class ()
809 callable a second time to setup a new parent class.
811 2004-06-23 Dick Porter <dick@ximian.com>
813 * threads.c: Check for WAIT_IO_COMPLETION return values.
815 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
817 * appdomain.c: Removed the g_free on the public key token. Now copy
818 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
819 * assembly.c: Added public key token string value when loading
820 assemblies. Fix bug #60439.
821 * icall.c: Added missing informations (like public key) in
822 GetReferencedAssemblies. Fix #60519.
823 * image.h: Changed definition for public key token from const char*
824 public_tok_value to guchar public_key_token [17];
825 * reflection.c: Updated for changes to public key token.
827 2004-06-22 Lluis Sanchez Gual
829 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
830 for the field in base classes.
832 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
834 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
835 mark headers as not supported, they are installed only for use by the
838 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
840 * *.c, *.h: avoid namespace pollution in public headers.
842 2004-06-21 Martin Baulig <martin@ximian.com>
844 * exception.c (mono_get_exception_security): It's in
845 "System.Security", not in "System".
847 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
848 the exception classes.
850 2004-06-21 Martin Baulig <martin@ximian.com>
852 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
853 Protect the exception object from being finalized.
855 2004-06-21 Martin Baulig <martin@ximian.com>
857 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
860 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
862 * reflection.c: Load the assembly in mono_reflection_type_from_name,
863 if it was not loaded before. Fix parts of #60439.
865 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
867 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
868 code that was broken since Ben's change: wrappers are now
869 dependent on the method signature only again.
871 2004-06-21 Martin Baulig <martin@ximian.com>
873 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
874 added interface support.
876 2004-06-21 Martin Baulig <martin@ximian.com>
878 * class.c (mono_vtable_get_static_field_data): New public method.
880 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
882 * filewatcher.c : Windows build fix to be compliant with API changes.
884 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
886 * class.h, class.c: more accessors.
887 * metadata.h, metadata.c: prepare for hiding MonoType and
888 MonoMethodSignature: people should use the accessors from now on
891 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
893 * *.c, *.h: more API cleanups.
895 2004-06-18 Jackson Harper <jackson@ximian.com>
897 * assembly.c: Trace loading assemblies.
898 * loader.c: Trace loading native libraries.
899 * mono-config.c: Trace loading config files.
901 2004-06-18 Dick Porter <dick@ximian.com>
903 * locales.c: Tell ICU the lengths of strings, it can cope with
904 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
906 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
908 * image.c: swapped name/filename;
910 2004-06-18 Martin Baulig <martin@ximian.com>
912 * mono-debug-debugger.c (write_class): Write the parent class at
913 the end of the header.
915 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
917 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
919 2004-06-17 Raja R Harinath <rharinath@novell.com>
921 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
922 (bundle_obj): New conditional define.
923 (BUILT_SOURCES): Remove.
924 ($(bundle_srcs)): Make parallel-make safe.
925 (libmonoruntime_la_LIBADD): Make unconditional.
926 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
927 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
929 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
931 * culture-info-tables.h: It was inconsistent with the latest
934 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
936 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
939 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
942 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
944 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
945 cleaned up public header threads.h.
947 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
949 * Makefile.am, *.c, *.h: more API cleanups.
951 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
953 * Makefile.am: removed monosn from compilation.
954 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
955 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
956 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
957 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
958 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
959 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
961 2004-06-15 Jackson Harper <jackson@ximian.com>
963 * assembly.c: Make locales lower case when searching the GAC for
964 assemblies. gacutil will always make locales lowercase when
965 installing so this effectively makes them case insensitive.
967 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
969 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
970 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
971 parameter which allows to choose whether the wait can be interrupted or
972 not. Also added the method mono_monitor_enter(), which locks the monitor
973 using an infinite wait and without allowing interruption.
974 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
976 * object.h: Added new fields in MonoThread. suspend_event holds the event
977 used to susped/resume the thread. synch_lock is the lock object to use for
978 modifying the thread state.
979 * threads.c: Use the new synch_lock object for locking, instead of "this",
980 which can generate deadlocks.
981 Moved thread state change in Thread.Sleep and Thread.Join from managed
982 to unmanaged code. This avoids a deadlock when the thread was suspended
983 just after acquiring the thread lock.
984 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
985 Implemented Thread.Suspend using an event instead of ThreadSuspend,
986 which is not fully implemented in the io-layer.
987 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
989 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
991 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
992 threads-types.h: more API cleanups.
994 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
996 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
997 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
998 threadpool.c, threads.c: first pass at the exported API cleanup.
1000 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
1002 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
1004 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1006 * icall.c: added internalGetHome.
1008 2004-06-14 Dick Porter <dick@ximian.com>
1010 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
1011 possible to return successfully when '.' or '..' were the only
1012 entries in a directory, but were skipped. The MonoIOStat was not
1013 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
1016 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
1018 * reflection.c: make binaries run on .Net 1.1 by default.
1020 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
1022 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
1024 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
1026 * marshal.c: keep track of struct size with explicit layout
1029 2004-06-12 Martin Baulig <martin@ximian.com>
1031 * mono-debug-debugger.c: Comment out a debugging g_message().
1033 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
1035 * reflection.c, reflection.h: do not free custom attrs that are cached.
1036 * icall.c: use braces to make code clearer.
1038 2004-06-11 Martin Baulig <martin@ximian.com>
1040 * class.h (MonoInflatedField): New type.
1041 (MonoClassField): Replaced `MonoType *generic_type' with
1042 `MonoInflatedField *generic_info'.
1045 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
1047 2004-06-11 Martin Baulig <martin@ximian.com>
1049 * reflection.c (mono_image_create_method_token): Correctly encode
1052 2004-06-11 Martin Baulig <martin@ximian.com>
1054 * metadata.c (mono_metadata_parse_method_signature): When parsing
1055 a MethodDef which has VarArgs, also set sentinelpos if we don't
1056 have any parameters.
1058 2004-06-11 Martin Baulig <martin@ximian.com>
1060 * verify.c (mono_method_verify): In CEE_CALL, use
1061 mono_method_get_signature() to get the method's signature, unless
1062 we're a PInvoke method.
1064 2004-06-10 Jackson Harper <jackson@ximian.com>
1066 * assembly.c: Use <path>/lib/mono/gac for the extra paths
1067 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
1068 logical name as the supplied path is just a prefix to the gac not
1069 the direct path to it.
1071 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
1073 * reflection.c: make the token for a created method match
1074 the token of the MethodBuilder it was created from
1075 (IKVM requires this behaviour now).
1077 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
1079 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
1080 reflection.c, socket-io.c: leak fixes.
1082 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
1084 * icall.c: handle sentinel pos in vararg methods in position different
1087 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1089 * culture-info-tables.h: freshly generated.
1091 2004-06-09 Martin Baulig <martin@ximian.com>
1093 * loader.c (mono_get_method_constrained): Call `mono_class_init
1094 (constrained_class)'.
1096 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
1098 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
1099 any methods. Fixes #59629.
1101 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
1103 * culture-info-tables.h: reflecting locale-builder updates.
1105 2004-06-08 Dick Porter <dick@ximian.com>
1108 * locales.c: Fixed compile warnings, including a real bug in
1109 CompareInfo_internal_compare.
1111 2004-06-08 Dick Porter <dick@ximian.com>
1114 (ves_icall_System_Globalization_CompareInfo_internal_index):
1115 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
1116 Double-check the resuls of usearches, because ICU currently
1117 ignores most of the collator settings here. Fixes bug 59720.
1119 2004-06-08 Dick Porter <dick@ximian.com>
1122 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
1123 Fix memory leak and segfault-causing typo. No idea how this one
1124 lasted so long without being noticed.
1126 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
1128 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
1129 any methods. Fixes #59629.
1131 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1134 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
1135 own the critical section before). Removed dead code (that's done
1136 in the preload hook).
1138 (mono_assembly_load_with_partial_name): call the preload hook.
1140 2004-06-08 Martin Baulig <martin@ximian.com>
1142 * metadata.c (mono_metadata_signature_alloc): Default
1143 `sentinelpos' to -1.
1145 * reflection.c (mono_image_get_array_token): Likewise.
1147 2004-06-08 Martin Baulig <martin@ximian.com>
1149 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
1151 * metadata.c (mono_metadata_parse_method_signature): When parsing
1152 a MethodDef which has VarArgs, set sentinelpos.
1154 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
1155 `gint16' since we're using -1 for non-varargs methods.
1158 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
1159 (method_encode_signature): Added varargs support.
1160 (method_builder_encode_signature): Likewise.
1161 (mono_image_get_varargs_method_token): New static method.
1162 (mono_image_create_method_token): New public method; this is
1163 called via an icall instead of mono_image_create_token() when
1164 calling a varargs method.
1166 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
1168 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
1170 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
1172 * culture-info-tables.h : Reflecting the latest locale-builder that
1173 fixed empty array representation ({} to {0}).
1175 2004-06-07 Jackson Harper <jackson@ximian.com>
1177 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
1178 looking up extra gac paths. This allows MONO_GAC_PATH to act
1179 exactly like a prefix.
1181 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
1183 * reflection.c (mono_reflection_type_from_name): Make a copy of the
1184 type name before modifying it. Fixes #59405.
1186 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
1188 * culture-info.h: added fields for "all datetime patterns".
1189 * locales.c: ( ves_icall_System_Globalization_CultureInfo
1190 _construct_datetime_format ()): fill xxx_patterns fields.
1191 * object.h: added fields for "all datetime patterns" to
1192 MonoDateTimeFormatInfo.
1193 * culture-info-tables.h: reflecting locale-builder updates.
1195 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
1197 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
1198 the event has no add and remove methods. Fixes #59629.
1200 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
1202 * object.c: Fixed possible integer overflow when allocating large
1205 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
1207 * culture-info-tables.h: reflecting locale-builder updates.
1209 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
1211 * culture-info-tables.h: reflecting locale-builder updates.
1213 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
1215 * culture-info-tables.h: reflecting locale-builder updates.
1217 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
1219 * threads.c: Made Thread.Sleep abortable.
1221 2004-06-02 Martin Baulig <martin@ximian.com>
1223 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
1225 * debug-mono-symfile.h: Bumped symbol file version number to 37.
1227 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
1229 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
1231 2004-05-30 Jackson Harper <jackson@ximian.com>
1233 * reflection.c: Do not hardcode assembly versions or public key
1234 tokens anymore. All of this except the corlib section was dead
1237 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
1239 * object.c (mono_runtime_invoke_array): Automatically create boxed
1240 objects for byref valuetypes if needed. Fixes #59300.
1242 * object.c (mono_method_return_message_restore): Handle
1243 MONO_TYPE_OBJECT as well.
1245 2004-05-28 Jackson Harper <jackson@ximian.com>
1247 * reflection.c: The modified type encoding was causing build
1248 problems. Reverted for now.
1250 2004-05-28 Jackson Harper <jackson@ximian.com>
1252 * reflection.c/h: Take an assembly ref so that we dont create
1253 fully qualified names when encoding types in the same assembly as
1254 the custom attribute being emitted.
1255 * appdomain.c: Increment version number.
1257 2004-05-26 Duncan Mak <duncan@ximian.com>
1260 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
1261 Set the full version number (major, minor, build, revision).
1263 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
1265 * marshal.c (emit_struct_conv): increment src/dst after blit
1266 (mono_marshal_get_managed_wrapper,
1267 mono_marshal_get_native_wrapper): make sure we have marshalling
1268 info before marshalling params (info computation affects
1271 * class.c (class_compute_field_layout): correctly deal with
1273 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
1274 value types (as per what windows dows by default)
1275 (mono_class_setup_mono_type): System.ValueType is blittable
1276 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
1279 * marshal.c (mono_marshal_load_type_info): flag types as
1280 non-blittable if the native layout doesn't match the managed
1283 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1285 * appdomain.c: don't add stuff in the private search path that is
1286 above the application base. If application base is not set, there's
1287 no private search path.
1289 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
1291 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
1292 byref struct arguments in native->managed marshalling.
1294 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
1296 * marshal.c (mono_marshal_get_runtime_invoke): correctly
1297 cache methods using signature (special case for methods
1298 that are value type or string class)
1300 * image.c (mono_image_close): clean up allocated GSList's
1301 in runtime_invoke_cache.
1303 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1305 * mono-config.c: set the correct path for mono_cfg_dir on windows when
1306 there's no MONO_CFG_DIR environment variable defined.
1308 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1310 * threads.c: windows version must be >= 0x0500 to include OpenThread.
1312 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
1314 * threadpool.c: Really wait for 500ms after the async call, even if the wait
1316 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
1317 before waiting for it, and call CloseHandle after the wait to unref it.
1318 This will make sure that handles are not disposed too early.
1320 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1325 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
1328 * object.c: se the application_base only for the domain that runs
1329 Main. Fixes bug #59216,
1331 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1334 * object.c: only the domain in which Main is run have
1335 SetupInformation.ConfigurationFile set, so moved a few lines from
1336 appdomain.c to object.c.
1338 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1340 * appdomain.c: we tried to load [name].(dll|exe), but according
1341 to bug #57710, we must also try [culture]/[name].(dll|exe) and
1342 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
1343 There's a test case attached to bug #58922.
1345 2004-05-27 Dick Porter <dick@ximian.com>
1348 * file-io.c: Implemented icalls for locking and unlocking regions
1350 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
1351 FALSE on error (fixes both compiler warning and real bug.)
1353 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
1355 * culture-info-tables.h: reflecting locale-builder updates.
1357 (Added missing ChangeLog entry for 05/26)
1359 2004-05-27 Jackson Harper <jackson@ximian.com>
1361 * locales.c: Fix some cut and paste errors.
1363 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1365 * mono-config.c: set the correct path for config. directory on windows.
1367 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
1369 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
1372 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
1374 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
1375 from pinvoke functions.
1377 * marshal.c (mono_ftnptr_to_delegate): Implement this.
1379 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
1381 * culture-info-tables.h: reflecting locale-builder updates.
1383 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
1385 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
1388 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
1390 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
1391 * icall.c: Modified icalls for RNG.
1392 * rand.c|h: Changed RNG interface to allow thread-safe usage under
1393 Windows (CryptoAPI).
1395 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
1397 * locales.c: Fix build.
1399 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
1401 * culture-info-tables.h: reflecting locale-builder updates.
1403 2004-05-25 Jackson Harper <jackson@ximian.com>
1405 * locales.c: When creating the current culture use the $LANGs
1406 specific culture. So DateTimeFormat and NumberFormat entries are created.
1408 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
1410 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
1411 a char array as parameter.
1413 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
1415 * image.c: In mono_image_open(), always use an absolute path name to
1416 look for already loaded images.
1418 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
1420 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
1421 missing in the windows build (like older cygwin include files).
1423 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
1425 * icall.c: Fixed check for possible integer overflow in Buffer_
1426 BlockCopy icall. Replaced comments style // by /* */.
1428 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
1430 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
1432 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
1433 check after MONO_VTADDR. Fixes pinvoke2.exe.
1435 * marshal.h marshal.c metadata.h: Add beginnings of support for
1436 ftnptr -> delegate marshalling.
1438 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
1440 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
1441 * threads.c: Fix warnings.
1443 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
1445 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
1446 * icall.c: Registered icalls for Suspend and Resume.
1447 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
1449 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
1450 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
1451 * process.c: Use WaitForSingleObjectEx.
1452 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
1454 * threads.c, threads.h: Make use of new Ex wait methods. Improved
1455 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
1456 for Suspend and Resume. Added new mono_thread_stop, used for stoping
1457 background threads. Added basic support for Abort in Windows.
1458 Start new threads using a managed delegate invoke wrapper. This wrapper
1459 has an interruption checkpoint that is needed since an interruption
1460 can be requested before the thread leaves the unmanaged code that starts
1462 * marshal.c: Added interruption checkpoint after every native call, and
1463 also before managed calls for wrappers called from unmanaged code to
1464 go into managed code.
1465 * object.h: Added new field in MonoThread to keep track of interruption
1468 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
1470 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
1473 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1480 * rand.c: getenv -> g_getenv (windows!)
1482 * process.c: complete_path is also used on non-windows platforms.
1484 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1486 * icall.c: new signature for Process_Start.
1488 * process.[ch]: new signature for Process_Start. If we're on windows
1489 and UseShellExecute is false, we have to search for the program by
1490 ourselves if we don't get a full path.
1492 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
1494 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
1495 marshalling and call CleanUpNativeData if needed. Fixes #58646.
1497 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1499 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
1502 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1504 * process.c: use double quotes to quote program name and arguments on
1505 windows. Fixes bug #58575.
1507 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1509 * file-io.c: don't return "." and ".." when using windows Find*File.
1511 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
1513 * marshal.c: Don't pass wrappers to message init because method
1514 addressed used to lookup metadata. part of remoting[2|3] fix.
1516 2004-05-15 Jackson Harper <jackson@ximian.com>
1518 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
1519 path is essentially the same as MONO_PATH except that it points to
1520 GACs instead of lib directories.
1521 * loader.h: The user gac is gone so we dont need function to
1523 * mono-config.c: user gac option is now gone.
1525 2004-05-15 Jackson Harper <jackson@ximian.com>
1527 * culture-info.h: Make defines more consistent, add calendar data
1528 to the culture info table.
1529 * culture-info-tables.h: Add basic calendar data. Basically
1530 everyone gets default gregorian until all the data is
1532 * locales.c: Use the new consistent defines. Set calendar data for
1533 culture info objects.
1534 * object.h: add a field for calendar data to CultureInfo
1536 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
1538 * image.c: image->runtime_invoke_cache is keyed on signatures now.
1539 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
1541 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
1542 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
1543 an extra param that is the pointer of the method to invoke. The IL for
1544 the invoke method is no longer specific to the method, but to the
1545 signature of the method. Thus, we can share the same code for multiple
1546 methods. This reduces the number of methods that have to be compiled.
1548 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
1550 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
1552 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1554 * icall.c: Optimize Buffer.BlockCopy.
1556 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1558 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
1559 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
1560 quote). Changed them to "MMMM yyyy".
1562 2004-05-12 Miguel de Icaza <miguel@ximian.com>
1565 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
1567 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
1569 * reflection.h: Updated after changes to managed structures.
1571 * appdomain.c: Bump corlib version.
1573 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1575 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
1578 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1580 * Makefile.am: link to ../os/libmonoos.la on windows.
1583 -If MONO_DEBUG, warn about non-existing directories in
1585 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
1586 compile time variable.
1587 -Removed init_default_path and call mono_set_rootdir from
1588 libmonoos.a instead (windows only).
1590 * assembly.h: declare mono_assembly_getrootdir().
1593 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
1595 * loader.c: s/getenv/g_getenv/
1597 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
1599 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
1601 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
1603 * metadata.h: Add new marshalling conversions.
1605 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
1608 * reflection.c (mono_reflection_get_type): Lookup the type in all
1609 modules of a multi-module assembly. Fixes #58291.
1611 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
1613 * threads.c: Before aborting a background, set the StopRequested
1614 state. This avoids throwing the Abort exception.
1615 In mono_thread_manage, don't continue with the shutdown until all
1616 aborted threads have actually stopped.
1618 2004-05-10 Jackson Harper <jackson@ximian.com>
1620 * locales.c: Remove the modifier from culture names.
1622 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1624 * Makefile.am: monosn is not installed any more. It has been deprecated
1627 2004-05-07 Jackson Harper <jackson@ximian.com>
1630 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
1631 Fix array construction, add bailout if the length is 0.
1633 2004-05-07 Dick Porter <dick@ximian.com>
1635 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
1636 machine doesn't have a DNS entry. Patch by Urs Muff
1637 (umuff@quark.com), fixes bug 57928.
1639 2004-05-06 Jackson Harper <jackson@ximian.com>
1641 * reflection.c: Handle null PublicTokens properly. alloc mem for
1642 assembly names culture so we dont crash when freeing it.
1644 2004-05-06 Jackson Harper <jackson@ximian.com>
1646 * assembly.c: Check the usergac when loading with partial names.
1648 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
1650 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
1651 does nothing for now (not required for Linux/Windows) but the class
1652 library can call it (and a newer or modified runtime could need it).
1653 * icall.c: Registred icall.
1655 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1657 * loader.c: prints a message on module loading error we set MONO_DEBUG
1658 environment variable.
1660 2004-05-05 Jackson Harper <jackson@ximian.com>
1662 * appdomain.c: Handle PublicKeyToken=null properly.
1664 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
1666 * environment.c|h: Added icall ves_icall_System_Environment_
1667 GetOSVersionString to get the current OS version as a string.
1668 * icall.c: Registred icall.
1670 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
1672 * object.c: in mono_object_get_virtual_method(), take into account that
1673 non-virtual methods don't have a slot in the vtable. Check needed when
1674 the object is a proxy.
1676 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
1678 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
1679 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
1681 * object.c (mono_class_compute_gc_descriptor): Fix warning.
1683 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
1684 passed when a valuetype is expected.
1686 * object.c (mono_unhandled_exception): Only set the exit code if the
1687 exception happens in the main thread. Fixes thread5.exe.
1689 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
1690 invalid names. Fixes #58047.
1692 2004-05-03 Jackson Harper <jackson@ximian.com>
1694 * assembly.c: This line was committed accidently and is unneeded.
1696 2004-05-03 Jackson Harper <jackson@ximian.com>
1698 * icall.c: Add new icall for Assembly::LoadWithPartialName
1699 * assembly.c/.h: new function that probes the GAC to load partial
1700 assembly names by Paolo Molaro.
1702 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1704 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
1705 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
1706 (type_get_fully_qualified_name): Added PublicKeyToken when building a
1709 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1711 * appdomain.c: fixed check for 'neutral' culture and removed warning.
1712 * reflection.c: fix bug when parsing a full type name and Version is not
1713 the last thing in the string.
1715 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
1717 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
1718 crashes when it is freed.
1720 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1722 * assembly.c: print the compat warning to stderr.
1724 2004-05-01 Miguel de Icaza <miguel@ximian.com>
1726 * assembly.c (mono_assembly_load_references): Add a compatibility
1727 hack to run old applications that might be still referencing the
1728 3300-based assemblies, only do this for System.xxx.
1730 2004-05-01 Jackson Harper <jackson@ximian.com>
1732 * appdomain.c: If the culture is neutral we set it to "".
1734 2004-04-29 Jackson Harper <jackson@ximian.com>
1736 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
1738 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
1740 * string-icalls.c: added low overhead function for copying chars
1741 * icall.c: added needed icall for the above function
1743 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1745 * icall.c: fix return value of get_global_assembly_cache. Implemented
1746 Environment.GetLogicalDrives.
1748 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
1750 * rand.c: try and talk to egd or prngd
1751 for random bytes if opening devices fail.
1753 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
1755 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
1756 alignment for the type using the native alignment of its members
1757 instead of using klass->min_align.
1759 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
1761 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1764 * socket-io.c: added check for sys/aio.h.
1766 2004-04-28 Dick Porter <dick@ximian.com>
1768 * threads.c: Don't abort a thread thats already aborting, when
1769 terminating everything.
1771 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1773 * icall.c: added 2 new async calls for Socket.
1775 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
1778 * threadpool.c: removed unused variable.
1780 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
1782 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
1784 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
1786 * locales.c: put back string_invariant_tolower () and
1787 string_invariant_toupper ().
1789 2004-04-26 David Waite <mass@akuma.org>
1794 * unicode.h: remove comma from end of enumeration declarations
1796 2004-04-26 David Waite <mass@akuma.org>
1798 * debug-mono-symfile.h:
1801 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
1804 2004-04-26 Jackson Harper <jackson@ximian.com>
1806 * appdomain.c: Increment version number.
1808 2004-04-26 Jackson Harper <jackson@ximian.com>
1810 * appdomain.c: Set assembly references public token value when
1811 PublicKeyToken is specified, not the hash_value. Free public token
1812 values when free assembly name data. Previously the public key
1813 token was hex decoded, however we are using hex encoded public key
1814 tokens, so this is not neccasary.
1815 * assembly.c: Lookup assemblies in the gac if their public token
1816 value is set. Add function to allow enabling user gac
1817 lookups. Specify whether or not the assembly was loaded from the
1818 GAC. Compare full assembly names when checking the cache for
1819 assemblies (Temporarily disabled see comment in code). Remove
1820 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
1821 specifies trace-loader they get extra info to stdout on the
1822 loading of assemblies.
1823 * image.h: Add a field for an assembly references public token
1824 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
1825 whether an assembly has been loaded from the GAC.
1826 * image.c: Remove a corlib -> mscorlib name mapping.
1827 * loader.h: Add function to enable/disable the user gac.
1828 * mono-config.c: Check if the usergac is enabled in the config
1830 * icall.c: New icall to determine whether or not an assembly has
1831 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
1832 * tabldefs.h: Add constant for assemblyref flag that specifies a
1833 full public key is used instead of a public token.
1834 * reflection.c: Remove mscorlib -> corlib mappings. Set
1835 PublicTokenValue instead of hash value. This value is a hex
1836 string so it does not need to be expanded.
1838 2004-04-26 Martin Baulig <martin@ximian.com>
1840 * mono-debug-debugger.c (mono_debugger_initialize): Set
1841 `mono_debugger_initialized' before calling mono_debug_lock().
1843 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
1845 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
1846 InternalToUpper/InternalToLower.
1847 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
1848 removed invariant culture shortcut. This is now done in managed code.
1849 * locales.c: (string_invariant_toupper/tolower) removed.
1851 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1853 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
1854 Added Poll internal call.
1856 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
1857 call for Poll. Select was too heavy for polling a single socket.
1859 * threadpool.[ch]: added mono_threadpool_cleanup.
1860 * threads.c: use it. Don't use Thread_Abort on windows.
1862 2004-04-23 Martin Baulig <martin@ximian.com>
1864 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
1866 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
1868 * icall.c: Registred new icalls for key pair protection and added an
1869 icall for Environment.GetFolderPath on Windows.
1870 * security.c|h: Added new icalls for key pair protection.
1872 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1874 * socket-io.c: don't display the non-supported family warning for known
1875 families. Now this is not displayed on windows when checking support
1878 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1880 * class.c: don't display the layout warning for static fields.
1882 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
1884 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
1885 * locales.c, locales.h: Added new icalls for culture-specific
1886 Char.ToLower and Char.ToUpper.
1888 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1890 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
1893 2004-04-20 Martin Baulig <martin@ximian.com>
1895 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
1896 of the type name before passing it to mono_reflection_type_from_name().
1898 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
1900 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
1901 encodings here. Fixes #56965.
1903 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
1905 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
1906 fix test on strstr result not that I can see anything that
1907 relies on the result.
1909 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
1911 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
1914 * marshal.c (mono_marshal_get_string_encoding): New helper function.
1916 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
1917 function to determine which marshalling to use for strings. Fixes
1920 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
1922 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
1924 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
1926 * icall.c: #include mono-config.h
1928 2004-04-15 Jackson Harper <jackson@ximian.com>
1930 * culture-info-tables.h: Fix date formats for en-US culture.
1932 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
1934 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
1935 ThreadPool.SetMinThreads.
1936 * threadpool.c: Implemented ThreadPool.GetMinThreads and
1937 ThreadPool.SetMinThreads.
1939 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
1941 * mono-config.c: also load the .config file in the directory
1942 where the assembly was found.
1944 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
1946 * assembly.c: load per-assembly config files.
1947 * icall.c: decrapified code to get the config dir and moved to
1949 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
1950 per-assembly config files. When doing a dll map lookup give precedence
1951 to the per-assembly data.
1953 2004-04-14 Martin Baulig <martin@ximian.com>
1955 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
1956 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
1957 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
1959 * mono-debugger-debugger.c: While the debugger is locked, remember
1960 whether the symbol tables have changes and send one single
1961 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
1963 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
1965 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
1967 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
1970 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
1971 account when marshalling string arrays. Fixes #56965.
1973 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
1975 * icall.c: Add new icalls mapping for security.
1976 * security.c|h: Add internal calls for WindowsIdentity,
1977 WindowsImpersonationContext and WindowsPrincipal.
1979 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
1981 * class.c: Added comment to ensure the System.MonoDummy class
1982 is removed when no longer necessary
1984 2004-04-13 Miguel de Icaza <miguel@ximian.com>
1986 * appdomain.c: Pass arguments to the bootstraping exceptions to
1987 minimize JITed methods at boot
1989 * metadata.c (mono_exception_from_name_two_strings): Allow for the
1990 second string to be null.
1992 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
1993 Change the protocol to minimize the JIT methods at startup. Now
1994 it Returns the internal codepage, if the value of "int_code_page"
1995 is 1 at entry, and we can not compute a suitable code page
1996 number, returns the code page as a string.
1998 2004-04-13 Jackson Harper <jackson@ximian.com>
2000 * culture-info-tables.h: Fix number of decimal digits for all
2003 2004-04-13 Jackson Harper <jackson@ximian.com>
2005 * icall.c: Clairfy out of sync error message. It is not always
2006 your corlib that is out of sync.
2008 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
2010 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
2011 properties when only the set accessor is overriden. Fixes #55874.
2013 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
2015 * assembly.c (mono_assembly_load_references): Make this thread safe.
2018 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
2020 * monosn.c: Add missing initialization calls.
2022 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
2025 ves_icall_System_Globalization_CultureInfo_construct_number_format
2026 Fix g_assert so it compiles on fussier compilers re int/ptr
2029 2004-04-08 Dick Porter <dick@ximian.com>
2032 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
2033 53992. Also rearrange the code so that the internal calls return
2034 an error value and exceptions are thrown from managed code.
2036 * icall.c: Add type info to the socket icalls.
2038 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2040 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
2043 2004-04-07 Martin Baulig <martin@ximian.com>
2045 * class.c (mono_class_from_generic_parameter): Don't default
2046 `klass->parent' to `mono_defaults.object_type'.
2048 2004-04-07 Martin Baulig <martin@ximian.com>
2050 * reflection.c (mono_reflection_initialize_generic_parameter): Set
2051 `param->pklass->reflection_info'.
2053 2004-04-07 Jackson Harper <jackson@ximian.com>
2055 * culture-info-tables.h: Fix date separator symbol.
2057 2004-04-07 Martin Baulig <martin@ximian.com>
2059 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
2060 from System.Type to System.MonoType.
2062 2004-04-07 Martin Baulig <martin@ximian.com>
2065 (MonoReflectionGenericParam): Added `has_reference_type' and
2066 `has_value_type' fields.
2068 * reflection.c (mono_image_get_generic_param_info): Encode the
2069 correct flags if we have the `class' or `struct' constraint.
2071 2004-04-07 Martin Baulig <martin@ximian.com>
2074 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
2076 2004-04-07 Jackson Harper <jackson@ximian.com>
2078 * appdomain.c: Revert extra patches, just wanted to bump the
2081 2004-04-07 Jackson Harper <jackson@ximian.com>
2083 * Makefile.am: Add culture-info private headers.
2084 * icall.c: Add new icalls for contructing locales.
2085 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
2086 * locales.h: Declare new culture info construction methods.
2087 * object.h: Add new fields used to avoid the CultureMap to
2089 * culture-info.h: Definition of structs used in the culture info
2091 * culture-info-tables.h: Autogenerated tables that contain culture
2092 info data. This file was generated with the locale-builder tool.
2093 * appdomain.c: Incement corlib version number.
2095 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
2097 * appdomain.c: (mono_runtime_init) move mono_thread_init
2098 to before mono_object_new calls so critical sections
2099 are initialized before use.
2101 2004-04-07 Martin Baulig <martin@ximian.com>
2104 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
2105 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
2106 (ves_icall_MonoGenericParam_initialize): Removed.
2107 (monogenericparam_icalls): Removed.
2108 (generictypeparambuilder_icalls): Added new table for
2109 System.Reflection.Emit.GenericTypeParameterBuilder.
2112 (mono_reflection_define_generic_parameter): Removed.
2113 (mono_reflection_initialize_generic_parameter): This is now called
2114 from GenericTypeParameterBuilder's .ctor.
2116 2004-04-06 Martin Baulig <martin@ximian.com>
2118 * class.c (mono_class_init): Don't inflate nested classes in a
2120 (mono_type_get_name_recurse): Include the generic arguments for
2121 generic instances and generic type declarations.
2122 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
2123 (_mono_class_get_instantiation_name): Removed.
2124 (mono_class_create_generic): Always use `gklass->name' as our name.
2126 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
2128 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
2129 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
2130 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
2131 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
2132 closed generic methods here.
2135 (mono_reflection_generic_inst_get_nested_types): Removed.
2136 (inflate_mono_method): Copy the generic parameters from the
2137 MonoMethodHeader into out MonoGenericMethod.
2139 2004-04-06 Martin Baulig <martin@ximian.com>
2142 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
2144 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
2146 * reflection.c (build_compressed_metadata): If we have any entries
2147 in the GenericParam, MethodSpec or GenericParamConstraint tables,
2148 set the header version to 1.1.
2150 2004-04-06 Martin Baulig <martin@ximian.com>
2152 * class.c (mono_class_init): If we're a generic instance,
2153 initialize our nested classes, too.
2154 (_mono_class_get_instantiation_name): Deal with the new `!%d'
2157 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2159 * process.c: quote the argument passed to the shell on windows.
2161 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
2163 * threads.c (mono_alloc_special_static_data): Allow this to be
2164 called during startup.
2166 2004-04-02 Martin Baulig <martin@ximian.com>
2169 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
2171 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
2173 * icall.c: Fix build.
2175 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
2177 * Makefile.am: Added security.c|h.
2178 * icall.c: Added icall for get_UserName;
2179 * security.c: New file for security related icalls. Added function
2180 get_UserName for System.Environment (fix #56144).
2181 * security.h: New. Header file for security.c
2183 2004-04-02 Dick Porter <dick@ximian.com>
2185 * icall.c: Deleted the icalls that were obsoleted some time ago
2186 by the ICU string code, and which were mixed into the icall
2187 rearranging. Fixes bug 55969.
2190 * string-icalls.c: Deleted the code that those icalls reference.
2192 2004-04-01 Martin Baulig <martin@ximian.com>
2194 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
2196 * class.c (mono_class_from_generic_parameter): Don't set
2197 TYPE_ATTRIBUTE_INTERFACE.
2198 (my_mono_class_from_generic_parameter): Likewise.
2200 2004-04-01 Martin Baulig <martin@ximian.com>
2202 * loader.c (find_method): Added an optional `MonoClass *ic'
2203 argument to search in a specific interface.
2204 (mono_get_method_constrained): New public function.
2206 2004-04-01 Martin Baulig <martin@ximian.com>
2208 * reflection.c (mono_image_get_generic_field_token): Use the
2209 `handleref' cache here.
2211 2004-04-01 Martin Baulig <martin@ximian.com>
2213 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
2215 * reflection.c (create_generic_typespec): Use the `typespec' hash
2216 here, not the `typeref' one.
2218 2004-04-01 Martin Baulig <martin@ximian.com>
2220 * class.c (mono_class_inflate_generic_type): Moved the
2221 functionality into a new static inflate_generic_type() which
2222 returns NULL if it didn't do anything. Only increment the
2223 `mono_stats.inflated_type_count' if we actually inflated
2225 (mono_class_get_full): Check the classes type to see whether we
2226 need to inflate it; also inflate MONO_TYPE_(M)VAR.
2228 2004-04-01 Jackson Harper <jackson@ximian.com>
2230 * reflection.c: Set culture for assembly references.
2232 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
2234 * reflection.[ch], icall.[ch], Fix support for pinning variables.
2236 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2239 (do_mono_assembly_open): the critical section also covers
2240 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
2242 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2245 (mono_manage_threads): abort the background threads when finishing.
2248 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2250 * gc.c: only close the done_event handle if there was no timeout.
2253 2004-03-30 Martin Baulig <martin@ximian.com>
2255 * icall.c (icall_entries): It's called "System.Activator", not
2256 "System.Activation".
2258 2004-03-30 Martin Baulig <martin@ximian.com>
2260 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
2261 (mono_class_create_from_typespec): Likewise.
2263 2004-03-30 Martin Baulig <martin@ximian.com>
2265 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
2266 `has_ctor_constraint' and `initialized'.
2268 2004-03-30 Martin Baulig <martin@ximian.com>
2270 * reflection.c (encode_new_constraint): New static function to add
2271 the constructor constraint attribute to a type parameter.
2272 (encode_constraints): Call encode_new_constraint() if necessary.
2275 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
2277 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
2279 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
2281 * reflection.c, icall.c: add support for pinning variables.
2283 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
2285 * marshal.c (mono_marshal_get_managed_wrapper):
2286 init bool local with zero rather than null.
2288 2004-03-29 Martin Baulig <martin@ximian.com>
2290 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
2291 the "official" behavior here.
2292 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
2294 2004-03-29 Martin Baulig <martin@ximian.com>
2296 * icall.c: Reflect latest API changes.
2298 2004-03-29 Martin Baulig <martin@ximian.com>
2300 * loader.c (mono_get_method_from_token): Also call
2301 mono_metadata_load_generic_params () for abstract and interface
2302 methods; replace the type arguments in the method signature with
2303 the ones which are loaded from the metadata.
2305 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
2307 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
2308 of the lock is not the current thread. MS.NET don't do it, in spite of
2309 what the documentation says. See bug #56157.
2311 2004-03-28 Martin Baulig <martin@ximian.com>
2313 * class.c (mono_class_init): Don't call init_properties() and
2314 init_events() for generic instances; set `prop->parent' when
2315 inflating properties.
2317 * reflection.c (mono_generic_inst_get_object): Call
2318 `mono_class_init (ginst->klass)'.
2319 (mono_type_get_object): Only create a MonoGenericInst if your
2320 generic type is a TypeBuilder.
2321 (do_mono_reflection_bind_generic_parameters): Only set
2322 `ginst->is_dynamic' if our generic type is a TypeBuilder.
2324 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
2326 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
2329 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2331 * icall.c: added Kill_internal icall.
2332 * process.[ch]: added Kill_internal icall.
2334 2004-03-25 Martin Baulig <martin@ximian.com>
2336 * class.h (MonoStats): Added `generic_instance_count',
2337 `inflated_method_count', `inflated_type_count' and
2338 `generics_metadata_size'.
2340 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2342 * reflection.c: no warnings now.
2344 2004-03-25 Martin Baulig <martin@ximian.com>
2346 * class.c (mono_class_get_full): New public function; does a
2347 mono_class_get(), but also takes a `MonoGenericContext *'.
2349 * loader.c (mono_field_from_memberref): Renamed to
2350 `field_from_memberref', made static and added `MonoGenericContext *'
2352 (mono_field_from_token): Added `MonoGenericInst *' argument.
2353 (method_from_memberef): Likewise.
2354 (mono_get_method_from_token): Likewise.
2355 (mono_get_method_full): New public function; does a
2356 mono_get_method(), but also takes a `MonoGenericContext *'.
2358 * verify.c (mono_method_verify): Get the method's generic context
2359 and pass it to mono_field_from_token(), mono_get_method_full() and
2360 mono_class_get_full().
2362 2004-03-25 Martin Baulig <martin@ximian.com>
2364 * class.c (mono_class_inflate_generic_type): Take a
2365 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
2366 `MonoGenericMethod *'.
2368 2004-03-25 Martin Baulig <martin@ximian.com>
2370 * loader.h (MonoMethodInflated): Store the MonoGenericContext
2371 instead of the MonoGenericMethod here.
2373 2004-03-25 Martin Baulig <martin@ximian.com>
2375 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
2376 each time we create a new MonoGenericInst, we also create a new
2377 context which points back to us.
2379 * class.c (inflate_method): Use `ginst->context' instead of
2380 creating a new context.
2382 * loader.c (method_from_memberref): Use
2383 `klass->generic_inst->context' instead of creating a new context.
2385 2004-03-25 Martin Baulig <martin@ximian.com>
2387 * class.h (MonoGenericContext): New struct.
2388 (MonoGenericMethod): Removed `generic_inst'.
2390 * class.c (mono_class_inflate_generic_method): Take a
2391 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
2393 2004-03-25 Martin Baulig <martin@ximian.com>
2395 * loader.h (MonoMethodInflated): New typedef.
2397 * metadata.h (MonoMethodSignature): Removed `gen_method', make
2398 `generic_param_count' consume just 30 bits, added `is_inflated'
2399 and `has_type_parameters' flags (one bit each).
2401 * class.c (mono_class_inflate_generic_method): Create a
2402 MonoMethodInflated instead of a MonoMethodNormal and set
2403 `is_inflated' in the method signature.
2405 * class.h (MonoGenericMethod): Removed `generic_method'.
2407 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
2409 * image.c: Make sure the name of a MonoImage is always an absolute path.
2410 This fixes bug #54415.
2412 2004-03-24 Martin Baulig <martin@ximian.com>
2414 * class.c (mono_class_setup_vtable): If we're a generic instance,
2415 use our generic type's vtable size.
2417 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
2419 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
2420 MONO_NO_UNLOAD env var as a temporary workaround for unloading
2423 2004-03-23 Martin Baulig <martin@ximian.com>
2425 * class.h (MonoDynamicGenericInst): Added `int count_events' and
2426 `MonoEvent *events'.
2428 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
2429 (typebuilder_icalls): Added "get_event_info"; calls
2430 mono_reflection_event_builder_get_event_info().
2432 * reflection.c (mono_reflection_generic_inst_initialize): Added
2433 `MonoArray *events'.
2434 (mono_reflection_event_builder_get_event_info): New function.
2436 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
2438 * object.h: add mono_type_initialization_init
2440 * object.c (mono_runtime_class_init):
2441 implement class constructor synchronization rules
2442 to cope with threading issues.
2443 add mono_type_initialization_init
2445 * appdomain.c (mono_runtime_init): call
2446 mono_type_initialization_init
2448 * class.h: removing initializing field from MonoVTable
2450 2004-03-23 Martin Baulig <martin@ximian.com>
2452 * class.c (my_mono_class_from_generic_parameter): Use
2453 `param->name' if it's not NULL.
2455 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
2457 * class.c: do not insert non-virtual methods in the vtable.
2458 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
2459 that means the method is non-virtual. This never would have
2462 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
2464 * profiler.c: Added lock for accessing coverage_hash.
2466 2004-03-22 Martin Baulig <martin@ximian.com>
2468 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
2469 `method->method->signature->generic_param_count != 0' to make it
2470 work for interface methods.
2472 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2474 * process.c: quote the string passed to the shell using g_shell_quote.
2476 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2479 (mono_threads_manage): don't remove the finalizer thread and self
2480 from the threads hash table so that mono_thread_manage can be called
2483 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2485 * process.c: quote the arguments when UseShellExecute is true. Fixes
2488 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2490 * threads.c: set mono_thread_detach as a cleanup routine for every
2491 thread. This way it's always executed upon thread termination, either
2492 aborted or finished normally. No more xsp hangs!
2494 2004-03-17 Martin Baulig <martin@ximian.com>
2496 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
2497 `int count_nested' and a `MonoType **nested'.
2499 * reflection.c (mono_reflection_bind_generic_parameters): Moved
2500 most of the functionality into a new static
2501 do_mono_reflection_bind_generic_parameters() and don't take a
2502 `MonoType *nested_in' argument any more. Don't compute nested
2504 (mono_reflection_generic_inst_get_nested_types): New public method
2505 to get nested types.
2507 * class.c (mono_class_create_generic): Set `klass->nested_in' if
2508 we're a nested class.
2510 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
2511 mono_reflection_generic_inst_get_nested_types() to compute the
2514 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
2516 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
2517 descriptive error message under windows.
2519 2004-03-17 Martin Baulig <martin@ximian.com>
2521 * class.c (dup_type): Added `const MonoType *original' argument;
2522 copy the attrs from the original type.
2524 2004-03-17 Martin Baulig <martin@ximian.com>
2526 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
2527 `m->generic_inst_cache' here.
2529 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
2531 * exception.h exception.c: Add stack_overflow_exception.
2533 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2536 (overlapped_callback): call SetEvent *after* invoking the callback.
2537 No need to call CloseHandle.
2539 2004-03-16 Martin Baulig <martin@ximian.com>
2541 * reflection.c (mono_image_get_fieldref_token): Take a
2542 `MonoReflectionField *' instead of a `MonoClassField *' and a
2543 `MonoClass *'; store the `MonoReflectionField *' in the hash.
2545 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2547 * appdomain.c: don't add the culture to the filename we're looking for
2548 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
2550 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2552 * locales.c: don't ignore symbols when doing case insensitive compares.
2553 Thanks Dick! Fixes bug #54046.
2555 * threads.c: surround 'threads' usage with enter/leave in
2558 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
2560 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
2561 implicitly marshalled as [Out]. Fixes #55450.
2563 (mono_marshal_get_runtime_invoke): Zero out the result if there is
2566 2004-03-16 Martin Baulig <martin@ximian.com>
2568 * class.c (mono_class_from_generic_parameter): Use the actual
2571 2004-03-16 Martin Baulig <martin@ximian.com>
2573 * reflection.c (type_get_signature_size): New static function.
2574 Compues the size of the type in a method signature.
2575 (method_get_signature_size): New static function; calls
2576 type_get_signature_size() to compute the actual size of the
2578 (method_encode_signature): Use method_get_signature_size() to get
2579 the signature's size rather than using `nparams * 10'.
2581 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2583 * file-io.h: define here WapiOverlapped on windows. I don't want the
2584 regular OVERLAPPED one.
2587 * threadpool.c: somehow, BindIoCompletionCallback is not found.
2588 Disabling AIO on windows.
2590 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2592 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
2595 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2597 * appdomain.c: upgraded corlib version.
2599 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
2600 and BeginWrite. Allow opening files for asynchrnous operations.
2602 * file-io.h: new struct that maps FileStreamAsyncResult.
2603 * icall.c: added new icalls.
2604 * process.[ch]: support setting child process environment variables
2605 and use the SHELL or COMSPEC when UseShellExecute is true.
2607 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
2608 callback for async. IO is here and also BindHandle.
2610 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
2613 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
2615 * reflection.c (create_custom_attr): Allow len == 0.
2617 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
2618 computation on big-endian machines.
2620 2004-03-13 Martin Baulig <martin@ximian.com>
2622 * class.h (MonoGenericInst): Added `int count_ifaces'.
2624 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
2625 `ginst->count_ifaces' instead `klass->interface_count' since we
2626 may get called before the vtable is created.
2628 * loader.c (mono_method_get_param_names): If we're a generic
2629 instance, return and don't initialize the class.
2631 * reflection.c (mono_reflection_setup_generic_class): Don't call
2632 ensure_runtime_vtable().
2633 (mono_reflection_bind_generic_parameters): Set
2634 `ginst->count_ifaces'.
2636 2004-03-11 Jackson Harper <jackson@ximian.com>
2640 * unicode.h: Remove unused System.Char icalls.
2642 2004-03-11 Miguel de Icaza <miguel@ximian.com>
2644 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
2645 code when we P/Invoke the first library in Windows.Forms, instead
2646 of when we first open the assembly.
2648 * assembly.c: Drop the lookup from here.
2650 2004-03-10 Martin Baulig <martin@ximian.com>
2652 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
2653 class for properties, fields and events. Finally fixes #54945.
2655 2004-03-10 Martin Baulig <martin@ximian.com>
2657 * metadata.c (mono_metadata_class_equal): New static function;
2658 checks whether two generic instances or two generic parameters are
2660 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
2663 2004-03-10 Martin Baulig <martin@ximian.com>
2665 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
2667 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
2668 argument and write it into the `reflection_info' field.
2671 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
2672 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
2674 2004-03-09 Jackson Harper <jackson@ximian.com>
2676 * char-conversions.h: use 8 bits for numeric data its all we need
2677 * icall.c: numeric data is only 8 bits now.
2679 2004-03-09 Martin Baulig <martin@ximian.com>
2681 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
2683 * class.c (init_properties, init_events): Initialize the new
2686 * reflection.c (typebuilder_setup_properties): Likewise.
2687 (typebuilder_setup_events): Likewise.
2689 * reflection.h (MonoEventInfo): Replaced `parent with
2690 `declaring_type' and `reflected_type'.
2692 * icall.c (ves_icall_get_property_info): Distinguish between
2693 declaring and reflected type.
2694 (ves_icall_get_event_info): Likewise.
2696 2004-03-09 Martin Baulig <martin@ximian.com>
2698 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
2699 (ves_icall_Type_GetField): Correctly set field->klass.
2701 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
2703 * loader.h: Fix warning.
2705 2004-03-08 Miguel de Icaza <miguel@ximian.com>
2707 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
2708 library routine if present. Notice that it will still continue
2709 executing even if its missing, for those working on the Gtk#
2710 edition of Windows.Forms.
2712 * assembly.c (do_mono_assembly_open): If loading the
2713 System.Windows.Forms call mono_loader_wini_init.
2715 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
2717 * class.h: Added MonoRemoteClass struct.
2718 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
2719 function for MonoStrings.
2720 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
2721 Added internal call for getting the proxy type.
2722 * marshal.c: Get the type of transparent proxies from its remote_class.
2723 Added methods that generate the IL for type checks and casts:
2724 mono_marshal_get_isinst, mono_marshal_get_castclass,
2725 mono_marshal_get_proxy_cancast.
2726 * marshal.h: Declaration of the previous new methods.
2727 * object.c: Added new moethods for creating and updating MonoRemoteClass
2728 instances: mono_remote_class, mono_upgrade_remote_class,
2729 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
2730 * verify.c: FIx transparent_proxy_fields layout.
2731 * appdomain.c: Bump corlib version.
2733 2004-03-04 Jackson Harper <jackson@ximian.com>
2735 * icall.c: Add icall to access char conversion tables.
2736 * char-conversions.h: Character conversion tables.
2737 * Makefile.am: Add char-conversions.h private header file.
2739 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
2741 * appdomain.c (unload_thread_main): Increase unloading timeout to
2742 10 sec as a temporary workaround for Nant problems.
2744 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
2746 * gc.c: Add checks for GC_enable and GC_disable.
2748 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
2749 (jaak@zd.com.pl). Fix memory corruption in String.Replace
2752 2004-02-27 Martin Baulig <martin@ximian.com>
2754 * reflection.c (mono_reflection_bind_generic_parameters): Take a
2755 `MonoReflectionType *' instead of a `MonoType *'.
2757 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
2759 * gc.c (run_finalize): Avoid finalizing the object representing the
2761 (finalizer_thread): Fix warning.
2763 2004-02-25 Martin Baulig <martin@ximian.com>
2765 * class.c (_mono_class_get_instantiation_name): Added `int offset'
2766 argument for nested types.
2767 (mono_class_create_generic): Added support for nested generictypes.
2769 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
2772 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
2774 * reflection.c (method_encode_signature): Increase the minimum
2775 value of `size' from 10 to 11.
2776 (mono_reflection_bind_generic_parameters): Take `int type_argc'
2777 and `MonoType **types' arguments instead of the `MonoArray
2778 *types'; added `MonoType *nested_in'. Recursively instantiate
2781 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
2783 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
2784 stack_overflow_ex members which are used by exception handling.
2786 * appdomain.c (mono_runtime_init): Initialize the new members.
2788 * gc.c (mono_gc_enable): New helper function.
2789 * gc.c (mono_gc_disable): New helper function.
2791 2004-02-23 Martin Baulig <martin@ximian.com>
2793 * icall.c: I must have been really stupid - make it actually work
2796 2004-02-23 Martin Baulig <martin@ximian.com>
2798 * loader.c (method_from_memberref): Only inflate the method if
2799 it's in another klass.
2801 2004-02-23 Martin Baulig <martin@ximian.com>
2803 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
2804 (mono_class_init): If we're a generic instance and an interface,
2805 compute `class->interface_id'; also create `class->interfaces'
2806 here and inflate them.
2808 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
2810 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
2812 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
2814 2004-02-15 Miguel de Icaza <miguel@ximian.com>
2816 * reflection.c (method_encode_code): Improved the error message
2817 generated by the exception.
2819 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2821 * icall.c: Martin did not do what he said in the ChangeLog for
2822 2004-02-18, but put back the changes for properties and events.
2823 Commenting those changes out again and adding comment to bug #54518.
2825 * process.c: removed warning.
2827 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
2829 * marshal.c (emit_struct_conv): Print an error message instead of
2830 asserting when a type does not have the StructLayout attribute.
2832 2004-02-20 Martin Baulig <martin@ximian.com>
2834 * reflection.c (mono_type_get_object): Also use the cache for
2836 (mono_reflection_bind_generic_parameters): Always compute
2839 2004-02-20 Martin Baulig <martin@ximian.com>
2841 * class.h (MonoGenericMethod): Removed `klass'.
2843 * class.c (mono_class_inflate_generic_method): Added `MonoClass
2846 2004-02-20 Martin Baulig <martin@ximian.com>
2848 * reflection.c (method_encode_methodspec): Actually use the
2849 uninflated signature for the memberref.
2851 2004-02-20 Martin Baulig <martin@ximian.com>
2853 * class.h (MonoGenericMethod): Removed `declaring'.
2855 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
2856 is NULL, compute it here.
2858 2004-02-20 Martin Baulig <martin@ximian.com>
2860 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
2862 * metadata.c (mono_metadata_generic_inst_hash): New method.
2863 (mono_metadata_generic_inst_equal): New method.
2865 * reflection.c (mono_reflection_bind_generic_parameters): Use the
2866 `klass->image->generic_inst_cache' cache to avoid creating
2867 duplicate MonoGenericInst's.
2869 * class.c (mono_class_inflate_generic_type): Use the cache.
2871 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
2873 * object.c: fixed gc descriptor calculation for embedded valuetypes.
2875 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2877 * icall.c: added Socket.WSAIoctl icall.
2879 * socket-io.[ch]: implemented
2880 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
2882 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
2884 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
2886 2004-02-18 Urs C Muff <umuff@quark.com>
2888 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
2889 this work on PPC and other big-endian architectures.
2891 * debug-mono-symfile.h: Prepended the names of all the `guint32'
2892 fields with an underscore to make sure they're only accessed by
2895 2004-02-18 Martin Baulig <martin@ximian.com>
2897 * icall.c: Put the klass->refclass changes back for methods and
2898 fields, but not for properties and events. We're currently not
2899 distinguishing between DeclaringType and ReflectedType for
2900 properties and events, that's what caused the regressions.
2902 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2905 (mono_async_result_new): the handle can be NULL.
2907 * threadpool.c: Use an event instead of a semaphore, don't initialize
2908 it until needed. This saves quite a few semaphores from being created
2909 when using the threadpool.
2911 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
2913 * object.c (mono_string_is_interned_lookup): Fix interning of long
2914 strings. Fixes #54473.
2916 * domain.c (ldstr_equal): Optimize if the two strings are equal.
2918 * icall.c: Revert the klass->refclass changes since they introduce
2919 regressions (bug #54518).
2921 2004-02-18 Martin Baulig <martin@ximian.com>
2923 * class.c (mono_class_init): If we're a generic instance and don't
2924 come from a TypeBuilder, inflate our members here.
2925 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
2926 (mono_class_create_generic): New public method.
2927 (mono_class_initialize_generic): Removed.
2928 (get_instantiation_name): Renamed to
2929 _mono_class_get_instantiation_name() and made it public.
2931 2004-02-18 Martin Baulig <martin@ximian.com>
2933 * class.c (mono_class_inflate_generic_type): Clear the new
2934 instance's `nginst->klass' when inflating a generic instance.
2935 (mono_class_is_subclass_of): Added (basic) support for generic
2938 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
2940 * appdomain.h, domain.c: use a MonoCodeManager instead of a
2941 MonoMempool to hold compiled native code.
2943 2004-02-17 Martin Baulig <martin@ximian.com>
2945 * class.h (MonoDynamicGenericInst): Added `count_properties' and
2948 * reflection.c (mono_reflection_generic_inst_initialize): Added
2949 `MonoArray *properties' argument.
2951 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
2953 2004-02-17 Martin Baulig <martin@ximian.com>
2955 * icall.c (ves_icall_Type_GetFields): Renamed to
2956 ves_icall_Type_GetFields_internal() and added a
2957 `MonoReflectionType *rtype' argument; pass it to
2958 mono_field_get_object() to set the field's "reflected" type.
2959 (ves_icall_Type_GetConstructors): Likewise.
2960 (ves_icall_Type_GetEvents): Likewise.
2961 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
2962 argument; pass it to mono_method_get_object() to set the method's
2965 2004-02-17 Martin Baulig <martin@ximian.com>
2967 * class.h (MonoDynamicGenericInst): New type.
2968 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
2970 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
2971 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
2972 (ves_icall_MonoGenericInst_GetFields): New interncall.
2974 * class.c (mono_class_from_generic): Don't call
2975 mono_class_initialize_generic() if this is a dynamic instance;
2976 ie. it's being created from a TypeBuilder.
2977 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
2978 `class->byval_arg.type'.
2980 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
2981 to `inflate_method' and made static.
2982 (mono_reflection_inflate_field): Removed.
2983 (mono_reflection_generic_inst_initialize): New public method.
2985 * reflection.h (MonoReflectionGenericInst): Removed `methods',
2986 `ctors' and `fields'; added `initialized'.
2988 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
2990 * debug-helpers.c (mono_method_full_name): Fix output for empty
2993 2004-02-12 Martin Baulig <martin@ximian.com>
2995 * class.h (MonoClassField): Added `MonoType *generic_type'.
2997 * reflection.c (mono_image_get_fieldref_token): Added support for
2998 instantiated generic types.
2999 (field_encode_inflated_field): Removed.
3000 (mono_image_get_inflated_field_token): Removed.
3001 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
3003 * reflection.h (MonoReflectionInflatedField): Removed.
3005 2004-02-12 Martin Baulig <martin@ximian.com>
3007 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
3008 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
3010 * reflection.c (mono_image_get_methodspec_token): Take a
3011 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
3012 (mono_image_create_token): Check whether we have a
3013 `method->signature->gen_method' and call
3014 mono_image_get_methodspec_token() if appropriate.
3015 (inflated_method_get_object): Removed.
3016 (mono_reflection_bind_generic_method_parameters): Return a
3017 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
3018 (mono_reflection_inflate_method_or_ctor): Likewise.
3020 * reflection.h (MonoReflectionInflatedMethod): Removed.
3022 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
3024 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
3025 for custom valuetype marshalling.
3027 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
3029 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3031 * icall.c: fixed WSAGetLastError_internal name.
3033 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
3035 * threads.c (mono_thread_attach): Allow this to be called multiple
3038 * threads.c (build_wait_tids): Do not wait for ourselves.
3040 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
3041 appdomain list is empty.
3043 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
3044 memory returned by mono_string_builder_to_utf16, since it points into
3045 managed memory. Thanks to Bernie Solomon for noticing this.
3047 * icall.c: Add AppDomainSetup icalls.
3049 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
3051 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
3054 * reflection.c (reflection_methodbuilder_to_mono_method): Save
3055 custom attributes to the method_aux struct. Also fix array indexes etc.
3057 * loader.c (mono_method_get_param_names): Make dynamic case work again.
3059 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
3061 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
3062 (both static and runtime) and reduce startup time.
3064 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
3066 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
3067 AsAny marshalling conversion instead of crashing.
3069 * marshal.c: Fix warnings.
3071 2004-02-09 Martin Baulig <martin@ximian.com>
3073 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
3075 * reflection.h (MonoReflectionInflatedMethod): Removed the
3076 `declaring' field, it's now in the unmanaged MonoGenericMethod.
3078 * reflection.c (method_encode_methodspec): Removed the `method'
3079 argument; we get it from `gmethod->declaring'.
3080 (inflated_method_get_object): Removed the `declaring' argument.
3082 2004-02-09 Martin Baulig <martin@ximian.com>
3084 * class.h (MonoGenericMethod): New type.
3085 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
3088 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
3089 a `MonoGenericMethod *gen_method' one.
3091 * class.c (mono_class_inflate_generic_type): Take an additional
3092 `MonoGenericMethod * argument. This is only non-NULL if we're
3093 inflating types for a generic method.
3094 (mono_class_inflate_generic_signature): Renamed to
3095 inflate_generic_signature() and made static; take a
3096 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
3097 (inflate_generic_header): Take a `MonoGenericMethod *' argument
3098 instead of a `MonoGenericInst *' one.
3099 (mono_class_inflate_generic_method): Likewise.
3101 * reflection.c (encode_generic_method_sig): Take a
3102 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
3103 (method_encode_methodspec): Likewise.
3104 (inflated_method_get_object): Likewise.
3106 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
3107 field with a `MonoGenericMethod *gmethod' one.
3109 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
3111 * class.h (mono_class_has_parent): add parens to expansion
3114 2004-02-08 Martin Baulig <martin@ximian.com>
3116 * image.h (MonoImage): Removed `generics_cache'.
3118 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
3119 instead of a `MonoType *' argument; removed the `inflate_methods'
3120 argument. Don't inflate methods here.
3122 * loader.c (find_method): If it's a generic instance, call
3123 mono_class_init() on the `sclass->generic_inst->generic_type'.
3125 * metadata.c (mono_type_size): Make this work on uninitialized
3126 generic instances; call it on the `ginst->generic_type's class.
3128 * reflection.c (mono_reflection_bind_generic_parameters): Call
3129 mono_class_from_generic() to create the `ginst->klass'.
3131 2004-02-08 Martin Baulig <martin@ximian.com>
3133 * class.h (MonoClass): Changed type of `generic_inst' from
3134 `MonoType *' to `MonoGenericInst *'.
3136 2004-02-08 Martin Baulig <martin@ximian.com>
3138 * icall.c (ves_icall_Type_BindGenericParameters): Just call
3139 mono_type_get_object(), this is now creating a `MonoGenericInst'
3140 for MONO_TYPE_GENERICINST.
3141 (ves_icall_MonoGenericInst_GetParentType): Likewise.
3142 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
3144 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
3145 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
3146 (inflated_method_get_object): Added `MonoClass *refclass' argument.
3147 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
3150 * reflection.h (MonoReflectionInflatedMethod): Removed
3151 `declaring_type' and `reflected_type'.
3153 2004-02-08 Martin Baulig <martin@ximian.com>
3155 * class.h (MonoGenericInst): Added `MonoType *parent' and
3156 `MonoType **ifaces'.
3158 * reflection.h (MonoReflectionGenericInst): Removed `klass',
3159 `parent' and `interfaces'.
3161 * reflection.c (mono_reflection_bind_generic_parameters): Take a
3162 `MonoType *' argument and return a `MonoType *'.
3165 (ves_icall_MonoGenericInst_GetParentType): New interncall.
3166 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
3168 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
3170 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
3171 valuetype marshalling.
3173 2004-02-06 Martin Baulig <martin@ximian.com>
3176 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
3177 (my_mono_class_from_generic_parameter): Likewise.
3179 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
3181 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
3182 contents of the symbol files lazily.
3184 * object.h (MonoThread): Add 'name' and 'name_len' fields.
3186 * threads.h threads.c icall.c: New icalls for getting and setting the
3189 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
3191 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
3192 Raise an exception when the domain is not found.
3194 2004-02-03 Martin Baulig <martin@ximian.com>
3196 * reflection.c (mono_image_get_methodspec_token): Use the
3197 uninflated signature; fixes gen-33.
3199 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
3201 * gc.c threads.c: Make the finalizer thread a normal managed thread so
3202 the finalizer code can use thread functionality.
3204 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
3205 the finalizer thread.
3207 * threads.c: Make some functions more robust.
3209 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
3211 * metadata.h: Add new marshalling conventions.
3213 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
3214 stringbuilder marshalling. Fixes #53700.
3216 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
3218 * reflection.c (mono_image_get_type_info): Save declarative security
3221 * reflection.c (mono_image_get_field_info): Handle uninitialized
3222 unmanaged fields as well.
3224 * appdomain.c: Bump corlib version.
3226 2004-02-01 Martin Baulig <martin@ximian.com>
3228 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
3229 method type arguments.
3231 2004-01-30 Duncan Mak <duncan@ximian.com>
3233 * marshal.h: Add prototype for
3234 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
3236 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
3239 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
3241 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
3242 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
3244 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
3246 * marshal.c (mono_marshal_get_native_wrapper): Add support for
3247 custom marshalling of valuetypes.
3249 * marshal.c: Fix some warnings.
3251 2004-01-29 Martin Baulig <martin@ximian.com>
3253 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
3254 for generic method parameters.
3256 * reflection.c (method_encode_methodspec): Write the uninflated
3257 signature into the methodspec table.
3258 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
3259 is always the uninflated method.
3260 (reflection_methodbuilder_to_mono_method): Copy the generic
3261 parameters from the MethodBuilder into `header->gen_params'.
3263 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
3265 * class.c (mono_class_from_generic_parameter): Fix warning.
3267 2004-01-27 Martin Baulig <martin@ximian.com>
3269 * class.c (mono_class_from_generic_parameter): Don't create
3270 `klass->methods' here.
3272 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
3274 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
3275 extension since it does not work with libraries named lib<FOO>.dll.so.
3277 2004-01-25 Martin Baulig <martin@ximian.com>
3279 * class.c (mono_class_inflate_generic_type): Added support for
3280 MONO_TYPE_GENERICINST.
3282 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
3283 inflate methods on open constructed types.
3285 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3287 * object.c: fire ProcessExit event in the root AppDomain after running
3288 Main. Fixes bug #53299.
3290 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
3292 * socket-io.c: include the new socket-wrappers.h header.
3293 Use the wrappers instead of the unix socket functions to make the code
3296 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
3298 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
3300 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
3303 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
3305 * reflection.c (mono_image_create_pefile): Handle the case when the
3306 entry point is not a MethodBuilder.
3308 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
3309 field to ReflectionMethod since it is not allways a builder.
3311 * reflection.c (type_get_fully_qualified_name): New helper function to
3312 return the fully qualified name of a type.
3314 * reflection.c (encode_marshal_blob): Always emit the fully qualified
3315 type name for custom marshallers.
3317 * reflection.c (mono_marshal_spec_from_builder): Ditto.
3319 * class.c (mono_class_setup_vtable): If a parent class already
3320 implements an interface, use the implementing methods from that class.
3323 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3325 * threadpool.c: just return instead of ExitThread to allow for thread
3328 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
3330 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
3331 when closing resource modules.
3333 * reflection.c (mono_image_create_pefile): Handle the case when the
3334 entry point is not a MethodBuilder.
3336 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
3337 field to ReflectionMethod since it is not allways a builder.
3339 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
3341 * marshal.c (mono_marshal_get_managed_wrapper):
3342 mono_marshal_alloc takes native int so CONV_I
3345 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
3347 * reflection.c (fixup_cattrs): New function to fixup the methoddef
3348 tokens in the cattr table. Fixes #53108.
3350 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3352 * loader.c: don't trim ".dll" before looking up in the config file.
3353 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
3355 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
3357 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
3358 Return the module which contains the resource as well.
3359 (ves_icall_System_Reflection_Module_Close): New icall.
3361 * appdomain.c: Bump corlib version number.
3363 * image.c (mono_image_addref): New public function.
3365 * assembly.c: Call mono_image_addref.
3367 * reflection.c (mono_module_get_object): Increase reference count of
3370 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
3373 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
3374 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
3375 proper exceptions on DllImport problems.
3377 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
3379 * class.c, metadata.c: eliminate CSIZE macro.
3381 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
3383 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
3384 * object.h: Added async_callback field in MonoAsyncResult.
3385 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
3386 * verify.c: Added async_callback in MonoAsyncResult layout.
3388 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
3390 * reflection.c (mono_reflection_get_custom_attrs): Add support
3393 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
3395 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
3397 (mono_marshal_method_from_wrapper): Add null pointer check.
3399 2004-01-16 Martin Baulig <martin@ximian.com>
3401 * debug-mono-symfile.h: Set version number to 36 and reflect
3402 latest symbol writer changes.
3404 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
3406 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
3407 multi-dimensional arrays.
3408 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
3409 (mono_class_from_mono_type): Use bounded_array_class_get.
3411 * class.c (mono_bounded_array_class_get): New function which takes
3412 a 'bounded' bool argument to distinguish vectors from one dimensional
3415 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
3416 bounded_array_class_get if the array has bounds.
3418 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
3419 Search modules loaded using AssemblyBuilder:AddModule as well.
3421 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3423 * appdomain.c: increased corlib version.
3424 * filewatcher.c: removed g_print.
3426 (get_property_info): only allocate what is actually requested.
3427 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
3429 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3431 * Makefile.am: added filewatcher.[ch]
3432 * filewatcher.[ch]: FileSystemWatcher runtime support.
3433 * icall.c: added new FSW icalls.
3435 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
3437 * string-icalls.c: fix stringbuilder regression as suggested by
3438 Iain McCoy <iain@mccoy.id.au>.
3440 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
3442 * process.c (process_read_stringtable_block): Recognize '007f' as
3443 a language neutral stringtable block.
3445 2004-01-12 Patrik Torstensson
3447 * object.h (MonoStringBuilder) : Changed layout to support our
3448 new stringbuilder class.
3449 * marshal.c: Change marshalling to support the new layout of
3451 * appdomain.c: increased version number because new layout of
3454 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
3456 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
3457 assembly name as an string instead of an AssemblyName, since it is
3458 easier to extract info from it.
3460 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
3461 the culture subdirectories too. Fixes #52231.
3463 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3465 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
3466 It takes 2 new parameters with an optional name for the method to look
3467 for and case ignoring info.
3469 * threadpool.c: removed unused variable.
3471 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3473 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
3474 It takes 2 new parameters with an optional name for the property to look
3475 for and case ignoring info.
3478 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
3480 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
3483 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3486 * assembly.c: escape the uri before passing it to g_filename_from_uri.
3489 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
3491 * reflection.c: Add support for more than one unmanaged resource.
3493 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
3494 in field->def_value, as done in all other cases.
3496 * reflection.c (mono_reflection_get_custom_attrs): Add support for
3499 * reflection.c (mono_reflection_create_runtime_class): Remove
3500 errorneous assignment to klass->element_class, since it is already
3501 done in mono_reflection_setup_internal_class.
3503 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3505 * gc.c: added missing LeaveCriticalSection.
3506 * icall.c: indented a couple of lines.
3507 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
3508 if we call EndInvoke inside a callback. Fixes bug #52601.
3510 2004-01-07 Martin Baulig <martin@ximian.com>
3512 * mono-debug-debugger.h
3513 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
3515 2004-01-06 Miguel de Icaza <miguel@ximian.com>
3517 * appdomain.c: Use messages in NotImplementedException.
3519 * exception.c (mono_get_exception_not_implemented): Now this takes
3522 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
3523 exception instead of g_asserting an aborting when something is not
3526 Add some inline docs.
3528 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
3530 * reflection.h: Update after changes to object layout.
3532 * reflection.c: Implement saving of unmanaged aka win32 resources.
3534 * appdomain.c: Bump version number.
3536 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
3537 Handle missing domains gracefully.
3539 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
3541 * file-io.c : On Windows, there are much more invalid_path_chars.
3543 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
3545 * class.h, object.c: prepare for GetType () speedup.
3547 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
3549 * profiler.c: workaround for --profile null reference exception on
3550 cygwin. Patch by Patrik Torstensson.
3552 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
3554 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
3555 make work for unaligned access.
3557 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
3559 * class.c: small cleanup (class->fields [i] -> field).
3560 * image.c: check address of metadata is valid.
3562 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
3564 * assembly.h assembly.c (mono_assembly_loaded): New public function to
3565 search the list of loaded assemblies.
3567 * reflection.c (mono_reflection_type_from_name): Use
3568 mono_assembly_loaded instead of mono_image_loaded.
3570 * reflection.c: Fix warnings.
3572 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
3574 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
3575 is dynamic. This is needed since an assembly can contain both dynamic and
3578 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
3581 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
3583 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
3584 to store modules loaded using AddModule.
3586 * reflection.c (mono_image_fill_file_table): Generalize this so it works
3589 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
3591 * reflection.c (mono_image_fill_export_table_from_module): New function to
3592 fill out the EXPORTEDTYPES table from a module.
3594 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
3595 into a separate function. Also handle loaded non-dynamic modules.
3597 * reflection.c (mono_image_basic_init): Fix memory allocation.
3599 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3601 * assembly.c (mono_assembly_load_references): Make this public.
3603 2003-12-19 Martin Baulig <martin@ximian.com>
3605 * class.c (mono_class_initialize_generic): Made this static, take
3606 a `MonoGenericInst *' instead of a `MonoClass *'.
3607 (mono_class_from_generic): Call mono_class_initialize_generic()
3608 unless we're already initialized or being called from
3609 do_mono_metadata_parse_generic_inst().
3611 * class.h (MonoGenericInst): Added `initialized' and
3612 `init_pending' flags.
3614 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
3615 `mono_class_init (gklass)' or mono_class_initialize_generic()
3616 here; set `generic_inst->init_pending' while parsing the
3619 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
3621 * locales.c: include string.h for memxxx prototypes
3623 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
3625 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
3626 constructor when accessing literal fields.
3628 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
3630 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3632 * reflection.c (assembly_add_resource_manifest): New function to fill
3633 the MANIFESTRESOURCE table.
3635 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
3637 * reflection.h: Update to changes in class layout.
3639 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
3640 Reenable call to mono_runtime_is_shutting_down ().
3642 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
3643 determine if the runtime is shutting down.
3645 2003-12-16 Jackson Harper <jackson@ximian.com>
3647 * icall.c: comment out call to mono_runtime_is_shutting_down to
3650 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
3652 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
3653 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
3655 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
3657 * reflection.c: move definition of swap_with_size
3658 to before its first call
3660 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
3662 * appdomain.c (mono_runtime_is_shutting_down): New public function.
3664 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
3667 * object.c: Fix warnings.
3669 * icall.c (ves_icall_Type_Get...): Only consider inherited static
3670 members if FlattenHierarchy is set.
3672 * reflection.c (mono_image_add_decl_security): New function to emit
3673 declarative security.
3675 * reflection.h reflection.c: Add support for declarative security.
3677 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
3679 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
3681 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
3683 * appdomain.c verify.c: Moved corlib version checking into its own
3684 function in appdomain.c since it needs to create vtables etc.
3686 2003-12-13 Patrik Torstensson <p@rxc.se>
3688 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
3689 instead of unwrapped server.
3691 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
3693 * verify.c (check_corlib): Fix field index.
3695 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
3697 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
3700 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
3702 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
3703 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
3704 cope with sizeof(size_t) != sizeof(guint32).
3706 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3708 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
3711 2003-12-10 Mark Crichton <crichton@gimp.org>
3713 * icall.c: removed the GetNonZeroBytes. We now handle this case
3716 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
3718 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
3720 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
3723 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
3725 * verify.c (check_corlib): Handle the case when the version field is
3726 initialized by a static constructor.
3728 2003-12-08 Patrik Torstensson <p@rxc.se>
3730 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
3732 2003-12-08 Martin Baulig <martin@ximian.com>
3734 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
3735 a MonoReflectionGenericParameter, also take the parameter index
3736 and name as arguments.
3737 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
3738 (ves_icall_MonoGenericParam_initialize): New interncall.
3739 (ves_icall_Type_make_byref_type): New interncall.
3741 * reflection.h (MonoReflectionGenericParam): Derive from
3742 MonoReflectionType, not just from MonoObject. Added `refobj' and
3745 * reflection.c (mono_reflection_define_generic_parameter): Create
3746 and return a new MonoReflectionGenericParam; don't initialize the
3748 (mono_reflection_initialize_generic_parameter): New public method;
3749 initializes the constraints and creates the `param->pklass'.
3751 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
3753 * reflection.h reflection.c: Use the new fields 'num_types',
3754 'num_fields' and 'num_methods' to track the number of types etc.
3756 * verify.c (check_corlib): Check corlib version number.
3758 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
3760 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
3761 function works on all methods.
3763 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
3765 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
3766 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
3767 the custom_type_info flag of the transparent proxy.
3768 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
3769 objects that supports IRemotingTypeInfo.
3770 * object.h: Added custom_type_info field in transparent proxy.
3772 2003-12-06 Martin Baulig <martin@ximian.com>
3774 * class.c (mono_class_create_from_generic): Removed.
3775 (mono_class_from_generic): Check `ginst->klass' before doing
3776 anything else. This is important to fully support "recursive"
3779 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
3780 empty `generic_inst->klass' before doing anything else.
3782 2003-12-06 Dick Porter <dick@ximian.com>
3787 * locales.c: Use C structs to access class fields. Don't do a
3788 conversion between MonoString and UChar because both are
3789 platform-endian UTF-16. Compare now takes startindex and count
3790 parameters. Add a char overload for IndexOf. Speed up the
3791 invariant string IndexOf.
3793 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
3795 * Makefile.am (monosn_LDADD): Fix parallel build.
3797 2003-12-04 Martin Baulig <martin@ximian.com>
3800 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
3801 (ves_icall_Type_make_array_type): New interncall.
3803 2003-12-04 Martin Baulig <martin@ximian.com>
3805 * locales.c: also change it in the !HAVE_ICU case.
3807 2003-12-04 Dick Porter <dick@ximian.com>
3810 * locales.c: construct_compareinfo is now in CompareInfo, not
3813 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
3815 * image.c (mono_image_load_file_for_image): Cache loaded images in the
3818 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
3821 * assembly.c (mono_assembly_load_references): Only load references
3824 * class.c (mono_class_from_name): Avoid linear search of the
3827 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
3829 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
3831 * image.h (MonoImage): Add 'field_cache' field.
3833 * loader.c (mono_field_from_token): Cache field lookups.
3835 * reflection.c (mono_module_get_object): Fix name property.
3837 * icall.c (ves_icall_get_enum_info): Update after changes to
3838 mono_metadata_get_constant_index ().
3840 * icall.c: Get rid of get_type_info icall, use a separate icall for
3841 each type property to avoid needless memory allocations. Fixes #51514.
3843 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
3844 to avoid needless binary searches.
3846 * class.c (class_compute_field_layout): Move the initialization of
3847 field->def_value to mono_class_vtable ().
3849 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
3852 * object.c (mono_object_allocate): Make it inline.
3854 * object.c (mono_object_allocate_spec): Make it inline.
3856 2003-12-02 Dick Porter <dick@ximian.com>
3858 * locales.c (create_NumberFormat): NumberFormatInfo construction.
3859 Patch by Mohammad DAMT (mdamt@cdl2000.com).
3861 2003-12-01 Dick Porter <dick@ximian.com>
3863 * threads.c: Fix signature and call in CreateMutex and
3866 2003-12-01 Dick Porter <dick@ximian.com>
3869 * locales.c: Implement string compares and searching
3871 * object.h: Add extra Thread field
3873 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
3875 * reflection.c (fixup_method): Add support for MonoCMethod.
3877 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
3879 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
3881 * reflection.c (assembly_name_to_aname): Allow extra characters in
3882 assembly names. Fixes #51468.
3884 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
3886 * exception.c (mono_exception_from_name_domain): New helper function.
3888 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
3889 exception object in the correct domain.
3891 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
3892 formatting + make a copy a the input data.
3894 * loader.c (mono_get_method_from_token): Methods which contain
3895 native code do not have entries in the ImplMap.
3897 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
3898 Thanks to Gonzalo for spotting this.
3900 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
3901 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
3903 * assembly.h (mono_assembly_load_from): Split the second part of
3904 assembly loading into a new public function.
3906 * exception.h (mono_get_exception_bad_image_format): New function.
3908 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
3910 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
3911 Enumerate all modules inside a dynamic assembly. Fixes #51293.
3913 * icall.c: Add new icall for creating dynamic methods.
3915 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
3917 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
3919 * reflection.c (mono_reflection_create_dynamic_method): New icall to
3920 create a dynamic method.
3922 * reflection.c (resolve_object): New helper function.
3924 * reflection.c: Generalize ReflectionMethodBuilder and the functions
3925 which manipulate it so they can also work on dynamic methods.
3927 * reflection.c (reflection_method_builder_to_mono_method): Avoid
3928 creating the MonoReflectionMethodAux structure if it is not needed.
3930 * reflection.h verify.c: Update after changes to object layout.
3932 * reflection.c (method_builder_encode_signature): Fix compilation on
3935 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
3937 * appdomain.h: Added support for context static fields. Added static_data
3938 field to MonoAppContext and renamed thread_static_fields to a more
3939 generic special_static_fields in MonoAppDomain, since it can now contain
3940 context static fields.
3941 * domain.c: Updated hashtable name.
3942 * object.c: Replaced field_is_thread_static() for a more generic
3943 field_is_special_static() which also checks for context static attribute.
3944 In mono_class_vtable(), added support for static context fields.
3945 * threads.c: Changed methods that manage thread static fields to more
3946 generic methods so they can be reused both for thread and context static
3948 * threads.h: Declared some new methods.
3950 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
3952 * reflection.h: Update after changes to the managed types.
3954 * reflection.c (encode_custom_modifiers): New helper function.
3956 * reflection.c (method_encode_signature): Emit custom modifiers.
3958 * reflection.c (field_encode_signature): Emit custom modifiers.
3960 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
3962 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
3964 * icall.c (ves_icall_System_ValueType_Equals): New optimized
3967 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
3970 * object.c (mono_field_get_value_object): New function.
3972 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
3975 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
3977 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
3978 return a preallocated out-of-memory exception instance.
3980 * object.c (out_of_memory): Use the new function.
3982 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
3983 flag is before the custom modifiers. Fixes #49802.
3985 2003-11-16 Martin Baulig <martin@ximian.com>
3987 * class.c (mono_class_is_open_constructed_type): Implemented the
3988 MONO_TYPE_GENERICINST case.
3990 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
3992 * assembly.c (mono_assembly_fill_assembly_name): New function to
3993 fill out the MonoAssemblyName structure.
3994 (mono_assembly_open): Use the new function.
3996 * icall.c (fill_reflection_assembly_name): New helper function.
3998 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
4001 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
4003 2003-11-15 Martin Baulig <martin@ximian.com>
4005 * class.c (mono_class_is_open_constructed_type): New public
4006 function; checks whether a type is an open constructed type,
4007 ie. whether it still contains type parameters.
4008 (mono_class_inflate_generic_type): If we're a type parameter and
4009 the inflated type is also a MONO_TYPE_(M)VAR, return the original
4012 * class.h (MonoGenericInst): Added `guint32 is_open'.
4014 * loader.c (method_from_methodspec): Check whether we're an open
4015 or closed constructed type and set `ginst->is_open'.
4017 * reflection.c (mono_reflection_bind_generic_parameters): Check
4018 whether we're an open or closed constructed type and set
4020 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
4021 from open constructed types.
4023 2003-11-15 Martin Baulig <martin@ximian.com>
4025 * reflection.c (mono_reflection_bind_generic_parameters): If we're
4026 a generic instance (instead of a generic type declaration) with
4027 unbound generic parameters, bind them to our actual types.
4029 2003-11-14 Martin Baulig <martin@ximian.com>
4031 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
4033 * reflection.c (mono_reflection_bind_generic_parameters): If we're
4034 an interface type, populate `res->interfaces' with instantiated
4035 versions of all the interfaces we inherit.
4037 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
4039 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
4040 when MONO_PATH is set but doesn't contain the install dir.
4042 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4045 (ves_icall_Type_GetInterfaces): don't return an interface twice when
4046 it's also implemented in base classes. Fixes bug #50927.
4048 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
4050 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
4051 if this method is called from a finalizer. Fixes #50913.
4053 2003-11-12 Miguel de Icaza <miguel@ximian.com>
4055 * threads.c: Implement VolatileRead/VolatileWrite
4057 * icall.c: Add new icalls for VolatileRead/VolatileWrite
4059 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
4061 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
4062 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
4065 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
4066 from Peter Ross (pro@missioncriticalit.com).
4068 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
4070 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
4072 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
4074 * assembly.c (mono_assembly_load_references): Disable check because it
4075 triggers on older corlibs which lots of people have.
4077 2003-11-12 Jackson Harper <jackson@ximian.com>
4079 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
4080 load corlib.dll if mscorlib.dll is not found.
4081 * assembly.h: Remove corlib name define.
4084 * image.c: Change corlib name to mscorlib.
4086 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
4088 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
4090 2003-11-11 Miguel de Icaza <miguel@ximian.com>
4092 * appdomain.h: Added loader_optimization here to sync with the C#
4093 code, and add disallow_binding_redirects field.
4095 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
4097 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
4099 * reflection.c (mono_image_build_metadata): Fix crash on modules
4102 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
4104 * icall.c (ves_icall_get_method_info): Return callingConvention as
4107 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
4108 namespaces from the EXPORTEDTYPE table as well.
4110 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
4111 from all modules inside the assembly.
4113 2003-11-11 Martin Baulig <martin@ximian.com>
4115 * reflection.c (mono_reflection_bind_generic_parameters): Make
4116 this work for interfaces.
4118 2003-11-11 Martin Baulig <martin@ximian.com>
4120 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
4122 2003-11-11 Martin Baulig <martin@ximian.com>
4124 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
4125 "MonoInflatedMethod" and "MonoInflatedCtor".
4127 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
4129 * reflection.c (resolution_scope_from_image): Use the assembly table
4130 from the manifest module, since other modules don't have it.
4132 * debug-helpers.c (mono_type_full_name): New helper function.
4134 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
4136 * image.c (mono_image_load_file_for_image): New public function which
4137 is a replacement for the load_file_for_image in class.c.
4139 * assembly.c (mono_assembly_load_module): A wrapper for the function
4140 above which does assembly association and reference loading too.
4142 * class.c (mono_class_from_name): Call mono_assembly_load_module.
4144 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4146 * appdomain.c: not all of the attributes for the full assembly name
4147 are required and the order doesn't matter. Fixes bug #50787.
4149 2003-11-10 Dick Porter <dick@ximian.com>
4151 * locales.c: Use platform-endian UTF16
4153 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
4155 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
4157 2003-11-10 Martin Baulig <martin@ximian.com>
4160 (mono_metadata_load_generic_params): Make this actually work.
4162 * reflection.c (mono_reflection_bind_generic_parameters): If our
4163 parent is a generic instance, pass all the `types' to it, no
4164 matter whether it has the same number of type parameters or not.
4166 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
4168 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
4170 * assembly.c (mono_assembly_load_references): Move the image<->assembly
4171 assignment code to this function so it gets called recursively for all
4174 * image.c (load_modules): Remove the assembly assignment since it is
4175 now done by mono_assembly_load_references.
4177 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
4178 Add 'module' argument.
4179 (mono_module_get_types): New helper function.
4180 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
4182 2003-11-08 Martin Baulig <martin@ximian.com>
4184 * class.c (mono_class_inflate_generic_method): Interface method
4185 don't have a header.
4187 * reflection.c (mono_image_get_methodspec_token): Take an
4188 additional `MonoGenericInst *' argument instead of reading it from
4189 the header; this is necessary to support interfaces.
4190 (mono_image_create_token): Pass the `MonoGenericInst *' from the
4191 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
4192 (inflated_method_get_object): Take an additional `MonoGenericInst *'
4195 * reflection.h (MonoReflectionInflatedMethod): Added
4196 `MonoGenericInst *ginst'.
4198 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
4200 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
4202 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
4204 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
4206 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
4209 (reflection_methodbuilder_from_method_builder):
4210 (reflection_methodbuilder_from_ctor_builder): New helper functions to
4211 initialize a ReflectionMethodBuilder structure.
4212 (mono_image_get_methodbuilder_token):
4213 (mono_image_get_ctorbuilder_token): New functions to emit memberref
4214 tokens which point to types in another module inside the same assembly.
4216 * reflection.c: Use the new helper functions.
4218 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
4220 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
4221 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
4223 * reflection.c (resolution_scope_from_image): Emit a moduleref if
4226 * reflection.c (mono_image_build_metadata): Emit metadata only for the
4227 current module. Emit the manifest only for the main module.
4229 * reflection.c (mono_image_create_token): Add assertion when a
4230 memberref needs to be created.
4232 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
4234 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
4235 larger buffer for the custom attribute blob. Fixes #50637.
4237 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4239 * threadpool.c: notify listener on async processing handles after
4240 invoking the async callback. Thanks to Zoltan.
4242 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
4244 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
4245 avoid code duplication.
4247 * reflection.h (MonoDynamicImage): New type which is currently unused,
4248 but will be used through the ref.emit code in place of
4249 MonoDynamicAssembly.
4251 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
4254 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
4255 a MonoDynamicImage instead of just a MonoImage.
4257 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
4258 icalls to ModuleBuilder but keep their semantics, so they will work
4259 with moduleb->assemblyb. This will change later.
4261 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
4263 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
4266 * reflection.c (mono_image_build_metadata): Avoid creation of a default
4267 main module, since it is now done by the managed code.
4269 2003-11-03 Martin Baulig <martin@ximian.com>
4271 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
4272 `ginst->klass' here.
4273 (method_encode_methodspec): Don't use the `ginst->generic_method's
4274 klass if it's a generic instance, use `ginst->klass' in this case.
4276 2003-11-03 Martin Baulig <martin@ximian.com>
4278 * reflection.c (mono_image_get_generic_method_param_info):
4279 Removed, use mono_image_get_generic_param_info() instead.
4280 (mono_image_get_type_info): Write the GenericParam table before
4281 the Method table. This is neccessary because in the GenericParam
4282 table, type parameters of the class (ie. '!0' etc.) must come
4283 before the ones from its generic methods (ie. '!!0' etc).
4285 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
4287 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
4289 2003-11-02 Martin Baulig <martin@ximian.com>
4291 * reflection.c (create_generic_typespec): Take a
4292 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
4293 the generic parameters from it.
4295 2003-11-02 Martin Baulig <martin@ximian.com>
4297 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
4298 instead of a `MonoClassField *' since we just need the type.
4299 (create_generic_typespec): New static function. Creates a
4300 TypeSpec token for a generic type declaration.
4301 (mono_image_get_generic_field_token): New static function.
4302 (mono_image_create_token): If we're a FieldBuilder in a generic
4303 type declaration, call mono_image_get_generic_field_token() to get
4306 2003-11-02 Martin Baulig <martin@ximian.com>
4309 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
4310 `MonoReflectionGenericInst *declaring_type' and
4311 `MonoReflectionGenericInst *reflected_type' fields.
4313 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
4314 `MonoReflectionGenericInst *declaring_type' and a
4315 `MonoReflectionGenericInst *reflected_type' argument instead of a
4316 single `MonoReflectionGenericInst *type' one. Set
4317 `res->declaring_type' and `res->reflected_type' from them.
4318 (mono_reflection_inflate_field): Likewise.
4320 2003-11-02 Martin Baulig <martin@ximian.com>
4322 * class.c (mono_class_setup_vtable): Don't store generic methods
4325 2003-11-02 Martin Baulig <martin@ximian.com>
4327 * reflection.h (MonoReflectionGenericInst): Added
4328 `MonoReflectionType *declaring_type'.
4330 * reflection.c (mono_reflection_bind_generic_parameters): Use
4331 `if (tb->parent)' instead of `klass->parent'.
4333 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
4335 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
4336 with an empty ASSEMBLY table.
4338 * reflection.c (mono_image_build_metadata): Avoid using the same loop
4339 variable in the inner and outer loops.
4341 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
4343 * metadata.h (mono_metadata_make_token): Put parentheses around macro
4346 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
4348 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
4349 icalls. Instead, do everything in managed code. This is needed since
4350 it is hard to restore the original domain etc. in unmanaged code in the
4351 presence of undeniable exceptions.
4353 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
4354 New icalls to push and pop appdomain refs.
4356 2003-10-31 Martin Baulig <martin@ximian.com>
4358 * class.c (inflate_generic_type): Renamed to
4359 mono_class_inflate_generic_type() and made it public.
4361 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
4364 * loader.c (mono_field_from_memberref): Also set the retklass for
4367 * fielder.c (mono_image_get_inflated_field_token): New static
4368 method; creates a metadata token for an inflated field.
4369 (mono_image_create_token, fixup_method): Added support for
4370 "MonoInflatedField".
4371 (fieldbuilder_to_mono_class_field): New static function.
4372 (mono_reflection_inflate_field): New public function.
4375 (MonoReflectionGenericInst): Added `MonoArray *fields'.
4376 (MonoReflectionInflatedField): New typedef.
4378 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
4380 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
4381 for Solaris and other platforms without s6_addr16
4383 2003-10-30 Martin Baulig <martin@ximian.com>
4385 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
4386 argument instead of two.
4387 (mono_class_inflate_generic_signature): Likewise.
4388 (inflate_generic_header): Likewise.
4389 (mono_class_inflate_generic_method): Likewise. In addition, if
4390 `ginst->klass' is set, it becomes the new `method->klass'.
4392 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
4395 * reflection.c (encode_generic_method_sig): Write a 0xa as the
4397 (method_encode_methodspec): If we have generic parameters, create
4398 a MethodSpec instead of a MethodRef.
4399 (fixup_method): Added support for "MonoInflatedMethod" and
4401 (mono_image_create_token): Added support for "MonoInflatedMethod"
4402 and "MonoInflatedCtor".
4403 (inflated_method_get_object): New static function; returns a
4404 managed "System.Reflection.MonoInflatedMethod" object.
4405 (mono_reflection_bind_generic_method_parameters): Return a
4406 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
4407 (mono_reflection_inflate_method_or_ctor): Likewise.
4408 (mono_image_get_generic_method_param_info): Initialize unused
4410 (mono_image_get_generic_param_info): Likewise.
4412 * reflection.h (MonoReflectionInflatedMethod): New public
4413 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
4414 "S.R.MonoInflatedCtor" classes.
4416 * loader.c (method_from_memberref): If we're a TypeSpec and it
4417 resolves to a generic instance, inflate the method.
4419 2003-10-28 Dick Porter <dick@ximian.com>
4421 * object.c (mono_runtime_run_main): Convert command-line arguments
4422 into utf8, falling back to the user's locale encoding to do so.
4424 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
4426 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
4429 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
4431 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
4432 up icalls at method definition time. Partially fixes #33569.
4434 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
4436 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
4437 marshalling of arrays. Fixes #50116.
4439 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
4441 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
4442 points to a vtable in the dying appdomain.
4444 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
4445 listeners into unmanaged code inside the lock.
4447 * object.c (mono_class_vtable): Turn off typed allocation in non-root
4448 domains and add some comments.
4450 2003-10-25 Martin Baulig <martin@ximian.com>
4452 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
4454 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
4456 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
4457 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
4458 currently parsing. Create the generic class and store it in
4459 `generic_inst->klass' before parsing the type arguments. This is
4460 required to support "recursive" definitions; see mcs/tests/gen-23.cs
4462 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
4463 to support recursive typespec entries.
4465 * class.c (mono_class_setup_parent): If our parent is a generic
4466 instance, we may get called before it has its name set.
4467 (mono_class_from_generic): Splitted into
4468 mono_class_create_from_generic() and mono_class_initialize_generic().
4470 2003-10-25 Martin Baulig <martin@ximian.com>
4472 * icall.c (ves_icall_Type_BindGenericParameters): Return a
4473 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
4474 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
4475 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
4477 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
4478 (create_typespec): Likewise.
4479 (mono_reflection_bind_generic_parameters): Return a
4480 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
4481 (mono_reflection_inflate_method_or_ctor): New public function.
4483 * reflection.h (MonoReflectionGenericInst): New typedef.
4485 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
4487 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
4488 inside the domain lock. Fixes #49993.
4490 * object.c (mono_class_vtable): When typed allocation is used,
4491 allocate vtables in the GC heap instead of in the mempool, since the
4492 vtables contain GC descriptors which are used by the collector even
4493 after the domain owning the mempool is unloaded.
4495 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
4497 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
4498 reflect what it does. Also invalidate mempools instead of freeing
4499 them if a define is set.
4501 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
4504 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
4505 hold the finalizable objects in this domain.
4507 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
4510 * appdomain.c (mono_domain_set): New function to set the current
4511 appdomain, but only if it is not being unloaded.
4513 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
4514 appdomain which is being unloaded.
4516 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
4517 unloading of the root appdomain.
4519 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
4520 icall to execute a method in another appdomain. Intended as a
4521 replacement for InternalSetDomain, which can confuse the code
4522 generation in the JIT.
4524 * appdomain.c (mono_domain_is_unloading): New function to determine
4525 whenever an appdomain is unloading.
4527 * appdomain.c (mono_domain_unload): New function to correctly unload
4530 * assembly.c (mono_assembly_load_references): Check that an assembly
4531 does not references itself.
4533 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
4534 domain manually, it asks the finalizer thread to do it, then waits for
4535 the result. Also added a timeout.
4537 * icall.c: Register the new icalls.
4539 * threads.h threads.c: Export the mono_gc_stop_world and
4540 mono_gc_start_world functions.
4542 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
4543 function to fill out the mempool with 0x2a.
4545 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
4547 * reflection.h (MonoReflectionMethodAux): New structure to store
4548 information which is rarely used, thus is not in the MonoMethod
4551 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
4554 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
4555 and marshalling info into the aux structure.
4557 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
4558 from the aux structure.
4560 * loader.c (mono_method_get_param_names): Retrieve the param names from
4563 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
4565 * exception.h exception.c: Add AppDomainUnloadedException && fix
4568 2003-10-21 Dick Porter <dick@ximian.com>
4571 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
4572 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
4574 2003-10-21 Martin Baulig <martin@ximian.com>
4576 * reflection.c (mono_reflection_bind_generic_parameters):
4577 `klass->parent' is NULL for interfaces.
4579 2003-10-21 Martin Baulig <martin@ximian.com>
4581 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
4583 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
4585 * exception.c (mono_exception_from_name_msg): New helper function for
4586 creating exceptions and initializing their message field.
4588 * exception.c: Simplify functions using the new helper.
4590 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
4593 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
4594 mono_raise_exception, since otherwise gcc doesn't generate the function
4595 epilog for raise_exception, confusing the stack unwinding in the JIT.
4598 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
4599 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
4602 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4604 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
4607 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
4609 * icall.c: Removed GetUninitializedObject method because
4610 AllocateUninitializedClassInstance does the same.
4612 2003-10-18 Martin Baulig <martin@ximian.com>
4614 * class.c (inflate_generic_signature): Renamed to
4615 mono_class_inflate_generic_signature() and made it public.
4616 (my_mono_class_from_generic_parameter): New static function; if we
4617 don't already have the generic parameter's MonoClass, create a
4618 very simple one which is just used internally in the runtime and
4619 not passed back to managed code.
4621 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
4623 * metadata.h (MonoMethodSignature): Moved the
4624 `MonoGenericParam *gen_params' to the MonoMethodHeader.
4625 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
4627 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
4628 ves_icall_MonoMethod_GetGenericArguments(); this is now an
4629 interncall on the MonoMethod class, not on MethodInfo.
4630 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
4631 calling mono_reflection_bind_generic_method_parameters() directly.
4633 * loader.c (mono_method_get_signature): If this is a MethodSpec;
4634 return the already computed `method->signature'.
4635 (method_from_methodspec): New static function to load a method
4636 from a MethodSpec entry.
4637 (mono_get_method_from_token): Call the new method_from_methodspec()
4638 for MethodSpec tokens.
4639 (mono_get_method_from_token): If we're a generic method, load the
4642 * reflection.c (mono_image_get_memberref_token): Allow
4643 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
4645 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
4646 (mono_image_create_token): First check whether it's a generic
4647 method (so we'd need to create a MethodSpec), then do the other
4649 (mono_reflection_bind_generic_method_parameters): Return a
4650 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
4651 called directly from the interncall.
4653 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
4655 * reflection.c (load_public_key): Move loading of the public key
4658 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
4660 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
4663 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
4664 culture, hash_alg and public_key. Fixes #49555.
4666 2003-10-17 Martin Baulig <martin@ximian.com>
4668 * class.h (MonoGenericInst): Moved this declaration here and added
4669 `MonoMethod *generic_method'.
4672 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
4673 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
4675 * metadata.c (mono_metadata_type_equal): Two types of
4676 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
4677 index; ie. don't compare the address of the `MonoGenericParam'
4679 (mono_metadata_load_generic_params): Removed the `MonoMethod
4682 * metadata.h (MonoGenericInst): Moved declaration to class.h.
4683 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
4685 * reflection.c (method_encode_signature): Encode the number of
4687 (encode_generic_method_sig): New static function.
4688 (method_encode_methodspec): New static function; creates an entry
4689 in the MethodSpec table for a generic method.
4690 (mono_image_get_methodspec_token): New static function.
4691 (mono_image_create_token): Call mono_image_get_methodspec_token()
4692 for generic methods.
4693 (mono_reflection_bind_generic_method_parameters): New public
4694 function. Instantiates a generic method.
4696 2003-10-16 Martin Baulig <martin@ximian.com>
4698 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
4699 *gen_params' here from MonoMethodHeader.
4701 * metadata.c (mono_metadata_parse_method_signature): If we have
4702 generic parameters, initialize `method->gen_params' and then set
4703 the correct `type->data.generic_param' in all the parameters.
4705 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
4707 * threads.c (mono_threads_get_default_stacksize): New function to
4708 return the default stacksize.
4710 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
4711 termination of the finalizer thread, since the previous method had
4712 race conditions. Fixes #49628.
4714 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
4715 as for the other managed threads.
4717 2003-10-16 Martin Baulig <martin@ximian.com>
4719 * class.c (inflate_generic_signature): Copy `generic_param_count'
4722 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
4725 * metadata.c (mono_metadata_parse_method_signature): Actually set
4726 the `method->generic_param_count' here.
4727 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
4729 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
4731 * object.h: Add a new field to TypedRef to simplify the implementation
4732 of the REFANY opcodes in the JIT.
4734 * icall.c: Make use of the new field.
4736 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
4739 2003-10-15 Martin Baulig <martin@ximian.com>
4741 * class.c (mono_class_from_gen_param): Renamed to
4742 mono_class_from_generic_parameter() and moved most of the
4743 functionality from mono_reflection_define_generic_parameter()
4744 here; ie. we create a "real" class here.
4745 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
4746 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
4747 previously been called.
4749 * class.h (MonoGenericParam): Moved the declaration of this struct
4750 here from metadata.h and added `MonoMethod *method'.
4752 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
4755 * loader.c (mono_get_method_from_token): If we have any generic
4756 parameters, call mono_metadata_load_generic_params() to read them
4757 from the MONO_TABLE_GENERICPAR.
4759 * metadata.c (mono_metadata_load_generic_params): Added
4760 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
4762 * metadata.h (MonoMethodSignature): Replaced
4763 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
4764 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
4766 * reflection.c (mono_reflection_define_generic_parameter): Moved
4767 most of the functionality into the new
4768 mono_class_from_generic_parameter(); set the `method' field if
4769 we're a method parameter.
4771 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
4773 * marshal.c (emit_struct_conv): if native size is 0
4776 2003-10-14 Martin Baulig <martin@ximian.com>
4778 * icall.c: The generics API has changed in the spec since it was
4779 added to System.Type; these modifications make it match the spec
4781 (ves_icall_Type_GetGenericParameters): Renamed to
4782 `ves_icall_Type_GetGenericArguments'.
4783 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
4784 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
4785 `ves_icall_MonoType_get_HasGenericArguments'.
4786 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
4787 `ves_icall_MonoType_get_IsGenericParameter'.
4788 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
4789 this is no interncall anymore.
4790 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
4791 `ves_icall_TypeBuilder_get_IsGenericParameter'.
4793 2003-10-14 Martin Baulig <martin@ximian.com>
4795 * reflection.c (mono_reflection_bind_generic_parameters): Also
4796 inflate generic methods if we're reading the class from IL.
4798 2003-10-13 Martin Baulig <martin@ximian.com>
4800 * reflection.c (mono_reflection_define_generic_parameter): This
4801 method isn't called directly from the icall anymore; take a
4802 `MonoReflectionAssemblyBuilder *' so we can use this for type and
4803 method generic parameters.
4804 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
4805 (method_builder_encode_signature): Encode generic parameters.
4806 (mono_image_get_method_info): Write generic params to the
4807 MONO_TABLE_GENERICPARAM table.
4809 * reflection.h (MonoReflectionMethodBuilder): Added
4810 `MonoArray *generic_params'.
4812 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
4814 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
4815 wrapper for mono_reflection_define_generic_parameter().
4816 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
4818 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
4820 * marshal.h: Add missing function to fix build.
4822 * marshal.c (mono_marshal_get_native_wrapper): Add support for
4823 the SetLastError pinvoke attribute.
4825 * marshal.c (mono_marshal_set_last_error): New helper function called
4826 by the generated code.
4828 * marshal.c (mono_mb_emit_branch): New helper function.
4830 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
4832 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
4833 classes as parameters and return values of delegates. Fixes #29256.
4835 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
4837 * locales.c: use gint32 in non HAVE_ICU case
4839 2003-10-11 Martin Baulig <martin@ximian.com>
4841 * mono-debug.c (mono_debug_add_method): Added a workaround for
4844 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
4846 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
4847 delegates passed to native code must use the STDCALL calling
4848 convention. Fixes #35987.
4850 2003-10-10 Martin Baulig <martin@ximian.com>
4852 * class.c (inflate_generic_type): If we're inflating for a generic
4853 type instance (and not for a generic method), return
4854 MONO_TYPE_MVAR unchanged.
4856 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4858 * string-icalls.c: Join ignores null strings in the source array.
4859 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
4860 * threads.c: GetAvailableTheads is slightly more accurate.
4862 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
4864 * threads.h threads.c : add mono_threads_set_default_stacksize
4865 and pass default to CreateThread calls.
4867 2003-10-09 Dick Porter <dick@ximian.com>
4871 * locales.c: Internal calls for constructing CultureInfo and
4872 related objects from libicu (if its available.)
4874 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
4876 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
4878 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4880 * threadpool.c: added an argument to async_invoke_thread that is the
4881 item to process, pass the MonoAsyncResult to the thread start function
4882 when creating a new thread. This way we don't need to acquire any lock
4883 when we're creating a new thread. Readded a semaphore for faster
4884 response times (instead of that Sleep i added).
4886 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
4888 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
4889 get daylight change dates better on Windows, fix handling
4890 of platforms without tm_gmtoff.
4892 2003-10-06 Martin Baulig <martin@ximian.com>
4894 * class.c (inflate_generic_method): Renamed to
4895 mono_class_inflate_generic_method() and made public.
4896 (mono_class_init): Don't inflate the generic methods here.
4897 (mono_class_from_generic): Added `gboolean inflate_methods'
4898 argument. Inflate the methods here.
4900 * loader.c (mono_method_get_param_names): Ignore instances of
4901 generic types for the moment.
4903 * reflection.c (fixup_method): Added support for inflated methods.
4904 (mono_image_create_token): Use mono_image_get_methodref_token()
4905 for inflated methods.
4906 (mono_custom_attrs_from_param): Ignore instances of generic types
4908 (mono_reflection_bind_generic_parameters): New public function.
4909 Moved all the functionality from
4910 ves_icall_Type_BindGenericParameters() here and added support for
4912 (mono_reflection_define_generic_parameter): Initialize
4913 `klass->methods' here.
4915 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
4916 functionality into mono_reflection_define_generic_parameter().
4917 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
4918 TypeBuilder, return that TypeBuilder.
4920 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4922 * appdomain.c: removed mono_delegate_semaphore.
4925 (mono_thread_pool_add): moved hash table creation inside and the thread
4926 creation outside of the critical region.
4927 (mono_thread_pool_finish): removed obsolete code.
4928 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
4929 continue or exit the thread depending on the queue.
4931 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
4933 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
4934 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
4935 handle more bool marshalling options
4937 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
4939 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
4940 arrays of structs. Also add a more descriptive error message when
4941 a structure member is marshalled as LPArray.
4943 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
4945 * marshal.c (mono_marshal_get_native_wrapper): Add support for
4946 marshalling arrays of complex types. Fixes #29098. Also remove an
4947 usused and incomplete function.
4949 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
4951 * gc.c: report heap_size - free_bytes as total memory allocated
4954 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
4956 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
4957 fix timezone handling problems on Windows.
4959 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
4960 asserts when the year is outside the range handled by ms the functions.
4962 * class.c (setup_interface_offsets): If the class is an interface,
4963 fill out its interface_offsets slot.
4965 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4967 * threadpool.c: mark threadpool threads as background.
4969 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
4971 * decimal.c - define DECINLINE to nothing if not using GCC
4973 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
4975 * assembly.c: More refcount fixes.
4977 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4979 * string-icalls.c: if we're not trimming, return the same string.
4980 When not splitting, don't create a new string.
4982 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4985 (mono_image_open): increment the ref_count inside the critical section.
4987 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
4989 * image.c (mono_image_open): Fix reference counting bug.
4991 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
4993 * marshal.c (mono_marshal_type_size) struct alignment changed for
4994 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
4995 64bits. Avoid leak in mono_marshal_get_native_wrapper when
4996 mono_lookup_pinvoke_call throws.
4998 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
5000 * reflection.c (mono_reflection_parse_type): Fix #49114.
5002 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
5003 temporary workaround for cygwin header problem.
5005 * object.c (mono_object_isinst): Synchronize this with the code
5006 generated by the JIT for casts.
5008 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
5010 * reflection.c (encode_type): Fix #38332.
5012 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
5014 * marshal.c (mono_marshal_method_from_wrapper): New function to return
5015 the original method from the wrapper method.
5017 2003-09-25 Martin Baulig <martin@ximian.com>
5019 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
5020 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
5021 (ves_icall_Type_get_IsGenericInstance): New interncall.
5023 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
5025 * object.c: fix cast warning in big endian code.
5027 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
5029 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
5031 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5033 * assembly.c: don't call check_env from mono_assembly_load. It's
5034 already done once in mono_assemblies_init and may cause headaches when
5035 multiple threads are loading assemblies.
5037 2003-09-19 Martin Baulig <martin@ximian.com>
5039 * reflection.c (mono_reflection_define_generic_parameter): Don't
5040 allocate `klass->methods', set `klass->flags' to
5041 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
5043 2003-09-18 Martin Baulig <martin@ximian.com>
5045 * class.c (mono_class_init): Don't create `class->methods' if it's
5046 already initialized.
5048 * metadata.c (mono_metadata_load_generic_params): Make this
5051 * reflection.c (mono_reflection_define_generic_parameter): Set
5052 parent class and interfaces from the constraints.
5054 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
5055 to keep this struct in sync with the declaration in TypeBuilder.cs.
5057 2003-09-17 Martin Baulig <martin@ximian.com>
5059 * metadata.h (MonoType): Replaced the data's `int type_param'
5060 field with `MonoGenericParam *generic_param'.
5061 (MonoGenericParam): Added `MonoClass *klass'.
5063 * class.c (mono_class_from_gen_param): Removed the
5064 `MonoImage *image' and `int type_num' arguments.
5066 * metadata.c (mono_metadata_parse_generic_param): New static
5067 method; creates a MonoGenericParam which just contains the index.
5068 (do_mono_metadata_parse_type): Call
5069 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
5072 * reflection.c (mono_image_typedef_or_ref): Generic type
5073 parameters may be in the same assembly, but never use a typedef
5075 (mono_reflection_define_generic_parameter): We're now creating a
5076 "real" class for the type parameter; it's now safe to call
5077 mono_class_from_mono_type() on the class'es type, it'll do the
5080 2003-09-16 Martin Baulig <martin@ximian.com>
5082 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
5083 `symfile->range_entry_size' and `symfile->class_entry_size' here;
5084 the `symfile' data structure must be fully initialized before it
5085 gets added to the table.
5087 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
5089 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
5091 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
5092 class init trampolines.
5094 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
5096 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
5097 to the built-in profiler to turn off time and allocation profiling
5100 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
5102 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
5105 * debug-helpers.c (mono_method_full_name): Print the wrapper type
5106 in human readable form.
5108 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
5110 * reflection.c icall.c: Fixed warnings.
5112 * image.c (load_class_names): Use a temporary hash table to hold the
5113 namespaces in order to avoid doing many string comparisons.
5115 * image.h: Fix typo.
5117 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
5118 Pass NULL instead of g_direct_equal to the GHashTable constructor
5119 since the NULL case is short-circuited inside g_hash_table_lookup,
5120 leading to better performance.
5122 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
5123 obtain the first custom attribute for a given index. Depends on the
5124 CustomAttribute table being sorted by the parent field.
5126 * reflection.c (mono_custom_attrs_from_index): Use the new function
5127 for better performance.
5129 2003-09-07 Martin Baulig <martin@ximian.com>
5131 * class.c (mono_class_init): If we're a generic instance, inflate
5132 all our methods instead of loading them from the image.
5133 (mono_class_from_generic): Set `class->methods = gklass->methods'.
5135 2003-09-07 Martin Baulig <martin@ximian.com>
5137 * mono-debug-debugger.c: Added support for constructors.
5139 2003-09-06 Martin Baulig <martin@ximian.com>
5141 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
5144 * reflection.c (mono_reflection_setup_generic_class): Call
5145 ensure_runtime_vtable() to create the vtable.
5147 2003-09-05 Martin Baulig <martin@ximian.com>
5149 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
5152 2003-09-04 Martin Baulig <martin@ximian.com>
5154 * reflection.c (mono_reflection_define_generic_parameter): Generic
5155 parameters start with zero.
5157 2003-09-04 Martin Baulig <martin@ximian.com>
5159 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
5161 * reflection.h (MonoReflectionGenericParam): New typedef.
5162 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
5163 the generic parameters from the managed TypeBuilder.
5165 * reflection.c (mono_reflection_define_generic_parameter): New function.
5166 (mono_reflection_create_runtime_class): Encode generic parameters.
5167 (mono_reflection_setup_generic_class): New function; this is
5168 called after adding adding all generic params to the TypeBuilder.
5169 (encode_type): Added MONO_TYPE_VAR.
5171 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
5173 * class.h class.c (mono_class_needs_cctor_run): Moved this method
5176 * assembly.h assembly.c: Moved the AOT loading code into an assembly
5179 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
5181 * reflection.h reflection.c class.h class.c: Delete duplicate
5182 definition of mono_type_get_name () from reflection.c and export the
5185 * class.c: Class loading fixes from Bernie Solomon
5186 (bernard@ugsolutions.com).
5188 * reflection.c: Endianness fixes from Bernie Solomon
5189 (bernard@ugsolutions.com).
5191 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
5193 * assembly.h assembly.c: Define a file format version for AOT
5196 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
5198 * appdomain.h (MonoJitInfo): New field to determine whenever the
5199 code is domain neutral.
5201 2003-08-31 Miguel de Icaza <miguel@ximian.com>
5203 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
5205 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
5207 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
5208 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
5209 Avoid caching the result since strings must be domain specific. Fixes
5212 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
5214 * marshal.c (mono_marshal_init): Make this callable multiple times
5215 since it is hard to find a correct place to call it.
5217 * object.c (mono_runtime_class_init): Execute static constructors in
5218 the correct appdomain.
5220 * image.c (build_guid_table): Handle the case when multiple images have
5223 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5225 * icall.c: added a couple of icalls for System.Web.
5227 2003-08-28 Martin Baulig <martin@ximian.com>
5229 * icall.c (ves_icall_Type_BindGenericParameters): Use
5230 `klass->generic_inst' instead of `&klass->byval_arg' in the
5231 mono_type_get_object() call. The returned type must be
5232 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
5234 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
5238 * object.c (mono_class_proxy_vtable): Make it thread safe.
5240 * pedump.c: Fix warning.
5242 * object.c appdomain.h: Get rid of metadata_section.
5243 It is no longer needed and it was causing deadlocks with domain->lock.
5245 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
5247 2003-08-26 Martin Baulig <martin@ximian.com>
5249 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
5251 2003-08-26 Martin Baulig <martin@ximian.com>
5253 * pedump.c (main): Call mono_metadata_init(),
5254 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
5255 and mono_loader_init().
5257 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
5259 * loader.h: Add missing include to fix build.
5261 * image.h: mono_image_load_references is no more.
5263 * assembly.c: Reworked assembly loading to make it really thread safe.
5264 After these changes, the assembly returned by mono_assembly_open is
5265 fully initialized, i.e. all its references assemblies are loaded.
5267 * assembly.c (mono_image_load_references): Renamed to
5268 mono_assembly_load_references, and made private, since clients no
5269 longer need to call it.
5271 * class.c: Removed calls to mono_assembly_load_references, since it was
5272 a source of deadlocks.
5274 * loader.h loader.c class.h class.c: Protect data structures using a
5275 new lock, the loader lock.
5277 * class.c (mono_class_setup_vtable): Create temporary hash tables and
5278 GPtrArrays only when needed.
5280 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
5281 into empty structures by mcs. Fixes pinvoke7.cs.
5283 * domain.c (mono_init): Call a new initialization function.
5285 * appdomain.c (mono_runtime_init): Call the new initializer function
5286 of the marshal module.
5288 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
5289 inserted into empty structures by mcs. Fixes pinvoke7.cs.
5291 * marshal.h marshal.c: Added locks around the wrapper caches to make
5292 this module thread safe.
5294 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
5295 this argument. Fixes pinvoke1.exe.
5297 2003-08-25 Lluis Sanchez <lluis@ximian.com>
5299 * object.h: Added call_type field to MonoMethodMessage and the corresponding
5300 enumeration of values. Removed fields to store remote call output values in
5301 MonoAsyncResult. Not needed any more.
5302 * object.c: Initialize call_type and async_result fields in mono_message_init.
5303 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
5304 dispatching the message.
5305 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
5306 async call to finish. To do it use a message with EndInvoke call type.
5308 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
5310 * loader.h loader.c (mono_method_hash_marhal_info): New function which
5311 determines whenever a method has marshalling info.
5313 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5315 * assembly.c: fix the build on windows.
5317 2003-08-22 Lluis Sanchez <lluis@ximian.com>
5319 * object.cs: Fixed bug #47785.
5321 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
5323 * string-icalls.c (StringReplace): If their are no occurances of
5324 the old string found return a reference to the supplied
5325 string. This saves some memory and matches MS behavoir.
5327 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5329 * socket-io.c: fixed compilation for systems that define AF_INET6
5330 and don't define SOL_IP/SOL_IPV6.
5332 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
5334 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
5335 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
5337 * rawbuffer.c rawbuffer.h: Make this module thread safe.
5339 * domain.c: Make this module thread safe.
5341 * domain.c (mono_init): Call new initialization function.
5343 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
5344 reference types too. Fixes #38812.
5346 * image.c (mono_image_init): Fixed warnings.
5348 * class.c (mono_class_from_typeref): Handle assembly load failure
5351 * appdomain.c (add_assemblies_to_domain): Handle the case when
5352 the references of an assembly are not yet loaded.
5354 * metadata.c image.c assembly.c: Moved initialization of global
5355 variables to a separate function called at startup since lazy
5356 initialization of these variables is not thread safe.
5358 * image.c assembly.c: Made this module thread safe by adding locks in
5359 the appropriate places.
5361 * domain.c (mono_init): Call the new initialization functions of the
5364 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
5366 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
5367 make a direct call. It is proxy's work to make the call asynchronous.
5368 mono_delegate_end_invoke(): If the targe is a proxy, just collect
5370 * object.cs: mono_method_call_message_new(): read AsyncResult and
5371 state object from parameters list, if this info is requested.
5372 * object.h: Added fields to store remote call output values in
5373 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
5375 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5377 * object.h: add needed fields to MonoThread.
5378 * threads.c, threads.h: allow registering a function to cleanup data
5379 allocated per thread by the JIT.
5381 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5383 * loader.h: portability fix by Bernie Solomon
5384 * <bernard@ugsolutions.com>.
5386 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
5388 * reflection.h reflection.c (mono_param_get_objects): Changed this to
5389 return a MonoArray. This simplifies the code and also ensures that
5390 the cache allways contains an object reference as a value.
5392 * icall.c (ves_icall_get_parameter_info): Simplified using the new
5395 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5397 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
5398 fixes a problem with byte ordering when getting the address family for
5401 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
5403 * .cvsignore: Added monosn.
5405 * reflection.h reflection.c loader.c: Added support for parameter
5406 marshalling to dynamically created types. Fixes #47295.
5408 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
5410 * rand.c: remove useless warnings.
5412 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
5414 * class.c: implemented ldtoken for methods and fieldrefs.
5416 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5418 * threadpool.c: when mono_async_invoke was called, no one took care of
5419 monitoring the queue. So if the method invoked took some time and we
5420 got new async invoke requests after 500 ms (the thread created waited
5421 that long in WaitForSingleObject), the new async invoke was not called
5422 until the previous one finished.
5424 This is fixed now. Thanks to Totte for helping with it.
5426 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5428 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
5430 2003-08-11 Martin Baulig <martin@ximian.com>
5432 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
5434 2003-08-06 Martin Baulig <martin@ximian.com>
5436 * mono-debug-debugger.c: Added support for static fields,
5437 properties and methods.
5439 2003-08-06 Martin Baulig <martin@ximian.com>
5441 * mono-debug-debugger.c: Don't store the MonoString's vtable to
5442 make this work for applications with multiple application domains.
5444 2003-08-04 Martin Baulig <martin@ximian.com>
5446 * mono-debug-debugger.c: Completely reworked the type support; the
5447 most important thing is that we're now just using one single
5448 `MonoType' instance per type.
5450 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
5452 * mono-endian.h, mono-endian.c, icall.c: Added icall
5453 ves_icall_System_Double_AssertEndianity to assert double word endianity
5454 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
5456 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5458 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
5459 support, icalls and fixes.
5461 2003-07-31 Miguel de Icaza <miguel@ximian.com>
5463 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
5464 classes that are a punctuation character in .NET is not the same a
5467 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5469 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
5471 2003-07-29 Miguel de Icaza <miguel@ximian.com>
5473 * icall.c: Add new MemCopy internalcall.
5474 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
5475 Simplified code; It is not necessary to handle all the cases here,
5476 as the C# code takes care of it. Only handle the case of the name
5477 resource embedded into the assembly.
5479 Changed signature to return the data pointer and the size of the
5482 2003-07-26 Miguel de Icaza <miguel@ximian.com>
5484 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
5485 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
5487 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
5489 * socket-io.c: ignore EINTR error in select.
5491 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
5493 * class.h, class.c: removed unused subclasses field in MonoClass.
5495 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
5497 * icall.c: improve fix of get_base_definition(). If the parent class
5498 doesn't have the mehod, look at the parent of the parent.
5499 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
5500 to check if a parameter is an in or out parameter
5501 (PARAM_ATTRIBUTE_IN is not set by default).
5502 mono_method_return_message_restore(): Use mono_class_value_size to
5503 get the size of a value type. mono_type_stack_size (parameterType)
5504 does not return the correct value if parameterType is byRef.
5505 mono_load_remote_field(), mono_load_remote_field_new(),
5506 mono_store_remote_field(), mono_store_remote_field_new():
5507 raise exception if the remote call returns an exception.
5509 2003-07-28 Martin Baulig <martin@ximian.com>
5511 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
5512 method. This is a wrapper around mono_runtime_invoke() which
5513 boxes the instance object if neccessary.
5515 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5517 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
5518 metadata.h, row-indexes.h, verify.c: first cut of generics support.
5520 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5522 * icall.c: disable mcs bug workaround.
5524 2003-07-21 Miguel de Icaza <miguel@ximian.com>
5526 * object.c (mono_runtime_class_init): Take the metadata_section
5527 mutex before obtaining the domain mutex.
5529 * appdomain.h: Added definition of metadata_section mutex here.
5531 * object.c: define metadata_mutex here.
5533 2003-07-24 Ravi Pratap <ravi@ximian.com>
5535 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
5538 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
5540 * reflection.c: Fix bug #46669
5542 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5547 * object.h: fill in the type name for TypeLoadException.
5549 2003-07-23 Ravi Pratap <ravi@ximian.com>
5551 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
5552 relationship between TypeBuilders while compiling corlib) and bug
5553 45993 (Array types returned from the runtime while compiling
5554 corlib were from the loaded corlib).
5556 2003-07-22 Martin Baulig <martin@ximian.com>
5558 * mono-debug-debugger.c: Reworked the type support a bit more;
5559 distinguish between types and classes.
5561 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
5563 * icall.c: add IsArrayImpl icall.
5565 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
5567 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
5568 initializing real_size only once. Also fix bug #46602.
5570 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
5572 * object.c: Renamed mono_metadata_section to metadata_section.
5574 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
5576 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
5577 empty array if the type is an array. Fixed.
5578 ves_icall_MonoMethod_get_base_definition: if the base method
5579 is abstract, get the MethodInfo from the list of methods of
5581 * reflection.c: ParameterInfo.PositionImpl should be zero-based
5582 and it was 1-based. Fixed in mono_param_get_objects.
5584 2003-07-20 Martin Baulig <martin@ximian.com>
5586 * mono-debug.h: Set version number to 31.
5587 (mono_debug_init): Added `MonoDomain *' argument.
5589 * mono-debug-debugger.c: Reworked the type support; explicitly
5590 tell the debugger about builtin types; pass the `klass' address to
5593 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
5595 * image.c: Allow new metadata tables to be loaded without a
5596 warning. Also update the warning message to give the new constant value.
5598 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
5600 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
5601 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
5602 array type representation changes.
5604 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
5606 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
5607 on Environment.Exit () call.
5609 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
5611 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
5612 requires a matching corlib.
5614 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
5616 * Changelog: My editor decided to add a CR to each line. Sorry about that.
5617 Committed again without the CRs.
5619 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
5621 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
5622 getting it from the "this" socket instance. Did not work
5623 if the socket is a subclass of Socket.
5624 Also fixed bug #35371.
5626 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
5628 * metadata.c: fixed size for TypedByRef.
5629 * loader.c: when searching for a method, consider the vararg amrker.
5630 * unicode.c, decimal.c: constify some arrays.
5632 2003-07-15 Dick Porter <dick@ximian.com>
5634 * socket-io.c: Fixed compilation for gcc < 3.2.
5636 Fixed compilation for machines that don't have AF_INET6 (thanks to
5637 Bernie Solomon <bernard@ugsolutions.com> for that part.)
5639 Fixed compile warnings.
5641 Fixed formatting and line endings.
5643 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
5646 * socket-io.c: Added IPv6 support.
5648 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
5650 * class.c (mono_class_is_assignable_from): New function to implement
5651 the is_assignable_from logic. Used by mono_object_isinst,
5652 Type::IsAssignableFrom () and the interpreter.
5654 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
5655 Object, even interfaces.
5657 * object.c (mono_object_isinst): Implement in terms of
5660 * icall.c (ves_icall_type_is_assignable_from): New icall.
5662 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
5664 * domain.c (foreach_domain): fix compiler warning.
5666 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
5668 * image.c (load_metadata_ptrs): use g_strndup because strndup is
5669 not available on all plattforms
5671 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
5673 * image.h image.c: Store the metadata version string in MonoImage.
5674 * icall.c: New icall to retrieve the image version.
5675 * reflection.c (create_dynamic_image): Fill in the image version field
5676 * reflection.c (build_compressed_metadata): Use the image version
5677 from the image structure.
5679 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5681 * appdomain.c: modified comment.
5682 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
5683 That will be its last iteration when mono_gc_cleanup is called from
5684 mono_runtime_cleanup and before the domain is unloaded.
5688 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
5690 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
5693 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5695 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
5696 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
5697 Bernie Solomon <bernard@ugsolutions.com>.
5699 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
5701 * object.c, object.h: provide mono_object_new_fast() for faster
5702 allocation in some special cases.
5704 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
5706 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
5707 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
5709 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
5711 * threadpool.c: fix leaks.
5713 2003-07-01 Dick Porter <dick@ximian.com>
5715 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
5716 using MonoGHashTables. Fixes threadpool bug posted to list.
5718 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
5720 * image.h, image.c: added support to load an assembly from a byte array.
5721 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
5722 assembly bundle support.
5724 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
5726 * threadpool.c (mono_thread_pool_add): keep a reference to the
5727 AsyncResult to prevent GC
5729 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
5731 * class.c: leak fix.
5733 2003-06-25 Dick Porter <dick@ximian.com>
5735 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
5736 for the async object, the WaitHandle object will close the handle.
5739 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
5741 * class.c: in mono_array_class_get (), lookup from the hash with the
5742 same type we insert: this works around a bug in
5743 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
5744 lluis. The real fix will have to wait for after the release.
5746 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
5748 * icall.c: fix memory leak when getting type members.
5750 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
5752 * reflection.c: added more pubtoken special cases.
5754 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
5756 * class.c: handle field offset correctly when class size
5757 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
5759 2003-06-20 Martin Baulig <martin@ximian.com>
5761 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
5764 2003-06-20 Martin Baulig <martin@ximian.com>
5766 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
5768 2003-06-20 Martin Baulig <martin@ximian.com>
5770 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
5771 just distinguish between variables in registers and variables at
5772 an offset relative to a register.
5774 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5776 * icall.c: #ifdef out latest changes until mcs is fixed.
5778 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5780 * icall.c: return members in metadata order.
5782 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
5784 * icall.c: avoid infinite loop in GetTimeZoneData.
5786 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
5788 * icall.c: added Marshal.Prelink/All icalls.
5790 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
5792 * object.c, object.h: fix warnings and do some overflow checking
5793 when creating arrays.
5795 2003-06-17 Dick Porter <dick@ximian.com>
5798 * file-io.c: File attributes need to be tweaked slightly when
5799 passed from the managed to the w32 world.
5801 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
5802 * profiler.h profiler-private.h profiler.c: Rework last patch
5803 based on suggestion by Paolo.
5805 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
5807 * profiler.h profiler-private.h profiler.c: Added infrastructure for
5808 instruction level coverage data collection.
5809 * profiler.h profiler.c (: Added new callback function which can be
5810 used by the profiler to limit which functions should have coverage
5812 * profiler.c (mono_profiler_load): Call g_module_build_path to
5813 generate the file name of the profiler library.
5815 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5817 * profiler.c, profiler.h, profiler-private.h: added basic block
5818 coverage profiling API.
5820 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
5822 * reflection.c (mono_reflection_create_runtime_class): Add support
5823 for events in dynamically generated code.
5825 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
5828 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
5830 * icall.c: when getting timezone info, return reasonable values if we
5831 can't get the actual data.
5833 2003-06-14 Dick Porter <dick@ximian.com>
5835 * threads.c (start_wrapper): Remove the reference to the thread
5836 object in the TLS data, so the thread object can be finalized.
5837 This won't be reached if the thread threw an uncaught exception,
5838 so those thread handles will stay referenced :-( (This is due to
5839 missing support for scanning thread-specific data in the Boehm GC
5840 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
5842 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
5844 * reflection.c: ensure streams and tables are first allocated with
5845 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
5847 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5849 * icall.c: fixed GetElementType for byrefs (bug# 44792).
5851 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
5853 * reflection.c (mono_reflection_create_runtime_class): Add support for
5854 properties to dynamically created classes.
5855 * reflection.c: Fix a few places where non-MonoObjects were inserted
5856 into the tokens hashtable.
5858 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
5860 * object.c: some support to handle out of memory exceptions.
5862 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
5864 * marshal.c (mono_marshal_get_native_wrapper): support reference
5867 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
5869 * object.h, object.c: more portability stuff from Bernie Solomon.
5870 Unexport mono_object_allocate(). Added mono_object_unbox ().
5871 Set exitcode when an unhandled exception is thrown.
5873 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
5875 * marshal.c (mono_marshal_get_native_wrapper): use custom
5876 marshaler for return types.
5878 2003-06-10 Dick Porter <dick@ximian.com>
5880 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
5881 ip_mreq is available
5883 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
5885 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
5886 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
5887 by Bernie Solomon <bernard@ugsolutions.com>.
5889 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
5891 * gc.c (mono_gc_init): Avoid error message on shutdown when
5892 GC_DONT_GC=1 is used.
5894 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
5895 New icall to return the GUID of a module.
5897 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
5899 * class.c: ensure instance size always includes the parent's size
5900 even whem class size is set explicitly (fixes bug#44294).
5902 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
5904 * profiler.h, profiler.c: made the simple profiler thread-safe,
5905 get more accurate timing info. Allow the loading of an
5906 externally-developed profiler module.
5908 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
5910 * marshal.c (mono_marshal_get_native_wrapper): improved
5911 class/byref arguments.
5912 (mono_marshal_get_native_wrapper): better string marshaling support.
5914 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
5916 * class.c: ensure .pack and .size are handled correctly and
5917 simplified layout of static fields.
5919 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
5922 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
5924 * loader.c (mono_lookup_pinvoke_call): look for modules in the
5925 current directory (fix bug 44008)
5927 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
5929 * marshal.c (mono_marshal_get_native_wrapper): started support for
5931 (mono_delegate_to_ftnptr): consider marshalling specifications
5933 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
5935 * reflection.c, reflection.h: emit custom marshal info.
5937 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5939 * object.c: free the GError.
5940 * icall.c: added CloseEvent_internal.
5942 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
5945 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
5947 * loader.c (mono_method_get_signature): Add support for dynamic
5950 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
5952 * reflection.c: fixed bug #43905.
5954 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
5956 * class.c, domain.c, icall.c, metadata.h, object.h: support for
5957 handling TypedReference and ArgIterator.
5958 * loader.c, loader.h: added function to get signature at call site.
5960 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
5962 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
5963 data readonly. Buglets and warning fixes. Some MethodSpec support.
5965 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
5967 * class.h, class.c, object.c: remove relative numbering support.
5969 2003-05-26 Miguel de Icaza <miguel@ximian.com>
5971 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
5972 free the string, until we get a chance to fix Gtk#
5974 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5976 * marshal.c: revert last patch.
5978 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
5980 * icall.c: updates for new mono_class_vtable() not calling
5981 the type constructor anymore.
5983 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
5985 * object.h, object.c: separate vtable creation from type
5986 initialization. Make running the .cctor thread safe.
5988 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
5990 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
5992 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
5994 * loader.c (mono_get_method): consider calling convention
5996 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
5998 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
5999 to return the invisible global type for a module.
6001 * reflection.c (mono_image_build_metadata): Emit global fields too.
6003 2003-05-20 Peter Williams <peterw@ximian.com>
6005 * loader.c (mono_lookup_internal_call): Add a few newlines.
6007 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
6009 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
6012 * appdomain.c (set_domain_search_path): Recalculate search path when
6013 AppDomainSetup.PrivateBinPath changes.
6015 * object.c (mono_class_compute_gc_descriptor): It turns out some
6016 parts of the class libs (like System.Thread) holds pointers to
6017 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
6018 to treat native int a pointer type here.
6020 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
6022 * appdomain.h, domain.c: add hashtable for jump target resolution.
6024 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
6026 * reflection.h reflection.c icall.c: Added new icalls
6027 GetManifestResourceInfoInternal, GetModulesInternal and support
6030 2003-05-16 Dick Porter <dick@ximian.com>
6034 * file-io.c: Implement System.IO.MonoIO::GetTempPath
6036 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
6038 * object.c: mono_store_remote_field: little fix to previous patch.
6040 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
6042 * class.c: add constructors to array classes.
6043 * icall.c: special case array construction for InternalInvoke (),
6045 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
6047 * class.h class.c reflection.c object.c: Added support for field
6048 defaults in dynamically generated classes.
6050 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
6052 * reflection.c: properly encode charset for ddlimport.
6054 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
6056 * threads.c: allow compiling without GC.
6058 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
6060 * appdomain.h, object.c, object.h, threads.c, threads.h: added
6061 handling of thread static data.
6063 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
6065 * reflection.h, reflection.c: added mono_custom_attrs_free ().
6067 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
6069 * class.c (mono_array_class_get): always set the serializable flags
6070 (mono_array_class_get): always set the SEALED attribute for array types
6072 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
6074 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
6075 attributes (fix for bug 42021).
6077 2003-05-12 Dick Porter <dick@ximian.com>
6079 * gc.c: Don't run finalizers when the finalizer thread is
6080 finishing up, because the default domain has already been
6083 2003-05-11 Miguel de Icaza <miguel@ximian.com>
6085 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
6086 value is null, we should throw an exception. This is slightly
6087 different than the other conventions used for the constructor.
6089 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6091 * socket-io.c: fixed windows build.
6093 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6095 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
6097 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
6099 * object.c (mono_string_new_wrapper): Compatibility fix for MS
6102 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
6104 * class.c (mono_class_layout_fields): Add experimental GC aware
6105 auto layout facility. Requires class library changes to work correctly.
6107 (mono_class_setup_vtable): Avoid overriding explicit interface
6108 method implementations. Fixes iface3.exe test.
6110 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
6112 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
6113 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
6115 * metadata.h: Add new type classification macro which determines
6116 whenever the type holds an object reference.
6118 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
6120 * marshal.c (mono_marshal_get_native_wrapper): cleanups
6122 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
6124 * gc.c (finalizer_thread): Work around a GC bug.
6126 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
6128 * marshal.c (emit_struct_conv): allow unions
6130 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
6132 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
6134 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
6136 2003-05-06 Martin Baulig <martin@ximian.com>
6138 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
6140 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6143 (Select_internal): allow NULLs, don't create arrays if not needed.
6144 Coupled with Socket.cs changes.
6147 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
6148 register a finalizer for it that will close the semaphore handle. This
6149 fixes the leak and make Lupus' test run with > 4080 loops.
6151 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
6153 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
6154 Jerome Laban (bug #42287)
6156 2003-05-02 Martin Baulig <martin@ximian.com>
6158 * debug-mono-symfile.h
6159 (MonoSymbolFile): Moved declaration into mono-debug.h.
6160 (MonoDebugMethodJitInfo): Likewise.
6161 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
6163 (_mono_debug_address_from_il_offset): Take a
6164 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
6167 (MonoDebugDomainData): New struct.
6168 (mono_debug_get_domain_data): New function.
6169 (mono_debug_add_method): Take an additional `MonoDomain *'
6171 (mono_debug_source_location_from_address): Likewise.
6172 (mono_debug_il_offset_from_address): Likewise.
6173 (mono_debug_address_from_il_offset): Likewise.
6175 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
6177 * reflection.c: one more check for null type in custom attrs.
6179 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6181 * reflection.c: avoid warning (comparison is always false due to limited
6182 range of data type).
6184 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6186 * icall.c: throw an exception in Type.GetField if the argument 'name'
6189 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
6191 * reflection.c: fixed handling of enums in named arguments to custom
6192 attributes (bug #42123).
6194 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
6196 * reflection.c: use the right array element type and handle
6197 a null for a Type argument, too.
6199 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
6201 * reflection.c: handle arrays as arguments to custom attributes.
6203 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
6205 * reflection.c: handle a string value in a custom attr
6206 ctor that takes an object.
6208 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
6210 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
6213 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
6215 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
6217 2003-04-27 Martin Baulig <martin@ximian.com>
6219 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
6220 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
6221 MONO_DEBUGGER_EVENT_BREAKPOINT.
6222 (mono_breakpoint_trampoline_code): Removed.
6223 (mono_debugger_event_handler): The last argument is now a
6225 (mono_debugger_insert_breakpoint_full): Removed the
6226 `use_trampoline' argument.
6227 (mono_debugger_method_has_breakpoint): Likewise.
6228 (mono_debugger_trampoline_breakpoint_callback): Renamed to
6229 mono_debugger_breakpoint_callback(); take the method and
6230 breakpoint number as arguments.
6232 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
6234 * metadata.c: fix off by one when loading parameters attributes.
6236 2003-04-24 Martin Baulig <martin@ximian.com>
6238 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
6240 2003-04-24 Martin Baulig <martin@ximian.com>
6242 * mono-debug-debugger.c: Moved all code which interacts with the
6245 * debug-mono-symfile.c: This code now just deals with the symbol
6246 file itself, the debugger code is now in mono-debug-debugger.c.
6248 2003-04-23 Martin Baulig <martin@ximian.com>
6250 * mono-debug.c (mono_debug_source_location_from_il_offset):
6251 New method; like mono_debug_source_location_from_address(), but
6252 takes an IL offset instead of a machine address.
6254 2003-04-23 Martin Baulig <martin@ximian.com>
6256 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
6257 `line' field; this is now computed by the debugger.
6259 2003-04-23 Martin Baulig <martin@ximian.com>
6261 * mono-debug.[ch]: New files. This is the new debugging interface.
6263 * mono-debug-debugger.[ch]: New files. Moved all code which
6264 interacts with the Mono Debugger here.
6266 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
6268 * domain.c (mono_init): initialize mono_defaults.monitor_class
6270 2003-04-21 Miguel de Icaza <miguel@ximian.com>
6272 * reflection.c (method_encode_code): Add a spicy exception to help
6273 future compiler authors.
6275 2003-04-21 Martin Baulig <martin@ximian.com>
6278 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6279 Make this work with relative pathnames; g_filename_to_uri() needs
6280 an absolute filename.
6282 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
6284 * icall.c: Track name changes in Object and ValueType.
6286 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
6288 * metadata.c (mono_type_stack_size): size should be a multiple of
6291 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6294 (internal_domain_finalize): moved into mono_domain_finalize. No need
6295 to create another thread because the finalizers will be run in the
6298 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
6299 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
6300 to be run (MS does this too).
6302 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
6304 * object.c (mono_class_compute_gc_descriptor): Update comment.
6306 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
6308 * image.h: Add synchronized wrapper cache.
6310 * image.c (do_mono_image_open): Initialize cache.
6312 * reflection.c (create_dynamic_mono_image): Initialize cache.
6314 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6316 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
6317 ves_icall_System_Buffer_ByteLengthInternal.
6319 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
6321 * reflection.c: setup klass->nested_in earlier. Allow
6322 a dash in the assembly name.
6324 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
6326 * metadata.c (mono_type_to_unmanaged): dont access
6327 type->data.klass for MONO_TYPE_OBJECT
6328 (mono_type_to_unmanaged): consider System.Delegate class
6330 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
6332 * class.c: just setup supertypes in the proper place instead of
6333 initializing the full element class for arrays.
6335 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
6337 * class.c: ensure the element class of arrays is initialized.
6338 Setup the supertype info for array classes, too.
6340 2003-04-14 Miguel de Icaza <miguel@ximian.com>
6342 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
6344 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6346 * Makefile.am: re-added -m option when running cygpath. This way,
6347 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
6349 * mono-config.c: same codepath for locating mono config file for WIN32
6351 * assembly.c: if mono_assembly_setrootdir is called, don't override
6354 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6356 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
6357 MONO_ASSEMBLIES variable.
6359 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
6361 * icall.c: added Assembly::GetNamespaces() icall.
6363 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6365 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
6367 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
6369 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
6370 * object.c: fixed bug in the construction of vtable for proxies
6372 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
6374 * object.c (mono_array_new): Mark mono_array_new as an icall.
6376 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6378 * class.c: fixed test for public method when overriding interfaces.
6381 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
6383 * appdomain.h, domain.c: added mono_domain_foreach() to
6384 be able to access the currently loaded appdomains.
6385 * object.c: make string interning work across sppdomains.
6386 Mark some functions for use as icalls.
6388 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
6390 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
6392 * reflection.h reflection.c: Allocate long living data using
6393 GC_MALLOC_ATOMIC so the collector does not need to scan it.
6395 * reflection.c: Double the allocation size in streams instead of
6396 increasing it, to prevent unneccesary copying on large assemblies.
6398 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
6399 creation if the assembly does not have the Run flag set.
6401 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
6403 * class.h: avoid the C++ keywords in header files (Jerome Laban
6404 spotted and fixed this).
6406 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6409 (mono_unhandled_exception): fill in the arguments for the
6410 UnhandledException event. Only trigger that event for the default
6411 domain (as MS does).
6413 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
6415 * object.c: Improve typed allocation stuff based on suggestions from
6416 Paolo. Also turn it on if the GC library supports it.
6418 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
6420 * object.c object.h class.h: Added experimental typed allocation
6421 facility using the interfaces in gc_gcj.h.
6423 * os/gc_wrapper.h: Added new include files.
6425 2003-04-03 Martin Baulig <martin@ximian.com>
6427 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
6428 which is not yet enabled by default.
6430 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
6432 (mono_gc_lock, mono_gc_unlock): New static functions.
6434 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
6435 functions; stop/start the world for the garbage collector. This
6436 is using the windows API; we need to complete the SuspendThread()/
6437 ResumeThread() implementation in the io-layer to make this work on Unix.
6438 (mono_gc_push_all_stacks): New public function; tells the garbage
6439 collector about the stack pointers from all managed threads.
6441 2003-04-03 Martin Baulig <martin@ximian.com>
6443 * object.h (MonoThread): Added `gpointer stack_ptr'.
6445 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
6447 2003-04-03 Martin Baulig <martin@ximian.com>
6449 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
6451 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
6453 * reflection.c (typebuilder_setup_fields): Initialize field.first and
6456 2003-04-02 Miguel de Icaza <miguel@ximian.com>
6458 * loader.c (mono_lookup_internal_call): Report the corlib that is
6461 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
6463 * icall.c (ves_icall_type_GetTypeCode): fixed check for
6464 System.DBNull (it's class not valuetype).
6466 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
6468 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
6469 if the array method was already assigned a token (fixes bug#40646).
6471 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
6473 * reflection.c (mono_reflection_get_type): Attempt type resolve even
6474 if no assembly is given.
6476 2003-04-01 Miguel de Icaza <miguel@ximian.com>
6478 * metadata.h: Added the new tables.
6480 * row-indexes.h: Added definitions for new tables.
6482 * metadata.c: Add schemas for new tables, and add support for
6483 computing the sizes of them.
6485 * class.c: Update for handling the new type cases.
6487 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
6489 * metadata.h (MONO_TYPE_IS_VOID): new macro
6491 2003-03-31 Martin Baulig <martin@ximian.com>
6493 * threads.h (MonoThreadCallbacks): Added `thread_created'.
6495 * threads.c (mono_thread_new_init): Call `thread_created' in the
6496 mono_thread_callbacks.
6498 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
6500 * loader.h: added marshalbyrefobject_class to mono_defaults
6501 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
6502 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
6503 generation of output parameters.
6504 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
6505 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
6506 contextbound and the target object belongs to the context of the caller.
6507 * object.h: added context and unwrapped_server variables in MonoRealProxy.
6508 * object.c: Implemented support for interfaces and abstract classes
6509 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
6510 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
6512 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
6514 * class.h class.c (mono_class_is_subclass_of): New function.
6516 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
6517 routines for most common case (calls from ArrayList::ToArray).
6519 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
6520 routine so programs which call Environment::Exit() can be profiled.
6522 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
6523 Added MONO_ARCH_SAVE_REGS.
6525 * icall.c (ves_icall_type_is_subtype_of): Use new function.
6527 2003-03-29 Miguel de Icaza <miguel@ximian.com>
6529 * blob.h: Add a couple of new MonoType types definitions.
6531 * tabledefs.h: Add a couple of new call convs.
6533 2003-03-27 Zoltan Varga <vargaz@freemail.h>
6535 * reflection.h (MonoReflectionDynamicAssembly): track changes in
6536 the layout of the class.
6538 * reflection.c (alloc_table): double the size on overflow to avoid
6539 unnecessary copying.
6541 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
6542 avoid filling out metadata tables and blobs. Also set mb->ilgen to
6543 null so it can be garbage collected.
6545 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
6547 * reflection.c (mono_reflection_get_type): Return the resolved type
6548 only if it is in the assembly we searched.
6550 * reflection.c (ensure_runtime_vtable): Initialize method slots.
6552 * class.c (mono_class_setup_vtable): Set the slot of the overriding
6555 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6558 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
6559 the right one is 'file:///blah', but MS allows it.
6561 (mono_assembly_open): allow 'file://blah'
6563 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
6565 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
6567 * socket-io.c: fixes bug #40310.
6569 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
6571 * reflection.c (mono_reflection_parse_type): handle deeply nested
6574 * reflection.c (mono_image_create_token): Use unique token values
6575 since they will be put into a hash table.
6577 * class.c (mono_class_setup_vtable): If a method occurs in more than
6578 one place in the vtable, and it gets overriden, then change the
6579 other occurances too.
6581 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
6582 object as return type.
6584 2003-03-22 Pedro MartÃnez Juliá <yoros@wanadoo.es>
6586 * icall.c: Deleted "ToString" implementation for double and float
6587 because they are full implemented in managed code.
6589 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
6591 * reflection.c, reflection.h: implemented and exported functions
6592 to retrieve info about custom attributes.
6594 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6596 * appdomain.c: moved Uri handling to assembly.c
6597 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
6598 work when using a file Uri in *nix and windows.
6600 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
6601 GetReferencedAssemblies.
6603 2003-03-18 Dick Porter <dick@ximian.com>
6605 * icall.c: Rename a couple of internal calls
6607 * threads.c: Set the thread state to Stopped when a thread exits.
6610 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
6612 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
6615 * object.c (mono_class_vtable): fix warning.
6617 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
6619 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
6621 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
6623 (method_encode_clauses): Create exception info structures in the right
6625 (mono_reflection_setup_internal_class): Initialize supertypes field.
6627 * class.c object.c: Handle interfaces which implement other interfaces
6630 * class.h class.c: Move the supertypes array initialization code into
6631 a separate function so it can be used for dynamic types too. Also call
6632 it earlier, in mono_class_init(), since it can be used before the
6633 type is initialized.
6635 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6639 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
6644 * object.c: remove warnings.
6646 2003-03-13 Martin Baulig <martin@ximian.com>
6648 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
6649 (MonoDebugLexicalBlockEntry): New types.
6651 * debug-mono-symfile.c
6652 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
6654 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6656 * process.c: ret can be any non-zero value accroding to MS doc.
6658 2003-03-07 Miguel de Icaza <miguel@ximian.com>
6660 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
6661 fixing a warning for a miss-used prototype, would have cause
6662 random memory corruption.
6664 2003-03-07 Martin Baulig <martin@ximian.com>
6666 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
6667 getting really annoying ....
6669 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
6671 * reflection.c (fixup_method): added support for array methods.
6673 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
6675 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
6676 (pointed out by Michael Adams).
6678 2003-03-04 Dick Porter <dick@ximian.com>
6680 * icall.c: Temporarily reverted the Double and Single ToString()
6681 change, because it broke nunit.
6683 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
6685 * object.h, threads.h: make include files compatible with C++
6686 (patch by Jerome Laban <jlaban@wanadoo.fr>).
6688 2003-03-04 Pedro MartÃnez Juliá <yoros@wanadoo.es>
6690 * icall.c: Erased ToString helper functions for Double and Single.
6691 Now, that implementations ar all in managed code (Double and Single
6694 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
6696 * appdomain.c: Added method for initializing the default context of
6697 a domain. Added internal call for getting the default context.
6698 * appdomain.h: Added context variable in MonoDomain struct.
6699 * domain.c: mono_domain_set also sets the default context of the domain
6700 * icall.c: Mapped internal method InternalGetDefaultContext.
6701 * object.c: mono_object_get_virtual_method returns always a remoting
6702 wrapper if the object is a transparent proxy.
6703 mono_runtime_invoke_array: when creating an object by calling the
6704 constructor, if the created object is a proxy, then the constructor should
6705 be called using the a remoting wrapper.
6707 2003-03-03 Dick Porter <dick@ximian.com>
6709 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
6710 variable so it compiles on solaris. Problem spotted by
6711 Christopher Taylor <ct@cs.clemson.edu>
6713 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6716 (get_info_from_assembly_name): don't leak value.
6719 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
6722 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
6724 * assembly.c: export mono_image_load_references ().
6725 * class.c: handle function pointers. mono_class_from_name() now
6726 supports nested type names directly.
6728 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
6730 * reflection.h reflection.c: Encode already created dynamic methods
6731 and fields correctly as a DEF instead of a REF.
6733 * reflection.c: Get rid of the force_ref argument to
6734 mono_image_typedef_or_ref since it was wrong in the first place.
6736 * string-icalls.c: add error checking to string constructors according
6739 * reflection.c: Emit types in the order their TypeBuilders were
6740 created. Previously, a new table index was assigned to each type before
6741 the tables were emitted. This was wrong because the signature blob
6742 might already refer to a type by its original table index.
6744 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
6746 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
6749 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6751 * Makefile.am: make assemblies dir have \ instead of / on windows.
6753 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
6755 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
6756 iterate over the NESTEDCLASS table using a linear search since the
6757 table is not guaranteed to be sorted by the secondary key.
6759 * class.c (mono_class_create_from_typedef): fixed up call to
6760 mono_metadata_nesting_typedef.
6762 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
6764 * marshal.c (mono_string_to_byvalstr): clear the memory as
6765 suggested by Jerome Laban <jlaban@wanadoo.fr>
6767 2003-02-26 Dick Porter <dick@ximian.com>
6769 * process.c: Cope with padding in .rsrc blocks
6771 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
6773 * metadata.h: reverted the filter_len change, it breaks reflection
6775 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
6777 * metadata.h: added a new field to store the filter_len
6780 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
6782 * reflection.c: handle custom attributes for types and members
6783 created with Reflection.Emit (bug#38422).
6785 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
6787 * reflection.c: define RTSpecialName automatically for constructors for
6788 compatibility with MS.NET.
6790 * reflection.c (mono_reflection_create_runtime_class): initialize
6791 nested_in field of dynamically created classes.
6793 2003-02-22 Martin Baulig <martin@ximian.com>
6795 * debug-mono-symfile.h: Incremented version number.
6797 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
6799 * object.h icall.c process.c: fix warnings.
6801 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
6803 * appdomain.h appdomain.c:
6804 (mono_domain_try_type_resolve): split the
6805 name_or_tb argument into a name and a tb argument.
6806 (mono_domain_has_type_resolve): new function to check whenever the
6807 application has registered a TypeResolve event handler.
6809 * icall.c reflection.h reflection.c: move the type resolve logic into
6810 mono_reflection_get_type () so it will be invoked when
6811 Assembly::GetType () is called.
6814 (mono_reflection_get_type): renamed to get_type_internal.
6815 (mono_reflection_get_type): fixed type name generation so it works
6816 for nested types too.
6817 (mono_reflection_get_type): call has_type_resolve () to avoid the
6818 costly type name generation if there is no resolve event handler.
6820 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
6822 * class.c, image.c: load exported types from file references.
6824 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
6826 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
6827 used to cache the managed methods used to create proxies and make
6828 remote invocation of methods.
6829 * class.h: Added in MonoVTable a flag to indicate that a class needs
6830 to be remotely created.
6831 * object.c: Modified the method mono_class_vtable(). It now initializes
6832 the remote flag of the vtable. Modified mono_object_new_specific(),
6833 so now it checks the remote flag.
6834 * icall.c: Added a couple of internal methods, one for enabling instance
6835 creation interception for a type, and one for creating objects bypassing
6838 2003-02-18 Martin Baulig <martin@ximian.com>
6840 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
6841 New interncall to get a method's metadata token.
6843 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
6844 New interncall for the debugger.
6846 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
6848 * class.c (mono_class_setup_vtable): allocate supertype array
6850 2003-02-18 Martin Baulig <martin@ximian.com>
6852 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
6854 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6857 (assembly_name_to_aname): jump over unknown properties (i've found
6858 something like: 'type, assembly, version=xxx, custom=null, public...',
6859 so now will ignore custom=null and still get the rest of the values).
6861 2003-02-17 Dick Porter <dick@ximian.com>
6863 * threads.c: Have Thread.Start() wait for a semaphore to signal
6864 that the thread has set up all its local data. This fixes bug
6865 34323, where Abort() raced the new thread's TLS data.
6867 Also removes the handle_store() call from start_wrapper, because
6868 threads are now always created suspended and there is no longer a
6869 race between the parent and child threads to store the info.
6871 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
6873 * image.c: explain the #- heap issue in a message, hopefully
6874 avoiding FAQs on mono-list.
6876 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6879 (GetEntryAssembly): if the domain has not invoked
6880 AppDomain.ExecuteAssembly yet, return the assembly of the default
6883 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
6885 * class.c (mono_ldtoken): make it work in dynamic assemblies.
6887 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
6889 * metadata.c, reflection.c: simple speedup to type hash
6892 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
6894 * image.c, image.h, class.c, assembly.c: move module loading
6895 to MonoImage. When loading metadata, consider alignemnet from
6896 the start of metadata, not from the metadata address in memory.
6898 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
6900 * reflection.c (mono_reflection_get_custom_attrs): Added support for
6901 AssemblyBuilder objects. Factored out custom attribute creation into
6902 a separate function.
6903 (create_custom_attr): new function to create custom attributes.
6905 2003-02-12 Miguel de Icaza <miguel@ximian.com>
6907 * Makefile.am: Got tired of typing the full pathname to pedump.
6908 Until there is another option, am installing this.
6910 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
6912 * class.c (class_compute_field_layout): always set field->parent
6913 (mono_ldtoken): use mono_defaults.fieldhandle_class;
6915 2003-02-11 Dick Porter <dick@ximian.com>
6918 * monitor.c: Rewrote Monitor, making lock much faster and
6919 Pulse/Wait work as specified. Also uses much fewer handles, and only
6920 creates them as needed.
6922 * exception.c: Added SynchronizationLockException
6924 * threads.c: Deleted old Monitor implementation. The new one is
6927 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
6929 * class.c: handled TypedReference type code. Set the correct size for
6930 class data. Setup interface_offsets for interface classes, too.
6932 2003-02-09 Martin Baulig <martin@ximian.com>
6934 * debug-mono-symfile.h: Reflect latest symbol writer changes.
6936 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
6938 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
6939 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
6940 * object.c: fixed mono_object_get_virtual_method () for interfaces.
6941 * verify.c: check for code that runs after the end of the method.
6943 2003-02-08 Pedro MartÃnez Juliá <yoros@wanadoo.es>
6945 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
6946 "System.Math::Round2".
6947 * sysmath.h: Added Floor, Round and Round2 definitions.
6948 * sysmath.c: Modified certain functions that were not 100% compliant
6949 with MS.NET (math precision) and added the implementation of Floor,
6952 2003-02-07 Martin Baulig <martin@ximian.com>
6954 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
6956 2003-02-07 Martin Baulig <martin@ximian.com>
6958 * debug-mono-symfile.c: Reflected latest symwriter changes.
6959 (mono_debug_create_mono_symbol_file): Removed.
6960 (mono_debug_open_mono_symbol_file): Take an argument which
6961 specifies whether to create a dynamic symbol file.
6963 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
6965 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
6967 2003-02-05 Martin Baulig <martin@ximian.com>
6969 * reflection.c (mono_image_build_metadata): Make this public,
6970 protect it against being called multiple times, don't create
6971 resources and don't build the compressed metadata here.
6972 (mono_image_create_pefile): Do this here.
6975 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
6977 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6979 * socket-io.c: fixed bug #36322.
6981 2003-02-06 Piers Haken <piersh@friskit.com>
6985 * debug-mono-symfile.c:
6991 * socket-io.c: warning cleanups
6993 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
6995 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
6996 function. works like remoting invoke, but does a check for the Proxy first.
6998 2003-02-05 Miguel de Icaza <miguel@ximian.com>
7000 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
7002 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
7004 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
7006 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
7007 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
7009 * object.c (mono_store_remote_field_new): used by the new jit
7010 instead of mono_store_remote_field
7011 (mono_load_remote_field_new): used by the new jit
7012 instead of mono_load_remote_field
7014 2003-02-05 Patrik Torstensson
7016 * appdomain.c: changed unload to take the domain id instead
7019 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
7022 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7024 * appdomain.c: don't look for assemblies in ApplicationBase if
7025 PrivateBinPathProbe is set.
7027 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7029 * object.c: make the first argument in main_args contain the absolute
7030 path to the assembly. Fixes bug #37511.
7032 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7034 * icall.c: get correct UTC offset for countries not using daylight
7035 time saving. Fixes bug #30030.
7037 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7039 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
7040 and 1 are the family).
7042 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
7044 * icall.c (ves_icall_InternalExecute): removed wrong assertion
7046 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
7048 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
7050 * reflection.c: added support for SignatureHelper tokens, which is
7051 needed by the Calli opcode.
7053 * reflection.h: track changes to SignatureHelper class.
7055 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
7057 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7059 * appdomain.c: fixed loading assemblies from PrivateBinPath.
7061 2003-02-03 Patrik Torstensson
7062 * appdomain.[c|h], domain.c :
7063 - Added support for getting a domain via domain id
7064 - Support for setting and getting domain from System.AppDomain
7065 (used in cross appdomain channel)
7066 - Added support for get/set for a MonoAppContext on a thread
7067 (Context class in System.Runtime.Remoting.Contexts),
7068 - Removed hack in Get/SetData and ExecuteAssembly.
7070 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
7071 the managed world to get control when a proxy is created.
7073 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
7075 2003-02-03 Miguel de Icaza <miguel@ximian.com>
7078 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
7079 Populate the codebase field as well.
7081 2003-02-02 Martin Baulig <martin@ximian.com>
7083 * debug-mono-symfile.c
7084 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
7085 (mono_debug_symfile_add_method): Allow interncalls.
7087 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7089 * icall.c: throw parse exception if strtod fails or the string is empty.
7091 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
7093 * marshal.c: handle object type separately from defined
7096 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
7098 * marshal.c: handle NATIVE_LPSTR for strings when it's
7099 explicitly specified.
7101 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
7103 * reflection.c, reflection.h, icall.c: setup the reflection
7104 handle cache for ModuleBuilders and AssemblyBuilders.
7106 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
7108 * reflection.c (reflection_methodbuilder_to_mono_method): set
7111 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7113 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
7115 2003-01-29 Dick Porter <dick@ximian.com>
7117 * threads.c: No need for the fake_thread kludge now that Thread
7118 doesn't run a class constructor
7120 2003-01-29 Dick Porter <dick@ximian.com>
7122 * threads.c: Use g_direct_hash instead of the rather bogus
7125 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
7127 * marshal.c (mono_marshal_get_native_wrapper): add check for null
7129 (mono_marshal_get_struct_to_ptr): generate valid IL code
7130 (mono_marshal_get_ptr_to_struct): generate valid IL code
7131 (*): correctly set sig->pinvoke, we need to memdup the signature
7134 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
7136 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
7137 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
7139 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
7141 * profiler.c: provide more callers information.
7143 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
7145 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
7147 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
7149 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
7151 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7153 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
7154 exception instead of going into an infinite loop on dates which it
7157 * string-icalls.c (ves_icall_System_String_get_Chars): raise
7158 out-of-range exception if needed.
7160 * class.c (mono_class_setup_vtable): allow a virtual method to provide
7161 an implementation for an interface method and to override an inherited
7162 method at the same time.
7163 Imagine a scenario when a virtual method is used to override a
7164 virtual abstract method in a parent class, and this same method
7165 provides an implementation for an method inherited from an interface.
7166 In this case, the interface resolution code will set im->slot, which
7167 means that the virtual method override pass will skip this method
7168 which means a pointer to the abstract method inherited from the parent
7169 will remain in the vtable of this non-abstract class.
7171 * class.c: (mono_class_setup_vtable): continue search for a real
7172 method if only an abstract method is found.
7174 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
7176 * reflection.c: add size to encoding for ByValStr and ByValArray
7177 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
7179 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7181 * class.c (mono_class_setup_vtable): pass the override info as an
7184 * class.c (mono_class_setup_vtable): set the slot of overriding methods
7187 * reflection.c (ensure_runtime_vtable); add support for method
7190 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7192 * reflection.c (resolution_scope_from_image): Hack to work to work with
7195 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
7196 added a 'force_ref' argument to force this function to allways return
7197 a TypeRef. This is needed by mono_image_get_memberref_token ().
7199 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7201 * reflection.c (mono_image_get_type_info): interfaces really don't have
7204 * reflection.c (mono_image_basic_init): fill out missing fields of
7207 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
7208 dynamic assemblies. This is required so dynamic assemblies show up in
7209 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
7210 Type::GetType() etc. This is consistent with MS behaviour.
7212 * image.c image.h reflection.c: add newly created classes to the name
7213 cache so mono_class_get () will find them.
7215 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7217 First part of changes to get IKVM.NET running under mono.
7219 * appdomain.h, appdomain.c: added new function
7220 mono_domain_try_type_resolve() which will emit TypeResolve events.
7221 This function will call AppDomain::DoTypeResolve to do the actual work.
7223 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
7224 moved existing code dealing with dynamic tokens to a new function
7225 called mono_reflection_lookup_dynamic_token (). This function will
7226 raise TypeResolve events when appropriate. Since reflection.c is not
7227 part of libmetadata, a new hook function called
7228 mono_lookup_dynamic_token() is added to class.c which will call this.
7230 * assembly.h assembly.c: make the invoke_load_hook function public,
7231 so it can be called for dynamic assemblies.
7233 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
7235 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
7238 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
7239 MonoGHashTable, since it contains pointers to objects which the GC
7242 * assembly.c (search_loaded): remove unused variable.
7244 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
7246 * object.c: fixed issue exposed by gcc-generated IL programs
7247 that use RVA data for pointers.
7249 2003-01-25 Martin Baulig <martin@ximian.com>
7251 * threads.c (start_wrapper): Moved the initialization of
7252 `start_func' above the mono_new_thread_init() call to which we
7253 pass it as argument.
7255 2003-01-24 Martin Baulig <martin@ximian.com>
7257 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
7258 the MonoThread pointer.
7260 2003-01-21 Miguel de Icaza <miguel@ximian.com>
7262 * icall.c: Rename `PowImpl' to Pow.
7264 2003-01-23 Dick Porter <dick@ximian.com>
7266 * threads.c (start_wrapper): Create a Thread object if needed, so
7267 the Main() thread can do the class initialisation in a subthread
7268 that has been set up to allow managed code execution.
7270 Pass the thread ID instead of the MonoThread pointer to the thread
7271 start and attach callbacks. This change is required, because the
7272 jit thread start callback must be called _before_ the Thread
7273 object can be created.
7275 (mono_thread_init): Removed much object creation code that is no
7276 longer needed. No managed code is called from here now.
7278 * object.c (mono_runtime_exec_managed_code): Create a subthread
7279 for Main, and call back to the runtime to use it.
7280 Set the exit code when Main exits.
7282 * gc.c: Make sure domain finalisation happens in a subthread.
7283 Re-enable threaded GC, fixing bug 31333 (again).
7285 * environment.c: System.Environment internall calls (so far just
7286 ExitCode is here, the others are still in icall.c)
7288 * appdomain.c (mono_runtime_cleanup): All threads running managed
7289 code should have finished before mono_runtime_cleanup() is
7290 reached, so no need to clean up threads.
7292 2003-01-22 Martin Baulig <martin@ximian.com>
7294 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
7295 `gpointer func' arguments.
7296 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
7297 but added `MonoThread *thread' argument.
7298 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
7300 * threads.c (mono_new_thread_init): Added `gpointer func' argument
7301 and pass it to the mono_thread_start_cb callback.
7302 (mono_install_thread_callbacks): New public function to install a
7303 set of callbacks which are set by the debugger.
7304 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
7306 2003-01-22 Martin Baulig <martin@ximian.com>
7308 * Makefile.am: Install debug-mono-symfile.h.
7310 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
7312 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
7314 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
7316 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
7317 * class.c (mono_ptr_class_get): correctly set access levels of pointers
7318 (mono_array_class_get): correctly set access levels of arrays
7320 2003-01-20 Patrik Torstensson
7321 * image.h (MonoAssemblyName): changed major, minor, build, revision
7322 from signed to unsigned.
7324 2003-01-20 sean kasun <skasun@azstarnet.com>
7326 * reflection.c (load_cattr_value): Now this handles
7327 MONO_TYPE_SZARRAY. Fixes bug #35629
7329 2003-01-20 Miguel de Icaza <miguel@ximian.com>
7331 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
7334 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7336 * decimal.c: fixed bug #26056.
7338 2003-01-17 Martin Baulig <martin@ximian.com>
7340 * gc.c: Raise an ExecutionEngineException instead of using g_error().
7342 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7345 (mono_get_exception_type_initialization): new function.
7347 * object.c: throw a TypeInitializationException when an exception is
7348 thrown invoking the class constructor.
7350 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7352 * reflection.c: fixed attribute reading.
7354 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7357 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
7358 provided, look for the type in the calling assembly and then in
7359 mscorlib; if the assembly name is provided, only try that one.
7361 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
7363 * object.c: register the vtable before there is a chance it's
7364 queried again recursively.
7366 2003-01-13 Duncan Mak <duncan@ximian.com>
7368 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
7371 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
7373 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
7375 2003-01-11 Martin Baulig <martin@ximian.com>
7377 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
7378 this to 20 for the release.
7380 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
7382 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
7384 * loader.c (mono_method_get_marshal_info): bug fix
7386 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
7387 structures with explicit layout
7389 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
7391 * profiler.c: made the output more readable (and sorted).
7392 Added caller information for the allocation profiler.
7394 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
7396 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
7398 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7400 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
7403 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
7405 * object.c, profiler.h, profiler.c, profiler-private.h:
7406 Added object allocation profiler.
7408 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
7410 * reflection.h, reflection.c: handle global methods.
7411 Compress blob entries.
7413 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
7415 * marshal.c: fix compilation.
7417 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
7419 * loader.c (mono_method_get_marshal_info): impl.
7421 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
7423 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7425 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
7426 for reference types.
7428 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
7430 * loader.c: fixed off by one error in loaded parameter names.
7432 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
7434 * marshal.c (mono_marshal_get_icall_wrapper): like
7435 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
7436 instead of a MonoMethod.
7438 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7440 * decimal.c: fixed bug #36537.
7442 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
7444 * marshal.c: throw a missing method exception if a
7445 P/Invoke method is not found.
7447 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
7449 * icall.c: allow a null this for constructors.
7451 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
7453 * icall.c: raise the proper exceptions if the arguments to the
7454 internal Invoke are incorrect.
7456 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
7458 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
7460 2003-01-03 Martin Baulig <martin@ximian.com>
7462 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
7464 2002-12-31 Martin Baulig <martin@ximian.com>
7466 * debug-mono-symfile.c: Completely rewrote the type section.
7467 Instead of using individual malloc()ed fields, we use one big
7468 continuous memory area and offsets into this area.
7469 See the comments in the source code for details.
7471 2002-12-30 Martin Baulig <martin@ximian.com>
7473 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
7475 2002-12-30 Martin Baulig <martin@ximian.com>
7477 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
7478 line number table in this data blob instead of using an external
7481 2002-12-28 Martin Baulig <martin@ximian.com>
7483 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
7485 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
7487 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
7488 as a boxed return type.
7490 2002-12-21 Miguel de Icaza <miguel@ximian.com>
7493 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
7494 g_build_filename to properly get separators on the filename created.
7496 * object.h: Small change, introduce MonoMarshalByRefObject to
7497 track the layout of that structure in the C# universe as we make
7500 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
7502 * object.c: removed assert to allow static fields on interfaces.
7503 * loader.c: a TypeSpec may be used for any type, not just arrays.
7505 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
7507 * class.c, class.h: added mono_class_array_element_size ().
7508 Ignore static methods in interfaces.
7510 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7512 * threads.c: fixed the build under cygwin.
7514 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
7516 * reflection.c: handle nullref constants. Allocate keys for
7517 reflection handles with the GC.
7519 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
7521 * threads.c, threads.h: added mono_thread_get_abort_signal()
7522 to get a suitable signal for thread abort.
7524 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
7526 * metadata.c: fix handling of ExportedType table.
7528 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7530 * icall.c: added WriteWindowsDebugString internal call.
7532 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7534 * reflection.h: added fields to match C# implementation.
7536 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7538 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
7540 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
7542 * gc.h, gc-internal.h: Rename header for GC internal calls to
7543 gc-internal.h from gc.h as to not clash with Boehm GC having its
7544 header installed as <gc.h> in outside include paths.
7545 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
7546 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
7548 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7550 * icall.c: assign minor, build and revision in FillName.
7552 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
7554 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
7555 Added support for running code generated by Reflection.Emit.
7557 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7559 * appdomain.c: check for NULL argument in LoadFrom.
7561 2002-12-10 Dick Porter <dick@ximian.com>
7563 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
7565 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7567 * appdomain.c: fix buglet when building exe file name. Handle full
7568 assembly name (needed after latest changes to AssemblyName).
7570 (mono_image_close): free some hashtables.
7572 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
7574 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
7575 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
7576 on some systems (redhat 7.3)
7578 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
7580 * threads.c: delete the critical section of a sync block,
7581 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
7583 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
7585 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
7587 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7589 * appdomain.[ch]: handle the assembly preload event to try loading the
7590 assemblies using the paths we have in the current domain.
7592 * assembly.[ch]: created an assembly preload hook that is called to try
7593 loading the assembly by other means that the ones provided here.
7595 * domain.c: initialize the domain search path.
7597 From now on, assemblies (TODO: except corlib and System) are loaded
7598 according to these rules when using mono_assembly_load ():
7600 1. It tries to load the assembly from the ApplicationBase
7601 of the current domain appending .dll and .exe (TODO: have to
7602 try loading from name/name.dll and name/name.exe).
7604 2. It tries the search path specified in PrivateBinPath for the
7605 current domain (if any).
7607 3. Previous behavior.
7609 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
7611 * icall.c: implemented GetInterfaceMap() related icall.
7612 * domain.c, loader.h: load MethodInfo in mono_defaults.
7614 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
7616 * gc.c: disable the finalizer thread for now, untill all the issues
7617 with it are resolved.
7619 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
7621 * string-icalls.c: handle embedded nulls in string ctor when the
7622 length is specified.
7624 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
7626 * class.c: look for explicit interface implementation in parent
7629 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
7631 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
7633 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
7635 * gc.c: protect handles with a critical section.
7637 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7640 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
7641 parameters. If no assembly specified, try getting the type from all
7642 the assemblies in the current domain, else, load the assembly and get
7645 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7647 * marshal.c: applied patch from Aleksey Demakov that fixes
7648 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
7650 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7652 * icall.c: fixed get_location.
7654 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
7656 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
7657 declarations to make it work with older gcc.
7659 * loader.c (mono_get_method): set signature->pinvoke for native calls
7661 2002-11-20 Dick Porter <dick@ximian.com>
7663 * threads.c (mono_thread_init): Set the main thread's handle
7665 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
7667 * gc.c: allow compilation without GC support. Changed to match the
7670 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
7672 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
7674 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
7676 * reflection.c: set a public key token on the core assemblies.
7678 2002-11-18 Dick Porter <dick@ximian.com>
7680 * threads.c: Split out some thread initialisation so that other
7681 files can set the start callback function.
7683 * gc.c: Run finalisers in a separate thread, to avoid stack
7684 overflow. Fixes bug 31333.
7686 * appdomain.c: Set up GC finalisation thread.
7690 * domain.c: Use gc.h macros for GC_malloc
7692 2002-11-15 Dick Porter <dick@ximian.com>
7696 * appdomain.c: Removed mono_runtime_init_with_attach(),
7697 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
7698 merging the extra parameter with the existing function. Removed
7699 unneeded code in mono_thread_attach().
7701 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
7703 * image.c (mono_image_loaded_by_guid): a method to get loaded
7705 (load_metadata_ptrs): we store the guid as string.
7707 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
7709 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
7711 * metadata.c (mono_guid_to_string): imported method form Zoltan
7712 Varga (slightly modified)
7714 * assembly.c (mono_assembly_open): load precompiled code
7716 * loader.h (MonoMethod): we store the method token for use in the
7719 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7721 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
7722 the hook function called when an assembly is loaded.
7724 * domain.c: Modified file.
7725 (mono_domain_assembly_load): removed hash table insertion of assemblies.
7729 2002-11-07 Miguel de Icaza <miguel@ximian.com>
7731 * reflection.c: Map PEFileKind to the value expected by the WinNT
7734 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7736 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
7737 Read until the buffer is filled completely.
7739 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7741 * icall.c: implemented MonoType.InternalGetEvent ().
7743 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7745 * appdomain.c: implemented InitAppDomainSetup. Delayed
7746 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
7749 * assembly.c: base_dir is now an absolute path ending with
7752 * icall.c: modified get_location according to the above changes.
7754 * object.c: init AppDomain.SetupInformation for the default domain after
7755 we have the entry assembly.
7757 * domain.c: when unloading a domain, setup = NULL.
7759 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
7761 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
7763 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
7765 * object.h, object.c: introduced mono_object_get_virtual_method ()
7766 to lookup the method invoked on an object when a callvirt is done on
7768 * icall.c: make MethodInfo::Invoke() always do a virtual call.
7770 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7772 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
7773 current domain when loaded an assembly and failed to load it.
7775 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
7777 2002-10-31 Dick Porter <dick@ximian.com>
7781 * file-io.c: Return the error status in a parameter, as the
7782 GetLastError() value has long since been blown away if we try and
7783 look it up in a subsequent internal call invocation. Delete the
7784 GetLastError() internal call, because it's useless.
7786 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
7788 * class.[ch]: added cast_class to fix bug 29517
7790 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
7792 * marshal.c: create valid IL code in the filter clause:
7793 the new JIT is less forgiving:-)
7795 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7797 * icall.c: removed get_property internal call.
7799 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
7801 * appdomain.h domain.c: Added an ID to appdomains.
7803 * threads.c threads.h icall.c: Implement icall
7804 Thread:GetDomainID(), and remove unused icall
7805 CurrentThreadDomain_internal.
7807 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7809 * icall.c: Don't recurse through the base types in GetConstructor.
7812 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
7814 * mempool.h, mempool.c: added mono_mempool_empty() and
7815 mono_mempool_stats().
7817 2002-10-23 Dick Porter <dick@ximian.com>
7821 * icall.c: Added MonoIO.GetFileType internal call
7823 2002-10-17 Dick Porter <dick@ximian.com>
7825 * appdomain.c (mono_runtime_cleanup): Don't signal the async
7826 delegate semaphore before waiting for all threads to finish,
7827 because new threads can also call async delegates. Fixes bug
7830 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
7831 of 3 seconds, in case another async job is queued. (This part is
7832 needed because the bug fix reintroduced the 3s exit lag.) This
7833 makes the mono_runtime_shutdown flag superfluous.
7835 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
7837 * reflection.c: include ehader size in method section headers.
7838 Really check for suplicated modules entries.
7840 2002-10-17 Martin Baulig <martin@gnome.org>
7842 * debug-mono-symfile.c: Added back support for locals.
7844 2002-10-14 Martin Baulig <martin@gnome.org>
7846 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
7849 2002-10-14 Martin Baulig <martin@gnome.org>
7851 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
7852 mono_class_get() instead of looking in the class cache.
7854 2002-10-13 Martin Baulig <martin@gnome.org>
7856 * debug-mono-symfile.c: Set version number to 28, include the
7857 signature in method names.
7859 2002-10-13 Martin Baulig <martin@gnome.org>
7861 * debug-mono-symfile.h: Set version number to 27.
7863 2002-10-11 Martin Baulig <martin@gnome.org>
7865 * gc.c: Don't register/unregister NULL pointers as disappearing links.
7867 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
7869 * metadata.c, metadata.h: added helper function to allocate signatures.
7871 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7873 * icall.c: added internal call to get the location of machine.config.
7875 2002-10-08 Martin Baulig <martin@gnome.org>
7877 * debug-mono-symfile.c: Ignore classes with a pending init for the
7880 2002-10-03 Dick Porter <dick@ximian.com>
7882 * threads.c: Freebsd pthread_t is a pointer
7884 2002-10-03 Dick Porter <dick@ximian.com>
7886 * socket-io.c: Implemented GetHostName_internal
7888 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7891 (mono_config_parse_file): don't leak the text.
7893 2002-10-02 Martin Baulig <martin@gnome.org>
7895 * debug-mono-symfile.c: Added support for methods.
7897 2002-10-01 Martin Baulig <martin@gnome.org>
7899 * debug-mono-symfile.c: Don't emit methods and line numbers for
7900 the dynamic symbol file, just write the type table. We can easily
7901 have an external helper program which creates a symbol file for an
7904 2002-10-01 Dick Porter <dick@ximian.com>
7906 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
7907 Only add the handle to the cleanup array when we're about to
7908 launch the thread. Bug 31425 deadlocked when the test was run on
7911 2002-10-01 Martin Baulig <martin@gnome.org>
7913 * debug-mono-symfile.c: Added support for properties.
7915 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
7917 * reflection.c: unaligned store fix from Mark Crichton
7918 <crichton@gimp.org>.
7920 2002-09-27 Martin Baulig <martin@gnome.org>
7922 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
7925 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
7927 * assembly.h, assembly.c: use a sane API to hook into the assembly
7928 loading process instead of a useless special-purpouse hack
7929 (ngen needs a hook, too, for example).
7931 2002-09-27 Dick Porter <dick@ximian.com>
7933 * threads.c (mono_thread_init): Call GetCurrentProcess() so
7934 io-layer can set up some process handle info. Not needed on w32,
7935 but doesn't hurt either.
7937 * process.c: Pass the program name in the second parameter to
7938 CreateProcess, so the path is searched. Include the working
7939 directory. Implemented process name, process enumeration, and some
7940 process detail internal calls.
7942 * icall.c: Added internal calls for process lookup, and some
7945 2002-09-26 Martin Baulig <martin@gnome.org>
7947 * assembly.c (mono_install_open_assembly_hook): New global
7948 function to install a function to be invoked each time a new
7950 (mono_assembly_open): Run this callback function if set.
7952 * debug-mono-symfile.c: Put back line numbers for the dynamic
7953 symbol file and also record the .il file as source file. This
7954 allows us to install the temporary symbol file as `file.dbg' just
7955 like a compiler-generated one.
7957 2002-09-26 Nick Zigarovich <nick@chemlab.org>
7959 * Corrected typo in gc.c (BOHEM vs BOEHM).
7961 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7963 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
7964 GetProperties. Also avoid calling g_slist_length in GetProperties and
7967 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
7969 * reflection.c: avoid unaligned stores (bug spotted by
7970 Mark Crichton <crichton@gimp.org>).
7972 2002-09-25 Martin Baulig <martin@gnome.org>
7974 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
7975 instead of guint64 for addresses and added prologue/epilogue info.
7977 2002-09-25 Martin Baulig <martin@gnome.org>
7979 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
7980 store line number info. For the dynamic symbol file, we only need
7981 to provide the JIT generated dynamic line number info for the dynamic
7984 2002-09-25 Martin Baulig <martin@gnome.org>
7986 * debug-mono-symfile.h: Incremented version number.
7988 2002-09-24 Martin Baulig <martin@gnome.org>
7990 * class.c (mono_debugger_class_init_func): New global function
7992 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
7995 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
7996 function. This is called via the mono_debugger_class_init_func
7997 hook to add all types to the dynamic type table.
7998 (ves_icall_MonoDebugger_GetType): New interncall to get a class
7999 from its metadata token.
8001 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
8002 New interncall for the debugger.
8004 2002-09-24 Nick Drochak <ndrochak@gol.com>
8006 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
8007 before using it in case it is null.
8009 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8011 * metadata.c: allow custom modifiers in local var signatures
8012 (bug spotted by Zoltan Varga).
8014 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
8016 * class.c: deal with the <Module> class that may have a NULL vtable.
8019 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8021 * image.c, image.h: more strong name helpers.
8022 * monosn.c: more work: convert pem keys to cryptoapi format.
8024 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
8026 * string-icalls.c: speedup IndexOf.
8028 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8030 * icall.c: updates from Zoltan.2.Varga@nokia.com.
8032 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8034 * icall.c: cleanup: use mono_object_domain ().
8036 2002-09-23 Martin Baulig <martin@gnome.org>
8038 * debug-mono-symfile.c: Improved type support.
8040 2002-09-22 Martin Baulig <martin@gnome.org>
8042 * debug-mono-symfile.c: Added support for reference types and strings.
8044 2002-09-22 Martin Baulig <martin@gnome.org>
8046 * debug-mono-symfile.c: Started to work on the type table.
8048 2002-09-21 Martin Baulig <martin@gnome.org>
8050 * debug-mono-symfile.c: Largely reworked the symbol table format.
8051 The symbol table is now incrementally updated each time a new
8052 method is added. We're now also using our own magic and version
8053 so that you don't need to recompile all your classes if the
8054 dynamic table changes.
8055 (mono_debug_update_mono_symbol_file): Removed.
8056 (mono_debug_symfile_add_method): New function to add a method.
8058 2002-09-21 Martin Baulig <martin@gnome.org>
8061 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
8064 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
8065 New interncall to get a method from its metadata token.
8067 2002-09-21 Martin Baulig <martin@gnome.org>
8069 * debug-mono-symfile.c: Create type table.
8071 2002-09-20 Martin Baulig <martin@gnome.org>
8073 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
8075 2002-09-20 Martin Baulig <martin@gnome.org>
8077 * debug-mono-symfile.c: Provide information about params and locals.
8079 2002-09-20 Martin Baulig <martin@gnome.org>
8081 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
8084 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
8085 interncall to get a method from its metadata token.
8087 2002-09-20 Martin Baulig <martin@gnome.org>
8089 * debug-mono-symfile.c: Added a few checks for method->header
8090 being non-NULL. This should never happen, but for the moment
8091 let's use a g_warning() rather than a g_assert().
8093 2002-09-19 Mark Crichton <crichton@gimp.org>
8095 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
8096 even if support for it isn't present. Added an #ifdef to fix this.
8098 * socket-io.c: Added checks back for Solaris support.
8100 2002-09-19 Martin Baulig <martin@gnome.org>
8102 * debug-mono-symfile.c (read_string, write_string): Reflect latest
8103 changes in the symbol file format.
8105 2002-09-18 Martin Baulig <martin@gnome.org>
8107 * debug-mono-symfile.c: Set version number to 21.
8109 2002-09-18 Dick Porter <dick@ximian.com>
8111 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
8112 on netbsd. Fixes bug 30051.
8114 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8117 (set_version_from_string): little fix.
8119 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8121 * monosn.c, Makefile.am: added strong name utility.
8122 * reflection.h, reflection.c: implemented delayed signing,
8123 locale, version and hash id assembly attributes.
8125 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
8127 * loader.c, metadata.c: load param attributes in signatures.
8129 2002-09-16 Martin Baulig <martin@gnome.org>
8131 * debug-mono-symfile.c: Added string table with all method names.
8133 2002-09-14 Martin Baulig <martin@gnome.org>
8135 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
8138 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8140 * reflection.c: record the public key token of referenced assemblies.
8142 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8144 * image.c, image.h: added functions to get the strong name and the
8145 public key of an assembly.
8146 * pedump.c: use them.
8148 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
8150 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
8152 2002-09-12 Miguel de Icaza <miguel@ximian.com>
8154 * marshal.c (mono_marshal_get_managed_wrapper): Added
8157 2002-09-11 Martin Baulig <martin@gnome.org>
8159 * gc.c: Call GC_unregister_disappearing_link() on all links when
8160 finalizing them, this is necessary to aviod a crash in boehm's
8163 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8165 * gc.c: handle GetTarget for finalized objects spotted and fixed by
8168 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
8170 * icall.c: implemented MonoType::Module.
8171 * reflection.c, reflection.h: mono_module_get_object () from
8172 Tomi Pakarinen <tomi.pakarinen@welho.com>.
8174 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
8176 * icall.c: ignore overridden methods in GetMethods ().
8177 Fix for FieldInfo::SetValue().
8178 * object.c: handle float/double in runtime invoke.
8180 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8182 * object.c: allow a constructor to be called again on an object.
8184 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8186 * class.h, class.c: move field layout code to it's own function and
8187 export it. Get an interface id earlier. Move fields in MonoClass
8188 so they are more cache friendly and align the bitfields.
8189 * loader.c: temporary handle get_param_names() for a runtime method.
8190 * reflection.c, reflection.h: more code to handle runtime creation of
8193 2002-09-09 Martin Baulig <martin@gnome.org>
8195 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
8196 signature with the pinvoke field being set for the actual call.
8198 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8200 * icall.c: removed some unused icalls. Start of map of glib charsets
8201 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
8203 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8205 * debug-helpers.c: break infinite loop (found and fixed by
8206 Holger Arnold <harnold@gmx.de>).
8208 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8210 * icall.c: target may be null in create_delegate.
8212 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8214 * marshal.c: handle a boolean return type.
8216 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8218 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
8220 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8222 * gc.c: fix weakreferences.
8224 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
8226 * icall.c: added icall to get default codepage.
8228 2002-09-03 Dick Porter <dick@ximian.com>
8231 * threads.c: Use MonoThread instead of MonoObject where
8234 Store running thread objects in a hash table, so that we have all
8235 the info to hand when waiting for them to finish
8236 (means we don't need OpenThread() any more, so mingw builds should
8237 be fully functional again.)
8240 * object.h: Added thread ID to MonoThread
8242 2002-09-03 Martin Baulig <martin@gnome.org>
8244 * icall.c (System.Reflection.Assembly::get_location): New interncall.
8246 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8248 * icall.c: fixed leak in get_temp_path. Thanks lupus.
8250 2002-09-03 Martin Baulig <martin@gnome.org>
8252 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
8253 argument to store the end address of the disassembled instruction.
8255 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
8256 here from debug-symfile.h.
8257 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
8258 JIT into this struct.
8259 (MonoSymbolFile): Added `char *image_file' field.
8260 (MonoDebugGetMethodFunc): Removed.
8261 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
8262 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
8263 (mono_debug_find_method): New method.
8265 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
8266 create a full symbol file.
8267 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
8268 and static symbol files.
8269 (mono_debug_find_method): The symbol file keeps an internal method hash,
8270 call this to get a MonoDebugMethodInfo from a MonoMethod.
8272 * debug-symfile.[ch]: Removed.
8274 2002-08-29 Miguel de Icaza <miguel@ximian.com>
8276 * image.c (do_mono_image_open): Remove linker version check.
8278 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
8280 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
8281 wrappers for instance methods.
8283 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8285 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
8287 2002-08-28 Dick Porter <dick@ximian.com>
8289 * Makefile.am: Export HOST_CC for w32 builds
8291 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8293 * file-io.c process.c: MonoString are null terminated, no
8294 need for mono_string_to_utf16() anymore.
8296 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8298 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
8300 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
8302 * icall.c, reflection.h: speedup System.MonoType.
8304 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
8306 * reflection.c: allow null as the value of a string argument in
8307 custom attributes constructors.
8309 2002-08-27 Martin Baulig <martin@gnome.org>
8311 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
8312 `trampoline_address' field.
8314 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
8316 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
8317 check (fixes bug #29486)
8319 2002-08-27 Martin Baulig <martin@gnome.org>
8321 * debug-mono-symfile.c: Changed the file format in a way that allows us
8322 open it read-only and to use a specially malloced area for all the
8323 dynamic data. We can now also generate a symbol file on-the-fly if we're
8324 debugging IL code and there is no MCS generated symbol file for it.
8326 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
8328 * object.c: added a define for a good string and array
8329 creation speedup (not enabled by default because we need to deal with
8332 2002-08-26 Martin Baulig <martin@gnome.org>
8334 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
8335 function to create a dynamic symbol file. This is used by the
8336 debugger to create a symbol file for IL code on-the-fly.
8338 2002-08-26 Martin Baulig <martin@gnome.org>
8340 * loader.c (mono_lookup_pinvoke_call): Include the error message
8341 from g_module_error() in the error message.
8343 2002-08-24 Martin Baulig <martin@gnome.org>
8345 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
8346 function to update the symbol file. The symbol file is mmap()ed
8347 writable, but private. This allows us to install the symbol file
8348 together with the assembly.
8350 2002-08-24 Martin Baulig <martin@gnome.org>
8352 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
8353 but they can read the new symbol file format which mcs is now creating.
8355 * debug-symfile.c (mono_debug_find_source_location): Moved to
8356 debug-mono-symfile.c; this is now operating on the new symbol file.
8358 2002-08-23 Martin Baulig <martin@gnome.org>
8360 * debug-helpers.c (mono_method_desc_from_method): New function to get
8361 a MonoMethodDesc from a MonoMethod.
8363 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8365 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
8366 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
8368 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
8370 * string-icalls.[ch]: make helper methods static.
8372 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8374 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
8375 types to it and to SetValueInternal.
8377 * object.c: Moved handle_enum label to its proper place. This was the
8380 This time i compiled mcs and gtk-sharp and they both work.
8382 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8384 * icall.c: reverted partially my previous patch until
8385 object.c:set_value handles enums correcly.
8387 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8390 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
8391 (ves_icall_System_Environment_get_MachineName): removed warning when
8392 compiling under cygwin.
8394 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8396 * object.c: fixed field_get_value() for reference types.
8398 2002-08-22 Dick Porter <dick@ximian.com>
8400 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
8401 Don't free a buffer while it's still needed. Patch from Jonathan
8402 Liger <Jonathan.liger@wanadoo.fr>
8404 2002-08-21 Miguel de Icaza <miguel@ximian.com>
8406 * icall.c (ves_icall_System_Environment_get_Platform): Add new
8409 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
8411 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
8412 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
8414 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
8415 we call unmanaged code which throws exceptions.
8417 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8419 * appdomain.h: added per-domain entry_assembly.
8420 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
8422 * icall.c: Assembly::GetEntryAssembly icall.
8423 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
8424 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
8426 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8428 * appdomain.h, gc.c: added mono_domain_finalize ().
8430 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8433 (mono_print_unhandled_exception): changed g_warning by g_printerr
8434 because g_log has a 1024 characters limit (yeah, i got a big stack
8435 trace). Don't print exception name, that should be in ToString
8438 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8440 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
8441 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
8443 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8446 (mono_print_unhandled_exception): after previous commit, i realized
8447 that MS calls ToString on the exception. I changed this function to
8448 do that. This way we get stack_trace for free.
8450 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8453 (mono_print_unhandled_exception): invoke Message property instead of
8454 getting 'message' field from Exception. Don't allocate memory for
8455 'trace' and 'message' if not needed.
8457 2002-08-18 Dick Porter <dick@ximian.com>
8459 * unicode.c: Fix asserts to match Encoder.cs checks
8461 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8463 * marshal.c: fix unaligned store issue and a few wrong
8464 opcode argument types.
8466 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8468 * icall.c: added GetUninitializedObjectInternal internal call.
8470 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
8472 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
8473 to the right domain.
8475 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
8477 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
8479 * class.c (class_compute_field_layout): set blittable to false for Strings
8481 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
8483 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8485 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
8486 first chunk of code to create types at runtime. Code to
8487 handle ReflectedType/DeclaringType. Make reflection handles
8490 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
8492 * class.c: set correct name in arrays.
8494 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
8496 * appdomain.c (mono_domain_transfer_object): make it work with
8497 valuetypes. bug fixes.
8499 2002-08-12 Dick Porter <dick@ximian.com>
8501 * object.h: Rename some parameters to avoid c++ keywords (Patch
8502 from Joseph Wenninger <kde@jowenn.at>)
8504 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
8506 * icall.c: added icall to implement Assembly.GetFile*.
8508 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8510 * reflection.h, reflection.c: code to embed managed resources.
8512 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8514 * class.c: move all the type size stuff into
8515 class_compute_field_layout().
8517 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8519 * class.c: ensure enums have always the correct instance size.
8520 * unicode.c: remove wrong assert.
8522 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
8524 * assembly.c: fix mem corruption issue.
8525 * image.h, image.c: added mono_image_get_resource () to access
8527 * icall.c: implemented Assembly.EntryPoint property and some
8528 Managed Resources related internalcalls.
8531 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
8533 * image.c, image.h: impemented mono_image_get_entry_point ().
8534 * appdomain.c: use mono_image_get_entry_point.
8536 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8538 * reflection.c: support the object type argument when loading
8541 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
8543 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
8544 String as return type.
8546 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
8548 * reflection.c: fix encoding of named args for custom attrs to match
8549 the ms implementation. Read them back when instantiating custom
8552 2002-08-02 Radek Doulik <rodo@ximian.com>
8554 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
8555 by Dietmar as quick fix
8556 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
8557 16 as stack size, used on more places as quick fix before Dietmar
8558 will fix it properly
8560 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8562 * object.h, object.c: added accessors for fields and properties.
8564 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8566 * class.c, class.h: made mono_class_get_field_from_name ()
8567 loop on parent types.
8568 Added mono_class_get_property_from_name ().
8570 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8572 * class.c, class.h: move the code to setup the type vtable in its own
8573 function so that it can be reused also for types created at runtime.
8574 Eliminate the "class" identifier from the header file.
8575 * reflection.c: setup the vtable for enums so that we can create
8576 objects for use in SetConstant ().
8578 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
8580 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
8581 instead of the delegate itself as this pointer (bug #28383)
8583 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
8585 * marshal.c (mono_marshal_get_managed_wrapper): added return type
8588 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8590 * loader.c: don't set the pinvoke bit on icalls.
8592 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
8594 * debug-helpers.c (mono_method_full_name): only print a number to
8595 indicate wrapper type (so that the output is more readable in traces).
8597 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
8599 * class.c (mono_class_init): include method override patch from Paolo
8601 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
8603 * icall.c: fixed GetTypeCode().
8605 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
8607 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
8608 use real delegate invoke function to make it work with multicast
8609 delegates (fix bug# 28291).
8611 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8613 * object.c: load constant strings.
8615 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8617 * reflection.c: no magic numbers.
8618 * tabledefs.h: security action enum.
8620 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8622 * assembly.c: fix possible memory corruption.
8624 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
8626 * reflection.h, reflection.c: added support for linking resources.
8627 * verify.c: check we have an updated corlib.
8629 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
8631 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
8633 (mono_marshal_string_array): null terminate unmanaged string arrays.
8634 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
8636 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8638 * icall.c: Type.GetType () can now return also types from the
8641 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
8643 * loader.h, loader.c: stack walking support.
8644 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
8647 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
8649 * marshal.c: added optimisations for blittable types
8651 * class.c (mono_array_class_get): do not set blittable attribute on arrays
8652 (mono_class_setup_mono_type): set blittable attribute for single
8655 * marshal.c (mono_string_utf8_to_builder): impl.
8656 (mono_string_builder_to_utf8): impl.
8657 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
8659 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
8661 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
8662 (mono_marshal_get_managed_wrapper): impl. byref types
8664 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8667 (search_method): don't display debug message.
8669 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
8671 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
8673 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
8675 * appdomain.c: set the missing filename when throwing exception.
8677 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
8679 * metadata.c (mono_type_size): code cleanup
8680 (mono_type_stack_size): removed some test code
8682 2002-07-21 Miguel de Icaza <miguel@ximian.com>
8684 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
8685 mono_get_exception_file_not_found now.
8687 * exception.c (mono_exception_from_name_two_strings): New version
8688 that will call a constructor with two string arguments.
8689 (mono_get_exception_file_not_found): New helper routine, used to
8690 report file-not-found errors.
8692 2002-07-20 Dick Porter <dick@ximian.com>
8695 * process.c: Pass file handles to CreateProcess
8699 * file-io.c: Implemented CreatePipe
8701 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
8703 * metadata.c (mono_get_param_info): set alignment for value types
8705 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8707 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
8708 Constify mono_domain_assembly_open().
8709 * loader.c: handle null namespace in icalls.
8711 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
8713 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
8714 (emit_str_to_ptr_conv): marshal object as structs
8716 * metadata.c (mono_type_to_unmanaged): marshal object as structs
8718 * marshal.c (mono_marshal_get_runtime_invoke): support value types
8720 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
8722 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
8723 (mono_marshal_get_native_wrapper): we an now return value types
8725 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8727 * verify.c: more checks implemented.
8729 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
8731 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
8733 (mono_marshal_get_native_wrapper): allow byref arguments
8734 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
8735 impl. PtrToStringXXX methods
8736 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
8737 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
8738 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
8739 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
8740 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
8742 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8744 * reflection.c: fix buglet in parsing an assembly name.
8746 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
8748 * marshal.c (emit_ptr_to_str_conv): first impl.
8750 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
8752 * object.c, class.h: cache the vtable in the class as suggested by
8753 vargaz@freemail.hu (Zoltan Varga).
8755 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8757 * class.h, loader.c: added mono_field_from_token().
8758 * verify.c: first cut of type checking code.
8760 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
8762 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
8764 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
8766 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
8768 (mono_marshal_get_remoting_invoke): impl.
8769 (mono_delegate_begin_invoke): impl.
8770 (mono_mb_emit_save_args): impl.
8771 (mono_delegate_end_invoke): impl.
8772 (mono_marshal_get_delegate_begin_invoke):
8773 (mono_marshal_get_delegate_end_invoke):
8774 (mono_marshal_get_delegate_invoke): generate a special name for
8775 those methods (including the signature) and associate them whith
8778 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
8781 (mono_reflection_type_from_name): now it has a MonoImage parameter
8782 which is used as the default image to search the type in. If the image
8783 is NULL or getting the type from it fails, it defaults to corlib.
8785 * icall.c: changed 1 call to mono_reflection_type_from_name to match
8788 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8790 * reflection.c: update the parameter table index.
8792 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
8794 * domain.c: don't include the mark byte in the string hash.
8796 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
8798 * icall.cs: icall for Type.GetTypeCode ().
8799 * verify: a couple of fixes and disabled local initialization checks.
8801 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
8803 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
8805 * debug-helpers.c (mono_method_full_name): print the type of the
8808 * metadata.c (mono_signature_hash): a hash function for signatures
8809 (mono_signature_hash): better hash algorithm
8811 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
8813 * debug-helpers.c (mono_method_full_name): this can now generate
8814 method names with signatures
8816 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
8817 method dont have this pointers.
8819 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
8821 * reflection.c: fixup typebuilder tokens.
8822 * image.c: fix buglet.
8823 * marshal.h: remove whitespace.
8824 * metadata.h, metadata.c: reinstate code that was removed.
8825 * verify.c: handle catch directives and fix another couple of bugs.
8827 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
8829 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
8830 (mono_marshal_get_native_wrapper): make it comp. with the old code
8831 (mono_marshal_get_native_wrapper): support boolean
8832 (mono_marshal_get_managed_wrapper): support more types
8834 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
8836 * class.c (class_compute_field_layout): compute class->blittable attribute.
8838 2002-07-09 Dick Porter <dick@ximian.com>
8840 * threads.c: Make the thread cleaning up cope with threads that
8843 2002-07-08 Radek Doulik <rodo@ximian.com>
8845 * reflection.c (method_encode_code): use non-translated values to
8846 compute finally_start, this fixes exception handling on ppc, yay!
8848 * decimal.h (struct signscale): fix endianess
8850 2002-07-07 Radek Doulik <rodo@ximian.com>
8852 * reflection.c: swap box_val and not val
8854 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
8856 * reflection.c, reflection.h: handle full assembly info in type name.
8857 Handle Type arguments when loading custom attributes.
8858 * icall.c: updated to use new mono_reflection_type_from_name () method.
8860 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8863 (method_from_memberref): also print assembly name when method not found.
8865 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8868 (ves_icall_TypeGetProperties): fixed bug #27473.
8870 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8872 * reflection.c: display image name and token when cannot find the
8873 .ctor for an attribute.
8875 2002-07-05 Martin Baulig <martin@gnome.org>
8877 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
8879 2002-07-04 Dick Porter <dick@ximian.com>
8881 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
8882 compile on mingw. This will cause mingw builds to not wait for
8883 subthreads to terminate after the main thread does. I've lodged a
8884 bug with the mingw developers for them to wrap OpenThread().
8886 2002-07-03 Dick Porter <dick@ximian.com>
8888 * threads.c: Store thread IDs instead of handles, because
8889 GetCurrentThread() returns a pseudohandle and therefore stores
8890 useless values. mono_thread_cleanup() continues checking the
8891 array of threads until it is empty, to cope with subthreads
8892 spawning new threads after the main thread has finished.
8896 * profiler-private.h: Pass the thread ID to thread profiler
8897 functions, instead of a handle
8899 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8901 * verify.c: fixes to make it more usable.
8902 * pedump.c: added --verify code to verify IL code in an assembly.
8904 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8906 * reflection.c: turn errors into warnings to allow compiling corlib.
8908 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
8910 * reflection.c: add special cases to compile corlib.
8912 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8914 * reflection.c: handle properties with only a set method.
8916 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8918 * opcodes.h: add enum with opcodes in opval order.
8920 2002-07-01 Dick Porter <dick@ximian.com>
8923 * object.c (mono_runtime_run_main): Removed unneeded argument
8925 2002-06-28 Martin Baulig <martin@gnome.org>
8927 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
8929 2002-06-27 Dick Porter <dick@ximian.com>
8931 * threads.c: Store the handle in both the parent thread and in the
8932 subthread, to minimise the time between starting a new thread and
8935 2002-06-26 Dick Porter <dick@ximian.com>
8937 * appdomain.c (mono_runtime_cleanup): Close the socket library
8938 after all the threads have finished, not before
8940 2002-06-26 Martin Baulig <martin@gnome.org>
8942 * debug-symfile.c (mono_debug_find_source_location): Added
8943 `guint32 *line_number' argument. If it's not NULL, store the line number
8944 there and return the file name without the line number.
8946 2002-06-25 Dick Porter <dick@ximian.com>
8950 * process.c: Process forking and other support functions
8952 2002-06-25 Dick Porter <dick@ximian.com>
8954 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
8955 things dont happen when the image is closed.
8956 (mono_image_lookup_resource): Walk the resource section looking
8957 for a particular entry
8959 * cil-coff.h: PE resource section decoding
8961 2002-06-25 Dick Porter <dick@ximian.com>
8965 (mono_assembly_foreach): Accessor functions to walk the list of
8967 (mono_assembly_set_main):
8968 (mono_assembly_get_main): Process methods need to know which
8969 assembly is the "main" one
8971 * object.c (mono_runtime_run_main): Record the main assembly
8973 * debug-helpers.c: Fix typo
8975 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
8977 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
8978 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
8980 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
8982 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
8984 2002-06-21 Miguel de Icaza <miguel@ximian.com>
8986 * image.c (do_mono_image_open): Initialize reference count,
8987 otherwise we leak the MonoImage.
8989 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
8991 * reflection.c: small tweak to handle self-hosting.
8993 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8995 * reflection.c: fix type name parse code.
8997 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8999 * reflection.c: break out of the loop.
9000 * image.c: special case corlib.
9002 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9004 * reflection.c: add all the custom attrs at the end to ensure the
9005 ctors have been properly initialized when the attributes are defined
9006 in the current assembly.
9008 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
9010 * reflection.c: handle correctly multiple-nested types.
9012 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
9014 * row-indexes.h: fix typos.
9015 * reflection.c: adjust for typos and fix method_def_or_ref
9016 encoding in MethodImpl table.
9018 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9020 * reflection.c: fix entry point patching (thanks Serge!).
9022 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
9024 * verify.c: add check for System.Exception
9026 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
9028 * image.c, class.c: minifix for code just c&p'ed.
9029 * reflection.c: warning fix.
9030 * object.h, loader.h, domain.c: load also StringBuilder.
9032 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
9034 * marshal.h, marshal.c: some support code to handle complex marshaling.
9036 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9038 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
9039 Better signatures with vtable error dump.
9041 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
9043 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
9045 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
9047 * icall.c (ves_icall_Type_GetField): impl.
9049 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9051 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
9052 to retrieve a marshal description blob for a field or param.
9054 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
9056 * reflection.h, reflection.c: change order of nested type emission
9057 to avoid table corruption. The NestedTypes table is sorted.
9058 * icall.c: change order of GetConstructor results to workaround mcs bug.
9060 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9062 * reflection.h, reflection.c: handle field and param marshal
9065 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9067 * icall.c, marshal.c marshal.h: more Marshal class implementation.
9069 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9071 * reflection.c: fix call convention.
9073 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9075 * reflection.h, reflection.c: mono_image_get_memberref_token()
9076 takes a type instead of a class, now. Added
9077 mono_image_get_array_token() to create tokens for the special
9078 multi-dim array methods.
9080 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
9082 * assembly.c: handle modules (no assembly table). Split
9083 loading references in its own function.
9084 * class.c: handle moduleref resolution scope.
9085 * image.c, image.h: cache module name in image.
9087 2002-06-07 Martin Baulig <martin@gnome.org>
9089 * reflection.c (mono_image_get_type_info): Only add a class layout entry
9090 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
9092 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9094 * icall.c: more signature fixes that used uint instead of int.
9096 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9098 * reflection.c: fixed signature of field refs.
9100 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9102 * class.c, reflection.c: handle typerefs of nested types
9103 (both on read and when writing files).
9105 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
9107 * icall.c: fix method signatures that tried to workaround the previous
9110 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
9112 * debug-helpers.c: fix typo.
9114 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
9116 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
9117 rewrote the PE/COFF writing code (our programs are understood by the
9120 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
9122 * gc.c, gc.h, icall.c: weakreference support.
9124 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9126 * Makefile.am, mono-config.c: use $(sysconfdir).
9128 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
9130 * icall.c: changed default precision of Double.ToString() to 15.
9131 Fixed memory leak. Unified with Single.ToString.
9133 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
9135 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
9137 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
9139 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
9140 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
9141 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
9144 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9146 * debug-symfile.c, sysmath.c: yet more compilation fixes.
9148 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9150 * reflection.c, socket-io.c: more compilation fixes.
9152 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9154 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
9155 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
9156 unicode.c: warning and compiler compatibility fixes.
9158 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9160 * class.h, metadata.c: fixed warnings/compilation errors.
9162 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9164 * Makefile.am, mono-config.c, mono-config.h: configuration file
9166 * loader.c, loader.h: make Dll mapping configurable at runtime in the
9167 config file. Export methods to insert and lookup mappings.
9169 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
9171 * reflection.c: handle types and boxed objects in custom attr
9174 2002-05-30 Martin Baulig <martin@gnome.org>
9177 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
9179 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
9181 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
9182 to lookup the implmap row for a P/Invoke method.
9183 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
9184 P/Invoke method from the runtime on an as needed basis.
9186 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
9188 * metadata.c (mono_metadata_parse_signature): impl.
9190 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9192 * class.c: handle .pack directive.
9194 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
9196 * object.c: initialize static fields with RVA data.
9198 2002-05-25 Martin Baulig <martin@gnome.org>
9201 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
9203 2002-05-24 Martin Baulig <martin@gnome.org>
9206 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
9207 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
9208 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
9210 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
9212 * object.c: special case string ctros in invoke.
9213 * gc.c: silly whitespace changes.
9215 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
9217 * threadpool.[ch]: impl. a threadpool that can
9218 be used by mint and mono.
9220 2002-05-22 Martin Baulig <martin@gnome.org>
9222 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
9223 The first argument is now a `MonoReflectionModuleBuilder *', the return
9224 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
9225 `methods' field to get the method builder. The `token' argument is the
9228 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
9229 invalid characters instead of g_assert_not_reached()ing. This seems
9230 to be the behaviour of mscorlib.
9232 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
9234 * object.c (mono_runtime_invoke_array): applied patch from Rachel
9235 Hestilow to fix bug #25104
9237 2002-05-21 Martin Baulig <martin@gnome.org>
9239 * debug-symfile.c (mono_debug_find_source_location): New function.
9240 Looks up an IL offset in the line number table and returns the source
9241 location as a string.
9243 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9246 (mono_double_ToStringImpl): changed %f by %g until we have something
9249 2002-05-21 Nick Drochak <ndrochak@gol.com>
9251 * icall.c : Use different name for Math.Pow's icall. Needed to check
9252 parameters first in C#.
9254 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9256 * icall.c, reflection.h: added icall to get info about an event.
9258 2002-05-20 Radek Doulik <rodo@ximian.com>
9260 * object.c (mono_value_box): don't use memcpy for boxing on BIG
9262 (mono_value_box): don't use memcpy for small sizes on
9263 architectures with unaligned access
9265 2002-05-20 Martin Baulig <martin@gnome.org>
9267 * reflection.c (mono_reflection_setup_internal_class): Don't crash
9268 if `tb->parent == NULL'.
9269 (mono_reflection_create_internal_class): New function. This is
9270 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
9273 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
9276 2002-05-19 Martin Baulig <martin@gnome.org>
9278 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
9279 argument to get the length, don't default to the array length.
9281 2002-05-18 Miguel de Icaza <miguel@ximian.com>
9283 * assembly.c (mono_assembly_setrootdir): New function used to
9284 override the MONO_ASSEMBLIES directory.
9286 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9288 * icall.c: ValueType_GetHashCode() initialize local var.
9290 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9292 * reflection.c: sort custom attributes table.
9294 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
9296 * reflection.c: support named args in custom attributes (write support).
9298 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
9300 * reflection.c: fix finally position calculation.
9302 2002-05-15 Radek Doulik <rodo@ximian.com>
9304 * reflection.c: fixed endianess at many places
9306 * icall.c (ves_icall_InitializeArray): comment out debug msg
9308 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
9310 * object.c (mono_unhandled_exception): new function to handle
9311 unhandled exceptions.
9312 (mono_unhandled_exception): call the UnhandledException event.
9313 (mono_runtime_delegate_invoke): impl.
9315 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
9317 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
9318 returns the RVA, not the direct pointer to the data. Handle the case
9319 when the class size is fixed.
9321 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
9323 * reflection.c: fix some endianess issues.
9325 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
9327 * object.c (mono_runtime_invoke): is now able to catch exceptions.
9329 * threads.c (mono_thread_init): added a callback which is invoked
9332 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
9334 * icall.c: make GetHashCode return non-negative values.
9336 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
9338 * object.c, icall.c, gc.c: revert to address-based hashcode.
9340 2002-05-13 Miguel de Icaza <miguel@ximian.com>
9342 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
9344 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9346 * icall.c, class.c: special case <Module>.
9348 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
9350 * icall.c: fix bug in GetNow().
9352 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
9354 * object.c (mono_runtime_class_init): make sure that we call all
9355 static class constructors.
9357 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
9359 * reflection.c: sort methodsemantics table.
9361 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
9363 * reflection.h, reflection.c: honour init locals setting.
9365 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
9367 * icall.c: copied Double ToStringImpl for Single ToStringImpl
9369 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
9371 * reflection.c: support ContructorBuilders in attribute blob creation.
9373 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9375 * reflection.c: some changes to build a binary that can be run
9376 directly in windows.
9378 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
9380 * loader.c: print a big message when an icall can't be found.
9382 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9384 * string-icalls.c: fix bug 24248.
9386 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
9388 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
9389 icall.c, reflection.h: separate assembly loading by pathname and by
9390 assembly name. Use the MONO_PATH env var to search for assemblies.
9392 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9394 * assembly.c, image.h: add some support for assemblies
9395 with multiple modules.
9396 * class.c, class.h: export mono_class_from_typeref().
9397 * loader.c: remove duplicated code and use mono_class_from_typeref(),
9400 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9402 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
9403 documentation says (the ECMA one is correct).
9405 2002-05-02 Dick Porter <dick@ximian.com>
9407 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
9408 Don't name the synchronisation mutex.
9410 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
9413 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
9414 Make the prototypes match.
9415 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
9419 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
9420 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
9421 all systems have tm.tm_zone, so use strftime() with %Z to print
9422 the timezone abreviation into a temp string.
9424 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
9425 rather than mono_array_addr() on a MonoString on Big Endian
9428 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
9430 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
9433 2002-04-30 Dick Porter <dick@ximian.com>
9435 * socket-io.c: Cope with SOCKET being an integer rather than a
9438 * threads.c: Added Thread_free_internal, to deal with thread
9439 handle cleanup. Moved calls to handle_store() and handle_remove()
9440 to start_wrapper(), so each can only be called once. Allocate
9441 synchronisation blocks with GC_malloc(), and use GC finalisation
9442 to close the handles.
9444 * icall.c: added System.Threading.Thread::Thread_free_internal
9446 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9448 * icall.c: support Environment.Exit, CommandLineArgs().
9450 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9452 * object.c, object.h: added mono_runtime_run_main () and
9453 mono_runtime_get_main_args () for use in System.Environment.
9455 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9457 * gc.c: fix thinko, enable actual finalization since the jit is now
9460 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9462 * gc.c, object.c: take into account that an object may be offset wrt the address
9463 returned by GC_malloc().
9465 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
9467 * image.c: handle files without entries in the assembly table (modules).
9469 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
9471 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
9472 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
9473 allowed to be null when it's System.Object class setup.
9475 2002-04-27 Martin Baulig <martin@gnome.org>
9477 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
9478 if `tb->parent == NULL' rather than crashing.
9480 2002-04-28 Nick Drochak <ndrochak@gol.com>
9482 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
9483 calling acos() where asin() should have been called.
9485 2002-04-26 Martin Baulig <martin@gnome.org>
9487 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
9488 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
9489 there's a subdirectory called `System', but we don't want to read that
9490 subdirectory as an assembly.
9492 2002-04-25 Martin Baulig <martin@gnome.org>
9494 * debug-symfile.c: Reflect latest MonoString changes.
9496 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
9498 * rand.c, rand.h: instance method icalls need to have an explicit
9499 this pointer as first argument in the C implementation.
9501 2002-04-25 Nick Drochak <ndrochak@gol.com>
9503 * icall.c: Fix typo in map for GetNonZeroBytes
9505 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
9507 * string-icalls.c : String does now passes unit tests without any
9508 errors, the following changes has been made:
9510 Implemented replace methods.
9511 Renaming of methods to (try) follow the standard.
9512 Fixed compare ordinal
9513 Made all memory allocated directly to function instead of via icall function.
9514 Small performance fix in is_in_array function
9516 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
9518 c (mono_string_Internal_ctor_charp_int_int):
9519 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
9520 sindex < 0, throw ArgumentOutOfRangeException instead of
9521 ArgumentNullException.
9523 Added new check for length == 0, however
9524 I need to make it return String.Empty from the C code.
9526 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
9527 that calculate the length for us here.
9529 (mono_string_Internal_ctor_sbytep_int_int): Replaced
9530 mono_string_new_utf16 with mono_string_new, since value is utf8.
9532 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9534 * object.c: register the object for finalization if needed.
9535 Allocate one more char in the string for the terminating 0 char.
9537 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9539 * class.c, class.h, image.c: check if a type implemenst a destructor.
9540 Use the proper key for array class lookups.
9541 * icall.c: register the icalls in the System.GC class.
9542 * gc.c, gc.h: GC-related functions and icalls.
9544 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9548 * unicode.c: free some strings gotten from mono_string_to_utf8 and
9549 changed a couple of free () by g_free ().
9551 * decimal.c: one-liner in the comments for decimal2string ().
9553 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
9555 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
9557 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
9559 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
9560 * object.c (mono_runtime_invoke_array) : handle null in params
9562 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
9564 * string-icalls.c: fixed bug in split (one off bug)
9566 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
9568 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
9569 * icalls.c: added String::Equals as internal method
9571 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
9573 * threads.c: fixed bug in the double interlocked functions
9575 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
9577 * threads.c: implemented all of the new interlocked icalls.
9578 * string-icalls.c: fix a bug in insert.
9579 * icalls.c: added the icalls for interlocked, removed old string functions.
9581 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
9583 * loader.c: fix off-by-one error when reading argument names.
9585 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9587 * profiler.c: win32 counter implementation (untested).
9588 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
9589 (the latter needs testing and more complete impl. from win32 folks).
9591 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
9593 * object.c: mono_array_new_full workaround mono_array_class_get
9596 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
9598 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
9599 * object.h (mono_string_chars): Changed casting type.
9601 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
9603 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
9604 method signatures to use gunichar2 instead of gint16.
9606 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
9608 * object.h, object.c: domain-specific versions of mono_object_new and
9611 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
9613 * object.c: changed String layout
9615 * string-icalls.c (mono_string_Internal_ctor_chara): added
9616 internal string constructors.
9618 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
9620 * threads.c: pass 'this' to the thread start routine.
9622 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9624 * string-icalls.c: fix IndexOf and LastIndexOf. Now
9625 InternalCompareStr don't call twice mono_string_cmp_char for the last
9626 character. Improved performance in mono_string_cmp_char.
9628 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
9630 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
9631 code into its own library: libmonoruntime.
9633 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
9635 * object.h, object.c: changed array format so that szarrays do not
9636 require a bounds structure.
9637 * icall.c, appdomain.c: support for new szarray format.
9639 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
9641 * metadata.c: compare also the retuns type when comparing signatures:
9642 we didn't do this as an optimization since really overloaded methods
9643 must differ also in the arguments, but this doesn't work with
9644 low-level IL code (or when using explicit conversion operators: see
9645 bug#23498 for an example).
9647 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9649 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
9651 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
9653 * icall.c: make MonoType::GetElementType its own icall.
9655 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9657 * icall.c: remove MonoMethod_get_Name().
9658 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
9661 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
9663 * string-icalls.c: optimized a few methods.
9665 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
9667 * icall.c: added all new string internal calls
9668 * string-icalls.c: added, new string internal call implementation.
9669 * object.c: added mono_string_new_size for allocating a string a size
9671 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
9673 * object.c (mono_object_isinst): use the same code as in the
9674 optimized x86 version.
9676 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9678 * profiler.c: TSC-based timer code (faster and more accurate).
9679 Not hooked up in configure, yet (set USE_X86TSC to 1).
9681 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
9683 * profiler.c, profiler.h: track time spent compiling methods.
9684 * threads.c: track thread creation/destruction.
9686 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
9688 * profiler.c, profiler.h, profiler-private.h: profiling interface
9689 and sample implementation. Moved here so that it can be used also by
9692 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
9694 * reflection.c, reflection.h: keep types and other handles separate in
9695 the hash tables for referred tokens. Add guid for modules.
9697 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
9699 * assembly.c: fix bugs found with valgrind.
9700 * metadata.h, metadata.c: added mono_metadata_guid_heap().
9702 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
9704 * threads: added icall support for getting current domain for
9707 2002-04-13 Martin Baulig <martin@gnome.org>
9709 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
9710 (MonoDebugVarInfo): Added `index' field for register based addresses.
9711 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
9712 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
9713 `MonoDebugVarInfo *params' and `guint32 this_offset' with
9714 `MonoDebugVarInfo *this_var'.
9716 * debug-symfile.c (relocate_variable): New static function to write
9717 a location description for a local variable or method parameter.
9719 2002-04-12 Martin Baulig <martin@gnome.org>
9721 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
9722 stack offset and begin/end scope address of a local variable.
9723 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
9724 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
9725 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
9727 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
9728 Added new relocation types for start/end scope of a local variable.
9730 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9732 * object.h: add mono_object_domain() macro.
9733 * reflection.c: handle typespecs.
9734 * icall.c: MonoMethod::get_Name() implementation.
9736 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9738 * icall.c: String::GetHashCode() icall implementation.
9740 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9742 * icall.c: String::IndexOfAny icall.
9743 * object.c, object.h: make array->max_length more useful.
9744 Intrduced mono_object_class() and mono_string_length() macros.
9746 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9748 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
9749 instead of g_unichar_isdigit.
9751 2002-04-11 Nick Drochak <ndrochak@gol.com>
9753 * icall.c: Implement a simple Double.ToString().
9755 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
9757 * appdomain.h: only io-layer.h is supposed to be included.
9758 * icall.c: explicitly import environ. Fix warning.
9760 2002-04-10 Nick Drochak <ndrochak@gol.com>
9762 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
9763 return true even if it's not Daylight Savings time.
9764 Only return false for the case where the function isn't
9765 implemented for a plaform (read Windows).
9767 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9769 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
9772 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
9774 * mempool.c (mono_mempool_alloc): only use g_malloc when
9775 absolutely necessary.
9777 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
9779 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
9781 * class.c (mono_class_vtable): use domain mempool to allocate vtable
9782 (mono_class_proxy_vtable): use domain mempool
9784 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
9786 * appdomain.h, appdomain.c: split initialization that requires the
9787 execution engine support into mono_runtime_init().
9789 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
9791 * class.c (mono_class_init): don't include vtable inside MonoClass
9792 to save some memory, gather some statistics.
9793 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
9795 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
9797 * icall.c: internalcall implementation for ValueType.Equals().
9799 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
9801 * object.c (mono_message_init): moved
9802 (mono_runtime_exec_main): new arch. independent impl.
9803 (mono_runtime_invoke_array): new method - like
9804 mono_runtime_invoke, but you can pass an array of objects.
9805 (mono_remoting_invoke): new arch. independent impl.
9806 (mono_message_invoke): new arch. independent impl.
9807 (mono_runtime_class_init): new arch. independent impl.
9808 (mono_runtime_object_init): new arch. independent impl.
9810 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9812 * metadata.c, object.c, reflection.c: documented the exported
9815 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
9817 * icall.c: simpler code to pass the assembly builder data to corlib.
9818 Implement GetNestedTypes() internalcall.
9820 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
9822 * class.c: warn if a type can't be loaded.
9824 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
9826 * image.h: typedef MonoImageOpenStatus
9827 * types.h: removed unused file
9829 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
9831 * icall.c: Enum_ToObject accepts enum value arguments.
9833 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
9835 * class.c: move initialization of properties, events and nested
9836 classes, so that they happen for interfaces, too.
9838 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
9840 * icall.c: cleanup some ugly casts in Array_SetValue*.
9842 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9844 * icall.c: the values array fro enums is of the correct type, now.
9845 Implement (correctly) getFullName instead of assQualifiedName for
9847 * reflection.h, reflection.c: added mono_type_get_name ().
9849 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9851 * assembly.c, image.h: for each MonoImage, record from wich assembly
9853 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
9854 Make Type.Assembly work.
9856 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
9858 * debug-symfile.h: use char* instead of gpointer to avoid
9861 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
9863 * icall.c (ves_icall_InternalExecute): impl. FielSetter
9864 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
9866 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
9868 * icall.c (mono_message_init): impl. (code cleanup)
9869 (ves_icall_InternalExecute): impl. FieldGetter
9871 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
9872 defined we call all (non-static)methods through the vtable.
9874 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
9876 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
9877 finalizer even though the memory is still referenced (and the chunk of
9878 memory is not freed).
9880 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
9882 * assembly.c: fix brokeness.
9884 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
9886 * class.c: kill some warnings. Check explicit interface method
9887 implementation also without considering the namespace.
9888 Load also literal strings in static class data.
9890 2002-03-29 Miguel de Icaza <miguel@ximian.com>
9892 * assembly.c (default_assembly_name_resolver): Kill memory leak.
9893 (default_assembly_name_resolver): Make the resolver take the
9894 "base" directory where the assembly was originally defined, so we
9895 can load DLLs that are in the same directory as the assembly that
9896 is being referenced.
9898 2002-03-28 Dick Porter <dick@ximian.com>
9904 * unicode.c: Warning cleanups
9906 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
9908 * object.h, reflection.h: use the correct type instead of MonoObject.
9910 2002-03-28 Martin Baulig <martin@gnome.org>
9912 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
9913 (mono_debug_update_symbol_file): Initialize classes if necessary.
9915 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
9917 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
9918 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
9920 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
9922 * assembly.h: fix function prototype.
9923 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
9924 * mono-endian.h: use const cast.
9926 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
9928 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
9930 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
9932 * loader.c: don't assert when a typeref can't be loaded, give
9933 a chance to the runtime to trow an exception instead.
9934 * loader.h: fix warning.
9936 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
9938 * class.c (mono_class_proxy_vtable): added proxy support
9940 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
9942 * icall.c: removed last of PAL calls, added System.Environment
9943 * file-io.h, file-io.c: MonoIO implementation
9944 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
9946 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
9948 * appdomain.c: do not use the byte marker in ldstr table lookup.
9949 * debug-helpers.c: allow two ':' to separate class and method name.
9950 * object.c: allocate arrays bounds with the GC, too.
9951 * verify: add a few more checks.
9953 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
9955 * reflection.c: output also literal strings. Allocate parameter data
9956 with GC_malloc() (thanks, Martin, for catching this!).
9958 2002-03-26 Martin Baulig <martin@gnome.org>
9960 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
9961 include the `this' offset in the `param_offsets'.
9963 2002-03-25 Martin Baulig <martin@gnome.org>
9965 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
9966 mono_debug_get_class() function to get the classes. Added new
9967 relocation types for arrays and strings.
9968 (mono_debug_get_class): New static function to search in all
9969 referenced assemblies for a metadata token.
9971 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
9973 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
9975 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
9976 hold gc-allocated objects. Make the string heap a stream like the
9977 others. Removed duplicated code when writing stream info.
9978 Added asserts to catch possible buffer overflows. Set the sorted map
9979 for tables that need sorting. Added some documentation.
9981 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
9983 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
9984 for interned strings and vtables.
9986 2002-03-24 Martin Baulig <martin@gnome.org>
9988 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
9989 it in the array since it was created with g_slist_prepend().
9991 2002-03-24 Martin Baulig <martin@gnome.org>
9993 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
9994 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
9995 (mono_debug_method_from_token): Renamed to
9996 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
9997 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
9999 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
10002 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
10004 2002-03-24 Martin Baulig <martin@gnome.org>
10006 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
10007 (mono_debug_method_from_token): New func.
10009 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
10010 New interncall, calls mono_debug_local_type_from_signature().
10011 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
10012 calls mono_debug_method_from_token().
10014 2002-03-23 Martin Baulig <martin@gnome.org>
10016 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
10017 specifies the number of bytes to be converted, not the array size.
10018 Return the number of chars, not the number of bytes.
10019 (ves_icall_iconv_get_chars): The `byteCount' argument
10020 specifies the number of bytes to be converted, not the array size.
10022 2002-03-23 Martin Baulig <martin@gnome.org>
10024 * reflection.h (MonoReflectionSigHelper): New type.
10026 * reflection.c (mono_reflection_sighelper_get_signature_local),
10027 (mono_reflection_sighelper_get_signature_local): New functions.
10029 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
10030 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
10033 2002-03-23 Martin Baulig <martin@gnome.org>
10035 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
10036 is_writeable is set.
10037 (mono_raw_buffer_update): New function to write the modified map
10040 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
10042 * debug-symfile.c (mono_debug_update_symbol_file): Call
10043 mono_raw_buffer_update() when done writing.
10045 2002-03-23 Martin Baulig <martin@gnome.org>
10047 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
10049 * debug-symfile.c: Added support for arguments and local variables.
10051 2002-03-23 Dick Porter <dick@ximian.com>
10053 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
10054 protected by ifdefs, hence breaking the w32 build.
10056 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10058 * object.c: implement is_interned() the right way.
10060 2002-03-21 Martin Baulig <martin@gnome.org>
10062 * debug-symfile.[ch]: New files to handle debugging information
10063 files. There's also support to dynamically update these symbol
10064 files to include machine dependent information.
10066 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
10068 * threads.c (mono_thread_create): new function to create thread
10071 2002-03-20 Martin Baulig <martin@gnome.org>
10073 * icall.c (ves_icall_InternalInvoke): Create a new object if the
10074 method is a constructor.
10075 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
10076 points to ves_icall_InternalInvoke().
10078 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
10080 * file-io.c: Flush shouldn't throw exceptions.
10082 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
10084 * file-io.c: FileStream flush support; FileSetLength now
10085 restores file pointer.
10087 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
10089 * class.c: set image for pointer classes.
10091 2002/03/19 Nick Drochak <ndrochak@gol.com>
10093 * sysmath.c: Forgot one.
10095 2002-03-18 Miguel de Icaza <miguel@ximian.com>
10097 * sysmath.c: Avoid redefining existing names.
10099 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
10101 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
10102 handled by runtime as icall rather than dllimport from libm.so
10103 * file-io.c, file-io.h: fixed handle argument type.
10105 2002-03-18 Dick Porter <dick@ximian.com>
10107 * reflection.c (mono_image_get_type_info): rename interface to
10108 iface, because of "#define interface struct" on windows.
10110 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
10112 * class.c, class.h: rename and export mono_ptr_class_get().
10113 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
10114 * reflection.c, reflection.h, icall.c: better/saner type name
10115 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
10118 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
10120 * class.c (mono_class_init): removed hardcoded GHC_SLOT
10122 * icall.c (ves_icall_InternalInvoke): impl.
10124 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10126 * reflection.c: output the interface map table, too.
10128 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
10130 * class.c (class_compute_field_layout): separate computation of
10131 static field layout
10133 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
10135 * icall.c: added System.Buffer support.
10136 * file-io.c: moved file icalls from PAL to FileStream.
10138 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
10140 * icall.c (ves_icall_System_Object_GetHashCode): impl.
10142 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
10144 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
10146 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10148 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
10150 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
10152 * debug-helpers.{c,h}: moved here from monograph some useful functions
10153 to locate a method by name/signature in a class or image. Included
10154 also a small and flexible IL disassembler.
10156 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10158 * reflection.c: fixup tokens in methods with small header size, too.
10160 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
10162 * object.c (mono_string_to_utf8): remove assert(!error), instead
10165 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
10167 * icall.c: update to the new mono_Array_class_get interface.
10169 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
10171 * appdomain.c, object.c: Boehm-GC enable.
10172 * icall.c: make get_data_chunk() support split data requests.
10173 Ensure a class is initialized in more cases. Return only the first
10174 property found in GetProperties() or the compiler gets confused.
10175 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
10176 * reflection.h, reflection.c: add fixup mechanism for field and method
10177 tokens. Initialize assembly->typeref in a single place. Output
10178 properties after events. Support custom attributes for events, too.
10179 Typo fix for paramter custom attrs.
10181 2002-03-07 Martin Baulig <martin@gnome.org>
10183 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
10185 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
10187 * class.c (mono_array_class_get): fix. for multi. dim. arrays
10189 2002-03-06 Martin Baulig <martin@gnome.org>
10191 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
10192 non-zero lower bounds. See testcases #F10-#F13.
10194 2002-03-05 Martin Baulig <martin@gnome.org>
10196 * exception.c (mono_get_exception_argument_out_of_range): New exception.
10198 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
10199 ves_icall_System_Array_GetValue(), only calculate the absolute array position
10201 (ves_icall_System_Array_SetValue): Likewise.
10202 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
10203 as argument and does the actual work. This function is used when copying a
10204 multi-dimensional array.
10205 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
10206 now do all the widening conversions of value types.
10207 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
10209 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10211 * class.c: remove some magic numbers and use the smbolic names,
10212 instead. Added init_events() to load event info at class init time.
10213 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
10214 and mono_metadata_methods_from_event().
10215 * reflection.h, reflection.c: added support for writing out the evnets
10216 related information.
10218 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
10220 * reflection.h, icall.c: use a different method (GetInterfaces)
10221 to gather interface info and add isbyref, isprimitive and
10222 ispointer to the ves_icall_get_type_info() return value.
10224 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
10226 * class.h: stared adding support for events.
10227 * icall.c: split find_members implementation. Added debug icall to get
10228 the address of an object.
10229 * reflection.c: handle TypeBuilders in mono_type_get_object().
10231 2002-03-01 Martin Baulig <martin@gnome.org>
10233 * icall.c (ves_icall_System_Array_GetLength): This must throw an
10234 ArgumentOutOfRangeException(), not an ArgumentException().
10235 (ves_icall_System_Array_GetLowerBound): Likewise.
10236 (ves_icall_System_Array_GetValue): Improved argument checking.
10237 (ves_icall_System_Array_SetValue): Improved argument checking.
10239 2002-03-01 Martin Baulig <martin@gnome.org>
10241 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
10242 called with invalid arguments rather than just dying with g_assert().
10243 (ves_icall_System_Array_SetValue): Likewise.
10244 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
10245 raise a NotImplementedException instead.
10246 (ves_icall_System_Array_GetLength): Added argument checking.
10247 (ves_icall_System_Array_GetLowerBound): Added argument checking.
10249 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
10251 * object.h (mono_assert): new macros mono_assert and
10252 mono_assert_not_reached
10254 2002-02-28 Martin Baulig <martin@gnome.org>
10256 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
10257 and "System::String::IsInterned" to "System::String::_IsInterned".
10259 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
10261 * icall.c: remove hacks for typebuilder. Added icall to create a
10262 modified type from a tybebuilder.
10263 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
10264 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
10265 to create a backing MonoClass for a TypeBuilder.
10267 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10269 * class.c, class.h: more refactoring of class init.
10270 Export mono_class_setup_mono_type() and mono_class_setup_parent().
10272 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
10274 * marshal.c, marshal.h: start of marshaling interface.
10276 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
10278 * icall.c: fix order in assembly qualified name icall.
10280 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
10282 * class.c: do not free str, since we store it in the hash table.
10283 * reflection.h: add label field to MonoILExceptionInfo.
10284 * reflection.c: handle references to more than one assembly. Handle
10285 case when there isn't a module created in the assembly.
10287 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
10289 * class.c: Fix typo. Start refactoring of class init code.
10291 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
10293 * appdomain.c: exit with 1 on error.
10294 * class.c: we already have the name in MonoClassField.
10295 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
10296 MonoStreamHeader instead of an offset of image->raw_metadata.
10298 2002-02-26 Miguel de Icaza <miguel@ximian.com>
10300 * appdomain.c (mono_init): Be even more descriptive about the error.
10302 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
10304 * appdomain.c: give the user an informative message when corlib can't
10307 2002-02-26 Martin Baulig <martin@gnome.org>
10309 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
10310 New icall to get the time zone data.
10312 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10314 * reflection.c: set virtual and raw size of section correctly.
10315 * threads.c: transfer domain information to newly created threads.
10317 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
10319 * class.c: when instancing a class in a domain, load the default
10320 vaules for static fields from the constant table. Fix System.Enum to
10322 * icall.c: implement Object::GetType() internalcall. Implemented
10323 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
10324 Fixed checking of binding flags in find_members().
10325 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
10326 * reflection.c: handle enumerations when writing to the constant
10327 table. Use a different object cache for types.
10330 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
10332 * object.c (mono_object_isinst): fix for arrays
10334 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
10336 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
10338 * object.c: don't use mprotect () and fix intern pool hash table
10339 lookup for big endian systems.
10341 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10343 * icall.c: change type_is_subtype_of () signature.
10345 2002-02-21 Mark Crichton <crichton@gimp.org>
10347 * rand.c, rand.h: Added random number generator for
10348 System.Security.Cryptography classes.
10350 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
10352 * icall.c: Added System.Security.Cryptography calls.
10354 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
10356 * class.c, icall.c, metadata.c: better support for pointer types.
10357 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
10358 * reflection.c: Add support for getting custom attrs for properties
10359 and simplify some code.
10361 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10363 * icall.c: change getToken () and add custom attribute GetBlob()helper
10365 * reflection.h: add custom attrs array to the reflection builder structures.
10366 * reflection.c: encode and emit custom attributes for all the relevant
10367 reflection objects. Cache fieldref and methodref tokens. Change
10368 mono_image_create_token() interface to take a MonoDynamicAssembly.
10369 More complete custom attributes decoder. Load custom attributes for
10370 Assembly, Field, Method and Constructor objects, too. Make the
10371 returned array an Attribute[] one, not object[]. Added
10372 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
10373 custom attribute constructor.
10375 2002-02-20 Dick Porter <dick@ximian.com>
10379 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
10380 problem code out for now).
10382 2002-02-19 Radek Doulik <rodo@ximian.com>
10384 * object.c (mono_ldstr): use hash table to avoid multiple swapping
10386 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
10388 * icall.c: register the GetCustomAttributes method.
10389 * object.c, object.h: add mono_string_new_len ().
10390 * reflection.h, reflection.c: added mono_runtime_invoke(),
10391 mono_install_runtime_invoke(). Added
10392 mono_reflection_get_custom_attrs () to load custom attributes and
10393 create the attribute objects.
10395 2002-02-19 Dick Porter <dick@ximian.com>
10396 * threads-dummy-types.c:
10397 * threads-dummy-types.h:
10400 * threads-pthread-types.c:
10401 * threads-pthread-types.h:
10402 * threads-pthread.c:
10403 * threads-pthread.h: Deleted obsolete files
10405 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
10407 * class.c (mono_class_vtable): runtime init the class when we
10408 allocate static class data.
10410 * icall.c (ves_icall_System_Array_SetValue): check for null values.
10412 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
10413 and String - but we will need generic marshalling support in the
10415 (mono_init): set the domain name in a ms compatible way
10417 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
10420 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
10422 * object.c (mono_array_clone): use alloca() instead of g_malloc
10425 * appdomain.c (mono_domain_unload): impl.
10427 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10429 * appdomain.c, object.c: fix intern pool implementation.
10430 * class.c: fix alignment code.
10432 2002-02-16 Radek Doulik <rodo@ximian.com>
10434 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
10435 and s2 > s1, just copy lower bytes to be compatible with little
10436 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
10437 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
10439 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
10440 force big_endian to be 1 for big endian machines
10441 (ves_icall_iconv_new_decoder): ditto
10443 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
10445 * socket-io.c (convert_sockopt_level_and_name): If the system
10446 doesn't define SOL_IP or SOL_TCP, get them by hand using
10447 getprotobyname() and caching the values (because this could be a
10449 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
10450 Use the appropriate struct when the system does support it. Ie,
10451 not all systems have struct ip_mreqn so use struct ip_mreq when
10454 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
10456 * reflection.c: handle finally clauses.
10458 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
10460 * socket-io.c: use g_snprintf() instead of snprintf.
10462 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
10464 * reflection.c (mono_param_get_objects): Cast second argument to
10465 mono_method_get_param_names to a const char** to silence the
10468 * appdomain.c (mono_domain_assembly_open): Put parens around the
10469 truth statement in the for-loop.
10471 * unicode.c (iconv_convert): Got rid of a compiler warning about
10472 int i being unused when the system has a new iconv.
10473 (iconv_get_length): Same.
10475 * image.c (load_class_names): Cast the second argument to
10476 g_hash_table_insert() to char* to hush compiler warnings about the
10478 (mono_image_open): Same here.
10480 * socket-io.c: Don't conditionally include sys/filio.h or
10481 sys/sockio.h here anymore since we now get them from
10482 io-layer/io-layer.h
10483 (inet_pton): If the system doesn't support inet_aton, implement
10484 using inet_addr and also #define INADDR_NONE if it isn't defined
10487 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
10489 * metadata.c, metadata.h: added function to get packing and size info
10491 * reflection.h, reflection.c: handle field RVA data. Save info about
10492 the table layout if needed. Assign typedef indexes to all the types
10493 before dumping the info about them to avoid forward reference problems.
10495 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
10497 * socket-io.c (convert_sockopt_level_and_name): ifdef
10498 SO_ACCEPTCONN because it is not defined on my system (old debian)
10500 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10502 * opcode.c: use stddef.h to get NULL.
10504 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
10506 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
10507 for FIONBIO, FIONREAD and SIOCATMARK.
10508 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
10509 define INADDR_NONE and besides, inet_addr() is deprecated and
10510 should not be used. Use inet_pton() instead - it also has the
10511 added bonus that it can easily handle IPv6 addresses as well.
10512 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
10514 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
10516 * decimal.c: remove _MSC_VER conditional.
10518 2002-02-13 Dick Porter <dick@ximian.com>
10521 * icall.c: Internal calls for Blocking, Select, Shutdown,
10522 GetSocketOption and SetSocketOption
10524 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10526 * assembly.cs: better resolver: use it instead of some kludgy
10529 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
10531 * reflection.c: the best way to speed-up the compiler is to avoid
10534 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
10536 * class.c (mono_class_vtable): changed the object layout
10537 (obj->vtable->class).
10538 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
10540 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10542 * assembly.c: look for assemblies in the assembly dir, too.
10544 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10546 * class.c: fix thinko in mono_class_from_type().
10548 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10550 * exception.h, exception.c: added TypeLoadException.
10551 * object.h, object.c: added mono_array_clone ().
10552 * icall.c: handle throwOnError in AssemblyGetType().
10553 Added Array.Clone().
10554 * opcode.h, opcode.c: use a single value for the opcode val.
10555 Compile fix for non-gcc compilers.
10557 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
10559 * opcodes.c, opcodes.h: export interesting info about opcodes.
10561 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
10563 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
10566 * class.c (class_compute_field_layout): set element_class for enums
10567 (mono_class_create_from_typedef): set element_class for normal classes
10569 * icall.c (ves_icall_System_Enum_get_value): impl.
10571 * class.c (mono_class_create_from_typedef): do not set valuetype
10572 flag for System.ValueType and System.Enum
10574 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
10576 * unicode.c (iconv_convert): fix big endian problem.
10578 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10580 * class.c: add asserts if we are ever going to scribble over memory.
10581 * socket-io.c: not all systems have AF_IRDA defined.
10583 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
10585 * class.c (class_compute_field_layout): do not consider static
10586 fields to compute alignment
10588 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
10590 * appdomain.c (mono_appdomain_get): impl.
10591 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
10593 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
10595 * icall.c: ignore "file://" prefix when loading an assembly.
10597 2002-01-23 Dick Porter <dick@ximian.com>
10601 * Makefile.am: Added socket support
10603 2002-01-23 Miguel de Icaza <miguel@ximian.com>
10605 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
10606 code back. This should return the assemblies that are loaded by
10607 the runtime on behalf of an application domain.
10609 The current implementation is still broken, it just returns every
10610 assembly loaded, but until we get real applications domain this
10613 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
10615 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
10618 2002-01-23 Miguel de Icaza <miguel@ximian.com>
10620 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
10621 the mono_class_from_name lookup.
10622 (ves_icall_get_parameter_info): ditto.
10623 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
10625 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
10627 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
10629 * class.c: load also nested classes on class init.
10630 System.ValueType instance methods gets passed boxed
10631 values, unless methods in derived classed that get a pointer to the
10633 * icall.c: use better name parsing code in GetType().
10634 * image.c, image.h: add mono_image_loaded ().
10635 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
10636 * reflection.c, reflection.h: added mono_reflection_parse_type().
10638 2002-01-22 Veronica De Santis <veron78@interfree.it>
10640 * icall.c : Added mapping of internal calls for Manual and Auto reset events
10641 * threads.c : Added the implementation of internal calls for events
10642 * threads.h : Added prototypes of internal calls for events
10644 2002-01-21 Radek Doulik <rodo@ximian.com>
10646 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
10648 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
10650 * class.c (mono_class_init): set min_align to 1 (instead of 0)
10651 (mono_class_value_size): use min_align
10653 2002-01-20 Dick Porter <dick@ximian.com>
10656 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
10657 so it compiles on w32.
10659 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
10661 * metadata.c (mono_type_stack_size): impl.
10663 * class.c (mono_class_get_field): impl. memberref token
10665 2002-01-16 Veronica De Santis <veron78@@interfree.it>
10667 * icall.h : Added the internal calls mapping for CreateMutex_internal
10668 and ReleaseMutex_internal.
10669 * threads.h : Added the prototype of mutexes internal calls.
10670 * threads.c : Added the implementations of mutexes internal calls.
10672 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
10674 * metaparse.h: removed unused file.
10675 * reflection.c, reflection.h: added stream_data_align () function
10676 to align data in streams and keep stream aligned. Add support for
10677 exception support in method headers.
10679 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
10681 * unicode.c: make iconv_convert () return the number of bytess written
10682 in the output buffer.
10684 2002-01-15 Dick Porter <dick@ximian.com>
10685 * threads.c: Make the runtime's idea of infinite timeouts coincide
10686 with the class library's
10688 Fix a particularly egregious bug in mono_thread_cleanup(). That
10689 code was so utterly bogus it must have been written on a Monday.
10691 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
10693 * reflection.h: add subtypes field to TypeBuilder.
10694 * reflection.c: encode constants for literal fields.
10695 Handle subtypes. Fix user string token (and add a zero byte)
10698 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
10700 * class.c (mono_class_init): bug fix: assign slot numbers for
10703 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10705 * reflection.c: don't try to output a code RVA for abstract methods.
10706 Small fixes for method header format. Output parameter info to the
10707 ParamDef table. Save method overriding info to MethodImpl table.
10708 Fix property support. Allow typedef.extends to be a type in the
10710 * verify.c: fix off-by-one error.
10712 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
10714 * class.c: fix mono_class_from_mono_type () for szarray types.
10715 Remove unused cache check in mono_class_from_type_spec().
10716 * icall.c: *type_from_name () functions handle simple arrays and byref.
10717 * reflection.c: handle byref and szarray types. Handle methods without
10718 body (gets P/Invoke compilation working). Handle types and fields in
10720 * reflection.h: add rank to MonoTypeInfo.
10722 2002-01-10 Dick Porter <dick@ximian.com>
10724 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
10727 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
10729 * icall.c: initialize class in type_from_handle ().
10730 Loop also in parent classes for get_method ().
10731 * reflection.c: properly encode class and valuetype types.
10732 Start on encoding TypeBuilder types. Handle fieldrefs.
10733 Use correct length when registering a user string.
10734 Handle ConstructorBuilder and MonoMethod in get_token ().
10735 Make mono_type_get_object () aware of cached types.
10736 * object.c: back out change to mono_string_new ().
10738 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
10739 * object.c: mono_string_new should return a NULL when the string
10740 passed in is NULL -- not try to deference it.
10742 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
10744 * icall.c: hack to make IsSubType work for TypeBuilders.
10745 * reflection.c: emit constructors before methods.
10746 Retrieve param names in mono_param_get_objects().
10748 2002/01/05 Nick Drochak <ndrochak@gol.com>
10750 * Makefile.am: fix list of headers and sources so automake 1.5
10751 doesn't complain. Removed \# at end of list.
10753 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
10755 * reflection.c: get token for a method ref. Set return type of
10756 constructor to void.
10757 * loader.c: debug message.
10758 * class.c: typo fix.
10760 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
10762 * icall.c: fix array init with rank > 1. FindMembers
10763 loops in parent class as well.
10764 * image.c: do not insert nested types in name cache.
10765 * reflection.c: warning fix.
10766 * reflection.h: add override method (for interface impl).
10768 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
10770 * metadata.c: fix customattr decoding.
10772 2001-12-21 Miguel de Icaza <miguel@ximian.com>
10774 * rawbuffer.cs: Added native Win32 implementation, avoids using
10775 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
10777 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
10779 * class.c: make the low-level routines handle the cache.
10781 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
10783 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
10785 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
10787 * class.c: fix mono_array_element_size() for objects.
10788 * class.h, class.c: add properties to MonoClass and load them
10790 * icall.c: check with isinst() when assigning a value to an array
10791 instead of requiring the classes to match exactly.
10792 Implemented icall for System.Type::GetType().
10793 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
10794 enums. Handle bindingflags when looking for methods and fields.
10795 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
10796 and mono_metadata_methods_from_property().
10797 * reflection.h, reflection.c: added structures for propreties,
10798 parameters and enums. Implemented mono_property_get_object() and
10799 mono_param_get_objects().
10801 2001-12-18 Dick Porter <dick@ximian.com>
10803 * file-io.c: Use mono_string_to_utf16() instead of
10804 mono_string_chars()
10806 * object.c: Added mono_string_to_utf16(), which copies the non
10807 NULL-terminated MonoString into a new double-null-terminated
10810 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
10812 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
10814 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
10816 * file-io.c: raise exceptions if handle is invalid.
10818 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
10820 * assembly.c: yet another check for mscorlib.
10821 * class.c, class.h: load nesting info for classes.
10822 * icall.c: many new functions to support the Reflection classes.
10823 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
10824 * reflection.h, reflection.c: mono_image_create_token(),
10825 mono_assembly_get_object(), mono_type_get_object(),
10826 mono_method_get_object(), mono_field_get_object(): methods to return
10827 objects that parallel the C representation of assemblies, types,
10830 2001-12-11 Dick Porter <dick@ximian.com>
10833 * file-io.c: Internal calls for file IO.
10835 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
10837 * tabledefs.h: missing FileAttributes.
10838 * verify.h, verify.c: use is_valid_string () to simplify and check for
10839 valid strings more correctly. Fix warnings and speeling.
10840 Check more tables: Filed, File, ModuleRef, StandAloneSig.
10841 Check code: branches, maxstack, method calls.
10843 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
10845 * object.c (mono_object_allocate): removed static, so that the jit
10846 can allocate value types.
10848 * icall.c (ves_icall_System_DateTime_GetNow): impl.
10850 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10852 * class.c: init enum types right away and register the
10853 token->MonoClass map in mono_class_create_from_typedef ().
10854 * verify.h, verify.c: first cut of the verifier.
10855 * pedump.c: add --verify switch to verify metadata tables.
10856 * tabledefs.h: add some missing enums.
10858 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
10860 * class.c (mono_install_runtime_class_init): impl.
10861 (mono_class_init): renamed mono_class_metadata_init to
10862 mono_class_init, also removed the metadata_inited flag
10864 * object.c (mono_object_isinst): use faster algorithm
10866 2001-11-30 Radek Doulik <rodo@ximian.com>
10868 * mono-endian.h: reverted last change
10869 added function prototypes
10871 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
10872 add mono-endian.c back
10874 * mono-endian.c: returned back, as Paolo pointed out, it's needed
10875 for unaligned access, I've mistaked it with endianess. I am
10877 (mono_read16): fix reverted endianess
10878 (mono_read64): ditto
10879 (mono_read32): ditto
10881 2001-11-30 Dick Porter <dick@ximian.com>
10883 * exception.c: Implement mono_exception_from_name()
10885 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
10887 * metadata.h, metadata.c: remove params_size and locals_size and their
10888 calculation from the metadata code: they are only usefult to the
10891 2001-11-29 Radek Doulik <rodo@ximian.com>
10893 * object.c (mono_ldstr): swap bytes here, it's probably not the
10894 best place, but works for me now, I'll redo it once I know mono
10895 better, also note that I add PROT_WRITE and don't reset back, also
10896 note that it's only affects big endians, so x86 should be OK
10898 * mono-endian.h (read16): use just glib macros for both endians
10900 * mono-endian.c: removed as glib macros are used in in
10901 mono-endian.h so we don't need to care about endianess for read
10902 macros as glib does that for us already
10904 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
10906 * class.h, class.h: take minimum alignment into consideration so
10907 that the fields of a class remain aligned also when in an array.
10909 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10911 * loader.h, loader.c: add mono_method_get_param_names().
10912 * class.c: 0-init class fields.
10914 2001-11-26 Dick Porter <dick@ximian.com>
10918 * threads.c: New file that handles System.Threading on all platforms
10921 * object.h: Remove the synchronisation struct from MonoObject,
10922 replace it with a pointer that gets initialised on demand
10924 * Makefile.am: Replace all the system-specific threading code with
10925 a single file that uses the new wrapper library
10927 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
10929 * class.c, class.h: add mono_install_trampoline() so that the runtime
10930 can register a function to create a trampoline: removes the ugly
10931 requirement that a runtime needed to export arch_create_jit_trampoline.
10932 * object.h, object.c: added mono_install_handler() so that the runtime
10933 can install an handler for exceptions generated in C code (with
10934 mono_raise_exception()). Added C struct for System.Delegate.
10935 * pedump.c: removed arch_create_jit_trampoline.
10936 * reflection.c: some cleanups to allow registering user strings and
10937 later getting a token for methodrefs and fieldrefs before the assembly
10939 * row-indexes.h: updates and fixes from the new ECMA specs.
10941 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
10943 * class.h, class.c: add enum_basetype field to MonoClass.
10944 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
10945 to get index in the constant table reated to a field, param or
10947 * reflection.h, reflection.c: handle constructors. Set public-key and
10948 version number of the built assembly to 0.
10949 * row-indexes.h: update from new ECMA spec.
10951 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
10953 * class.h, class.c: add a max_interface_id to MonoClass.
10954 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
10955 since it's used to do that. Added mono_type_type_from_obj().
10956 Make GetType() return NULL instead of segfaulting if the type was not
10957 found. Handle simple arrays in assQualifiedName.
10958 * object.h: add a struct to represent an Exception.
10959 * reflection.c: output call convention in method signature.
10960 Add code to support P/Invoke methods and fixed offsets for fields.
10962 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
10964 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
10966 * icall.c: use mono_array_addr instead of array->vector: fixes the
10967 reflection image writing.
10968 * reflection.c: init call convention byte to 0 in method signature.
10969 Encode the property signature. Don't output property-related methods
10970 twice. Really process the properties for a type (don't cast a field to
10971 a property, my mom always told me that).
10972 Fix 64 bit issues in pointer alignment in a different and more
10975 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
10977 * loader.h: Removed type class from MonoDefaults, added monotype
10979 * loader.c: Loaded MonoType, removed loading of Type
10981 * icall.c (my_mono_new_object): Now returns a System.MonoType,
10982 and fills in System.Type._impl with a RuntimeTypeHandle rather
10983 than the actual MonoClass *
10985 (ves_icall_type_from_handle): change from type_class to
10988 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
10991 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
10994 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
10996 (ves_icall_System_Reflection_Assembly_GetType): implemented
10998 (ves_icall_System_MonoType_assQualifiedName): implemented
11000 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
11002 2001-11-09 Miguel de Icaza <miguel@ximian.com>
11004 * assembly.c (mono_assembly_open): Implement a cache for the
11007 (mono_assembly_close): only destroy the assembly when the last
11010 2001-11-09 Dick Porter <dick@ximian.com>
11012 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
11014 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
11016 * class.c (mono_class_metadata_init): bug fix: compute the right slot
11018 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
11020 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
11021 from Martin Weindel.
11022 * object.h: add mono_string_chars ().
11024 2001-11-07 Miguel de Icaza <miguel@ximian.com>
11026 * reflection.c (build_compressed_metadata): Eliminates warnings
11027 and uses 64-bit clean code.
11029 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
11030 (mono_type_equal): Change signature to eliminate warnings.
11032 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
11034 * icall.c, loader.c: remove the internalcall array constructors.
11035 Changes to match the new MonoArray structure.
11036 * object.h, object.c: an array object doesn't allocate an extra
11037 vector. Add mono_array_new_full () to create jagged arrays easily.
11039 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
11041 * metadata.h, metadata.c: add mono_metadata_field_info () to
11042 retreive all the info about a field from vairous tables.
11043 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
11044 * class.h, class.c: augment MonoClassField with more info.
11045 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
11046 policy and load a field's RVA if needed.
11048 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
11050 * class.c (mono_class_metadata_init): create a trampoline for all
11051 virtual functions instead of actually compiling them.
11053 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
11055 * class.h, class.c: include name in MonoClassField.
11056 * class.c: fix fundamental type of System.Object and System.String.
11057 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
11059 * icall.c: remove internalcalls for the Reflection stuff that is now
11061 * loader.c: mono_field_from_memberref () implementation.
11062 * mono-endian.c: thinko (s/struct/union/g).
11063 * object.c, object.h: make the mono_string_* prototypes actually use
11064 MonoString instead of MonoObject.
11065 * reflection.c, reflection.h: updates for changes in the reflection
11066 code in corlib: we use C structures that map to the actual C# classes.
11067 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
11068 fat method header if needed and use the info from the ILGenerator for
11069 methods. Handle fields in types. Misc fixes.
11071 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
11073 * class.c (mono_class_metadata_init): bug fix: always allocate
11074 space for static class data
11076 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
11078 * class.c (mono_compute_relative_numbering): use relative
11079 numbering to support fast runtime type checks.
11081 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
11083 * class.c (mono_class_create_from_typeref): added debugging output
11084 to print class name when MonoDummy is returned instead of real class
11086 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
11088 * class.c (mono_class_metadata_init): interface offset table now
11089 contains pointers into the vtable - this is more efficient for the jit
11091 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
11093 * class.c (mono_class_metadata_init): use a temporary vtable (the
11094 old algorithm only worked for the interpreter, but not for the jit)
11096 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
11098 * loader.c (method_from_memberref): use mono_class_get to get the
11099 class of an array instead of using System.Array directly.
11100 (mono_get_method): also add MEMBERREF methods to the method cache
11101 which usefull for arrays.
11103 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
11105 * pedump.c (arch_compile_method): added to compute vtable entry
11107 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
11108 number of interfaces.
11110 * class.h: merged MonoArrayClass into MonoClass
11112 * class.c (mono_class_create_from_typedef): compute the vtable size and
11113 allocate space to include the vtable inside MonoClass
11114 (mono_class_metadata_init): initialize the vtable
11116 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
11118 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
11119 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
11120 * image.c: endian fixes by Laurent Rioux.
11121 * object.h, object.c: rename MonoStringObject to MonoString and
11122 MonoArrayObject to MonoArray. Change some function names to conform to
11123 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
11124 guint16* as first argument, so don't use char*.
11125 Provide macros to do the interesting things on arrays in a portable way.
11126 * threads-pthread.c: updates for the API changes and #include <sched.h>
11127 (required for sched_yield()).
11128 * icall.c: updates for the API changes above.
11129 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
11130 platforms that need them.
11132 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
11134 * class.c: set the correct type for all the fundamental
11135 type when loading the class.
11137 2001-10-05 Dick Porter <dick@ximian.com>
11139 * threads-pthread.c (pthread_mutex_timedlock): Simple
11140 compatibility version for C libraries that lack this call.
11142 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11144 * class.c: MonoTypes stored in MonoClass are stored as
11145 fundamental MonoTypes when the class represents a
11146 fundamental type (System.Int32, ...).
11147 The TypeHandle return by ldtoken is a MonoType*.
11148 * icall.c: ves_icall_get_data_chunk () write out all the
11149 PE/COFF stuff. Implement ves_icall_define_method (),
11150 ves_icall_set_method_body (), ves_icall_type_from_handle ().
11151 * image.c: properly skip unknown streams.
11152 * loader.h, loader.c: add type_class to mono_defaults.
11153 * metadata.c, metadata.h: export compute_size () as
11154 mono_metadata_compute_size () with a better interface.
11155 Typo and C&P fixes.
11156 * pedump.c: don't try to print the entry point RVA if there is no entry point.
11157 * reflection.c, reflection.h: many cleanups, fixes, output method
11158 signatures and headers, typedef and typeref info, compress the metadata
11159 tables, output all the heap streams, cli header etc.
11160 * row-indexes.h: typo fixes.
11162 2001-10-04 Dick Porter <dick@ximian.com>
11164 * object.h: Add a synchronisation mutex struct to MonoObject
11166 * object.c (mono_new_object): Initialise the object
11167 synchronisation mutexes
11169 * icall.c: System.Threading.Monitor internal calls
11171 * threads-pthread.h:
11172 * threads-pthread.c: System.Threading.Monitor internal calls
11174 * threads-types.h: New file, includes the system-specific thread
11177 * threads-pthread-types.h:
11178 * threads-pthread-types.c: New files, handle pthread-specific
11179 synchronisation types
11181 * threads-dummy-types.h:
11182 * threads-dummy-types.c: New files of dummy support for
11183 thread-specific types
11187 * pedump.c: include mono-endian.h not endian.h
11189 * Makefile.am: More threads files.
11190 Name mono-endian.h not endian.h
11192 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
11194 * Makefile.am, reflection.h, reflection.c: move here the reflection related
11195 stuff and implement a few more bits.
11196 * icall.c: a field needs to be dereferenced twice. Do not use the same
11197 name for two variables in the same scope.
11198 * image.c, image.h: cleanups.
11200 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
11202 * class.c (mono_class_metadata_init): bug fix: compute the right size
11204 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
11206 * icall.c: implemented some of the Reflection internalcalls.
11207 * image.c, image.h: start writing out the PE/COFF image.
11208 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
11209 that does the reverse than decode_blob_size ().
11210 * object.c: use mono_metadata_encode_value (). Move here
11211 temporary implementation of mono_string_to_utf8 ().
11212 * rawbuffer.c: make malloc_map static.
11214 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11216 * metadata.c: fix type comparison for arrays.
11217 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
11218 Added a couple of new classes to monodefaults.
11219 * icall.c: added a couple of Reflection-related internalcalls.
11220 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
11221 Added a byval_arg MonoType to MonoClass.
11223 2001-09-28 Dick Porter <dick@ximian.com>
11226 * threads-pthread.h:
11227 * threads-pthread.c: Implemented internal calls for
11228 LocalDataStoreSlot operations. Applied mutexes around all shared
11229 data. Reworked the thread creation and Start() operations to
11230 avoid a race condition.
11233 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
11235 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
11237 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
11239 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
11241 * class.c, loader.c: warn and return NULL instead of erroring out.
11242 * icall.c: added System.AppDomain::getCurDomain().
11243 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
11245 2001-09-25 Dick Porter <dick@ximian.com>
11247 * threads-pthread.h:
11248 * threads-pthread.c: Implemented timed thread joining and added
11249 System.Threading.Thread::Join_internal internal call
11251 * icall.c: Added System.Threading.Thread::Join_internal internal call
11254 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
11256 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
11258 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
11259 mono_string_intern () to implement the semantics of the ldstr opcode
11260 and the interning of System.Strings.
11261 * icall.c: provide hooks to make String::IsIntern and String::Intern
11264 2001-09-23 Dick Porter <dick@ximian.com>
11267 * threads-dummy.h: New files of dummy threading routines
11269 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
11270 support code based on system specifics
11272 Rename PTHREAD_LIBS to THREAD_LIBS
11274 2001-09-23 Dick Porter <dick@ximian.com>
11276 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
11277 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
11279 (mono_thread_init): Set up a Thread object instance to return when
11280 the main thread calls Thread.CurrentThread
11281 (mono_thread_cleanup): Wait for all subthreads to exit
11283 * icall.c: New internal calls for System.Threading.Thread::Sleep
11284 (including Schedule) and CurrentThread
11286 * threads.h: New file, to insulate thread-specific stuff from the
11289 2001-09-21 Dick Porter <dick@ximian.com>
11291 * threads-pthread.h:
11292 * threads-pthread.c: New file, for handling pthreads-style
11293 threading support. Start() now starts a new thread and executes
11294 the ThreadStart delegate instance.
11296 * icall.c: Added the internalcall for
11297 System.Threading.Thread::Start_internal
11299 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
11301 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
11303 * loader.c: work around the different signatures for delegates
11304 constructors csc generates in compiled code vs the ones compiled in mscorlib.
11306 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
11308 * class.h, class.c: add mono_class_get_field_from_name ().
11309 * *: Fix C comments and other ANSI C issues.
11311 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
11313 * endian.h, assembly.c: fix some endianness issues.
11315 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
11317 * loader.h, load.c: add delegate_class to mono_defaults.
11318 Handle runtime provided methods in mono_get_method ().
11320 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
11322 * loader.c (mono_get_method): use pinvoke for internal call
11324 * icall.c: use pinvoke for internal call
11326 * loader.c (method_from_memberref): set the method name
11328 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
11330 * metadata.c: help the compiler generate better code for
11331 mono_class_from_mono_type ().
11333 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
11335 * class.c (mono_class_metadata_init): delayed computing of the
11336 class size to mono_class_metadata_init ()
11338 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
11340 * class.c, class.h: add an interfaces member to MonoClass.
11341 * image.c, image.h: add assembly_name field to MonoImage
11342 from the assembly table.
11343 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
11345 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
11347 * class.c: Handle Array in mono_class_from_mono_type ().
11348 * metadata.c, pedump.c: some endian fixes.
11350 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
11352 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
11353 * metadata.c: fix small problem introduced with the latest commit.
11355 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
11357 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
11358 We don't need a MonoMetadata pointer anymore to compare signatures in
11359 mono_metadata_signature_equal (), update callers.
11360 Reduced memory usage an number of allocations for MonoMethodHeader and
11361 MonoMethodSignature.
11363 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
11365 * metadata.c: added compare for szarray.
11367 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
11369 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
11370 and add a couple more types to it and mono_defaults. Give an hint on
11371 classes that need implementing in our corlib and are referenced
11374 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
11376 * class.h, class.c: keep track if a class is also an Enum.
11377 * loader.c: Implement a couple more types for use in libffi
11378 marshalling. Gives better diagnostics when failing to dlopen
11379 a library. Set method->klass for P/Invoke methods, too.
11381 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
11383 * class.c, class.h: add a MonoType this_arg to MonoClass that
11384 represents a pointer to an object of the class' type that
11385 can be used by the interpreter and later the type cache.
11386 Add best guess alignment info for valuetype objects.
11388 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
11390 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
11391 into MonoType: one less level of indirection and allocation and
11392 simplifies quite a bit of code. Added cache for MonoTypes that are
11393 used frequently, so that we don't need to allocate them all the time.
11395 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
11397 * class.c (mono_class_create_from_typedef): System.Enum is also a
11398 value type, although it does not derive from System.ValueType
11399 (maybe a bug in the ms compiler?)
11401 * metadata.c (mono_type_size): return the right size for value types
11403 * loader.c (mono_get_method): only initialize method header if not abstract
11405 * class.c (mono_class_from_mono_type): use mono_default values.
11407 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
11409 * *: use MonoClass pointers instead of <type_tokens>
11411 * class.h: new flag: metadata_inited.
11413 * class.c (mono_class_metadata_init): impl.
11414 (mono_class_instance_size): impl.
11415 (mono_class_data_size): impl.
11417 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11419 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
11420 MonoClass now has the name and name_space fields.
11421 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
11422 mono_get_method () takes and optional MonoClass as argument.
11423 Removed mono_typedef_from_name() and added mono_class_token_from_name()
11424 instead that takes advantage of a map from class names to typedef
11425 tokens in MonoImage.
11427 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
11429 * metadata.c: zero is not a valid alignment boundary.
11430 Merge MONO_TYPE_VOID in default decoding code.
11432 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
11434 * image.h: merged MonoMetadata into MonoImage
11436 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
11437 identify the type of elements.
11439 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
11441 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
11442 * cil-coff.h: split MonoMSDOSHeader and add size info.
11443 * image.c: add some consistency checks.
11444 * metadata.c: fix row size computation: one programmer
11445 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
11446 add explanation for the locator routine.
11447 Fix decoding of size in method header.
11449 2001-08-20 Miguel de Icaza <miguel@ximian.com>
11451 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
11452 (g_concat_dir_and_file): Bring g_concat_dir_and_file
11453 function from gnome-libs. This uses the right path separator
11454 based on the OS, and also works around a bug in some systems where
11455 a double slash is not allowed.
11456 (default_assembly_name_resolver): Use g_concat_dir_and_file
11457 (mono_assembly_open): ditto.
11459 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
11461 * metadata.c (mono_metadata_signature_equal): impl.
11463 * *: void is now a realy MonoType (instead of using NULL)
11465 * metadata.c (do_mono_metadata_parse_type): use
11466 mono_metadata_parse_type to parse void value.
11468 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
11470 * metadata.c, metadata.h: in the signature and method header store
11471 only the space required for holding the loca vars and incoming arguments.
11473 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
11475 * metadata.c (do_mono_metadata_parse_type): treat void like any
11476 other type (instead of assigning NULL);
11478 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
11480 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
11482 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
11484 * image.c (do_mono_image_open): added a cache for arrays.
11486 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
11488 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
11489 decode a single column from a row in a metadata table and changes
11490 to take advantage of it in the typedef locator (gives a nice speed up).
11491 Store offset info for function params.
11493 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
11495 * image.h (MONO_IMAGE_IS_CORLIB): removed
11497 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
11499 * assembly.c: how could mono_assembly_close () had ever worked?
11500 * metadata.c, metadata.h: provide offset info for local vars.
11501 Implement mono_type_size () to take care of alignment as well
11502 as size (it was mono_field_type_size in cli/class.c before).
11504 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
11506 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
11508 * assembly.h (CORLIB_NAME): set to corlib.dll
11510 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
11512 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
11514 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
11515 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
11516 tokentype.h: massive namespace cleanup.
11518 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
11520 * metadata.h, metadata.c: decode exception clauses when parsing method header.
11522 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
11524 * metadata.c (mono_metadata_free_type): added check for type !=
11525 NULL (void) before calling mono_metadata_free_type()
11527 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
11529 * metadata.h, row_indexes.h: added header with enumerations to use
11530 to index in the columns from tables in metadata and to decode coded
11531 tokens: we should start using this instead of embedding magic numbers
11534 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
11536 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
11537 Move metadata_t info from cli_image_info_t to MonoImage, where
11538 it's easily accessible. Changed all the uses accordingly.
11539 Added the method and class caches to MonoImage.
11540 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
11541 and mono_metadata_decode_value () signature to be more consistent
11542 with the other parse functions (and simplify code). Taken advantage
11543 of zero-length array allocation with GCC. Removed reduntant (and
11544 wrong) MonoFieldType struct and use MonoParam instead. Changed
11545 mono_metadata_parse_field_type () to use common code for parsing.
11546 Added mono_metadata_typedef_from_field () and
11547 mono_metadata_typedef_from_method () to lookup a typedef index from a
11548 field or method token.
11549 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
11551 2001-07-23 Miguel de Icaza <miguel@ximian.com>
11553 * metadata.c (mono_metadata_parse_field_type): Implement.
11554 (do_mono_metadata_parse_type): Split engine from
11555 mono_metadata_parse_type, so that we can create smaller structures
11556 for things that just have one pointer to the MonoType (look at
11559 2001-07-20 Miguel de Icaza <miguel@ximian.com>
11561 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
11562 as Jan Gray found out, it is incorrect.
11564 2001-07-18 Miguel de Icaza <miguel@ximian.com>
11566 * assembly.c: Implement asssembly loading. This loads an image
11567 and loads all the referenced assemblies. Come to think of it, we
11568 could always do lazy loading of the assemblies.
11570 * image.c (mono_image_open): Keep loaded images in a hashtable.
11572 * image.h (MonoImage): Add reference count.
11574 2001-07-17 Miguel de Icaza <miguel@ximian.com>
11576 * assembly.c (mono_assembly_open): Keep track of the file name in
11577 case the assembly has no ASSEMBLY table.
11579 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
11582 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
11584 * metadata.c, metadata.h: decode local vars in method header
11585 parse function. Change callers accordingly.
11587 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
11589 * metadata.h, cil-coff.h: protect against multiple inclusion.
11590 Added some new structures to hold information decoded from metadata:
11591 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
11592 and relevant decoding/free functions.
11593 * metadata.c: implement decoding functions. Add warning for out of bounds
11594 index in mono_metadata_locate(). Implement mono_get_method () to retreive
11595 all the info about a method signature and invocation. Remove check on
11596 uninitialized local var in parse_mh() and fix memory leak.
11598 2001-07-12 Miguel de Icaza <miguel@ximian.com>
11600 * metadata.h: More macros.
11602 * tokentype.h: New file.
11604 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
11606 * assembly.c: added a consistency check and initialize
11607 some structures with g_new0().
11608 * metadata.c: fixed a couple more bugs in table size computation
11609 and add other checks for out-of bound access to metadata.
11611 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
11613 * metatada.c: fix bugs computing table sizes. Spew a
11614 warning when index in string heap is out of bounds.
11616 2001-07-04 Miguel de Icaza <miguel@ximian.com>
11618 * metadata.h: Add a couple of macros to manipulate tokens.
11620 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
11622 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
11623 cli_section_tables).
11625 2001-07-01 Miguel de Icaza <miguel@ximian.com>
11627 * metadata.c (mono_metadata_user_string): New function, provides
11628 access to the UserString heap.
11630 2001-06-27 Miguel de Icaza <miguel@ximian.com>
11632 * metadata.c: Add inline documentation.
11634 2001-06-26 Miguel de Icaza <miguel@ximian.com>
11636 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
11639 2001-06-22 Miguel de Icaza <miguel@ximian.com>
11641 * typeattr.h: New file, TypeAttribute flags.
11643 2001-06-21 Miguel de Icaza <miguel@ximian.com>
11645 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
11646 mono_assembly_ensure_section): Section loading code.
11647 (load_section_tables): Load the sections.
11649 * mono/metadata/metadata.c (mono_metadata_locate_token,
11650 mono_metadata_locate): Functions to locate the information
11651 definition given a token or a table and an index.
11652 (mono_metadata_compute_table_bases): New.
11653 (compute_size): New function to compute the sizes of the various
11656 * mono/metadata/metadata.h: Finish listing the different index
11659 * mono/metadata/pedump.c: Improve to dump new information.
11661 2001-06-19 Miguel de Icaza <miguel@ximian.com>
11663 * mono/metadata/metadata.c: Entered all the tables matching
11666 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2