1 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
3 * object.c (arith_overflow): Fix warning.
5 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
6 calling conventions in method refs. Fixes #65352.
8 * reflection.c: Fix warnings.
10 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
12 * object.c: When allocating an array, we have to throw
13 an overflow exception if any of the lengths are < 0.
15 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
17 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
18 properly. Also move implementation of string array marshalling to
19 managed code. Fixes #42316.
21 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23 * assembly.c: provide more information when loading an assembly fails.
25 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27 * filewatcher.c: don't expect the development fam package to be
30 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
32 * marshal.c: Make a copy of the signature cookie since it will be
35 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
37 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
39 * metadata.c (mono_metadata_free_marshal_spec): New function to free
42 * marshal.c: More refactoring.
44 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
47 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
49 * object.c: In mono_message_invoke, fill the output parameter array after
50 calling the managed method (it was done before the call). This fixes
53 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
55 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
58 2004-09-02 Martin Baulig <martin@ximian.com>
60 * class.c (mono_class_instance_size): Don't allow generic type
61 definitions or open generic instances.
62 (mono_class_array_element_size): If we're a value type, call
63 mono_class_instance_size() on the original class.
65 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
66 handle generic instances.
68 * mono-debug-debugger.c (write_type): Handle generic instances
71 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
73 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
74 the allocation request fails. Fixes #65089.
76 * object.c (mono_runtime_free_method): Do not call mono_free_method.
78 * object.c (mono_runtime_free_method): New function to free a dynamic
81 * marshal.c (mono_delegate_free_ftnptr): New function to free the
84 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
85 with hasthis as dynamic,
87 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
89 * domain.c (mono_jit_info_table_remove): New function to remove an
90 entry from the jit info table.
92 * class-internals.h (MonoMethod): Add 'dynamic' field.
94 * loader.c: Fix warnings.
96 2004-09-01 Martin Baulig <martin@ximian.com>
98 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
99 instead of mono_debugger_lock() because the latter one is a no-op
100 unless running in the debugger.
102 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
104 * class.c (class_compute_field_layout): Classes with auto-layout or
105 reference fields are not blittable.
107 2004-09-01 Dick Porter <dick@ximian.com>
109 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
110 mono_image_get_filename() to get the assembly location.
113 * metadata.h: Fix compile warnings
115 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
117 * class.c (class_compute_field_layout): System.Object is blittable.
119 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
120 as in/out. Fixes #59909.
122 2004-09-01 Martin Baulig <martin@ximian.com>
124 * metadata.h (MONO_TYPE_ISREFERENCE): Call
125 mono_metadata_generic_inst_is_valuetype() if we're a generic
126 instance to check whether our underlying type is a reference type.
128 2004-09-01 Martin Baulig <martin@ximian.com>
130 * metadata.c (mono_type_size): If we're a generic instance, call
131 mono_class_value_size() for value types.
133 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
135 * marshal.c: Implement more custom marshalling functionality. Fixes
138 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
140 * mono-debug.c, debug-mono-symfile.c: add some locking love.
142 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
144 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
146 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
148 * icall.c: Fix some warnings.
150 * threads.c (abort_appdomain_thread): Fix unref errors.
151 (mono_thread_current): Fix THREAD_DEBUG define.
153 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
155 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
157 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
159 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
161 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
164 2004-08-28 Martin Baulig <martin@ximian.com>
167 (mono_metadata_generic_inst_is_valuetype): New public function.
169 * metadata.h (MONO_TYPE_ISSTRUCT): Call
170 mono_metadata_generic_inst_is_valuetype() if we're a generic
171 instance to check whether our underlying type is a valuetype.
173 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
175 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
178 2004-08-25 Martin Baulig <martin@ximian.com>
180 * loader.c (mono_get_method_from_token): Abstract methods can also
181 be generic and thus have type parameters.
183 * metadata-internals.h
184 (MonoDynamicImage): Added `GPtrArray *gen_params'.
186 * reflection.c (mono_image_get_generic_param_info): Don't create a
187 metadata row, just add an entry to the `gen_params' array.
188 (build_compressed_metadata): Sort the `gen_params' array and then
189 actually create the metadata.
191 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
193 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
195 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
197 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
199 2004-08-24 Martin Baulig <martin@ximian.com>
201 * class.cs (mono_class_is_subclass_of): Like an interface, a
202 generic instance also derives from System.Object.
204 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
206 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
207 custom modifiers to be in any order. Fixes #61990.
209 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
211 * object.c: Register mono_object_new_fast icall.
213 * object.c (mono_class_get_allocation_ftn): Return to calling
214 mono_object_new_fast, since it seems faster to compute the object
215 size in unmanaged code than passing it as a parameter.
217 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
219 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
220 this function with Boehm as the oom handler, so we don't have to check
221 the result of GC_malloc.
223 * object.c: Remove checks for oom.
225 * object.h object.c (mono_class_get_allocation_ftn): New function to
226 return the icall which can be used to allocate an instance of a given
229 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
231 * class-internals.h: Add 'enabled' field.
233 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
235 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
237 2004-08-18 Jambunathan K <kjambunathan@novell.com>
238 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
241 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
243 * appdomain.c: use the Tls function for appdomain too,
244 at Zoltan's request. Actually return in mono_context_get
246 * appdomain.c, profiler.c, threads.c: use __thread
248 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
250 * appdomain.c threads.c: Call GC_CreateThread on windows.
252 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
253 multiple libraries since this don't work on windows.
255 2004-08-18 Martin Baulig <martin@ximian.com>
258 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
261 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
262 MonoMethodNormal since we also need it for abstract and interface
266 (build_compressed_metadata): Sort the GenericParam table.
267 (mono_image_create_token): Added `gboolean create_methodspec'
268 argument; this is false when generating a MethodImpl token.
269 (reflection_methodbuilder_to_mono_method): Abstract and interface
270 methods may also have generic parameters.
272 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
274 * appdomain.c: thread local alloc
276 2004-08-17 Martin Baulig <martin@ximian.com>
278 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
281 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
284 * class.c (mono_type_get_full_name): New public function.
285 (mono_type_get_name): Don't include the type arguments.
287 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
289 * Makefile.am: Build static versions of libmetadata and libmonoruntime
290 for inclusion into the mono executable.
292 2004-08-16 Martin Baulig <martin@ximian.com>
294 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
295 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
297 2004-08-14 Martin Baulig <martin@ximian.com>
299 * class.c (dup_type): Also copy the `byref' field.
301 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
303 * reflection.c (create_dynamic_mono_image): Revert the last change
304 since it breaks bootstrap.
306 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
308 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
310 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
311 not free them with g_free.
313 2004-08-11 Martin Baulig <martin@ximian.com>
315 * reflection.c (mono_reflection_setup_internal_class): Also call
316 mono_class_setup_mono_type() if we already have a `tb->type.type'.
318 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
320 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
321 called during default (first) AppDomain creation. Keep track of
322 Evidence when loading assemblies.
324 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
326 * opcodes.c, opcodes.h: reduce runtime relocations.
328 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
330 * culture-info.h, locales.c: fixes and chages to sue the new
331 optimized format of the locale data.
332 * culture-info-tables.h: regenerated.
334 2004-08-06 Geoff Norton <gnorton@customerdna.com>
336 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
338 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
340 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
341 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
342 * domain-internals.h: icall declaration.
343 * icall.c: icall registration.
344 * object-internals.h: New fields in MonoAssembly for CAS.
346 2004-08-05 Duncan Mak <duncan@ximian.com>
348 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
351 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
353 * reflection.c: fix to deal with object[] arrays in custom ctors
356 2004-08-05 Martin Baulig <martin@ximian.com>
358 * class.c (mono_class_array_element_size): Added support for
359 generic instances and correctly handle "recursive" types.
361 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
363 * assembly.c: Fix warnings.
365 2004-08-04 Martin Baulig <martin@ximian.com>
368 (mono_type_get_name_recurse): Added `gboolean include_arity'
369 argument specifying whether or not we should include the generic
370 arity in the type name.
371 (_mono_type_get_name): New static function.
372 (mono_class_setup_vtable): If we're a generic instance, don't
373 include the generic arity in the names of explicit method
376 2004-08-03 Martin Baulig <martin@ximian.com>
378 * class.c (mono_type_get_name_recurse): Enclose the generic type
379 arguments in `<', '>'.
381 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
383 * gc.c: make GC warning messages use the trace API, they are just
384 noise to most of the users.
386 2004-08-03 Martin Baulig <martin@ximian.com>
388 * debug-mono-symfile.c (read_string): Correctly read the string.
390 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
392 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
394 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
396 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
398 2004-07-30 Martin Baulig <martin@ximian.com>
400 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
401 Reflect latest symbol writer changes.
403 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
405 * object.c: always create an object if null is passed
406 to Invoke() where a valuetype is expected.
408 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
410 * marshal.c (mono_marshal_init): make managed
411 signatures match native ones better for 64bits.
413 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
415 * appdomain.c: hack to build correctly the private bin path on windows.
418 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
420 * assembly.c: Load mscorlib from the correct framework directory
421 (mono/<version>/mscorlib.dll).
422 * appdomain.h: Added prototypes for new functions.
423 * internals.h: Added some prototypes.
424 * domain.c: When initializing the runtime, get from the executable and
425 the configuration files the runtime version that the app supports.
426 Added support methods for reading app.exe.config. Added list of versions
427 supported by the JIT. Added two new methods: mono_init_from_assembly,
428 which initializes the runtime and determines the required version from
429 the provided exe file, and mono_init_version, which initializes
430 the runtime using the provided version.
431 * icall.c: Get machine.config from version-specific directory.
432 * reflection.c: When generating an image, embed the version number
433 of the current runtime.
435 2004-07-28 Dick Porter <dick@ximian.com>
438 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
439 returned sockaddr size before creating the remote address object.
440 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
443 2004-07-28 Dick Porter <dick@ximian.com>
445 * locales.c (string_invariant_compare_char): Fix invariant char
446 compares between upper and lower cases. Fixes bug 61458.
448 2004-07-27 Ben Maurer <bmaurer@ximain.com>
450 * marshal.c: actually cache stelem.ref wrappers.
452 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
454 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
455 sections and remove the mono_cli_rva_map () function.
457 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
459 * debug-mono-symfile.c: fix one more endianess issue, from a patch
460 by Geoff Norton (<gnorton@customerdna.com>).
462 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
464 * class.c: fix class loads for pointer types (typeof(int) !=
467 2004-07-27 Martin Baulig <martin@ximian.com>
469 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
470 reading the debugging information from an external ".mdb" file.
472 2004-07-24 Martin Baulig <martin@ximian.com>
474 * reflection.c (mono_image_get_type_info): Only write a class
475 layout entry if we actually have a size or a packing size.
477 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
479 * reflection.c (type_get_fully_qualified_name):
480 insert cast to get type checking of ?: with non-gcc compilers
482 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
484 * rand.c: use g_getenv for both lookups of
487 2004-07-17 Martin Baulig <martin@ximian.com>
489 * reflection.c (mono_reflection_bind_generic_method_parameters):
490 Set `gmethod->reflection_info'.
492 2004-07-17 Martin Baulig <martin@ximian.com>
494 * class.c (mono_class_create_from_typedef): Insert the newly
495 created class into the hash table before computing the interfaces
496 since we could be called recursively.
498 2004-07-16 Ben Maurer <bmaurer@ximain.com>
500 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
501 function to implement stelem.ref in managed code
502 * class-internals.h, debug-helpers.c: a new wrapper type
505 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
507 * gc.c: allow GC handles to work even when no GC is compiled in.
508 Fix part of bug #61134 (GetAddrOfPinnedObject).
510 2004-07-13 Peter Williams <peter@newton.cx>
512 * process.c (complete_path): Make sure we don't attempt to execute
515 2004-07-12 Geoff Norton <gnorton@customerdna.com>
517 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
518 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
519 and will add/subtract the hour if needed
521 2004-07-12 Martin Baulig <martin@ximian.com>
523 * reflection.c (mono_field_get_object): If we have
524 `field->generic_info', take the attributes from
525 `field->generic_info->generic_type'.
527 2004-07-12 Martin Baulig <martin@ximian.com>
529 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
530 This function must be called before initializing the runtime.
531 (mono_debug_init_1): New function; call this after initializing
532 the runtime, but before loading the assembly. It tells the
533 debugger to load corlib and the builtin types.
535 * mono-debug-debugger.c: Did some larger changes in the debugging
536 code; support recursive class declarations, make sure we actually
539 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
541 * debug-helpers.c: undo my previous patch and fixed the real issue in
542 ../mini/exceptions-x86.c
544 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
546 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
547 when no HOME env. variable was set and a NullRef was thrown in a .cctor
548 called from other .cctors.
550 2004-07-09 Miguel de Icaza <miguel@ximian.com>
552 * loader.c: Removed the mono_loader_wine_init hack now that we are
553 doing a managed version of Windows.Forms.
555 2004-07-09 Ben Maurer <bmaurer@ximian.com>
557 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
558 threadpool.c, threads.c: remove static data from rootset.
560 2004-07-09 Dick Porter <dick@ximian.com>
562 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
563 Don't do any more processing if the matched length was 0. It was
564 increasing the size of the string before. Fixes bug 61167.
566 2004-07-09 Dick Porter <dick@ximian.com>
570 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
571 Add support for SO_PEERCRED if its available.
573 2004-07-09 Peter Bartok <pbartok@novell.com>
574 * loader.c: winelib.exe.so error message is now only displayed if
575 MONO_DEBUG is set. To help us avoid questions when people are trying
576 out the new Managed.Windows.Forms.
578 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
580 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
581 for isinst and castclass wrappers.
583 * class-internals.h icall.c: Move registration and lookup of JIT icalls
584 to libmetadata from the JIT, so they could be used by the marshalling
585 code and the interpreter.
587 * marshal.c: Register marshalling related JIT icalls here instead of
588 in mini.c. Use CEE_MONO_ICALL instead of the family of
589 CEE_MONO_PROC<x> opcodes to call marshalling functions.
591 * metadata.h: Remove unneeded marshalling conversions.
593 * opcodes.c: Update for new opcodes.
595 2004-07-08 Martin Baulig <martin@ximian.com>
597 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
598 (mono_debug_get_domain_data): Make this function static.
600 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
602 * gc.c, object.h: add nice GC handle API for embedders.
604 2004-07-06 Ben Maurer <bmaurer@ximian.com>
606 * reflection.c: more changes for the new api
608 * object.c: When we reflect on a field w/ a constant value, it
609 will not have a memory location, so we must access metadata. Also,
610 allow easier reading of strings so that we can read them from
613 * class.c (mono_class_layout_fields): no need for literal fields here.
615 * class-internals.h: api changes for const fields
617 * icall.c (ves_icall_get_enum_info): use new apis for const fields
619 2004-07-06 Martin Baulig <martin@ximian.com>
621 * mono-debug.h: Increment version number to 44.
623 * mono-debug.c (mono_debug_add_wrapper): The second argument is
624 now a gpointer, rewrote this whole method.
626 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
627 function. Add information about the wrapper in a new "misc table".
629 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
630 for the new misc table.
632 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
634 * metadata-internals.h image.c: Add a cache for helper signatures.
636 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
638 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
640 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
641 delegates from a delegate. Fixes #61033.
643 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
644 marshalling of stringbuilder arrays. Fixes #59900.
646 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
648 * icall.c: Add EnumBuilder:setup_enum_type icall.
650 2004-06-30 Ben Maurer <bmaurer@ximian.com>
652 * icall.c: Added a new icall for the property version of
655 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
657 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
658 it has a constant size across platforms.
660 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
663 2004-06-29 Martin Baulig <martin@ximian.com>
665 * mono-debug.c (mono_debug_add_method): Protect the whole function
666 in mono_debugger_lock(), not just parts of it.
668 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
670 * reflection.c: make sure padding bytes in heaps are zeroed.
672 2004-06-24 David Waite <mass@akuma.org>
674 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
675 image.c, loader.c, locales.c, marshal.c, metadata.c,
676 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
677 string-icalls.c, threads.c: change to C90-style comments from C99 /
680 2004-06-24 Dick Porter <dick@ximian.com>
683 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
684 return createdNew. Fixes bug 60412.
687 * icall.c: Add createdNew parameter to CreateMutex icall
689 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
691 * reflection.c, object-internals.h: save default value in params.
693 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
695 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
696 no need to build a new path combining that with the application base.
699 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
701 * reflection.c: fixed minor standard compliance issues.
703 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
705 * reflection.c: fixed issue with encoding some custom attributes
706 (arrays in properties and fields, bug #60411).
708 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
710 * reflection.c: fix start address when copying the public key token.
712 2004-06-23 Martin Baulig <martin@ximian.com>
714 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
715 the `exc' object in a static object to put it into the GC's root set.
717 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
719 * reflection.c: make mono_reflection_setup_internal_class ()
720 callable a second time to setup a new parent class.
722 2004-06-23 Dick Porter <dick@ximian.com>
724 * threads.c: Check for WAIT_IO_COMPLETION return values.
726 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
728 * appdomain.c: Removed the g_free on the public key token. Now copy
729 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
730 * assembly.c: Added public key token string value when loading
731 assemblies. Fix bug #60439.
732 * icall.c: Added missing informations (like public key) in
733 GetReferencedAssemblies. Fix #60519.
734 * image.h: Changed definition for public key token from const char*
735 public_tok_value to guchar public_key_token [17];
736 * reflection.c: Updated for changes to public key token.
738 2004-06-22 Lluis Sanchez Gual
740 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
741 for the field in base classes.
743 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
745 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
746 mark headers as not supported, they are installed only for use by the
749 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
751 * *.c, *.h: avoid namespace pollution in public headers.
753 2004-06-21 Martin Baulig <martin@ximian.com>
755 * exception.c (mono_get_exception_security): It's in
756 "System.Security", not in "System".
758 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
759 the exception classes.
761 2004-06-21 Martin Baulig <martin@ximian.com>
763 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
764 Protect the exception object from being finalized.
766 2004-06-21 Martin Baulig <martin@ximian.com>
768 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
771 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
773 * reflection.c: Load the assembly in mono_reflection_type_from_name,
774 if it was not loaded before. Fix parts of #60439.
776 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
778 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
779 code that was broken since Ben's change: wrappers are now
780 dependent on the method signature only again.
782 2004-06-21 Martin Baulig <martin@ximian.com>
784 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
785 added interface support.
787 2004-06-21 Martin Baulig <martin@ximian.com>
789 * class.c (mono_vtable_get_static_field_data): New public method.
791 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
793 * filewatcher.c : Windows build fix to be compliant with API changes.
795 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
797 * class.h, class.c: more accessors.
798 * metadata.h, metadata.c: prepare for hiding MonoType and
799 MonoMethodSignature: people should use the accessors from now on
802 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
804 * *.c, *.h: more API cleanups.
806 2004-06-18 Jackson Harper <jackson@ximian.com>
808 * assembly.c: Trace loading assemblies.
809 * loader.c: Trace loading native libraries.
810 * mono-config.c: Trace loading config files.
812 2004-06-18 Dick Porter <dick@ximian.com>
814 * locales.c: Tell ICU the lengths of strings, it can cope with
815 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
817 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
819 * image.c: swapped name/filename;
821 2004-06-18 Martin Baulig <martin@ximian.com>
823 * mono-debug-debugger.c (write_class): Write the parent class at
824 the end of the header.
826 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
828 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
830 2004-06-17 Raja R Harinath <rharinath@novell.com>
832 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
833 (bundle_obj): New conditional define.
834 (BUILT_SOURCES): Remove.
835 ($(bundle_srcs)): Make parallel-make safe.
836 (libmonoruntime_la_LIBADD): Make unconditional.
837 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
838 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
840 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
842 * culture-info-tables.h: It was inconsistent with the latest
845 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
847 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
850 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
853 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
855 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
856 cleaned up public header threads.h.
858 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
860 * Makefile.am, *.c, *.h: more API cleanups.
862 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
864 * Makefile.am: removed monosn from compilation.
865 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
866 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
867 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
868 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
869 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
870 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
872 2004-06-15 Jackson Harper <jackson@ximian.com>
874 * assembly.c: Make locales lower case when searching the GAC for
875 assemblies. gacutil will always make locales lowercase when
876 installing so this effectively makes them case insensitive.
878 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
880 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
881 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
882 parameter which allows to choose whether the wait can be interrupted or
883 not. Also added the method mono_monitor_enter(), which locks the monitor
884 using an infinite wait and without allowing interruption.
885 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
887 * object.h: Added new fields in MonoThread. suspend_event holds the event
888 used to susped/resume the thread. synch_lock is the lock object to use for
889 modifying the thread state.
890 * threads.c: Use the new synch_lock object for locking, instead of "this",
891 which can generate deadlocks.
892 Moved thread state change in Thread.Sleep and Thread.Join from managed
893 to unmanaged code. This avoids a deadlock when the thread was suspended
894 just after acquiring the thread lock.
895 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
896 Implemented Thread.Suspend using an event instead of ThreadSuspend,
897 which is not fully implemented in the io-layer.
898 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
900 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
902 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
903 threads-types.h: more API cleanups.
905 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
907 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
908 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
909 threadpool.c, threads.c: first pass at the exported API cleanup.
911 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
913 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
915 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
917 * icall.c: added internalGetHome.
919 2004-06-14 Dick Porter <dick@ximian.com>
921 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
922 possible to return successfully when '.' or '..' were the only
923 entries in a directory, but were skipped. The MonoIOStat was not
924 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
927 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
929 * reflection.c: make binaries run on .Net 1.1 by default.
931 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
933 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
935 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
937 * marshal.c: keep track of struct size with explicit layout
940 2004-06-12 Martin Baulig <martin@ximian.com>
942 * mono-debug-debugger.c: Comment out a debugging g_message().
944 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
946 * reflection.c, reflection.h: do not free custom attrs that are cached.
947 * icall.c: use braces to make code clearer.
949 2004-06-11 Martin Baulig <martin@ximian.com>
951 * class.h (MonoInflatedField): New type.
952 (MonoClassField): Replaced `MonoType *generic_type' with
953 `MonoInflatedField *generic_info'.
956 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
958 2004-06-11 Martin Baulig <martin@ximian.com>
960 * reflection.c (mono_image_create_method_token): Correctly encode
963 2004-06-11 Martin Baulig <martin@ximian.com>
965 * metadata.c (mono_metadata_parse_method_signature): When parsing
966 a MethodDef which has VarArgs, also set sentinelpos if we don't
969 2004-06-11 Martin Baulig <martin@ximian.com>
971 * verify.c (mono_method_verify): In CEE_CALL, use
972 mono_method_get_signature() to get the method's signature, unless
973 we're a PInvoke method.
975 2004-06-10 Jackson Harper <jackson@ximian.com>
977 * assembly.c: Use <path>/lib/mono/gac for the extra paths
978 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
979 logical name as the supplied path is just a prefix to the gac not
980 the direct path to it.
982 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
984 * reflection.c: make the token for a created method match
985 the token of the MethodBuilder it was created from
986 (IKVM requires this behaviour now).
988 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
990 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
991 reflection.c, socket-io.c: leak fixes.
993 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
995 * icall.c: handle sentinel pos in vararg methods in position different
998 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1000 * culture-info-tables.h: freshly generated.
1002 2004-06-09 Martin Baulig <martin@ximian.com>
1004 * loader.c (mono_get_method_constrained): Call `mono_class_init
1005 (constrained_class)'.
1007 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
1009 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
1010 any methods. Fixes #59629.
1012 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
1014 * culture-info-tables.h: reflecting locale-builder updates.
1016 2004-06-08 Dick Porter <dick@ximian.com>
1019 * locales.c: Fixed compile warnings, including a real bug in
1020 CompareInfo_internal_compare.
1022 2004-06-08 Dick Porter <dick@ximian.com>
1025 (ves_icall_System_Globalization_CompareInfo_internal_index):
1026 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
1027 Double-check the resuls of usearches, because ICU currently
1028 ignores most of the collator settings here. Fixes bug 59720.
1030 2004-06-08 Dick Porter <dick@ximian.com>
1033 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
1034 Fix memory leak and segfault-causing typo. No idea how this one
1035 lasted so long without being noticed.
1037 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
1039 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
1040 any methods. Fixes #59629.
1042 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1045 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
1046 own the critical section before). Removed dead code (that's done
1047 in the preload hook).
1049 (mono_assembly_load_with_partial_name): call the preload hook.
1051 2004-06-08 Martin Baulig <martin@ximian.com>
1053 * metadata.c (mono_metadata_signature_alloc): Default
1054 `sentinelpos' to -1.
1056 * reflection.c (mono_image_get_array_token): Likewise.
1058 2004-06-08 Martin Baulig <martin@ximian.com>
1060 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
1062 * metadata.c (mono_metadata_parse_method_signature): When parsing
1063 a MethodDef which has VarArgs, set sentinelpos.
1065 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
1066 `gint16' since we're using -1 for non-varargs methods.
1069 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
1070 (method_encode_signature): Added varargs support.
1071 (method_builder_encode_signature): Likewise.
1072 (mono_image_get_varargs_method_token): New static method.
1073 (mono_image_create_method_token): New public method; this is
1074 called via an icall instead of mono_image_create_token() when
1075 calling a varargs method.
1077 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
1079 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
1081 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
1083 * culture-info-tables.h : Reflecting the latest locale-builder that
1084 fixed empty array representation ({} to {0}).
1086 2004-06-07 Jackson Harper <jackson@ximian.com>
1088 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
1089 looking up extra gac paths. This allows MONO_GAC_PATH to act
1090 exactly like a prefix.
1092 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
1094 * reflection.c (mono_reflection_type_from_name): Make a copy of the
1095 type name before modifying it. Fixes #59405.
1097 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
1099 * culture-info.h: added fields for "all datetime patterns".
1100 * locales.c: ( ves_icall_System_Globalization_CultureInfo
1101 _construct_datetime_format ()): fill xxx_patterns fields.
1102 * object.h: added fields for "all datetime patterns" to
1103 MonoDateTimeFormatInfo.
1104 * culture-info-tables.h: reflecting locale-builder updates.
1106 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
1108 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
1109 the event has no add and remove methods. Fixes #59629.
1111 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
1113 * object.c: Fixed possible integer overflow when allocating large
1116 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
1118 * culture-info-tables.h: reflecting locale-builder updates.
1120 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
1122 * culture-info-tables.h: reflecting locale-builder updates.
1124 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
1126 * culture-info-tables.h: reflecting locale-builder updates.
1128 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
1130 * threads.c: Made Thread.Sleep abortable.
1132 2004-06-02 Martin Baulig <martin@ximian.com>
1134 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
1136 * debug-mono-symfile.h: Bumped symbol file version number to 37.
1138 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
1140 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
1142 2004-05-30 Jackson Harper <jackson@ximian.com>
1144 * reflection.c: Do not hardcode assembly versions or public key
1145 tokens anymore. All of this except the corlib section was dead
1148 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
1150 * object.c (mono_runtime_invoke_array): Automatically create boxed
1151 objects for byref valuetypes if needed. Fixes #59300.
1153 * object.c (mono_method_return_message_restore): Handle
1154 MONO_TYPE_OBJECT as well.
1156 2004-05-28 Jackson Harper <jackson@ximian.com>
1158 * reflection.c: The modified type encoding was causing build
1159 problems. Reverted for now.
1161 2004-05-28 Jackson Harper <jackson@ximian.com>
1163 * reflection.c/h: Take an assembly ref so that we dont create
1164 fully qualified names when encoding types in the same assembly as
1165 the custom attribute being emitted.
1166 * appdomain.c: Increment version number.
1168 2004-05-26 Duncan Mak <duncan@ximian.com>
1171 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
1172 Set the full version number (major, minor, build, revision).
1174 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
1176 * marshal.c (emit_struct_conv): increment src/dst after blit
1177 (mono_marshal_get_managed_wrapper,
1178 mono_marshal_get_native_wrapper): make sure we have marshalling
1179 info before marshalling params (info computation affects
1182 * class.c (class_compute_field_layout): correctly deal with
1184 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
1185 value types (as per what windows dows by default)
1186 (mono_class_setup_mono_type): System.ValueType is blittable
1187 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
1190 * marshal.c (mono_marshal_load_type_info): flag types as
1191 non-blittable if the native layout doesn't match the managed
1194 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1196 * appdomain.c: don't add stuff in the private search path that is
1197 above the application base. If application base is not set, there's
1198 no private search path.
1200 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
1202 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
1203 byref struct arguments in native->managed marshalling.
1205 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
1207 * marshal.c (mono_marshal_get_runtime_invoke): correctly
1208 cache methods using signature (special case for methods
1209 that are value type or string class)
1211 * image.c (mono_image_close): clean up allocated GSList's
1212 in runtime_invoke_cache.
1214 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1216 * mono-config.c: set the correct path for mono_cfg_dir on windows when
1217 there's no MONO_CFG_DIR environment variable defined.
1219 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1221 * threads.c: windows version must be >= 0x0500 to include OpenThread.
1223 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
1225 * threadpool.c: Really wait for 500ms after the async call, even if the wait
1227 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
1228 before waiting for it, and call CloseHandle after the wait to unref it.
1229 This will make sure that handles are not disposed too early.
1231 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1236 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
1239 * object.c: se the application_base only for the domain that runs
1240 Main. Fixes bug #59216,
1242 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1245 * object.c: only the domain in which Main is run have
1246 SetupInformation.ConfigurationFile set, so moved a few lines from
1247 appdomain.c to object.c.
1249 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1251 * appdomain.c: we tried to load [name].(dll|exe), but according
1252 to bug #57710, we must also try [culture]/[name].(dll|exe) and
1253 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
1254 There's a test case attached to bug #58922.
1256 2004-05-27 Dick Porter <dick@ximian.com>
1259 * file-io.c: Implemented icalls for locking and unlocking regions
1261 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
1262 FALSE on error (fixes both compiler warning and real bug.)
1264 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
1266 * culture-info-tables.h: reflecting locale-builder updates.
1268 (Added missing ChangeLog entry for 05/26)
1270 2004-05-27 Jackson Harper <jackson@ximian.com>
1272 * locales.c: Fix some cut and paste errors.
1274 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1276 * mono-config.c: set the correct path for config. directory on windows.
1278 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
1280 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
1283 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
1285 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
1286 from pinvoke functions.
1288 * marshal.c (mono_ftnptr_to_delegate): Implement this.
1290 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
1292 * culture-info-tables.h: reflecting locale-builder updates.
1294 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
1296 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
1299 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
1301 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
1302 * icall.c: Modified icalls for RNG.
1303 * rand.c|h: Changed RNG interface to allow thread-safe usage under
1304 Windows (CryptoAPI).
1306 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
1308 * locales.c: Fix build.
1310 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
1312 * culture-info-tables.h: reflecting locale-builder updates.
1314 2004-05-25 Jackson Harper <jackson@ximian.com>
1316 * locales.c: When creating the current culture use the $LANGs
1317 specific culture. So DateTimeFormat and NumberFormat entries are created.
1319 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
1321 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
1322 a char array as parameter.
1324 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
1326 * image.c: In mono_image_open(), always use an absolute path name to
1327 look for already loaded images.
1329 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
1331 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
1332 missing in the windows build (like older cygwin include files).
1334 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
1336 * icall.c: Fixed check for possible integer overflow in Buffer_
1337 BlockCopy icall. Replaced comments style // by /* */.
1339 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
1341 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
1343 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
1344 check after MONO_VTADDR. Fixes pinvoke2.exe.
1346 * marshal.h marshal.c metadata.h: Add beginnings of support for
1347 ftnptr -> delegate marshalling.
1349 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
1351 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
1352 * threads.c: Fix warnings.
1354 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
1356 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
1357 * icall.c: Registered icalls for Suspend and Resume.
1358 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
1360 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
1361 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
1362 * process.c: Use WaitForSingleObjectEx.
1363 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
1365 * threads.c, threads.h: Make use of new Ex wait methods. Improved
1366 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
1367 for Suspend and Resume. Added new mono_thread_stop, used for stoping
1368 background threads. Added basic support for Abort in Windows.
1369 Start new threads using a managed delegate invoke wrapper. This wrapper
1370 has an interruption checkpoint that is needed since an interruption
1371 can be requested before the thread leaves the unmanaged code that starts
1373 * marshal.c: Added interruption checkpoint after every native call, and
1374 also before managed calls for wrappers called from unmanaged code to
1375 go into managed code.
1376 * object.h: Added new field in MonoThread to keep track of interruption
1379 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
1381 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
1384 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1391 * rand.c: getenv -> g_getenv (windows!)
1393 * process.c: complete_path is also used on non-windows platforms.
1395 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1397 * icall.c: new signature for Process_Start.
1399 * process.[ch]: new signature for Process_Start. If we're on windows
1400 and UseShellExecute is false, we have to search for the program by
1401 ourselves if we don't get a full path.
1403 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
1405 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
1406 marshalling and call CleanUpNativeData if needed. Fixes #58646.
1408 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1410 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
1413 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1415 * process.c: use double quotes to quote program name and arguments on
1416 windows. Fixes bug #58575.
1418 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1420 * file-io.c: don't return "." and ".." when using windows Find*File.
1422 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
1424 * marshal.c: Don't pass wrappers to message init because method
1425 addressed used to lookup metadata. part of remoting[2|3] fix.
1427 2004-05-15 Jackson Harper <jackson@ximian.com>
1429 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
1430 path is essentially the same as MONO_PATH except that it points to
1431 GACs instead of lib directories.
1432 * loader.h: The user gac is gone so we dont need function to
1434 * mono-config.c: user gac option is now gone.
1436 2004-05-15 Jackson Harper <jackson@ximian.com>
1438 * culture-info.h: Make defines more consistent, add calendar data
1439 to the culture info table.
1440 * culture-info-tables.h: Add basic calendar data. Basically
1441 everyone gets default gregorian until all the data is
1443 * locales.c: Use the new consistent defines. Set calendar data for
1444 culture info objects.
1445 * object.h: add a field for calendar data to CultureInfo
1447 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
1449 * image.c: image->runtime_invoke_cache is keyed on signatures now.
1450 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
1452 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
1453 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
1454 an extra param that is the pointer of the method to invoke. The IL for
1455 the invoke method is no longer specific to the method, but to the
1456 signature of the method. Thus, we can share the same code for multiple
1457 methods. This reduces the number of methods that have to be compiled.
1459 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
1461 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
1463 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1465 * icall.c: Optimize Buffer.BlockCopy.
1467 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1469 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
1470 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
1471 quote). Changed them to "MMMM yyyy".
1473 2004-05-12 Miguel de Icaza <miguel@ximian.com>
1476 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
1478 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
1480 * reflection.h: Updated after changes to managed structures.
1482 * appdomain.c: Bump corlib version.
1484 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1486 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
1489 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1491 * Makefile.am: link to ../os/libmonoos.la on windows.
1494 -If MONO_DEBUG, warn about non-existing directories in
1496 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
1497 compile time variable.
1498 -Removed init_default_path and call mono_set_rootdir from
1499 libmonoos.a instead (windows only).
1501 * assembly.h: declare mono_assembly_getrootdir().
1504 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
1506 * loader.c: s/getenv/g_getenv/
1508 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
1510 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
1512 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
1514 * metadata.h: Add new marshalling conversions.
1516 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
1519 * reflection.c (mono_reflection_get_type): Lookup the type in all
1520 modules of a multi-module assembly. Fixes #58291.
1522 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
1524 * threads.c: Before aborting a background, set the StopRequested
1525 state. This avoids throwing the Abort exception.
1526 In mono_thread_manage, don't continue with the shutdown until all
1527 aborted threads have actually stopped.
1529 2004-05-10 Jackson Harper <jackson@ximian.com>
1531 * locales.c: Remove the modifier from culture names.
1533 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1535 * Makefile.am: monosn is not installed any more. It has been deprecated
1538 2004-05-07 Jackson Harper <jackson@ximian.com>
1541 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
1542 Fix array construction, add bailout if the length is 0.
1544 2004-05-07 Dick Porter <dick@ximian.com>
1546 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
1547 machine doesn't have a DNS entry. Patch by Urs Muff
1548 (umuff@quark.com), fixes bug 57928.
1550 2004-05-06 Jackson Harper <jackson@ximian.com>
1552 * reflection.c: Handle null PublicTokens properly. alloc mem for
1553 assembly names culture so we dont crash when freeing it.
1555 2004-05-06 Jackson Harper <jackson@ximian.com>
1557 * assembly.c: Check the usergac when loading with partial names.
1559 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
1561 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
1562 does nothing for now (not required for Linux/Windows) but the class
1563 library can call it (and a newer or modified runtime could need it).
1564 * icall.c: Registred icall.
1566 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1568 * loader.c: prints a message on module loading error we set MONO_DEBUG
1569 environment variable.
1571 2004-05-05 Jackson Harper <jackson@ximian.com>
1573 * appdomain.c: Handle PublicKeyToken=null properly.
1575 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
1577 * environment.c|h: Added icall ves_icall_System_Environment_
1578 GetOSVersionString to get the current OS version as a string.
1579 * icall.c: Registred icall.
1581 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
1583 * object.c: in mono_object_get_virtual_method(), take into account that
1584 non-virtual methods don't have a slot in the vtable. Check needed when
1585 the object is a proxy.
1587 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
1589 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
1590 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
1592 * object.c (mono_class_compute_gc_descriptor): Fix warning.
1594 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
1595 passed when a valuetype is expected.
1597 * object.c (mono_unhandled_exception): Only set the exit code if the
1598 exception happens in the main thread. Fixes thread5.exe.
1600 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
1601 invalid names. Fixes #58047.
1603 2004-05-03 Jackson Harper <jackson@ximian.com>
1605 * assembly.c: This line was committed accidently and is unneeded.
1607 2004-05-03 Jackson Harper <jackson@ximian.com>
1609 * icall.c: Add new icall for Assembly::LoadWithPartialName
1610 * assembly.c/.h: new function that probes the GAC to load partial
1611 assembly names by Paolo Molaro.
1613 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1615 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
1616 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
1617 (type_get_fully_qualified_name): Added PublicKeyToken when building a
1620 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1622 * appdomain.c: fixed check for 'neutral' culture and removed warning.
1623 * reflection.c: fix bug when parsing a full type name and Version is not
1624 the last thing in the string.
1626 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
1628 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
1629 crashes when it is freed.
1631 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1633 * assembly.c: print the compat warning to stderr.
1635 2004-05-01 Miguel de Icaza <miguel@ximian.com>
1637 * assembly.c (mono_assembly_load_references): Add a compatibility
1638 hack to run old applications that might be still referencing the
1639 3300-based assemblies, only do this for System.xxx.
1641 2004-05-01 Jackson Harper <jackson@ximian.com>
1643 * appdomain.c: If the culture is neutral we set it to "".
1645 2004-04-29 Jackson Harper <jackson@ximian.com>
1647 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
1649 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
1651 * string-icalls.c: added low overhead function for copying chars
1652 * icall.c: added needed icall for the above function
1654 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1656 * icall.c: fix return value of get_global_assembly_cache. Implemented
1657 Environment.GetLogicalDrives.
1659 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
1661 * rand.c: try and talk to egd or prngd
1662 for random bytes if opening devices fail.
1664 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
1666 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
1667 alignment for the type using the native alignment of its members
1668 instead of using klass->min_align.
1670 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
1672 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1675 * socket-io.c: added check for sys/aio.h.
1677 2004-04-28 Dick Porter <dick@ximian.com>
1679 * threads.c: Don't abort a thread thats already aborting, when
1680 terminating everything.
1682 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1684 * icall.c: added 2 new async calls for Socket.
1686 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
1689 * threadpool.c: removed unused variable.
1691 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
1693 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
1695 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
1697 * locales.c: put back string_invariant_tolower () and
1698 string_invariant_toupper ().
1700 2004-04-26 David Waite <mass@akuma.org>
1705 * unicode.h: remove comma from end of enumeration declarations
1707 2004-04-26 David Waite <mass@akuma.org>
1709 * debug-mono-symfile.h:
1712 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
1715 2004-04-26 Jackson Harper <jackson@ximian.com>
1717 * appdomain.c: Increment version number.
1719 2004-04-26 Jackson Harper <jackson@ximian.com>
1721 * appdomain.c: Set assembly references public token value when
1722 PublicKeyToken is specified, not the hash_value. Free public token
1723 values when free assembly name data. Previously the public key
1724 token was hex decoded, however we are using hex encoded public key
1725 tokens, so this is not neccasary.
1726 * assembly.c: Lookup assemblies in the gac if their public token
1727 value is set. Add function to allow enabling user gac
1728 lookups. Specify whether or not the assembly was loaded from the
1729 GAC. Compare full assembly names when checking the cache for
1730 assemblies (Temporarily disabled see comment in code). Remove
1731 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
1732 specifies trace-loader they get extra info to stdout on the
1733 loading of assemblies.
1734 * image.h: Add a field for an assembly references public token
1735 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
1736 whether an assembly has been loaded from the GAC.
1737 * image.c: Remove a corlib -> mscorlib name mapping.
1738 * loader.h: Add function to enable/disable the user gac.
1739 * mono-config.c: Check if the usergac is enabled in the config
1741 * icall.c: New icall to determine whether or not an assembly has
1742 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
1743 * tabldefs.h: Add constant for assemblyref flag that specifies a
1744 full public key is used instead of a public token.
1745 * reflection.c: Remove mscorlib -> corlib mappings. Set
1746 PublicTokenValue instead of hash value. This value is a hex
1747 string so it does not need to be expanded.
1749 2004-04-26 Martin Baulig <martin@ximian.com>
1751 * mono-debug-debugger.c (mono_debugger_initialize): Set
1752 `mono_debugger_initialized' before calling mono_debug_lock().
1754 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
1756 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
1757 InternalToUpper/InternalToLower.
1758 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
1759 removed invariant culture shortcut. This is now done in managed code.
1760 * locales.c: (string_invariant_toupper/tolower) removed.
1762 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1764 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
1765 Added Poll internal call.
1767 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
1768 call for Poll. Select was too heavy for polling a single socket.
1770 * threadpool.[ch]: added mono_threadpool_cleanup.
1771 * threads.c: use it. Don't use Thread_Abort on windows.
1773 2004-04-23 Martin Baulig <martin@ximian.com>
1775 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
1777 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
1779 * icall.c: Registred new icalls for key pair protection and added an
1780 icall for Environment.GetFolderPath on Windows.
1781 * security.c|h: Added new icalls for key pair protection.
1783 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1785 * socket-io.c: don't display the non-supported family warning for known
1786 families. Now this is not displayed on windows when checking support
1789 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1791 * class.c: don't display the layout warning for static fields.
1793 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
1795 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
1796 * locales.c, locales.h: Added new icalls for culture-specific
1797 Char.ToLower and Char.ToUpper.
1799 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1801 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
1804 2004-04-20 Martin Baulig <martin@ximian.com>
1806 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
1807 of the type name before passing it to mono_reflection_type_from_name().
1809 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
1811 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
1812 encodings here. Fixes #56965.
1814 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
1816 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
1817 fix test on strstr result not that I can see anything that
1818 relies on the result.
1820 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
1822 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
1825 * marshal.c (mono_marshal_get_string_encoding): New helper function.
1827 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
1828 function to determine which marshalling to use for strings. Fixes
1831 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
1833 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
1835 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
1837 * icall.c: #include mono-config.h
1839 2004-04-15 Jackson Harper <jackson@ximian.com>
1841 * culture-info-tables.h: Fix date formats for en-US culture.
1843 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
1845 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
1846 ThreadPool.SetMinThreads.
1847 * threadpool.c: Implemented ThreadPool.GetMinThreads and
1848 ThreadPool.SetMinThreads.
1850 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
1852 * mono-config.c: also load the .config file in the directory
1853 where the assembly was found.
1855 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
1857 * assembly.c: load per-assembly config files.
1858 * icall.c: decrapified code to get the config dir and moved to
1860 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
1861 per-assembly config files. When doing a dll map lookup give precedence
1862 to the per-assembly data.
1864 2004-04-14 Martin Baulig <martin@ximian.com>
1866 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
1867 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
1868 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
1870 * mono-debugger-debugger.c: While the debugger is locked, remember
1871 whether the symbol tables have changes and send one single
1872 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
1874 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
1876 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
1878 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
1881 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
1882 account when marshalling string arrays. Fixes #56965.
1884 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
1886 * icall.c: Add new icalls mapping for security.
1887 * security.c|h: Add internal calls for WindowsIdentity,
1888 WindowsImpersonationContext and WindowsPrincipal.
1890 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
1892 * class.c: Added comment to ensure the System.MonoDummy class
1893 is removed when no longer necessary
1895 2004-04-13 Miguel de Icaza <miguel@ximian.com>
1897 * appdomain.c: Pass arguments to the bootstraping exceptions to
1898 minimize JITed methods at boot
1900 * metadata.c (mono_exception_from_name_two_strings): Allow for the
1901 second string to be null.
1903 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
1904 Change the protocol to minimize the JIT methods at startup. Now
1905 it Returns the internal codepage, if the value of "int_code_page"
1906 is 1 at entry, and we can not compute a suitable code page
1907 number, returns the code page as a string.
1909 2004-04-13 Jackson Harper <jackson@ximian.com>
1911 * culture-info-tables.h: Fix number of decimal digits for all
1914 2004-04-13 Jackson Harper <jackson@ximian.com>
1916 * icall.c: Clairfy out of sync error message. It is not always
1917 your corlib that is out of sync.
1919 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
1921 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
1922 properties when only the set accessor is overriden. Fixes #55874.
1924 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
1926 * assembly.c (mono_assembly_load_references): Make this thread safe.
1929 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
1931 * monosn.c: Add missing initialization calls.
1933 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
1936 ves_icall_System_Globalization_CultureInfo_construct_number_format
1937 Fix g_assert so it compiles on fussier compilers re int/ptr
1940 2004-04-08 Dick Porter <dick@ximian.com>
1943 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
1944 53992. Also rearrange the code so that the internal calls return
1945 an error value and exceptions are thrown from managed code.
1947 * icall.c: Add type info to the socket icalls.
1949 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1951 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
1954 2004-04-07 Martin Baulig <martin@ximian.com>
1956 * class.c (mono_class_from_generic_parameter): Don't default
1957 `klass->parent' to `mono_defaults.object_type'.
1959 2004-04-07 Martin Baulig <martin@ximian.com>
1961 * reflection.c (mono_reflection_initialize_generic_parameter): Set
1962 `param->pklass->reflection_info'.
1964 2004-04-07 Jackson Harper <jackson@ximian.com>
1966 * culture-info-tables.h: Fix date separator symbol.
1968 2004-04-07 Martin Baulig <martin@ximian.com>
1970 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
1971 from System.Type to System.MonoType.
1973 2004-04-07 Martin Baulig <martin@ximian.com>
1976 (MonoReflectionGenericParam): Added `has_reference_type' and
1977 `has_value_type' fields.
1979 * reflection.c (mono_image_get_generic_param_info): Encode the
1980 correct flags if we have the `class' or `struct' constraint.
1982 2004-04-07 Martin Baulig <martin@ximian.com>
1985 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
1987 2004-04-07 Jackson Harper <jackson@ximian.com>
1989 * appdomain.c: Revert extra patches, just wanted to bump the
1992 2004-04-07 Jackson Harper <jackson@ximian.com>
1994 * Makefile.am: Add culture-info private headers.
1995 * icall.c: Add new icalls for contructing locales.
1996 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
1997 * locales.h: Declare new culture info construction methods.
1998 * object.h: Add new fields used to avoid the CultureMap to
2000 * culture-info.h: Definition of structs used in the culture info
2002 * culture-info-tables.h: Autogenerated tables that contain culture
2003 info data. This file was generated with the locale-builder tool.
2004 * appdomain.c: Incement corlib version number.
2006 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
2008 * appdomain.c: (mono_runtime_init) move mono_thread_init
2009 to before mono_object_new calls so critical sections
2010 are initialized before use.
2012 2004-04-07 Martin Baulig <martin@ximian.com>
2015 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
2016 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
2017 (ves_icall_MonoGenericParam_initialize): Removed.
2018 (monogenericparam_icalls): Removed.
2019 (generictypeparambuilder_icalls): Added new table for
2020 System.Reflection.Emit.GenericTypeParameterBuilder.
2023 (mono_reflection_define_generic_parameter): Removed.
2024 (mono_reflection_initialize_generic_parameter): This is now called
2025 from GenericTypeParameterBuilder's .ctor.
2027 2004-04-06 Martin Baulig <martin@ximian.com>
2029 * class.c (mono_class_init): Don't inflate nested classes in a
2031 (mono_type_get_name_recurse): Include the generic arguments for
2032 generic instances and generic type declarations.
2033 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
2034 (_mono_class_get_instantiation_name): Removed.
2035 (mono_class_create_generic): Always use `gklass->name' as our name.
2037 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
2039 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
2040 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
2041 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
2042 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
2043 closed generic methods here.
2046 (mono_reflection_generic_inst_get_nested_types): Removed.
2047 (inflate_mono_method): Copy the generic parameters from the
2048 MonoMethodHeader into out MonoGenericMethod.
2050 2004-04-06 Martin Baulig <martin@ximian.com>
2053 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
2055 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
2057 * reflection.c (build_compressed_metadata): If we have any entries
2058 in the GenericParam, MethodSpec or GenericParamConstraint tables,
2059 set the header version to 1.1.
2061 2004-04-06 Martin Baulig <martin@ximian.com>
2063 * class.c (mono_class_init): If we're a generic instance,
2064 initialize our nested classes, too.
2065 (_mono_class_get_instantiation_name): Deal with the new `!%d'
2068 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2070 * process.c: quote the argument passed to the shell on windows.
2072 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
2074 * threads.c (mono_alloc_special_static_data): Allow this to be
2075 called during startup.
2077 2004-04-02 Martin Baulig <martin@ximian.com>
2080 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
2082 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
2084 * icall.c: Fix build.
2086 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
2088 * Makefile.am: Added security.c|h.
2089 * icall.c: Added icall for get_UserName;
2090 * security.c: New file for security related icalls. Added function
2091 get_UserName for System.Environment (fix #56144).
2092 * security.h: New. Header file for security.c
2094 2004-04-02 Dick Porter <dick@ximian.com>
2096 * icall.c: Deleted the icalls that were obsoleted some time ago
2097 by the ICU string code, and which were mixed into the icall
2098 rearranging. Fixes bug 55969.
2101 * string-icalls.c: Deleted the code that those icalls reference.
2103 2004-04-01 Martin Baulig <martin@ximian.com>
2105 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
2107 * class.c (mono_class_from_generic_parameter): Don't set
2108 TYPE_ATTRIBUTE_INTERFACE.
2109 (my_mono_class_from_generic_parameter): Likewise.
2111 2004-04-01 Martin Baulig <martin@ximian.com>
2113 * loader.c (find_method): Added an optional `MonoClass *ic'
2114 argument to search in a specific interface.
2115 (mono_get_method_constrained): New public function.
2117 2004-04-01 Martin Baulig <martin@ximian.com>
2119 * reflection.c (mono_image_get_generic_field_token): Use the
2120 `handleref' cache here.
2122 2004-04-01 Martin Baulig <martin@ximian.com>
2124 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
2126 * reflection.c (create_generic_typespec): Use the `typespec' hash
2127 here, not the `typeref' one.
2129 2004-04-01 Martin Baulig <martin@ximian.com>
2131 * class.c (mono_class_inflate_generic_type): Moved the
2132 functionality into a new static inflate_generic_type() which
2133 returns NULL if it didn't do anything. Only increment the
2134 `mono_stats.inflated_type_count' if we actually inflated
2136 (mono_class_get_full): Check the classes type to see whether we
2137 need to inflate it; also inflate MONO_TYPE_(M)VAR.
2139 2004-04-01 Jackson Harper <jackson@ximian.com>
2141 * reflection.c: Set culture for assembly references.
2143 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
2145 * reflection.[ch], icall.[ch], Fix support for pinning variables.
2147 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2150 (do_mono_assembly_open): the critical section also covers
2151 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
2153 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2156 (mono_manage_threads): abort the background threads when finishing.
2159 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2161 * gc.c: only close the done_event handle if there was no timeout.
2164 2004-03-30 Martin Baulig <martin@ximian.com>
2166 * icall.c (icall_entries): It's called "System.Activator", not
2167 "System.Activation".
2169 2004-03-30 Martin Baulig <martin@ximian.com>
2171 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
2172 (mono_class_create_from_typespec): Likewise.
2174 2004-03-30 Martin Baulig <martin@ximian.com>
2176 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
2177 `has_ctor_constraint' and `initialized'.
2179 2004-03-30 Martin Baulig <martin@ximian.com>
2181 * reflection.c (encode_new_constraint): New static function to add
2182 the constructor constraint attribute to a type parameter.
2183 (encode_constraints): Call encode_new_constraint() if necessary.
2186 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
2188 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
2190 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
2192 * reflection.c, icall.c: add support for pinning variables.
2194 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
2196 * marshal.c (mono_marshal_get_managed_wrapper):
2197 init bool local with zero rather than null.
2199 2004-03-29 Martin Baulig <martin@ximian.com>
2201 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
2202 the "official" behavior here.
2203 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
2205 2004-03-29 Martin Baulig <martin@ximian.com>
2207 * icall.c: Reflect latest API changes.
2209 2004-03-29 Martin Baulig <martin@ximian.com>
2211 * loader.c (mono_get_method_from_token): Also call
2212 mono_metadata_load_generic_params () for abstract and interface
2213 methods; replace the type arguments in the method signature with
2214 the ones which are loaded from the metadata.
2216 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
2218 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
2219 of the lock is not the current thread. MS.NET don't do it, in spite of
2220 what the documentation says. See bug #56157.
2222 2004-03-28 Martin Baulig <martin@ximian.com>
2224 * class.c (mono_class_init): Don't call init_properties() and
2225 init_events() for generic instances; set `prop->parent' when
2226 inflating properties.
2228 * reflection.c (mono_generic_inst_get_object): Call
2229 `mono_class_init (ginst->klass)'.
2230 (mono_type_get_object): Only create a MonoGenericInst if your
2231 generic type is a TypeBuilder.
2232 (do_mono_reflection_bind_generic_parameters): Only set
2233 `ginst->is_dynamic' if our generic type is a TypeBuilder.
2235 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
2237 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
2240 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2242 * icall.c: added Kill_internal icall.
2243 * process.[ch]: added Kill_internal icall.
2245 2004-03-25 Martin Baulig <martin@ximian.com>
2247 * class.h (MonoStats): Added `generic_instance_count',
2248 `inflated_method_count', `inflated_type_count' and
2249 `generics_metadata_size'.
2251 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2253 * reflection.c: no warnings now.
2255 2004-03-25 Martin Baulig <martin@ximian.com>
2257 * class.c (mono_class_get_full): New public function; does a
2258 mono_class_get(), but also takes a `MonoGenericContext *'.
2260 * loader.c (mono_field_from_memberref): Renamed to
2261 `field_from_memberref', made static and added `MonoGenericContext *'
2263 (mono_field_from_token): Added `MonoGenericInst *' argument.
2264 (method_from_memberef): Likewise.
2265 (mono_get_method_from_token): Likewise.
2266 (mono_get_method_full): New public function; does a
2267 mono_get_method(), but also takes a `MonoGenericContext *'.
2269 * verify.c (mono_method_verify): Get the method's generic context
2270 and pass it to mono_field_from_token(), mono_get_method_full() and
2271 mono_class_get_full().
2273 2004-03-25 Martin Baulig <martin@ximian.com>
2275 * class.c (mono_class_inflate_generic_type): Take a
2276 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
2277 `MonoGenericMethod *'.
2279 2004-03-25 Martin Baulig <martin@ximian.com>
2281 * loader.h (MonoMethodInflated): Store the MonoGenericContext
2282 instead of the MonoGenericMethod here.
2284 2004-03-25 Martin Baulig <martin@ximian.com>
2286 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
2287 each time we create a new MonoGenericInst, we also create a new
2288 context which points back to us.
2290 * class.c (inflate_method): Use `ginst->context' instead of
2291 creating a new context.
2293 * loader.c (method_from_memberref): Use
2294 `klass->generic_inst->context' instead of creating a new context.
2296 2004-03-25 Martin Baulig <martin@ximian.com>
2298 * class.h (MonoGenericContext): New struct.
2299 (MonoGenericMethod): Removed `generic_inst'.
2301 * class.c (mono_class_inflate_generic_method): Take a
2302 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
2304 2004-03-25 Martin Baulig <martin@ximian.com>
2306 * loader.h (MonoMethodInflated): New typedef.
2308 * metadata.h (MonoMethodSignature): Removed `gen_method', make
2309 `generic_param_count' consume just 30 bits, added `is_inflated'
2310 and `has_type_parameters' flags (one bit each).
2312 * class.c (mono_class_inflate_generic_method): Create a
2313 MonoMethodInflated instead of a MonoMethodNormal and set
2314 `is_inflated' in the method signature.
2316 * class.h (MonoGenericMethod): Removed `generic_method'.
2318 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
2320 * image.c: Make sure the name of a MonoImage is always an absolute path.
2321 This fixes bug #54415.
2323 2004-03-24 Martin Baulig <martin@ximian.com>
2325 * class.c (mono_class_setup_vtable): If we're a generic instance,
2326 use our generic type's vtable size.
2328 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
2330 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
2331 MONO_NO_UNLOAD env var as a temporary workaround for unloading
2334 2004-03-23 Martin Baulig <martin@ximian.com>
2336 * class.h (MonoDynamicGenericInst): Added `int count_events' and
2337 `MonoEvent *events'.
2339 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
2340 (typebuilder_icalls): Added "get_event_info"; calls
2341 mono_reflection_event_builder_get_event_info().
2343 * reflection.c (mono_reflection_generic_inst_initialize): Added
2344 `MonoArray *events'.
2345 (mono_reflection_event_builder_get_event_info): New function.
2347 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
2349 * object.h: add mono_type_initialization_init
2351 * object.c (mono_runtime_class_init):
2352 implement class constructor synchronization rules
2353 to cope with threading issues.
2354 add mono_type_initialization_init
2356 * appdomain.c (mono_runtime_init): call
2357 mono_type_initialization_init
2359 * class.h: removing initializing field from MonoVTable
2361 2004-03-23 Martin Baulig <martin@ximian.com>
2363 * class.c (my_mono_class_from_generic_parameter): Use
2364 `param->name' if it's not NULL.
2366 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
2368 * class.c: do not insert non-virtual methods in the vtable.
2369 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
2370 that means the method is non-virtual. This never would have
2373 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
2375 * profiler.c: Added lock for accessing coverage_hash.
2377 2004-03-22 Martin Baulig <martin@ximian.com>
2379 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
2380 `method->method->signature->generic_param_count != 0' to make it
2381 work for interface methods.
2383 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2385 * process.c: quote the string passed to the shell using g_shell_quote.
2387 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2390 (mono_threads_manage): don't remove the finalizer thread and self
2391 from the threads hash table so that mono_thread_manage can be called
2394 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2396 * process.c: quote the arguments when UseShellExecute is true. Fixes
2399 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2401 * threads.c: set mono_thread_detach as a cleanup routine for every
2402 thread. This way it's always executed upon thread termination, either
2403 aborted or finished normally. No more xsp hangs!
2405 2004-03-17 Martin Baulig <martin@ximian.com>
2407 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
2408 `int count_nested' and a `MonoType **nested'.
2410 * reflection.c (mono_reflection_bind_generic_parameters): Moved
2411 most of the functionality into a new static
2412 do_mono_reflection_bind_generic_parameters() and don't take a
2413 `MonoType *nested_in' argument any more. Don't compute nested
2415 (mono_reflection_generic_inst_get_nested_types): New public method
2416 to get nested types.
2418 * class.c (mono_class_create_generic): Set `klass->nested_in' if
2419 we're a nested class.
2421 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
2422 mono_reflection_generic_inst_get_nested_types() to compute the
2425 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
2427 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
2428 descriptive error message under windows.
2430 2004-03-17 Martin Baulig <martin@ximian.com>
2432 * class.c (dup_type): Added `const MonoType *original' argument;
2433 copy the attrs from the original type.
2435 2004-03-17 Martin Baulig <martin@ximian.com>
2437 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
2438 `m->generic_inst_cache' here.
2440 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
2442 * exception.h exception.c: Add stack_overflow_exception.
2444 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2447 (overlapped_callback): call SetEvent *after* invoking the callback.
2448 No need to call CloseHandle.
2450 2004-03-16 Martin Baulig <martin@ximian.com>
2452 * reflection.c (mono_image_get_fieldref_token): Take a
2453 `MonoReflectionField *' instead of a `MonoClassField *' and a
2454 `MonoClass *'; store the `MonoReflectionField *' in the hash.
2456 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2458 * appdomain.c: don't add the culture to the filename we're looking for
2459 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
2461 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2463 * locales.c: don't ignore symbols when doing case insensitive compares.
2464 Thanks Dick! Fixes bug #54046.
2466 * threads.c: surround 'threads' usage with enter/leave in
2469 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
2471 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
2472 implicitly marshalled as [Out]. Fixes #55450.
2474 (mono_marshal_get_runtime_invoke): Zero out the result if there is
2477 2004-03-16 Martin Baulig <martin@ximian.com>
2479 * class.c (mono_class_from_generic_parameter): Use the actual
2482 2004-03-16 Martin Baulig <martin@ximian.com>
2484 * reflection.c (type_get_signature_size): New static function.
2485 Compues the size of the type in a method signature.
2486 (method_get_signature_size): New static function; calls
2487 type_get_signature_size() to compute the actual size of the
2489 (method_encode_signature): Use method_get_signature_size() to get
2490 the signature's size rather than using `nparams * 10'.
2492 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2494 * file-io.h: define here WapiOverlapped on windows. I don't want the
2495 regular OVERLAPPED one.
2498 * threadpool.c: somehow, BindIoCompletionCallback is not found.
2499 Disabling AIO on windows.
2501 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2503 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
2506 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2508 * appdomain.c: upgraded corlib version.
2510 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
2511 and BeginWrite. Allow opening files for asynchrnous operations.
2513 * file-io.h: new struct that maps FileStreamAsyncResult.
2514 * icall.c: added new icalls.
2515 * process.[ch]: support setting child process environment variables
2516 and use the SHELL or COMSPEC when UseShellExecute is true.
2518 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
2519 callback for async. IO is here and also BindHandle.
2521 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
2524 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
2526 * reflection.c (create_custom_attr): Allow len == 0.
2528 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
2529 computation on big-endian machines.
2531 2004-03-13 Martin Baulig <martin@ximian.com>
2533 * class.h (MonoGenericInst): Added `int count_ifaces'.
2535 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
2536 `ginst->count_ifaces' instead `klass->interface_count' since we
2537 may get called before the vtable is created.
2539 * loader.c (mono_method_get_param_names): If we're a generic
2540 instance, return and don't initialize the class.
2542 * reflection.c (mono_reflection_setup_generic_class): Don't call
2543 ensure_runtime_vtable().
2544 (mono_reflection_bind_generic_parameters): Set
2545 `ginst->count_ifaces'.
2547 2004-03-11 Jackson Harper <jackson@ximian.com>
2551 * unicode.h: Remove unused System.Char icalls.
2553 2004-03-11 Miguel de Icaza <miguel@ximian.com>
2555 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
2556 code when we P/Invoke the first library in Windows.Forms, instead
2557 of when we first open the assembly.
2559 * assembly.c: Drop the lookup from here.
2561 2004-03-10 Martin Baulig <martin@ximian.com>
2563 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
2564 class for properties, fields and events. Finally fixes #54945.
2566 2004-03-10 Martin Baulig <martin@ximian.com>
2568 * metadata.c (mono_metadata_class_equal): New static function;
2569 checks whether two generic instances or two generic parameters are
2571 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
2574 2004-03-10 Martin Baulig <martin@ximian.com>
2576 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
2578 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
2579 argument and write it into the `reflection_info' field.
2582 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
2583 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
2585 2004-03-09 Jackson Harper <jackson@ximian.com>
2587 * char-conversions.h: use 8 bits for numeric data its all we need
2588 * icall.c: numeric data is only 8 bits now.
2590 2004-03-09 Martin Baulig <martin@ximian.com>
2592 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
2594 * class.c (init_properties, init_events): Initialize the new
2597 * reflection.c (typebuilder_setup_properties): Likewise.
2598 (typebuilder_setup_events): Likewise.
2600 * reflection.h (MonoEventInfo): Replaced `parent with
2601 `declaring_type' and `reflected_type'.
2603 * icall.c (ves_icall_get_property_info): Distinguish between
2604 declaring and reflected type.
2605 (ves_icall_get_event_info): Likewise.
2607 2004-03-09 Martin Baulig <martin@ximian.com>
2609 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
2610 (ves_icall_Type_GetField): Correctly set field->klass.
2612 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
2614 * loader.h: Fix warning.
2616 2004-03-08 Miguel de Icaza <miguel@ximian.com>
2618 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
2619 library routine if present. Notice that it will still continue
2620 executing even if its missing, for those working on the Gtk#
2621 edition of Windows.Forms.
2623 * assembly.c (do_mono_assembly_open): If loading the
2624 System.Windows.Forms call mono_loader_wini_init.
2626 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
2628 * class.h: Added MonoRemoteClass struct.
2629 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
2630 function for MonoStrings.
2631 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
2632 Added internal call for getting the proxy type.
2633 * marshal.c: Get the type of transparent proxies from its remote_class.
2634 Added methods that generate the IL for type checks and casts:
2635 mono_marshal_get_isinst, mono_marshal_get_castclass,
2636 mono_marshal_get_proxy_cancast.
2637 * marshal.h: Declaration of the previous new methods.
2638 * object.c: Added new moethods for creating and updating MonoRemoteClass
2639 instances: mono_remote_class, mono_upgrade_remote_class,
2640 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
2641 * verify.c: FIx transparent_proxy_fields layout.
2642 * appdomain.c: Bump corlib version.
2644 2004-03-04 Jackson Harper <jackson@ximian.com>
2646 * icall.c: Add icall to access char conversion tables.
2647 * char-conversions.h: Character conversion tables.
2648 * Makefile.am: Add char-conversions.h private header file.
2650 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
2652 * appdomain.c (unload_thread_main): Increase unloading timeout to
2653 10 sec as a temporary workaround for Nant problems.
2655 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
2657 * gc.c: Add checks for GC_enable and GC_disable.
2659 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
2660 (jaak@zd.com.pl). Fix memory corruption in String.Replace
2663 2004-02-27 Martin Baulig <martin@ximian.com>
2665 * reflection.c (mono_reflection_bind_generic_parameters): Take a
2666 `MonoReflectionType *' instead of a `MonoType *'.
2668 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
2670 * gc.c (run_finalize): Avoid finalizing the object representing the
2672 (finalizer_thread): Fix warning.
2674 2004-02-25 Martin Baulig <martin@ximian.com>
2676 * class.c (_mono_class_get_instantiation_name): Added `int offset'
2677 argument for nested types.
2678 (mono_class_create_generic): Added support for nested generictypes.
2680 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
2683 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
2685 * reflection.c (method_encode_signature): Increase the minimum
2686 value of `size' from 10 to 11.
2687 (mono_reflection_bind_generic_parameters): Take `int type_argc'
2688 and `MonoType **types' arguments instead of the `MonoArray
2689 *types'; added `MonoType *nested_in'. Recursively instantiate
2692 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
2694 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
2695 stack_overflow_ex members which are used by exception handling.
2697 * appdomain.c (mono_runtime_init): Initialize the new members.
2699 * gc.c (mono_gc_enable): New helper function.
2700 * gc.c (mono_gc_disable): New helper function.
2702 2004-02-23 Martin Baulig <martin@ximian.com>
2704 * icall.c: I must have been really stupid - make it actually work
2707 2004-02-23 Martin Baulig <martin@ximian.com>
2709 * loader.c (method_from_memberref): Only inflate the method if
2710 it's in another klass.
2712 2004-02-23 Martin Baulig <martin@ximian.com>
2714 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
2715 (mono_class_init): If we're a generic instance and an interface,
2716 compute `class->interface_id'; also create `class->interfaces'
2717 here and inflate them.
2719 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
2721 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
2723 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
2725 2004-02-15 Miguel de Icaza <miguel@ximian.com>
2727 * reflection.c (method_encode_code): Improved the error message
2728 generated by the exception.
2730 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2732 * icall.c: Martin did not do what he said in the ChangeLog for
2733 2004-02-18, but put back the changes for properties and events.
2734 Commenting those changes out again and adding comment to bug #54518.
2736 * process.c: removed warning.
2738 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
2740 * marshal.c (emit_struct_conv): Print an error message instead of
2741 asserting when a type does not have the StructLayout attribute.
2743 2004-02-20 Martin Baulig <martin@ximian.com>
2745 * reflection.c (mono_type_get_object): Also use the cache for
2747 (mono_reflection_bind_generic_parameters): Always compute
2750 2004-02-20 Martin Baulig <martin@ximian.com>
2752 * class.h (MonoGenericMethod): Removed `klass'.
2754 * class.c (mono_class_inflate_generic_method): Added `MonoClass
2757 2004-02-20 Martin Baulig <martin@ximian.com>
2759 * reflection.c (method_encode_methodspec): Actually use the
2760 uninflated signature for the memberref.
2762 2004-02-20 Martin Baulig <martin@ximian.com>
2764 * class.h (MonoGenericMethod): Removed `declaring'.
2766 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
2767 is NULL, compute it here.
2769 2004-02-20 Martin Baulig <martin@ximian.com>
2771 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
2773 * metadata.c (mono_metadata_generic_inst_hash): New method.
2774 (mono_metadata_generic_inst_equal): New method.
2776 * reflection.c (mono_reflection_bind_generic_parameters): Use the
2777 `klass->image->generic_inst_cache' cache to avoid creating
2778 duplicate MonoGenericInst's.
2780 * class.c (mono_class_inflate_generic_type): Use the cache.
2782 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
2784 * object.c: fixed gc descriptor calculation for embedded valuetypes.
2786 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2788 * icall.c: added Socket.WSAIoctl icall.
2790 * socket-io.[ch]: implemented
2791 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
2793 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
2795 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
2797 2004-02-18 Urs C Muff <umuff@quark.com>
2799 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
2800 this work on PPC and other big-endian architectures.
2802 * debug-mono-symfile.h: Prepended the names of all the `guint32'
2803 fields with an underscore to make sure they're only accessed by
2806 2004-02-18 Martin Baulig <martin@ximian.com>
2808 * icall.c: Put the klass->refclass changes back for methods and
2809 fields, but not for properties and events. We're currently not
2810 distinguishing between DeclaringType and ReflectedType for
2811 properties and events, that's what caused the regressions.
2813 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2816 (mono_async_result_new): the handle can be NULL.
2818 * threadpool.c: Use an event instead of a semaphore, don't initialize
2819 it until needed. This saves quite a few semaphores from being created
2820 when using the threadpool.
2822 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
2824 * object.c (mono_string_is_interned_lookup): Fix interning of long
2825 strings. Fixes #54473.
2827 * domain.c (ldstr_equal): Optimize if the two strings are equal.
2829 * icall.c: Revert the klass->refclass changes since they introduce
2830 regressions (bug #54518).
2832 2004-02-18 Martin Baulig <martin@ximian.com>
2834 * class.c (mono_class_init): If we're a generic instance and don't
2835 come from a TypeBuilder, inflate our members here.
2836 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
2837 (mono_class_create_generic): New public method.
2838 (mono_class_initialize_generic): Removed.
2839 (get_instantiation_name): Renamed to
2840 _mono_class_get_instantiation_name() and made it public.
2842 2004-02-18 Martin Baulig <martin@ximian.com>
2844 * class.c (mono_class_inflate_generic_type): Clear the new
2845 instance's `nginst->klass' when inflating a generic instance.
2846 (mono_class_is_subclass_of): Added (basic) support for generic
2849 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
2851 * appdomain.h, domain.c: use a MonoCodeManager instead of a
2852 MonoMempool to hold compiled native code.
2854 2004-02-17 Martin Baulig <martin@ximian.com>
2856 * class.h (MonoDynamicGenericInst): Added `count_properties' and
2859 * reflection.c (mono_reflection_generic_inst_initialize): Added
2860 `MonoArray *properties' argument.
2862 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
2864 2004-02-17 Martin Baulig <martin@ximian.com>
2866 * icall.c (ves_icall_Type_GetFields): Renamed to
2867 ves_icall_Type_GetFields_internal() and added a
2868 `MonoReflectionType *rtype' argument; pass it to
2869 mono_field_get_object() to set the field's "reflected" type.
2870 (ves_icall_Type_GetConstructors): Likewise.
2871 (ves_icall_Type_GetEvents): Likewise.
2872 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
2873 argument; pass it to mono_method_get_object() to set the method's
2876 2004-02-17 Martin Baulig <martin@ximian.com>
2878 * class.h (MonoDynamicGenericInst): New type.
2879 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
2881 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
2882 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
2883 (ves_icall_MonoGenericInst_GetFields): New interncall.
2885 * class.c (mono_class_from_generic): Don't call
2886 mono_class_initialize_generic() if this is a dynamic instance;
2887 ie. it's being created from a TypeBuilder.
2888 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
2889 `class->byval_arg.type'.
2891 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
2892 to `inflate_method' and made static.
2893 (mono_reflection_inflate_field): Removed.
2894 (mono_reflection_generic_inst_initialize): New public method.
2896 * reflection.h (MonoReflectionGenericInst): Removed `methods',
2897 `ctors' and `fields'; added `initialized'.
2899 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
2901 * debug-helpers.c (mono_method_full_name): Fix output for empty
2904 2004-02-12 Martin Baulig <martin@ximian.com>
2906 * class.h (MonoClassField): Added `MonoType *generic_type'.
2908 * reflection.c (mono_image_get_fieldref_token): Added support for
2909 instantiated generic types.
2910 (field_encode_inflated_field): Removed.
2911 (mono_image_get_inflated_field_token): Removed.
2912 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
2914 * reflection.h (MonoReflectionInflatedField): Removed.
2916 2004-02-12 Martin Baulig <martin@ximian.com>
2918 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
2919 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
2921 * reflection.c (mono_image_get_methodspec_token): Take a
2922 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
2923 (mono_image_create_token): Check whether we have a
2924 `method->signature->gen_method' and call
2925 mono_image_get_methodspec_token() if appropriate.
2926 (inflated_method_get_object): Removed.
2927 (mono_reflection_bind_generic_method_parameters): Return a
2928 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
2929 (mono_reflection_inflate_method_or_ctor): Likewise.
2931 * reflection.h (MonoReflectionInflatedMethod): Removed.
2933 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
2935 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
2936 for custom valuetype marshalling.
2938 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
2940 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2942 * icall.c: fixed WSAGetLastError_internal name.
2944 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
2946 * threads.c (mono_thread_attach): Allow this to be called multiple
2949 * threads.c (build_wait_tids): Do not wait for ourselves.
2951 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
2952 appdomain list is empty.
2954 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
2955 memory returned by mono_string_builder_to_utf16, since it points into
2956 managed memory. Thanks to Bernie Solomon for noticing this.
2958 * icall.c: Add AppDomainSetup icalls.
2960 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
2962 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
2965 * reflection.c (reflection_methodbuilder_to_mono_method): Save
2966 custom attributes to the method_aux struct. Also fix array indexes etc.
2968 * loader.c (mono_method_get_param_names): Make dynamic case work again.
2970 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
2972 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
2973 (both static and runtime) and reduce startup time.
2975 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
2977 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
2978 AsAny marshalling conversion instead of crashing.
2980 * marshal.c: Fix warnings.
2982 2004-02-09 Martin Baulig <martin@ximian.com>
2984 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
2986 * reflection.h (MonoReflectionInflatedMethod): Removed the
2987 `declaring' field, it's now in the unmanaged MonoGenericMethod.
2989 * reflection.c (method_encode_methodspec): Removed the `method'
2990 argument; we get it from `gmethod->declaring'.
2991 (inflated_method_get_object): Removed the `declaring' argument.
2993 2004-02-09 Martin Baulig <martin@ximian.com>
2995 * class.h (MonoGenericMethod): New type.
2996 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
2999 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
3000 a `MonoGenericMethod *gen_method' one.
3002 * class.c (mono_class_inflate_generic_type): Take an additional
3003 `MonoGenericMethod * argument. This is only non-NULL if we're
3004 inflating types for a generic method.
3005 (mono_class_inflate_generic_signature): Renamed to
3006 inflate_generic_signature() and made static; take a
3007 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
3008 (inflate_generic_header): Take a `MonoGenericMethod *' argument
3009 instead of a `MonoGenericInst *' one.
3010 (mono_class_inflate_generic_method): Likewise.
3012 * reflection.c (encode_generic_method_sig): Take a
3013 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
3014 (method_encode_methodspec): Likewise.
3015 (inflated_method_get_object): Likewise.
3017 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
3018 field with a `MonoGenericMethod *gmethod' one.
3020 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
3022 * class.h (mono_class_has_parent): add parens to expansion
3025 2004-02-08 Martin Baulig <martin@ximian.com>
3027 * image.h (MonoImage): Removed `generics_cache'.
3029 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
3030 instead of a `MonoType *' argument; removed the `inflate_methods'
3031 argument. Don't inflate methods here.
3033 * loader.c (find_method): If it's a generic instance, call
3034 mono_class_init() on the `sclass->generic_inst->generic_type'.
3036 * metadata.c (mono_type_size): Make this work on uninitialized
3037 generic instances; call it on the `ginst->generic_type's class.
3039 * reflection.c (mono_reflection_bind_generic_parameters): Call
3040 mono_class_from_generic() to create the `ginst->klass'.
3042 2004-02-08 Martin Baulig <martin@ximian.com>
3044 * class.h (MonoClass): Changed type of `generic_inst' from
3045 `MonoType *' to `MonoGenericInst *'.
3047 2004-02-08 Martin Baulig <martin@ximian.com>
3049 * icall.c (ves_icall_Type_BindGenericParameters): Just call
3050 mono_type_get_object(), this is now creating a `MonoGenericInst'
3051 for MONO_TYPE_GENERICINST.
3052 (ves_icall_MonoGenericInst_GetParentType): Likewise.
3053 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
3055 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
3056 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
3057 (inflated_method_get_object): Added `MonoClass *refclass' argument.
3058 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
3061 * reflection.h (MonoReflectionInflatedMethod): Removed
3062 `declaring_type' and `reflected_type'.
3064 2004-02-08 Martin Baulig <martin@ximian.com>
3066 * class.h (MonoGenericInst): Added `MonoType *parent' and
3067 `MonoType **ifaces'.
3069 * reflection.h (MonoReflectionGenericInst): Removed `klass',
3070 `parent' and `interfaces'.
3072 * reflection.c (mono_reflection_bind_generic_parameters): Take a
3073 `MonoType *' argument and return a `MonoType *'.
3076 (ves_icall_MonoGenericInst_GetParentType): New interncall.
3077 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
3079 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
3081 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
3082 valuetype marshalling.
3084 2004-02-06 Martin Baulig <martin@ximian.com>
3087 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
3088 (my_mono_class_from_generic_parameter): Likewise.
3090 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
3092 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
3093 contents of the symbol files lazily.
3095 * object.h (MonoThread): Add 'name' and 'name_len' fields.
3097 * threads.h threads.c icall.c: New icalls for getting and setting the
3100 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
3102 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
3103 Raise an exception when the domain is not found.
3105 2004-02-03 Martin Baulig <martin@ximian.com>
3107 * reflection.c (mono_image_get_methodspec_token): Use the
3108 uninflated signature; fixes gen-33.
3110 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
3112 * gc.c threads.c: Make the finalizer thread a normal managed thread so
3113 the finalizer code can use thread functionality.
3115 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
3116 the finalizer thread.
3118 * threads.c: Make some functions more robust.
3120 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
3122 * metadata.h: Add new marshalling conventions.
3124 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
3125 stringbuilder marshalling. Fixes #53700.
3127 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
3129 * reflection.c (mono_image_get_type_info): Save declarative security
3132 * reflection.c (mono_image_get_field_info): Handle uninitialized
3133 unmanaged fields as well.
3135 * appdomain.c: Bump corlib version.
3137 2004-02-01 Martin Baulig <martin@ximian.com>
3139 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
3140 method type arguments.
3142 2004-01-30 Duncan Mak <duncan@ximian.com>
3144 * marshal.h: Add prototype for
3145 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
3147 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
3150 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
3152 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
3153 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
3155 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
3157 * marshal.c (mono_marshal_get_native_wrapper): Add support for
3158 custom marshalling of valuetypes.
3160 * marshal.c: Fix some warnings.
3162 2004-01-29 Martin Baulig <martin@ximian.com>
3164 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
3165 for generic method parameters.
3167 * reflection.c (method_encode_methodspec): Write the uninflated
3168 signature into the methodspec table.
3169 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
3170 is always the uninflated method.
3171 (reflection_methodbuilder_to_mono_method): Copy the generic
3172 parameters from the MethodBuilder into `header->gen_params'.
3174 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
3176 * class.c (mono_class_from_generic_parameter): Fix warning.
3178 2004-01-27 Martin Baulig <martin@ximian.com>
3180 * class.c (mono_class_from_generic_parameter): Don't create
3181 `klass->methods' here.
3183 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
3185 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
3186 extension since it does not work with libraries named lib<FOO>.dll.so.
3188 2004-01-25 Martin Baulig <martin@ximian.com>
3190 * class.c (mono_class_inflate_generic_type): Added support for
3191 MONO_TYPE_GENERICINST.
3193 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
3194 inflate methods on open constructed types.
3196 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3198 * object.c: fire ProcessExit event in the root AppDomain after running
3199 Main. Fixes bug #53299.
3201 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
3203 * socket-io.c: include the new socket-wrappers.h header.
3204 Use the wrappers instead of the unix socket functions to make the code
3207 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
3209 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
3211 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
3214 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
3216 * reflection.c (mono_image_create_pefile): Handle the case when the
3217 entry point is not a MethodBuilder.
3219 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
3220 field to ReflectionMethod since it is not allways a builder.
3222 * reflection.c (type_get_fully_qualified_name): New helper function to
3223 return the fully qualified name of a type.
3225 * reflection.c (encode_marshal_blob): Always emit the fully qualified
3226 type name for custom marshallers.
3228 * reflection.c (mono_marshal_spec_from_builder): Ditto.
3230 * class.c (mono_class_setup_vtable): If a parent class already
3231 implements an interface, use the implementing methods from that class.
3234 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3236 * threadpool.c: just return instead of ExitThread to allow for thread
3239 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
3241 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
3242 when closing resource modules.
3244 * reflection.c (mono_image_create_pefile): Handle the case when the
3245 entry point is not a MethodBuilder.
3247 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
3248 field to ReflectionMethod since it is not allways a builder.
3250 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
3252 * marshal.c (mono_marshal_get_managed_wrapper):
3253 mono_marshal_alloc takes native int so CONV_I
3256 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
3258 * reflection.c (fixup_cattrs): New function to fixup the methoddef
3259 tokens in the cattr table. Fixes #53108.
3261 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3263 * loader.c: don't trim ".dll" before looking up in the config file.
3264 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
3266 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
3268 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
3269 Return the module which contains the resource as well.
3270 (ves_icall_System_Reflection_Module_Close): New icall.
3272 * appdomain.c: Bump corlib version number.
3274 * image.c (mono_image_addref): New public function.
3276 * assembly.c: Call mono_image_addref.
3278 * reflection.c (mono_module_get_object): Increase reference count of
3281 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
3284 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
3285 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
3286 proper exceptions on DllImport problems.
3288 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
3290 * class.c, metadata.c: eliminate CSIZE macro.
3292 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
3294 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
3295 * object.h: Added async_callback field in MonoAsyncResult.
3296 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
3297 * verify.c: Added async_callback in MonoAsyncResult layout.
3299 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
3301 * reflection.c (mono_reflection_get_custom_attrs): Add support
3304 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
3306 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
3308 (mono_marshal_method_from_wrapper): Add null pointer check.
3310 2004-01-16 Martin Baulig <martin@ximian.com>
3312 * debug-mono-symfile.h: Set version number to 36 and reflect
3313 latest symbol writer changes.
3315 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
3317 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
3318 multi-dimensional arrays.
3319 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
3320 (mono_class_from_mono_type): Use bounded_array_class_get.
3322 * class.c (mono_bounded_array_class_get): New function which takes
3323 a 'bounded' bool argument to distinguish vectors from one dimensional
3326 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
3327 bounded_array_class_get if the array has bounds.
3329 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
3330 Search modules loaded using AssemblyBuilder:AddModule as well.
3332 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3334 * appdomain.c: increased corlib version.
3335 * filewatcher.c: removed g_print.
3337 (get_property_info): only allocate what is actually requested.
3338 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
3340 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3342 * Makefile.am: added filewatcher.[ch]
3343 * filewatcher.[ch]: FileSystemWatcher runtime support.
3344 * icall.c: added new FSW icalls.
3346 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
3348 * string-icalls.c: fix stringbuilder regression as suggested by
3349 Iain McCoy <iain@mccoy.id.au>.
3351 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
3353 * process.c (process_read_stringtable_block): Recognize '007f' as
3354 a language neutral stringtable block.
3356 2004-01-12 Patrik Torstensson
3358 * object.h (MonoStringBuilder) : Changed layout to support our
3359 new stringbuilder class.
3360 * marshal.c: Change marshalling to support the new layout of
3362 * appdomain.c: increased version number because new layout of
3365 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
3367 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
3368 assembly name as an string instead of an AssemblyName, since it is
3369 easier to extract info from it.
3371 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
3372 the culture subdirectories too. Fixes #52231.
3374 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3376 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
3377 It takes 2 new parameters with an optional name for the method to look
3378 for and case ignoring info.
3380 * threadpool.c: removed unused variable.
3382 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3384 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
3385 It takes 2 new parameters with an optional name for the property to look
3386 for and case ignoring info.
3389 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
3391 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
3394 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3397 * assembly.c: escape the uri before passing it to g_filename_from_uri.
3400 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
3402 * reflection.c: Add support for more than one unmanaged resource.
3404 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
3405 in field->def_value, as done in all other cases.
3407 * reflection.c (mono_reflection_get_custom_attrs): Add support for
3410 * reflection.c (mono_reflection_create_runtime_class): Remove
3411 errorneous assignment to klass->element_class, since it is already
3412 done in mono_reflection_setup_internal_class.
3414 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3416 * gc.c: added missing LeaveCriticalSection.
3417 * icall.c: indented a couple of lines.
3418 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
3419 if we call EndInvoke inside a callback. Fixes bug #52601.
3421 2004-01-07 Martin Baulig <martin@ximian.com>
3423 * mono-debug-debugger.h
3424 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
3426 2004-01-06 Miguel de Icaza <miguel@ximian.com>
3428 * appdomain.c: Use messages in NotImplementedException.
3430 * exception.c (mono_get_exception_not_implemented): Now this takes
3433 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
3434 exception instead of g_asserting an aborting when something is not
3437 Add some inline docs.
3439 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
3441 * reflection.h: Update after changes to object layout.
3443 * reflection.c: Implement saving of unmanaged aka win32 resources.
3445 * appdomain.c: Bump version number.
3447 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
3448 Handle missing domains gracefully.
3450 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
3452 * file-io.c : On Windows, there are much more invalid_path_chars.
3454 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
3456 * class.h, object.c: prepare for GetType () speedup.
3458 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
3460 * profiler.c: workaround for --profile null reference exception on
3461 cygwin. Patch by Patrik Torstensson.
3463 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
3465 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
3466 make work for unaligned access.
3468 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
3470 * class.c: small cleanup (class->fields [i] -> field).
3471 * image.c: check address of metadata is valid.
3473 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
3475 * assembly.h assembly.c (mono_assembly_loaded): New public function to
3476 search the list of loaded assemblies.
3478 * reflection.c (mono_reflection_type_from_name): Use
3479 mono_assembly_loaded instead of mono_image_loaded.
3481 * reflection.c: Fix warnings.
3483 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
3485 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
3486 is dynamic. This is needed since an assembly can contain both dynamic and
3489 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
3492 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
3494 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
3495 to store modules loaded using AddModule.
3497 * reflection.c (mono_image_fill_file_table): Generalize this so it works
3500 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
3502 * reflection.c (mono_image_fill_export_table_from_module): New function to
3503 fill out the EXPORTEDTYPES table from a module.
3505 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
3506 into a separate function. Also handle loaded non-dynamic modules.
3508 * reflection.c (mono_image_basic_init): Fix memory allocation.
3510 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3512 * assembly.c (mono_assembly_load_references): Make this public.
3514 2003-12-19 Martin Baulig <martin@ximian.com>
3516 * class.c (mono_class_initialize_generic): Made this static, take
3517 a `MonoGenericInst *' instead of a `MonoClass *'.
3518 (mono_class_from_generic): Call mono_class_initialize_generic()
3519 unless we're already initialized or being called from
3520 do_mono_metadata_parse_generic_inst().
3522 * class.h (MonoGenericInst): Added `initialized' and
3523 `init_pending' flags.
3525 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
3526 `mono_class_init (gklass)' or mono_class_initialize_generic()
3527 here; set `generic_inst->init_pending' while parsing the
3530 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
3532 * locales.c: include string.h for memxxx prototypes
3534 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
3536 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
3537 constructor when accessing literal fields.
3539 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
3541 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
3543 * reflection.c (assembly_add_resource_manifest): New function to fill
3544 the MANIFESTRESOURCE table.
3546 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
3548 * reflection.h: Update to changes in class layout.
3550 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
3551 Reenable call to mono_runtime_is_shutting_down ().
3553 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
3554 determine if the runtime is shutting down.
3556 2003-12-16 Jackson Harper <jackson@ximian.com>
3558 * icall.c: comment out call to mono_runtime_is_shutting_down to
3561 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
3563 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
3564 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
3566 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
3568 * reflection.c: move definition of swap_with_size
3569 to before its first call
3571 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
3573 * appdomain.c (mono_runtime_is_shutting_down): New public function.
3575 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
3578 * object.c: Fix warnings.
3580 * icall.c (ves_icall_Type_Get...): Only consider inherited static
3581 members if FlattenHierarchy is set.
3583 * reflection.c (mono_image_add_decl_security): New function to emit
3584 declarative security.
3586 * reflection.h reflection.c: Add support for declarative security.
3588 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
3590 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
3592 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
3594 * appdomain.c verify.c: Moved corlib version checking into its own
3595 function in appdomain.c since it needs to create vtables etc.
3597 2003-12-13 Patrik Torstensson <p@rxc.se>
3599 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
3600 instead of unwrapped server.
3602 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
3604 * verify.c (check_corlib): Fix field index.
3606 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
3608 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
3611 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
3613 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
3614 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
3615 cope with sizeof(size_t) != sizeof(guint32).
3617 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3619 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
3622 2003-12-10 Mark Crichton <crichton@gimp.org>
3624 * icall.c: removed the GetNonZeroBytes. We now handle this case
3627 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
3629 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
3631 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
3634 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
3636 * verify.c (check_corlib): Handle the case when the version field is
3637 initialized by a static constructor.
3639 2003-12-08 Patrik Torstensson <p@rxc.se>
3641 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
3643 2003-12-08 Martin Baulig <martin@ximian.com>
3645 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
3646 a MonoReflectionGenericParameter, also take the parameter index
3647 and name as arguments.
3648 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
3649 (ves_icall_MonoGenericParam_initialize): New interncall.
3650 (ves_icall_Type_make_byref_type): New interncall.
3652 * reflection.h (MonoReflectionGenericParam): Derive from
3653 MonoReflectionType, not just from MonoObject. Added `refobj' and
3656 * reflection.c (mono_reflection_define_generic_parameter): Create
3657 and return a new MonoReflectionGenericParam; don't initialize the
3659 (mono_reflection_initialize_generic_parameter): New public method;
3660 initializes the constraints and creates the `param->pklass'.
3662 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
3664 * reflection.h reflection.c: Use the new fields 'num_types',
3665 'num_fields' and 'num_methods' to track the number of types etc.
3667 * verify.c (check_corlib): Check corlib version number.
3669 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
3671 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
3672 function works on all methods.
3674 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
3676 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
3677 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
3678 the custom_type_info flag of the transparent proxy.
3679 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
3680 objects that supports IRemotingTypeInfo.
3681 * object.h: Added custom_type_info field in transparent proxy.
3683 2003-12-06 Martin Baulig <martin@ximian.com>
3685 * class.c (mono_class_create_from_generic): Removed.
3686 (mono_class_from_generic): Check `ginst->klass' before doing
3687 anything else. This is important to fully support "recursive"
3690 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
3691 empty `generic_inst->klass' before doing anything else.
3693 2003-12-06 Dick Porter <dick@ximian.com>
3698 * locales.c: Use C structs to access class fields. Don't do a
3699 conversion between MonoString and UChar because both are
3700 platform-endian UTF-16. Compare now takes startindex and count
3701 parameters. Add a char overload for IndexOf. Speed up the
3702 invariant string IndexOf.
3704 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
3706 * Makefile.am (monosn_LDADD): Fix parallel build.
3708 2003-12-04 Martin Baulig <martin@ximian.com>
3711 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
3712 (ves_icall_Type_make_array_type): New interncall.
3714 2003-12-04 Martin Baulig <martin@ximian.com>
3716 * locales.c: also change it in the !HAVE_ICU case.
3718 2003-12-04 Dick Porter <dick@ximian.com>
3721 * locales.c: construct_compareinfo is now in CompareInfo, not
3724 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
3726 * image.c (mono_image_load_file_for_image): Cache loaded images in the
3729 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
3732 * assembly.c (mono_assembly_load_references): Only load references
3735 * class.c (mono_class_from_name): Avoid linear search of the
3738 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
3740 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
3742 * image.h (MonoImage): Add 'field_cache' field.
3744 * loader.c (mono_field_from_token): Cache field lookups.
3746 * reflection.c (mono_module_get_object): Fix name property.
3748 * icall.c (ves_icall_get_enum_info): Update after changes to
3749 mono_metadata_get_constant_index ().
3751 * icall.c: Get rid of get_type_info icall, use a separate icall for
3752 each type property to avoid needless memory allocations. Fixes #51514.
3754 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
3755 to avoid needless binary searches.
3757 * class.c (class_compute_field_layout): Move the initialization of
3758 field->def_value to mono_class_vtable ().
3760 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
3763 * object.c (mono_object_allocate): Make it inline.
3765 * object.c (mono_object_allocate_spec): Make it inline.
3767 2003-12-02 Dick Porter <dick@ximian.com>
3769 * locales.c (create_NumberFormat): NumberFormatInfo construction.
3770 Patch by Mohammad DAMT (mdamt@cdl2000.com).
3772 2003-12-01 Dick Porter <dick@ximian.com>
3774 * threads.c: Fix signature and call in CreateMutex and
3777 2003-12-01 Dick Porter <dick@ximian.com>
3780 * locales.c: Implement string compares and searching
3782 * object.h: Add extra Thread field
3784 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
3786 * reflection.c (fixup_method): Add support for MonoCMethod.
3788 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
3790 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
3792 * reflection.c (assembly_name_to_aname): Allow extra characters in
3793 assembly names. Fixes #51468.
3795 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
3797 * exception.c (mono_exception_from_name_domain): New helper function.
3799 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
3800 exception object in the correct domain.
3802 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
3803 formatting + make a copy a the input data.
3805 * loader.c (mono_get_method_from_token): Methods which contain
3806 native code do not have entries in the ImplMap.
3808 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
3809 Thanks to Gonzalo for spotting this.
3811 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
3812 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
3814 * assembly.h (mono_assembly_load_from): Split the second part of
3815 assembly loading into a new public function.
3817 * exception.h (mono_get_exception_bad_image_format): New function.
3819 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
3821 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
3822 Enumerate all modules inside a dynamic assembly. Fixes #51293.
3824 * icall.c: Add new icall for creating dynamic methods.
3826 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
3828 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
3830 * reflection.c (mono_reflection_create_dynamic_method): New icall to
3831 create a dynamic method.
3833 * reflection.c (resolve_object): New helper function.
3835 * reflection.c: Generalize ReflectionMethodBuilder and the functions
3836 which manipulate it so they can also work on dynamic methods.
3838 * reflection.c (reflection_method_builder_to_mono_method): Avoid
3839 creating the MonoReflectionMethodAux structure if it is not needed.
3841 * reflection.h verify.c: Update after changes to object layout.
3843 * reflection.c (method_builder_encode_signature): Fix compilation on
3846 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
3848 * appdomain.h: Added support for context static fields. Added static_data
3849 field to MonoAppContext and renamed thread_static_fields to a more
3850 generic special_static_fields in MonoAppDomain, since it can now contain
3851 context static fields.
3852 * domain.c: Updated hashtable name.
3853 * object.c: Replaced field_is_thread_static() for a more generic
3854 field_is_special_static() which also checks for context static attribute.
3855 In mono_class_vtable(), added support for static context fields.
3856 * threads.c: Changed methods that manage thread static fields to more
3857 generic methods so they can be reused both for thread and context static
3859 * threads.h: Declared some new methods.
3861 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
3863 * reflection.h: Update after changes to the managed types.
3865 * reflection.c (encode_custom_modifiers): New helper function.
3867 * reflection.c (method_encode_signature): Emit custom modifiers.
3869 * reflection.c (field_encode_signature): Emit custom modifiers.
3871 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
3873 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
3875 * icall.c (ves_icall_System_ValueType_Equals): New optimized
3878 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
3881 * object.c (mono_field_get_value_object): New function.
3883 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
3886 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
3888 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
3889 return a preallocated out-of-memory exception instance.
3891 * object.c (out_of_memory): Use the new function.
3893 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
3894 flag is before the custom modifiers. Fixes #49802.
3896 2003-11-16 Martin Baulig <martin@ximian.com>
3898 * class.c (mono_class_is_open_constructed_type): Implemented the
3899 MONO_TYPE_GENERICINST case.
3901 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
3903 * assembly.c (mono_assembly_fill_assembly_name): New function to
3904 fill out the MonoAssemblyName structure.
3905 (mono_assembly_open): Use the new function.
3907 * icall.c (fill_reflection_assembly_name): New helper function.
3909 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
3912 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
3914 2003-11-15 Martin Baulig <martin@ximian.com>
3916 * class.c (mono_class_is_open_constructed_type): New public
3917 function; checks whether a type is an open constructed type,
3918 ie. whether it still contains type parameters.
3919 (mono_class_inflate_generic_type): If we're a type parameter and
3920 the inflated type is also a MONO_TYPE_(M)VAR, return the original
3923 * class.h (MonoGenericInst): Added `guint32 is_open'.
3925 * loader.c (method_from_methodspec): Check whether we're an open
3926 or closed constructed type and set `ginst->is_open'.
3928 * reflection.c (mono_reflection_bind_generic_parameters): Check
3929 whether we're an open or closed constructed type and set
3931 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
3932 from open constructed types.
3934 2003-11-15 Martin Baulig <martin@ximian.com>
3936 * reflection.c (mono_reflection_bind_generic_parameters): If we're
3937 a generic instance (instead of a generic type declaration) with
3938 unbound generic parameters, bind them to our actual types.
3940 2003-11-14 Martin Baulig <martin@ximian.com>
3942 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
3944 * reflection.c (mono_reflection_bind_generic_parameters): If we're
3945 an interface type, populate `res->interfaces' with instantiated
3946 versions of all the interfaces we inherit.
3948 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
3950 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
3951 when MONO_PATH is set but doesn't contain the install dir.
3953 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3956 (ves_icall_Type_GetInterfaces): don't return an interface twice when
3957 it's also implemented in base classes. Fixes bug #50927.
3959 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
3961 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
3962 if this method is called from a finalizer. Fixes #50913.
3964 2003-11-12 Miguel de Icaza <miguel@ximian.com>
3966 * threads.c: Implement VolatileRead/VolatileWrite
3968 * icall.c: Add new icalls for VolatileRead/VolatileWrite
3970 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
3972 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
3973 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
3976 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
3977 from Peter Ross (pro@missioncriticalit.com).
3979 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
3981 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
3983 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
3985 * assembly.c (mono_assembly_load_references): Disable check because it
3986 triggers on older corlibs which lots of people have.
3988 2003-11-12 Jackson Harper <jackson@ximian.com>
3990 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
3991 load corlib.dll if mscorlib.dll is not found.
3992 * assembly.h: Remove corlib name define.
3995 * image.c: Change corlib name to mscorlib.
3997 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
3999 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
4001 2003-11-11 Miguel de Icaza <miguel@ximian.com>
4003 * appdomain.h: Added loader_optimization here to sync with the C#
4004 code, and add disallow_binding_redirects field.
4006 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
4008 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
4010 * reflection.c (mono_image_build_metadata): Fix crash on modules
4013 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
4015 * icall.c (ves_icall_get_method_info): Return callingConvention as
4018 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
4019 namespaces from the EXPORTEDTYPE table as well.
4021 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
4022 from all modules inside the assembly.
4024 2003-11-11 Martin Baulig <martin@ximian.com>
4026 * reflection.c (mono_reflection_bind_generic_parameters): Make
4027 this work for interfaces.
4029 2003-11-11 Martin Baulig <martin@ximian.com>
4031 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
4033 2003-11-11 Martin Baulig <martin@ximian.com>
4035 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
4036 "MonoInflatedMethod" and "MonoInflatedCtor".
4038 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
4040 * reflection.c (resolution_scope_from_image): Use the assembly table
4041 from the manifest module, since other modules don't have it.
4043 * debug-helpers.c (mono_type_full_name): New helper function.
4045 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
4047 * image.c (mono_image_load_file_for_image): New public function which
4048 is a replacement for the load_file_for_image in class.c.
4050 * assembly.c (mono_assembly_load_module): A wrapper for the function
4051 above which does assembly association and reference loading too.
4053 * class.c (mono_class_from_name): Call mono_assembly_load_module.
4055 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4057 * appdomain.c: not all of the attributes for the full assembly name
4058 are required and the order doesn't matter. Fixes bug #50787.
4060 2003-11-10 Dick Porter <dick@ximian.com>
4062 * locales.c: Use platform-endian UTF16
4064 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
4066 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
4068 2003-11-10 Martin Baulig <martin@ximian.com>
4071 (mono_metadata_load_generic_params): Make this actually work.
4073 * reflection.c (mono_reflection_bind_generic_parameters): If our
4074 parent is a generic instance, pass all the `types' to it, no
4075 matter whether it has the same number of type parameters or not.
4077 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
4079 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
4081 * assembly.c (mono_assembly_load_references): Move the image<->assembly
4082 assignment code to this function so it gets called recursively for all
4085 * image.c (load_modules): Remove the assembly assignment since it is
4086 now done by mono_assembly_load_references.
4088 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
4089 Add 'module' argument.
4090 (mono_module_get_types): New helper function.
4091 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
4093 2003-11-08 Martin Baulig <martin@ximian.com>
4095 * class.c (mono_class_inflate_generic_method): Interface method
4096 don't have a header.
4098 * reflection.c (mono_image_get_methodspec_token): Take an
4099 additional `MonoGenericInst *' argument instead of reading it from
4100 the header; this is necessary to support interfaces.
4101 (mono_image_create_token): Pass the `MonoGenericInst *' from the
4102 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
4103 (inflated_method_get_object): Take an additional `MonoGenericInst *'
4106 * reflection.h (MonoReflectionInflatedMethod): Added
4107 `MonoGenericInst *ginst'.
4109 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
4111 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
4113 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
4115 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
4117 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
4120 (reflection_methodbuilder_from_method_builder):
4121 (reflection_methodbuilder_from_ctor_builder): New helper functions to
4122 initialize a ReflectionMethodBuilder structure.
4123 (mono_image_get_methodbuilder_token):
4124 (mono_image_get_ctorbuilder_token): New functions to emit memberref
4125 tokens which point to types in another module inside the same assembly.
4127 * reflection.c: Use the new helper functions.
4129 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
4131 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
4132 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
4134 * reflection.c (resolution_scope_from_image): Emit a moduleref if
4137 * reflection.c (mono_image_build_metadata): Emit metadata only for the
4138 current module. Emit the manifest only for the main module.
4140 * reflection.c (mono_image_create_token): Add assertion when a
4141 memberref needs to be created.
4143 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
4145 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
4146 larger buffer for the custom attribute blob. Fixes #50637.
4148 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4150 * threadpool.c: notify listener on async processing handles after
4151 invoking the async callback. Thanks to Zoltan.
4153 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
4155 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
4156 avoid code duplication.
4158 * reflection.h (MonoDynamicImage): New type which is currently unused,
4159 but will be used through the ref.emit code in place of
4160 MonoDynamicAssembly.
4162 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
4165 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
4166 a MonoDynamicImage instead of just a MonoImage.
4168 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
4169 icalls to ModuleBuilder but keep their semantics, so they will work
4170 with moduleb->assemblyb. This will change later.
4172 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
4174 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
4177 * reflection.c (mono_image_build_metadata): Avoid creation of a default
4178 main module, since it is now done by the managed code.
4180 2003-11-03 Martin Baulig <martin@ximian.com>
4182 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
4183 `ginst->klass' here.
4184 (method_encode_methodspec): Don't use the `ginst->generic_method's
4185 klass if it's a generic instance, use `ginst->klass' in this case.
4187 2003-11-03 Martin Baulig <martin@ximian.com>
4189 * reflection.c (mono_image_get_generic_method_param_info):
4190 Removed, use mono_image_get_generic_param_info() instead.
4191 (mono_image_get_type_info): Write the GenericParam table before
4192 the Method table. This is neccessary because in the GenericParam
4193 table, type parameters of the class (ie. '!0' etc.) must come
4194 before the ones from its generic methods (ie. '!!0' etc).
4196 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
4198 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
4200 2003-11-02 Martin Baulig <martin@ximian.com>
4202 * reflection.c (create_generic_typespec): Take a
4203 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
4204 the generic parameters from it.
4206 2003-11-02 Martin Baulig <martin@ximian.com>
4208 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
4209 instead of a `MonoClassField *' since we just need the type.
4210 (create_generic_typespec): New static function. Creates a
4211 TypeSpec token for a generic type declaration.
4212 (mono_image_get_generic_field_token): New static function.
4213 (mono_image_create_token): If we're a FieldBuilder in a generic
4214 type declaration, call mono_image_get_generic_field_token() to get
4217 2003-11-02 Martin Baulig <martin@ximian.com>
4220 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
4221 `MonoReflectionGenericInst *declaring_type' and
4222 `MonoReflectionGenericInst *reflected_type' fields.
4224 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
4225 `MonoReflectionGenericInst *declaring_type' and a
4226 `MonoReflectionGenericInst *reflected_type' argument instead of a
4227 single `MonoReflectionGenericInst *type' one. Set
4228 `res->declaring_type' and `res->reflected_type' from them.
4229 (mono_reflection_inflate_field): Likewise.
4231 2003-11-02 Martin Baulig <martin@ximian.com>
4233 * class.c (mono_class_setup_vtable): Don't store generic methods
4236 2003-11-02 Martin Baulig <martin@ximian.com>
4238 * reflection.h (MonoReflectionGenericInst): Added
4239 `MonoReflectionType *declaring_type'.
4241 * reflection.c (mono_reflection_bind_generic_parameters): Use
4242 `if (tb->parent)' instead of `klass->parent'.
4244 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
4246 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
4247 with an empty ASSEMBLY table.
4249 * reflection.c (mono_image_build_metadata): Avoid using the same loop
4250 variable in the inner and outer loops.
4252 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
4254 * metadata.h (mono_metadata_make_token): Put parentheses around macro
4257 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
4259 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
4260 icalls. Instead, do everything in managed code. This is needed since
4261 it is hard to restore the original domain etc. in unmanaged code in the
4262 presence of undeniable exceptions.
4264 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
4265 New icalls to push and pop appdomain refs.
4267 2003-10-31 Martin Baulig <martin@ximian.com>
4269 * class.c (inflate_generic_type): Renamed to
4270 mono_class_inflate_generic_type() and made it public.
4272 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
4275 * loader.c (mono_field_from_memberref): Also set the retklass for
4278 * fielder.c (mono_image_get_inflated_field_token): New static
4279 method; creates a metadata token for an inflated field.
4280 (mono_image_create_token, fixup_method): Added support for
4281 "MonoInflatedField".
4282 (fieldbuilder_to_mono_class_field): New static function.
4283 (mono_reflection_inflate_field): New public function.
4286 (MonoReflectionGenericInst): Added `MonoArray *fields'.
4287 (MonoReflectionInflatedField): New typedef.
4289 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
4291 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
4292 for Solaris and other platforms without s6_addr16
4294 2003-10-30 Martin Baulig <martin@ximian.com>
4296 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
4297 argument instead of two.
4298 (mono_class_inflate_generic_signature): Likewise.
4299 (inflate_generic_header): Likewise.
4300 (mono_class_inflate_generic_method): Likewise. In addition, if
4301 `ginst->klass' is set, it becomes the new `method->klass'.
4303 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
4306 * reflection.c (encode_generic_method_sig): Write a 0xa as the
4308 (method_encode_methodspec): If we have generic parameters, create
4309 a MethodSpec instead of a MethodRef.
4310 (fixup_method): Added support for "MonoInflatedMethod" and
4312 (mono_image_create_token): Added support for "MonoInflatedMethod"
4313 and "MonoInflatedCtor".
4314 (inflated_method_get_object): New static function; returns a
4315 managed "System.Reflection.MonoInflatedMethod" object.
4316 (mono_reflection_bind_generic_method_parameters): Return a
4317 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
4318 (mono_reflection_inflate_method_or_ctor): Likewise.
4319 (mono_image_get_generic_method_param_info): Initialize unused
4321 (mono_image_get_generic_param_info): Likewise.
4323 * reflection.h (MonoReflectionInflatedMethod): New public
4324 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
4325 "S.R.MonoInflatedCtor" classes.
4327 * loader.c (method_from_memberref): If we're a TypeSpec and it
4328 resolves to a generic instance, inflate the method.
4330 2003-10-28 Dick Porter <dick@ximian.com>
4332 * object.c (mono_runtime_run_main): Convert command-line arguments
4333 into utf8, falling back to the user's locale encoding to do so.
4335 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
4337 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
4340 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
4342 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
4343 up icalls at method definition time. Partially fixes #33569.
4345 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
4347 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
4348 marshalling of arrays. Fixes #50116.
4350 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
4352 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
4353 points to a vtable in the dying appdomain.
4355 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
4356 listeners into unmanaged code inside the lock.
4358 * object.c (mono_class_vtable): Turn off typed allocation in non-root
4359 domains and add some comments.
4361 2003-10-25 Martin Baulig <martin@ximian.com>
4363 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
4365 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
4367 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
4368 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
4369 currently parsing. Create the generic class and store it in
4370 `generic_inst->klass' before parsing the type arguments. This is
4371 required to support "recursive" definitions; see mcs/tests/gen-23.cs
4373 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
4374 to support recursive typespec entries.
4376 * class.c (mono_class_setup_parent): If our parent is a generic
4377 instance, we may get called before it has its name set.
4378 (mono_class_from_generic): Splitted into
4379 mono_class_create_from_generic() and mono_class_initialize_generic().
4381 2003-10-25 Martin Baulig <martin@ximian.com>
4383 * icall.c (ves_icall_Type_BindGenericParameters): Return a
4384 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
4385 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
4386 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
4388 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
4389 (create_typespec): Likewise.
4390 (mono_reflection_bind_generic_parameters): Return a
4391 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
4392 (mono_reflection_inflate_method_or_ctor): New public function.
4394 * reflection.h (MonoReflectionGenericInst): New typedef.
4396 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
4398 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
4399 inside the domain lock. Fixes #49993.
4401 * object.c (mono_class_vtable): When typed allocation is used,
4402 allocate vtables in the GC heap instead of in the mempool, since the
4403 vtables contain GC descriptors which are used by the collector even
4404 after the domain owning the mempool is unloaded.
4406 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
4408 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
4409 reflect what it does. Also invalidate mempools instead of freeing
4410 them if a define is set.
4412 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
4415 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
4416 hold the finalizable objects in this domain.
4418 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
4421 * appdomain.c (mono_domain_set): New function to set the current
4422 appdomain, but only if it is not being unloaded.
4424 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
4425 appdomain which is being unloaded.
4427 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
4428 unloading of the root appdomain.
4430 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
4431 icall to execute a method in another appdomain. Intended as a
4432 replacement for InternalSetDomain, which can confuse the code
4433 generation in the JIT.
4435 * appdomain.c (mono_domain_is_unloading): New function to determine
4436 whenever an appdomain is unloading.
4438 * appdomain.c (mono_domain_unload): New function to correctly unload
4441 * assembly.c (mono_assembly_load_references): Check that an assembly
4442 does not references itself.
4444 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
4445 domain manually, it asks the finalizer thread to do it, then waits for
4446 the result. Also added a timeout.
4448 * icall.c: Register the new icalls.
4450 * threads.h threads.c: Export the mono_gc_stop_world and
4451 mono_gc_start_world functions.
4453 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
4454 function to fill out the mempool with 0x2a.
4456 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
4458 * reflection.h (MonoReflectionMethodAux): New structure to store
4459 information which is rarely used, thus is not in the MonoMethod
4462 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
4465 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
4466 and marshalling info into the aux structure.
4468 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
4469 from the aux structure.
4471 * loader.c (mono_method_get_param_names): Retrieve the param names from
4474 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
4476 * exception.h exception.c: Add AppDomainUnloadedException && fix
4479 2003-10-21 Dick Porter <dick@ximian.com>
4482 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
4483 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
4485 2003-10-21 Martin Baulig <martin@ximian.com>
4487 * reflection.c (mono_reflection_bind_generic_parameters):
4488 `klass->parent' is NULL for interfaces.
4490 2003-10-21 Martin Baulig <martin@ximian.com>
4492 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
4494 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
4496 * exception.c (mono_exception_from_name_msg): New helper function for
4497 creating exceptions and initializing their message field.
4499 * exception.c: Simplify functions using the new helper.
4501 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
4504 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
4505 mono_raise_exception, since otherwise gcc doesn't generate the function
4506 epilog for raise_exception, confusing the stack unwinding in the JIT.
4509 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
4510 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
4513 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4515 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
4518 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
4520 * icall.c: Removed GetUninitializedObject method because
4521 AllocateUninitializedClassInstance does the same.
4523 2003-10-18 Martin Baulig <martin@ximian.com>
4525 * class.c (inflate_generic_signature): Renamed to
4526 mono_class_inflate_generic_signature() and made it public.
4527 (my_mono_class_from_generic_parameter): New static function; if we
4528 don't already have the generic parameter's MonoClass, create a
4529 very simple one which is just used internally in the runtime and
4530 not passed back to managed code.
4532 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
4534 * metadata.h (MonoMethodSignature): Moved the
4535 `MonoGenericParam *gen_params' to the MonoMethodHeader.
4536 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
4538 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
4539 ves_icall_MonoMethod_GetGenericArguments(); this is now an
4540 interncall on the MonoMethod class, not on MethodInfo.
4541 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
4542 calling mono_reflection_bind_generic_method_parameters() directly.
4544 * loader.c (mono_method_get_signature): If this is a MethodSpec;
4545 return the already computed `method->signature'.
4546 (method_from_methodspec): New static function to load a method
4547 from a MethodSpec entry.
4548 (mono_get_method_from_token): Call the new method_from_methodspec()
4549 for MethodSpec tokens.
4550 (mono_get_method_from_token): If we're a generic method, load the
4553 * reflection.c (mono_image_get_memberref_token): Allow
4554 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
4556 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
4557 (mono_image_create_token): First check whether it's a generic
4558 method (so we'd need to create a MethodSpec), then do the other
4560 (mono_reflection_bind_generic_method_parameters): Return a
4561 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
4562 called directly from the interncall.
4564 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
4566 * reflection.c (load_public_key): Move loading of the public key
4569 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
4571 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
4574 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
4575 culture, hash_alg and public_key. Fixes #49555.
4577 2003-10-17 Martin Baulig <martin@ximian.com>
4579 * class.h (MonoGenericInst): Moved this declaration here and added
4580 `MonoMethod *generic_method'.
4583 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
4584 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
4586 * metadata.c (mono_metadata_type_equal): Two types of
4587 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
4588 index; ie. don't compare the address of the `MonoGenericParam'
4590 (mono_metadata_load_generic_params): Removed the `MonoMethod
4593 * metadata.h (MonoGenericInst): Moved declaration to class.h.
4594 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
4596 * reflection.c (method_encode_signature): Encode the number of
4598 (encode_generic_method_sig): New static function.
4599 (method_encode_methodspec): New static function; creates an entry
4600 in the MethodSpec table for a generic method.
4601 (mono_image_get_methodspec_token): New static function.
4602 (mono_image_create_token): Call mono_image_get_methodspec_token()
4603 for generic methods.
4604 (mono_reflection_bind_generic_method_parameters): New public
4605 function. Instantiates a generic method.
4607 2003-10-16 Martin Baulig <martin@ximian.com>
4609 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
4610 *gen_params' here from MonoMethodHeader.
4612 * metadata.c (mono_metadata_parse_method_signature): If we have
4613 generic parameters, initialize `method->gen_params' and then set
4614 the correct `type->data.generic_param' in all the parameters.
4616 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
4618 * threads.c (mono_threads_get_default_stacksize): New function to
4619 return the default stacksize.
4621 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
4622 termination of the finalizer thread, since the previous method had
4623 race conditions. Fixes #49628.
4625 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
4626 as for the other managed threads.
4628 2003-10-16 Martin Baulig <martin@ximian.com>
4630 * class.c (inflate_generic_signature): Copy `generic_param_count'
4633 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
4636 * metadata.c (mono_metadata_parse_method_signature): Actually set
4637 the `method->generic_param_count' here.
4638 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
4640 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
4642 * object.h: Add a new field to TypedRef to simplify the implementation
4643 of the REFANY opcodes in the JIT.
4645 * icall.c: Make use of the new field.
4647 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
4650 2003-10-15 Martin Baulig <martin@ximian.com>
4652 * class.c (mono_class_from_gen_param): Renamed to
4653 mono_class_from_generic_parameter() and moved most of the
4654 functionality from mono_reflection_define_generic_parameter()
4655 here; ie. we create a "real" class here.
4656 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
4657 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
4658 previously been called.
4660 * class.h (MonoGenericParam): Moved the declaration of this struct
4661 here from metadata.h and added `MonoMethod *method'.
4663 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
4666 * loader.c (mono_get_method_from_token): If we have any generic
4667 parameters, call mono_metadata_load_generic_params() to read them
4668 from the MONO_TABLE_GENERICPAR.
4670 * metadata.c (mono_metadata_load_generic_params): Added
4671 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
4673 * metadata.h (MonoMethodSignature): Replaced
4674 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
4675 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
4677 * reflection.c (mono_reflection_define_generic_parameter): Moved
4678 most of the functionality into the new
4679 mono_class_from_generic_parameter(); set the `method' field if
4680 we're a method parameter.
4682 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
4684 * marshal.c (emit_struct_conv): if native size is 0
4687 2003-10-14 Martin Baulig <martin@ximian.com>
4689 * icall.c: The generics API has changed in the spec since it was
4690 added to System.Type; these modifications make it match the spec
4692 (ves_icall_Type_GetGenericParameters): Renamed to
4693 `ves_icall_Type_GetGenericArguments'.
4694 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
4695 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
4696 `ves_icall_MonoType_get_HasGenericArguments'.
4697 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
4698 `ves_icall_MonoType_get_IsGenericParameter'.
4699 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
4700 this is no interncall anymore.
4701 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
4702 `ves_icall_TypeBuilder_get_IsGenericParameter'.
4704 2003-10-14 Martin Baulig <martin@ximian.com>
4706 * reflection.c (mono_reflection_bind_generic_parameters): Also
4707 inflate generic methods if we're reading the class from IL.
4709 2003-10-13 Martin Baulig <martin@ximian.com>
4711 * reflection.c (mono_reflection_define_generic_parameter): This
4712 method isn't called directly from the icall anymore; take a
4713 `MonoReflectionAssemblyBuilder *' so we can use this for type and
4714 method generic parameters.
4715 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
4716 (method_builder_encode_signature): Encode generic parameters.
4717 (mono_image_get_method_info): Write generic params to the
4718 MONO_TABLE_GENERICPARAM table.
4720 * reflection.h (MonoReflectionMethodBuilder): Added
4721 `MonoArray *generic_params'.
4723 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
4725 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
4726 wrapper for mono_reflection_define_generic_parameter().
4727 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
4729 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
4731 * marshal.h: Add missing function to fix build.
4733 * marshal.c (mono_marshal_get_native_wrapper): Add support for
4734 the SetLastError pinvoke attribute.
4736 * marshal.c (mono_marshal_set_last_error): New helper function called
4737 by the generated code.
4739 * marshal.c (mono_mb_emit_branch): New helper function.
4741 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
4743 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
4744 classes as parameters and return values of delegates. Fixes #29256.
4746 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
4748 * locales.c: use gint32 in non HAVE_ICU case
4750 2003-10-11 Martin Baulig <martin@ximian.com>
4752 * mono-debug.c (mono_debug_add_method): Added a workaround for
4755 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
4757 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
4758 delegates passed to native code must use the STDCALL calling
4759 convention. Fixes #35987.
4761 2003-10-10 Martin Baulig <martin@ximian.com>
4763 * class.c (inflate_generic_type): If we're inflating for a generic
4764 type instance (and not for a generic method), return
4765 MONO_TYPE_MVAR unchanged.
4767 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4769 * string-icalls.c: Join ignores null strings in the source array.
4770 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
4771 * threads.c: GetAvailableTheads is slightly more accurate.
4773 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
4775 * threads.h threads.c : add mono_threads_set_default_stacksize
4776 and pass default to CreateThread calls.
4778 2003-10-09 Dick Porter <dick@ximian.com>
4782 * locales.c: Internal calls for constructing CultureInfo and
4783 related objects from libicu (if its available.)
4785 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
4787 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
4789 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4791 * threadpool.c: added an argument to async_invoke_thread that is the
4792 item to process, pass the MonoAsyncResult to the thread start function
4793 when creating a new thread. This way we don't need to acquire any lock
4794 when we're creating a new thread. Readded a semaphore for faster
4795 response times (instead of that Sleep i added).
4797 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
4799 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
4800 get daylight change dates better on Windows, fix handling
4801 of platforms without tm_gmtoff.
4803 2003-10-06 Martin Baulig <martin@ximian.com>
4805 * class.c (inflate_generic_method): Renamed to
4806 mono_class_inflate_generic_method() and made public.
4807 (mono_class_init): Don't inflate the generic methods here.
4808 (mono_class_from_generic): Added `gboolean inflate_methods'
4809 argument. Inflate the methods here.
4811 * loader.c (mono_method_get_param_names): Ignore instances of
4812 generic types for the moment.
4814 * reflection.c (fixup_method): Added support for inflated methods.
4815 (mono_image_create_token): Use mono_image_get_methodref_token()
4816 for inflated methods.
4817 (mono_custom_attrs_from_param): Ignore instances of generic types
4819 (mono_reflection_bind_generic_parameters): New public function.
4820 Moved all the functionality from
4821 ves_icall_Type_BindGenericParameters() here and added support for
4823 (mono_reflection_define_generic_parameter): Initialize
4824 `klass->methods' here.
4826 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
4827 functionality into mono_reflection_define_generic_parameter().
4828 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
4829 TypeBuilder, return that TypeBuilder.
4831 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4833 * appdomain.c: removed mono_delegate_semaphore.
4836 (mono_thread_pool_add): moved hash table creation inside and the thread
4837 creation outside of the critical region.
4838 (mono_thread_pool_finish): removed obsolete code.
4839 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
4840 continue or exit the thread depending on the queue.
4842 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
4844 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
4845 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
4846 handle more bool marshalling options
4848 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
4850 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
4851 arrays of structs. Also add a more descriptive error message when
4852 a structure member is marshalled as LPArray.
4854 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
4856 * marshal.c (mono_marshal_get_native_wrapper): Add support for
4857 marshalling arrays of complex types. Fixes #29098. Also remove an
4858 usused and incomplete function.
4860 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
4862 * gc.c: report heap_size - free_bytes as total memory allocated
4865 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
4867 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
4868 fix timezone handling problems on Windows.
4870 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
4871 asserts when the year is outside the range handled by ms the functions.
4873 * class.c (setup_interface_offsets): If the class is an interface,
4874 fill out its interface_offsets slot.
4876 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4878 * threadpool.c: mark threadpool threads as background.
4880 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
4882 * decimal.c - define DECINLINE to nothing if not using GCC
4884 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
4886 * assembly.c: More refcount fixes.
4888 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4890 * string-icalls.c: if we're not trimming, return the same string.
4891 When not splitting, don't create a new string.
4893 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4896 (mono_image_open): increment the ref_count inside the critical section.
4898 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
4900 * image.c (mono_image_open): Fix reference counting bug.
4902 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
4904 * marshal.c (mono_marshal_type_size) struct alignment changed for
4905 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
4906 64bits. Avoid leak in mono_marshal_get_native_wrapper when
4907 mono_lookup_pinvoke_call throws.
4909 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
4911 * reflection.c (mono_reflection_parse_type): Fix #49114.
4913 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
4914 temporary workaround for cygwin header problem.
4916 * object.c (mono_object_isinst): Synchronize this with the code
4917 generated by the JIT for casts.
4919 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
4921 * reflection.c (encode_type): Fix #38332.
4923 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
4925 * marshal.c (mono_marshal_method_from_wrapper): New function to return
4926 the original method from the wrapper method.
4928 2003-09-25 Martin Baulig <martin@ximian.com>
4930 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
4931 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
4932 (ves_icall_Type_get_IsGenericInstance): New interncall.
4934 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
4936 * object.c: fix cast warning in big endian code.
4938 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
4940 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
4942 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4944 * assembly.c: don't call check_env from mono_assembly_load. It's
4945 already done once in mono_assemblies_init and may cause headaches when
4946 multiple threads are loading assemblies.
4948 2003-09-19 Martin Baulig <martin@ximian.com>
4950 * reflection.c (mono_reflection_define_generic_parameter): Don't
4951 allocate `klass->methods', set `klass->flags' to
4952 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
4954 2003-09-18 Martin Baulig <martin@ximian.com>
4956 * class.c (mono_class_init): Don't create `class->methods' if it's
4957 already initialized.
4959 * metadata.c (mono_metadata_load_generic_params): Make this
4962 * reflection.c (mono_reflection_define_generic_parameter): Set
4963 parent class and interfaces from the constraints.
4965 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
4966 to keep this struct in sync with the declaration in TypeBuilder.cs.
4968 2003-09-17 Martin Baulig <martin@ximian.com>
4970 * metadata.h (MonoType): Replaced the data's `int type_param'
4971 field with `MonoGenericParam *generic_param'.
4972 (MonoGenericParam): Added `MonoClass *klass'.
4974 * class.c (mono_class_from_gen_param): Removed the
4975 `MonoImage *image' and `int type_num' arguments.
4977 * metadata.c (mono_metadata_parse_generic_param): New static
4978 method; creates a MonoGenericParam which just contains the index.
4979 (do_mono_metadata_parse_type): Call
4980 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
4983 * reflection.c (mono_image_typedef_or_ref): Generic type
4984 parameters may be in the same assembly, but never use a typedef
4986 (mono_reflection_define_generic_parameter): We're now creating a
4987 "real" class for the type parameter; it's now safe to call
4988 mono_class_from_mono_type() on the class'es type, it'll do the
4991 2003-09-16 Martin Baulig <martin@ximian.com>
4993 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
4994 `symfile->range_entry_size' and `symfile->class_entry_size' here;
4995 the `symfile' data structure must be fully initialized before it
4996 gets added to the table.
4998 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
5000 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
5002 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
5003 class init trampolines.
5005 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
5007 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
5008 to the built-in profiler to turn off time and allocation profiling
5011 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
5013 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
5016 * debug-helpers.c (mono_method_full_name): Print the wrapper type
5017 in human readable form.
5019 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
5021 * reflection.c icall.c: Fixed warnings.
5023 * image.c (load_class_names): Use a temporary hash table to hold the
5024 namespaces in order to avoid doing many string comparisons.
5026 * image.h: Fix typo.
5028 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
5029 Pass NULL instead of g_direct_equal to the GHashTable constructor
5030 since the NULL case is short-circuited inside g_hash_table_lookup,
5031 leading to better performance.
5033 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
5034 obtain the first custom attribute for a given index. Depends on the
5035 CustomAttribute table being sorted by the parent field.
5037 * reflection.c (mono_custom_attrs_from_index): Use the new function
5038 for better performance.
5040 2003-09-07 Martin Baulig <martin@ximian.com>
5042 * class.c (mono_class_init): If we're a generic instance, inflate
5043 all our methods instead of loading them from the image.
5044 (mono_class_from_generic): Set `class->methods = gklass->methods'.
5046 2003-09-07 Martin Baulig <martin@ximian.com>
5048 * mono-debug-debugger.c: Added support for constructors.
5050 2003-09-06 Martin Baulig <martin@ximian.com>
5052 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
5055 * reflection.c (mono_reflection_setup_generic_class): Call
5056 ensure_runtime_vtable() to create the vtable.
5058 2003-09-05 Martin Baulig <martin@ximian.com>
5060 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
5063 2003-09-04 Martin Baulig <martin@ximian.com>
5065 * reflection.c (mono_reflection_define_generic_parameter): Generic
5066 parameters start with zero.
5068 2003-09-04 Martin Baulig <martin@ximian.com>
5070 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
5072 * reflection.h (MonoReflectionGenericParam): New typedef.
5073 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
5074 the generic parameters from the managed TypeBuilder.
5076 * reflection.c (mono_reflection_define_generic_parameter): New function.
5077 (mono_reflection_create_runtime_class): Encode generic parameters.
5078 (mono_reflection_setup_generic_class): New function; this is
5079 called after adding adding all generic params to the TypeBuilder.
5080 (encode_type): Added MONO_TYPE_VAR.
5082 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
5084 * class.h class.c (mono_class_needs_cctor_run): Moved this method
5087 * assembly.h assembly.c: Moved the AOT loading code into an assembly
5090 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
5092 * reflection.h reflection.c class.h class.c: Delete duplicate
5093 definition of mono_type_get_name () from reflection.c and export the
5096 * class.c: Class loading fixes from Bernie Solomon
5097 (bernard@ugsolutions.com).
5099 * reflection.c: Endianness fixes from Bernie Solomon
5100 (bernard@ugsolutions.com).
5102 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
5104 * assembly.h assembly.c: Define a file format version for AOT
5107 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
5109 * appdomain.h (MonoJitInfo): New field to determine whenever the
5110 code is domain neutral.
5112 2003-08-31 Miguel de Icaza <miguel@ximian.com>
5114 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
5116 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
5118 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
5119 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
5120 Avoid caching the result since strings must be domain specific. Fixes
5123 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
5125 * marshal.c (mono_marshal_init): Make this callable multiple times
5126 since it is hard to find a correct place to call it.
5128 * object.c (mono_runtime_class_init): Execute static constructors in
5129 the correct appdomain.
5131 * image.c (build_guid_table): Handle the case when multiple images have
5134 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5136 * icall.c: added a couple of icalls for System.Web.
5138 2003-08-28 Martin Baulig <martin@ximian.com>
5140 * icall.c (ves_icall_Type_BindGenericParameters): Use
5141 `klass->generic_inst' instead of `&klass->byval_arg' in the
5142 mono_type_get_object() call. The returned type must be
5143 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
5145 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
5149 * object.c (mono_class_proxy_vtable): Make it thread safe.
5151 * pedump.c: Fix warning.
5153 * object.c appdomain.h: Get rid of metadata_section.
5154 It is no longer needed and it was causing deadlocks with domain->lock.
5156 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
5158 2003-08-26 Martin Baulig <martin@ximian.com>
5160 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
5162 2003-08-26 Martin Baulig <martin@ximian.com>
5164 * pedump.c (main): Call mono_metadata_init(),
5165 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
5166 and mono_loader_init().
5168 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
5170 * loader.h: Add missing include to fix build.
5172 * image.h: mono_image_load_references is no more.
5174 * assembly.c: Reworked assembly loading to make it really thread safe.
5175 After these changes, the assembly returned by mono_assembly_open is
5176 fully initialized, i.e. all its references assemblies are loaded.
5178 * assembly.c (mono_image_load_references): Renamed to
5179 mono_assembly_load_references, and made private, since clients no
5180 longer need to call it.
5182 * class.c: Removed calls to mono_assembly_load_references, since it was
5183 a source of deadlocks.
5185 * loader.h loader.c class.h class.c: Protect data structures using a
5186 new lock, the loader lock.
5188 * class.c (mono_class_setup_vtable): Create temporary hash tables and
5189 GPtrArrays only when needed.
5191 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
5192 into empty structures by mcs. Fixes pinvoke7.cs.
5194 * domain.c (mono_init): Call a new initialization function.
5196 * appdomain.c (mono_runtime_init): Call the new initializer function
5197 of the marshal module.
5199 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
5200 inserted into empty structures by mcs. Fixes pinvoke7.cs.
5202 * marshal.h marshal.c: Added locks around the wrapper caches to make
5203 this module thread safe.
5205 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
5206 this argument. Fixes pinvoke1.exe.
5208 2003-08-25 Lluis Sanchez <lluis@ximian.com>
5210 * object.h: Added call_type field to MonoMethodMessage and the corresponding
5211 enumeration of values. Removed fields to store remote call output values in
5212 MonoAsyncResult. Not needed any more.
5213 * object.c: Initialize call_type and async_result fields in mono_message_init.
5214 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
5215 dispatching the message.
5216 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
5217 async call to finish. To do it use a message with EndInvoke call type.
5219 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
5221 * loader.h loader.c (mono_method_hash_marhal_info): New function which
5222 determines whenever a method has marshalling info.
5224 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5226 * assembly.c: fix the build on windows.
5228 2003-08-22 Lluis Sanchez <lluis@ximian.com>
5230 * object.cs: Fixed bug #47785.
5232 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
5234 * string-icalls.c (StringReplace): If their are no occurances of
5235 the old string found return a reference to the supplied
5236 string. This saves some memory and matches MS behavoir.
5238 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5240 * socket-io.c: fixed compilation for systems that define AF_INET6
5241 and don't define SOL_IP/SOL_IPV6.
5243 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
5245 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
5246 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
5248 * rawbuffer.c rawbuffer.h: Make this module thread safe.
5250 * domain.c: Make this module thread safe.
5252 * domain.c (mono_init): Call new initialization function.
5254 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
5255 reference types too. Fixes #38812.
5257 * image.c (mono_image_init): Fixed warnings.
5259 * class.c (mono_class_from_typeref): Handle assembly load failure
5262 * appdomain.c (add_assemblies_to_domain): Handle the case when
5263 the references of an assembly are not yet loaded.
5265 * metadata.c image.c assembly.c: Moved initialization of global
5266 variables to a separate function called at startup since lazy
5267 initialization of these variables is not thread safe.
5269 * image.c assembly.c: Made this module thread safe by adding locks in
5270 the appropriate places.
5272 * domain.c (mono_init): Call the new initialization functions of the
5275 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
5277 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
5278 make a direct call. It is proxy's work to make the call asynchronous.
5279 mono_delegate_end_invoke(): If the targe is a proxy, just collect
5281 * object.cs: mono_method_call_message_new(): read AsyncResult and
5282 state object from parameters list, if this info is requested.
5283 * object.h: Added fields to store remote call output values in
5284 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
5286 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5288 * object.h: add needed fields to MonoThread.
5289 * threads.c, threads.h: allow registering a function to cleanup data
5290 allocated per thread by the JIT.
5292 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5294 * loader.h: portability fix by Bernie Solomon
5295 * <bernard@ugsolutions.com>.
5297 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
5299 * reflection.h reflection.c (mono_param_get_objects): Changed this to
5300 return a MonoArray. This simplifies the code and also ensures that
5301 the cache allways contains an object reference as a value.
5303 * icall.c (ves_icall_get_parameter_info): Simplified using the new
5306 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5308 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
5309 fixes a problem with byte ordering when getting the address family for
5312 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
5314 * .cvsignore: Added monosn.
5316 * reflection.h reflection.c loader.c: Added support for parameter
5317 marshalling to dynamically created types. Fixes #47295.
5319 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
5321 * rand.c: remove useless warnings.
5323 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
5325 * class.c: implemented ldtoken for methods and fieldrefs.
5327 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5329 * threadpool.c: when mono_async_invoke was called, no one took care of
5330 monitoring the queue. So if the method invoked took some time and we
5331 got new async invoke requests after 500 ms (the thread created waited
5332 that long in WaitForSingleObject), the new async invoke was not called
5333 until the previous one finished.
5335 This is fixed now. Thanks to Totte for helping with it.
5337 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5339 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
5341 2003-08-11 Martin Baulig <martin@ximian.com>
5343 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
5345 2003-08-06 Martin Baulig <martin@ximian.com>
5347 * mono-debug-debugger.c: Added support for static fields,
5348 properties and methods.
5350 2003-08-06 Martin Baulig <martin@ximian.com>
5352 * mono-debug-debugger.c: Don't store the MonoString's vtable to
5353 make this work for applications with multiple application domains.
5355 2003-08-04 Martin Baulig <martin@ximian.com>
5357 * mono-debug-debugger.c: Completely reworked the type support; the
5358 most important thing is that we're now just using one single
5359 `MonoType' instance per type.
5361 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
5363 * mono-endian.h, mono-endian.c, icall.c: Added icall
5364 ves_icall_System_Double_AssertEndianity to assert double word endianity
5365 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
5367 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5369 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
5370 support, icalls and fixes.
5372 2003-07-31 Miguel de Icaza <miguel@ximian.com>
5374 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
5375 classes that are a punctuation character in .NET is not the same a
5378 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5380 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
5382 2003-07-29 Miguel de Icaza <miguel@ximian.com>
5384 * icall.c: Add new MemCopy internalcall.
5385 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
5386 Simplified code; It is not necessary to handle all the cases here,
5387 as the C# code takes care of it. Only handle the case of the name
5388 resource embedded into the assembly.
5390 Changed signature to return the data pointer and the size of the
5393 2003-07-26 Miguel de Icaza <miguel@ximian.com>
5395 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
5396 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
5398 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
5400 * socket-io.c: ignore EINTR error in select.
5402 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
5404 * class.h, class.c: removed unused subclasses field in MonoClass.
5406 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
5408 * icall.c: improve fix of get_base_definition(). If the parent class
5409 doesn't have the mehod, look at the parent of the parent.
5410 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
5411 to check if a parameter is an in or out parameter
5412 (PARAM_ATTRIBUTE_IN is not set by default).
5413 mono_method_return_message_restore(): Use mono_class_value_size to
5414 get the size of a value type. mono_type_stack_size (parameterType)
5415 does not return the correct value if parameterType is byRef.
5416 mono_load_remote_field(), mono_load_remote_field_new(),
5417 mono_store_remote_field(), mono_store_remote_field_new():
5418 raise exception if the remote call returns an exception.
5420 2003-07-28 Martin Baulig <martin@ximian.com>
5422 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
5423 method. This is a wrapper around mono_runtime_invoke() which
5424 boxes the instance object if neccessary.
5426 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5428 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
5429 metadata.h, row-indexes.h, verify.c: first cut of generics support.
5431 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5433 * icall.c: disable mcs bug workaround.
5435 2003-07-21 Miguel de Icaza <miguel@ximian.com>
5437 * object.c (mono_runtime_class_init): Take the metadata_section
5438 mutex before obtaining the domain mutex.
5440 * appdomain.h: Added definition of metadata_section mutex here.
5442 * object.c: define metadata_mutex here.
5444 2003-07-24 Ravi Pratap <ravi@ximian.com>
5446 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
5449 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
5451 * reflection.c: Fix bug #46669
5453 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5458 * object.h: fill in the type name for TypeLoadException.
5460 2003-07-23 Ravi Pratap <ravi@ximian.com>
5462 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
5463 relationship between TypeBuilders while compiling corlib) and bug
5464 45993 (Array types returned from the runtime while compiling
5465 corlib were from the loaded corlib).
5467 2003-07-22 Martin Baulig <martin@ximian.com>
5469 * mono-debug-debugger.c: Reworked the type support a bit more;
5470 distinguish between types and classes.
5472 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
5474 * icall.c: add IsArrayImpl icall.
5476 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
5478 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
5479 initializing real_size only once. Also fix bug #46602.
5481 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
5483 * object.c: Renamed mono_metadata_section to metadata_section.
5485 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
5487 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
5488 empty array if the type is an array. Fixed.
5489 ves_icall_MonoMethod_get_base_definition: if the base method
5490 is abstract, get the MethodInfo from the list of methods of
5492 * reflection.c: ParameterInfo.PositionImpl should be zero-based
5493 and it was 1-based. Fixed in mono_param_get_objects.
5495 2003-07-20 Martin Baulig <martin@ximian.com>
5497 * mono-debug.h: Set version number to 31.
5498 (mono_debug_init): Added `MonoDomain *' argument.
5500 * mono-debug-debugger.c: Reworked the type support; explicitly
5501 tell the debugger about builtin types; pass the `klass' address to
5504 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
5506 * image.c: Allow new metadata tables to be loaded without a
5507 warning. Also update the warning message to give the new constant value.
5509 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
5511 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
5512 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
5513 array type representation changes.
5515 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
5517 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
5518 on Environment.Exit () call.
5520 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
5522 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
5523 requires a matching corlib.
5525 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
5527 * Changelog: My editor decided to add a CR to each line. Sorry about that.
5528 Committed again without the CRs.
5530 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
5532 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
5533 getting it from the "this" socket instance. Did not work
5534 if the socket is a subclass of Socket.
5535 Also fixed bug #35371.
5537 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
5539 * metadata.c: fixed size for TypedByRef.
5540 * loader.c: when searching for a method, consider the vararg amrker.
5541 * unicode.c, decimal.c: constify some arrays.
5543 2003-07-15 Dick Porter <dick@ximian.com>
5545 * socket-io.c: Fixed compilation for gcc < 3.2.
5547 Fixed compilation for machines that don't have AF_INET6 (thanks to
5548 Bernie Solomon <bernard@ugsolutions.com> for that part.)
5550 Fixed compile warnings.
5552 Fixed formatting and line endings.
5554 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
5557 * socket-io.c: Added IPv6 support.
5559 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
5561 * class.c (mono_class_is_assignable_from): New function to implement
5562 the is_assignable_from logic. Used by mono_object_isinst,
5563 Type::IsAssignableFrom () and the interpreter.
5565 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
5566 Object, even interfaces.
5568 * object.c (mono_object_isinst): Implement in terms of
5571 * icall.c (ves_icall_type_is_assignable_from): New icall.
5573 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
5575 * domain.c (foreach_domain): fix compiler warning.
5577 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
5579 * image.c (load_metadata_ptrs): use g_strndup because strndup is
5580 not available on all plattforms
5582 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
5584 * image.h image.c: Store the metadata version string in MonoImage.
5585 * icall.c: New icall to retrieve the image version.
5586 * reflection.c (create_dynamic_image): Fill in the image version field
5587 * reflection.c (build_compressed_metadata): Use the image version
5588 from the image structure.
5590 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5592 * appdomain.c: modified comment.
5593 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
5594 That will be its last iteration when mono_gc_cleanup is called from
5595 mono_runtime_cleanup and before the domain is unloaded.
5599 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
5601 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
5604 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5606 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
5607 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
5608 Bernie Solomon <bernard@ugsolutions.com>.
5610 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
5612 * object.c, object.h: provide mono_object_new_fast() for faster
5613 allocation in some special cases.
5615 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
5617 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
5618 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
5620 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
5622 * threadpool.c: fix leaks.
5624 2003-07-01 Dick Porter <dick@ximian.com>
5626 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
5627 using MonoGHashTables. Fixes threadpool bug posted to list.
5629 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
5631 * image.h, image.c: added support to load an assembly from a byte array.
5632 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
5633 assembly bundle support.
5635 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
5637 * threadpool.c (mono_thread_pool_add): keep a reference to the
5638 AsyncResult to prevent GC
5640 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
5642 * class.c: leak fix.
5644 2003-06-25 Dick Porter <dick@ximian.com>
5646 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
5647 for the async object, the WaitHandle object will close the handle.
5650 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
5652 * class.c: in mono_array_class_get (), lookup from the hash with the
5653 same type we insert: this works around a bug in
5654 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
5655 lluis. The real fix will have to wait for after the release.
5657 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
5659 * icall.c: fix memory leak when getting type members.
5661 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
5663 * reflection.c: added more pubtoken special cases.
5665 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
5667 * class.c: handle field offset correctly when class size
5668 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
5670 2003-06-20 Martin Baulig <martin@ximian.com>
5672 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
5675 2003-06-20 Martin Baulig <martin@ximian.com>
5677 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
5679 2003-06-20 Martin Baulig <martin@ximian.com>
5681 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
5682 just distinguish between variables in registers and variables at
5683 an offset relative to a register.
5685 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5687 * icall.c: #ifdef out latest changes until mcs is fixed.
5689 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5691 * icall.c: return members in metadata order.
5693 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
5695 * icall.c: avoid infinite loop in GetTimeZoneData.
5697 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
5699 * icall.c: added Marshal.Prelink/All icalls.
5701 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
5703 * object.c, object.h: fix warnings and do some overflow checking
5704 when creating arrays.
5706 2003-06-17 Dick Porter <dick@ximian.com>
5709 * file-io.c: File attributes need to be tweaked slightly when
5710 passed from the managed to the w32 world.
5712 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
5713 * profiler.h profiler-private.h profiler.c: Rework last patch
5714 based on suggestion by Paolo.
5716 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
5718 * profiler.h profiler-private.h profiler.c: Added infrastructure for
5719 instruction level coverage data collection.
5720 * profiler.h profiler.c (: Added new callback function which can be
5721 used by the profiler to limit which functions should have coverage
5723 * profiler.c (mono_profiler_load): Call g_module_build_path to
5724 generate the file name of the profiler library.
5726 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
5728 * profiler.c, profiler.h, profiler-private.h: added basic block
5729 coverage profiling API.
5731 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
5733 * reflection.c (mono_reflection_create_runtime_class): Add support
5734 for events in dynamically generated code.
5736 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
5739 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
5741 * icall.c: when getting timezone info, return reasonable values if we
5742 can't get the actual data.
5744 2003-06-14 Dick Porter <dick@ximian.com>
5746 * threads.c (start_wrapper): Remove the reference to the thread
5747 object in the TLS data, so the thread object can be finalized.
5748 This won't be reached if the thread threw an uncaught exception,
5749 so those thread handles will stay referenced :-( (This is due to
5750 missing support for scanning thread-specific data in the Boehm GC
5751 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
5753 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
5755 * reflection.c: ensure streams and tables are first allocated with
5756 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
5758 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
5760 * icall.c: fixed GetElementType for byrefs (bug# 44792).
5762 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
5764 * reflection.c (mono_reflection_create_runtime_class): Add support for
5765 properties to dynamically created classes.
5766 * reflection.c: Fix a few places where non-MonoObjects were inserted
5767 into the tokens hashtable.
5769 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
5771 * object.c: some support to handle out of memory exceptions.
5773 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
5775 * marshal.c (mono_marshal_get_native_wrapper): support reference
5778 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
5780 * object.h, object.c: more portability stuff from Bernie Solomon.
5781 Unexport mono_object_allocate(). Added mono_object_unbox ().
5782 Set exitcode when an unhandled exception is thrown.
5784 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
5786 * marshal.c (mono_marshal_get_native_wrapper): use custom
5787 marshaler for return types.
5789 2003-06-10 Dick Porter <dick@ximian.com>
5791 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
5792 ip_mreq is available
5794 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
5796 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
5797 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
5798 by Bernie Solomon <bernard@ugsolutions.com>.
5800 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
5802 * gc.c (mono_gc_init): Avoid error message on shutdown when
5803 GC_DONT_GC=1 is used.
5805 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
5806 New icall to return the GUID of a module.
5808 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
5810 * class.c: ensure instance size always includes the parent's size
5811 even whem class size is set explicitly (fixes bug#44294).
5813 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
5815 * profiler.h, profiler.c: made the simple profiler thread-safe,
5816 get more accurate timing info. Allow the loading of an
5817 externally-developed profiler module.
5819 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
5821 * marshal.c (mono_marshal_get_native_wrapper): improved
5822 class/byref arguments.
5823 (mono_marshal_get_native_wrapper): better string marshaling support.
5825 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
5827 * class.c: ensure .pack and .size are handled correctly and
5828 simplified layout of static fields.
5830 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
5833 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
5835 * loader.c (mono_lookup_pinvoke_call): look for modules in the
5836 current directory (fix bug 44008)
5838 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
5840 * marshal.c (mono_marshal_get_native_wrapper): started support for
5842 (mono_delegate_to_ftnptr): consider marshalling specifications
5844 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
5846 * reflection.c, reflection.h: emit custom marshal info.
5848 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5850 * object.c: free the GError.
5851 * icall.c: added CloseEvent_internal.
5853 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
5856 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
5858 * loader.c (mono_method_get_signature): Add support for dynamic
5861 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
5863 * reflection.c: fixed bug #43905.
5865 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
5867 * class.c, domain.c, icall.c, metadata.h, object.h: support for
5868 handling TypedReference and ArgIterator.
5869 * loader.c, loader.h: added function to get signature at call site.
5871 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
5873 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
5874 data readonly. Buglets and warning fixes. Some MethodSpec support.
5876 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
5878 * class.h, class.c, object.c: remove relative numbering support.
5880 2003-05-26 Miguel de Icaza <miguel@ximian.com>
5882 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
5883 free the string, until we get a chance to fix Gtk#
5885 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5887 * marshal.c: revert last patch.
5889 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
5891 * icall.c: updates for new mono_class_vtable() not calling
5892 the type constructor anymore.
5894 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
5896 * object.h, object.c: separate vtable creation from type
5897 initialization. Make running the .cctor thread safe.
5899 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
5901 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
5903 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
5905 * loader.c (mono_get_method): consider calling convention
5907 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
5909 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
5910 to return the invisible global type for a module.
5912 * reflection.c (mono_image_build_metadata): Emit global fields too.
5914 2003-05-20 Peter Williams <peterw@ximian.com>
5916 * loader.c (mono_lookup_internal_call): Add a few newlines.
5918 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
5920 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
5923 * appdomain.c (set_domain_search_path): Recalculate search path when
5924 AppDomainSetup.PrivateBinPath changes.
5926 * object.c (mono_class_compute_gc_descriptor): It turns out some
5927 parts of the class libs (like System.Thread) holds pointers to
5928 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
5929 to treat native int a pointer type here.
5931 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
5933 * appdomain.h, domain.c: add hashtable for jump target resolution.
5935 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
5937 * reflection.h reflection.c icall.c: Added new icalls
5938 GetManifestResourceInfoInternal, GetModulesInternal and support
5941 2003-05-16 Dick Porter <dick@ximian.com>
5945 * file-io.c: Implement System.IO.MonoIO::GetTempPath
5947 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
5949 * object.c: mono_store_remote_field: little fix to previous patch.
5951 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
5953 * class.c: add constructors to array classes.
5954 * icall.c: special case array construction for InternalInvoke (),
5956 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
5958 * class.h class.c reflection.c object.c: Added support for field
5959 defaults in dynamically generated classes.
5961 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
5963 * reflection.c: properly encode charset for ddlimport.
5965 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
5967 * threads.c: allow compiling without GC.
5969 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
5971 * appdomain.h, object.c, object.h, threads.c, threads.h: added
5972 handling of thread static data.
5974 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
5976 * reflection.h, reflection.c: added mono_custom_attrs_free ().
5978 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
5980 * class.c (mono_array_class_get): always set the serializable flags
5981 (mono_array_class_get): always set the SEALED attribute for array types
5983 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
5985 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
5986 attributes (fix for bug 42021).
5988 2003-05-12 Dick Porter <dick@ximian.com>
5990 * gc.c: Don't run finalizers when the finalizer thread is
5991 finishing up, because the default domain has already been
5994 2003-05-11 Miguel de Icaza <miguel@ximian.com>
5996 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
5997 value is null, we should throw an exception. This is slightly
5998 different than the other conventions used for the constructor.
6000 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6002 * socket-io.c: fixed windows build.
6004 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6006 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
6008 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
6010 * object.c (mono_string_new_wrapper): Compatibility fix for MS
6013 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
6015 * class.c (mono_class_layout_fields): Add experimental GC aware
6016 auto layout facility. Requires class library changes to work correctly.
6018 (mono_class_setup_vtable): Avoid overriding explicit interface
6019 method implementations. Fixes iface3.exe test.
6021 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
6023 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
6024 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
6026 * metadata.h: Add new type classification macro which determines
6027 whenever the type holds an object reference.
6029 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
6031 * marshal.c (mono_marshal_get_native_wrapper): cleanups
6033 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
6035 * gc.c (finalizer_thread): Work around a GC bug.
6037 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
6039 * marshal.c (emit_struct_conv): allow unions
6041 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
6043 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
6045 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
6047 2003-05-06 Martin Baulig <martin@ximian.com>
6049 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
6051 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6054 (Select_internal): allow NULLs, don't create arrays if not needed.
6055 Coupled with Socket.cs changes.
6058 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
6059 register a finalizer for it that will close the semaphore handle. This
6060 fixes the leak and make Lupus' test run with > 4080 loops.
6062 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
6064 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
6065 Jerome Laban (bug #42287)
6067 2003-05-02 Martin Baulig <martin@ximian.com>
6069 * debug-mono-symfile.h
6070 (MonoSymbolFile): Moved declaration into mono-debug.h.
6071 (MonoDebugMethodJitInfo): Likewise.
6072 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
6074 (_mono_debug_address_from_il_offset): Take a
6075 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
6078 (MonoDebugDomainData): New struct.
6079 (mono_debug_get_domain_data): New function.
6080 (mono_debug_add_method): Take an additional `MonoDomain *'
6082 (mono_debug_source_location_from_address): Likewise.
6083 (mono_debug_il_offset_from_address): Likewise.
6084 (mono_debug_address_from_il_offset): Likewise.
6086 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
6088 * reflection.c: one more check for null type in custom attrs.
6090 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6092 * reflection.c: avoid warning (comparison is always false due to limited
6093 range of data type).
6095 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6097 * icall.c: throw an exception in Type.GetField if the argument 'name'
6100 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
6102 * reflection.c: fixed handling of enums in named arguments to custom
6103 attributes (bug #42123).
6105 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
6107 * reflection.c: use the right array element type and handle
6108 a null for a Type argument, too.
6110 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
6112 * reflection.c: handle arrays as arguments to custom attributes.
6114 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
6116 * reflection.c: handle a string value in a custom attr
6117 ctor that takes an object.
6119 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
6121 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
6124 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
6126 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
6128 2003-04-27 Martin Baulig <martin@ximian.com>
6130 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
6131 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
6132 MONO_DEBUGGER_EVENT_BREAKPOINT.
6133 (mono_breakpoint_trampoline_code): Removed.
6134 (mono_debugger_event_handler): The last argument is now a
6136 (mono_debugger_insert_breakpoint_full): Removed the
6137 `use_trampoline' argument.
6138 (mono_debugger_method_has_breakpoint): Likewise.
6139 (mono_debugger_trampoline_breakpoint_callback): Renamed to
6140 mono_debugger_breakpoint_callback(); take the method and
6141 breakpoint number as arguments.
6143 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
6145 * metadata.c: fix off by one when loading parameters attributes.
6147 2003-04-24 Martin Baulig <martin@ximian.com>
6149 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
6151 2003-04-24 Martin Baulig <martin@ximian.com>
6153 * mono-debug-debugger.c: Moved all code which interacts with the
6156 * debug-mono-symfile.c: This code now just deals with the symbol
6157 file itself, the debugger code is now in mono-debug-debugger.c.
6159 2003-04-23 Martin Baulig <martin@ximian.com>
6161 * mono-debug.c (mono_debug_source_location_from_il_offset):
6162 New method; like mono_debug_source_location_from_address(), but
6163 takes an IL offset instead of a machine address.
6165 2003-04-23 Martin Baulig <martin@ximian.com>
6167 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
6168 `line' field; this is now computed by the debugger.
6170 2003-04-23 Martin Baulig <martin@ximian.com>
6172 * mono-debug.[ch]: New files. This is the new debugging interface.
6174 * mono-debug-debugger.[ch]: New files. Moved all code which
6175 interacts with the Mono Debugger here.
6177 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
6179 * domain.c (mono_init): initialize mono_defaults.monitor_class
6181 2003-04-21 Miguel de Icaza <miguel@ximian.com>
6183 * reflection.c (method_encode_code): Add a spicy exception to help
6184 future compiler authors.
6186 2003-04-21 Martin Baulig <martin@ximian.com>
6189 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6190 Make this work with relative pathnames; g_filename_to_uri() needs
6191 an absolute filename.
6193 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
6195 * icall.c: Track name changes in Object and ValueType.
6197 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
6199 * metadata.c (mono_type_stack_size): size should be a multiple of
6202 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6205 (internal_domain_finalize): moved into mono_domain_finalize. No need
6206 to create another thread because the finalizers will be run in the
6209 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
6210 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
6211 to be run (MS does this too).
6213 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
6215 * object.c (mono_class_compute_gc_descriptor): Update comment.
6217 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
6219 * image.h: Add synchronized wrapper cache.
6221 * image.c (do_mono_image_open): Initialize cache.
6223 * reflection.c (create_dynamic_mono_image): Initialize cache.
6225 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6227 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
6228 ves_icall_System_Buffer_ByteLengthInternal.
6230 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
6232 * reflection.c: setup klass->nested_in earlier. Allow
6233 a dash in the assembly name.
6235 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
6237 * metadata.c (mono_type_to_unmanaged): dont access
6238 type->data.klass for MONO_TYPE_OBJECT
6239 (mono_type_to_unmanaged): consider System.Delegate class
6241 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
6243 * class.c: just setup supertypes in the proper place instead of
6244 initializing the full element class for arrays.
6246 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
6248 * class.c: ensure the element class of arrays is initialized.
6249 Setup the supertype info for array classes, too.
6251 2003-04-14 Miguel de Icaza <miguel@ximian.com>
6253 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
6255 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6257 * Makefile.am: re-added -m option when running cygpath. This way,
6258 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
6260 * mono-config.c: same codepath for locating mono config file for WIN32
6262 * assembly.c: if mono_assembly_setrootdir is called, don't override
6265 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6267 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
6268 MONO_ASSEMBLIES variable.
6270 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
6272 * icall.c: added Assembly::GetNamespaces() icall.
6274 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6276 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
6278 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
6280 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
6281 * object.c: fixed bug in the construction of vtable for proxies
6283 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
6285 * object.c (mono_array_new): Mark mono_array_new as an icall.
6287 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6289 * class.c: fixed test for public method when overriding interfaces.
6292 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
6294 * appdomain.h, domain.c: added mono_domain_foreach() to
6295 be able to access the currently loaded appdomains.
6296 * object.c: make string interning work across sppdomains.
6297 Mark some functions for use as icalls.
6299 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
6301 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
6303 * reflection.h reflection.c: Allocate long living data using
6304 GC_MALLOC_ATOMIC so the collector does not need to scan it.
6306 * reflection.c: Double the allocation size in streams instead of
6307 increasing it, to prevent unneccesary copying on large assemblies.
6309 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
6310 creation if the assembly does not have the Run flag set.
6312 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
6314 * class.h: avoid the C++ keywords in header files (Jerome Laban
6315 spotted and fixed this).
6317 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6320 (mono_unhandled_exception): fill in the arguments for the
6321 UnhandledException event. Only trigger that event for the default
6322 domain (as MS does).
6324 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
6326 * object.c: Improve typed allocation stuff based on suggestions from
6327 Paolo. Also turn it on if the GC library supports it.
6329 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
6331 * object.c object.h class.h: Added experimental typed allocation
6332 facility using the interfaces in gc_gcj.h.
6334 * os/gc_wrapper.h: Added new include files.
6336 2003-04-03 Martin Baulig <martin@ximian.com>
6338 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
6339 which is not yet enabled by default.
6341 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
6343 (mono_gc_lock, mono_gc_unlock): New static functions.
6345 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
6346 functions; stop/start the world for the garbage collector. This
6347 is using the windows API; we need to complete the SuspendThread()/
6348 ResumeThread() implementation in the io-layer to make this work on Unix.
6349 (mono_gc_push_all_stacks): New public function; tells the garbage
6350 collector about the stack pointers from all managed threads.
6352 2003-04-03 Martin Baulig <martin@ximian.com>
6354 * object.h (MonoThread): Added `gpointer stack_ptr'.
6356 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
6358 2003-04-03 Martin Baulig <martin@ximian.com>
6360 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
6362 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
6364 * reflection.c (typebuilder_setup_fields): Initialize field.first and
6367 2003-04-02 Miguel de Icaza <miguel@ximian.com>
6369 * loader.c (mono_lookup_internal_call): Report the corlib that is
6372 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
6374 * icall.c (ves_icall_type_GetTypeCode): fixed check for
6375 System.DBNull (it's class not valuetype).
6377 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
6379 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
6380 if the array method was already assigned a token (fixes bug#40646).
6382 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
6384 * reflection.c (mono_reflection_get_type): Attempt type resolve even
6385 if no assembly is given.
6387 2003-04-01 Miguel de Icaza <miguel@ximian.com>
6389 * metadata.h: Added the new tables.
6391 * row-indexes.h: Added definitions for new tables.
6393 * metadata.c: Add schemas for new tables, and add support for
6394 computing the sizes of them.
6396 * class.c: Update for handling the new type cases.
6398 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
6400 * metadata.h (MONO_TYPE_IS_VOID): new macro
6402 2003-03-31 Martin Baulig <martin@ximian.com>
6404 * threads.h (MonoThreadCallbacks): Added `thread_created'.
6406 * threads.c (mono_thread_new_init): Call `thread_created' in the
6407 mono_thread_callbacks.
6409 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
6411 * loader.h: added marshalbyrefobject_class to mono_defaults
6412 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
6413 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
6414 generation of output parameters.
6415 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
6416 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
6417 contextbound and the target object belongs to the context of the caller.
6418 * object.h: added context and unwrapped_server variables in MonoRealProxy.
6419 * object.c: Implemented support for interfaces and abstract classes
6420 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
6421 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
6423 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
6425 * class.h class.c (mono_class_is_subclass_of): New function.
6427 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
6428 routines for most common case (calls from ArrayList::ToArray).
6430 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
6431 routine so programs which call Environment::Exit() can be profiled.
6433 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
6434 Added MONO_ARCH_SAVE_REGS.
6436 * icall.c (ves_icall_type_is_subtype_of): Use new function.
6438 2003-03-29 Miguel de Icaza <miguel@ximian.com>
6440 * blob.h: Add a couple of new MonoType types definitions.
6442 * tabledefs.h: Add a couple of new call convs.
6444 2003-03-27 Zoltan Varga <vargaz@freemail.h>
6446 * reflection.h (MonoReflectionDynamicAssembly): track changes in
6447 the layout of the class.
6449 * reflection.c (alloc_table): double the size on overflow to avoid
6450 unnecessary copying.
6452 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
6453 avoid filling out metadata tables and blobs. Also set mb->ilgen to
6454 null so it can be garbage collected.
6456 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
6458 * reflection.c (mono_reflection_get_type): Return the resolved type
6459 only if it is in the assembly we searched.
6461 * reflection.c (ensure_runtime_vtable): Initialize method slots.
6463 * class.c (mono_class_setup_vtable): Set the slot of the overriding
6466 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6469 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
6470 the right one is 'file:///blah', but MS allows it.
6472 (mono_assembly_open): allow 'file://blah'
6474 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
6476 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
6478 * socket-io.c: fixes bug #40310.
6480 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
6482 * reflection.c (mono_reflection_parse_type): handle deeply nested
6485 * reflection.c (mono_image_create_token): Use unique token values
6486 since they will be put into a hash table.
6488 * class.c (mono_class_setup_vtable): If a method occurs in more than
6489 one place in the vtable, and it gets overriden, then change the
6490 other occurances too.
6492 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
6493 object as return type.
6495 2003-03-22 Pedro MartÃnez Juliá <yoros@wanadoo.es>
6497 * icall.c: Deleted "ToString" implementation for double and float
6498 because they are full implemented in managed code.
6500 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
6502 * reflection.c, reflection.h: implemented and exported functions
6503 to retrieve info about custom attributes.
6505 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6507 * appdomain.c: moved Uri handling to assembly.c
6508 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
6509 work when using a file Uri in *nix and windows.
6511 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
6512 GetReferencedAssemblies.
6514 2003-03-18 Dick Porter <dick@ximian.com>
6516 * icall.c: Rename a couple of internal calls
6518 * threads.c: Set the thread state to Stopped when a thread exits.
6521 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
6523 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
6526 * object.c (mono_class_vtable): fix warning.
6528 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
6530 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
6532 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
6534 (method_encode_clauses): Create exception info structures in the right
6536 (mono_reflection_setup_internal_class): Initialize supertypes field.
6538 * class.c object.c: Handle interfaces which implement other interfaces
6541 * class.h class.c: Move the supertypes array initialization code into
6542 a separate function so it can be used for dynamic types too. Also call
6543 it earlier, in mono_class_init(), since it can be used before the
6544 type is initialized.
6546 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6550 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
6555 * object.c: remove warnings.
6557 2003-03-13 Martin Baulig <martin@ximian.com>
6559 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
6560 (MonoDebugLexicalBlockEntry): New types.
6562 * debug-mono-symfile.c
6563 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
6565 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6567 * process.c: ret can be any non-zero value accroding to MS doc.
6569 2003-03-07 Miguel de Icaza <miguel@ximian.com>
6571 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
6572 fixing a warning for a miss-used prototype, would have cause
6573 random memory corruption.
6575 2003-03-07 Martin Baulig <martin@ximian.com>
6577 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
6578 getting really annoying ....
6580 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
6582 * reflection.c (fixup_method): added support for array methods.
6584 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
6586 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
6587 (pointed out by Michael Adams).
6589 2003-03-04 Dick Porter <dick@ximian.com>
6591 * icall.c: Temporarily reverted the Double and Single ToString()
6592 change, because it broke nunit.
6594 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
6596 * object.h, threads.h: make include files compatible with C++
6597 (patch by Jerome Laban <jlaban@wanadoo.fr>).
6599 2003-03-04 Pedro MartÃnez Juliá <yoros@wanadoo.es>
6601 * icall.c: Erased ToString helper functions for Double and Single.
6602 Now, that implementations ar all in managed code (Double and Single
6605 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
6607 * appdomain.c: Added method for initializing the default context of
6608 a domain. Added internal call for getting the default context.
6609 * appdomain.h: Added context variable in MonoDomain struct.
6610 * domain.c: mono_domain_set also sets the default context of the domain
6611 * icall.c: Mapped internal method InternalGetDefaultContext.
6612 * object.c: mono_object_get_virtual_method returns always a remoting
6613 wrapper if the object is a transparent proxy.
6614 mono_runtime_invoke_array: when creating an object by calling the
6615 constructor, if the created object is a proxy, then the constructor should
6616 be called using the a remoting wrapper.
6618 2003-03-03 Dick Porter <dick@ximian.com>
6620 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
6621 variable so it compiles on solaris. Problem spotted by
6622 Christopher Taylor <ct@cs.clemson.edu>
6624 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6627 (get_info_from_assembly_name): don't leak value.
6630 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
6633 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
6635 * assembly.c: export mono_image_load_references ().
6636 * class.c: handle function pointers. mono_class_from_name() now
6637 supports nested type names directly.
6639 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
6641 * reflection.h reflection.c: Encode already created dynamic methods
6642 and fields correctly as a DEF instead of a REF.
6644 * reflection.c: Get rid of the force_ref argument to
6645 mono_image_typedef_or_ref since it was wrong in the first place.
6647 * string-icalls.c: add error checking to string constructors according
6650 * reflection.c: Emit types in the order their TypeBuilders were
6651 created. Previously, a new table index was assigned to each type before
6652 the tables were emitted. This was wrong because the signature blob
6653 might already refer to a type by its original table index.
6655 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
6657 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
6660 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6662 * Makefile.am: make assemblies dir have \ instead of / on windows.
6664 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
6666 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
6667 iterate over the NESTEDCLASS table using a linear search since the
6668 table is not guaranteed to be sorted by the secondary key.
6670 * class.c (mono_class_create_from_typedef): fixed up call to
6671 mono_metadata_nesting_typedef.
6673 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
6675 * marshal.c (mono_string_to_byvalstr): clear the memory as
6676 suggested by Jerome Laban <jlaban@wanadoo.fr>
6678 2003-02-26 Dick Porter <dick@ximian.com>
6680 * process.c: Cope with padding in .rsrc blocks
6682 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
6684 * metadata.h: reverted the filter_len change, it breaks reflection
6686 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
6688 * metadata.h: added a new field to store the filter_len
6691 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
6693 * reflection.c: handle custom attributes for types and members
6694 created with Reflection.Emit (bug#38422).
6696 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
6698 * reflection.c: define RTSpecialName automatically for constructors for
6699 compatibility with MS.NET.
6701 * reflection.c (mono_reflection_create_runtime_class): initialize
6702 nested_in field of dynamically created classes.
6704 2003-02-22 Martin Baulig <martin@ximian.com>
6706 * debug-mono-symfile.h: Incremented version number.
6708 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
6710 * object.h icall.c process.c: fix warnings.
6712 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
6714 * appdomain.h appdomain.c:
6715 (mono_domain_try_type_resolve): split the
6716 name_or_tb argument into a name and a tb argument.
6717 (mono_domain_has_type_resolve): new function to check whenever the
6718 application has registered a TypeResolve event handler.
6720 * icall.c reflection.h reflection.c: move the type resolve logic into
6721 mono_reflection_get_type () so it will be invoked when
6722 Assembly::GetType () is called.
6725 (mono_reflection_get_type): renamed to get_type_internal.
6726 (mono_reflection_get_type): fixed type name generation so it works
6727 for nested types too.
6728 (mono_reflection_get_type): call has_type_resolve () to avoid the
6729 costly type name generation if there is no resolve event handler.
6731 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
6733 * class.c, image.c: load exported types from file references.
6735 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
6737 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
6738 used to cache the managed methods used to create proxies and make
6739 remote invocation of methods.
6740 * class.h: Added in MonoVTable a flag to indicate that a class needs
6741 to be remotely created.
6742 * object.c: Modified the method mono_class_vtable(). It now initializes
6743 the remote flag of the vtable. Modified mono_object_new_specific(),
6744 so now it checks the remote flag.
6745 * icall.c: Added a couple of internal methods, one for enabling instance
6746 creation interception for a type, and one for creating objects bypassing
6749 2003-02-18 Martin Baulig <martin@ximian.com>
6751 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
6752 New interncall to get a method's metadata token.
6754 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
6755 New interncall for the debugger.
6757 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
6759 * class.c (mono_class_setup_vtable): allocate supertype array
6761 2003-02-18 Martin Baulig <martin@ximian.com>
6763 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
6765 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6768 (assembly_name_to_aname): jump over unknown properties (i've found
6769 something like: 'type, assembly, version=xxx, custom=null, public...',
6770 so now will ignore custom=null and still get the rest of the values).
6772 2003-02-17 Dick Porter <dick@ximian.com>
6774 * threads.c: Have Thread.Start() wait for a semaphore to signal
6775 that the thread has set up all its local data. This fixes bug
6776 34323, where Abort() raced the new thread's TLS data.
6778 Also removes the handle_store() call from start_wrapper, because
6779 threads are now always created suspended and there is no longer a
6780 race between the parent and child threads to store the info.
6782 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
6784 * image.c: explain the #- heap issue in a message, hopefully
6785 avoiding FAQs on mono-list.
6787 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6790 (GetEntryAssembly): if the domain has not invoked
6791 AppDomain.ExecuteAssembly yet, return the assembly of the default
6794 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
6796 * class.c (mono_ldtoken): make it work in dynamic assemblies.
6798 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
6800 * metadata.c, reflection.c: simple speedup to type hash
6803 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
6805 * image.c, image.h, class.c, assembly.c: move module loading
6806 to MonoImage. When loading metadata, consider alignemnet from
6807 the start of metadata, not from the metadata address in memory.
6809 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
6811 * reflection.c (mono_reflection_get_custom_attrs): Added support for
6812 AssemblyBuilder objects. Factored out custom attribute creation into
6813 a separate function.
6814 (create_custom_attr): new function to create custom attributes.
6816 2003-02-12 Miguel de Icaza <miguel@ximian.com>
6818 * Makefile.am: Got tired of typing the full pathname to pedump.
6819 Until there is another option, am installing this.
6821 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
6823 * class.c (class_compute_field_layout): always set field->parent
6824 (mono_ldtoken): use mono_defaults.fieldhandle_class;
6826 2003-02-11 Dick Porter <dick@ximian.com>
6829 * monitor.c: Rewrote Monitor, making lock much faster and
6830 Pulse/Wait work as specified. Also uses much fewer handles, and only
6831 creates them as needed.
6833 * exception.c: Added SynchronizationLockException
6835 * threads.c: Deleted old Monitor implementation. The new one is
6838 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
6840 * class.c: handled TypedReference type code. Set the correct size for
6841 class data. Setup interface_offsets for interface classes, too.
6843 2003-02-09 Martin Baulig <martin@ximian.com>
6845 * debug-mono-symfile.h: Reflect latest symbol writer changes.
6847 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
6849 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
6850 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
6851 * object.c: fixed mono_object_get_virtual_method () for interfaces.
6852 * verify.c: check for code that runs after the end of the method.
6854 2003-02-08 Pedro MartÃnez Juliá <yoros@wanadoo.es>
6856 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
6857 "System.Math::Round2".
6858 * sysmath.h: Added Floor, Round and Round2 definitions.
6859 * sysmath.c: Modified certain functions that were not 100% compliant
6860 with MS.NET (math precision) and added the implementation of Floor,
6863 2003-02-07 Martin Baulig <martin@ximian.com>
6865 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
6867 2003-02-07 Martin Baulig <martin@ximian.com>
6869 * debug-mono-symfile.c: Reflected latest symwriter changes.
6870 (mono_debug_create_mono_symbol_file): Removed.
6871 (mono_debug_open_mono_symbol_file): Take an argument which
6872 specifies whether to create a dynamic symbol file.
6874 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
6876 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
6878 2003-02-05 Martin Baulig <martin@ximian.com>
6880 * reflection.c (mono_image_build_metadata): Make this public,
6881 protect it against being called multiple times, don't create
6882 resources and don't build the compressed metadata here.
6883 (mono_image_create_pefile): Do this here.
6886 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
6888 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6890 * socket-io.c: fixed bug #36322.
6892 2003-02-06 Piers Haken <piersh@friskit.com>
6896 * debug-mono-symfile.c:
6902 * socket-io.c: warning cleanups
6904 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
6906 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
6907 function. works like remoting invoke, but does a check for the Proxy first.
6909 2003-02-05 Miguel de Icaza <miguel@ximian.com>
6911 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
6913 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
6915 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
6917 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
6918 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
6920 * object.c (mono_store_remote_field_new): used by the new jit
6921 instead of mono_store_remote_field
6922 (mono_load_remote_field_new): used by the new jit
6923 instead of mono_load_remote_field
6925 2003-02-05 Patrik Torstensson
6927 * appdomain.c: changed unload to take the domain id instead
6930 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
6933 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6935 * appdomain.c: don't look for assemblies in ApplicationBase if
6936 PrivateBinPathProbe is set.
6938 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6940 * object.c: make the first argument in main_args contain the absolute
6941 path to the assembly. Fixes bug #37511.
6943 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6945 * icall.c: get correct UTC offset for countries not using daylight
6946 time saving. Fixes bug #30030.
6948 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6950 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
6951 and 1 are the family).
6953 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
6955 * icall.c (ves_icall_InternalExecute): removed wrong assertion
6957 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
6959 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
6961 * reflection.c: added support for SignatureHelper tokens, which is
6962 needed by the Calli opcode.
6964 * reflection.h: track changes to SignatureHelper class.
6966 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
6968 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6970 * appdomain.c: fixed loading assemblies from PrivateBinPath.
6972 2003-02-03 Patrik Torstensson
6973 * appdomain.[c|h], domain.c :
6974 - Added support for getting a domain via domain id
6975 - Support for setting and getting domain from System.AppDomain
6976 (used in cross appdomain channel)
6977 - Added support for get/set for a MonoAppContext on a thread
6978 (Context class in System.Runtime.Remoting.Contexts),
6979 - Removed hack in Get/SetData and ExecuteAssembly.
6981 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
6982 the managed world to get control when a proxy is created.
6984 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
6986 2003-02-03 Miguel de Icaza <miguel@ximian.com>
6989 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6990 Populate the codebase field as well.
6992 2003-02-02 Martin Baulig <martin@ximian.com>
6994 * debug-mono-symfile.c
6995 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
6996 (mono_debug_symfile_add_method): Allow interncalls.
6998 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7000 * icall.c: throw parse exception if strtod fails or the string is empty.
7002 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
7004 * marshal.c: handle object type separately from defined
7007 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
7009 * marshal.c: handle NATIVE_LPSTR for strings when it's
7010 explicitly specified.
7012 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
7014 * reflection.c, reflection.h, icall.c: setup the reflection
7015 handle cache for ModuleBuilders and AssemblyBuilders.
7017 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
7019 * reflection.c (reflection_methodbuilder_to_mono_method): set
7022 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7024 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
7026 2003-01-29 Dick Porter <dick@ximian.com>
7028 * threads.c: No need for the fake_thread kludge now that Thread
7029 doesn't run a class constructor
7031 2003-01-29 Dick Porter <dick@ximian.com>
7033 * threads.c: Use g_direct_hash instead of the rather bogus
7036 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
7038 * marshal.c (mono_marshal_get_native_wrapper): add check for null
7040 (mono_marshal_get_struct_to_ptr): generate valid IL code
7041 (mono_marshal_get_ptr_to_struct): generate valid IL code
7042 (*): correctly set sig->pinvoke, we need to memdup the signature
7045 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
7047 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
7048 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
7050 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
7052 * profiler.c: provide more callers information.
7054 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
7056 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
7058 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
7060 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
7062 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7064 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
7065 exception instead of going into an infinite loop on dates which it
7068 * string-icalls.c (ves_icall_System_String_get_Chars): raise
7069 out-of-range exception if needed.
7071 * class.c (mono_class_setup_vtable): allow a virtual method to provide
7072 an implementation for an interface method and to override an inherited
7073 method at the same time.
7074 Imagine a scenario when a virtual method is used to override a
7075 virtual abstract method in a parent class, and this same method
7076 provides an implementation for an method inherited from an interface.
7077 In this case, the interface resolution code will set im->slot, which
7078 means that the virtual method override pass will skip this method
7079 which means a pointer to the abstract method inherited from the parent
7080 will remain in the vtable of this non-abstract class.
7082 * class.c: (mono_class_setup_vtable): continue search for a real
7083 method if only an abstract method is found.
7085 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
7087 * reflection.c: add size to encoding for ByValStr and ByValArray
7088 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
7090 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7092 * class.c (mono_class_setup_vtable): pass the override info as an
7095 * class.c (mono_class_setup_vtable): set the slot of overriding methods
7098 * reflection.c (ensure_runtime_vtable); add support for method
7101 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7103 * reflection.c (resolution_scope_from_image): Hack to work to work with
7106 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
7107 added a 'force_ref' argument to force this function to allways return
7108 a TypeRef. This is needed by mono_image_get_memberref_token ().
7110 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7112 * reflection.c (mono_image_get_type_info): interfaces really don't have
7115 * reflection.c (mono_image_basic_init): fill out missing fields of
7118 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
7119 dynamic assemblies. This is required so dynamic assemblies show up in
7120 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
7121 Type::GetType() etc. This is consistent with MS behaviour.
7123 * image.c image.h reflection.c: add newly created classes to the name
7124 cache so mono_class_get () will find them.
7126 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
7128 First part of changes to get IKVM.NET running under mono.
7130 * appdomain.h, appdomain.c: added new function
7131 mono_domain_try_type_resolve() which will emit TypeResolve events.
7132 This function will call AppDomain::DoTypeResolve to do the actual work.
7134 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
7135 moved existing code dealing with dynamic tokens to a new function
7136 called mono_reflection_lookup_dynamic_token (). This function will
7137 raise TypeResolve events when appropriate. Since reflection.c is not
7138 part of libmetadata, a new hook function called
7139 mono_lookup_dynamic_token() is added to class.c which will call this.
7141 * assembly.h assembly.c: make the invoke_load_hook function public,
7142 so it can be called for dynamic assemblies.
7144 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
7146 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
7149 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
7150 MonoGHashTable, since it contains pointers to objects which the GC
7153 * assembly.c (search_loaded): remove unused variable.
7155 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
7157 * object.c: fixed issue exposed by gcc-generated IL programs
7158 that use RVA data for pointers.
7160 2003-01-25 Martin Baulig <martin@ximian.com>
7162 * threads.c (start_wrapper): Moved the initialization of
7163 `start_func' above the mono_new_thread_init() call to which we
7164 pass it as argument.
7166 2003-01-24 Martin Baulig <martin@ximian.com>
7168 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
7169 the MonoThread pointer.
7171 2003-01-21 Miguel de Icaza <miguel@ximian.com>
7173 * icall.c: Rename `PowImpl' to Pow.
7175 2003-01-23 Dick Porter <dick@ximian.com>
7177 * threads.c (start_wrapper): Create a Thread object if needed, so
7178 the Main() thread can do the class initialisation in a subthread
7179 that has been set up to allow managed code execution.
7181 Pass the thread ID instead of the MonoThread pointer to the thread
7182 start and attach callbacks. This change is required, because the
7183 jit thread start callback must be called _before_ the Thread
7184 object can be created.
7186 (mono_thread_init): Removed much object creation code that is no
7187 longer needed. No managed code is called from here now.
7189 * object.c (mono_runtime_exec_managed_code): Create a subthread
7190 for Main, and call back to the runtime to use it.
7191 Set the exit code when Main exits.
7193 * gc.c: Make sure domain finalisation happens in a subthread.
7194 Re-enable threaded GC, fixing bug 31333 (again).
7196 * environment.c: System.Environment internall calls (so far just
7197 ExitCode is here, the others are still in icall.c)
7199 * appdomain.c (mono_runtime_cleanup): All threads running managed
7200 code should have finished before mono_runtime_cleanup() is
7201 reached, so no need to clean up threads.
7203 2003-01-22 Martin Baulig <martin@ximian.com>
7205 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
7206 `gpointer func' arguments.
7207 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
7208 but added `MonoThread *thread' argument.
7209 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
7211 * threads.c (mono_new_thread_init): Added `gpointer func' argument
7212 and pass it to the mono_thread_start_cb callback.
7213 (mono_install_thread_callbacks): New public function to install a
7214 set of callbacks which are set by the debugger.
7215 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
7217 2003-01-22 Martin Baulig <martin@ximian.com>
7219 * Makefile.am: Install debug-mono-symfile.h.
7221 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
7223 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
7225 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
7227 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
7228 * class.c (mono_ptr_class_get): correctly set access levels of pointers
7229 (mono_array_class_get): correctly set access levels of arrays
7231 2003-01-20 Patrik Torstensson
7232 * image.h (MonoAssemblyName): changed major, minor, build, revision
7233 from signed to unsigned.
7235 2003-01-20 sean kasun <skasun@azstarnet.com>
7237 * reflection.c (load_cattr_value): Now this handles
7238 MONO_TYPE_SZARRAY. Fixes bug #35629
7240 2003-01-20 Miguel de Icaza <miguel@ximian.com>
7242 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
7245 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7247 * decimal.c: fixed bug #26056.
7249 2003-01-17 Martin Baulig <martin@ximian.com>
7251 * gc.c: Raise an ExecutionEngineException instead of using g_error().
7253 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7256 (mono_get_exception_type_initialization): new function.
7258 * object.c: throw a TypeInitializationException when an exception is
7259 thrown invoking the class constructor.
7261 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7263 * reflection.c: fixed attribute reading.
7265 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7268 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
7269 provided, look for the type in the calling assembly and then in
7270 mscorlib; if the assembly name is provided, only try that one.
7272 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
7274 * object.c: register the vtable before there is a chance it's
7275 queried again recursively.
7277 2003-01-13 Duncan Mak <duncan@ximian.com>
7279 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
7282 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
7284 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
7286 2003-01-11 Martin Baulig <martin@ximian.com>
7288 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
7289 this to 20 for the release.
7291 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
7293 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
7295 * loader.c (mono_method_get_marshal_info): bug fix
7297 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
7298 structures with explicit layout
7300 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
7302 * profiler.c: made the output more readable (and sorted).
7303 Added caller information for the allocation profiler.
7305 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
7307 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
7309 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7311 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
7314 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
7316 * object.c, profiler.h, profiler.c, profiler-private.h:
7317 Added object allocation profiler.
7319 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
7321 * reflection.h, reflection.c: handle global methods.
7322 Compress blob entries.
7324 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
7326 * marshal.c: fix compilation.
7328 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
7330 * loader.c (mono_method_get_marshal_info): impl.
7332 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
7334 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7336 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
7337 for reference types.
7339 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
7341 * loader.c: fixed off by one error in loaded parameter names.
7343 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
7345 * marshal.c (mono_marshal_get_icall_wrapper): like
7346 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
7347 instead of a MonoMethod.
7349 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7351 * decimal.c: fixed bug #36537.
7353 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
7355 * marshal.c: throw a missing method exception if a
7356 P/Invoke method is not found.
7358 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
7360 * icall.c: allow a null this for constructors.
7362 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
7364 * icall.c: raise the proper exceptions if the arguments to the
7365 internal Invoke are incorrect.
7367 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
7369 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
7371 2003-01-03 Martin Baulig <martin@ximian.com>
7373 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
7375 2002-12-31 Martin Baulig <martin@ximian.com>
7377 * debug-mono-symfile.c: Completely rewrote the type section.
7378 Instead of using individual malloc()ed fields, we use one big
7379 continuous memory area and offsets into this area.
7380 See the comments in the source code for details.
7382 2002-12-30 Martin Baulig <martin@ximian.com>
7384 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
7386 2002-12-30 Martin Baulig <martin@ximian.com>
7388 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
7389 line number table in this data blob instead of using an external
7392 2002-12-28 Martin Baulig <martin@ximian.com>
7394 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
7396 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
7398 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
7399 as a boxed return type.
7401 2002-12-21 Miguel de Icaza <miguel@ximian.com>
7404 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
7405 g_build_filename to properly get separators on the filename created.
7407 * object.h: Small change, introduce MonoMarshalByRefObject to
7408 track the layout of that structure in the C# universe as we make
7411 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
7413 * object.c: removed assert to allow static fields on interfaces.
7414 * loader.c: a TypeSpec may be used for any type, not just arrays.
7416 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
7418 * class.c, class.h: added mono_class_array_element_size ().
7419 Ignore static methods in interfaces.
7421 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7423 * threads.c: fixed the build under cygwin.
7425 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
7427 * reflection.c: handle nullref constants. Allocate keys for
7428 reflection handles with the GC.
7430 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
7432 * threads.c, threads.h: added mono_thread_get_abort_signal()
7433 to get a suitable signal for thread abort.
7435 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
7437 * metadata.c: fix handling of ExportedType table.
7439 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7441 * icall.c: added WriteWindowsDebugString internal call.
7443 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7445 * reflection.h: added fields to match C# implementation.
7447 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7449 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
7451 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
7453 * gc.h, gc-internal.h: Rename header for GC internal calls to
7454 gc-internal.h from gc.h as to not clash with Boehm GC having its
7455 header installed as <gc.h> in outside include paths.
7456 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
7457 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
7459 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7461 * icall.c: assign minor, build and revision in FillName.
7463 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
7465 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
7466 Added support for running code generated by Reflection.Emit.
7468 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7470 * appdomain.c: check for NULL argument in LoadFrom.
7472 2002-12-10 Dick Porter <dick@ximian.com>
7474 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
7476 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7478 * appdomain.c: fix buglet when building exe file name. Handle full
7479 assembly name (needed after latest changes to AssemblyName).
7481 (mono_image_close): free some hashtables.
7483 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
7485 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
7486 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
7487 on some systems (redhat 7.3)
7489 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
7491 * threads.c: delete the critical section of a sync block,
7492 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
7494 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
7496 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
7498 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7500 * appdomain.[ch]: handle the assembly preload event to try loading the
7501 assemblies using the paths we have in the current domain.
7503 * assembly.[ch]: created an assembly preload hook that is called to try
7504 loading the assembly by other means that the ones provided here.
7506 * domain.c: initialize the domain search path.
7508 From now on, assemblies (TODO: except corlib and System) are loaded
7509 according to these rules when using mono_assembly_load ():
7511 1. It tries to load the assembly from the ApplicationBase
7512 of the current domain appending .dll and .exe (TODO: have to
7513 try loading from name/name.dll and name/name.exe).
7515 2. It tries the search path specified in PrivateBinPath for the
7516 current domain (if any).
7518 3. Previous behavior.
7520 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
7522 * icall.c: implemented GetInterfaceMap() related icall.
7523 * domain.c, loader.h: load MethodInfo in mono_defaults.
7525 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
7527 * gc.c: disable the finalizer thread for now, untill all the issues
7528 with it are resolved.
7530 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
7532 * string-icalls.c: handle embedded nulls in string ctor when the
7533 length is specified.
7535 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
7537 * class.c: look for explicit interface implementation in parent
7540 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
7542 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
7544 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
7546 * gc.c: protect handles with a critical section.
7548 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7551 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
7552 parameters. If no assembly specified, try getting the type from all
7553 the assemblies in the current domain, else, load the assembly and get
7556 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7558 * marshal.c: applied patch from Aleksey Demakov that fixes
7559 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
7561 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7563 * icall.c: fixed get_location.
7565 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
7567 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
7568 declarations to make it work with older gcc.
7570 * loader.c (mono_get_method): set signature->pinvoke for native calls
7572 2002-11-20 Dick Porter <dick@ximian.com>
7574 * threads.c (mono_thread_init): Set the main thread's handle
7576 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
7578 * gc.c: allow compilation without GC support. Changed to match the
7581 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
7583 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
7585 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
7587 * reflection.c: set a public key token on the core assemblies.
7589 2002-11-18 Dick Porter <dick@ximian.com>
7591 * threads.c: Split out some thread initialisation so that other
7592 files can set the start callback function.
7594 * gc.c: Run finalisers in a separate thread, to avoid stack
7595 overflow. Fixes bug 31333.
7597 * appdomain.c: Set up GC finalisation thread.
7601 * domain.c: Use gc.h macros for GC_malloc
7603 2002-11-15 Dick Porter <dick@ximian.com>
7607 * appdomain.c: Removed mono_runtime_init_with_attach(),
7608 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
7609 merging the extra parameter with the existing function. Removed
7610 unneeded code in mono_thread_attach().
7612 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
7614 * image.c (mono_image_loaded_by_guid): a method to get loaded
7616 (load_metadata_ptrs): we store the guid as string.
7618 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
7620 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
7622 * metadata.c (mono_guid_to_string): imported method form Zoltan
7623 Varga (slightly modified)
7625 * assembly.c (mono_assembly_open): load precompiled code
7627 * loader.h (MonoMethod): we store the method token for use in the
7630 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7632 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
7633 the hook function called when an assembly is loaded.
7635 * domain.c: Modified file.
7636 (mono_domain_assembly_load): removed hash table insertion of assemblies.
7640 2002-11-07 Miguel de Icaza <miguel@ximian.com>
7642 * reflection.c: Map PEFileKind to the value expected by the WinNT
7645 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7647 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
7648 Read until the buffer is filled completely.
7650 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7652 * icall.c: implemented MonoType.InternalGetEvent ().
7654 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7656 * appdomain.c: implemented InitAppDomainSetup. Delayed
7657 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
7660 * assembly.c: base_dir is now an absolute path ending with
7663 * icall.c: modified get_location according to the above changes.
7665 * object.c: init AppDomain.SetupInformation for the default domain after
7666 we have the entry assembly.
7668 * domain.c: when unloading a domain, setup = NULL.
7670 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
7672 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
7674 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
7676 * object.h, object.c: introduced mono_object_get_virtual_method ()
7677 to lookup the method invoked on an object when a callvirt is done on
7679 * icall.c: make MethodInfo::Invoke() always do a virtual call.
7681 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7683 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
7684 current domain when loaded an assembly and failed to load it.
7686 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
7688 2002-10-31 Dick Porter <dick@ximian.com>
7692 * file-io.c: Return the error status in a parameter, as the
7693 GetLastError() value has long since been blown away if we try and
7694 look it up in a subsequent internal call invocation. Delete the
7695 GetLastError() internal call, because it's useless.
7697 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
7699 * class.[ch]: added cast_class to fix bug 29517
7701 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
7703 * marshal.c: create valid IL code in the filter clause:
7704 the new JIT is less forgiving:-)
7706 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7708 * icall.c: removed get_property internal call.
7710 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
7712 * appdomain.h domain.c: Added an ID to appdomains.
7714 * threads.c threads.h icall.c: Implement icall
7715 Thread:GetDomainID(), and remove unused icall
7716 CurrentThreadDomain_internal.
7718 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7720 * icall.c: Don't recurse through the base types in GetConstructor.
7723 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
7725 * mempool.h, mempool.c: added mono_mempool_empty() and
7726 mono_mempool_stats().
7728 2002-10-23 Dick Porter <dick@ximian.com>
7732 * icall.c: Added MonoIO.GetFileType internal call
7734 2002-10-17 Dick Porter <dick@ximian.com>
7736 * appdomain.c (mono_runtime_cleanup): Don't signal the async
7737 delegate semaphore before waiting for all threads to finish,
7738 because new threads can also call async delegates. Fixes bug
7741 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
7742 of 3 seconds, in case another async job is queued. (This part is
7743 needed because the bug fix reintroduced the 3s exit lag.) This
7744 makes the mono_runtime_shutdown flag superfluous.
7746 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
7748 * reflection.c: include ehader size in method section headers.
7749 Really check for suplicated modules entries.
7751 2002-10-17 Martin Baulig <martin@gnome.org>
7753 * debug-mono-symfile.c: Added back support for locals.
7755 2002-10-14 Martin Baulig <martin@gnome.org>
7757 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
7760 2002-10-14 Martin Baulig <martin@gnome.org>
7762 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
7763 mono_class_get() instead of looking in the class cache.
7765 2002-10-13 Martin Baulig <martin@gnome.org>
7767 * debug-mono-symfile.c: Set version number to 28, include the
7768 signature in method names.
7770 2002-10-13 Martin Baulig <martin@gnome.org>
7772 * debug-mono-symfile.h: Set version number to 27.
7774 2002-10-11 Martin Baulig <martin@gnome.org>
7776 * gc.c: Don't register/unregister NULL pointers as disappearing links.
7778 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
7780 * metadata.c, metadata.h: added helper function to allocate signatures.
7782 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7784 * icall.c: added internal call to get the location of machine.config.
7786 2002-10-08 Martin Baulig <martin@gnome.org>
7788 * debug-mono-symfile.c: Ignore classes with a pending init for the
7791 2002-10-03 Dick Porter <dick@ximian.com>
7793 * threads.c: Freebsd pthread_t is a pointer
7795 2002-10-03 Dick Porter <dick@ximian.com>
7797 * socket-io.c: Implemented GetHostName_internal
7799 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7802 (mono_config_parse_file): don't leak the text.
7804 2002-10-02 Martin Baulig <martin@gnome.org>
7806 * debug-mono-symfile.c: Added support for methods.
7808 2002-10-01 Martin Baulig <martin@gnome.org>
7810 * debug-mono-symfile.c: Don't emit methods and line numbers for
7811 the dynamic symbol file, just write the type table. We can easily
7812 have an external helper program which creates a symbol file for an
7815 2002-10-01 Dick Porter <dick@ximian.com>
7817 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
7818 Only add the handle to the cleanup array when we're about to
7819 launch the thread. Bug 31425 deadlocked when the test was run on
7822 2002-10-01 Martin Baulig <martin@gnome.org>
7824 * debug-mono-symfile.c: Added support for properties.
7826 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
7828 * reflection.c: unaligned store fix from Mark Crichton
7829 <crichton@gimp.org>.
7831 2002-09-27 Martin Baulig <martin@gnome.org>
7833 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
7836 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
7838 * assembly.h, assembly.c: use a sane API to hook into the assembly
7839 loading process instead of a useless special-purpouse hack
7840 (ngen needs a hook, too, for example).
7842 2002-09-27 Dick Porter <dick@ximian.com>
7844 * threads.c (mono_thread_init): Call GetCurrentProcess() so
7845 io-layer can set up some process handle info. Not needed on w32,
7846 but doesn't hurt either.
7848 * process.c: Pass the program name in the second parameter to
7849 CreateProcess, so the path is searched. Include the working
7850 directory. Implemented process name, process enumeration, and some
7851 process detail internal calls.
7853 * icall.c: Added internal calls for process lookup, and some
7856 2002-09-26 Martin Baulig <martin@gnome.org>
7858 * assembly.c (mono_install_open_assembly_hook): New global
7859 function to install a function to be invoked each time a new
7861 (mono_assembly_open): Run this callback function if set.
7863 * debug-mono-symfile.c: Put back line numbers for the dynamic
7864 symbol file and also record the .il file as source file. This
7865 allows us to install the temporary symbol file as `file.dbg' just
7866 like a compiler-generated one.
7868 2002-09-26 Nick Zigarovich <nick@chemlab.org>
7870 * Corrected typo in gc.c (BOHEM vs BOEHM).
7872 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7874 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
7875 GetProperties. Also avoid calling g_slist_length in GetProperties and
7878 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
7880 * reflection.c: avoid unaligned stores (bug spotted by
7881 Mark Crichton <crichton@gimp.org>).
7883 2002-09-25 Martin Baulig <martin@gnome.org>
7885 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
7886 instead of guint64 for addresses and added prologue/epilogue info.
7888 2002-09-25 Martin Baulig <martin@gnome.org>
7890 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
7891 store line number info. For the dynamic symbol file, we only need
7892 to provide the JIT generated dynamic line number info for the dynamic
7895 2002-09-25 Martin Baulig <martin@gnome.org>
7897 * debug-mono-symfile.h: Incremented version number.
7899 2002-09-24 Martin Baulig <martin@gnome.org>
7901 * class.c (mono_debugger_class_init_func): New global function
7903 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
7906 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
7907 function. This is called via the mono_debugger_class_init_func
7908 hook to add all types to the dynamic type table.
7909 (ves_icall_MonoDebugger_GetType): New interncall to get a class
7910 from its metadata token.
7912 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
7913 New interncall for the debugger.
7915 2002-09-24 Nick Drochak <ndrochak@gol.com>
7917 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
7918 before using it in case it is null.
7920 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
7922 * metadata.c: allow custom modifiers in local var signatures
7923 (bug spotted by Zoltan Varga).
7925 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
7927 * class.c: deal with the <Module> class that may have a NULL vtable.
7930 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
7932 * image.c, image.h: more strong name helpers.
7933 * monosn.c: more work: convert pem keys to cryptoapi format.
7935 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
7937 * string-icalls.c: speedup IndexOf.
7939 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
7941 * icall.c: updates from Zoltan.2.Varga@nokia.com.
7943 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
7945 * icall.c: cleanup: use mono_object_domain ().
7947 2002-09-23 Martin Baulig <martin@gnome.org>
7949 * debug-mono-symfile.c: Improved type support.
7951 2002-09-22 Martin Baulig <martin@gnome.org>
7953 * debug-mono-symfile.c: Added support for reference types and strings.
7955 2002-09-22 Martin Baulig <martin@gnome.org>
7957 * debug-mono-symfile.c: Started to work on the type table.
7959 2002-09-21 Martin Baulig <martin@gnome.org>
7961 * debug-mono-symfile.c: Largely reworked the symbol table format.
7962 The symbol table is now incrementally updated each time a new
7963 method is added. We're now also using our own magic and version
7964 so that you don't need to recompile all your classes if the
7965 dynamic table changes.
7966 (mono_debug_update_mono_symbol_file): Removed.
7967 (mono_debug_symfile_add_method): New function to add a method.
7969 2002-09-21 Martin Baulig <martin@gnome.org>
7972 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
7975 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
7976 New interncall to get a method from its metadata token.
7978 2002-09-21 Martin Baulig <martin@gnome.org>
7980 * debug-mono-symfile.c: Create type table.
7982 2002-09-20 Martin Baulig <martin@gnome.org>
7984 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
7986 2002-09-20 Martin Baulig <martin@gnome.org>
7988 * debug-mono-symfile.c: Provide information about params and locals.
7990 2002-09-20 Martin Baulig <martin@gnome.org>
7992 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
7995 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
7996 interncall to get a method from its metadata token.
7998 2002-09-20 Martin Baulig <martin@gnome.org>
8000 * debug-mono-symfile.c: Added a few checks for method->header
8001 being non-NULL. This should never happen, but for the moment
8002 let's use a g_warning() rather than a g_assert().
8004 2002-09-19 Mark Crichton <crichton@gimp.org>
8006 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
8007 even if support for it isn't present. Added an #ifdef to fix this.
8009 * socket-io.c: Added checks back for Solaris support.
8011 2002-09-19 Martin Baulig <martin@gnome.org>
8013 * debug-mono-symfile.c (read_string, write_string): Reflect latest
8014 changes in the symbol file format.
8016 2002-09-18 Martin Baulig <martin@gnome.org>
8018 * debug-mono-symfile.c: Set version number to 21.
8020 2002-09-18 Dick Porter <dick@ximian.com>
8022 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
8023 on netbsd. Fixes bug 30051.
8025 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8028 (set_version_from_string): little fix.
8030 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8032 * monosn.c, Makefile.am: added strong name utility.
8033 * reflection.h, reflection.c: implemented delayed signing,
8034 locale, version and hash id assembly attributes.
8036 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
8038 * loader.c, metadata.c: load param attributes in signatures.
8040 2002-09-16 Martin Baulig <martin@gnome.org>
8042 * debug-mono-symfile.c: Added string table with all method names.
8044 2002-09-14 Martin Baulig <martin@gnome.org>
8046 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
8049 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8051 * reflection.c: record the public key token of referenced assemblies.
8053 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8055 * image.c, image.h: added functions to get the strong name and the
8056 public key of an assembly.
8057 * pedump.c: use them.
8059 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
8061 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
8063 2002-09-12 Miguel de Icaza <miguel@ximian.com>
8065 * marshal.c (mono_marshal_get_managed_wrapper): Added
8068 2002-09-11 Martin Baulig <martin@gnome.org>
8070 * gc.c: Call GC_unregister_disappearing_link() on all links when
8071 finalizing them, this is necessary to aviod a crash in boehm's
8074 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8076 * gc.c: handle GetTarget for finalized objects spotted and fixed by
8079 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
8081 * icall.c: implemented MonoType::Module.
8082 * reflection.c, reflection.h: mono_module_get_object () from
8083 Tomi Pakarinen <tomi.pakarinen@welho.com>.
8085 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
8087 * icall.c: ignore overridden methods in GetMethods ().
8088 Fix for FieldInfo::SetValue().
8089 * object.c: handle float/double in runtime invoke.
8091 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
8093 * object.c: allow a constructor to be called again on an object.
8095 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8097 * class.h, class.c: move field layout code to it's own function and
8098 export it. Get an interface id earlier. Move fields in MonoClass
8099 so they are more cache friendly and align the bitfields.
8100 * loader.c: temporary handle get_param_names() for a runtime method.
8101 * reflection.c, reflection.h: more code to handle runtime creation of
8104 2002-09-09 Martin Baulig <martin@gnome.org>
8106 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
8107 signature with the pinvoke field being set for the actual call.
8109 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8111 * icall.c: removed some unused icalls. Start of map of glib charsets
8112 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
8114 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8116 * debug-helpers.c: break infinite loop (found and fixed by
8117 Holger Arnold <harnold@gmx.de>).
8119 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
8121 * icall.c: target may be null in create_delegate.
8123 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8125 * marshal.c: handle a boolean return type.
8127 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
8129 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
8131 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8133 * gc.c: fix weakreferences.
8135 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
8137 * icall.c: added icall to get default codepage.
8139 2002-09-03 Dick Porter <dick@ximian.com>
8142 * threads.c: Use MonoThread instead of MonoObject where
8145 Store running thread objects in a hash table, so that we have all
8146 the info to hand when waiting for them to finish
8147 (means we don't need OpenThread() any more, so mingw builds should
8148 be fully functional again.)
8151 * object.h: Added thread ID to MonoThread
8153 2002-09-03 Martin Baulig <martin@gnome.org>
8155 * icall.c (System.Reflection.Assembly::get_location): New interncall.
8157 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8159 * icall.c: fixed leak in get_temp_path. Thanks lupus.
8161 2002-09-03 Martin Baulig <martin@gnome.org>
8163 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
8164 argument to store the end address of the disassembled instruction.
8166 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
8167 here from debug-symfile.h.
8168 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
8169 JIT into this struct.
8170 (MonoSymbolFile): Added `char *image_file' field.
8171 (MonoDebugGetMethodFunc): Removed.
8172 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
8173 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
8174 (mono_debug_find_method): New method.
8176 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
8177 create a full symbol file.
8178 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
8179 and static symbol files.
8180 (mono_debug_find_method): The symbol file keeps an internal method hash,
8181 call this to get a MonoDebugMethodInfo from a MonoMethod.
8183 * debug-symfile.[ch]: Removed.
8185 2002-08-29 Miguel de Icaza <miguel@ximian.com>
8187 * image.c (do_mono_image_open): Remove linker version check.
8189 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
8191 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
8192 wrappers for instance methods.
8194 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8196 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
8198 2002-08-28 Dick Porter <dick@ximian.com>
8200 * Makefile.am: Export HOST_CC for w32 builds
8202 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8204 * file-io.c process.c: MonoString are null terminated, no
8205 need for mono_string_to_utf16() anymore.
8207 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8209 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
8211 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
8213 * icall.c, reflection.h: speedup System.MonoType.
8215 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
8217 * reflection.c: allow null as the value of a string argument in
8218 custom attributes constructors.
8220 2002-08-27 Martin Baulig <martin@gnome.org>
8222 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
8223 `trampoline_address' field.
8225 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
8227 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
8228 check (fixes bug #29486)
8230 2002-08-27 Martin Baulig <martin@gnome.org>
8232 * debug-mono-symfile.c: Changed the file format in a way that allows us
8233 open it read-only and to use a specially malloced area for all the
8234 dynamic data. We can now also generate a symbol file on-the-fly if we're
8235 debugging IL code and there is no MCS generated symbol file for it.
8237 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
8239 * object.c: added a define for a good string and array
8240 creation speedup (not enabled by default because we need to deal with
8243 2002-08-26 Martin Baulig <martin@gnome.org>
8245 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
8246 function to create a dynamic symbol file. This is used by the
8247 debugger to create a symbol file for IL code on-the-fly.
8249 2002-08-26 Martin Baulig <martin@gnome.org>
8251 * loader.c (mono_lookup_pinvoke_call): Include the error message
8252 from g_module_error() in the error message.
8254 2002-08-24 Martin Baulig <martin@gnome.org>
8256 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
8257 function to update the symbol file. The symbol file is mmap()ed
8258 writable, but private. This allows us to install the symbol file
8259 together with the assembly.
8261 2002-08-24 Martin Baulig <martin@gnome.org>
8263 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
8264 but they can read the new symbol file format which mcs is now creating.
8266 * debug-symfile.c (mono_debug_find_source_location): Moved to
8267 debug-mono-symfile.c; this is now operating on the new symbol file.
8269 2002-08-23 Martin Baulig <martin@gnome.org>
8271 * debug-helpers.c (mono_method_desc_from_method): New function to get
8272 a MonoMethodDesc from a MonoMethod.
8274 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
8276 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
8277 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
8279 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
8281 * string-icalls.[ch]: make helper methods static.
8283 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8285 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
8286 types to it and to SetValueInternal.
8288 * object.c: Moved handle_enum label to its proper place. This was the
8291 This time i compiled mcs and gtk-sharp and they both work.
8293 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8295 * icall.c: reverted partially my previous patch until
8296 object.c:set_value handles enums correcly.
8298 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8301 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
8302 (ves_icall_System_Environment_get_MachineName): removed warning when
8303 compiling under cygwin.
8305 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8307 * object.c: fixed field_get_value() for reference types.
8309 2002-08-22 Dick Porter <dick@ximian.com>
8311 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
8312 Don't free a buffer while it's still needed. Patch from Jonathan
8313 Liger <Jonathan.liger@wanadoo.fr>
8315 2002-08-21 Miguel de Icaza <miguel@ximian.com>
8317 * icall.c (ves_icall_System_Environment_get_Platform): Add new
8320 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
8322 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
8323 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
8325 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
8326 we call unmanaged code which throws exceptions.
8328 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8330 * appdomain.h: added per-domain entry_assembly.
8331 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
8333 * icall.c: Assembly::GetEntryAssembly icall.
8334 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
8335 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
8337 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8339 * appdomain.h, gc.c: added mono_domain_finalize ().
8341 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8344 (mono_print_unhandled_exception): changed g_warning by g_printerr
8345 because g_log has a 1024 characters limit (yeah, i got a big stack
8346 trace). Don't print exception name, that should be in ToString
8349 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8351 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
8352 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
8354 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8357 (mono_print_unhandled_exception): after previous commit, i realized
8358 that MS calls ToString on the exception. I changed this function to
8359 do that. This way we get stack_trace for free.
8361 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8364 (mono_print_unhandled_exception): invoke Message property instead of
8365 getting 'message' field from Exception. Don't allocate memory for
8366 'trace' and 'message' if not needed.
8368 2002-08-18 Dick Porter <dick@ximian.com>
8370 * unicode.c: Fix asserts to match Encoder.cs checks
8372 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8374 * marshal.c: fix unaligned store issue and a few wrong
8375 opcode argument types.
8377 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8379 * icall.c: added GetUninitializedObjectInternal internal call.
8381 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
8383 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
8384 to the right domain.
8386 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
8388 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
8390 * class.c (class_compute_field_layout): set blittable to false for Strings
8392 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
8394 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8396 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
8397 first chunk of code to create types at runtime. Code to
8398 handle ReflectedType/DeclaringType. Make reflection handles
8401 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
8403 * class.c: set correct name in arrays.
8405 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
8407 * appdomain.c (mono_domain_transfer_object): make it work with
8408 valuetypes. bug fixes.
8410 2002-08-12 Dick Porter <dick@ximian.com>
8412 * object.h: Rename some parameters to avoid c++ keywords (Patch
8413 from Joseph Wenninger <kde@jowenn.at>)
8415 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
8417 * icall.c: added icall to implement Assembly.GetFile*.
8419 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8421 * reflection.h, reflection.c: code to embed managed resources.
8423 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
8425 * class.c: move all the type size stuff into
8426 class_compute_field_layout().
8428 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
8430 * class.c: ensure enums have always the correct instance size.
8431 * unicode.c: remove wrong assert.
8433 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
8435 * assembly.c: fix mem corruption issue.
8436 * image.h, image.c: added mono_image_get_resource () to access
8438 * icall.c: implemented Assembly.EntryPoint property and some
8439 Managed Resources related internalcalls.
8442 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
8444 * image.c, image.h: impemented mono_image_get_entry_point ().
8445 * appdomain.c: use mono_image_get_entry_point.
8447 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8449 * reflection.c: support the object type argument when loading
8452 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
8454 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
8455 String as return type.
8457 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
8459 * reflection.c: fix encoding of named args for custom attrs to match
8460 the ms implementation. Read them back when instantiating custom
8463 2002-08-02 Radek Doulik <rodo@ximian.com>
8465 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
8466 by Dietmar as quick fix
8467 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
8468 16 as stack size, used on more places as quick fix before Dietmar
8469 will fix it properly
8471 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
8473 * object.h, object.c: added accessors for fields and properties.
8475 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
8477 * class.c, class.h: made mono_class_get_field_from_name ()
8478 loop on parent types.
8479 Added mono_class_get_property_from_name ().
8481 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8483 * class.c, class.h: move the code to setup the type vtable in its own
8484 function so that it can be reused also for types created at runtime.
8485 Eliminate the "class" identifier from the header file.
8486 * reflection.c: setup the vtable for enums so that we can create
8487 objects for use in SetConstant ().
8489 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
8491 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
8492 instead of the delegate itself as this pointer (bug #28383)
8494 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
8496 * marshal.c (mono_marshal_get_managed_wrapper): added return type
8499 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8501 * loader.c: don't set the pinvoke bit on icalls.
8503 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
8505 * debug-helpers.c (mono_method_full_name): only print a number to
8506 indicate wrapper type (so that the output is more readable in traces).
8508 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
8510 * class.c (mono_class_init): include method override patch from Paolo
8512 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
8514 * icall.c: fixed GetTypeCode().
8516 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
8518 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
8519 use real delegate invoke function to make it work with multicast
8520 delegates (fix bug# 28291).
8522 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
8524 * object.c: load constant strings.
8526 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
8528 * reflection.c: no magic numbers.
8529 * tabledefs.h: security action enum.
8531 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8533 * assembly.c: fix possible memory corruption.
8535 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
8537 * reflection.h, reflection.c: added support for linking resources.
8538 * verify.c: check we have an updated corlib.
8540 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
8542 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
8544 (mono_marshal_string_array): null terminate unmanaged string arrays.
8545 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
8547 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
8549 * icall.c: Type.GetType () can now return also types from the
8552 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
8554 * loader.h, loader.c: stack walking support.
8555 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
8558 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
8560 * marshal.c: added optimisations for blittable types
8562 * class.c (mono_array_class_get): do not set blittable attribute on arrays
8563 (mono_class_setup_mono_type): set blittable attribute for single
8566 * marshal.c (mono_string_utf8_to_builder): impl.
8567 (mono_string_builder_to_utf8): impl.
8568 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
8570 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
8572 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
8573 (mono_marshal_get_managed_wrapper): impl. byref types
8575 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8578 (search_method): don't display debug message.
8580 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
8582 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
8584 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
8586 * appdomain.c: set the missing filename when throwing exception.
8588 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
8590 * metadata.c (mono_type_size): code cleanup
8591 (mono_type_stack_size): removed some test code
8593 2002-07-21 Miguel de Icaza <miguel@ximian.com>
8595 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
8596 mono_get_exception_file_not_found now.
8598 * exception.c (mono_exception_from_name_two_strings): New version
8599 that will call a constructor with two string arguments.
8600 (mono_get_exception_file_not_found): New helper routine, used to
8601 report file-not-found errors.
8603 2002-07-20 Dick Porter <dick@ximian.com>
8606 * process.c: Pass file handles to CreateProcess
8610 * file-io.c: Implemented CreatePipe
8612 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
8614 * metadata.c (mono_get_param_info): set alignment for value types
8616 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
8618 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
8619 Constify mono_domain_assembly_open().
8620 * loader.c: handle null namespace in icalls.
8622 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
8624 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
8625 (emit_str_to_ptr_conv): marshal object as structs
8627 * metadata.c (mono_type_to_unmanaged): marshal object as structs
8629 * marshal.c (mono_marshal_get_runtime_invoke): support value types
8631 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
8633 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
8634 (mono_marshal_get_native_wrapper): we an now return value types
8636 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8638 * verify.c: more checks implemented.
8640 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
8642 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
8644 (mono_marshal_get_native_wrapper): allow byref arguments
8645 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
8646 impl. PtrToStringXXX methods
8647 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
8648 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
8649 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
8650 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
8651 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
8653 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8655 * reflection.c: fix buglet in parsing an assembly name.
8657 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
8659 * marshal.c (emit_ptr_to_str_conv): first impl.
8661 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
8663 * object.c, class.h: cache the vtable in the class as suggested by
8664 vargaz@freemail.hu (Zoltan Varga).
8666 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8668 * class.h, loader.c: added mono_field_from_token().
8669 * verify.c: first cut of type checking code.
8671 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
8673 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
8675 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
8677 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
8679 (mono_marshal_get_remoting_invoke): impl.
8680 (mono_delegate_begin_invoke): impl.
8681 (mono_mb_emit_save_args): impl.
8682 (mono_delegate_end_invoke): impl.
8683 (mono_marshal_get_delegate_begin_invoke):
8684 (mono_marshal_get_delegate_end_invoke):
8685 (mono_marshal_get_delegate_invoke): generate a special name for
8686 those methods (including the signature) and associate them whith
8689 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
8692 (mono_reflection_type_from_name): now it has a MonoImage parameter
8693 which is used as the default image to search the type in. If the image
8694 is NULL or getting the type from it fails, it defaults to corlib.
8696 * icall.c: changed 1 call to mono_reflection_type_from_name to match
8699 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8701 * reflection.c: update the parameter table index.
8703 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
8705 * domain.c: don't include the mark byte in the string hash.
8707 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
8709 * icall.cs: icall for Type.GetTypeCode ().
8710 * verify: a couple of fixes and disabled local initialization checks.
8712 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
8714 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
8716 * debug-helpers.c (mono_method_full_name): print the type of the
8719 * metadata.c (mono_signature_hash): a hash function for signatures
8720 (mono_signature_hash): better hash algorithm
8722 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
8724 * debug-helpers.c (mono_method_full_name): this can now generate
8725 method names with signatures
8727 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
8728 method dont have this pointers.
8730 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
8732 * reflection.c: fixup typebuilder tokens.
8733 * image.c: fix buglet.
8734 * marshal.h: remove whitespace.
8735 * metadata.h, metadata.c: reinstate code that was removed.
8736 * verify.c: handle catch directives and fix another couple of bugs.
8738 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
8740 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
8741 (mono_marshal_get_native_wrapper): make it comp. with the old code
8742 (mono_marshal_get_native_wrapper): support boolean
8743 (mono_marshal_get_managed_wrapper): support more types
8745 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
8747 * class.c (class_compute_field_layout): compute class->blittable attribute.
8749 2002-07-09 Dick Porter <dick@ximian.com>
8751 * threads.c: Make the thread cleaning up cope with threads that
8754 2002-07-08 Radek Doulik <rodo@ximian.com>
8756 * reflection.c (method_encode_code): use non-translated values to
8757 compute finally_start, this fixes exception handling on ppc, yay!
8759 * decimal.h (struct signscale): fix endianess
8761 2002-07-07 Radek Doulik <rodo@ximian.com>
8763 * reflection.c: swap box_val and not val
8765 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
8767 * reflection.c, reflection.h: handle full assembly info in type name.
8768 Handle Type arguments when loading custom attributes.
8769 * icall.c: updated to use new mono_reflection_type_from_name () method.
8771 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8774 (method_from_memberref): also print assembly name when method not found.
8776 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8779 (ves_icall_TypeGetProperties): fixed bug #27473.
8781 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8783 * reflection.c: display image name and token when cannot find the
8784 .ctor for an attribute.
8786 2002-07-05 Martin Baulig <martin@gnome.org>
8788 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
8790 2002-07-04 Dick Porter <dick@ximian.com>
8792 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
8793 compile on mingw. This will cause mingw builds to not wait for
8794 subthreads to terminate after the main thread does. I've lodged a
8795 bug with the mingw developers for them to wrap OpenThread().
8797 2002-07-03 Dick Porter <dick@ximian.com>
8799 * threads.c: Store thread IDs instead of handles, because
8800 GetCurrentThread() returns a pseudohandle and therefore stores
8801 useless values. mono_thread_cleanup() continues checking the
8802 array of threads until it is empty, to cope with subthreads
8803 spawning new threads after the main thread has finished.
8807 * profiler-private.h: Pass the thread ID to thread profiler
8808 functions, instead of a handle
8810 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
8812 * verify.c: fixes to make it more usable.
8813 * pedump.c: added --verify code to verify IL code in an assembly.
8815 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8817 * reflection.c: turn errors into warnings to allow compiling corlib.
8819 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
8821 * reflection.c: add special cases to compile corlib.
8823 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8825 * reflection.c: handle properties with only a set method.
8827 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
8829 * opcodes.h: add enum with opcodes in opval order.
8831 2002-07-01 Dick Porter <dick@ximian.com>
8834 * object.c (mono_runtime_run_main): Removed unneeded argument
8836 2002-06-28 Martin Baulig <martin@gnome.org>
8838 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
8840 2002-06-27 Dick Porter <dick@ximian.com>
8842 * threads.c: Store the handle in both the parent thread and in the
8843 subthread, to minimise the time between starting a new thread and
8846 2002-06-26 Dick Porter <dick@ximian.com>
8848 * appdomain.c (mono_runtime_cleanup): Close the socket library
8849 after all the threads have finished, not before
8851 2002-06-26 Martin Baulig <martin@gnome.org>
8853 * debug-symfile.c (mono_debug_find_source_location): Added
8854 `guint32 *line_number' argument. If it's not NULL, store the line number
8855 there and return the file name without the line number.
8857 2002-06-25 Dick Porter <dick@ximian.com>
8861 * process.c: Process forking and other support functions
8863 2002-06-25 Dick Porter <dick@ximian.com>
8865 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
8866 things dont happen when the image is closed.
8867 (mono_image_lookup_resource): Walk the resource section looking
8868 for a particular entry
8870 * cil-coff.h: PE resource section decoding
8872 2002-06-25 Dick Porter <dick@ximian.com>
8876 (mono_assembly_foreach): Accessor functions to walk the list of
8878 (mono_assembly_set_main):
8879 (mono_assembly_get_main): Process methods need to know which
8880 assembly is the "main" one
8882 * object.c (mono_runtime_run_main): Record the main assembly
8884 * debug-helpers.c: Fix typo
8886 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
8888 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
8889 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
8891 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
8893 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
8895 2002-06-21 Miguel de Icaza <miguel@ximian.com>
8897 * image.c (do_mono_image_open): Initialize reference count,
8898 otherwise we leak the MonoImage.
8900 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
8902 * reflection.c: small tweak to handle self-hosting.
8904 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
8906 * reflection.c: fix type name parse code.
8908 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
8910 * reflection.c: break out of the loop.
8911 * image.c: special case corlib.
8913 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
8915 * reflection.c: add all the custom attrs at the end to ensure the
8916 ctors have been properly initialized when the attributes are defined
8917 in the current assembly.
8919 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8921 * reflection.c: handle correctly multiple-nested types.
8923 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
8925 * row-indexes.h: fix typos.
8926 * reflection.c: adjust for typos and fix method_def_or_ref
8927 encoding in MethodImpl table.
8929 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
8931 * reflection.c: fix entry point patching (thanks Serge!).
8933 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
8935 * verify.c: add check for System.Exception
8937 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
8939 * image.c, class.c: minifix for code just c&p'ed.
8940 * reflection.c: warning fix.
8941 * object.h, loader.h, domain.c: load also StringBuilder.
8943 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
8945 * marshal.h, marshal.c: some support code to handle complex marshaling.
8947 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8949 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
8950 Better signatures with vtable error dump.
8952 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
8954 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
8956 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
8958 * icall.c (ves_icall_Type_GetField): impl.
8960 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
8962 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
8963 to retrieve a marshal description blob for a field or param.
8965 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
8967 * reflection.h, reflection.c: change order of nested type emission
8968 to avoid table corruption. The NestedTypes table is sorted.
8969 * icall.c: change order of GetConstructor results to workaround mcs bug.
8971 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
8973 * reflection.h, reflection.c: handle field and param marshal
8976 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
8978 * icall.c, marshal.c marshal.h: more Marshal class implementation.
8980 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8982 * reflection.c: fix call convention.
8984 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
8986 * reflection.h, reflection.c: mono_image_get_memberref_token()
8987 takes a type instead of a class, now. Added
8988 mono_image_get_array_token() to create tokens for the special
8989 multi-dim array methods.
8991 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
8993 * assembly.c: handle modules (no assembly table). Split
8994 loading references in its own function.
8995 * class.c: handle moduleref resolution scope.
8996 * image.c, image.h: cache module name in image.
8998 2002-06-07 Martin Baulig <martin@gnome.org>
9000 * reflection.c (mono_image_get_type_info): Only add a class layout entry
9001 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
9003 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9005 * icall.c: more signature fixes that used uint instead of int.
9007 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9009 * reflection.c: fixed signature of field refs.
9011 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9013 * class.c, reflection.c: handle typerefs of nested types
9014 (both on read and when writing files).
9016 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
9018 * icall.c: fix method signatures that tried to workaround the previous
9021 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
9023 * debug-helpers.c: fix typo.
9025 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
9027 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
9028 rewrote the PE/COFF writing code (our programs are understood by the
9031 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
9033 * gc.c, gc.h, icall.c: weakreference support.
9035 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
9037 * Makefile.am, mono-config.c: use $(sysconfdir).
9039 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
9041 * icall.c: changed default precision of Double.ToString() to 15.
9042 Fixed memory leak. Unified with Single.ToString.
9044 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
9046 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
9048 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
9050 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
9051 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
9052 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
9055 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9057 * debug-symfile.c, sysmath.c: yet more compilation fixes.
9059 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9061 * reflection.c, socket-io.c: more compilation fixes.
9063 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9065 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
9066 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
9067 unicode.c: warning and compiler compatibility fixes.
9069 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9071 * class.h, metadata.c: fixed warnings/compilation errors.
9073 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
9075 * Makefile.am, mono-config.c, mono-config.h: configuration file
9077 * loader.c, loader.h: make Dll mapping configurable at runtime in the
9078 config file. Export methods to insert and lookup mappings.
9080 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
9082 * reflection.c: handle types and boxed objects in custom attr
9085 2002-05-30 Martin Baulig <martin@gnome.org>
9088 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
9090 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
9092 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
9093 to lookup the implmap row for a P/Invoke method.
9094 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
9095 P/Invoke method from the runtime on an as needed basis.
9097 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
9099 * metadata.c (mono_metadata_parse_signature): impl.
9101 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9103 * class.c: handle .pack directive.
9105 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
9107 * object.c: initialize static fields with RVA data.
9109 2002-05-25 Martin Baulig <martin@gnome.org>
9112 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
9114 2002-05-24 Martin Baulig <martin@gnome.org>
9117 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
9118 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
9119 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
9121 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
9123 * object.c: special case string ctros in invoke.
9124 * gc.c: silly whitespace changes.
9126 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
9128 * threadpool.[ch]: impl. a threadpool that can
9129 be used by mint and mono.
9131 2002-05-22 Martin Baulig <martin@gnome.org>
9133 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
9134 The first argument is now a `MonoReflectionModuleBuilder *', the return
9135 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
9136 `methods' field to get the method builder. The `token' argument is the
9139 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
9140 invalid characters instead of g_assert_not_reached()ing. This seems
9141 to be the behaviour of mscorlib.
9143 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
9145 * object.c (mono_runtime_invoke_array): applied patch from Rachel
9146 Hestilow to fix bug #25104
9148 2002-05-21 Martin Baulig <martin@gnome.org>
9150 * debug-symfile.c (mono_debug_find_source_location): New function.
9151 Looks up an IL offset in the line number table and returns the source
9152 location as a string.
9154 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9157 (mono_double_ToStringImpl): changed %f by %g until we have something
9160 2002-05-21 Nick Drochak <ndrochak@gol.com>
9162 * icall.c : Use different name for Math.Pow's icall. Needed to check
9163 parameters first in C#.
9165 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9167 * icall.c, reflection.h: added icall to get info about an event.
9169 2002-05-20 Radek Doulik <rodo@ximian.com>
9171 * object.c (mono_value_box): don't use memcpy for boxing on BIG
9173 (mono_value_box): don't use memcpy for small sizes on
9174 architectures with unaligned access
9176 2002-05-20 Martin Baulig <martin@gnome.org>
9178 * reflection.c (mono_reflection_setup_internal_class): Don't crash
9179 if `tb->parent == NULL'.
9180 (mono_reflection_create_internal_class): New function. This is
9181 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
9184 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
9187 2002-05-19 Martin Baulig <martin@gnome.org>
9189 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
9190 argument to get the length, don't default to the array length.
9192 2002-05-18 Miguel de Icaza <miguel@ximian.com>
9194 * assembly.c (mono_assembly_setrootdir): New function used to
9195 override the MONO_ASSEMBLIES directory.
9197 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9199 * icall.c: ValueType_GetHashCode() initialize local var.
9201 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9203 * reflection.c: sort custom attributes table.
9205 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
9207 * reflection.c: support named args in custom attributes (write support).
9209 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
9211 * reflection.c: fix finally position calculation.
9213 2002-05-15 Radek Doulik <rodo@ximian.com>
9215 * reflection.c: fixed endianess at many places
9217 * icall.c (ves_icall_InitializeArray): comment out debug msg
9219 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
9221 * object.c (mono_unhandled_exception): new function to handle
9222 unhandled exceptions.
9223 (mono_unhandled_exception): call the UnhandledException event.
9224 (mono_runtime_delegate_invoke): impl.
9226 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
9228 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
9229 returns the RVA, not the direct pointer to the data. Handle the case
9230 when the class size is fixed.
9232 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
9234 * reflection.c: fix some endianess issues.
9236 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
9238 * object.c (mono_runtime_invoke): is now able to catch exceptions.
9240 * threads.c (mono_thread_init): added a callback which is invoked
9243 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
9245 * icall.c: make GetHashCode return non-negative values.
9247 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
9249 * object.c, icall.c, gc.c: revert to address-based hashcode.
9251 2002-05-13 Miguel de Icaza <miguel@ximian.com>
9253 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
9255 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9257 * icall.c, class.c: special case <Module>.
9259 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
9261 * icall.c: fix bug in GetNow().
9263 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
9265 * object.c (mono_runtime_class_init): make sure that we call all
9266 static class constructors.
9268 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
9270 * reflection.c: sort methodsemantics table.
9272 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
9274 * reflection.h, reflection.c: honour init locals setting.
9276 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
9278 * icall.c: copied Double ToStringImpl for Single ToStringImpl
9280 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
9282 * reflection.c: support ContructorBuilders in attribute blob creation.
9284 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9286 * reflection.c: some changes to build a binary that can be run
9287 directly in windows.
9289 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
9291 * loader.c: print a big message when an icall can't be found.
9293 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9295 * string-icalls.c: fix bug 24248.
9297 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
9299 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
9300 icall.c, reflection.h: separate assembly loading by pathname and by
9301 assembly name. Use the MONO_PATH env var to search for assemblies.
9303 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9305 * assembly.c, image.h: add some support for assemblies
9306 with multiple modules.
9307 * class.c, class.h: export mono_class_from_typeref().
9308 * loader.c: remove duplicated code and use mono_class_from_typeref(),
9311 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9313 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
9314 documentation says (the ECMA one is correct).
9316 2002-05-02 Dick Porter <dick@ximian.com>
9318 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
9319 Don't name the synchronisation mutex.
9321 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
9324 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
9325 Make the prototypes match.
9326 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
9330 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
9331 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
9332 all systems have tm.tm_zone, so use strftime() with %Z to print
9333 the timezone abreviation into a temp string.
9335 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
9336 rather than mono_array_addr() on a MonoString on Big Endian
9339 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
9341 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
9344 2002-04-30 Dick Porter <dick@ximian.com>
9346 * socket-io.c: Cope with SOCKET being an integer rather than a
9349 * threads.c: Added Thread_free_internal, to deal with thread
9350 handle cleanup. Moved calls to handle_store() and handle_remove()
9351 to start_wrapper(), so each can only be called once. Allocate
9352 synchronisation blocks with GC_malloc(), and use GC finalisation
9353 to close the handles.
9355 * icall.c: added System.Threading.Thread::Thread_free_internal
9357 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9359 * icall.c: support Environment.Exit, CommandLineArgs().
9361 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
9363 * object.c, object.h: added mono_runtime_run_main () and
9364 mono_runtime_get_main_args () for use in System.Environment.
9366 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
9368 * gc.c: fix thinko, enable actual finalization since the jit is now
9371 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9373 * gc.c, object.c: take into account that an object may be offset wrt the address
9374 returned by GC_malloc().
9376 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
9378 * image.c: handle files without entries in the assembly table (modules).
9380 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
9382 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
9383 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
9384 allowed to be null when it's System.Object class setup.
9386 2002-04-27 Martin Baulig <martin@gnome.org>
9388 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
9389 if `tb->parent == NULL' rather than crashing.
9391 2002-04-28 Nick Drochak <ndrochak@gol.com>
9393 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
9394 calling acos() where asin() should have been called.
9396 2002-04-26 Martin Baulig <martin@gnome.org>
9398 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
9399 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
9400 there's a subdirectory called `System', but we don't want to read that
9401 subdirectory as an assembly.
9403 2002-04-25 Martin Baulig <martin@gnome.org>
9405 * debug-symfile.c: Reflect latest MonoString changes.
9407 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
9409 * rand.c, rand.h: instance method icalls need to have an explicit
9410 this pointer as first argument in the C implementation.
9412 2002-04-25 Nick Drochak <ndrochak@gol.com>
9414 * icall.c: Fix typo in map for GetNonZeroBytes
9416 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
9418 * string-icalls.c : String does now passes unit tests without any
9419 errors, the following changes has been made:
9421 Implemented replace methods.
9422 Renaming of methods to (try) follow the standard.
9423 Fixed compare ordinal
9424 Made all memory allocated directly to function instead of via icall function.
9425 Small performance fix in is_in_array function
9427 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
9429 c (mono_string_Internal_ctor_charp_int_int):
9430 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
9431 sindex < 0, throw ArgumentOutOfRangeException instead of
9432 ArgumentNullException.
9434 Added new check for length == 0, however
9435 I need to make it return String.Empty from the C code.
9437 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
9438 that calculate the length for us here.
9440 (mono_string_Internal_ctor_sbytep_int_int): Replaced
9441 mono_string_new_utf16 with mono_string_new, since value is utf8.
9443 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9445 * object.c: register the object for finalization if needed.
9446 Allocate one more char in the string for the terminating 0 char.
9448 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
9450 * class.c, class.h, image.c: check if a type implemenst a destructor.
9451 Use the proper key for array class lookups.
9452 * icall.c: register the icalls in the System.GC class.
9453 * gc.c, gc.h: GC-related functions and icalls.
9455 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9459 * unicode.c: free some strings gotten from mono_string_to_utf8 and
9460 changed a couple of free () by g_free ().
9462 * decimal.c: one-liner in the comments for decimal2string ().
9464 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
9466 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
9468 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
9470 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
9471 * object.c (mono_runtime_invoke_array) : handle null in params
9473 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
9475 * string-icalls.c: fixed bug in split (one off bug)
9477 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
9479 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
9480 * icalls.c: added String::Equals as internal method
9482 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
9484 * threads.c: fixed bug in the double interlocked functions
9486 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
9488 * threads.c: implemented all of the new interlocked icalls.
9489 * string-icalls.c: fix a bug in insert.
9490 * icalls.c: added the icalls for interlocked, removed old string functions.
9492 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
9494 * loader.c: fix off-by-one error when reading argument names.
9496 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9498 * profiler.c: win32 counter implementation (untested).
9499 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
9500 (the latter needs testing and more complete impl. from win32 folks).
9502 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
9504 * object.c: mono_array_new_full workaround mono_array_class_get
9507 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
9509 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
9510 * object.h (mono_string_chars): Changed casting type.
9512 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
9514 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
9515 method signatures to use gunichar2 instead of gint16.
9517 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
9519 * object.h, object.c: domain-specific versions of mono_object_new and
9522 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
9524 * object.c: changed String layout
9526 * string-icalls.c (mono_string_Internal_ctor_chara): added
9527 internal string constructors.
9529 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
9531 * threads.c: pass 'this' to the thread start routine.
9533 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9535 * string-icalls.c: fix IndexOf and LastIndexOf. Now
9536 InternalCompareStr don't call twice mono_string_cmp_char for the last
9537 character. Improved performance in mono_string_cmp_char.
9539 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
9541 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
9542 code into its own library: libmonoruntime.
9544 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
9546 * object.h, object.c: changed array format so that szarrays do not
9547 require a bounds structure.
9548 * icall.c, appdomain.c: support for new szarray format.
9550 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
9552 * metadata.c: compare also the retuns type when comparing signatures:
9553 we didn't do this as an optimization since really overloaded methods
9554 must differ also in the arguments, but this doesn't work with
9555 low-level IL code (or when using explicit conversion operators: see
9556 bug#23498 for an example).
9558 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
9560 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
9562 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
9564 * icall.c: make MonoType::GetElementType its own icall.
9566 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
9568 * icall.c: remove MonoMethod_get_Name().
9569 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
9572 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
9574 * string-icalls.c: optimized a few methods.
9576 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
9578 * icall.c: added all new string internal calls
9579 * string-icalls.c: added, new string internal call implementation.
9580 * object.c: added mono_string_new_size for allocating a string a size
9582 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
9584 * object.c (mono_object_isinst): use the same code as in the
9585 optimized x86 version.
9587 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
9589 * profiler.c: TSC-based timer code (faster and more accurate).
9590 Not hooked up in configure, yet (set USE_X86TSC to 1).
9592 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
9594 * profiler.c, profiler.h: track time spent compiling methods.
9595 * threads.c: track thread creation/destruction.
9597 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
9599 * profiler.c, profiler.h, profiler-private.h: profiling interface
9600 and sample implementation. Moved here so that it can be used also by
9603 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
9605 * reflection.c, reflection.h: keep types and other handles separate in
9606 the hash tables for referred tokens. Add guid for modules.
9608 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
9610 * assembly.c: fix bugs found with valgrind.
9611 * metadata.h, metadata.c: added mono_metadata_guid_heap().
9613 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
9615 * threads: added icall support for getting current domain for
9618 2002-04-13 Martin Baulig <martin@gnome.org>
9620 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
9621 (MonoDebugVarInfo): Added `index' field for register based addresses.
9622 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
9623 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
9624 `MonoDebugVarInfo *params' and `guint32 this_offset' with
9625 `MonoDebugVarInfo *this_var'.
9627 * debug-symfile.c (relocate_variable): New static function to write
9628 a location description for a local variable or method parameter.
9630 2002-04-12 Martin Baulig <martin@gnome.org>
9632 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
9633 stack offset and begin/end scope address of a local variable.
9634 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
9635 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
9636 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
9638 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
9639 Added new relocation types for start/end scope of a local variable.
9641 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
9643 * object.h: add mono_object_domain() macro.
9644 * reflection.c: handle typespecs.
9645 * icall.c: MonoMethod::get_Name() implementation.
9647 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9649 * icall.c: String::GetHashCode() icall implementation.
9651 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9653 * icall.c: String::IndexOfAny icall.
9654 * object.c, object.h: make array->max_length more useful.
9655 Intrduced mono_object_class() and mono_string_length() macros.
9657 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9659 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
9660 instead of g_unichar_isdigit.
9662 2002-04-11 Nick Drochak <ndrochak@gol.com>
9664 * icall.c: Implement a simple Double.ToString().
9666 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
9668 * appdomain.h: only io-layer.h is supposed to be included.
9669 * icall.c: explicitly import environ. Fix warning.
9671 2002-04-10 Nick Drochak <ndrochak@gol.com>
9673 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
9674 return true even if it's not Daylight Savings time.
9675 Only return false for the case where the function isn't
9676 implemented for a plaform (read Windows).
9678 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
9680 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
9683 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
9685 * mempool.c (mono_mempool_alloc): only use g_malloc when
9686 absolutely necessary.
9688 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
9690 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
9692 * class.c (mono_class_vtable): use domain mempool to allocate vtable
9693 (mono_class_proxy_vtable): use domain mempool
9695 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
9697 * appdomain.h, appdomain.c: split initialization that requires the
9698 execution engine support into mono_runtime_init().
9700 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
9702 * class.c (mono_class_init): don't include vtable inside MonoClass
9703 to save some memory, gather some statistics.
9704 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
9706 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
9708 * icall.c: internalcall implementation for ValueType.Equals().
9710 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
9712 * object.c (mono_message_init): moved
9713 (mono_runtime_exec_main): new arch. independent impl.
9714 (mono_runtime_invoke_array): new method - like
9715 mono_runtime_invoke, but you can pass an array of objects.
9716 (mono_remoting_invoke): new arch. independent impl.
9717 (mono_message_invoke): new arch. independent impl.
9718 (mono_runtime_class_init): new arch. independent impl.
9719 (mono_runtime_object_init): new arch. independent impl.
9721 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
9723 * metadata.c, object.c, reflection.c: documented the exported
9726 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
9728 * icall.c: simpler code to pass the assembly builder data to corlib.
9729 Implement GetNestedTypes() internalcall.
9731 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
9733 * class.c: warn if a type can't be loaded.
9735 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
9737 * image.h: typedef MonoImageOpenStatus
9738 * types.h: removed unused file
9740 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
9742 * icall.c: Enum_ToObject accepts enum value arguments.
9744 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
9746 * class.c: move initialization of properties, events and nested
9747 classes, so that they happen for interfaces, too.
9749 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
9751 * icall.c: cleanup some ugly casts in Array_SetValue*.
9753 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
9755 * icall.c: the values array fro enums is of the correct type, now.
9756 Implement (correctly) getFullName instead of assQualifiedName for
9758 * reflection.h, reflection.c: added mono_type_get_name ().
9760 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
9762 * assembly.c, image.h: for each MonoImage, record from wich assembly
9764 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
9765 Make Type.Assembly work.
9767 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
9769 * debug-symfile.h: use char* instead of gpointer to avoid
9772 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
9774 * icall.c (ves_icall_InternalExecute): impl. FielSetter
9775 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
9777 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
9779 * icall.c (mono_message_init): impl. (code cleanup)
9780 (ves_icall_InternalExecute): impl. FieldGetter
9782 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
9783 defined we call all (non-static)methods through the vtable.
9785 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
9787 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
9788 finalizer even though the memory is still referenced (and the chunk of
9789 memory is not freed).
9791 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
9793 * assembly.c: fix brokeness.
9795 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
9797 * class.c: kill some warnings. Check explicit interface method
9798 implementation also without considering the namespace.
9799 Load also literal strings in static class data.
9801 2002-03-29 Miguel de Icaza <miguel@ximian.com>
9803 * assembly.c (default_assembly_name_resolver): Kill memory leak.
9804 (default_assembly_name_resolver): Make the resolver take the
9805 "base" directory where the assembly was originally defined, so we
9806 can load DLLs that are in the same directory as the assembly that
9807 is being referenced.
9809 2002-03-28 Dick Porter <dick@ximian.com>
9815 * unicode.c: Warning cleanups
9817 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
9819 * object.h, reflection.h: use the correct type instead of MonoObject.
9821 2002-03-28 Martin Baulig <martin@gnome.org>
9823 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
9824 (mono_debug_update_symbol_file): Initialize classes if necessary.
9826 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
9828 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
9829 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
9831 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
9833 * assembly.h: fix function prototype.
9834 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
9835 * mono-endian.h: use const cast.
9837 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
9839 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
9841 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
9843 * loader.c: don't assert when a typeref can't be loaded, give
9844 a chance to the runtime to trow an exception instead.
9845 * loader.h: fix warning.
9847 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
9849 * class.c (mono_class_proxy_vtable): added proxy support
9851 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
9853 * icall.c: removed last of PAL calls, added System.Environment
9854 * file-io.h, file-io.c: MonoIO implementation
9855 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
9857 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
9859 * appdomain.c: do not use the byte marker in ldstr table lookup.
9860 * debug-helpers.c: allow two ':' to separate class and method name.
9861 * object.c: allocate arrays bounds with the GC, too.
9862 * verify: add a few more checks.
9864 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
9866 * reflection.c: output also literal strings. Allocate parameter data
9867 with GC_malloc() (thanks, Martin, for catching this!).
9869 2002-03-26 Martin Baulig <martin@gnome.org>
9871 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
9872 include the `this' offset in the `param_offsets'.
9874 2002-03-25 Martin Baulig <martin@gnome.org>
9876 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
9877 mono_debug_get_class() function to get the classes. Added new
9878 relocation types for arrays and strings.
9879 (mono_debug_get_class): New static function to search in all
9880 referenced assemblies for a metadata token.
9882 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
9884 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
9886 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
9887 hold gc-allocated objects. Make the string heap a stream like the
9888 others. Removed duplicated code when writing stream info.
9889 Added asserts to catch possible buffer overflows. Set the sorted map
9890 for tables that need sorting. Added some documentation.
9892 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
9894 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
9895 for interned strings and vtables.
9897 2002-03-24 Martin Baulig <martin@gnome.org>
9899 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
9900 it in the array since it was created with g_slist_prepend().
9902 2002-03-24 Martin Baulig <martin@gnome.org>
9904 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
9905 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
9906 (mono_debug_method_from_token): Renamed to
9907 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
9908 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
9910 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
9913 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
9915 2002-03-24 Martin Baulig <martin@gnome.org>
9917 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
9918 (mono_debug_method_from_token): New func.
9920 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
9921 New interncall, calls mono_debug_local_type_from_signature().
9922 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
9923 calls mono_debug_method_from_token().
9925 2002-03-23 Martin Baulig <martin@gnome.org>
9927 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
9928 specifies the number of bytes to be converted, not the array size.
9929 Return the number of chars, not the number of bytes.
9930 (ves_icall_iconv_get_chars): The `byteCount' argument
9931 specifies the number of bytes to be converted, not the array size.
9933 2002-03-23 Martin Baulig <martin@gnome.org>
9935 * reflection.h (MonoReflectionSigHelper): New type.
9937 * reflection.c (mono_reflection_sighelper_get_signature_local),
9938 (mono_reflection_sighelper_get_signature_local): New functions.
9940 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
9941 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
9944 2002-03-23 Martin Baulig <martin@gnome.org>
9946 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
9947 is_writeable is set.
9948 (mono_raw_buffer_update): New function to write the modified map
9951 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
9953 * debug-symfile.c (mono_debug_update_symbol_file): Call
9954 mono_raw_buffer_update() when done writing.
9956 2002-03-23 Martin Baulig <martin@gnome.org>
9958 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
9960 * debug-symfile.c: Added support for arguments and local variables.
9962 2002-03-23 Dick Porter <dick@ximian.com>
9964 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
9965 protected by ifdefs, hence breaking the w32 build.
9967 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
9969 * object.c: implement is_interned() the right way.
9971 2002-03-21 Martin Baulig <martin@gnome.org>
9973 * debug-symfile.[ch]: New files to handle debugging information
9974 files. There's also support to dynamically update these symbol
9975 files to include machine dependent information.
9977 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
9979 * threads.c (mono_thread_create): new function to create thread
9982 2002-03-20 Martin Baulig <martin@gnome.org>
9984 * icall.c (ves_icall_InternalInvoke): Create a new object if the
9985 method is a constructor.
9986 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
9987 points to ves_icall_InternalInvoke().
9989 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
9991 * file-io.c: Flush shouldn't throw exceptions.
9993 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
9995 * file-io.c: FileStream flush support; FileSetLength now
9996 restores file pointer.
9998 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
10000 * class.c: set image for pointer classes.
10002 2002/03/19 Nick Drochak <ndrochak@gol.com>
10004 * sysmath.c: Forgot one.
10006 2002-03-18 Miguel de Icaza <miguel@ximian.com>
10008 * sysmath.c: Avoid redefining existing names.
10010 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
10012 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
10013 handled by runtime as icall rather than dllimport from libm.so
10014 * file-io.c, file-io.h: fixed handle argument type.
10016 2002-03-18 Dick Porter <dick@ximian.com>
10018 * reflection.c (mono_image_get_type_info): rename interface to
10019 iface, because of "#define interface struct" on windows.
10021 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
10023 * class.c, class.h: rename and export mono_ptr_class_get().
10024 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
10025 * reflection.c, reflection.h, icall.c: better/saner type name
10026 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
10029 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
10031 * class.c (mono_class_init): removed hardcoded GHC_SLOT
10033 * icall.c (ves_icall_InternalInvoke): impl.
10035 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10037 * reflection.c: output the interface map table, too.
10039 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
10041 * class.c (class_compute_field_layout): separate computation of
10042 static field layout
10044 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
10046 * icall.c: added System.Buffer support.
10047 * file-io.c: moved file icalls from PAL to FileStream.
10049 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
10051 * icall.c (ves_icall_System_Object_GetHashCode): impl.
10053 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
10055 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
10057 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10059 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
10061 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
10063 * debug-helpers.{c,h}: moved here from monograph some useful functions
10064 to locate a method by name/signature in a class or image. Included
10065 also a small and flexible IL disassembler.
10067 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10069 * reflection.c: fixup tokens in methods with small header size, too.
10071 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
10073 * object.c (mono_string_to_utf8): remove assert(!error), instead
10076 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
10078 * icall.c: update to the new mono_Array_class_get interface.
10080 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
10082 * appdomain.c, object.c: Boehm-GC enable.
10083 * icall.c: make get_data_chunk() support split data requests.
10084 Ensure a class is initialized in more cases. Return only the first
10085 property found in GetProperties() or the compiler gets confused.
10086 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
10087 * reflection.h, reflection.c: add fixup mechanism for field and method
10088 tokens. Initialize assembly->typeref in a single place. Output
10089 properties after events. Support custom attributes for events, too.
10090 Typo fix for paramter custom attrs.
10092 2002-03-07 Martin Baulig <martin@gnome.org>
10094 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
10096 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
10098 * class.c (mono_array_class_get): fix. for multi. dim. arrays
10100 2002-03-06 Martin Baulig <martin@gnome.org>
10102 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
10103 non-zero lower bounds. See testcases #F10-#F13.
10105 2002-03-05 Martin Baulig <martin@gnome.org>
10107 * exception.c (mono_get_exception_argument_out_of_range): New exception.
10109 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
10110 ves_icall_System_Array_GetValue(), only calculate the absolute array position
10112 (ves_icall_System_Array_SetValue): Likewise.
10113 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
10114 as argument and does the actual work. This function is used when copying a
10115 multi-dimensional array.
10116 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
10117 now do all the widening conversions of value types.
10118 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
10120 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10122 * class.c: remove some magic numbers and use the smbolic names,
10123 instead. Added init_events() to load event info at class init time.
10124 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
10125 and mono_metadata_methods_from_event().
10126 * reflection.h, reflection.c: added support for writing out the evnets
10127 related information.
10129 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
10131 * reflection.h, icall.c: use a different method (GetInterfaces)
10132 to gather interface info and add isbyref, isprimitive and
10133 ispointer to the ves_icall_get_type_info() return value.
10135 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
10137 * class.h: stared adding support for events.
10138 * icall.c: split find_members implementation. Added debug icall to get
10139 the address of an object.
10140 * reflection.c: handle TypeBuilders in mono_type_get_object().
10142 2002-03-01 Martin Baulig <martin@gnome.org>
10144 * icall.c (ves_icall_System_Array_GetLength): This must throw an
10145 ArgumentOutOfRangeException(), not an ArgumentException().
10146 (ves_icall_System_Array_GetLowerBound): Likewise.
10147 (ves_icall_System_Array_GetValue): Improved argument checking.
10148 (ves_icall_System_Array_SetValue): Improved argument checking.
10150 2002-03-01 Martin Baulig <martin@gnome.org>
10152 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
10153 called with invalid arguments rather than just dying with g_assert().
10154 (ves_icall_System_Array_SetValue): Likewise.
10155 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
10156 raise a NotImplementedException instead.
10157 (ves_icall_System_Array_GetLength): Added argument checking.
10158 (ves_icall_System_Array_GetLowerBound): Added argument checking.
10160 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
10162 * object.h (mono_assert): new macros mono_assert and
10163 mono_assert_not_reached
10165 2002-02-28 Martin Baulig <martin@gnome.org>
10167 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
10168 and "System::String::IsInterned" to "System::String::_IsInterned".
10170 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
10172 * icall.c: remove hacks for typebuilder. Added icall to create a
10173 modified type from a tybebuilder.
10174 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
10175 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
10176 to create a backing MonoClass for a TypeBuilder.
10178 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10180 * class.c, class.h: more refactoring of class init.
10181 Export mono_class_setup_mono_type() and mono_class_setup_parent().
10183 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
10185 * marshal.c, marshal.h: start of marshaling interface.
10187 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
10189 * icall.c: fix order in assembly qualified name icall.
10191 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
10193 * class.c: do not free str, since we store it in the hash table.
10194 * reflection.h: add label field to MonoILExceptionInfo.
10195 * reflection.c: handle references to more than one assembly. Handle
10196 case when there isn't a module created in the assembly.
10198 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
10200 * class.c: Fix typo. Start refactoring of class init code.
10202 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
10204 * appdomain.c: exit with 1 on error.
10205 * class.c: we already have the name in MonoClassField.
10206 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
10207 MonoStreamHeader instead of an offset of image->raw_metadata.
10209 2002-02-26 Miguel de Icaza <miguel@ximian.com>
10211 * appdomain.c (mono_init): Be even more descriptive about the error.
10213 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
10215 * appdomain.c: give the user an informative message when corlib can't
10218 2002-02-26 Martin Baulig <martin@gnome.org>
10220 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
10221 New icall to get the time zone data.
10223 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10225 * reflection.c: set virtual and raw size of section correctly.
10226 * threads.c: transfer domain information to newly created threads.
10228 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
10230 * class.c: when instancing a class in a domain, load the default
10231 vaules for static fields from the constant table. Fix System.Enum to
10233 * icall.c: implement Object::GetType() internalcall. Implemented
10234 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
10235 Fixed checking of binding flags in find_members().
10236 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
10237 * reflection.c: handle enumerations when writing to the constant
10238 table. Use a different object cache for types.
10241 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
10243 * object.c (mono_object_isinst): fix for arrays
10245 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
10247 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
10249 * object.c: don't use mprotect () and fix intern pool hash table
10250 lookup for big endian systems.
10252 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10254 * icall.c: change type_is_subtype_of () signature.
10256 2002-02-21 Mark Crichton <crichton@gimp.org>
10258 * rand.c, rand.h: Added random number generator for
10259 System.Security.Cryptography classes.
10261 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
10263 * icall.c: Added System.Security.Cryptography calls.
10265 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
10267 * class.c, icall.c, metadata.c: better support for pointer types.
10268 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
10269 * reflection.c: Add support for getting custom attrs for properties
10270 and simplify some code.
10272 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
10274 * icall.c: change getToken () and add custom attribute GetBlob()helper
10276 * reflection.h: add custom attrs array to the reflection builder structures.
10277 * reflection.c: encode and emit custom attributes for all the relevant
10278 reflection objects. Cache fieldref and methodref tokens. Change
10279 mono_image_create_token() interface to take a MonoDynamicAssembly.
10280 More complete custom attributes decoder. Load custom attributes for
10281 Assembly, Field, Method and Constructor objects, too. Make the
10282 returned array an Attribute[] one, not object[]. Added
10283 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
10284 custom attribute constructor.
10286 2002-02-20 Dick Porter <dick@ximian.com>
10290 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
10291 problem code out for now).
10293 2002-02-19 Radek Doulik <rodo@ximian.com>
10295 * object.c (mono_ldstr): use hash table to avoid multiple swapping
10297 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
10299 * icall.c: register the GetCustomAttributes method.
10300 * object.c, object.h: add mono_string_new_len ().
10301 * reflection.h, reflection.c: added mono_runtime_invoke(),
10302 mono_install_runtime_invoke(). Added
10303 mono_reflection_get_custom_attrs () to load custom attributes and
10304 create the attribute objects.
10306 2002-02-19 Dick Porter <dick@ximian.com>
10307 * threads-dummy-types.c:
10308 * threads-dummy-types.h:
10311 * threads-pthread-types.c:
10312 * threads-pthread-types.h:
10313 * threads-pthread.c:
10314 * threads-pthread.h: Deleted obsolete files
10316 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
10318 * class.c (mono_class_vtable): runtime init the class when we
10319 allocate static class data.
10321 * icall.c (ves_icall_System_Array_SetValue): check for null values.
10323 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
10324 and String - but we will need generic marshalling support in the
10326 (mono_init): set the domain name in a ms compatible way
10328 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
10331 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
10333 * object.c (mono_array_clone): use alloca() instead of g_malloc
10336 * appdomain.c (mono_domain_unload): impl.
10338 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10340 * appdomain.c, object.c: fix intern pool implementation.
10341 * class.c: fix alignment code.
10343 2002-02-16 Radek Doulik <rodo@ximian.com>
10345 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
10346 and s2 > s1, just copy lower bytes to be compatible with little
10347 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
10348 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
10350 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
10351 force big_endian to be 1 for big endian machines
10352 (ves_icall_iconv_new_decoder): ditto
10354 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
10356 * socket-io.c (convert_sockopt_level_and_name): If the system
10357 doesn't define SOL_IP or SOL_TCP, get them by hand using
10358 getprotobyname() and caching the values (because this could be a
10360 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
10361 Use the appropriate struct when the system does support it. Ie,
10362 not all systems have struct ip_mreqn so use struct ip_mreq when
10365 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
10367 * reflection.c: handle finally clauses.
10369 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
10371 * socket-io.c: use g_snprintf() instead of snprintf.
10373 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
10375 * reflection.c (mono_param_get_objects): Cast second argument to
10376 mono_method_get_param_names to a const char** to silence the
10379 * appdomain.c (mono_domain_assembly_open): Put parens around the
10380 truth statement in the for-loop.
10382 * unicode.c (iconv_convert): Got rid of a compiler warning about
10383 int i being unused when the system has a new iconv.
10384 (iconv_get_length): Same.
10386 * image.c (load_class_names): Cast the second argument to
10387 g_hash_table_insert() to char* to hush compiler warnings about the
10389 (mono_image_open): Same here.
10391 * socket-io.c: Don't conditionally include sys/filio.h or
10392 sys/sockio.h here anymore since we now get them from
10393 io-layer/io-layer.h
10394 (inet_pton): If the system doesn't support inet_aton, implement
10395 using inet_addr and also #define INADDR_NONE if it isn't defined
10398 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
10400 * metadata.c, metadata.h: added function to get packing and size info
10402 * reflection.h, reflection.c: handle field RVA data. Save info about
10403 the table layout if needed. Assign typedef indexes to all the types
10404 before dumping the info about them to avoid forward reference problems.
10406 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
10408 * socket-io.c (convert_sockopt_level_and_name): ifdef
10409 SO_ACCEPTCONN because it is not defined on my system (old debian)
10411 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10413 * opcode.c: use stddef.h to get NULL.
10415 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
10417 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
10418 for FIONBIO, FIONREAD and SIOCATMARK.
10419 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
10420 define INADDR_NONE and besides, inet_addr() is deprecated and
10421 should not be used. Use inet_pton() instead - it also has the
10422 added bonus that it can easily handle IPv6 addresses as well.
10423 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
10425 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
10427 * decimal.c: remove _MSC_VER conditional.
10429 2002-02-13 Dick Porter <dick@ximian.com>
10432 * icall.c: Internal calls for Blocking, Select, Shutdown,
10433 GetSocketOption and SetSocketOption
10435 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10437 * assembly.cs: better resolver: use it instead of some kludgy
10440 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
10442 * reflection.c: the best way to speed-up the compiler is to avoid
10445 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
10447 * class.c (mono_class_vtable): changed the object layout
10448 (obj->vtable->class).
10449 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
10451 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10453 * assembly.c: look for assemblies in the assembly dir, too.
10455 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10457 * class.c: fix thinko in mono_class_from_type().
10459 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10461 * exception.h, exception.c: added TypeLoadException.
10462 * object.h, object.c: added mono_array_clone ().
10463 * icall.c: handle throwOnError in AssemblyGetType().
10464 Added Array.Clone().
10465 * opcode.h, opcode.c: use a single value for the opcode val.
10466 Compile fix for non-gcc compilers.
10468 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
10470 * opcodes.c, opcodes.h: export interesting info about opcodes.
10472 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
10474 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
10477 * class.c (class_compute_field_layout): set element_class for enums
10478 (mono_class_create_from_typedef): set element_class for normal classes
10480 * icall.c (ves_icall_System_Enum_get_value): impl.
10482 * class.c (mono_class_create_from_typedef): do not set valuetype
10483 flag for System.ValueType and System.Enum
10485 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
10487 * unicode.c (iconv_convert): fix big endian problem.
10489 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10491 * class.c: add asserts if we are ever going to scribble over memory.
10492 * socket-io.c: not all systems have AF_IRDA defined.
10494 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
10496 * class.c (class_compute_field_layout): do not consider static
10497 fields to compute alignment
10499 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
10501 * appdomain.c (mono_appdomain_get): impl.
10502 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
10504 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
10506 * icall.c: ignore "file://" prefix when loading an assembly.
10508 2002-01-23 Dick Porter <dick@ximian.com>
10512 * Makefile.am: Added socket support
10514 2002-01-23 Miguel de Icaza <miguel@ximian.com>
10516 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
10517 code back. This should return the assemblies that are loaded by
10518 the runtime on behalf of an application domain.
10520 The current implementation is still broken, it just returns every
10521 assembly loaded, but until we get real applications domain this
10524 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
10526 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
10529 2002-01-23 Miguel de Icaza <miguel@ximian.com>
10531 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
10532 the mono_class_from_name lookup.
10533 (ves_icall_get_parameter_info): ditto.
10534 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
10536 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
10538 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
10540 * class.c: load also nested classes on class init.
10541 System.ValueType instance methods gets passed boxed
10542 values, unless methods in derived classed that get a pointer to the
10544 * icall.c: use better name parsing code in GetType().
10545 * image.c, image.h: add mono_image_loaded ().
10546 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
10547 * reflection.c, reflection.h: added mono_reflection_parse_type().
10549 2002-01-22 Veronica De Santis <veron78@interfree.it>
10551 * icall.c : Added mapping of internal calls for Manual and Auto reset events
10552 * threads.c : Added the implementation of internal calls for events
10553 * threads.h : Added prototypes of internal calls for events
10555 2002-01-21 Radek Doulik <rodo@ximian.com>
10557 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
10559 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
10561 * class.c (mono_class_init): set min_align to 1 (instead of 0)
10562 (mono_class_value_size): use min_align
10564 2002-01-20 Dick Porter <dick@ximian.com>
10567 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
10568 so it compiles on w32.
10570 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
10572 * metadata.c (mono_type_stack_size): impl.
10574 * class.c (mono_class_get_field): impl. memberref token
10576 2002-01-16 Veronica De Santis <veron78@@interfree.it>
10578 * icall.h : Added the internal calls mapping for CreateMutex_internal
10579 and ReleaseMutex_internal.
10580 * threads.h : Added the prototype of mutexes internal calls.
10581 * threads.c : Added the implementations of mutexes internal calls.
10583 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
10585 * metaparse.h: removed unused file.
10586 * reflection.c, reflection.h: added stream_data_align () function
10587 to align data in streams and keep stream aligned. Add support for
10588 exception support in method headers.
10590 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
10592 * unicode.c: make iconv_convert () return the number of bytess written
10593 in the output buffer.
10595 2002-01-15 Dick Porter <dick@ximian.com>
10596 * threads.c: Make the runtime's idea of infinite timeouts coincide
10597 with the class library's
10599 Fix a particularly egregious bug in mono_thread_cleanup(). That
10600 code was so utterly bogus it must have been written on a Monday.
10602 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
10604 * reflection.h: add subtypes field to TypeBuilder.
10605 * reflection.c: encode constants for literal fields.
10606 Handle subtypes. Fix user string token (and add a zero byte)
10609 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
10611 * class.c (mono_class_init): bug fix: assign slot numbers for
10614 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10616 * reflection.c: don't try to output a code RVA for abstract methods.
10617 Small fixes for method header format. Output parameter info to the
10618 ParamDef table. Save method overriding info to MethodImpl table.
10619 Fix property support. Allow typedef.extends to be a type in the
10621 * verify.c: fix off-by-one error.
10623 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
10625 * class.c: fix mono_class_from_mono_type () for szarray types.
10626 Remove unused cache check in mono_class_from_type_spec().
10627 * icall.c: *type_from_name () functions handle simple arrays and byref.
10628 * reflection.c: handle byref and szarray types. Handle methods without
10629 body (gets P/Invoke compilation working). Handle types and fields in
10631 * reflection.h: add rank to MonoTypeInfo.
10633 2002-01-10 Dick Porter <dick@ximian.com>
10635 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
10638 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
10640 * icall.c: initialize class in type_from_handle ().
10641 Loop also in parent classes for get_method ().
10642 * reflection.c: properly encode class and valuetype types.
10643 Start on encoding TypeBuilder types. Handle fieldrefs.
10644 Use correct length when registering a user string.
10645 Handle ConstructorBuilder and MonoMethod in get_token ().
10646 Make mono_type_get_object () aware of cached types.
10647 * object.c: back out change to mono_string_new ().
10649 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
10650 * object.c: mono_string_new should return a NULL when the string
10651 passed in is NULL -- not try to deference it.
10653 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
10655 * icall.c: hack to make IsSubType work for TypeBuilders.
10656 * reflection.c: emit constructors before methods.
10657 Retrieve param names in mono_param_get_objects().
10659 2002/01/05 Nick Drochak <ndrochak@gol.com>
10661 * Makefile.am: fix list of headers and sources so automake 1.5
10662 doesn't complain. Removed \# at end of list.
10664 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
10666 * reflection.c: get token for a method ref. Set return type of
10667 constructor to void.
10668 * loader.c: debug message.
10669 * class.c: typo fix.
10671 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
10673 * icall.c: fix array init with rank > 1. FindMembers
10674 loops in parent class as well.
10675 * image.c: do not insert nested types in name cache.
10676 * reflection.c: warning fix.
10677 * reflection.h: add override method (for interface impl).
10679 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
10681 * metadata.c: fix customattr decoding.
10683 2001-12-21 Miguel de Icaza <miguel@ximian.com>
10685 * rawbuffer.cs: Added native Win32 implementation, avoids using
10686 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
10688 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
10690 * class.c: make the low-level routines handle the cache.
10692 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
10694 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
10696 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
10698 * class.c: fix mono_array_element_size() for objects.
10699 * class.h, class.c: add properties to MonoClass and load them
10701 * icall.c: check with isinst() when assigning a value to an array
10702 instead of requiring the classes to match exactly.
10703 Implemented icall for System.Type::GetType().
10704 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
10705 enums. Handle bindingflags when looking for methods and fields.
10706 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
10707 and mono_metadata_methods_from_property().
10708 * reflection.h, reflection.c: added structures for propreties,
10709 parameters and enums. Implemented mono_property_get_object() and
10710 mono_param_get_objects().
10712 2001-12-18 Dick Porter <dick@ximian.com>
10714 * file-io.c: Use mono_string_to_utf16() instead of
10715 mono_string_chars()
10717 * object.c: Added mono_string_to_utf16(), which copies the non
10718 NULL-terminated MonoString into a new double-null-terminated
10721 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
10723 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
10725 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
10727 * file-io.c: raise exceptions if handle is invalid.
10729 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
10731 * assembly.c: yet another check for mscorlib.
10732 * class.c, class.h: load nesting info for classes.
10733 * icall.c: many new functions to support the Reflection classes.
10734 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
10735 * reflection.h, reflection.c: mono_image_create_token(),
10736 mono_assembly_get_object(), mono_type_get_object(),
10737 mono_method_get_object(), mono_field_get_object(): methods to return
10738 objects that parallel the C representation of assemblies, types,
10741 2001-12-11 Dick Porter <dick@ximian.com>
10744 * file-io.c: Internal calls for file IO.
10746 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
10748 * tabledefs.h: missing FileAttributes.
10749 * verify.h, verify.c: use is_valid_string () to simplify and check for
10750 valid strings more correctly. Fix warnings and speeling.
10751 Check more tables: Filed, File, ModuleRef, StandAloneSig.
10752 Check code: branches, maxstack, method calls.
10754 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
10756 * object.c (mono_object_allocate): removed static, so that the jit
10757 can allocate value types.
10759 * icall.c (ves_icall_System_DateTime_GetNow): impl.
10761 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10763 * class.c: init enum types right away and register the
10764 token->MonoClass map in mono_class_create_from_typedef ().
10765 * verify.h, verify.c: first cut of the verifier.
10766 * pedump.c: add --verify switch to verify metadata tables.
10767 * tabledefs.h: add some missing enums.
10769 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
10771 * class.c (mono_install_runtime_class_init): impl.
10772 (mono_class_init): renamed mono_class_metadata_init to
10773 mono_class_init, also removed the metadata_inited flag
10775 * object.c (mono_object_isinst): use faster algorithm
10777 2001-11-30 Radek Doulik <rodo@ximian.com>
10779 * mono-endian.h: reverted last change
10780 added function prototypes
10782 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
10783 add mono-endian.c back
10785 * mono-endian.c: returned back, as Paolo pointed out, it's needed
10786 for unaligned access, I've mistaked it with endianess. I am
10788 (mono_read16): fix reverted endianess
10789 (mono_read64): ditto
10790 (mono_read32): ditto
10792 2001-11-30 Dick Porter <dick@ximian.com>
10794 * exception.c: Implement mono_exception_from_name()
10796 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
10798 * metadata.h, metadata.c: remove params_size and locals_size and their
10799 calculation from the metadata code: they are only usefult to the
10802 2001-11-29 Radek Doulik <rodo@ximian.com>
10804 * object.c (mono_ldstr): swap bytes here, it's probably not the
10805 best place, but works for me now, I'll redo it once I know mono
10806 better, also note that I add PROT_WRITE and don't reset back, also
10807 note that it's only affects big endians, so x86 should be OK
10809 * mono-endian.h (read16): use just glib macros for both endians
10811 * mono-endian.c: removed as glib macros are used in in
10812 mono-endian.h so we don't need to care about endianess for read
10813 macros as glib does that for us already
10815 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
10817 * class.h, class.h: take minimum alignment into consideration so
10818 that the fields of a class remain aligned also when in an array.
10820 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10822 * loader.h, loader.c: add mono_method_get_param_names().
10823 * class.c: 0-init class fields.
10825 2001-11-26 Dick Porter <dick@ximian.com>
10829 * threads.c: New file that handles System.Threading on all platforms
10832 * object.h: Remove the synchronisation struct from MonoObject,
10833 replace it with a pointer that gets initialised on demand
10835 * Makefile.am: Replace all the system-specific threading code with
10836 a single file that uses the new wrapper library
10838 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
10840 * class.c, class.h: add mono_install_trampoline() so that the runtime
10841 can register a function to create a trampoline: removes the ugly
10842 requirement that a runtime needed to export arch_create_jit_trampoline.
10843 * object.h, object.c: added mono_install_handler() so that the runtime
10844 can install an handler for exceptions generated in C code (with
10845 mono_raise_exception()). Added C struct for System.Delegate.
10846 * pedump.c: removed arch_create_jit_trampoline.
10847 * reflection.c: some cleanups to allow registering user strings and
10848 later getting a token for methodrefs and fieldrefs before the assembly
10850 * row-indexes.h: updates and fixes from the new ECMA specs.
10852 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
10854 * class.h, class.c: add enum_basetype field to MonoClass.
10855 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
10856 to get index in the constant table reated to a field, param or
10858 * reflection.h, reflection.c: handle constructors. Set public-key and
10859 version number of the built assembly to 0.
10860 * row-indexes.h: update from new ECMA spec.
10862 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
10864 * class.h, class.c: add a max_interface_id to MonoClass.
10865 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
10866 since it's used to do that. Added mono_type_type_from_obj().
10867 Make GetType() return NULL instead of segfaulting if the type was not
10868 found. Handle simple arrays in assQualifiedName.
10869 * object.h: add a struct to represent an Exception.
10870 * reflection.c: output call convention in method signature.
10871 Add code to support P/Invoke methods and fixed offsets for fields.
10873 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
10875 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
10877 * icall.c: use mono_array_addr instead of array->vector: fixes the
10878 reflection image writing.
10879 * reflection.c: init call convention byte to 0 in method signature.
10880 Encode the property signature. Don't output property-related methods
10881 twice. Really process the properties for a type (don't cast a field to
10882 a property, my mom always told me that).
10883 Fix 64 bit issues in pointer alignment in a different and more
10886 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
10888 * loader.h: Removed type class from MonoDefaults, added monotype
10890 * loader.c: Loaded MonoType, removed loading of Type
10892 * icall.c (my_mono_new_object): Now returns a System.MonoType,
10893 and fills in System.Type._impl with a RuntimeTypeHandle rather
10894 than the actual MonoClass *
10896 (ves_icall_type_from_handle): change from type_class to
10899 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
10902 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
10905 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
10907 (ves_icall_System_Reflection_Assembly_GetType): implemented
10909 (ves_icall_System_MonoType_assQualifiedName): implemented
10911 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
10913 2001-11-09 Miguel de Icaza <miguel@ximian.com>
10915 * assembly.c (mono_assembly_open): Implement a cache for the
10918 (mono_assembly_close): only destroy the assembly when the last
10921 2001-11-09 Dick Porter <dick@ximian.com>
10923 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
10925 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
10927 * class.c (mono_class_metadata_init): bug fix: compute the right slot
10929 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
10931 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
10932 from Martin Weindel.
10933 * object.h: add mono_string_chars ().
10935 2001-11-07 Miguel de Icaza <miguel@ximian.com>
10937 * reflection.c (build_compressed_metadata): Eliminates warnings
10938 and uses 64-bit clean code.
10940 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
10941 (mono_type_equal): Change signature to eliminate warnings.
10943 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
10945 * icall.c, loader.c: remove the internalcall array constructors.
10946 Changes to match the new MonoArray structure.
10947 * object.h, object.c: an array object doesn't allocate an extra
10948 vector. Add mono_array_new_full () to create jagged arrays easily.
10950 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
10952 * metadata.h, metadata.c: add mono_metadata_field_info () to
10953 retreive all the info about a field from vairous tables.
10954 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
10955 * class.h, class.c: augment MonoClassField with more info.
10956 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
10957 policy and load a field's RVA if needed.
10959 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
10961 * class.c (mono_class_metadata_init): create a trampoline for all
10962 virtual functions instead of actually compiling them.
10964 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
10966 * class.h, class.c: include name in MonoClassField.
10967 * class.c: fix fundamental type of System.Object and System.String.
10968 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
10970 * icall.c: remove internalcalls for the Reflection stuff that is now
10972 * loader.c: mono_field_from_memberref () implementation.
10973 * mono-endian.c: thinko (s/struct/union/g).
10974 * object.c, object.h: make the mono_string_* prototypes actually use
10975 MonoString instead of MonoObject.
10976 * reflection.c, reflection.h: updates for changes in the reflection
10977 code in corlib: we use C structures that map to the actual C# classes.
10978 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
10979 fat method header if needed and use the info from the ILGenerator for
10980 methods. Handle fields in types. Misc fixes.
10982 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
10984 * class.c (mono_class_metadata_init): bug fix: always allocate
10985 space for static class data
10987 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
10989 * class.c (mono_compute_relative_numbering): use relative
10990 numbering to support fast runtime type checks.
10992 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
10994 * class.c (mono_class_create_from_typeref): added debugging output
10995 to print class name when MonoDummy is returned instead of real class
10997 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
10999 * class.c (mono_class_metadata_init): interface offset table now
11000 contains pointers into the vtable - this is more efficient for the jit
11002 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
11004 * class.c (mono_class_metadata_init): use a temporary vtable (the
11005 old algorithm only worked for the interpreter, but not for the jit)
11007 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
11009 * loader.c (method_from_memberref): use mono_class_get to get the
11010 class of an array instead of using System.Array directly.
11011 (mono_get_method): also add MEMBERREF methods to the method cache
11012 which usefull for arrays.
11014 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
11016 * pedump.c (arch_compile_method): added to compute vtable entry
11018 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
11019 number of interfaces.
11021 * class.h: merged MonoArrayClass into MonoClass
11023 * class.c (mono_class_create_from_typedef): compute the vtable size and
11024 allocate space to include the vtable inside MonoClass
11025 (mono_class_metadata_init): initialize the vtable
11027 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
11029 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
11030 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
11031 * image.c: endian fixes by Laurent Rioux.
11032 * object.h, object.c: rename MonoStringObject to MonoString and
11033 MonoArrayObject to MonoArray. Change some function names to conform to
11034 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
11035 guint16* as first argument, so don't use char*.
11036 Provide macros to do the interesting things on arrays in a portable way.
11037 * threads-pthread.c: updates for the API changes and #include <sched.h>
11038 (required for sched_yield()).
11039 * icall.c: updates for the API changes above.
11040 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
11041 platforms that need them.
11043 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
11045 * class.c: set the correct type for all the fundamental
11046 type when loading the class.
11048 2001-10-05 Dick Porter <dick@ximian.com>
11050 * threads-pthread.c (pthread_mutex_timedlock): Simple
11051 compatibility version for C libraries that lack this call.
11053 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11055 * class.c: MonoTypes stored in MonoClass are stored as
11056 fundamental MonoTypes when the class represents a
11057 fundamental type (System.Int32, ...).
11058 The TypeHandle return by ldtoken is a MonoType*.
11059 * icall.c: ves_icall_get_data_chunk () write out all the
11060 PE/COFF stuff. Implement ves_icall_define_method (),
11061 ves_icall_set_method_body (), ves_icall_type_from_handle ().
11062 * image.c: properly skip unknown streams.
11063 * loader.h, loader.c: add type_class to mono_defaults.
11064 * metadata.c, metadata.h: export compute_size () as
11065 mono_metadata_compute_size () with a better interface.
11066 Typo and C&P fixes.
11067 * pedump.c: don't try to print the entry point RVA if there is no entry point.
11068 * reflection.c, reflection.h: many cleanups, fixes, output method
11069 signatures and headers, typedef and typeref info, compress the metadata
11070 tables, output all the heap streams, cli header etc.
11071 * row-indexes.h: typo fixes.
11073 2001-10-04 Dick Porter <dick@ximian.com>
11075 * object.h: Add a synchronisation mutex struct to MonoObject
11077 * object.c (mono_new_object): Initialise the object
11078 synchronisation mutexes
11080 * icall.c: System.Threading.Monitor internal calls
11082 * threads-pthread.h:
11083 * threads-pthread.c: System.Threading.Monitor internal calls
11085 * threads-types.h: New file, includes the system-specific thread
11088 * threads-pthread-types.h:
11089 * threads-pthread-types.c: New files, handle pthread-specific
11090 synchronisation types
11092 * threads-dummy-types.h:
11093 * threads-dummy-types.c: New files of dummy support for
11094 thread-specific types
11098 * pedump.c: include mono-endian.h not endian.h
11100 * Makefile.am: More threads files.
11101 Name mono-endian.h not endian.h
11103 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
11105 * Makefile.am, reflection.h, reflection.c: move here the reflection related
11106 stuff and implement a few more bits.
11107 * icall.c: a field needs to be dereferenced twice. Do not use the same
11108 name for two variables in the same scope.
11109 * image.c, image.h: cleanups.
11111 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
11113 * class.c (mono_class_metadata_init): bug fix: compute the right size
11115 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
11117 * icall.c: implemented some of the Reflection internalcalls.
11118 * image.c, image.h: start writing out the PE/COFF image.
11119 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
11120 that does the reverse than decode_blob_size ().
11121 * object.c: use mono_metadata_encode_value (). Move here
11122 temporary implementation of mono_string_to_utf8 ().
11123 * rawbuffer.c: make malloc_map static.
11125 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11127 * metadata.c: fix type comparison for arrays.
11128 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
11129 Added a couple of new classes to monodefaults.
11130 * icall.c: added a couple of Reflection-related internalcalls.
11131 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
11132 Added a byval_arg MonoType to MonoClass.
11134 2001-09-28 Dick Porter <dick@ximian.com>
11137 * threads-pthread.h:
11138 * threads-pthread.c: Implemented internal calls for
11139 LocalDataStoreSlot operations. Applied mutexes around all shared
11140 data. Reworked the thread creation and Start() operations to
11141 avoid a race condition.
11144 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
11146 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
11148 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
11150 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
11152 * class.c, loader.c: warn and return NULL instead of erroring out.
11153 * icall.c: added System.AppDomain::getCurDomain().
11154 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
11156 2001-09-25 Dick Porter <dick@ximian.com>
11158 * threads-pthread.h:
11159 * threads-pthread.c: Implemented timed thread joining and added
11160 System.Threading.Thread::Join_internal internal call
11162 * icall.c: Added System.Threading.Thread::Join_internal internal call
11165 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
11167 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
11169 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
11170 mono_string_intern () to implement the semantics of the ldstr opcode
11171 and the interning of System.Strings.
11172 * icall.c: provide hooks to make String::IsIntern and String::Intern
11175 2001-09-23 Dick Porter <dick@ximian.com>
11178 * threads-dummy.h: New files of dummy threading routines
11180 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
11181 support code based on system specifics
11183 Rename PTHREAD_LIBS to THREAD_LIBS
11185 2001-09-23 Dick Porter <dick@ximian.com>
11187 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
11188 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
11190 (mono_thread_init): Set up a Thread object instance to return when
11191 the main thread calls Thread.CurrentThread
11192 (mono_thread_cleanup): Wait for all subthreads to exit
11194 * icall.c: New internal calls for System.Threading.Thread::Sleep
11195 (including Schedule) and CurrentThread
11197 * threads.h: New file, to insulate thread-specific stuff from the
11200 2001-09-21 Dick Porter <dick@ximian.com>
11202 * threads-pthread.h:
11203 * threads-pthread.c: New file, for handling pthreads-style
11204 threading support. Start() now starts a new thread and executes
11205 the ThreadStart delegate instance.
11207 * icall.c: Added the internalcall for
11208 System.Threading.Thread::Start_internal
11210 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
11212 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
11214 * loader.c: work around the different signatures for delegates
11215 constructors csc generates in compiled code vs the ones compiled in mscorlib.
11217 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
11219 * class.h, class.c: add mono_class_get_field_from_name ().
11220 * *: Fix C comments and other ANSI C issues.
11222 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
11224 * endian.h, assembly.c: fix some endianness issues.
11226 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
11228 * loader.h, load.c: add delegate_class to mono_defaults.
11229 Handle runtime provided methods in mono_get_method ().
11231 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
11233 * loader.c (mono_get_method): use pinvoke for internal call
11235 * icall.c: use pinvoke for internal call
11237 * loader.c (method_from_memberref): set the method name
11239 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
11241 * metadata.c: help the compiler generate better code for
11242 mono_class_from_mono_type ().
11244 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
11246 * class.c (mono_class_metadata_init): delayed computing of the
11247 class size to mono_class_metadata_init ()
11249 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
11251 * class.c, class.h: add an interfaces member to MonoClass.
11252 * image.c, image.h: add assembly_name field to MonoImage
11253 from the assembly table.
11254 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
11256 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
11258 * class.c: Handle Array in mono_class_from_mono_type ().
11259 * metadata.c, pedump.c: some endian fixes.
11261 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
11263 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
11264 * metadata.c: fix small problem introduced with the latest commit.
11266 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
11268 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
11269 We don't need a MonoMetadata pointer anymore to compare signatures in
11270 mono_metadata_signature_equal (), update callers.
11271 Reduced memory usage an number of allocations for MonoMethodHeader and
11272 MonoMethodSignature.
11274 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
11276 * metadata.c: added compare for szarray.
11278 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
11280 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
11281 and add a couple more types to it and mono_defaults. Give an hint on
11282 classes that need implementing in our corlib and are referenced
11285 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
11287 * class.h, class.c: keep track if a class is also an Enum.
11288 * loader.c: Implement a couple more types for use in libffi
11289 marshalling. Gives better diagnostics when failing to dlopen
11290 a library. Set method->klass for P/Invoke methods, too.
11292 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
11294 * class.c, class.h: add a MonoType this_arg to MonoClass that
11295 represents a pointer to an object of the class' type that
11296 can be used by the interpreter and later the type cache.
11297 Add best guess alignment info for valuetype objects.
11299 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
11301 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
11302 into MonoType: one less level of indirection and allocation and
11303 simplifies quite a bit of code. Added cache for MonoTypes that are
11304 used frequently, so that we don't need to allocate them all the time.
11306 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
11308 * class.c (mono_class_create_from_typedef): System.Enum is also a
11309 value type, although it does not derive from System.ValueType
11310 (maybe a bug in the ms compiler?)
11312 * metadata.c (mono_type_size): return the right size for value types
11314 * loader.c (mono_get_method): only initialize method header if not abstract
11316 * class.c (mono_class_from_mono_type): use mono_default values.
11318 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
11320 * *: use MonoClass pointers instead of <type_tokens>
11322 * class.h: new flag: metadata_inited.
11324 * class.c (mono_class_metadata_init): impl.
11325 (mono_class_instance_size): impl.
11326 (mono_class_data_size): impl.
11328 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
11330 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
11331 MonoClass now has the name and name_space fields.
11332 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
11333 mono_get_method () takes and optional MonoClass as argument.
11334 Removed mono_typedef_from_name() and added mono_class_token_from_name()
11335 instead that takes advantage of a map from class names to typedef
11336 tokens in MonoImage.
11338 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
11340 * metadata.c: zero is not a valid alignment boundary.
11341 Merge MONO_TYPE_VOID in default decoding code.
11343 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
11345 * image.h: merged MonoMetadata into MonoImage
11347 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
11348 identify the type of elements.
11350 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
11352 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
11353 * cil-coff.h: split MonoMSDOSHeader and add size info.
11354 * image.c: add some consistency checks.
11355 * metadata.c: fix row size computation: one programmer
11356 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
11357 add explanation for the locator routine.
11358 Fix decoding of size in method header.
11360 2001-08-20 Miguel de Icaza <miguel@ximian.com>
11362 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
11363 (g_concat_dir_and_file): Bring g_concat_dir_and_file
11364 function from gnome-libs. This uses the right path separator
11365 based on the OS, and also works around a bug in some systems where
11366 a double slash is not allowed.
11367 (default_assembly_name_resolver): Use g_concat_dir_and_file
11368 (mono_assembly_open): ditto.
11370 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
11372 * metadata.c (mono_metadata_signature_equal): impl.
11374 * *: void is now a realy MonoType (instead of using NULL)
11376 * metadata.c (do_mono_metadata_parse_type): use
11377 mono_metadata_parse_type to parse void value.
11379 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
11381 * metadata.c, metadata.h: in the signature and method header store
11382 only the space required for holding the loca vars and incoming arguments.
11384 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
11386 * metadata.c (do_mono_metadata_parse_type): treat void like any
11387 other type (instead of assigning NULL);
11389 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
11391 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
11393 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
11395 * image.c (do_mono_image_open): added a cache for arrays.
11397 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
11399 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
11400 decode a single column from a row in a metadata table and changes
11401 to take advantage of it in the typedef locator (gives a nice speed up).
11402 Store offset info for function params.
11404 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
11406 * image.h (MONO_IMAGE_IS_CORLIB): removed
11408 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
11410 * assembly.c: how could mono_assembly_close () had ever worked?
11411 * metadata.c, metadata.h: provide offset info for local vars.
11412 Implement mono_type_size () to take care of alignment as well
11413 as size (it was mono_field_type_size in cli/class.c before).
11415 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
11417 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
11419 * assembly.h (CORLIB_NAME): set to corlib.dll
11421 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
11423 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
11425 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
11426 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
11427 tokentype.h: massive namespace cleanup.
11429 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
11431 * metadata.h, metadata.c: decode exception clauses when parsing method header.
11433 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
11435 * metadata.c (mono_metadata_free_type): added check for type !=
11436 NULL (void) before calling mono_metadata_free_type()
11438 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
11440 * metadata.h, row_indexes.h: added header with enumerations to use
11441 to index in the columns from tables in metadata and to decode coded
11442 tokens: we should start using this instead of embedding magic numbers
11445 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
11447 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
11448 Move metadata_t info from cli_image_info_t to MonoImage, where
11449 it's easily accessible. Changed all the uses accordingly.
11450 Added the method and class caches to MonoImage.
11451 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
11452 and mono_metadata_decode_value () signature to be more consistent
11453 with the other parse functions (and simplify code). Taken advantage
11454 of zero-length array allocation with GCC. Removed reduntant (and
11455 wrong) MonoFieldType struct and use MonoParam instead. Changed
11456 mono_metadata_parse_field_type () to use common code for parsing.
11457 Added mono_metadata_typedef_from_field () and
11458 mono_metadata_typedef_from_method () to lookup a typedef index from a
11459 field or method token.
11460 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
11462 2001-07-23 Miguel de Icaza <miguel@ximian.com>
11464 * metadata.c (mono_metadata_parse_field_type): Implement.
11465 (do_mono_metadata_parse_type): Split engine from
11466 mono_metadata_parse_type, so that we can create smaller structures
11467 for things that just have one pointer to the MonoType (look at
11470 2001-07-20 Miguel de Icaza <miguel@ximian.com>
11472 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
11473 as Jan Gray found out, it is incorrect.
11475 2001-07-18 Miguel de Icaza <miguel@ximian.com>
11477 * assembly.c: Implement asssembly loading. This loads an image
11478 and loads all the referenced assemblies. Come to think of it, we
11479 could always do lazy loading of the assemblies.
11481 * image.c (mono_image_open): Keep loaded images in a hashtable.
11483 * image.h (MonoImage): Add reference count.
11485 2001-07-17 Miguel de Icaza <miguel@ximian.com>
11487 * assembly.c (mono_assembly_open): Keep track of the file name in
11488 case the assembly has no ASSEMBLY table.
11490 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
11493 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
11495 * metadata.c, metadata.h: decode local vars in method header
11496 parse function. Change callers accordingly.
11498 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
11500 * metadata.h, cil-coff.h: protect against multiple inclusion.
11501 Added some new structures to hold information decoded from metadata:
11502 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
11503 and relevant decoding/free functions.
11504 * metadata.c: implement decoding functions. Add warning for out of bounds
11505 index in mono_metadata_locate(). Implement mono_get_method () to retreive
11506 all the info about a method signature and invocation. Remove check on
11507 uninitialized local var in parse_mh() and fix memory leak.
11509 2001-07-12 Miguel de Icaza <miguel@ximian.com>
11511 * metadata.h: More macros.
11513 * tokentype.h: New file.
11515 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
11517 * assembly.c: added a consistency check and initialize
11518 some structures with g_new0().
11519 * metadata.c: fixed a couple more bugs in table size computation
11520 and add other checks for out-of bound access to metadata.
11522 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
11524 * metatada.c: fix bugs computing table sizes. Spew a
11525 warning when index in string heap is out of bounds.
11527 2001-07-04 Miguel de Icaza <miguel@ximian.com>
11529 * metadata.h: Add a couple of macros to manipulate tokens.
11531 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
11533 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
11534 cli_section_tables).
11536 2001-07-01 Miguel de Icaza <miguel@ximian.com>
11538 * metadata.c (mono_metadata_user_string): New function, provides
11539 access to the UserString heap.
11541 2001-06-27 Miguel de Icaza <miguel@ximian.com>
11543 * metadata.c: Add inline documentation.
11545 2001-06-26 Miguel de Icaza <miguel@ximian.com>
11547 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
11550 2001-06-22 Miguel de Icaza <miguel@ximian.com>
11552 * typeattr.h: New file, TypeAttribute flags.
11554 2001-06-21 Miguel de Icaza <miguel@ximian.com>
11556 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
11557 mono_assembly_ensure_section): Section loading code.
11558 (load_section_tables): Load the sections.
11560 * mono/metadata/metadata.c (mono_metadata_locate_token,
11561 mono_metadata_locate): Functions to locate the information
11562 definition given a token or a table and an index.
11563 (mono_metadata_compute_table_bases): New.
11564 (compute_size): New function to compute the sizes of the various
11567 * mono/metadata/metadata.h: Finish listing the different index
11570 * mono/metadata/pedump.c: Improve to dump new information.
11572 2001-06-19 Miguel de Icaza <miguel@ximian.com>
11574 * mono/metadata/metadata.c: Entered all the tables matching
11577 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2