1 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
3 * reflection.c (encode_marshal_blob): Encode param_num field as well.
5 * object-internals.h (MonoReflectionMarshal): Add param_num field.
7 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
9 * object.c: generalized the reference bitmap creation
10 and added hooks for the new GC.
11 * class-internals.c: removed the gc_bitmap field from MonoClass.
13 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
15 * domain.c: help the compiler to produce better code
16 in mono_jit_info_table_find ().
18 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
20 * object.c: make all allocations look typed.
22 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
24 * socket-io.c: load Mono.Posix if it's not loaded already
27 2005-02-24 Martin Baulig <martin@ximian.com>
29 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
30 * reflection.c (dup_type): Likewise.
32 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
34 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
35 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
37 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
39 * domain.c, threads.c, object-internals.h: make the critical thread
40 local vars use the fast access mode (even when we're compiled in
41 a lib). Provide accessors to be used by the jit during codegen.
43 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
45 * appdomain.c: Changed hook functios behavior to include
46 support for the reflection only assemblies. Some icalls were changed
47 to support the mentioned assemblies too. Signatures of static methods
48 try_assembly_resolve and real_load now have an additional parameter:
51 * assembly.c: General changes to mono_assembly_ methods to support
52 reflection only api. Functions mono_assembly_open, mono_assembly_load,
53 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
54 suffix, to support an additional gbool parameter to specify whether
55 the assembli is reflection only or not. Created some new hook functions
56 to add support for reflection only assemblies. Signatures of static
57 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
58 have now an additional parameter: refonly.
60 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
61 indicating whether the assembly is reflection only or not.
63 * exception.c: Add mono_get_exception_invalid_operation.
65 * icall.c: Throw an InvalidOperationException when trying to invoke
66 a property/method/event, or trying to set/get the value of a field.
67 Also add an icall to retrieve the ref_only flag to the
68 MonoReflectionAssembly.
70 2005-02-23 Chris Toshok <toshok@ximian.com>
72 Part of fix for #72827.
73 * mono-debug.c (mono_debug_add_method): add lexical block data to
74 the info we write. Kind of a hack at the moment - we copy the
75 lexical block info from the MonoDebugMethodInfo to the
76 MonoDebugMethodJitInfo here, before writing it.
77 (mono_debug_read_method): read the lexical block info.
79 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
81 * debug-mono-symfile.h: add lexical block support.
83 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
86 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
88 * loader.c (mono_lookup_pinvoke_call): Fix warning.
90 * object.c (mono_runtime_free_method): Call mono_free_method () and
93 * loader.c (mono_free_method): Free up most memory allocated for
96 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
98 * reflection.c: properly flag a Type argument to a
99 named custom attr value (bug #72248).
101 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
103 * reflection.c: reduce code duplication in named custom
106 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
108 * reflection.c: properly encode custom attrs of type object
111 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
113 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
115 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
117 * socket-io.c: load System.dll if it's not loaded already
118 (bug #72850 and #70477).
120 2005-02-21 Martin Baulig <martin@ximian.com>
122 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
125 2005-02-21 Martin Baulig <martin@ximian.com>
127 * reflection.c (mono_image_build_metadata): We also need to
128 "fixup" the MethodImpl table after we computed the final method
129 indices. Call fixup_methodimpl() to do that.
130 (fixup_methodimpl): New private method.
132 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
134 * assembly.c: special case mscorlib.dll (bug#72536),
135 patch from Carlos Alberto Cortez.
137 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
139 * threads-types.h threads.c: Fix build bustage.
141 * threads.c: Use a union for long<->double conversions.
143 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
144 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
146 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
147 containing the checkpoint call with NOT_TAKEN.
149 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
150 checkpoint before pushing the arguments, so they won't have to be
153 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
155 * domain.c, assembly.c, domain-internals.h: make some data
156 const and relocation-free.
158 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
160 * object.c, appdomain.c, class-internals.h: introduce the
161 MonoClassRuntimeInfo structure to hold the info needed to
162 use a class at runtime. Made mono_class_vtable() lock-free
163 for all the appdomains.
165 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
167 * metadata-internals.h, image.c: introduce a per-image mempool to
168 be used for memory that has the same lifetime as the image.
170 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
172 * domain.c: In mono_init_internal(), instead of selecting the first
173 runtime version supported by an executable, get a list of all
174 supported versions and select the one for which an mscorlib exists
175 (since even if the runtime supports a given version, it doesn't mean
176 that the framework for that version is installed).
177 Modified get_runtimes_from_exe to support this behavior.
178 In supported_runtimes, added information about additional system
181 * assembly.c: Added support for more than one system assembly version
182 per runtime version. Updated the assembly list.
183 In mono_assembly_remap_version, removed the initial version check,
184 since we don't know to which version we need to compare until we
185 get the version set on which the assembly is based.
186 Moved the code for loading corlib into the new method
187 mono_assembly_load_corlib(), so it can be used by the initialization
190 * domain-internals.h: Updated data structures and added declaration
191 for mono_assembly_load_corlib.
193 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
195 * reflection.c (resolve_object): Fix the creation of the signature in
196 the SignatureHelper case.
198 * assembly.c (mono_assembly_remap_version): Fix binary search.
200 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
202 * class.c: Added inheritance check when a method is overloaded (from a
203 virtual method or when implementing an interface) and when a class is
204 inherited. Added functions to set a failure for a class and to
205 retreive the exception from a failure.
206 * class-internals.h: Added fields to MonoClass to keep the exception
207 information status for inheritance (or other exceptions) to be thrown
208 later (i.e. not at load time).
209 * object.c: Throw the inheritance SecurityException when a type is to
210 be created with either class or method inheritance violations.
211 * reflection.c|h: Fix when getting declsec from a class. Removed
212 unrequired code for class. Improved sanity in parameter naming.
213 * security-manager.c|h: Added functions to check for class and method
216 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
218 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
219 and has_finalize in dynamic types as well.
221 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
223 * culture-info-table.h : fixed currency format for en-GB (and so on).
225 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
227 * gc.c: ensure the GC handles never have 0 as a value.
229 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
231 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
232 a pointer to a struct to unmanaged code. Fixes #72625.
234 2005-02-16 Martin Baulig <martin@ximian.com>
236 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
238 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
240 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
242 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
244 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
246 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
247 UnmanagedFunctionPointerAttribute, use it for determining calling convention
250 * reflection.c (mono_custom_attrs_get_attr): New helper function.
252 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
254 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
256 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
257 changes to make the current context a field in MonoThread.
259 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
261 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
264 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
265 extracted from mono_marshal_get_native_wrapper.
267 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
268 to create wrappers around native functions.
270 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
271 delegates for arbitrary function pointers. Fixes #71472.
273 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
275 * threads.c: cleaned up the code a little.
277 2005-02-15 Martin Baulig <martin@ximian.com>
279 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
282 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
283 allocate larger chunks if needed.
285 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
287 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
290 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
292 * domain.c: keep the domains in an array and ensure the domain ids
293 are kept small, so they can be used as indexes to domain-specific data
294 with a small memory overhead.
296 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
298 * icall.c: Handle byref types in Type icalls. Fixes #72544.
300 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
302 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
304 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
306 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
308 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
311 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
313 2005-02-12 Ben Maurer <bmaurer@ximian.com>
315 * domain-internals.h: add the hashtable here.
317 * class-internals.h: Remove `info' from MonoMethod
319 * domain.c: Add a new hashtable, jit_trampoline_hash
321 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
323 * object.c: don't set the value of static fields
326 2005-02-11 Martin Baulig <martin@ximian.com>
328 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
329 (mono_debug_add_method): Silently ignore the method if it's too big.
330 (mono_debug_add_type): Likewise.
332 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
334 * threads.c, appdomain.c: remove #ifdefs from the code.
336 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
338 * metadata-internals.h: Added flags to MonoAssembly to cache the most
339 common security informations. This allows us to stay in unmanaged code
340 when doing LinkDemand and it's special cases (except for the first
341 time for initialization). The flags a very much used with --security.
342 * reflection.c|h: Added code to get declarative security attributes
343 for LinkDemand and InheritanceDemand. This required to refactor the
344 existing code for Demand.
345 * security-manager.c|h: Added new method fields for the special cases
348 2005-02-10 Martin Baulig <martin@ximian.com>
350 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
351 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
353 2005-02-10 Martin Baulig <martin@ximian.com>
355 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
356 debugging code; this is almost a complete rewrite.
358 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
360 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
362 * domain.c, object.h: expose mono_string_equal () and
364 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
365 it's implemented in managed code.
367 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
369 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
370 lo leak objects between appdomains.
372 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
374 * assembly.c: old compilers compilation fix from
375 robertj@gmx.net (Robert Jordan).
377 2005-02-09 Ben Maurer <bmaurer@ximian.com>
379 * class-internals.h: Little reminder for the future.
381 * debug-helpers.c: Fix up wrapper_type_names
383 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
385 * image.c, metadata-internals.h: when loading an image from a file,
386 mmap all of it and use the same codepaths as when using a
387 in-memory image: the code is simpler and we use less memory
388 (both writable and readonly).
390 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
392 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
393 API to alloc runtime data structures that need to be tracked by the
394 GC and contain pointers.
395 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
396 make the code more readable and eventually use a different GC.
398 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
400 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
403 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
405 * object.c: In release_type_locks(), don't release the cctor lock
406 if it has already been released. This fixes a crash in the
409 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
411 * gc.c, marshal.c, icall.c: register a delegate for finalization
412 only when the native function pointer has been allocated for it.
414 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
416 * object.c: cleaned up some code, allocate objects that are
417 pointer free with the atomic malloc variant. Allocate memory
418 for static data from the mempool if it's pointer-free.
419 Allocate the bounds array at the end of the array data, when needed.
420 * object-internals.h, object.h: move a private function in a private
422 * class.c: handle missing case in tracking references in fields.
424 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
426 * class.c, class-internals.h: keep track if a type has
427 reference fields in either the instance or static fields.
429 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
431 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
432 and renamed to MonoRuntimeInfo. Added fields to store the expected
433 framework assembly version. Changed mono_get_framework_version and
434 mono_get_runtime_version for a single mono_get_runtime_info method.
436 * assembly.c: Added method to remap system assembly versions to the
437 current executing runtime version. Removed old mapping code.
438 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
440 * icall.c, reflection.c: Track api changes.
442 2005-02-06 Miguel de Icaza <miguel@novell.com>
444 * loader.c (method_from_memberref): Improve error reporting,
445 produce the class name instead of the typeref/typedef index.
447 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
449 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
451 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
453 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
454 stdcall and charset name mangling. Reorganize the code and add
457 2005-02-05 Ben Maurer <bmaurer@ximian.com>
459 * monodiet.c: More iters!
461 * marshal.c: Iter usage.
463 * icall.c: Iter usage.
465 * object.c: Use iters.
467 * debug-helpers.c: More iters
469 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
471 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
474 2005-02-05 Ben Maurer <bmaurer@ximian.com>
476 * mono-debug-debugger.c: use iters
478 * class.c, class-internals.h: mono_class_setup_events is static
481 * All callers: use iters
483 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
485 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
486 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
488 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
490 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
492 * marshal.h: Add prototypes for ldfld/stfld_remote.
494 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
495 this is called during startup.
497 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
499 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
500 MonoThreadsSync struct private in monitor.c. Changed the way
501 MonoThreadsSync is allocated so it's faster and there is no
502 need to keep track of it with a finalizer and it uses less memory.
503 This also finally allows us to allocate mono objects as ptrfree when
504 there are no reference fields.
506 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
508 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
509 disappearing link to the GC interface and use them to simplify
512 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
514 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
515 stfld_remote which call mono_load/store_field_new. This allows methods
516 calling ldfld/stfld wrappers to be AOTed.
518 * console-io.c: Include sys/filio.h under solaris.
520 * console-io.c: Include curses.h if needed correctly.
522 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
524 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
525 method->klass as well.
527 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
529 * class.c (mono_class_init): Switch on lazy initialization of
532 * class.c (mono_class_get_finalizer): Handle the case when the
533 finalizer is inherited.
535 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
537 * console-io.c: <curses.h> is needed by term.h on solaris.
539 2005-02-03 Ben Maurer <bmaurer@ximian.com>
541 * icall.c, class-internals.h, monodiet.c, class.c: Remove
542 mono_class_setup_properties where possible. Remove this ftn from
543 the header file, and make it static.
545 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
547 * loader.c: Add missing setup_... call.
549 * class.c: Add missing setup_... calls.
551 * class.c (mono_class_init): Switch on lazy initialization of
554 * class.c (mono_class_init): Fix generics broken by the recent changes.
556 * monodiet.c (handle_type): Add missing setup_... calls.
558 * class.c: Back out garbage in previous patch.
560 * class.c: Add missing setup_... calls.
562 * class.c (mono_class_get_method_from_name_flags): Avoid calling
563 mono_class_setup_methods () if possible.
565 * class-internals.h (MonoClass): Add 'has_cctor' flag.
567 * class-internals.h (MonoCachedClassInfo): New structure.
569 * class.c: Initialize properties and events fields of MonoClass lazily.
571 * class.c: Add infrastructure for lazily initializing the methods and
572 vtable fields of MonoClass. Not yet used.
574 * class.c (mono_class_get_finalizer): New helper function.
576 * class.c: Add infrastructure for loading some class related data from
579 * object.c: Add infrastructure for initializing the vtable from data
582 * gc.c (run_finalize): Use mono_class_get_finalizer ().
584 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
585 appropriate initialization function before accessing parts of the
588 * marshal.c: Fix warnings.
590 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
592 * mono-debug-debugger.c (get_exception_message): Use
593 mono_class_get_method_from_name_flags ().
595 2005-02-02 Ben Maurer <bmaurer@ximian.com>
597 * reflection.c, appdomain.c: Replace a few manual searches that
598 Zoltan missed. (Paolo approved this part of my initial patch).
600 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
602 * profiler.c: disable recording statistical events at report time.
604 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
606 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
607 to byteswap arrays of enum values, too (bug #72080).
609 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
611 * appdomain.c (set_domain_search_path): Allow this to be called if
612 domain->setup is not yet set.
614 * loader.c (mono_method_get_index): New helper function.
616 * loader.c reflection.c: Use mono_method_get_index ().
618 * class.c (mono_class_get_method_from_name_flags): New helper method.
620 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
623 * class.c (mono_class_get_cctor): New helper method.
625 * string-icalls.c object.c class.c marshal.c reflection.c: Use
626 mono_class_get_method () to look up methods.
628 2005-02-01 Miguel de Icaza <miguel@novell.com>
630 * console-io.c: Fix the build, this should work on Windows.
632 2005-01-31 Ben Maurer <bmaurer@ximian.com>
634 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
635 be set to null to keep things valid
637 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
639 * icall.c: added Console 2.0 icalls.
640 * Makefile.am: added console-io.[ch]
641 * console-io.[ch]: internal calls for Console 2.0 API.
643 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
645 * class.c: make sure we consider all the interfaces
646 when calculating max_interface_id (bug found by
647 Jeroen Frijters running ikvm).
649 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
651 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
652 valuetype fields to null.
654 * object.c (set_value): Ditto. Fixes #71669.
656 2005-01-31 Martin Baulig <martin@ximian.com>
658 * metadata.c (mono_metadata_has_generic_params): New public
659 function; checks whether something is a generic method.
661 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
663 * appdomain.c: fix infinite recursion when adding assemblies.
665 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
667 * object.c: Fix small typo to return all items for Environment.
670 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
672 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
673 reflection.c: more domain and assembly-unload related fixes
674 and memory leaks plugs.
676 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
678 * class.c loader.c security.c loader.h process.c threads.c mono-debug-debugger.c profiler.c marshal.c rand.cpedump.c: Fix 64 bit warnings.
680 2005-01-29 Ben Maurer <bmaurer@ximian.com>
682 * loader.c (mono_method_signature): Make this method lazy
683 (mono_get_method_from_token): Don't computate the signature here.
685 Doing this saves quite a bit of memory. I got 90 kb on starting up
686 monodoc. It should also save some disk reads on startup.
688 * *: MonoMethod->signature might be NULL now. You *MUST* use
689 mono_method_signature.
691 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
693 * object.c (mono_runtime_get_main_args): Return an array from the
694 current domain here. Fixes #71938.
696 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
698 * monitor.c: formatting changes to comply with the
699 mono coding style and remove #ifdefs from the code.
701 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
703 * metadata.c, private.h: remove some unneeded data
704 and use a more compact representation for table schemas.
706 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
708 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
709 to get a better distribution in hash tables.
710 * *.c: use mono_aligned_addr_hash() where appropriate.
711 * assembly.c: make var static.
713 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
715 * domain-internals.h: Put MonoJitInfo on a diet.
717 * domain.c: Fix a warning.
719 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
721 * gc.c: rework the gc handles code to reuse handles
724 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
726 * domain.c: fixed long standing bug in mono_string_equal() which
727 was brought to light with the ldstr changes.
729 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
731 * reflection.c: Remove warning by adding missing include for marshal.h
733 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
735 * domain.c, object.c: change the ldstr_table to hold
736 MonoString* as keys: makes the runtime isinterned lookup
737 faster and simplifies memory management.
739 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
741 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
742 possible to add imperative security checks before calling the icall.
743 * reflection.c: Return security attributes on the original MonoMethod
744 (and not the wrapped one). This fix permissions on icalls.
746 2005-01-25 Dick Porter <dick@ximian.com>
748 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
749 the check for mktime() support actually test the mktime() return
750 value. "Fixes" bug 71682, though the output is still different to
753 2005-01-25 Martin Baulig <martin@ximian.com>
755 * class.c (mono_class_is_assignable_from): Make this work for
758 2005-01-24 Ben Maurer <bmaurer@ximian.com>
760 * marshal.c (mono_string_utf8_to_builder)
761 (mono_string_builder_to_utf16): We might not have ownership of the
762 string. In thise case, we need to create a new buffer.
764 * object-internals.h (mono_stringbuilder_capacity): sb->str might
765 be null, in which case, use the default capacity.
767 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
769 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
770 GC events to the profiler.
772 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
774 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
775 if you don't want the GC to run.
777 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
779 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
780 start providing a GC API and keeping different implementations in
782 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
784 2005-01-22 Ben Maurer <bmaurer@ximian.com>
786 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
787 mmap rather than allocating a huge buffer.
788 (mono_debug_close_mono_symbol_file): Free the buffer allocated
791 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
793 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
794 and CheckExecutionRights.
795 * reflection.c|h: Keep the index of the declarative security to be
796 used, instead of the pointer, when AOT compiler is used. Also add
797 class initialization when requesting demands.
798 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
799 CheckExecutionRights. Both properties are now FALSE by default, and
800 unmodifiable, unless the --security option is used.
802 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
804 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
805 reflection.c: properly refcount images and assemblies, many leaks fixed.
807 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
809 * threadpool.c: increase the timeout for threads in the thread pool to
810 10s. Fixes bug #67159.
812 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
814 * class-internals.h: Sun's compiler insists on explicit
815 signed on bit fields to handle then correctly.
817 2005-01-19 Miguel de Icaza <miguel@ximian.com>
819 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
820 Make the size of the array fit only the number of invalid path
823 * class.c (_mono_class_get): Improve the error reporting when a
824 class referenced is not found, to assist debugging.
826 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
828 * threads.c: fix off-by-one error.
829 * domain.c: free data allocated in the domain.
831 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
833 * reflection.c (mono_method_body_get_object): Fill out exception info
836 * object-internals.h: Add MonoReflectionExceptionHandlingClause
839 2005-01-19 Martin Baulig <martin@ximian.com>
841 * loader.c (mono_get_method_constrained): Make this work again.
843 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
845 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
846 guint16 to match the managed side.
848 * reflection.c (mono_reflection_body_get_object): Fill out local
851 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
854 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
855 'local_var_sig_token'.
857 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
859 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
862 * reflection.c (mono_method_body_get_object): Handle abstract and
865 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
867 * marshal.c, loader.c, class-internals.h, reflection.c:
868 store the emthod data for a wrapper in an array instead of a list.
870 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
872 * marshal.c: change the code to allocate memory more
873 conservatively for method wrappers.
875 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
877 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
878 fields from MonoClass to the marshal info structure where they belong.
880 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
882 * class.c, object.c, class-internals.h, marshal.c: rearrange
883 some fields and tweak some types to lower memory usage.
885 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
887 * threads.c (signal_thread_state_change): Handle the case when the
888 target thread is the current thread.
890 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
892 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
893 emit_ptr_to_object_conv.
895 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
896 marshalling. Fixes #71352.
898 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
900 * metadata.h, blob.h: move table enum to blob.h so it can be included
902 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
903 cut the size of MonoImage/MonoDynamicImage.
905 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
907 * profiler.c (mono_profiler_install_simple): Fix default arguments.
909 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
911 * reflection.c, reflection.h, icall.c: add a function to check
912 if an attribute type is defined for a metadata object.
914 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
916 * object-internals.h: Added some needed fields from StringBuilder class.
917 * marshal.c: Set the maxCapacity when creating a StringBuilder.
919 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
921 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
922 threads before shutting down the runtime.
924 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
926 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
928 * object-internal.h, threads.c: implement stacksize and
929 parameterized thread start functionality (requires
930 matching corlib). Marked broken code for later removal.
932 2005-01-12 Martin Baulig <martin@ximian.com>
934 * class-internals.h (MonoGenericClass): Moved the `initialized'
935 flag to MonoDynamicGenericClass, removed `init_pending'.
936 (MonoGenericInst): Added `is_reference' flag.
938 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
940 * reflection.c (mono_image_create_pefile): Only set the pe_offset
941 inside the MSDOS header. Fixes #71201.
943 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
945 (mono_domain_finalize): Ditto.
947 2005-01-12 Martin Baulig <martin@ximian.com>
949 * class.c (mono_get_shared_generic_class): Use the cache for
950 non-dynamic generic classes.
952 * class-internals.h (mono_class_create_generic_2): Removed
953 function prototype, this function is now static inside class.c.
955 * class.c (mono_class_create_generic_2): Made this static, only
956 call it from mono_class_init() and mono_class_setup_parent().
957 (collect_implemented_interfaces_aux): Call mono_class_init() on
958 the interfaces we collect.
959 (mono_class_setup_vtable): Call mono_class_init (class->parent).
961 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
963 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
964 it a real thread handle.
966 * domain-internals.h: Move exvar_offset from MonoJitInfo to
967 MonoJitExceptionInfo, since each catch clause needs its own variable.
969 2005-01-11 Dick Porter <dick@ximian.com>
971 * image.c (mono_pe_file_open): New variant on mono_image_open()
972 that does not set up the CLI metadata; used for FileVersionInfo so
973 it can get the data for windows binaries too.
975 * process.c (process_read_string_block): Don't read off the end of
976 the StringTable block.
978 These both fix bug 70766.
980 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
982 * gc.c: set some fields to NULL at GC cleanup time.
983 * threads.c: if we quit the main thread, call exit ().
985 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
987 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
989 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
991 * threads.h, threads.c, object.c: added accessor and settor for
992 main_thread. Handle it specially when exiting from it: wait
993 for other foreground threads to exit.
995 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
997 * process.c, verify.c: remove some bloat.
999 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
1001 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
1002 the calling convention to cdecl under win32.
1004 2005-01-08 Ben Maurer <bmaurer@ximian.com>
1006 * object.c (mono_object_get_size): New function to get the size of
1009 * profiler.c (simple_allocation): Use above.
1011 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
1013 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
1014 ves_icall_System_AppDomain_getRootDomain (as it's not required to
1015 get an appdomain by it's id and we can't assume the root's id is 0).
1016 * domain-internals.h: Change the function prototype to match.
1017 * icall.c: Change the icall table for AppDomain.
1019 2005-01-08 Miguel de Icaza <miguel@ximian.com>
1021 * locales.c (string_invariant_compare_char): Only compute
1022 GUnicodeTypes in the case where we need them. Test for ordinality
1023 first and return if so.
1028 * FIXME: here we must use the information from c1type and c2type
1029 * to find out the proper collation, even on the InvariantCulture, the
1030 * sorting is not done by computing the unicode values, but their
1031 * actual sort order.
1034 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
1036 * loader.c: for P/Invoke methods, allow the "Internal" shared
1037 library name to refer to the calling process symbol namespace.
1039 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
1041 * Makefile.am: Add the security manager to the build.
1042 * security-manager.c|h: New. Initialization of the security manager.
1044 2005-01-07 Dick Porter <dick@ximian.com>
1047 * monitor.c: Update thread state during Monitor and WaitHandle
1048 waits. Fixes bug 71031.
1050 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
1052 * reflection.c (property_encode_signature): Correctly handle when the
1053 property has no methods.
1055 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
1057 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
1059 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
1060 fields from mb, not rmb. Fixes #71017.
1062 * marshal.c (emit_ptr_to_str_conv): Add support for
1063 ByValTStr -> string conversion. Fixes #71015.
1065 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
1067 * mempool.c (mono_mempool_contains_addr): New helper function.
1069 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
1071 * metadata.c (mono_metadata_compute_size): Fix size calculation of
1072 HasSematics encoded fields.
1074 * metadata.c (mono_type_to_unmanaged): Improve error message for
1075 invalid string marshalling.
1077 * metadata.c: Fix warnings.
1079 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
1081 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
1084 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
1086 * domain.c object.c domain-internals.h: Revert part of r38077 since the
1087 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
1090 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
1092 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
1093 so methods containing these can be AOTed.
1095 2005-01-03 Martin Baulig <martin@ximian.com>
1097 * loader.c (find_method): Removed the hack for generic instances.
1098 (method_from_memberref): If our parent is a generic instance, pass
1099 its generic type definition to find_method() and then inflate the
1101 (mono_get_method_constrained): Pass the generic type definition to
1102 find_method() and inflate the method later.
1104 * class-internals.h (MonoStats): Added `generic_class_count'.
1106 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
1107 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
1109 * reflection.c (mono_custom_attrs_from_params): Don't ignore
1110 generic type definitions.
1112 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
1114 * loader.c icall.c: Fix warnings.
1116 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
1118 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
1119 blittable types. Fixes #70864.
1121 2004-12-29 Martin Baulig <martin@ximian.com>
1124 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
1126 * reflection.c (mono_method_get_object): Create a
1127 "System.Reflection.MonoGenericMethod" for inflated methods; don't
1128 call mono_get_inflated_method().
1130 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
1132 2004-12-27 Martin Baulig <martin@ximian.com>
1134 * class-internals.h (MonoMethod): Added `is_inflated' flag.
1135 (MonoMethodInflated): Added `inflated' field.
1137 * class.c (mono_class_inflate_generic_method): Don't really
1138 inflate the method here; just set the `is_inflated' flag in the
1140 (mono_class_get_inflated_method): Actually inflate the method here
1141 if it's not already inflated; we use the MonoMethodInflated's new
1142 `inflated' field as a cache.
1144 2004-12-26 Martin Baulig <martin@ximian.com>
1147 (inflate_generic_class): Moved some code out of inflate_generic_type().
1148 (mono_class_inflate_generic_method): If we're already inflated,
1149 inflate the context and use the declaring method; ie. make sure
1150 the declaring method of an inflated method is always the generic
1152 (mono_class_create_from_typedef): Create
1153 `class->generic_container->context->gclass'.
1155 2004-12-24 Ben Maurer <bmaurer@ximian.com>
1157 * metadata-internals.h, marshal.c, reflection.c: More
1158 MonoGHashTable->GHashTable.
1160 * domain-internals.h, class.c: Change MonoGHashTable's into
1161 GHashTables for some cases where no gc stuff is used
1163 All users: update apis
1165 2004-12-23 Ben Maurer <bmaurer@ximian.com>
1167 * metadata.c (builtin_types): Make this `const'. Makes this get
1168 put into the shareable section.
1169 (mono_metadata_init): Casts to make gcc happy.
1171 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
1173 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
1175 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
1177 * icall.c: Added an internal call to retrieve the position and length
1178 of assembly-level declarative security attributes (RequestMinimum,
1179 RequestOptional and RequestRefuse). This is used by the Assembly class
1180 to re-create the corresponding permission sets.
1182 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
1184 * marshal.c: fix the stelemref wrapper to be type correct
1187 2004-12-20 Ben Maurer <bmaurer@ximian.com>
1189 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
1190 to do key & 0x7fffffff. Hashtable already does this. It just
1191 results in longer code.
1193 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
1195 * appdomain.c: Bump corlib version.
1196 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
1197 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
1198 * reflection.c|h: Add functions to get declarative security infos
1199 (blob position and length) for assemblies, classes and methods.
1201 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
1203 * reflection.c: sort the constant table (bug #70693).
1205 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
1207 * object-internals.h, threads.c, domain.c: add accessors for
1208 the MonoThread and MonoDomain tls keys.
1210 2004-12-18 Martin Baulig <martin@ximian.com>
1212 * class.c (inflate_generic_type): If we're inflating a generic
1213 instance, set `ngclass->context->container = context->container';
1214 ie. the container we inflated into.
1216 * metadata.c (mono_metadata_parse_generic_param): Reflect above
1217 inflate_generic_type() changes.
1219 2004-12-17 Martin Baulig <martin@ximian.com>
1222 (MonoGenericClass): Replaced `MonoType *generic_type' with
1223 `MonoClass *generic_class'. Removed `dynamic_info'; if
1224 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
1225 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
1227 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
1229 * exception.c (mono_exception_from_token): New helper function.
1231 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
1233 * assembly.c (mono_assembly_load_with_partial_name): Call
1234 mono_assembly_loaded before invoking the preload hooks. Fixes
1237 * object-internals.h (MonoThread): Change culture_info and
1238 ui_culture_info into an array.
1240 * threads.c: Cache culture info objects from more than one appdomain.
1242 * threads.c threads-types.h icall.c: Add icalls for manipulating the
1245 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
1247 * threads.h threads.c appdomain.c: Clear the culture_info field of
1248 all threads during unloading if they point to an object in the dying
1251 2004-12-13 Ben Maurer <bmaurer@ximian.com>
1253 * culture-info.h (TextInfoEntry): New struct
1254 * object-internals.h: sync with managed
1255 * locales.c: fill the `text_info_data' field
1256 * culture-info-tables.h: update
1258 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
1260 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
1263 2004-12-12 Ben Maurer <bmaurer@ximian.com>
1265 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
1266 (ves_icall_ModuleBuilder_getMethodToken): Ditto
1268 2004-12-12 Martin Baulig <martin@ximian.com>
1270 * mono-debug-debugger.c (write_type): If we're an enum and the
1271 builtin types have already been initialized, call mono_class_init().
1273 2004-12-11 Martin Baulig <martin@ximian.com>
1275 * metadata.c (mono_metadata_load_generic_params): Added
1276 `MonoGenericContainer *parent_container' argument; automatically
1277 compute `container->is_method'; pass the correct owner to
1280 * reflection.c (compare_genericparam): Sort the GenericParam table
1281 according to increasing owners.
1283 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
1285 * profiler.c: allow disabling the default profiler.
1287 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
1289 * decimal.c, icall.c: allow disabling System.Decimal support.
1291 2004-12-09 Marek Safar <marek.safar@seznam.cz>
1293 * reflection.c: Add support for null attribute arguments.
1295 2004-12-09 Martin Baulig <martin@ximian.com>
1297 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
1298 names to get rid of compiler warnings.
1300 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
1302 * marshal.c (mono_marshal_get_struct_to_ptr): Call
1303 mono_marshal_load_type_info (). Fixes #69625.
1304 (mono_marshal_get_ptr_to_struct): Likewise.
1306 2004-12-08 Martin Baulig <martin@ximian.com>
1308 * mono-debug.h: Bumped version number to 47.
1310 * mono-debug-debugger.c
1311 (mono_debugger_event_handler, mono_debugger_event): Take two
1312 guint64 arguments insteed of a gpointer and a guint32.
1314 2004-12-08 Martin Baulig <martin@ximian.com>
1316 * debug-mono-symfile.h
1317 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
1318 `address' to `native_offset'.
1320 2004-12-08 Martin Baulig <martin@ximian.com>
1322 * class.c (mono_class_create_from_typespec): Only inflate if we
1323 either have `context->gclass' or `context->gmethod'.
1325 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
1327 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
1329 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
1331 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
1333 * reflection.c (mono_assembly_get_object): Remove the workaround put
1336 * appdomain.c: Use the corlib_internal field from MonoAssembly.
1338 * appdomain.c: Bump corlib version.
1340 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
1341 be visible in other appdomains.
1343 2004-12-07 Ben Maurer <bmaurer@ximian.com>
1345 * threads.c: Interlocked inc and dec for longs were messed up,
1346 use a KISS based impl for this. Fixes 70234
1348 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
1350 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
1352 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
1354 * icall.c: fix to follow policy not to allow struct
1355 arguments in icalls.
1357 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1359 * process.c: make the patch that handles spaces in file paths work
1360 on mono/windows too.
1362 2004-12-06 Martin Baulig <martin@ximian.com>
1364 * class.c (mono_class_create_generic): Call
1365 mono_class_setup_supertypes() if we're dynamic.
1366 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
1368 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
1370 * object-internals.h: Add new fields to MonoThread.
1372 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1374 * icall.c threads-types.h threads.c: Add new icalls.
1376 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
1378 * object-internals.h (MonoReflectionAssembly): Sync object layout with
1381 * appdomain.c: Bump corlib version.
1383 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
1384 internal assemblies. Fixes #69181.
1386 2004-12-05 Martin Baulig <martin@ximian.com>
1388 * class.c (mono_class_inflate_generic_signature): Make this a
1389 no-op if `context' is NULL or we don't have any type parameters;
1390 also copy `sentinelpos'.
1392 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
1394 * image.c: Add unbox_wrapper_cache.
1396 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
1398 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
1401 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
1404 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
1406 2004-12-04 Martin Baulig <martin@ximian.com>
1408 * loader.c (mono_method_get_signature_full): New public function;
1409 like mono_method_get_signature(), but with an additional
1410 `MonoGenericContext *' argument.
1412 * class.c (mono_class_inflate_generic_signature): Formerly known
1413 as inflate_generic_signature(); make this public.
1415 2004-12-04 Martin Baulig <martin@ximian.com>
1418 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
1419 instead of a `MonoGenericContainer *'.
1420 (mono_metadata_parse_array_full): Likewise.
1421 (mono_metadata_parse_signature_full): Likewise.
1422 (mono_metadata_parse_method_signature_full): Likewise.
1423 (mono_metadata_parse_generic_inst): Likewise.
1424 (mono_metadata_parse_generic_param): Likewise.
1425 (mono_metadata_parse_mh_full): Likewise.
1426 (mono_type_create_from_typespec_full): Likewise.
1428 2004-12-03 Martin Baulig <martin@ximian.com>
1430 * class-internals.h (MonoGenericContainer): Replaced the
1431 `MonoGenericContext * pointer with a `MonoGenericContext'
1432 structure and made it the first element.
1434 2004-12-03 Martin Baulig <martin@ximian.com>
1437 (inflate_generic_type): Set the `context->container' when creating
1438 a new MonoGenericContext.
1439 (mono_class_inflate_generic_method): Likewise.
1440 (mono_class_create_from_typespec): Just use `context->container'
1441 to get the container.
1443 * loader.c (method_from_methodspec): Set `context->parent' from
1444 `context->container' - and if that's a method container, use its
1445 parent. Also set the `context->container' when creating a new
1447 (mono_get_method_from_token): Use just `context->container' to get
1450 * metadata.c (do_mono_metadata_parse_generic_class): Also set
1451 `gclass->context->container'.
1453 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
1454 the `context->container' when creating a new MonoGenericContext.
1456 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
1458 * reflection.c (compare_genericparam): Sort params with identical
1459 owner by their number. Fixes gen-111 on sparc.
1461 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
1463 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
1464 around the domain changes.
1466 * appdomain.c (mono_domain_unload): Handle the case when the thread
1467 calling Unload is itself being aborted during unloading. Fixes #70022.
1469 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
1471 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
1472 checkpoint_func as an icall so it gets a wrapper.
1473 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
1474 in the cross-appdomain wrappers too.
1476 * threads.c (mono_thread_has_appdomain_ref): Make this public.
1478 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
1480 * reflection.c: Fix some memory leaks.
1482 2004-12-02 Martin Baulig <martin@ximian.com>
1484 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
1486 * metadata.c (generic_class_cache): New static hashtable.
1487 (mono_metadata_lookup_generic_class): New public method.
1489 2004-12-02 Martin Baulig <martin@ximian.com>
1491 * class.c (mono_class_create_from_typedef): Call
1492 mono_class_setup_parent() and mono_class_create_mono_type() before
1493 parsing the interfaces.
1495 2004-12-02 Martin Baulig <martin@ximian.com>
1497 * metadata.c (generic_inst_cache): New static hashtable.
1498 (mono_metadata_lookup_generic_inst): New public function.
1499 (mono_metadata_inflate_generic_inst): New public function.
1500 (mono_metadata_parse_generic_inst): New public function.
1501 (do_mono_metadata_parse_generic_class): Use the new
1502 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
1503 since this'll also use the cache.
1505 * reflection.c (mono_reflection_bind_generic_method_parameters):
1506 Use mono_metadata_lookup_generic_inst() to use the new cache.
1508 * class.c (inflate_mono_type): Use
1509 mono_metadata_inflate_generic_inst() to inflate a generic
1510 instance; this'll also use the new cache.
1512 * loader.c (method_from_methodspec): Use
1513 mono_metadata_parse_generic_inst() and
1514 mono_metadata_inflate_generic_inst() rather than parsing it
1515 manually, so we can use the new cache.
1517 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
1519 * threads.c (wait_for_tids): Do not incorrectly free threads when
1522 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
1524 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
1525 iter->args based on whether parameters are passed in registers (i.e.
1526 MONO_ARCH_REGPARMS is defined)
1528 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
1530 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
1531 the exception message. Fixes #70070.
1532 (method_from_methodspec): Fix warnings.
1534 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1536 * process.c: (complete_path) return the path quoted
1538 2004-12-01 Martin Baulig <martin@ximian.com>
1540 * class-internals.h (MonoGenericInst): New structure.
1541 (MonoGenericClass): Replaced `type_argc', `type_argv' and
1542 `is_open' with `MonoGenericInst *inst'.
1543 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
1544 `is_open' with `MonoGenericInst *inst'.
1546 2004-11-30 Martin Baulig <martin@ximian.com>
1548 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
1550 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
1551 to `generic_class_cache'.
1554 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
1555 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
1556 (mono_generic_inst_is_valuetype): Renamed to
1557 mono_generic_class_is_valuetype().
1560 (MonoGenericInst): Renamed to MonoGenericClass.
1561 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
1562 (MonoClass): Renamed `generic_inst' to `generic_class'.
1563 (MonoGenericContext): Renamed `ginst' to `gclass'.
1565 * object-internals.h
1566 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
1568 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
1569 mono_reflection_generic_class_initialize().
1571 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
1572 now known as "System.Reflection.MonoGenericClass".
1573 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
1575 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
1577 * class-internals.h: Added a flag field to MonoClass to cache the
1578 declarative security attributes actions associated with the class.
1579 * domain-internals.h: Added booleans to MonoJitInfo to cache the
1580 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
1581 applicable to the JITted method.
1582 * reflection.c|h: Added functions to extract (as flags) which security
1583 actions are available (declaratively) for a method, class or assembly.
1584 * metadata.c|h: Added functions to search the declarative security
1585 table in the metadata.
1587 2004-11-29 Ben Maurer <bmaurer@ximian.com>
1589 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
1590 EXPORTEDTYPES are already in the class name cache, so there is no
1591 need to add extra code here to look at them. Just removes a bit of
1594 (ves_icall_System_Environment_get_TickCount): No need for #if
1595 WINDOWS. We already have the code in io-layer.
1597 2004-11-28 Martin Baulig <martin@ximian.com>
1600 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
1603 2004-11-27 Miguel de Icaza <miguel@ximian.com>
1605 * assembly.c (do_mono_assembly_open): Instead of having a
1606 conditional WITH_BUNDLE, incorporate support for bundles here, by
1607 having a global `bundles' variable holding a pointer to the actual
1610 (mono_register_bundled_assemblies): New API call used by the
1613 See mkbundle.1 for details.
1615 2004-11-27 Martin Baulig <martin@ximian.com>
1617 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
1618 the vtable for generic methods.
1620 2004-11-26 Martin Baulig <martin@ximian.com>
1623 (mono_metadata_generic_method_hash): New public function.
1624 (mono_metadata_generic_method_equal): Likewise.
1627 (MonoGenericContainer): Added `GHashTable *method_hash'.
1629 * reflection.c (ReflectionMethodBuilder): Added
1630 `MonoGenericContainer *generic_container'.
1631 (reflection_methodbuilder_to_mono_method): Don't create a new
1632 MonoGenericContainer each time we're called.
1633 (mono_reflection_bind_generic_method_parameters): Use
1634 `container->method_hash' to cache the results so we don't create a
1635 different method if we're called several times with the same
1638 * loader.c (method_from_methodspec): Use the new
1639 `container->method_hash' here, too.
1641 2004-11-26 Martin Baulig <martin@ximian.com>
1643 * class.c (inflate_generic_signature): Correctly compute
1644 `res->has_type_parameters'.
1645 (mono_class_vtable): Use the `has_type_parameters' flag to
1646 determine whether we're a generic method.
1648 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
1650 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
1652 * object.c (mono_runtime_run_main): Fix a small memory leak.
1654 2004-11-25 Martin Baulig <martin@ximian.com>
1656 * class.c (set_generic_param_owner): Fixed the loop.
1658 2004-11-25 Martin Baulig <martin@ximian.com>
1660 * object.c (mono_class_vtable): Don't create any JIT wrappers for
1663 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
1665 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
1666 names. Fixes #69787.
1668 2004-11-24 Martin Baulig <martin@ximian.com>
1670 * class.c (mono_class_create_generic_2): If we don't have a
1671 `ginst->parent', inflate `gklass->parent' to get our parent.
1673 2004-11-24 Martin Baulig <martin@ximian.com>
1675 * reflection.c (compare_genericparam): Correctly sort the
1676 GenericParam table; fixes #69779.
1678 2004-11-23 Ben Maurer <bmaurer@ximian.com>
1680 * reflection.c: When writing a PE file, don't create a huge
1681 buffer in memory. Just write the arrays we have to the file.
1682 This reduces memory usage.
1684 * metadata-internals.h: MonoDynamicStream pefile is no longer used
1687 2004-11-17 Martin Baulig <martin@ximian.com>
1689 * class.c (mono_class_init): Don't setup `class->parent' for
1690 dynamic instances; moved this to mono_class_generic_2().
1691 (mono_class_create_generic): Also set `klass->inited' for dynamic
1693 (mono_class_create_generic_2): Don't do anything for dynamic
1694 generic instances. Set `klass->parent' here and also call
1695 mono_class_setup_parent() here.
1697 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
1698 `MonoType *parent' argument; set `ginst->parent' before calling
1699 mono_class_create_generic_2(), so we set the correct parent.
1701 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
1703 * reflection.c: allow getting attributes from ModuleBuilder
1706 2004-11-17 Martin Baulig <martin@ximian.com>
1708 * class.c (mono_class_create_from_typedef): If a type parameter is
1709 inherited from an outer class, set its owner to that class.
1711 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
1713 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
1714 for (int*) written size. This fixes bug #69592.
1716 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
1718 * icall.c: Added IsAuthenticodePresnet internal call.
1719 * image.c|h: New function that check a MonoImage for an Authenticode
1720 signature in the certificate PE data directory.
1721 * security.c|h: New internal call to ask the runtime if an
1722 Authenticode signature seems referenced in the PE header.
1724 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
1726 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
1728 * reflection.c (mono_image_create_pefile): Free the assembly streams
1729 after writing out the assembly file.
1731 * object.c (mono_runtime_run_main): Fix small memory leak.
1733 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
1734 property access modifiers. Fixes #69389.
1736 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
1738 * domain.c, object.c, object-internals.h, domain-internals.h,
1739 object.h, marshal.c: keep dynamic code info per domain.
1741 2004-11-15 Martin Baulig <martin@ximian.com>
1743 * class.c (mono_type_get_name_recurse): Put type arguments in
1744 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
1747 2004-11-15 Martin Baulig <martin@ximian.com>
1749 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
1750 (mono_class_setup_vtable): When computing `the_cname' for a
1751 generic instance, don't include the namespace since we'd otherwise
1754 2004-11-15 Martin Baulig <martin@ximian.com>
1756 * class.c (mono_class_create_generic): Changed return type to void.
1757 (mono_class_create_generic_2): New public function; setup
1758 `class->method', `class->field' and `class->interfaces' here
1759 instead of in mono_class_init().
1761 * class.h (mono_class_create_generic): Moved to class-internals.h.
1763 2004-11-14 Ben Maurer <bmaurer@ximian.com>
1765 * reflection.c (mono_image_create_pefile): take a file HANDLE.
1766 rather than writing to memory, write to this file. Right now,
1767 we are just writting into a buffer, and copying that. However
1768 we can avoid the buffer later.
1770 (mono_dynamic_stream_reset): new function
1772 * icall.c, object-internals.h: update for the above.
1774 2004-11-13 Ben Maurer <bmaurer@ximian.com>
1776 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
1777 have been using gc'd memory. First it is slower, unlikely
1778 the comment in the source code said, secondly, it increases
1779 our footprint to do it in the gc.
1781 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
1782 the method so that it does not have to copy to managed code.
1784 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
1786 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
1788 2004-11-12 Martin Baulig <martin@localhost>
1790 * reflection.c (mono_image_create_token): Allow generic method
1791 definitions here, since they may appear in an `.override'; see
1792 gen-98/gen-99 for an example.
1794 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
1796 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
1799 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
1802 2004-11-11 Martin Baulig <martin@ximian.com>
1804 * class.c (mono_class_setup_vtable): In an explicit interface
1805 implementation, the method name now includes the arity.
1807 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
1809 * object.c (mono_array_full_copy): Fix warning.
1811 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
1813 * appdomain.c: Removed look_for_method_by_name(). Use the new method
1814 mono_class_get_method_from_name() instead.
1816 * class-internals.h: Added two new types of wrappers.
1817 Added MonoRemotingTarget enum. Added new trampoline function type, which
1818 takes an additional MonoRemotingTarget value as parameter, so it is
1819 possible to request a trampoline for a specific target.
1821 * class.c: Added new mono_class_get_method_from_name() method.
1823 * class.h: In MonoRemoteClass, we can have now to vtables, one for
1824 general remoting sinks and one specific for cross domain calls.
1826 * debug-helpers.c: Added new wrapper names.
1828 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
1831 * image.c: Porperly delete value objects form the remoting invoke hashtable.
1833 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
1834 with several other methods (mono_marshal_get_xappdomain_dispatch,
1835 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
1836 and others) can generate a fast remoting wrapper for cross domain calls.
1837 More information can be found in docs/remoting.
1838 Other changes: Removed mono_find_method_by_name, and used
1839 mono_class_get_method_from_name instead.
1840 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
1841 is stored in the remoting invoke hashtable.
1843 * marshal.h: published the new method for getting the xdomain wrapper,
1844 and also added a method for getting the adequate wrapper for a given
1847 * object-internals.h, object.c: Added a couple of methods for capying and
1849 Modified mono_install_remoting_trampoline, which takes the new remoting
1850 trampoline that has a remoting target as parameter.
1851 mono_class_proxy_vtable now also takes a remoting target as parameter, and
1852 will return the most suitable vtable for the target.
1853 Added mono_remote_class_vtable, which returns the vtable of a remote class
1854 (which can be the normal remoting vtable or the xdomain vtable).
1856 * threads.c: the xdomain invoke and dispatch wrappers must also be
1857 protected against interruptions.
1859 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1861 * icall.c: use memmove in BlockCopyInternal when the source and
1862 destination arrays are the same.
1864 2004-11-09 Martin Baulig <martin@ximian.com>
1866 * class-internals.h (MonoGenericContainer): Removed `method' and
1867 `signature', replaced them with `is_method' and `is_signature'
1868 flags. Added `context'.
1870 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
1871 instead of a `MonoGenericContainer *'.
1873 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
1874 for dynamic type parameters.
1875 (mono_metadata_load_generic_params): Setup `container->context'.
1877 * reflection.c (mono_reflection_setup_generic_class): Setup
1878 `tb->generic_container->context'.
1879 (do_mono_reflection_bind_generic_parameters): Use
1880 mono_class_inflate_generic_type() to correctly inflate types,
1881 rather than using our own hack just for MONO_TYPE_VAR.
1883 2004-11-09 Martin Baulig <martin@ximian.com>
1885 * class.c (mono_class_inflate_generic_method): Small fix; don't
1889 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
1890 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
1891 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
1892 (ves_icall_Type_BindGenericParameters): Likewise.
1893 (ves_icall_Type_get_IsGenericInstance): Likewise.
1894 (ves_icall_Type_GetGenericParameterPosition): Likewise.
1895 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
1896 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
1897 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
1899 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
1901 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
1902 assembly versions and public key tokens. Fixes #69113.
1904 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
1906 * metadata.c: fix bug introduced with the type cache changes
1909 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
1911 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
1912 the MonoClass pointer instead of the token in exception clauses.
1913 * reflection.c: updates for the above and make the code not depend
1914 on the structure of MonoExceptionClause.
1916 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
1918 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
1919 Add support for dynamic assemblies. Fixes #69114.
1921 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
1923 2004-11-07 Ben Maurer <bmaurer@ximian.com>
1925 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
1926 since most only those methods use it. the code member of
1927 MonoMethodPInvoke was dead, so that can be removed too. Also,
1928 remove inline_count (again, not used), and move slot so that it
1929 can share bits with some other flags. This saves 8 bytes in the
1930 structure and gives us about 50 kb back for mcs helloworld.cs
1932 * *.[ch]: Do naming changes for the above.
1934 * loader.c (mono_method_get_header): Lazily init the header
1936 (mono_get_method_from_token): don't init the header here
1937 (mono_free_method): the header may never be allocated
1939 Overall, this saves 150 kb of unmanaged allocations
1940 for mcs helloworld.cs. That accounts for 10% of the unmanaged
1943 * loader.c, loader.h (mono_method_get_header): new accessor.
1945 * *.[ch]: use the above method. Prepares us to lazily load
1948 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
1949 three warnings, which are actual bugs (see 69206).
1951 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
1952 unused. Saves a cool 4 bytes / method.
1954 2004-11-06 Ben Maurer <bmaurer@ximian.com>
1956 * metadata.c (builtin_types): Add types for System.Object here.
1957 (mono_metadata_parse_type_full): Cache MonoType*'s that are
1958 for a class or valuetype from klass->this_arg or klass->byval_arg.
1960 On mcs for a hello world, this gets us down from 21836 MonoType's
1963 (mono_metadata_free_type): Account for the above change.
1965 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
1967 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
1968 exception instead of asserting if name is null.
1969 (ves_icall_System_AppDomain_GetData): Ditto.
1971 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
1973 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
1976 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
1977 Return NULL when the domain does not have entry_assembly set.
1979 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
1980 Add a 'resource_modules' argument.
1981 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
1983 * reflection.c (mono_reflection_create_runtime_class): Move setting
1984 of wastypebuilder here, so mono_get_type_object () returns a MonoType
1987 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
1988 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
1989 Throw an ArgumentNullException if 'ptr' is null.
1991 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
1992 assemblies here. Fixes #69020.
1994 2004-11-05 Geoff Norton <gnorton@customerdna.com>
1996 * reflection.c (build_compressed_metadata): Fix the previous patch for
1997 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
2000 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
2002 * assembly.c (mono_assembly_names_equal): Allow a match if one of
2003 the cultures is false. Fixes #69090.
2005 * reflection.c (build_compressed_metadata): Fix invalid memory read
2006 detected by valgrind.
2008 * reflection.c (mono_reflection_get_type): Avoid triggering a
2009 TypeResolve multiple times for the same type. Fixes #65577.
2011 2004-11-04 Ben Maurer <bmaurer@ximian.com>
2013 * marshal.c: Avoid using ldftn to call managed functions. It is
2014 much slower than just a call.
2016 * reflection.c (mono_module_get_object): free the basename we
2017 allocate here from glib.
2019 * reflection.c (ensure_runtime_vtable): make sure to free
2020 overrides. Also, we were allocating an array of MonoMethod not an
2021 array of MonoMethod*.
2023 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
2025 * image.c (mono_image_close): free image->guid here.
2027 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
2029 * reflection.c: Fix some spec conformance issues with the PE file
2030 structures so mcs compiled apps run on the Net 2.0 beta.
2032 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
2034 * string-icalls.c (ves_icall_System_String_ctor_encoding):
2035 Implement this. Fixes #67264.
2037 * debug-helpers.h debug-helpers.c marshal.c: Move
2038 mono_find_method_by_name to debug-helpers.c.
2040 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
2042 * object.c (mono_release_type_locks): type_initialization_hash is
2045 * reflection.c object.c object-internals.h: Fix warnings.
2047 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
2048 without accessors. Fixes #61561.
2050 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
2051 application base from the root domain if not set. Fixes #65641.
2052 (mono_runtime_init): Fix warning.
2054 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2056 * appdomain.c: call mono_thread_pool_init.
2057 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
2058 of worker threads based on the number of CPUs and the environment
2059 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
2060 for non-windows (windows) systems.
2062 2004-10-27 Chris Toshok <toshok@ximian.com>
2064 * mono-debug-debugger.c (write_class): don't call mono_class_init
2065 here, as even with the check for (!klass->init_pending), we get
2066 into a situation where we're hitting cycles in class
2067 initialization. Fixes #68816.
2069 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
2071 * image.c: Avoid overwriting values in the loaded_images_hash when an
2072 assembly is loaded multiple times. Fixes #61152.
2074 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
2075 so multiple satellite assemblies for the same name can be loaded.
2078 * mono_domain_assembly_preload: Actually return the loaded assembly,
2081 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
2082 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
2084 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
2085 pending finalizers are not invoked after the appdomain has been
2086 unloaded. Fixes #67862.
2088 2004-10-22 Martin Baulig <martin@ximian.com>
2090 * mono-debug-debugger.c
2091 (mono_debugger_runtime_invoke): Don't box valuetypes.
2093 2004-10-22 Chris Toshok <toshok@ximian.com>
2095 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
2096 don't hide private methods.
2098 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
2100 * icall.c: Allows the runtime to "share" (when known) the public key
2101 token of an assembly. This avoid the need to recalculate the token
2102 (from the public key) in managed code.
2104 2004-10-21 Chris Toshok <toshok@ximian.com>
2106 * debug-helpers.c (append_class_name): argh, revert last patch.
2108 2004-10-21 Chris Toshok <toshok@ximian.com>
2110 * debug-helpers.c (append_class_name): use '+' as the delimiter,
2111 not '/', so that it matches what the debugger uses to look up
2114 2004-10-21 Martin Baulig <martin@ximian.com>
2116 * mono-debug-debugger.c (mono_debugger_throw_exception): New
2117 public method; this is called each time an exception is thrown and
2118 allows the debugger to use exception catch points.
2120 2004-10-21 Martin Baulig <martin@ximian.com>
2122 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
2123 the stack pointer and the exception object in some struct and pass
2124 that to the debugger.
2126 2004-10-21 Chris Toshok <toshok@ximian.com>
2128 * mono-debug-debugger.c (do_write_class): add instance/static
2129 event support. We don't expose "raise" or "other" yet.
2130 (event_is_static): new method.
2132 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
2134 * mono-debug-debugger.c
2135 (mono_debugger_handle_exception): Remove
2136 bogus return value for fussy compilers.
2138 2004-10-20 Martin Baulig <martin@ximian.com>
2140 * mono-debug-debugger.c
2141 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
2142 (mono_debugger_handled_exception): Likewise.
2144 2004-10-20 Martin Baulig <martin@ximian.com>
2146 * mono-debug-debugger.h (MonoDebuggerEvent): Added
2147 MONO_DEBUGGER_EVENT_EXCEPTION.
2149 * mono-debug-debugger.c (mono_debugger_handle_exception): New
2150 public function to send the debugger a notification for an
2151 exception and inform it about a catch/finally clause.
2153 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
2155 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
2156 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
2159 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
2161 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
2163 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
2164 marshalled as [In,Out]. Fixes #58325.
2166 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
2168 * reflection.c (mono_method_body_get_object): Implement some fields.
2170 2004-10-12 Martin Baulig <martin@ximian.com>
2172 * reflection.c (mono_reflection_bind_generic_parameters): Small
2173 fix, correctly retrieve our parent from a generic instance.
2175 2004-10-12 Martin Baulig <martin@ximian.com>
2177 * metadata.c (mono_metadata_generic_param_equal): We always have
2181 (mono_class_from_generic_parameter): We need to have an owner.
2182 (my_mono_class_from_generic_parameter): Likewise.
2184 * reflection.c (mono_reflection_setup_generic_class): Renamed to
2185 mono_reflection_create_generic_class() and added a new
2186 mono_reflection_setup_generic_class().
2187 (mono_reflection_initialize_generic_param): If we're a nested
2188 generic type and inherited from the containing class, set our
2189 owner to the outer class.
2191 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
2193 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
2195 * reflection.c (mono_method_body_get_object): New function to create
2196 a MethodBody object.
2198 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
2200 2004-10-11 Martin Baulig <martin@ximian.com>
2202 * metadata.c (_mono_metadata_type_equal): Renamed to
2203 do_mono_metadata_type_equal() and made static.
2205 2004-10-11 Martin Baulig <martin@ximian.com>
2207 * appdomain.c: Bump corlib version number to 28.
2209 2004-10-10 Martin Baulig <martin@ximian.com>
2212 (MonoGenericInst): Added `MonoGenericContainer *container'.
2213 (MonoGenericMethod): Likewise.
2214 (MonoGenericContext): Likewise.
2215 (MonoGenericParam): Added `MonoGenericContainer *owner'.
2218 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
2219 (do_mono_metadata_parse_generic_inst): Likewise.
2220 (mono_metadata_parse_type_full): New public method. This is the actual
2221 mono_metadata_parse_type() implementation - with an additional
2222 `MonoGenericContainer *' argument.
2223 (mono_metadata_parse_array_full): Likewise.
2224 (mono_metadata_parse_signature_full): Likewise.
2225 (mono_metadata_parse_method_signature_full): Likewise.
2226 (mono_metadata_parse_mh_full): Likewise.
2227 (mono_type_create_from_typespec): Likewise.
2228 (mono_metadata_interfaces_from_typedef_full): New public method;
2229 this is similar to the other _full() methods, but we take a
2230 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
2231 (mono_metadata_parse_generic_param): Take an additional
2232 `MonoGenericContainer *' argument and lookup the MonoGenericParam
2233 from that container.
2234 (mono_metadata_generic_param_equal): New static method to compare
2235 two type parameters.
2236 (_mono_metadata_type_equal): New static method; takes an
2237 additional `gboolean signature_only' argument - if true, we don't
2238 compare the owners of generic parameters.
2239 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
2240 with a TRUE argument - do a signature-only comparision.
2242 * loader.c: Use the new _full() methods and pass the
2243 MonoGenericContainer to them.
2245 * object-internals.h (MonoReflectionTypeBuilder): Added
2246 `MonoGenericContainer *generic_container' field.
2247 (MonoReflectionMethodBuilder): Likewise.
2249 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
2251 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
2252 case initial images of dynamic assemblies.
2254 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
2256 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
2258 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
2259 length of event->other array.
2260 (typebuilder_setup_events): Ditto.
2262 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
2263 'assembly_by_name' and add an 'assemblies' list.
2265 * assembly.h assembly.c: Add a new search hook for determining whenever
2266 an assembly is already loaded. Use this instead of searching in the
2267 loaded_assemblies list.
2269 * domain.c appdomain.c: Implement the new search hook so loaded
2270 assemblies are now scoped by appdomain. Fixes #67727.
2272 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
2274 * threads.c (mono_thread_attach): Initialize synch_lock field so
2275 mono_thread_detach works again.
2277 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
2278 'lib' too. Fixes #63130.
2280 2004-10-06 Jackson Harper <jackson@ximian.com>
2282 * culture-info-tables.h: regenerated.
2284 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
2286 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
2287 implemented by other interfaces in the result. Fixes #65764.
2289 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
2290 Handle unloadable modules without crashing.
2292 * image.c (load_modules): Revert the previous patch since modules must
2293 have a fixed index inside the array.
2295 * image.c (load_modules): Don't include native modules in the modules
2298 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
2300 * reflection.h: Add param_defaults field.
2302 * reflection.c: Add support for parameter defaults in dynamic methods.
2305 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
2306 an empty string when a type has no namespace. Fixes #64230.
2308 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
2310 * tabledefs.h: Added "internal" security actions to support non-CAS
2311 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
2312 Note: they do not seems to be used anymore in 2.0 (new metadata format)
2314 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
2316 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
2317 constructor of abstract class. Fixes #61689.
2319 2004-10-04 Martin Baulig <martin@ximian.com>
2321 * class-internals.h (MonoGenericContainer): New type.
2322 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
2323 `MonoGenericContainer *generic_container'.
2324 (MonoClass): Replaced `gen_params' and `num_gen_params' with
2325 `MonoGenericContainer *generic_container'.
2327 * metadata.c (mono_metadata_load_generic_params): Return a
2328 `MonoGenericContainer *' instead of a `MonoGenericParam *';
2329 removed the `num' argument.
2331 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
2333 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
2336 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
2339 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
2341 * reflection.c: Save pe_kind and machine values into the generated
2344 * appdomain.c: Bump corlib version number.
2346 * object-internals.h: Reorganize layout of LocalBuilder.
2348 * class-internals.h class.c (mono_class_get_implemented_interfaces):
2349 New helper function.
2351 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
2352 created MonoType for dynamic types. Fixes #66180.
2354 2004-10-02 Ben Maurer <bmaurer@ximian.com>
2356 * threadpool.c: the ares hashtable needs a critical section around it.
2357 this prevents some nasty segfaults
2359 2004-10-02 Massimiliano Mantione <massi@ximian.com>
2361 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
2362 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
2365 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
2367 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
2369 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
2371 * image.c: Always canonicalize image file names, to avoid loading
2372 the same assembly twice when referenced using a relative path.
2374 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
2376 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
2378 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
2380 * marshal.c: Fix warnings.
2382 2004-09-29 Geoff Norton <gnorton@customerdna.com>
2384 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
2385 attempting to marshal the delegate_trampoline as the method_addr.
2386 This patch has a static hashtable of marshalled delegates so that
2387 we can map delegate_trampoline addresses back to delegates. This
2388 allows a delegate passed to managed code to be passed back into native
2391 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
2393 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
2395 * reflection.c (method_encode_code): Align method headers properly.
2398 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
2400 * marshal.c: In the runtime invoke wrapper, reset the abort
2401 exception if it is cached. This avoids the automatic rethrowal of
2402 the exception after the catch of the wrapper. Also check for pending
2403 interruptions before calling the managed method. This is done using
2404 the new method emit_thread_force_interrupt_checkpoint, since the
2405 normal checkpoint method is ignored when running the invoke wrapper.
2406 * object.c: If the abort exception is rethrown, set the abort_exc
2407 field of the thread, so it will be rethrown aftere every catch.
2408 * threadpool.c: Only run an interruption checkpoint if what has been
2409 requested is a stop of the thread (aborts will be ignored).
2410 * threads.c: By default, a thread will now never be interrumped while
2411 running the runtime invoke wrapper (this ensures that runtime_invoke
2412 will always return to the caller if an exception pointer is provided).
2413 There is a new special method mono_thread_force_interruption_checkpoint()
2414 to force an interruption checkpoint even if running a protected
2415 wrapper, which is used by the same runtime invoke wrapper to do a check
2418 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
2420 * object.c, object-internals.h: Implemented mono_release_type_locks,
2421 which releases the cctor locks held by a thread.
2422 * threads.c, threads.h: In thread_cleanup, release cctor locks held
2423 by a thread. Added mono_thread_exit() method to be used to safely stop
2426 2004-09-28 Raja R Harinath <rharinath@novell.com>
2428 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
2429 Move null check before dereference. Avoid indexing beyond the end
2430 of the 'modules' array.
2432 2004-09-28 Raja R Harinath <rharinath@novell.com>
2434 * metadata-internals.h (MonoImage): Add module_count field.
2435 * image.c (load_modules): Set image->module_count.
2436 (mono_image_load_file_for_image): Use image->module_count.
2437 * reflection.c (mono_image_load_module): Append to image->modules array
2438 of dynamic assembly.
2439 (mono_module_get_object): Fix loop to actually increment index.
2440 Use image->module_count.
2441 * assembly.c (mono_assembly_load_references): Use image->module_count.
2442 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
2445 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
2447 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
2448 Avoid assert on generic types.
2450 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
2452 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
2454 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
2456 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
2457 function to convert a MarshalSpec structure to its managed counterpart.
2459 * reflection.c: Fix warnings.
2461 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
2464 * icall.c (mono_create_icall_signature): Fix build.
2466 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
2468 * icall.c: Add MakePointType icall.
2470 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
2473 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2475 * threadpool.c: reuse allocated slots in the queue.
2477 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
2479 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
2481 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
2483 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
2486 * tabledefs.h: Add constants for pinvoke attributes BestFit and
2487 ThrowOnUnmappableChar.
2489 * icall.c (ves_icall_Type_GetPacking): New icall.
2491 2004-09-24 Martin Baulig <martin@ximian.com>
2493 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
2495 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2498 (mono_domain_set): allow setting a domain that is being unloaded.
2499 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
2502 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
2504 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
2505 the GetCustomAttributes icall.
2507 2004-09-23 Martin Baulig <martin@ximian.com>
2509 * object-internals.h (MonoReflectionGenericParam): Replaced
2510 'has_ctor_constraint', `has_reference_type' and `has_value_type'
2511 with `guint32 attrs'.
2513 2004-09-23 Martin Baulig <martin@ximian.com>
2515 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
2517 2004-09-23 Martin Baulig <martin@ximian.com>
2519 * object-internals.h (GenericParameterAttributes): New enum.
2521 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
2523 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
2525 * class.c (init_events): Fill out event->other field.
2527 * class.c: Fix warnings.
2529 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
2531 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
2533 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
2534 walk which doesn't supply the IL offset.
2536 2004-09-22 Martin Baulig <martin@ximian.com>
2538 * reflection.c (mono_reflection_setup_internal_class): If we're
2539 System.ValueType, System.Object or System.Enum, set
2540 `klass->instance_size' and create the vtable.
2541 (mono_reflection_create_internal_class): If we're an enum type,
2542 get the base class from our current corlib.
2544 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
2546 * reflection.h (MonoResolveTokenError): New type.
2548 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
2551 * icall.c: Add an 'error' argument to the ResolveToken icalls.
2553 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
2555 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
2556 Support also calling constructors, but only for already allocated objects.
2558 2004-09-17 Geoff Norton <gnorton@customerdna.com>
2560 * reflection.c (type_get_qualified_name): If the klass is null
2561 return the typename to avoid a NullRefEx.
2562 (encode_cattr_value): Get the qualified name of the boxed type,
2563 not the underlying enumtype. Fixes #62984.
2565 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
2567 * marshal.c: Fix problems with previous checkin.
2569 2004-09-21 <vargaz@freemail.hu>
2571 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
2572 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
2574 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
2576 2004-09-21 Geoff Norton <gnorton@customerdna.com>
2578 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
2579 should only return a type for pointers, arrays, and passbyref types.
2582 2004-09-21 Martin Baulig <martin@ximian.com>
2584 * domain.c (mono_debugger_check_runtime_version): New public
2587 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
2589 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
2591 * reflection.c: Added missing sort to the declarative security
2592 attributes table. MS implementation stops seeing the attributes if the
2593 token number regress in the table (as shown by ildasm and permview).
2595 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
2597 * object-internals.h (MonoReflectionModule): Add 'token' field.
2599 * reflection.c (mono_reflection_get_token): Add support for Module
2601 (mono_module_get_object): Set 'token' field.
2602 (mono_module_file_get_object): Set 'token' field.
2604 * icall.c: Add new Assembly and Module icalls.
2606 * appdomain.c: Bump corlib version.
2608 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
2610 * loader.h loader.c class.h class.c: Add helper functions for obtaining
2611 tokens of metadata objects.
2613 * reflection.h reflection.c (mono_reflection_get_token): New function
2614 to obtain the token of a metadata object.
2616 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
2618 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
2620 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
2622 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
2624 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
2626 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
2627 * object-internals.h: Added 3 MonoArray* members to MonoReflection
2628 AssemblyBuilder to access the permissions set in the class lib.
2629 * reflection.c: Added security attributes encoding step in
2630 mono_image_build_metadata.
2631 * tabledefs.h: Added new security actions defined in 2.0:
2632 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
2634 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
2636 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
2639 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
2641 * locales.c: nullify the ICU_collator member of CompareInfo when it is
2642 finalized. There where random SIGSEVs at program termination, when
2643 an object being finalized was trying to do a string comparison and
2644 the current culture was already finalized.
2646 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2648 * threads.c: call thread_cleanup before finishing the thread if we get
2651 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
2653 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
2654 assemblies from the parent. Fixes #65665.
2656 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
2658 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
2661 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
2663 * reflection.h: add prototype for mono_get_dbnull_object
2664 * reflection.c: add prototypes for get_default_param_value_blobs
2665 and mono_get_object_from_blob for fussier compilers
2667 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
2669 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
2670 false deadlock checks in class initialization.
2672 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
2674 * image.c (mono_image_addref): Fix comment.
2676 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
2679 2004-09-12 Jambunathan K <kjambunathan@novell.com>
2681 * reflection.c (mono_param_get_objects): Modified to return
2682 ParameterInfo.DefaultValue object.
2684 (get_default_param_value_blobs):
2685 (mono_get_object_from_blob):
2686 (mono_get_dbnull_object): New helper routines.
2688 * object.c (mono_get_constant_value_from_blob): New helper routine
2689 carved out from get_default_field_value ()
2691 * object-internals.h (mono_get_constant_value_from_blob): Added
2692 function declaration.
2694 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
2696 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
2697 referenced assemblies. Fixes #62135.
2699 * exception.h exception.c (mono_get_exception_file_not_found2): New
2702 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
2704 * class.h class.c: Add mono_type_get_underlying_type ().
2706 2004-09-09 Geoff Norton <gnorton@customerndna.com>
2708 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
2709 Fix GetTypes() to support dynamically created assemblies.
2711 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
2713 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
2715 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
2718 * reflection.h reflection.c loader.c: Allow dynamic construction of
2719 pinvoke methods. Fixes #65571.
2721 * reflection.c (mono_reflection_get_type): Revert previous change since
2722 it causes regressions.
2724 2004-09-08 Martin Baulig <martin@ximian.com>
2726 * class.c (class_compute_field_layout): Don't call
2727 mono_class_layout_fields() for open generic instances.
2729 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
2730 * threads.c appdomain.c: fix typo in GC macro
2732 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2734 * threads.c: don't call mono_thread_detach() in start_wrapper(),
2735 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
2737 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
2739 * image.c (mono_image_close): Applied patch from
2740 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
2741 assembly is loaded multiple times from data.
2743 * image.c (mono_image_open): Fix warning.
2745 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
2747 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
2750 * reflection.c (mono_reflection_create_runtime_class): Initialize
2751 klass->nested_classes. Fixes #61224.
2753 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
2755 * threads.c: sched_yield() on exit, to allow threads to quit.
2757 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
2759 * object.c (mono_unhandled_exception): Remove leftover debug code.
2761 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
2763 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
2765 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
2767 * marshal.c (emit_marshal_array): Really null terminate string arrays.
2769 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
2771 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
2773 * marshal.c (emit_marshal_array): Null terminate string arrays.
2775 * marshal.c (raise_auto_layout_exception): Fix warning.
2777 * reflection.c (mono_param_get_objects): Initialize the default value
2778 with DBNull.Value, not null. Fixes #62123.
2780 2004-09-01 Miguel de Icaza <miguel@ximian.com>
2782 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
2783 throw an exception with a cute explanation.
2785 2004-09-06 Dick Porter <dick@ximian.com>
2787 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
2788 Close the new process's thread handle, as we don't use it. The
2789 handle stays around forever otherwise.
2791 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
2793 * object.c (arith_overflow): Fix warning.
2795 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
2796 calling conventions in method refs. Fixes #65352.
2798 * reflection.c: Fix warnings.
2800 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
2802 * icall.c: Add a new icall for Array.Clear
2804 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
2806 * object.c: When allocating an array, we have to throw
2807 an overflow exception if any of the lengths are < 0.
2809 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
2811 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
2812 properly. Also move implementation of string array marshalling to
2813 managed code. Fixes #42316.
2815 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2817 * assembly.c: provide more information when loading an assembly fails.
2819 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2821 * filewatcher.c: don't expect the development fam package to be
2824 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
2826 * marshal.c: Make a copy of the signature cookie since it will be
2827 freed by the caller.
2829 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
2831 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
2833 * metadata.c (mono_metadata_free_marshal_spec): New function to free
2836 * marshal.c: More refactoring.
2838 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
2841 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
2843 * object.c: In mono_message_invoke, fill the output parameter array after
2844 calling the managed method (it was done before the call). This fixes
2847 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
2849 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
2852 2004-09-02 Martin Baulig <martin@ximian.com>
2854 * class.c (mono_class_instance_size): Don't allow generic type
2855 definitions or open generic instances.
2856 (mono_class_array_element_size): If we're a value type, call
2857 mono_class_instance_size() on the original class.
2859 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
2860 handle generic instances.
2862 * mono-debug-debugger.c (write_type): Handle generic instances
2865 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
2867 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
2868 the allocation request fails. Fixes #65089.
2870 * object.c (mono_runtime_free_method): Do not call mono_free_method.
2872 * object.c (mono_runtime_free_method): New function to free a dynamic
2875 * marshal.c (mono_delegate_free_ftnptr): New function to free the
2876 delegate trampoline.
2878 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
2879 with hasthis as dynamic,
2881 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
2883 * domain.c (mono_jit_info_table_remove): New function to remove an
2884 entry from the jit info table.
2886 * class-internals.h (MonoMethod): Add 'dynamic' field.
2888 * loader.c: Fix warnings.
2890 2004-09-01 Martin Baulig <martin@ximian.com>
2892 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
2893 instead of mono_debugger_lock() because the latter one is a no-op
2894 unless running in the debugger.
2896 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
2898 * class.c (class_compute_field_layout): Classes with auto-layout or
2899 reference fields are not blittable.
2901 2004-09-01 Dick Porter <dick@ximian.com>
2903 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
2904 mono_image_get_filename() to get the assembly location.
2907 * metadata.h: Fix compile warnings
2909 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
2911 * class.c (class_compute_field_layout): System.Object is blittable.
2913 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
2914 as in/out. Fixes #59909.
2916 2004-09-01 Martin Baulig <martin@ximian.com>
2918 * metadata.h (MONO_TYPE_ISREFERENCE): Call
2919 mono_metadata_generic_inst_is_valuetype() if we're a generic
2920 instance to check whether our underlying type is a reference type.
2922 2004-09-01 Martin Baulig <martin@ximian.com>
2924 * metadata.c (mono_type_size): If we're a generic instance, call
2925 mono_class_value_size() for value types.
2927 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
2929 * marshal.c: Implement more custom marshalling functionality. Fixes
2932 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
2934 * mono-debug.c, debug-mono-symfile.c: add some locking love.
2936 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
2938 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
2940 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
2942 * icall.c: Fix some warnings.
2944 * threads.c (abort_appdomain_thread): Fix unref errors.
2945 (mono_thread_current): Fix THREAD_DEBUG define.
2947 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
2949 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
2951 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
2953 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
2955 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
2958 2004-08-28 Martin Baulig <martin@ximian.com>
2961 (mono_metadata_generic_inst_is_valuetype): New public function.
2963 * metadata.h (MONO_TYPE_ISSTRUCT): Call
2964 mono_metadata_generic_inst_is_valuetype() if we're a generic
2965 instance to check whether our underlying type is a valuetype.
2967 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
2969 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
2972 2004-08-25 Martin Baulig <martin@ximian.com>
2974 * loader.c (mono_get_method_from_token): Abstract methods can also
2975 be generic and thus have type parameters.
2977 * metadata-internals.h
2978 (MonoDynamicImage): Added `GPtrArray *gen_params'.
2980 * reflection.c (mono_image_get_generic_param_info): Don't create a
2981 metadata row, just add an entry to the `gen_params' array.
2982 (build_compressed_metadata): Sort the `gen_params' array and then
2983 actually create the metadata.
2985 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2987 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
2989 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
2991 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
2993 2004-08-24 Martin Baulig <martin@ximian.com>
2995 * class.cs (mono_class_is_subclass_of): Like an interface, a
2996 generic instance also derives from System.Object.
2998 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
3000 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
3001 custom modifiers to be in any order. Fixes #61990.
3003 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
3005 * object.c: Register mono_object_new_fast icall.
3007 * object.c (mono_class_get_allocation_ftn): Return to calling
3008 mono_object_new_fast, since it seems faster to compute the object
3009 size in unmanaged code than passing it as a parameter.
3011 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
3013 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
3014 this function with Boehm as the oom handler, so we don't have to check
3015 the result of GC_malloc.
3017 * object.c: Remove checks for oom.
3019 * object.h object.c (mono_class_get_allocation_ftn): New function to
3020 return the icall which can be used to allocate an instance of a given
3023 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
3025 * class-internals.h: Add 'enabled' field.
3027 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
3029 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
3031 2004-08-18 Jambunathan K <kjambunathan@novell.com>
3032 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
3035 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
3037 * appdomain.c: use the Tls function for appdomain too,
3038 at Zoltan's request. Actually return in mono_context_get
3040 * appdomain.c, profiler.c, threads.c: use __thread
3042 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
3044 * appdomain.c threads.c: Call GC_CreateThread on windows.
3046 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
3047 multiple libraries since this don't work on windows.
3049 2004-08-18 Martin Baulig <martin@ximian.com>
3052 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
3055 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
3056 MonoMethodNormal since we also need it for abstract and interface
3060 (build_compressed_metadata): Sort the GenericParam table.
3061 (mono_image_create_token): Added `gboolean create_methodspec'
3062 argument; this is false when generating a MethodImpl token.
3063 (reflection_methodbuilder_to_mono_method): Abstract and interface
3064 methods may also have generic parameters.
3066 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
3068 * appdomain.c: thread local alloc
3070 2004-08-17 Martin Baulig <martin@ximian.com>
3072 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
3075 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
3078 * class.c (mono_type_get_full_name): New public function.
3079 (mono_type_get_name): Don't include the type arguments.
3081 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
3083 * Makefile.am: Build static versions of libmetadata and libmonoruntime
3084 for inclusion into the mono executable.
3086 2004-08-16 Martin Baulig <martin@ximian.com>
3088 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
3089 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
3091 2004-08-14 Martin Baulig <martin@ximian.com>
3093 * class.c (dup_type): Also copy the `byref' field.
3095 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
3097 * reflection.c (create_dynamic_mono_image): Revert the last change
3098 since it breaks bootstrap.
3100 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
3102 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
3104 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
3105 not free them with g_free.
3107 2004-08-11 Martin Baulig <martin@ximian.com>
3109 * reflection.c (mono_reflection_setup_internal_class): Also call
3110 mono_class_setup_mono_type() if we already have a `tb->type.type'.
3112 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
3114 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
3115 called during default (first) AppDomain creation. Keep track of
3116 Evidence when loading assemblies.
3118 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
3120 * opcodes.c, opcodes.h: reduce runtime relocations.
3122 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
3124 * culture-info.h, locales.c: fixes and chages to sue the new
3125 optimized format of the locale data.
3126 * culture-info-tables.h: regenerated.
3128 2004-08-06 Geoff Norton <gnorton@customerdna.com>
3130 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
3132 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
3134 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
3135 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
3136 * domain-internals.h: icall declaration.
3137 * icall.c: icall registration.
3138 * object-internals.h: New fields in MonoAssembly for CAS.
3140 2004-08-05 Duncan Mak <duncan@ximian.com>
3142 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
3145 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
3147 * reflection.c: fix to deal with object[] arrays in custom ctors
3150 2004-08-05 Martin Baulig <martin@ximian.com>
3152 * class.c (mono_class_array_element_size): Added support for
3153 generic instances and correctly handle "recursive" types.
3155 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
3157 * assembly.c: Fix warnings.
3159 2004-08-04 Martin Baulig <martin@ximian.com>
3162 (mono_type_get_name_recurse): Added `gboolean include_arity'
3163 argument specifying whether or not we should include the generic
3164 arity in the type name.
3165 (_mono_type_get_name): New static function.
3166 (mono_class_setup_vtable): If we're a generic instance, don't
3167 include the generic arity in the names of explicit method
3170 2004-08-03 Martin Baulig <martin@ximian.com>
3172 * class.c (mono_type_get_name_recurse): Enclose the generic type
3173 arguments in `<', '>'.
3175 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
3177 * gc.c: make GC warning messages use the trace API, they are just
3178 noise to most of the users.
3180 2004-08-03 Martin Baulig <martin@ximian.com>
3182 * debug-mono-symfile.c (read_string): Correctly read the string.
3184 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
3186 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
3188 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
3190 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
3192 2004-07-30 Martin Baulig <martin@ximian.com>
3194 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
3195 Reflect latest symbol writer changes.
3197 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
3199 * object.c: always create an object if null is passed
3200 to Invoke() where a valuetype is expected.
3202 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
3204 * marshal.c (mono_marshal_init): make managed
3205 signatures match native ones better for 64bits.
3207 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3209 * appdomain.c: hack to build correctly the private bin path on windows.
3212 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
3214 * assembly.c: Load mscorlib from the correct framework directory
3215 (mono/<version>/mscorlib.dll).
3216 * appdomain.h: Added prototypes for new functions.
3217 * internals.h: Added some prototypes.
3218 * domain.c: When initializing the runtime, get from the executable and
3219 the configuration files the runtime version that the app supports.
3220 Added support methods for reading app.exe.config. Added list of versions
3221 supported by the JIT. Added two new methods: mono_init_from_assembly,
3222 which initializes the runtime and determines the required version from
3223 the provided exe file, and mono_init_version, which initializes
3224 the runtime using the provided version.
3225 * icall.c: Get machine.config from version-specific directory.
3226 * reflection.c: When generating an image, embed the version number
3227 of the current runtime.
3229 2004-07-28 Dick Porter <dick@ximian.com>
3232 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
3233 returned sockaddr size before creating the remote address object.
3234 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
3237 2004-07-28 Dick Porter <dick@ximian.com>
3239 * locales.c (string_invariant_compare_char): Fix invariant char
3240 compares between upper and lower cases. Fixes bug 61458.
3242 2004-07-27 Ben Maurer <bmaurer@ximain.com>
3244 * marshal.c: actually cache stelem.ref wrappers.
3246 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
3248 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
3249 sections and remove the mono_cli_rva_map () function.
3251 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
3253 * debug-mono-symfile.c: fix one more endianess issue, from a patch
3254 by Geoff Norton (<gnorton@customerdna.com>).
3256 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
3258 * class.c: fix class loads for pointer types (typeof(int) !=
3261 2004-07-27 Martin Baulig <martin@ximian.com>
3263 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
3264 reading the debugging information from an external ".mdb" file.
3266 2004-07-24 Martin Baulig <martin@ximian.com>
3268 * reflection.c (mono_image_get_type_info): Only write a class
3269 layout entry if we actually have a size or a packing size.
3271 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
3273 * reflection.c (type_get_fully_qualified_name):
3274 insert cast to get type checking of ?: with non-gcc compilers
3276 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
3278 * rand.c: use g_getenv for both lookups of
3281 2004-07-17 Martin Baulig <martin@ximian.com>
3283 * reflection.c (mono_reflection_bind_generic_method_parameters):
3284 Set `gmethod->reflection_info'.
3286 2004-07-17 Martin Baulig <martin@ximian.com>
3288 * class.c (mono_class_create_from_typedef): Insert the newly
3289 created class into the hash table before computing the interfaces
3290 since we could be called recursively.
3292 2004-07-16 Ben Maurer <bmaurer@ximain.com>
3294 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
3295 function to implement stelem.ref in managed code
3296 * class-internals.h, debug-helpers.c: a new wrapper type
3299 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
3301 * gc.c: allow GC handles to work even when no GC is compiled in.
3302 Fix part of bug #61134 (GetAddrOfPinnedObject).
3304 2004-07-13 Peter Williams <peter@newton.cx>
3306 * process.c (complete_path): Make sure we don't attempt to execute
3309 2004-07-12 Geoff Norton <gnorton@customerdna.com>
3311 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
3312 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
3313 and will add/subtract the hour if needed
3315 2004-07-12 Martin Baulig <martin@ximian.com>
3317 * reflection.c (mono_field_get_object): If we have
3318 `field->generic_info', take the attributes from
3319 `field->generic_info->generic_type'.
3321 2004-07-12 Martin Baulig <martin@ximian.com>
3323 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
3324 This function must be called before initializing the runtime.
3325 (mono_debug_init_1): New function; call this after initializing
3326 the runtime, but before loading the assembly. It tells the
3327 debugger to load corlib and the builtin types.
3329 * mono-debug-debugger.c: Did some larger changes in the debugging
3330 code; support recursive class declarations, make sure we actually
3333 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3335 * debug-helpers.c: undo my previous patch and fixed the real issue in
3336 ../mini/exceptions-x86.c
3338 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3340 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
3341 when no HOME env. variable was set and a NullRef was thrown in a .cctor
3342 called from other .cctors.
3344 2004-07-09 Miguel de Icaza <miguel@ximian.com>
3346 * loader.c: Removed the mono_loader_wine_init hack now that we are
3347 doing a managed version of Windows.Forms.
3349 2004-07-09 Ben Maurer <bmaurer@ximian.com>
3351 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
3352 threadpool.c, threads.c: remove static data from rootset.
3354 2004-07-09 Dick Porter <dick@ximian.com>
3356 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
3357 Don't do any more processing if the matched length was 0. It was
3358 increasing the size of the string before. Fixes bug 61167.
3360 2004-07-09 Dick Porter <dick@ximian.com>
3364 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
3365 Add support for SO_PEERCRED if its available.
3367 2004-07-09 Peter Bartok <pbartok@novell.com>
3368 * loader.c: winelib.exe.so error message is now only displayed if
3369 MONO_DEBUG is set. To help us avoid questions when people are trying
3370 out the new Managed.Windows.Forms.
3372 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
3374 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
3375 for isinst and castclass wrappers.
3377 * class-internals.h icall.c: Move registration and lookup of JIT icalls
3378 to libmetadata from the JIT, so they could be used by the marshalling
3379 code and the interpreter.
3381 * marshal.c: Register marshalling related JIT icalls here instead of
3382 in mini.c. Use CEE_MONO_ICALL instead of the family of
3383 CEE_MONO_PROC<x> opcodes to call marshalling functions.
3385 * metadata.h: Remove unneeded marshalling conversions.
3387 * opcodes.c: Update for new opcodes.
3389 2004-07-08 Martin Baulig <martin@ximian.com>
3391 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
3392 (mono_debug_get_domain_data): Make this function static.
3394 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
3396 * gc.c, object.h: add nice GC handle API for embedders.
3398 2004-07-06 Ben Maurer <bmaurer@ximian.com>
3400 * reflection.c: more changes for the new api
3402 * object.c: When we reflect on a field w/ a constant value, it
3403 will not have a memory location, so we must access metadata. Also,
3404 allow easier reading of strings so that we can read them from
3407 * class.c (mono_class_layout_fields): no need for literal fields here.
3409 * class-internals.h: api changes for const fields
3411 * icall.c (ves_icall_get_enum_info): use new apis for const fields
3413 2004-07-06 Martin Baulig <martin@ximian.com>
3415 * mono-debug.h: Increment version number to 44.
3417 * mono-debug.c (mono_debug_add_wrapper): The second argument is
3418 now a gpointer, rewrote this whole method.
3420 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
3421 function. Add information about the wrapper in a new "misc table".
3423 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
3424 for the new misc table.
3426 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
3428 * metadata-internals.h image.c: Add a cache for helper signatures.
3430 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
3432 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
3434 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
3435 delegates from a delegate. Fixes #61033.
3437 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
3438 marshalling of stringbuilder arrays. Fixes #59900.
3440 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
3442 * icall.c: Add EnumBuilder:setup_enum_type icall.
3444 2004-06-30 Ben Maurer <bmaurer@ximian.com>
3446 * icall.c: Added a new icall for the property version of
3449 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
3451 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
3452 it has a constant size across platforms.
3454 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
3457 2004-06-29 Martin Baulig <martin@ximian.com>
3459 * mono-debug.c (mono_debug_add_method): Protect the whole function
3460 in mono_debugger_lock(), not just parts of it.
3462 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
3464 * reflection.c: make sure padding bytes in heaps are zeroed.
3466 2004-06-24 David Waite <mass@akuma.org>
3468 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
3469 image.c, loader.c, locales.c, marshal.c, metadata.c,
3470 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
3471 string-icalls.c, threads.c: change to C90-style comments from C99 /
3474 2004-06-24 Dick Porter <dick@ximian.com>
3477 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
3478 return createdNew. Fixes bug 60412.
3481 * icall.c: Add createdNew parameter to CreateMutex icall
3483 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
3485 * reflection.c, object-internals.h: save default value in params.
3487 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3489 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
3490 no need to build a new path combining that with the application base.
3493 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
3495 * reflection.c: fixed minor standard compliance issues.
3497 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
3499 * reflection.c: fixed issue with encoding some custom attributes
3500 (arrays in properties and fields, bug #60411).
3502 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3504 * reflection.c: fix start address when copying the public key token.
3506 2004-06-23 Martin Baulig <martin@ximian.com>
3508 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
3509 the `exc' object in a static object to put it into the GC's root set.
3511 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
3513 * reflection.c: make mono_reflection_setup_internal_class ()
3514 callable a second time to setup a new parent class.
3516 2004-06-23 Dick Porter <dick@ximian.com>
3518 * threads.c: Check for WAIT_IO_COMPLETION return values.
3520 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
3522 * appdomain.c: Removed the g_free on the public key token. Now copy
3523 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
3524 * assembly.c: Added public key token string value when loading
3525 assemblies. Fix bug #60439.
3526 * icall.c: Added missing informations (like public key) in
3527 GetReferencedAssemblies. Fix #60519.
3528 * image.h: Changed definition for public key token from const char*
3529 public_tok_value to guchar public_key_token [17];
3530 * reflection.c: Updated for changes to public key token.
3532 2004-06-22 Lluis Sanchez Gual
3534 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
3535 for the field in base classes.
3537 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
3539 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
3540 mark headers as not supported, they are installed only for use by the
3543 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
3545 * *.c, *.h: avoid namespace pollution in public headers.
3547 2004-06-21 Martin Baulig <martin@ximian.com>
3549 * exception.c (mono_get_exception_security): It's in
3550 "System.Security", not in "System".
3552 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
3553 the exception classes.
3555 2004-06-21 Martin Baulig <martin@ximian.com>
3557 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
3558 Protect the exception object from being finalized.
3560 2004-06-21 Martin Baulig <martin@ximian.com>
3562 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
3565 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
3567 * reflection.c: Load the assembly in mono_reflection_type_from_name,
3568 if it was not loaded before. Fix parts of #60439.
3570 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
3572 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
3573 code that was broken since Ben's change: wrappers are now
3574 dependent on the method signature only again.
3576 2004-06-21 Martin Baulig <martin@ximian.com>
3578 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
3579 added interface support.
3581 2004-06-21 Martin Baulig <martin@ximian.com>
3583 * class.c (mono_vtable_get_static_field_data): New public method.
3585 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
3587 * filewatcher.c : Windows build fix to be compliant with API changes.
3589 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
3591 * class.h, class.c: more accessors.
3592 * metadata.h, metadata.c: prepare for hiding MonoType and
3593 MonoMethodSignature: people should use the accessors from now on
3594 outside of the tree.
3596 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
3598 * *.c, *.h: more API cleanups.
3600 2004-06-18 Jackson Harper <jackson@ximian.com>
3602 * assembly.c: Trace loading assemblies.
3603 * loader.c: Trace loading native libraries.
3604 * mono-config.c: Trace loading config files.
3606 2004-06-18 Dick Porter <dick@ximian.com>
3608 * locales.c: Tell ICU the lengths of strings, it can cope with
3609 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
3611 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
3613 * image.c: swapped name/filename;
3615 2004-06-18 Martin Baulig <martin@ximian.com>
3617 * mono-debug-debugger.c (write_class): Write the parent class at
3618 the end of the header.
3620 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
3622 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
3624 2004-06-17 Raja R Harinath <rharinath@novell.com>
3626 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
3627 (bundle_obj): New conditional define.
3628 (BUILT_SOURCES): Remove.
3629 ($(bundle_srcs)): Make parallel-make safe.
3630 (libmonoruntime_la_LIBADD): Make unconditional.
3631 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
3632 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
3634 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
3636 * culture-info-tables.h: It was inconsistent with the latest
3639 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
3641 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
3644 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
3647 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
3649 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
3650 cleaned up public header threads.h.
3652 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
3654 * Makefile.am, *.c, *.h: more API cleanups.
3656 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
3658 * Makefile.am: removed monosn from compilation.
3659 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
3660 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
3661 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
3662 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
3663 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
3664 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
3666 2004-06-15 Jackson Harper <jackson@ximian.com>
3668 * assembly.c: Make locales lower case when searching the GAC for
3669 assemblies. gacutil will always make locales lowercase when
3670 installing so this effectively makes them case insensitive.
3672 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
3674 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
3675 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
3676 parameter which allows to choose whether the wait can be interrupted or
3677 not. Also added the method mono_monitor_enter(), which locks the monitor
3678 using an infinite wait and without allowing interruption.
3679 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
3681 * object.h: Added new fields in MonoThread. suspend_event holds the event
3682 used to susped/resume the thread. synch_lock is the lock object to use for
3683 modifying the thread state.
3684 * threads.c: Use the new synch_lock object for locking, instead of "this",
3685 which can generate deadlocks.
3686 Moved thread state change in Thread.Sleep and Thread.Join from managed
3687 to unmanaged code. This avoids a deadlock when the thread was suspended
3688 just after acquiring the thread lock.
3689 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
3690 Implemented Thread.Suspend using an event instead of ThreadSuspend,
3691 which is not fully implemented in the io-layer.
3692 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
3694 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
3696 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
3697 threads-types.h: more API cleanups.
3699 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
3701 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
3702 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
3703 threadpool.c, threads.c: first pass at the exported API cleanup.
3705 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
3707 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
3709 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3711 * icall.c: added internalGetHome.
3713 2004-06-14 Dick Porter <dick@ximian.com>
3715 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
3716 possible to return successfully when '.' or '..' were the only
3717 entries in a directory, but were skipped. The MonoIOStat was not
3718 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
3721 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
3723 * reflection.c: make binaries run on .Net 1.1 by default.
3725 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
3727 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
3729 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
3731 * marshal.c: keep track of struct size with explicit layout
3734 2004-06-12 Martin Baulig <martin@ximian.com>
3736 * mono-debug-debugger.c: Comment out a debugging g_message().
3738 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
3740 * reflection.c, reflection.h: do not free custom attrs that are cached.
3741 * icall.c: use braces to make code clearer.
3743 2004-06-11 Martin Baulig <martin@ximian.com>
3745 * class.h (MonoInflatedField): New type.
3746 (MonoClassField): Replaced `MonoType *generic_type' with
3747 `MonoInflatedField *generic_info'.
3750 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
3752 2004-06-11 Martin Baulig <martin@ximian.com>
3754 * reflection.c (mono_image_create_method_token): Correctly encode
3757 2004-06-11 Martin Baulig <martin@ximian.com>
3759 * metadata.c (mono_metadata_parse_method_signature): When parsing
3760 a MethodDef which has VarArgs, also set sentinelpos if we don't
3761 have any parameters.
3763 2004-06-11 Martin Baulig <martin@ximian.com>
3765 * verify.c (mono_method_verify): In CEE_CALL, use
3766 mono_method_get_signature() to get the method's signature, unless
3767 we're a PInvoke method.
3769 2004-06-10 Jackson Harper <jackson@ximian.com>
3771 * assembly.c: Use <path>/lib/mono/gac for the extra paths
3772 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
3773 logical name as the supplied path is just a prefix to the gac not
3774 the direct path to it.
3776 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
3778 * reflection.c: make the token for a created method match
3779 the token of the MethodBuilder it was created from
3780 (IKVM requires this behaviour now).
3782 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
3784 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
3785 reflection.c, socket-io.c: leak fixes.
3787 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
3789 * icall.c: handle sentinel pos in vararg methods in position different
3792 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3794 * culture-info-tables.h: freshly generated.
3796 2004-06-09 Martin Baulig <martin@ximian.com>
3798 * loader.c (mono_get_method_constrained): Call `mono_class_init
3799 (constrained_class)'.
3801 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
3803 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
3804 any methods. Fixes #59629.
3806 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
3808 * culture-info-tables.h: reflecting locale-builder updates.
3810 2004-06-08 Dick Porter <dick@ximian.com>
3813 * locales.c: Fixed compile warnings, including a real bug in
3814 CompareInfo_internal_compare.
3816 2004-06-08 Dick Porter <dick@ximian.com>
3819 (ves_icall_System_Globalization_CompareInfo_internal_index):
3820 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
3821 Double-check the resuls of usearches, because ICU currently
3822 ignores most of the collator settings here. Fixes bug 59720.
3824 2004-06-08 Dick Porter <dick@ximian.com>
3827 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
3828 Fix memory leak and segfault-causing typo. No idea how this one
3829 lasted so long without being noticed.
3831 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
3833 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
3834 any methods. Fixes #59629.
3836 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3839 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
3840 own the critical section before). Removed dead code (that's done
3841 in the preload hook).
3843 (mono_assembly_load_with_partial_name): call the preload hook.
3845 2004-06-08 Martin Baulig <martin@ximian.com>
3847 * metadata.c (mono_metadata_signature_alloc): Default
3848 `sentinelpos' to -1.
3850 * reflection.c (mono_image_get_array_token): Likewise.
3852 2004-06-08 Martin Baulig <martin@ximian.com>
3854 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
3856 * metadata.c (mono_metadata_parse_method_signature): When parsing
3857 a MethodDef which has VarArgs, set sentinelpos.
3859 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
3860 `gint16' since we're using -1 for non-varargs methods.
3863 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
3864 (method_encode_signature): Added varargs support.
3865 (method_builder_encode_signature): Likewise.
3866 (mono_image_get_varargs_method_token): New static method.
3867 (mono_image_create_method_token): New public method; this is
3868 called via an icall instead of mono_image_create_token() when
3869 calling a varargs method.
3871 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
3873 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
3875 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
3877 * culture-info-tables.h : Reflecting the latest locale-builder that
3878 fixed empty array representation ({} to {0}).
3880 2004-06-07 Jackson Harper <jackson@ximian.com>
3882 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
3883 looking up extra gac paths. This allows MONO_GAC_PATH to act
3884 exactly like a prefix.
3886 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
3888 * reflection.c (mono_reflection_type_from_name): Make a copy of the
3889 type name before modifying it. Fixes #59405.
3891 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
3893 * culture-info.h: added fields for "all datetime patterns".
3894 * locales.c: ( ves_icall_System_Globalization_CultureInfo
3895 _construct_datetime_format ()): fill xxx_patterns fields.
3896 * object.h: added fields for "all datetime patterns" to
3897 MonoDateTimeFormatInfo.
3898 * culture-info-tables.h: reflecting locale-builder updates.
3900 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
3902 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
3903 the event has no add and remove methods. Fixes #59629.
3905 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
3907 * object.c: Fixed possible integer overflow when allocating large
3910 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
3912 * culture-info-tables.h: reflecting locale-builder updates.
3914 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
3916 * culture-info-tables.h: reflecting locale-builder updates.
3918 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
3920 * culture-info-tables.h: reflecting locale-builder updates.
3922 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
3924 * threads.c: Made Thread.Sleep abortable.
3926 2004-06-02 Martin Baulig <martin@ximian.com>
3928 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
3930 * debug-mono-symfile.h: Bumped symbol file version number to 37.
3932 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
3934 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
3936 2004-05-30 Jackson Harper <jackson@ximian.com>
3938 * reflection.c: Do not hardcode assembly versions or public key
3939 tokens anymore. All of this except the corlib section was dead
3942 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
3944 * object.c (mono_runtime_invoke_array): Automatically create boxed
3945 objects for byref valuetypes if needed. Fixes #59300.
3947 * object.c (mono_method_return_message_restore): Handle
3948 MONO_TYPE_OBJECT as well.
3950 2004-05-28 Jackson Harper <jackson@ximian.com>
3952 * reflection.c: The modified type encoding was causing build
3953 problems. Reverted for now.
3955 2004-05-28 Jackson Harper <jackson@ximian.com>
3957 * reflection.c/h: Take an assembly ref so that we dont create
3958 fully qualified names when encoding types in the same assembly as
3959 the custom attribute being emitted.
3960 * appdomain.c: Increment version number.
3962 2004-05-26 Duncan Mak <duncan@ximian.com>
3965 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
3966 Set the full version number (major, minor, build, revision).
3968 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
3970 * marshal.c (emit_struct_conv): increment src/dst after blit
3971 (mono_marshal_get_managed_wrapper,
3972 mono_marshal_get_native_wrapper): make sure we have marshalling
3973 info before marshalling params (info computation affects
3976 * class.c (class_compute_field_layout): correctly deal with
3978 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
3979 value types (as per what windows dows by default)
3980 (mono_class_setup_mono_type): System.ValueType is blittable
3981 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
3984 * marshal.c (mono_marshal_load_type_info): flag types as
3985 non-blittable if the native layout doesn't match the managed
3988 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3990 * appdomain.c: don't add stuff in the private search path that is
3991 above the application base. If application base is not set, there's
3992 no private search path.
3994 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
3996 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
3997 byref struct arguments in native->managed marshalling.
3999 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
4001 * marshal.c (mono_marshal_get_runtime_invoke): correctly
4002 cache methods using signature (special case for methods
4003 that are value type or string class)
4005 * image.c (mono_image_close): clean up allocated GSList's
4006 in runtime_invoke_cache.
4008 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4010 * mono-config.c: set the correct path for mono_cfg_dir on windows when
4011 there's no MONO_CFG_DIR environment variable defined.
4013 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4015 * threads.c: windows version must be >= 0x0500 to include OpenThread.
4017 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
4019 * threadpool.c: Really wait for 500ms after the async call, even if the wait
4021 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
4022 before waiting for it, and call CloseHandle after the wait to unref it.
4023 This will make sure that handles are not disposed too early.
4025 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4030 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
4033 * object.c: se the application_base only for the domain that runs
4034 Main. Fixes bug #59216,
4036 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4039 * object.c: only the domain in which Main is run have
4040 SetupInformation.ConfigurationFile set, so moved a few lines from
4041 appdomain.c to object.c.
4043 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4045 * appdomain.c: we tried to load [name].(dll|exe), but according
4046 to bug #57710, we must also try [culture]/[name].(dll|exe) and
4047 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
4048 There's a test case attached to bug #58922.
4050 2004-05-27 Dick Porter <dick@ximian.com>
4053 * file-io.c: Implemented icalls for locking and unlocking regions
4055 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
4056 FALSE on error (fixes both compiler warning and real bug.)
4058 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
4060 * culture-info-tables.h: reflecting locale-builder updates.
4062 (Added missing ChangeLog entry for 05/26)
4064 2004-05-27 Jackson Harper <jackson@ximian.com>
4066 * locales.c: Fix some cut and paste errors.
4068 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4070 * mono-config.c: set the correct path for config. directory on windows.
4072 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
4074 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
4077 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
4079 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
4080 from pinvoke functions.
4082 * marshal.c (mono_ftnptr_to_delegate): Implement this.
4084 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
4086 * culture-info-tables.h: reflecting locale-builder updates.
4088 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
4090 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
4093 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
4095 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
4096 * icall.c: Modified icalls for RNG.
4097 * rand.c|h: Changed RNG interface to allow thread-safe usage under
4098 Windows (CryptoAPI).
4100 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
4102 * locales.c: Fix build.
4104 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
4106 * culture-info-tables.h: reflecting locale-builder updates.
4108 2004-05-25 Jackson Harper <jackson@ximian.com>
4110 * locales.c: When creating the current culture use the $LANGs
4111 specific culture. So DateTimeFormat and NumberFormat entries are created.
4113 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
4115 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
4116 a char array as parameter.
4118 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
4120 * image.c: In mono_image_open(), always use an absolute path name to
4121 look for already loaded images.
4123 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
4125 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
4126 missing in the windows build (like older cygwin include files).
4128 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
4130 * icall.c: Fixed check for possible integer overflow in Buffer_
4131 BlockCopy icall. Replaced comments style // by /* */.
4133 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
4135 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
4137 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
4138 check after MONO_VTADDR. Fixes pinvoke2.exe.
4140 * marshal.h marshal.c metadata.h: Add beginnings of support for
4141 ftnptr -> delegate marshalling.
4143 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
4145 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
4146 * threads.c: Fix warnings.
4148 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
4150 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
4151 * icall.c: Registered icalls for Suspend and Resume.
4152 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
4154 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
4155 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
4156 * process.c: Use WaitForSingleObjectEx.
4157 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
4159 * threads.c, threads.h: Make use of new Ex wait methods. Improved
4160 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
4161 for Suspend and Resume. Added new mono_thread_stop, used for stoping
4162 background threads. Added basic support for Abort in Windows.
4163 Start new threads using a managed delegate invoke wrapper. This wrapper
4164 has an interruption checkpoint that is needed since an interruption
4165 can be requested before the thread leaves the unmanaged code that starts
4167 * marshal.c: Added interruption checkpoint after every native call, and
4168 also before managed calls for wrappers called from unmanaged code to
4169 go into managed code.
4170 * object.h: Added new field in MonoThread to keep track of interruption
4173 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
4175 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
4178 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4185 * rand.c: getenv -> g_getenv (windows!)
4187 * process.c: complete_path is also used on non-windows platforms.
4189 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4191 * icall.c: new signature for Process_Start.
4193 * process.[ch]: new signature for Process_Start. If we're on windows
4194 and UseShellExecute is false, we have to search for the program by
4195 ourselves if we don't get a full path.
4197 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
4199 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
4200 marshalling and call CleanUpNativeData if needed. Fixes #58646.
4202 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4204 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
4207 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4209 * process.c: use double quotes to quote program name and arguments on
4210 windows. Fixes bug #58575.
4212 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4214 * file-io.c: don't return "." and ".." when using windows Find*File.
4216 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
4218 * marshal.c: Don't pass wrappers to message init because method
4219 addressed used to lookup metadata. part of remoting[2|3] fix.
4221 2004-05-15 Jackson Harper <jackson@ximian.com>
4223 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
4224 path is essentially the same as MONO_PATH except that it points to
4225 GACs instead of lib directories.
4226 * loader.h: The user gac is gone so we dont need function to
4228 * mono-config.c: user gac option is now gone.
4230 2004-05-15 Jackson Harper <jackson@ximian.com>
4232 * culture-info.h: Make defines more consistent, add calendar data
4233 to the culture info table.
4234 * culture-info-tables.h: Add basic calendar data. Basically
4235 everyone gets default gregorian until all the data is
4237 * locales.c: Use the new consistent defines. Set calendar data for
4238 culture info objects.
4239 * object.h: add a field for calendar data to CultureInfo
4241 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
4243 * image.c: image->runtime_invoke_cache is keyed on signatures now.
4244 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
4246 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
4247 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
4248 an extra param that is the pointer of the method to invoke. The IL for
4249 the invoke method is no longer specific to the method, but to the
4250 signature of the method. Thus, we can share the same code for multiple
4251 methods. This reduces the number of methods that have to be compiled.
4253 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
4255 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
4257 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4259 * icall.c: Optimize Buffer.BlockCopy.
4261 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4263 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
4264 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
4265 quote). Changed them to "MMMM yyyy".
4267 2004-05-12 Miguel de Icaza <miguel@ximian.com>
4270 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
4272 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
4274 * reflection.h: Updated after changes to managed structures.
4276 * appdomain.c: Bump corlib version.
4278 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4280 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
4283 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4285 * Makefile.am: link to ../os/libmonoos.la on windows.
4288 -If MONO_DEBUG, warn about non-existing directories in
4290 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
4291 compile time variable.
4292 -Removed init_default_path and call mono_set_rootdir from
4293 libmonoos.a instead (windows only).
4295 * assembly.h: declare mono_assembly_getrootdir().
4298 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
4300 * loader.c: s/getenv/g_getenv/
4302 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
4304 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
4306 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
4308 * metadata.h: Add new marshalling conversions.
4310 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
4313 * reflection.c (mono_reflection_get_type): Lookup the type in all
4314 modules of a multi-module assembly. Fixes #58291.
4316 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
4318 * threads.c: Before aborting a background, set the StopRequested
4319 state. This avoids throwing the Abort exception.
4320 In mono_thread_manage, don't continue with the shutdown until all
4321 aborted threads have actually stopped.
4323 2004-05-10 Jackson Harper <jackson@ximian.com>
4325 * locales.c: Remove the modifier from culture names.
4327 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4329 * Makefile.am: monosn is not installed any more. It has been deprecated
4332 2004-05-07 Jackson Harper <jackson@ximian.com>
4335 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
4336 Fix array construction, add bailout if the length is 0.
4338 2004-05-07 Dick Porter <dick@ximian.com>
4340 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
4341 machine doesn't have a DNS entry. Patch by Urs Muff
4342 (umuff@quark.com), fixes bug 57928.
4344 2004-05-06 Jackson Harper <jackson@ximian.com>
4346 * reflection.c: Handle null PublicTokens properly. alloc mem for
4347 assembly names culture so we dont crash when freeing it.
4349 2004-05-06 Jackson Harper <jackson@ximian.com>
4351 * assembly.c: Check the usergac when loading with partial names.
4353 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
4355 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
4356 does nothing for now (not required for Linux/Windows) but the class
4357 library can call it (and a newer or modified runtime could need it).
4358 * icall.c: Registred icall.
4360 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4362 * loader.c: prints a message on module loading error we set MONO_DEBUG
4363 environment variable.
4365 2004-05-05 Jackson Harper <jackson@ximian.com>
4367 * appdomain.c: Handle PublicKeyToken=null properly.
4369 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
4371 * environment.c|h: Added icall ves_icall_System_Environment_
4372 GetOSVersionString to get the current OS version as a string.
4373 * icall.c: Registred icall.
4375 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
4377 * object.c: in mono_object_get_virtual_method(), take into account that
4378 non-virtual methods don't have a slot in the vtable. Check needed when
4379 the object is a proxy.
4381 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
4383 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
4384 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
4386 * object.c (mono_class_compute_gc_descriptor): Fix warning.
4388 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
4389 passed when a valuetype is expected.
4391 * object.c (mono_unhandled_exception): Only set the exit code if the
4392 exception happens in the main thread. Fixes thread5.exe.
4394 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
4395 invalid names. Fixes #58047.
4397 2004-05-03 Jackson Harper <jackson@ximian.com>
4399 * assembly.c: This line was committed accidently and is unneeded.
4401 2004-05-03 Jackson Harper <jackson@ximian.com>
4403 * icall.c: Add new icall for Assembly::LoadWithPartialName
4404 * assembly.c/.h: new function that probes the GAC to load partial
4405 assembly names by Paolo Molaro.
4407 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4409 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
4410 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
4411 (type_get_fully_qualified_name): Added PublicKeyToken when building a
4414 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4416 * appdomain.c: fixed check for 'neutral' culture and removed warning.
4417 * reflection.c: fix bug when parsing a full type name and Version is not
4418 the last thing in the string.
4420 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
4422 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
4423 crashes when it is freed.
4425 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4427 * assembly.c: print the compat warning to stderr.
4429 2004-05-01 Miguel de Icaza <miguel@ximian.com>
4431 * assembly.c (mono_assembly_load_references): Add a compatibility
4432 hack to run old applications that might be still referencing the
4433 3300-based assemblies, only do this for System.xxx.
4435 2004-05-01 Jackson Harper <jackson@ximian.com>
4437 * appdomain.c: If the culture is neutral we set it to "".
4439 2004-04-29 Jackson Harper <jackson@ximian.com>
4441 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
4443 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
4445 * string-icalls.c: added low overhead function for copying chars
4446 * icall.c: added needed icall for the above function
4448 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4450 * icall.c: fix return value of get_global_assembly_cache. Implemented
4451 Environment.GetLogicalDrives.
4453 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
4455 * rand.c: try and talk to egd or prngd
4456 for random bytes if opening devices fail.
4458 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
4460 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
4461 alignment for the type using the native alignment of its members
4462 instead of using klass->min_align.
4464 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
4466 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4469 * socket-io.c: added check for sys/aio.h.
4471 2004-04-28 Dick Porter <dick@ximian.com>
4473 * threads.c: Don't abort a thread thats already aborting, when
4474 terminating everything.
4476 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4478 * icall.c: added 2 new async calls for Socket.
4480 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
4483 * threadpool.c: removed unused variable.
4485 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
4487 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
4489 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
4491 * locales.c: put back string_invariant_tolower () and
4492 string_invariant_toupper ().
4494 2004-04-26 David Waite <mass@akuma.org>
4499 * unicode.h: remove comma from end of enumeration declarations
4501 2004-04-26 David Waite <mass@akuma.org>
4503 * debug-mono-symfile.h:
4506 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
4509 2004-04-26 Jackson Harper <jackson@ximian.com>
4511 * appdomain.c: Increment version number.
4513 2004-04-26 Jackson Harper <jackson@ximian.com>
4515 * appdomain.c: Set assembly references public token value when
4516 PublicKeyToken is specified, not the hash_value. Free public token
4517 values when free assembly name data. Previously the public key
4518 token was hex decoded, however we are using hex encoded public key
4519 tokens, so this is not neccasary.
4520 * assembly.c: Lookup assemblies in the gac if their public token
4521 value is set. Add function to allow enabling user gac
4522 lookups. Specify whether or not the assembly was loaded from the
4523 GAC. Compare full assembly names when checking the cache for
4524 assemblies (Temporarily disabled see comment in code). Remove
4525 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
4526 specifies trace-loader they get extra info to stdout on the
4527 loading of assemblies.
4528 * image.h: Add a field for an assembly references public token
4529 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
4530 whether an assembly has been loaded from the GAC.
4531 * image.c: Remove a corlib -> mscorlib name mapping.
4532 * loader.h: Add function to enable/disable the user gac.
4533 * mono-config.c: Check if the usergac is enabled in the config
4535 * icall.c: New icall to determine whether or not an assembly has
4536 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
4537 * tabldefs.h: Add constant for assemblyref flag that specifies a
4538 full public key is used instead of a public token.
4539 * reflection.c: Remove mscorlib -> corlib mappings. Set
4540 PublicTokenValue instead of hash value. This value is a hex
4541 string so it does not need to be expanded.
4543 2004-04-26 Martin Baulig <martin@ximian.com>
4545 * mono-debug-debugger.c (mono_debugger_initialize): Set
4546 `mono_debugger_initialized' before calling mono_debug_lock().
4548 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
4550 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
4551 InternalToUpper/InternalToLower.
4552 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
4553 removed invariant culture shortcut. This is now done in managed code.
4554 * locales.c: (string_invariant_toupper/tolower) removed.
4556 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4558 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
4559 Added Poll internal call.
4561 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
4562 call for Poll. Select was too heavy for polling a single socket.
4564 * threadpool.[ch]: added mono_threadpool_cleanup.
4565 * threads.c: use it. Don't use Thread_Abort on windows.
4567 2004-04-23 Martin Baulig <martin@ximian.com>
4569 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
4571 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
4573 * icall.c: Registred new icalls for key pair protection and added an
4574 icall for Environment.GetFolderPath on Windows.
4575 * security.c|h: Added new icalls for key pair protection.
4577 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4579 * socket-io.c: don't display the non-supported family warning for known
4580 families. Now this is not displayed on windows when checking support
4583 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4585 * class.c: don't display the layout warning for static fields.
4587 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
4589 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
4590 * locales.c, locales.h: Added new icalls for culture-specific
4591 Char.ToLower and Char.ToUpper.
4593 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4595 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
4598 2004-04-20 Martin Baulig <martin@ximian.com>
4600 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
4601 of the type name before passing it to mono_reflection_type_from_name().
4603 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
4605 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
4606 encodings here. Fixes #56965.
4608 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
4610 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
4611 fix test on strstr result not that I can see anything that
4612 relies on the result.
4614 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
4616 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
4619 * marshal.c (mono_marshal_get_string_encoding): New helper function.
4621 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
4622 function to determine which marshalling to use for strings. Fixes
4625 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
4627 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
4629 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
4631 * icall.c: #include mono-config.h
4633 2004-04-15 Jackson Harper <jackson@ximian.com>
4635 * culture-info-tables.h: Fix date formats for en-US culture.
4637 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
4639 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
4640 ThreadPool.SetMinThreads.
4641 * threadpool.c: Implemented ThreadPool.GetMinThreads and
4642 ThreadPool.SetMinThreads.
4644 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
4646 * mono-config.c: also load the .config file in the directory
4647 where the assembly was found.
4649 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
4651 * assembly.c: load per-assembly config files.
4652 * icall.c: decrapified code to get the config dir and moved to
4654 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
4655 per-assembly config files. When doing a dll map lookup give precedence
4656 to the per-assembly data.
4658 2004-04-14 Martin Baulig <martin@ximian.com>
4660 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
4661 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
4662 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
4664 * mono-debugger-debugger.c: While the debugger is locked, remember
4665 whether the symbol tables have changes and send one single
4666 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
4668 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
4670 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
4672 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
4675 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
4676 account when marshalling string arrays. Fixes #56965.
4678 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
4680 * icall.c: Add new icalls mapping for security.
4681 * security.c|h: Add internal calls for WindowsIdentity,
4682 WindowsImpersonationContext and WindowsPrincipal.
4684 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
4686 * class.c: Added comment to ensure the System.MonoDummy class
4687 is removed when no longer necessary
4689 2004-04-13 Miguel de Icaza <miguel@ximian.com>
4691 * appdomain.c: Pass arguments to the bootstraping exceptions to
4692 minimize JITed methods at boot
4694 * metadata.c (mono_exception_from_name_two_strings): Allow for the
4695 second string to be null.
4697 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
4698 Change the protocol to minimize the JIT methods at startup. Now
4699 it Returns the internal codepage, if the value of "int_code_page"
4700 is 1 at entry, and we can not compute a suitable code page
4701 number, returns the code page as a string.
4703 2004-04-13 Jackson Harper <jackson@ximian.com>
4705 * culture-info-tables.h: Fix number of decimal digits for all
4708 2004-04-13 Jackson Harper <jackson@ximian.com>
4710 * icall.c: Clairfy out of sync error message. It is not always
4711 your corlib that is out of sync.
4713 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
4715 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
4716 properties when only the set accessor is overriden. Fixes #55874.
4718 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
4720 * assembly.c (mono_assembly_load_references): Make this thread safe.
4723 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
4725 * monosn.c: Add missing initialization calls.
4727 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
4730 ves_icall_System_Globalization_CultureInfo_construct_number_format
4731 Fix g_assert so it compiles on fussier compilers re int/ptr
4734 2004-04-08 Dick Porter <dick@ximian.com>
4737 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
4738 53992. Also rearrange the code so that the internal calls return
4739 an error value and exceptions are thrown from managed code.
4741 * icall.c: Add type info to the socket icalls.
4743 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4745 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
4748 2004-04-07 Martin Baulig <martin@ximian.com>
4750 * class.c (mono_class_from_generic_parameter): Don't default
4751 `klass->parent' to `mono_defaults.object_type'.
4753 2004-04-07 Martin Baulig <martin@ximian.com>
4755 * reflection.c (mono_reflection_initialize_generic_parameter): Set
4756 `param->pklass->reflection_info'.
4758 2004-04-07 Jackson Harper <jackson@ximian.com>
4760 * culture-info-tables.h: Fix date separator symbol.
4762 2004-04-07 Martin Baulig <martin@ximian.com>
4764 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
4765 from System.Type to System.MonoType.
4767 2004-04-07 Martin Baulig <martin@ximian.com>
4770 (MonoReflectionGenericParam): Added `has_reference_type' and
4771 `has_value_type' fields.
4773 * reflection.c (mono_image_get_generic_param_info): Encode the
4774 correct flags if we have the `class' or `struct' constraint.
4776 2004-04-07 Martin Baulig <martin@ximian.com>
4779 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
4781 2004-04-07 Jackson Harper <jackson@ximian.com>
4783 * appdomain.c: Revert extra patches, just wanted to bump the
4786 2004-04-07 Jackson Harper <jackson@ximian.com>
4788 * Makefile.am: Add culture-info private headers.
4789 * icall.c: Add new icalls for contructing locales.
4790 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
4791 * locales.h: Declare new culture info construction methods.
4792 * object.h: Add new fields used to avoid the CultureMap to
4794 * culture-info.h: Definition of structs used in the culture info
4796 * culture-info-tables.h: Autogenerated tables that contain culture
4797 info data. This file was generated with the locale-builder tool.
4798 * appdomain.c: Incement corlib version number.
4800 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
4802 * appdomain.c: (mono_runtime_init) move mono_thread_init
4803 to before mono_object_new calls so critical sections
4804 are initialized before use.
4806 2004-04-07 Martin Baulig <martin@ximian.com>
4809 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
4810 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
4811 (ves_icall_MonoGenericParam_initialize): Removed.
4812 (monogenericparam_icalls): Removed.
4813 (generictypeparambuilder_icalls): Added new table for
4814 System.Reflection.Emit.GenericTypeParameterBuilder.
4817 (mono_reflection_define_generic_parameter): Removed.
4818 (mono_reflection_initialize_generic_parameter): This is now called
4819 from GenericTypeParameterBuilder's .ctor.
4821 2004-04-06 Martin Baulig <martin@ximian.com>
4823 * class.c (mono_class_init): Don't inflate nested classes in a
4825 (mono_type_get_name_recurse): Include the generic arguments for
4826 generic instances and generic type declarations.
4827 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
4828 (_mono_class_get_instantiation_name): Removed.
4829 (mono_class_create_generic): Always use `gklass->name' as our name.
4831 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
4833 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
4834 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
4835 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
4836 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
4837 closed generic methods here.
4840 (mono_reflection_generic_inst_get_nested_types): Removed.
4841 (inflate_mono_method): Copy the generic parameters from the
4842 MonoMethodHeader into out MonoGenericMethod.
4844 2004-04-06 Martin Baulig <martin@ximian.com>
4847 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
4849 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
4851 * reflection.c (build_compressed_metadata): If we have any entries
4852 in the GenericParam, MethodSpec or GenericParamConstraint tables,
4853 set the header version to 1.1.
4855 2004-04-06 Martin Baulig <martin@ximian.com>
4857 * class.c (mono_class_init): If we're a generic instance,
4858 initialize our nested classes, too.
4859 (_mono_class_get_instantiation_name): Deal with the new `!%d'
4862 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4864 * process.c: quote the argument passed to the shell on windows.
4866 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
4868 * threads.c (mono_alloc_special_static_data): Allow this to be
4869 called during startup.
4871 2004-04-02 Martin Baulig <martin@ximian.com>
4874 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
4876 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
4878 * icall.c: Fix build.
4880 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
4882 * Makefile.am: Added security.c|h.
4883 * icall.c: Added icall for get_UserName;
4884 * security.c: New file for security related icalls. Added function
4885 get_UserName for System.Environment (fix #56144).
4886 * security.h: New. Header file for security.c
4888 2004-04-02 Dick Porter <dick@ximian.com>
4890 * icall.c: Deleted the icalls that were obsoleted some time ago
4891 by the ICU string code, and which were mixed into the icall
4892 rearranging. Fixes bug 55969.
4895 * string-icalls.c: Deleted the code that those icalls reference.
4897 2004-04-01 Martin Baulig <martin@ximian.com>
4899 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
4901 * class.c (mono_class_from_generic_parameter): Don't set
4902 TYPE_ATTRIBUTE_INTERFACE.
4903 (my_mono_class_from_generic_parameter): Likewise.
4905 2004-04-01 Martin Baulig <martin@ximian.com>
4907 * loader.c (find_method): Added an optional `MonoClass *ic'
4908 argument to search in a specific interface.
4909 (mono_get_method_constrained): New public function.
4911 2004-04-01 Martin Baulig <martin@ximian.com>
4913 * reflection.c (mono_image_get_generic_field_token): Use the
4914 `handleref' cache here.
4916 2004-04-01 Martin Baulig <martin@ximian.com>
4918 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
4920 * reflection.c (create_generic_typespec): Use the `typespec' hash
4921 here, not the `typeref' one.
4923 2004-04-01 Martin Baulig <martin@ximian.com>
4925 * class.c (mono_class_inflate_generic_type): Moved the
4926 functionality into a new static inflate_generic_type() which
4927 returns NULL if it didn't do anything. Only increment the
4928 `mono_stats.inflated_type_count' if we actually inflated
4930 (mono_class_get_full): Check the classes type to see whether we
4931 need to inflate it; also inflate MONO_TYPE_(M)VAR.
4933 2004-04-01 Jackson Harper <jackson@ximian.com>
4935 * reflection.c: Set culture for assembly references.
4937 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
4939 * reflection.[ch], icall.[ch], Fix support for pinning variables.
4941 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4944 (do_mono_assembly_open): the critical section also covers
4945 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
4947 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4950 (mono_manage_threads): abort the background threads when finishing.
4953 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4955 * gc.c: only close the done_event handle if there was no timeout.
4958 2004-03-30 Martin Baulig <martin@ximian.com>
4960 * icall.c (icall_entries): It's called "System.Activator", not
4961 "System.Activation".
4963 2004-03-30 Martin Baulig <martin@ximian.com>
4965 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
4966 (mono_class_create_from_typespec): Likewise.
4968 2004-03-30 Martin Baulig <martin@ximian.com>
4970 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
4971 `has_ctor_constraint' and `initialized'.
4973 2004-03-30 Martin Baulig <martin@ximian.com>
4975 * reflection.c (encode_new_constraint): New static function to add
4976 the constructor constraint attribute to a type parameter.
4977 (encode_constraints): Call encode_new_constraint() if necessary.
4980 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
4982 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
4984 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
4986 * reflection.c, icall.c: add support for pinning variables.
4988 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
4990 * marshal.c (mono_marshal_get_managed_wrapper):
4991 init bool local with zero rather than null.
4993 2004-03-29 Martin Baulig <martin@ximian.com>
4995 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
4996 the "official" behavior here.
4997 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
4999 2004-03-29 Martin Baulig <martin@ximian.com>
5001 * icall.c: Reflect latest API changes.
5003 2004-03-29 Martin Baulig <martin@ximian.com>
5005 * loader.c (mono_get_method_from_token): Also call
5006 mono_metadata_load_generic_params () for abstract and interface
5007 methods; replace the type arguments in the method signature with
5008 the ones which are loaded from the metadata.
5010 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
5012 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
5013 of the lock is not the current thread. MS.NET don't do it, in spite of
5014 what the documentation says. See bug #56157.
5016 2004-03-28 Martin Baulig <martin@ximian.com>
5018 * class.c (mono_class_init): Don't call init_properties() and
5019 init_events() for generic instances; set `prop->parent' when
5020 inflating properties.
5022 * reflection.c (mono_generic_inst_get_object): Call
5023 `mono_class_init (ginst->klass)'.
5024 (mono_type_get_object): Only create a MonoGenericInst if your
5025 generic type is a TypeBuilder.
5026 (do_mono_reflection_bind_generic_parameters): Only set
5027 `ginst->is_dynamic' if our generic type is a TypeBuilder.
5029 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
5031 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
5034 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5036 * icall.c: added Kill_internal icall.
5037 * process.[ch]: added Kill_internal icall.
5039 2004-03-25 Martin Baulig <martin@ximian.com>
5041 * class.h (MonoStats): Added `generic_instance_count',
5042 `inflated_method_count', `inflated_type_count' and
5043 `generics_metadata_size'.
5045 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5047 * reflection.c: no warnings now.
5049 2004-03-25 Martin Baulig <martin@ximian.com>
5051 * class.c (mono_class_get_full): New public function; does a
5052 mono_class_get(), but also takes a `MonoGenericContext *'.
5054 * loader.c (mono_field_from_memberref): Renamed to
5055 `field_from_memberref', made static and added `MonoGenericContext *'
5057 (mono_field_from_token): Added `MonoGenericInst *' argument.
5058 (method_from_memberef): Likewise.
5059 (mono_get_method_from_token): Likewise.
5060 (mono_get_method_full): New public function; does a
5061 mono_get_method(), but also takes a `MonoGenericContext *'.
5063 * verify.c (mono_method_verify): Get the method's generic context
5064 and pass it to mono_field_from_token(), mono_get_method_full() and
5065 mono_class_get_full().
5067 2004-03-25 Martin Baulig <martin@ximian.com>
5069 * class.c (mono_class_inflate_generic_type): Take a
5070 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
5071 `MonoGenericMethod *'.
5073 2004-03-25 Martin Baulig <martin@ximian.com>
5075 * loader.h (MonoMethodInflated): Store the MonoGenericContext
5076 instead of the MonoGenericMethod here.
5078 2004-03-25 Martin Baulig <martin@ximian.com>
5080 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
5081 each time we create a new MonoGenericInst, we also create a new
5082 context which points back to us.
5084 * class.c (inflate_method): Use `ginst->context' instead of
5085 creating a new context.
5087 * loader.c (method_from_memberref): Use
5088 `klass->generic_inst->context' instead of creating a new context.
5090 2004-03-25 Martin Baulig <martin@ximian.com>
5092 * class.h (MonoGenericContext): New struct.
5093 (MonoGenericMethod): Removed `generic_inst'.
5095 * class.c (mono_class_inflate_generic_method): Take a
5096 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
5098 2004-03-25 Martin Baulig <martin@ximian.com>
5100 * loader.h (MonoMethodInflated): New typedef.
5102 * metadata.h (MonoMethodSignature): Removed `gen_method', make
5103 `generic_param_count' consume just 30 bits, added `is_inflated'
5104 and `has_type_parameters' flags (one bit each).
5106 * class.c (mono_class_inflate_generic_method): Create a
5107 MonoMethodInflated instead of a MonoMethodNormal and set
5108 `is_inflated' in the method signature.
5110 * class.h (MonoGenericMethod): Removed `generic_method'.
5112 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
5114 * image.c: Make sure the name of a MonoImage is always an absolute path.
5115 This fixes bug #54415.
5117 2004-03-24 Martin Baulig <martin@ximian.com>
5119 * class.c (mono_class_setup_vtable): If we're a generic instance,
5120 use our generic type's vtable size.
5122 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
5124 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
5125 MONO_NO_UNLOAD env var as a temporary workaround for unloading
5128 2004-03-23 Martin Baulig <martin@ximian.com>
5130 * class.h (MonoDynamicGenericInst): Added `int count_events' and
5131 `MonoEvent *events'.
5133 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
5134 (typebuilder_icalls): Added "get_event_info"; calls
5135 mono_reflection_event_builder_get_event_info().
5137 * reflection.c (mono_reflection_generic_inst_initialize): Added
5138 `MonoArray *events'.
5139 (mono_reflection_event_builder_get_event_info): New function.
5141 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
5143 * object.h: add mono_type_initialization_init
5145 * object.c (mono_runtime_class_init):
5146 implement class constructor synchronization rules
5147 to cope with threading issues.
5148 add mono_type_initialization_init
5150 * appdomain.c (mono_runtime_init): call
5151 mono_type_initialization_init
5153 * class.h: removing initializing field from MonoVTable
5155 2004-03-23 Martin Baulig <martin@ximian.com>
5157 * class.c (my_mono_class_from_generic_parameter): Use
5158 `param->name' if it's not NULL.
5160 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
5162 * class.c: do not insert non-virtual methods in the vtable.
5163 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
5164 that means the method is non-virtual. This never would have
5167 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
5169 * profiler.c: Added lock for accessing coverage_hash.
5171 2004-03-22 Martin Baulig <martin@ximian.com>
5173 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
5174 `method->method->signature->generic_param_count != 0' to make it
5175 work for interface methods.
5177 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5179 * process.c: quote the string passed to the shell using g_shell_quote.
5181 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5184 (mono_threads_manage): don't remove the finalizer thread and self
5185 from the threads hash table so that mono_thread_manage can be called
5188 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5190 * process.c: quote the arguments when UseShellExecute is true. Fixes
5193 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5195 * threads.c: set mono_thread_detach as a cleanup routine for every
5196 thread. This way it's always executed upon thread termination, either
5197 aborted or finished normally. No more xsp hangs!
5199 2004-03-17 Martin Baulig <martin@ximian.com>
5201 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
5202 `int count_nested' and a `MonoType **nested'.
5204 * reflection.c (mono_reflection_bind_generic_parameters): Moved
5205 most of the functionality into a new static
5206 do_mono_reflection_bind_generic_parameters() and don't take a
5207 `MonoType *nested_in' argument any more. Don't compute nested
5209 (mono_reflection_generic_inst_get_nested_types): New public method
5210 to get nested types.
5212 * class.c (mono_class_create_generic): Set `klass->nested_in' if
5213 we're a nested class.
5215 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
5216 mono_reflection_generic_inst_get_nested_types() to compute the
5219 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
5221 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
5222 descriptive error message under windows.
5224 2004-03-17 Martin Baulig <martin@ximian.com>
5226 * class.c (dup_type): Added `const MonoType *original' argument;
5227 copy the attrs from the original type.
5229 2004-03-17 Martin Baulig <martin@ximian.com>
5231 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
5232 `m->generic_inst_cache' here.
5234 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
5236 * exception.h exception.c: Add stack_overflow_exception.
5238 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5241 (overlapped_callback): call SetEvent *after* invoking the callback.
5242 No need to call CloseHandle.
5244 2004-03-16 Martin Baulig <martin@ximian.com>
5246 * reflection.c (mono_image_get_fieldref_token): Take a
5247 `MonoReflectionField *' instead of a `MonoClassField *' and a
5248 `MonoClass *'; store the `MonoReflectionField *' in the hash.
5250 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5252 * appdomain.c: don't add the culture to the filename we're looking for
5253 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
5255 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5257 * locales.c: don't ignore symbols when doing case insensitive compares.
5258 Thanks Dick! Fixes bug #54046.
5260 * threads.c: surround 'threads' usage with enter/leave in
5263 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
5265 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
5266 implicitly marshalled as [Out]. Fixes #55450.
5268 (mono_marshal_get_runtime_invoke): Zero out the result if there is
5271 2004-03-16 Martin Baulig <martin@ximian.com>
5273 * class.c (mono_class_from_generic_parameter): Use the actual
5276 2004-03-16 Martin Baulig <martin@ximian.com>
5278 * reflection.c (type_get_signature_size): New static function.
5279 Compues the size of the type in a method signature.
5280 (method_get_signature_size): New static function; calls
5281 type_get_signature_size() to compute the actual size of the
5283 (method_encode_signature): Use method_get_signature_size() to get
5284 the signature's size rather than using `nparams * 10'.
5286 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5288 * file-io.h: define here WapiOverlapped on windows. I don't want the
5289 regular OVERLAPPED one.
5292 * threadpool.c: somehow, BindIoCompletionCallback is not found.
5293 Disabling AIO on windows.
5295 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5297 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
5300 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5302 * appdomain.c: upgraded corlib version.
5304 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
5305 and BeginWrite. Allow opening files for asynchrnous operations.
5307 * file-io.h: new struct that maps FileStreamAsyncResult.
5308 * icall.c: added new icalls.
5309 * process.[ch]: support setting child process environment variables
5310 and use the SHELL or COMSPEC when UseShellExecute is true.
5312 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
5313 callback for async. IO is here and also BindHandle.
5315 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
5318 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
5320 * reflection.c (create_custom_attr): Allow len == 0.
5322 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
5323 computation on big-endian machines.
5325 2004-03-13 Martin Baulig <martin@ximian.com>
5327 * class.h (MonoGenericInst): Added `int count_ifaces'.
5329 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
5330 `ginst->count_ifaces' instead `klass->interface_count' since we
5331 may get called before the vtable is created.
5333 * loader.c (mono_method_get_param_names): If we're a generic
5334 instance, return and don't initialize the class.
5336 * reflection.c (mono_reflection_setup_generic_class): Don't call
5337 ensure_runtime_vtable().
5338 (mono_reflection_bind_generic_parameters): Set
5339 `ginst->count_ifaces'.
5341 2004-03-11 Jackson Harper <jackson@ximian.com>
5345 * unicode.h: Remove unused System.Char icalls.
5347 2004-03-11 Miguel de Icaza <miguel@ximian.com>
5349 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
5350 code when we P/Invoke the first library in Windows.Forms, instead
5351 of when we first open the assembly.
5353 * assembly.c: Drop the lookup from here.
5355 2004-03-10 Martin Baulig <martin@ximian.com>
5357 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
5358 class for properties, fields and events. Finally fixes #54945.
5360 2004-03-10 Martin Baulig <martin@ximian.com>
5362 * metadata.c (mono_metadata_class_equal): New static function;
5363 checks whether two generic instances or two generic parameters are
5365 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
5368 2004-03-10 Martin Baulig <martin@ximian.com>
5370 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
5372 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
5373 argument and write it into the `reflection_info' field.
5376 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
5377 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
5379 2004-03-09 Jackson Harper <jackson@ximian.com>
5381 * char-conversions.h: use 8 bits for numeric data its all we need
5382 * icall.c: numeric data is only 8 bits now.
5384 2004-03-09 Martin Baulig <martin@ximian.com>
5386 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
5388 * class.c (init_properties, init_events): Initialize the new
5391 * reflection.c (typebuilder_setup_properties): Likewise.
5392 (typebuilder_setup_events): Likewise.
5394 * reflection.h (MonoEventInfo): Replaced `parent with
5395 `declaring_type' and `reflected_type'.
5397 * icall.c (ves_icall_get_property_info): Distinguish between
5398 declaring and reflected type.
5399 (ves_icall_get_event_info): Likewise.
5401 2004-03-09 Martin Baulig <martin@ximian.com>
5403 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
5404 (ves_icall_Type_GetField): Correctly set field->klass.
5406 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
5408 * loader.h: Fix warning.
5410 2004-03-08 Miguel de Icaza <miguel@ximian.com>
5412 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
5413 library routine if present. Notice that it will still continue
5414 executing even if its missing, for those working on the Gtk#
5415 edition of Windows.Forms.
5417 * assembly.c (do_mono_assembly_open): If loading the
5418 System.Windows.Forms call mono_loader_wini_init.
5420 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
5422 * class.h: Added MonoRemoteClass struct.
5423 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
5424 function for MonoStrings.
5425 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
5426 Added internal call for getting the proxy type.
5427 * marshal.c: Get the type of transparent proxies from its remote_class.
5428 Added methods that generate the IL for type checks and casts:
5429 mono_marshal_get_isinst, mono_marshal_get_castclass,
5430 mono_marshal_get_proxy_cancast.
5431 * marshal.h: Declaration of the previous new methods.
5432 * object.c: Added new moethods for creating and updating MonoRemoteClass
5433 instances: mono_remote_class, mono_upgrade_remote_class,
5434 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
5435 * verify.c: FIx transparent_proxy_fields layout.
5436 * appdomain.c: Bump corlib version.
5438 2004-03-04 Jackson Harper <jackson@ximian.com>
5440 * icall.c: Add icall to access char conversion tables.
5441 * char-conversions.h: Character conversion tables.
5442 * Makefile.am: Add char-conversions.h private header file.
5444 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
5446 * appdomain.c (unload_thread_main): Increase unloading timeout to
5447 10 sec as a temporary workaround for Nant problems.
5449 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
5451 * gc.c: Add checks for GC_enable and GC_disable.
5453 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
5454 (jaak@zd.com.pl). Fix memory corruption in String.Replace
5457 2004-02-27 Martin Baulig <martin@ximian.com>
5459 * reflection.c (mono_reflection_bind_generic_parameters): Take a
5460 `MonoReflectionType *' instead of a `MonoType *'.
5462 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
5464 * gc.c (run_finalize): Avoid finalizing the object representing the
5466 (finalizer_thread): Fix warning.
5468 2004-02-25 Martin Baulig <martin@ximian.com>
5470 * class.c (_mono_class_get_instantiation_name): Added `int offset'
5471 argument for nested types.
5472 (mono_class_create_generic): Added support for nested generictypes.
5474 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
5477 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
5479 * reflection.c (method_encode_signature): Increase the minimum
5480 value of `size' from 10 to 11.
5481 (mono_reflection_bind_generic_parameters): Take `int type_argc'
5482 and `MonoType **types' arguments instead of the `MonoArray
5483 *types'; added `MonoType *nested_in'. Recursively instantiate
5486 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
5488 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
5489 stack_overflow_ex members which are used by exception handling.
5491 * appdomain.c (mono_runtime_init): Initialize the new members.
5493 * gc.c (mono_gc_enable): New helper function.
5494 * gc.c (mono_gc_disable): New helper function.
5496 2004-02-23 Martin Baulig <martin@ximian.com>
5498 * icall.c: I must have been really stupid - make it actually work
5501 2004-02-23 Martin Baulig <martin@ximian.com>
5503 * loader.c (method_from_memberref): Only inflate the method if
5504 it's in another klass.
5506 2004-02-23 Martin Baulig <martin@ximian.com>
5508 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
5509 (mono_class_init): If we're a generic instance and an interface,
5510 compute `class->interface_id'; also create `class->interfaces'
5511 here and inflate them.
5513 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
5515 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
5517 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
5519 2004-02-15 Miguel de Icaza <miguel@ximian.com>
5521 * reflection.c (method_encode_code): Improved the error message
5522 generated by the exception.
5524 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5526 * icall.c: Martin did not do what he said in the ChangeLog for
5527 2004-02-18, but put back the changes for properties and events.
5528 Commenting those changes out again and adding comment to bug #54518.
5530 * process.c: removed warning.
5532 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
5534 * marshal.c (emit_struct_conv): Print an error message instead of
5535 asserting when a type does not have the StructLayout attribute.
5537 2004-02-20 Martin Baulig <martin@ximian.com>
5539 * reflection.c (mono_type_get_object): Also use the cache for
5541 (mono_reflection_bind_generic_parameters): Always compute
5544 2004-02-20 Martin Baulig <martin@ximian.com>
5546 * class.h (MonoGenericMethod): Removed `klass'.
5548 * class.c (mono_class_inflate_generic_method): Added `MonoClass
5551 2004-02-20 Martin Baulig <martin@ximian.com>
5553 * reflection.c (method_encode_methodspec): Actually use the
5554 uninflated signature for the memberref.
5556 2004-02-20 Martin Baulig <martin@ximian.com>
5558 * class.h (MonoGenericMethod): Removed `declaring'.
5560 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
5561 is NULL, compute it here.
5563 2004-02-20 Martin Baulig <martin@ximian.com>
5565 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
5567 * metadata.c (mono_metadata_generic_inst_hash): New method.
5568 (mono_metadata_generic_inst_equal): New method.
5570 * reflection.c (mono_reflection_bind_generic_parameters): Use the
5571 `klass->image->generic_inst_cache' cache to avoid creating
5572 duplicate MonoGenericInst's.
5574 * class.c (mono_class_inflate_generic_type): Use the cache.
5576 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
5578 * object.c: fixed gc descriptor calculation for embedded valuetypes.
5580 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5582 * icall.c: added Socket.WSAIoctl icall.
5584 * socket-io.[ch]: implemented
5585 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
5587 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
5589 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
5591 2004-02-18 Urs C Muff <umuff@quark.com>
5593 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
5594 this work on PPC and other big-endian architectures.
5596 * debug-mono-symfile.h: Prepended the names of all the `guint32'
5597 fields with an underscore to make sure they're only accessed by
5600 2004-02-18 Martin Baulig <martin@ximian.com>
5602 * icall.c: Put the klass->refclass changes back for methods and
5603 fields, but not for properties and events. We're currently not
5604 distinguishing between DeclaringType and ReflectedType for
5605 properties and events, that's what caused the regressions.
5607 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5610 (mono_async_result_new): the handle can be NULL.
5612 * threadpool.c: Use an event instead of a semaphore, don't initialize
5613 it until needed. This saves quite a few semaphores from being created
5614 when using the threadpool.
5616 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
5618 * object.c (mono_string_is_interned_lookup): Fix interning of long
5619 strings. Fixes #54473.
5621 * domain.c (ldstr_equal): Optimize if the two strings are equal.
5623 * icall.c: Revert the klass->refclass changes since they introduce
5624 regressions (bug #54518).
5626 2004-02-18 Martin Baulig <martin@ximian.com>
5628 * class.c (mono_class_init): If we're a generic instance and don't
5629 come from a TypeBuilder, inflate our members here.
5630 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
5631 (mono_class_create_generic): New public method.
5632 (mono_class_initialize_generic): Removed.
5633 (get_instantiation_name): Renamed to
5634 _mono_class_get_instantiation_name() and made it public.
5636 2004-02-18 Martin Baulig <martin@ximian.com>
5638 * class.c (mono_class_inflate_generic_type): Clear the new
5639 instance's `nginst->klass' when inflating a generic instance.
5640 (mono_class_is_subclass_of): Added (basic) support for generic
5643 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
5645 * appdomain.h, domain.c: use a MonoCodeManager instead of a
5646 MonoMempool to hold compiled native code.
5648 2004-02-17 Martin Baulig <martin@ximian.com>
5650 * class.h (MonoDynamicGenericInst): Added `count_properties' and
5653 * reflection.c (mono_reflection_generic_inst_initialize): Added
5654 `MonoArray *properties' argument.
5656 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
5658 2004-02-17 Martin Baulig <martin@ximian.com>
5660 * icall.c (ves_icall_Type_GetFields): Renamed to
5661 ves_icall_Type_GetFields_internal() and added a
5662 `MonoReflectionType *rtype' argument; pass it to
5663 mono_field_get_object() to set the field's "reflected" type.
5664 (ves_icall_Type_GetConstructors): Likewise.
5665 (ves_icall_Type_GetEvents): Likewise.
5666 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
5667 argument; pass it to mono_method_get_object() to set the method's
5670 2004-02-17 Martin Baulig <martin@ximian.com>
5672 * class.h (MonoDynamicGenericInst): New type.
5673 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
5675 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
5676 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
5677 (ves_icall_MonoGenericInst_GetFields): New interncall.
5679 * class.c (mono_class_from_generic): Don't call
5680 mono_class_initialize_generic() if this is a dynamic instance;
5681 ie. it's being created from a TypeBuilder.
5682 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
5683 `class->byval_arg.type'.
5685 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
5686 to `inflate_method' and made static.
5687 (mono_reflection_inflate_field): Removed.
5688 (mono_reflection_generic_inst_initialize): New public method.
5690 * reflection.h (MonoReflectionGenericInst): Removed `methods',
5691 `ctors' and `fields'; added `initialized'.
5693 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
5695 * debug-helpers.c (mono_method_full_name): Fix output for empty
5698 2004-02-12 Martin Baulig <martin@ximian.com>
5700 * class.h (MonoClassField): Added `MonoType *generic_type'.
5702 * reflection.c (mono_image_get_fieldref_token): Added support for
5703 instantiated generic types.
5704 (field_encode_inflated_field): Removed.
5705 (mono_image_get_inflated_field_token): Removed.
5706 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
5708 * reflection.h (MonoReflectionInflatedField): Removed.
5710 2004-02-12 Martin Baulig <martin@ximian.com>
5712 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
5713 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
5715 * reflection.c (mono_image_get_methodspec_token): Take a
5716 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
5717 (mono_image_create_token): Check whether we have a
5718 `method->signature->gen_method' and call
5719 mono_image_get_methodspec_token() if appropriate.
5720 (inflated_method_get_object): Removed.
5721 (mono_reflection_bind_generic_method_parameters): Return a
5722 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
5723 (mono_reflection_inflate_method_or_ctor): Likewise.
5725 * reflection.h (MonoReflectionInflatedMethod): Removed.
5727 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
5729 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
5730 for custom valuetype marshalling.
5732 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
5734 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5736 * icall.c: fixed WSAGetLastError_internal name.
5738 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
5740 * threads.c (mono_thread_attach): Allow this to be called multiple
5743 * threads.c (build_wait_tids): Do not wait for ourselves.
5745 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
5746 appdomain list is empty.
5748 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
5749 memory returned by mono_string_builder_to_utf16, since it points into
5750 managed memory. Thanks to Bernie Solomon for noticing this.
5752 * icall.c: Add AppDomainSetup icalls.
5754 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
5756 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
5759 * reflection.c (reflection_methodbuilder_to_mono_method): Save
5760 custom attributes to the method_aux struct. Also fix array indexes etc.
5762 * loader.c (mono_method_get_param_names): Make dynamic case work again.
5764 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
5766 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
5767 (both static and runtime) and reduce startup time.
5769 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
5771 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
5772 AsAny marshalling conversion instead of crashing.
5774 * marshal.c: Fix warnings.
5776 2004-02-09 Martin Baulig <martin@ximian.com>
5778 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
5780 * reflection.h (MonoReflectionInflatedMethod): Removed the
5781 `declaring' field, it's now in the unmanaged MonoGenericMethod.
5783 * reflection.c (method_encode_methodspec): Removed the `method'
5784 argument; we get it from `gmethod->declaring'.
5785 (inflated_method_get_object): Removed the `declaring' argument.
5787 2004-02-09 Martin Baulig <martin@ximian.com>
5789 * class.h (MonoGenericMethod): New type.
5790 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
5793 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
5794 a `MonoGenericMethod *gen_method' one.
5796 * class.c (mono_class_inflate_generic_type): Take an additional
5797 `MonoGenericMethod * argument. This is only non-NULL if we're
5798 inflating types for a generic method.
5799 (mono_class_inflate_generic_signature): Renamed to
5800 inflate_generic_signature() and made static; take a
5801 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
5802 (inflate_generic_header): Take a `MonoGenericMethod *' argument
5803 instead of a `MonoGenericInst *' one.
5804 (mono_class_inflate_generic_method): Likewise.
5806 * reflection.c (encode_generic_method_sig): Take a
5807 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
5808 (method_encode_methodspec): Likewise.
5809 (inflated_method_get_object): Likewise.
5811 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
5812 field with a `MonoGenericMethod *gmethod' one.
5814 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
5816 * class.h (mono_class_has_parent): add parens to expansion
5819 2004-02-08 Martin Baulig <martin@ximian.com>
5821 * image.h (MonoImage): Removed `generics_cache'.
5823 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
5824 instead of a `MonoType *' argument; removed the `inflate_methods'
5825 argument. Don't inflate methods here.
5827 * loader.c (find_method): If it's a generic instance, call
5828 mono_class_init() on the `sclass->generic_inst->generic_type'.
5830 * metadata.c (mono_type_size): Make this work on uninitialized
5831 generic instances; call it on the `ginst->generic_type's class.
5833 * reflection.c (mono_reflection_bind_generic_parameters): Call
5834 mono_class_from_generic() to create the `ginst->klass'.
5836 2004-02-08 Martin Baulig <martin@ximian.com>
5838 * class.h (MonoClass): Changed type of `generic_inst' from
5839 `MonoType *' to `MonoGenericInst *'.
5841 2004-02-08 Martin Baulig <martin@ximian.com>
5843 * icall.c (ves_icall_Type_BindGenericParameters): Just call
5844 mono_type_get_object(), this is now creating a `MonoGenericInst'
5845 for MONO_TYPE_GENERICINST.
5846 (ves_icall_MonoGenericInst_GetParentType): Likewise.
5847 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
5849 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
5850 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
5851 (inflated_method_get_object): Added `MonoClass *refclass' argument.
5852 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
5855 * reflection.h (MonoReflectionInflatedMethod): Removed
5856 `declaring_type' and `reflected_type'.
5858 2004-02-08 Martin Baulig <martin@ximian.com>
5860 * class.h (MonoGenericInst): Added `MonoType *parent' and
5861 `MonoType **ifaces'.
5863 * reflection.h (MonoReflectionGenericInst): Removed `klass',
5864 `parent' and `interfaces'.
5866 * reflection.c (mono_reflection_bind_generic_parameters): Take a
5867 `MonoType *' argument and return a `MonoType *'.
5870 (ves_icall_MonoGenericInst_GetParentType): New interncall.
5871 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
5873 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
5875 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
5876 valuetype marshalling.
5878 2004-02-06 Martin Baulig <martin@ximian.com>
5881 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
5882 (my_mono_class_from_generic_parameter): Likewise.
5884 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
5886 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
5887 contents of the symbol files lazily.
5889 * object.h (MonoThread): Add 'name' and 'name_len' fields.
5891 * threads.h threads.c icall.c: New icalls for getting and setting the
5894 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
5896 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
5897 Raise an exception when the domain is not found.
5899 2004-02-03 Martin Baulig <martin@ximian.com>
5901 * reflection.c (mono_image_get_methodspec_token): Use the
5902 uninflated signature; fixes gen-33.
5904 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
5906 * gc.c threads.c: Make the finalizer thread a normal managed thread so
5907 the finalizer code can use thread functionality.
5909 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
5910 the finalizer thread.
5912 * threads.c: Make some functions more robust.
5914 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
5916 * metadata.h: Add new marshalling conventions.
5918 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
5919 stringbuilder marshalling. Fixes #53700.
5921 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
5923 * reflection.c (mono_image_get_type_info): Save declarative security
5926 * reflection.c (mono_image_get_field_info): Handle uninitialized
5927 unmanaged fields as well.
5929 * appdomain.c: Bump corlib version.
5931 2004-02-01 Martin Baulig <martin@ximian.com>
5933 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
5934 method type arguments.
5936 2004-01-30 Duncan Mak <duncan@ximian.com>
5938 * marshal.h: Add prototype for
5939 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
5941 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
5944 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
5946 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
5947 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
5949 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
5951 * marshal.c (mono_marshal_get_native_wrapper): Add support for
5952 custom marshalling of valuetypes.
5954 * marshal.c: Fix some warnings.
5956 2004-01-29 Martin Baulig <martin@ximian.com>
5958 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
5959 for generic method parameters.
5961 * reflection.c (method_encode_methodspec): Write the uninflated
5962 signature into the methodspec table.
5963 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
5964 is always the uninflated method.
5965 (reflection_methodbuilder_to_mono_method): Copy the generic
5966 parameters from the MethodBuilder into `header->gen_params'.
5968 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
5970 * class.c (mono_class_from_generic_parameter): Fix warning.
5972 2004-01-27 Martin Baulig <martin@ximian.com>
5974 * class.c (mono_class_from_generic_parameter): Don't create
5975 `klass->methods' here.
5977 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
5979 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
5980 extension since it does not work with libraries named lib<FOO>.dll.so.
5982 2004-01-25 Martin Baulig <martin@ximian.com>
5984 * class.c (mono_class_inflate_generic_type): Added support for
5985 MONO_TYPE_GENERICINST.
5987 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
5988 inflate methods on open constructed types.
5990 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5992 * object.c: fire ProcessExit event in the root AppDomain after running
5993 Main. Fixes bug #53299.
5995 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
5997 * socket-io.c: include the new socket-wrappers.h header.
5998 Use the wrappers instead of the unix socket functions to make the code
6001 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
6003 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
6005 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
6008 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
6010 * reflection.c (mono_image_create_pefile): Handle the case when the
6011 entry point is not a MethodBuilder.
6013 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
6014 field to ReflectionMethod since it is not allways a builder.
6016 * reflection.c (type_get_fully_qualified_name): New helper function to
6017 return the fully qualified name of a type.
6019 * reflection.c (encode_marshal_blob): Always emit the fully qualified
6020 type name for custom marshallers.
6022 * reflection.c (mono_marshal_spec_from_builder): Ditto.
6024 * class.c (mono_class_setup_vtable): If a parent class already
6025 implements an interface, use the implementing methods from that class.
6028 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6030 * threadpool.c: just return instead of ExitThread to allow for thread
6033 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
6035 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
6036 when closing resource modules.
6038 * reflection.c (mono_image_create_pefile): Handle the case when the
6039 entry point is not a MethodBuilder.
6041 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
6042 field to ReflectionMethod since it is not allways a builder.
6044 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
6046 * marshal.c (mono_marshal_get_managed_wrapper):
6047 mono_marshal_alloc takes native int so CONV_I
6050 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
6052 * reflection.c (fixup_cattrs): New function to fixup the methoddef
6053 tokens in the cattr table. Fixes #53108.
6055 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6057 * loader.c: don't trim ".dll" before looking up in the config file.
6058 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
6060 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
6062 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
6063 Return the module which contains the resource as well.
6064 (ves_icall_System_Reflection_Module_Close): New icall.
6066 * appdomain.c: Bump corlib version number.
6068 * image.c (mono_image_addref): New public function.
6070 * assembly.c: Call mono_image_addref.
6072 * reflection.c (mono_module_get_object): Increase reference count of
6075 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
6078 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
6079 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
6080 proper exceptions on DllImport problems.
6082 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
6084 * class.c, metadata.c: eliminate CSIZE macro.
6086 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
6088 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
6089 * object.h: Added async_callback field in MonoAsyncResult.
6090 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
6091 * verify.c: Added async_callback in MonoAsyncResult layout.
6093 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
6095 * reflection.c (mono_reflection_get_custom_attrs): Add support
6098 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
6100 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
6102 (mono_marshal_method_from_wrapper): Add null pointer check.
6104 2004-01-16 Martin Baulig <martin@ximian.com>
6106 * debug-mono-symfile.h: Set version number to 36 and reflect
6107 latest symbol writer changes.
6109 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
6111 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
6112 multi-dimensional arrays.
6113 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
6114 (mono_class_from_mono_type): Use bounded_array_class_get.
6116 * class.c (mono_bounded_array_class_get): New function which takes
6117 a 'bounded' bool argument to distinguish vectors from one dimensional
6120 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
6121 bounded_array_class_get if the array has bounds.
6123 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
6124 Search modules loaded using AssemblyBuilder:AddModule as well.
6126 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6128 * appdomain.c: increased corlib version.
6129 * filewatcher.c: removed g_print.
6131 (get_property_info): only allocate what is actually requested.
6132 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
6134 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6136 * Makefile.am: added filewatcher.[ch]
6137 * filewatcher.[ch]: FileSystemWatcher runtime support.
6138 * icall.c: added new FSW icalls.
6140 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
6142 * string-icalls.c: fix stringbuilder regression as suggested by
6143 Iain McCoy <iain@mccoy.id.au>.
6145 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
6147 * process.c (process_read_stringtable_block): Recognize '007f' as
6148 a language neutral stringtable block.
6150 2004-01-12 Patrik Torstensson
6152 * object.h (MonoStringBuilder) : Changed layout to support our
6153 new stringbuilder class.
6154 * marshal.c: Change marshalling to support the new layout of
6156 * appdomain.c: increased version number because new layout of
6159 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
6161 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
6162 assembly name as an string instead of an AssemblyName, since it is
6163 easier to extract info from it.
6165 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
6166 the culture subdirectories too. Fixes #52231.
6168 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6170 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
6171 It takes 2 new parameters with an optional name for the method to look
6172 for and case ignoring info.
6174 * threadpool.c: removed unused variable.
6176 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6178 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
6179 It takes 2 new parameters with an optional name for the property to look
6180 for and case ignoring info.
6183 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
6185 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
6188 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6191 * assembly.c: escape the uri before passing it to g_filename_from_uri.
6194 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
6196 * reflection.c: Add support for more than one unmanaged resource.
6198 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
6199 in field->def_value, as done in all other cases.
6201 * reflection.c (mono_reflection_get_custom_attrs): Add support for
6204 * reflection.c (mono_reflection_create_runtime_class): Remove
6205 errorneous assignment to klass->element_class, since it is already
6206 done in mono_reflection_setup_internal_class.
6208 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6210 * gc.c: added missing LeaveCriticalSection.
6211 * icall.c: indented a couple of lines.
6212 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
6213 if we call EndInvoke inside a callback. Fixes bug #52601.
6215 2004-01-07 Martin Baulig <martin@ximian.com>
6217 * mono-debug-debugger.h
6218 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
6220 2004-01-06 Miguel de Icaza <miguel@ximian.com>
6222 * appdomain.c: Use messages in NotImplementedException.
6224 * exception.c (mono_get_exception_not_implemented): Now this takes
6227 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
6228 exception instead of g_asserting an aborting when something is not
6231 Add some inline docs.
6233 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
6235 * reflection.h: Update after changes to object layout.
6237 * reflection.c: Implement saving of unmanaged aka win32 resources.
6239 * appdomain.c: Bump version number.
6241 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
6242 Handle missing domains gracefully.
6244 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
6246 * file-io.c : On Windows, there are much more invalid_path_chars.
6248 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
6250 * class.h, object.c: prepare for GetType () speedup.
6252 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
6254 * profiler.c: workaround for --profile null reference exception on
6255 cygwin. Patch by Patrik Torstensson.
6257 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
6259 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
6260 make work for unaligned access.
6262 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
6264 * class.c: small cleanup (class->fields [i] -> field).
6265 * image.c: check address of metadata is valid.
6267 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
6269 * assembly.h assembly.c (mono_assembly_loaded): New public function to
6270 search the list of loaded assemblies.
6272 * reflection.c (mono_reflection_type_from_name): Use
6273 mono_assembly_loaded instead of mono_image_loaded.
6275 * reflection.c: Fix warnings.
6277 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
6279 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
6280 is dynamic. This is needed since an assembly can contain both dynamic and
6283 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
6286 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
6288 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
6289 to store modules loaded using AddModule.
6291 * reflection.c (mono_image_fill_file_table): Generalize this so it works
6294 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
6296 * reflection.c (mono_image_fill_export_table_from_module): New function to
6297 fill out the EXPORTEDTYPES table from a module.
6299 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
6300 into a separate function. Also handle loaded non-dynamic modules.
6302 * reflection.c (mono_image_basic_init): Fix memory allocation.
6304 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6306 * assembly.c (mono_assembly_load_references): Make this public.
6308 2003-12-19 Martin Baulig <martin@ximian.com>
6310 * class.c (mono_class_initialize_generic): Made this static, take
6311 a `MonoGenericInst *' instead of a `MonoClass *'.
6312 (mono_class_from_generic): Call mono_class_initialize_generic()
6313 unless we're already initialized or being called from
6314 do_mono_metadata_parse_generic_inst().
6316 * class.h (MonoGenericInst): Added `initialized' and
6317 `init_pending' flags.
6319 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
6320 `mono_class_init (gklass)' or mono_class_initialize_generic()
6321 here; set `generic_inst->init_pending' while parsing the
6324 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
6326 * locales.c: include string.h for memxxx prototypes
6328 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
6330 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
6331 constructor when accessing literal fields.
6333 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
6335 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6337 * reflection.c (assembly_add_resource_manifest): New function to fill
6338 the MANIFESTRESOURCE table.
6340 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
6342 * reflection.h: Update to changes in class layout.
6344 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
6345 Reenable call to mono_runtime_is_shutting_down ().
6347 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
6348 determine if the runtime is shutting down.
6350 2003-12-16 Jackson Harper <jackson@ximian.com>
6352 * icall.c: comment out call to mono_runtime_is_shutting_down to
6355 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
6357 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
6358 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
6360 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
6362 * reflection.c: move definition of swap_with_size
6363 to before its first call
6365 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
6367 * appdomain.c (mono_runtime_is_shutting_down): New public function.
6369 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
6372 * object.c: Fix warnings.
6374 * icall.c (ves_icall_Type_Get...): Only consider inherited static
6375 members if FlattenHierarchy is set.
6377 * reflection.c (mono_image_add_decl_security): New function to emit
6378 declarative security.
6380 * reflection.h reflection.c: Add support for declarative security.
6382 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
6384 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
6386 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
6388 * appdomain.c verify.c: Moved corlib version checking into its own
6389 function in appdomain.c since it needs to create vtables etc.
6391 2003-12-13 Patrik Torstensson <p@rxc.se>
6393 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
6394 instead of unwrapped server.
6396 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
6398 * verify.c (check_corlib): Fix field index.
6400 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
6402 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
6405 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
6407 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
6408 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
6409 cope with sizeof(size_t) != sizeof(guint32).
6411 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6413 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
6416 2003-12-10 Mark Crichton <crichton@gimp.org>
6418 * icall.c: removed the GetNonZeroBytes. We now handle this case
6421 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
6423 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
6425 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
6428 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
6430 * verify.c (check_corlib): Handle the case when the version field is
6431 initialized by a static constructor.
6433 2003-12-08 Patrik Torstensson <p@rxc.se>
6435 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
6437 2003-12-08 Martin Baulig <martin@ximian.com>
6439 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
6440 a MonoReflectionGenericParameter, also take the parameter index
6441 and name as arguments.
6442 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
6443 (ves_icall_MonoGenericParam_initialize): New interncall.
6444 (ves_icall_Type_make_byref_type): New interncall.
6446 * reflection.h (MonoReflectionGenericParam): Derive from
6447 MonoReflectionType, not just from MonoObject. Added `refobj' and
6450 * reflection.c (mono_reflection_define_generic_parameter): Create
6451 and return a new MonoReflectionGenericParam; don't initialize the
6453 (mono_reflection_initialize_generic_parameter): New public method;
6454 initializes the constraints and creates the `param->pklass'.
6456 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
6458 * reflection.h reflection.c: Use the new fields 'num_types',
6459 'num_fields' and 'num_methods' to track the number of types etc.
6461 * verify.c (check_corlib): Check corlib version number.
6463 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
6465 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
6466 function works on all methods.
6468 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
6470 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
6471 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
6472 the custom_type_info flag of the transparent proxy.
6473 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
6474 objects that supports IRemotingTypeInfo.
6475 * object.h: Added custom_type_info field in transparent proxy.
6477 2003-12-06 Martin Baulig <martin@ximian.com>
6479 * class.c (mono_class_create_from_generic): Removed.
6480 (mono_class_from_generic): Check `ginst->klass' before doing
6481 anything else. This is important to fully support "recursive"
6484 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
6485 empty `generic_inst->klass' before doing anything else.
6487 2003-12-06 Dick Porter <dick@ximian.com>
6492 * locales.c: Use C structs to access class fields. Don't do a
6493 conversion between MonoString and UChar because both are
6494 platform-endian UTF-16. Compare now takes startindex and count
6495 parameters. Add a char overload for IndexOf. Speed up the
6496 invariant string IndexOf.
6498 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
6500 * Makefile.am (monosn_LDADD): Fix parallel build.
6502 2003-12-04 Martin Baulig <martin@ximian.com>
6505 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
6506 (ves_icall_Type_make_array_type): New interncall.
6508 2003-12-04 Martin Baulig <martin@ximian.com>
6510 * locales.c: also change it in the !HAVE_ICU case.
6512 2003-12-04 Dick Porter <dick@ximian.com>
6515 * locales.c: construct_compareinfo is now in CompareInfo, not
6518 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
6520 * image.c (mono_image_load_file_for_image): Cache loaded images in the
6523 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
6526 * assembly.c (mono_assembly_load_references): Only load references
6529 * class.c (mono_class_from_name): Avoid linear search of the
6532 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
6534 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
6536 * image.h (MonoImage): Add 'field_cache' field.
6538 * loader.c (mono_field_from_token): Cache field lookups.
6540 * reflection.c (mono_module_get_object): Fix name property.
6542 * icall.c (ves_icall_get_enum_info): Update after changes to
6543 mono_metadata_get_constant_index ().
6545 * icall.c: Get rid of get_type_info icall, use a separate icall for
6546 each type property to avoid needless memory allocations. Fixes #51514.
6548 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
6549 to avoid needless binary searches.
6551 * class.c (class_compute_field_layout): Move the initialization of
6552 field->def_value to mono_class_vtable ().
6554 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
6557 * object.c (mono_object_allocate): Make it inline.
6559 * object.c (mono_object_allocate_spec): Make it inline.
6561 2003-12-02 Dick Porter <dick@ximian.com>
6563 * locales.c (create_NumberFormat): NumberFormatInfo construction.
6564 Patch by Mohammad DAMT (mdamt@cdl2000.com).
6566 2003-12-01 Dick Porter <dick@ximian.com>
6568 * threads.c: Fix signature and call in CreateMutex and
6571 2003-12-01 Dick Porter <dick@ximian.com>
6574 * locales.c: Implement string compares and searching
6576 * object.h: Add extra Thread field
6578 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
6580 * reflection.c (fixup_method): Add support for MonoCMethod.
6582 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
6584 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
6586 * reflection.c (assembly_name_to_aname): Allow extra characters in
6587 assembly names. Fixes #51468.
6589 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
6591 * exception.c (mono_exception_from_name_domain): New helper function.
6593 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
6594 exception object in the correct domain.
6596 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
6597 formatting + make a copy a the input data.
6599 * loader.c (mono_get_method_from_token): Methods which contain
6600 native code do not have entries in the ImplMap.
6602 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
6603 Thanks to Gonzalo for spotting this.
6605 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
6606 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
6608 * assembly.h (mono_assembly_load_from): Split the second part of
6609 assembly loading into a new public function.
6611 * exception.h (mono_get_exception_bad_image_format): New function.
6613 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
6615 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
6616 Enumerate all modules inside a dynamic assembly. Fixes #51293.
6618 * icall.c: Add new icall for creating dynamic methods.
6620 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
6622 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
6624 * reflection.c (mono_reflection_create_dynamic_method): New icall to
6625 create a dynamic method.
6627 * reflection.c (resolve_object): New helper function.
6629 * reflection.c: Generalize ReflectionMethodBuilder and the functions
6630 which manipulate it so they can also work on dynamic methods.
6632 * reflection.c (reflection_method_builder_to_mono_method): Avoid
6633 creating the MonoReflectionMethodAux structure if it is not needed.
6635 * reflection.h verify.c: Update after changes to object layout.
6637 * reflection.c (method_builder_encode_signature): Fix compilation on
6640 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
6642 * appdomain.h: Added support for context static fields. Added static_data
6643 field to MonoAppContext and renamed thread_static_fields to a more
6644 generic special_static_fields in MonoAppDomain, since it can now contain
6645 context static fields.
6646 * domain.c: Updated hashtable name.
6647 * object.c: Replaced field_is_thread_static() for a more generic
6648 field_is_special_static() which also checks for context static attribute.
6649 In mono_class_vtable(), added support for static context fields.
6650 * threads.c: Changed methods that manage thread static fields to more
6651 generic methods so they can be reused both for thread and context static
6653 * threads.h: Declared some new methods.
6655 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
6657 * reflection.h: Update after changes to the managed types.
6659 * reflection.c (encode_custom_modifiers): New helper function.
6661 * reflection.c (method_encode_signature): Emit custom modifiers.
6663 * reflection.c (field_encode_signature): Emit custom modifiers.
6665 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
6667 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
6669 * icall.c (ves_icall_System_ValueType_Equals): New optimized
6672 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
6675 * object.c (mono_field_get_value_object): New function.
6677 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
6680 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
6682 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
6683 return a preallocated out-of-memory exception instance.
6685 * object.c (out_of_memory): Use the new function.
6687 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
6688 flag is before the custom modifiers. Fixes #49802.
6690 2003-11-16 Martin Baulig <martin@ximian.com>
6692 * class.c (mono_class_is_open_constructed_type): Implemented the
6693 MONO_TYPE_GENERICINST case.
6695 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
6697 * assembly.c (mono_assembly_fill_assembly_name): New function to
6698 fill out the MonoAssemblyName structure.
6699 (mono_assembly_open): Use the new function.
6701 * icall.c (fill_reflection_assembly_name): New helper function.
6703 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
6706 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
6708 2003-11-15 Martin Baulig <martin@ximian.com>
6710 * class.c (mono_class_is_open_constructed_type): New public
6711 function; checks whether a type is an open constructed type,
6712 ie. whether it still contains type parameters.
6713 (mono_class_inflate_generic_type): If we're a type parameter and
6714 the inflated type is also a MONO_TYPE_(M)VAR, return the original
6717 * class.h (MonoGenericInst): Added `guint32 is_open'.
6719 * loader.c (method_from_methodspec): Check whether we're an open
6720 or closed constructed type and set `ginst->is_open'.
6722 * reflection.c (mono_reflection_bind_generic_parameters): Check
6723 whether we're an open or closed constructed type and set
6725 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
6726 from open constructed types.
6728 2003-11-15 Martin Baulig <martin@ximian.com>
6730 * reflection.c (mono_reflection_bind_generic_parameters): If we're
6731 a generic instance (instead of a generic type declaration) with
6732 unbound generic parameters, bind them to our actual types.
6734 2003-11-14 Martin Baulig <martin@ximian.com>
6736 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
6738 * reflection.c (mono_reflection_bind_generic_parameters): If we're
6739 an interface type, populate `res->interfaces' with instantiated
6740 versions of all the interfaces we inherit.
6742 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
6744 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
6745 when MONO_PATH is set but doesn't contain the install dir.
6747 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6750 (ves_icall_Type_GetInterfaces): don't return an interface twice when
6751 it's also implemented in base classes. Fixes bug #50927.
6753 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
6755 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
6756 if this method is called from a finalizer. Fixes #50913.
6758 2003-11-12 Miguel de Icaza <miguel@ximian.com>
6760 * threads.c: Implement VolatileRead/VolatileWrite
6762 * icall.c: Add new icalls for VolatileRead/VolatileWrite
6764 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
6766 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
6767 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
6770 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
6771 from Peter Ross (pro@missioncriticalit.com).
6773 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
6775 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
6777 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
6779 * assembly.c (mono_assembly_load_references): Disable check because it
6780 triggers on older corlibs which lots of people have.
6782 2003-11-12 Jackson Harper <jackson@ximian.com>
6784 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
6785 load corlib.dll if mscorlib.dll is not found.
6786 * assembly.h: Remove corlib name define.
6789 * image.c: Change corlib name to mscorlib.
6791 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
6793 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
6795 2003-11-11 Miguel de Icaza <miguel@ximian.com>
6797 * appdomain.h: Added loader_optimization here to sync with the C#
6798 code, and add disallow_binding_redirects field.
6800 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
6802 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
6804 * reflection.c (mono_image_build_metadata): Fix crash on modules
6807 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
6809 * icall.c (ves_icall_get_method_info): Return callingConvention as
6812 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
6813 namespaces from the EXPORTEDTYPE table as well.
6815 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
6816 from all modules inside the assembly.
6818 2003-11-11 Martin Baulig <martin@ximian.com>
6820 * reflection.c (mono_reflection_bind_generic_parameters): Make
6821 this work for interfaces.
6823 2003-11-11 Martin Baulig <martin@ximian.com>
6825 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
6827 2003-11-11 Martin Baulig <martin@ximian.com>
6829 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
6830 "MonoInflatedMethod" and "MonoInflatedCtor".
6832 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
6834 * reflection.c (resolution_scope_from_image): Use the assembly table
6835 from the manifest module, since other modules don't have it.
6837 * debug-helpers.c (mono_type_full_name): New helper function.
6839 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
6841 * image.c (mono_image_load_file_for_image): New public function which
6842 is a replacement for the load_file_for_image in class.c.
6844 * assembly.c (mono_assembly_load_module): A wrapper for the function
6845 above which does assembly association and reference loading too.
6847 * class.c (mono_class_from_name): Call mono_assembly_load_module.
6849 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6851 * appdomain.c: not all of the attributes for the full assembly name
6852 are required and the order doesn't matter. Fixes bug #50787.
6854 2003-11-10 Dick Porter <dick@ximian.com>
6856 * locales.c: Use platform-endian UTF16
6858 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
6860 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
6862 2003-11-10 Martin Baulig <martin@ximian.com>
6865 (mono_metadata_load_generic_params): Make this actually work.
6867 * reflection.c (mono_reflection_bind_generic_parameters): If our
6868 parent is a generic instance, pass all the `types' to it, no
6869 matter whether it has the same number of type parameters or not.
6871 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
6873 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
6875 * assembly.c (mono_assembly_load_references): Move the image<->assembly
6876 assignment code to this function so it gets called recursively for all
6879 * image.c (load_modules): Remove the assembly assignment since it is
6880 now done by mono_assembly_load_references.
6882 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
6883 Add 'module' argument.
6884 (mono_module_get_types): New helper function.
6885 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
6887 2003-11-08 Martin Baulig <martin@ximian.com>
6889 * class.c (mono_class_inflate_generic_method): Interface method
6890 don't have a header.
6892 * reflection.c (mono_image_get_methodspec_token): Take an
6893 additional `MonoGenericInst *' argument instead of reading it from
6894 the header; this is necessary to support interfaces.
6895 (mono_image_create_token): Pass the `MonoGenericInst *' from the
6896 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
6897 (inflated_method_get_object): Take an additional `MonoGenericInst *'
6900 * reflection.h (MonoReflectionInflatedMethod): Added
6901 `MonoGenericInst *ginst'.
6903 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
6905 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
6907 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
6909 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
6911 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
6914 (reflection_methodbuilder_from_method_builder):
6915 (reflection_methodbuilder_from_ctor_builder): New helper functions to
6916 initialize a ReflectionMethodBuilder structure.
6917 (mono_image_get_methodbuilder_token):
6918 (mono_image_get_ctorbuilder_token): New functions to emit memberref
6919 tokens which point to types in another module inside the same assembly.
6921 * reflection.c: Use the new helper functions.
6923 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
6925 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
6926 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
6928 * reflection.c (resolution_scope_from_image): Emit a moduleref if
6931 * reflection.c (mono_image_build_metadata): Emit metadata only for the
6932 current module. Emit the manifest only for the main module.
6934 * reflection.c (mono_image_create_token): Add assertion when a
6935 memberref needs to be created.
6937 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
6939 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
6940 larger buffer for the custom attribute blob. Fixes #50637.
6942 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6944 * threadpool.c: notify listener on async processing handles after
6945 invoking the async callback. Thanks to Zoltan.
6947 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
6949 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
6950 avoid code duplication.
6952 * reflection.h (MonoDynamicImage): New type which is currently unused,
6953 but will be used through the ref.emit code in place of
6954 MonoDynamicAssembly.
6956 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
6959 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
6960 a MonoDynamicImage instead of just a MonoImage.
6962 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
6963 icalls to ModuleBuilder but keep their semantics, so they will work
6964 with moduleb->assemblyb. This will change later.
6966 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
6968 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
6971 * reflection.c (mono_image_build_metadata): Avoid creation of a default
6972 main module, since it is now done by the managed code.
6974 2003-11-03 Martin Baulig <martin@ximian.com>
6976 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
6977 `ginst->klass' here.
6978 (method_encode_methodspec): Don't use the `ginst->generic_method's
6979 klass if it's a generic instance, use `ginst->klass' in this case.
6981 2003-11-03 Martin Baulig <martin@ximian.com>
6983 * reflection.c (mono_image_get_generic_method_param_info):
6984 Removed, use mono_image_get_generic_param_info() instead.
6985 (mono_image_get_type_info): Write the GenericParam table before
6986 the Method table. This is neccessary because in the GenericParam
6987 table, type parameters of the class (ie. '!0' etc.) must come
6988 before the ones from its generic methods (ie. '!!0' etc).
6990 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
6992 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
6994 2003-11-02 Martin Baulig <martin@ximian.com>
6996 * reflection.c (create_generic_typespec): Take a
6997 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
6998 the generic parameters from it.
7000 2003-11-02 Martin Baulig <martin@ximian.com>
7002 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
7003 instead of a `MonoClassField *' since we just need the type.
7004 (create_generic_typespec): New static function. Creates a
7005 TypeSpec token for a generic type declaration.
7006 (mono_image_get_generic_field_token): New static function.
7007 (mono_image_create_token): If we're a FieldBuilder in a generic
7008 type declaration, call mono_image_get_generic_field_token() to get
7011 2003-11-02 Martin Baulig <martin@ximian.com>
7014 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
7015 `MonoReflectionGenericInst *declaring_type' and
7016 `MonoReflectionGenericInst *reflected_type' fields.
7018 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
7019 `MonoReflectionGenericInst *declaring_type' and a
7020 `MonoReflectionGenericInst *reflected_type' argument instead of a
7021 single `MonoReflectionGenericInst *type' one. Set
7022 `res->declaring_type' and `res->reflected_type' from them.
7023 (mono_reflection_inflate_field): Likewise.
7025 2003-11-02 Martin Baulig <martin@ximian.com>
7027 * class.c (mono_class_setup_vtable): Don't store generic methods
7030 2003-11-02 Martin Baulig <martin@ximian.com>
7032 * reflection.h (MonoReflectionGenericInst): Added
7033 `MonoReflectionType *declaring_type'.
7035 * reflection.c (mono_reflection_bind_generic_parameters): Use
7036 `if (tb->parent)' instead of `klass->parent'.
7038 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
7040 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
7041 with an empty ASSEMBLY table.
7043 * reflection.c (mono_image_build_metadata): Avoid using the same loop
7044 variable in the inner and outer loops.
7046 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
7048 * metadata.h (mono_metadata_make_token): Put parentheses around macro
7051 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
7053 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
7054 icalls. Instead, do everything in managed code. This is needed since
7055 it is hard to restore the original domain etc. in unmanaged code in the
7056 presence of undeniable exceptions.
7058 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
7059 New icalls to push and pop appdomain refs.
7061 2003-10-31 Martin Baulig <martin@ximian.com>
7063 * class.c (inflate_generic_type): Renamed to
7064 mono_class_inflate_generic_type() and made it public.
7066 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
7069 * loader.c (mono_field_from_memberref): Also set the retklass for
7072 * fielder.c (mono_image_get_inflated_field_token): New static
7073 method; creates a metadata token for an inflated field.
7074 (mono_image_create_token, fixup_method): Added support for
7075 "MonoInflatedField".
7076 (fieldbuilder_to_mono_class_field): New static function.
7077 (mono_reflection_inflate_field): New public function.
7080 (MonoReflectionGenericInst): Added `MonoArray *fields'.
7081 (MonoReflectionInflatedField): New typedef.
7083 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
7085 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
7086 for Solaris and other platforms without s6_addr16
7088 2003-10-30 Martin Baulig <martin@ximian.com>
7090 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
7091 argument instead of two.
7092 (mono_class_inflate_generic_signature): Likewise.
7093 (inflate_generic_header): Likewise.
7094 (mono_class_inflate_generic_method): Likewise. In addition, if
7095 `ginst->klass' is set, it becomes the new `method->klass'.
7097 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
7100 * reflection.c (encode_generic_method_sig): Write a 0xa as the
7102 (method_encode_methodspec): If we have generic parameters, create
7103 a MethodSpec instead of a MethodRef.
7104 (fixup_method): Added support for "MonoInflatedMethod" and
7106 (mono_image_create_token): Added support for "MonoInflatedMethod"
7107 and "MonoInflatedCtor".
7108 (inflated_method_get_object): New static function; returns a
7109 managed "System.Reflection.MonoInflatedMethod" object.
7110 (mono_reflection_bind_generic_method_parameters): Return a
7111 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
7112 (mono_reflection_inflate_method_or_ctor): Likewise.
7113 (mono_image_get_generic_method_param_info): Initialize unused
7115 (mono_image_get_generic_param_info): Likewise.
7117 * reflection.h (MonoReflectionInflatedMethod): New public
7118 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
7119 "S.R.MonoInflatedCtor" classes.
7121 * loader.c (method_from_memberref): If we're a TypeSpec and it
7122 resolves to a generic instance, inflate the method.
7124 2003-10-28 Dick Porter <dick@ximian.com>
7126 * object.c (mono_runtime_run_main): Convert command-line arguments
7127 into utf8, falling back to the user's locale encoding to do so.
7129 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
7131 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
7134 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
7136 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
7137 up icalls at method definition time. Partially fixes #33569.
7139 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
7141 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
7142 marshalling of arrays. Fixes #50116.
7144 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
7146 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
7147 points to a vtable in the dying appdomain.
7149 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
7150 listeners into unmanaged code inside the lock.
7152 * object.c (mono_class_vtable): Turn off typed allocation in non-root
7153 domains and add some comments.
7155 2003-10-25 Martin Baulig <martin@ximian.com>
7157 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
7159 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
7161 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
7162 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
7163 currently parsing. Create the generic class and store it in
7164 `generic_inst->klass' before parsing the type arguments. This is
7165 required to support "recursive" definitions; see mcs/tests/gen-23.cs
7167 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
7168 to support recursive typespec entries.
7170 * class.c (mono_class_setup_parent): If our parent is a generic
7171 instance, we may get called before it has its name set.
7172 (mono_class_from_generic): Splitted into
7173 mono_class_create_from_generic() and mono_class_initialize_generic().
7175 2003-10-25 Martin Baulig <martin@ximian.com>
7177 * icall.c (ves_icall_Type_BindGenericParameters): Return a
7178 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
7179 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
7180 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
7182 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
7183 (create_typespec): Likewise.
7184 (mono_reflection_bind_generic_parameters): Return a
7185 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
7186 (mono_reflection_inflate_method_or_ctor): New public function.
7188 * reflection.h (MonoReflectionGenericInst): New typedef.
7190 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
7192 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
7193 inside the domain lock. Fixes #49993.
7195 * object.c (mono_class_vtable): When typed allocation is used,
7196 allocate vtables in the GC heap instead of in the mempool, since the
7197 vtables contain GC descriptors which are used by the collector even
7198 after the domain owning the mempool is unloaded.
7200 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
7202 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
7203 reflect what it does. Also invalidate mempools instead of freeing
7204 them if a define is set.
7206 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
7209 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
7210 hold the finalizable objects in this domain.
7212 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
7215 * appdomain.c (mono_domain_set): New function to set the current
7216 appdomain, but only if it is not being unloaded.
7218 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
7219 appdomain which is being unloaded.
7221 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
7222 unloading of the root appdomain.
7224 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
7225 icall to execute a method in another appdomain. Intended as a
7226 replacement for InternalSetDomain, which can confuse the code
7227 generation in the JIT.
7229 * appdomain.c (mono_domain_is_unloading): New function to determine
7230 whenever an appdomain is unloading.
7232 * appdomain.c (mono_domain_unload): New function to correctly unload
7235 * assembly.c (mono_assembly_load_references): Check that an assembly
7236 does not references itself.
7238 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
7239 domain manually, it asks the finalizer thread to do it, then waits for
7240 the result. Also added a timeout.
7242 * icall.c: Register the new icalls.
7244 * threads.h threads.c: Export the mono_gc_stop_world and
7245 mono_gc_start_world functions.
7247 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
7248 function to fill out the mempool with 0x2a.
7250 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
7252 * reflection.h (MonoReflectionMethodAux): New structure to store
7253 information which is rarely used, thus is not in the MonoMethod
7256 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
7259 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
7260 and marshalling info into the aux structure.
7262 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
7263 from the aux structure.
7265 * loader.c (mono_method_get_param_names): Retrieve the param names from
7268 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
7270 * exception.h exception.c: Add AppDomainUnloadedException && fix
7273 2003-10-21 Dick Porter <dick@ximian.com>
7276 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
7277 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
7279 2003-10-21 Martin Baulig <martin@ximian.com>
7281 * reflection.c (mono_reflection_bind_generic_parameters):
7282 `klass->parent' is NULL for interfaces.
7284 2003-10-21 Martin Baulig <martin@ximian.com>
7286 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
7288 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
7290 * exception.c (mono_exception_from_name_msg): New helper function for
7291 creating exceptions and initializing their message field.
7293 * exception.c: Simplify functions using the new helper.
7295 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
7298 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
7299 mono_raise_exception, since otherwise gcc doesn't generate the function
7300 epilog for raise_exception, confusing the stack unwinding in the JIT.
7303 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
7304 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
7307 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7309 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
7312 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
7314 * icall.c: Removed GetUninitializedObject method because
7315 AllocateUninitializedClassInstance does the same.
7317 2003-10-18 Martin Baulig <martin@ximian.com>
7319 * class.c (inflate_generic_signature): Renamed to
7320 mono_class_inflate_generic_signature() and made it public.
7321 (my_mono_class_from_generic_parameter): New static function; if we
7322 don't already have the generic parameter's MonoClass, create a
7323 very simple one which is just used internally in the runtime and
7324 not passed back to managed code.
7326 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
7328 * metadata.h (MonoMethodSignature): Moved the
7329 `MonoGenericParam *gen_params' to the MonoMethodHeader.
7330 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
7332 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
7333 ves_icall_MonoMethod_GetGenericArguments(); this is now an
7334 interncall on the MonoMethod class, not on MethodInfo.
7335 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
7336 calling mono_reflection_bind_generic_method_parameters() directly.
7338 * loader.c (mono_method_get_signature): If this is a MethodSpec;
7339 return the already computed `method->signature'.
7340 (method_from_methodspec): New static function to load a method
7341 from a MethodSpec entry.
7342 (mono_get_method_from_token): Call the new method_from_methodspec()
7343 for MethodSpec tokens.
7344 (mono_get_method_from_token): If we're a generic method, load the
7347 * reflection.c (mono_image_get_memberref_token): Allow
7348 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
7350 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
7351 (mono_image_create_token): First check whether it's a generic
7352 method (so we'd need to create a MethodSpec), then do the other
7354 (mono_reflection_bind_generic_method_parameters): Return a
7355 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
7356 called directly from the interncall.
7358 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
7360 * reflection.c (load_public_key): Move loading of the public key
7363 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
7365 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
7368 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
7369 culture, hash_alg and public_key. Fixes #49555.
7371 2003-10-17 Martin Baulig <martin@ximian.com>
7373 * class.h (MonoGenericInst): Moved this declaration here and added
7374 `MonoMethod *generic_method'.
7377 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
7378 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
7380 * metadata.c (mono_metadata_type_equal): Two types of
7381 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
7382 index; ie. don't compare the address of the `MonoGenericParam'
7384 (mono_metadata_load_generic_params): Removed the `MonoMethod
7387 * metadata.h (MonoGenericInst): Moved declaration to class.h.
7388 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
7390 * reflection.c (method_encode_signature): Encode the number of
7392 (encode_generic_method_sig): New static function.
7393 (method_encode_methodspec): New static function; creates an entry
7394 in the MethodSpec table for a generic method.
7395 (mono_image_get_methodspec_token): New static function.
7396 (mono_image_create_token): Call mono_image_get_methodspec_token()
7397 for generic methods.
7398 (mono_reflection_bind_generic_method_parameters): New public
7399 function. Instantiates a generic method.
7401 2003-10-16 Martin Baulig <martin@ximian.com>
7403 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
7404 *gen_params' here from MonoMethodHeader.
7406 * metadata.c (mono_metadata_parse_method_signature): If we have
7407 generic parameters, initialize `method->gen_params' and then set
7408 the correct `type->data.generic_param' in all the parameters.
7410 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
7412 * threads.c (mono_threads_get_default_stacksize): New function to
7413 return the default stacksize.
7415 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
7416 termination of the finalizer thread, since the previous method had
7417 race conditions. Fixes #49628.
7419 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
7420 as for the other managed threads.
7422 2003-10-16 Martin Baulig <martin@ximian.com>
7424 * class.c (inflate_generic_signature): Copy `generic_param_count'
7427 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
7430 * metadata.c (mono_metadata_parse_method_signature): Actually set
7431 the `method->generic_param_count' here.
7432 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
7434 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
7436 * object.h: Add a new field to TypedRef to simplify the implementation
7437 of the REFANY opcodes in the JIT.
7439 * icall.c: Make use of the new field.
7441 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
7444 2003-10-15 Martin Baulig <martin@ximian.com>
7446 * class.c (mono_class_from_gen_param): Renamed to
7447 mono_class_from_generic_parameter() and moved most of the
7448 functionality from mono_reflection_define_generic_parameter()
7449 here; ie. we create a "real" class here.
7450 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
7451 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
7452 previously been called.
7454 * class.h (MonoGenericParam): Moved the declaration of this struct
7455 here from metadata.h and added `MonoMethod *method'.
7457 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
7460 * loader.c (mono_get_method_from_token): If we have any generic
7461 parameters, call mono_metadata_load_generic_params() to read them
7462 from the MONO_TABLE_GENERICPAR.
7464 * metadata.c (mono_metadata_load_generic_params): Added
7465 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
7467 * metadata.h (MonoMethodSignature): Replaced
7468 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
7469 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
7471 * reflection.c (mono_reflection_define_generic_parameter): Moved
7472 most of the functionality into the new
7473 mono_class_from_generic_parameter(); set the `method' field if
7474 we're a method parameter.
7476 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
7478 * marshal.c (emit_struct_conv): if native size is 0
7481 2003-10-14 Martin Baulig <martin@ximian.com>
7483 * icall.c: The generics API has changed in the spec since it was
7484 added to System.Type; these modifications make it match the spec
7486 (ves_icall_Type_GetGenericParameters): Renamed to
7487 `ves_icall_Type_GetGenericArguments'.
7488 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
7489 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
7490 `ves_icall_MonoType_get_HasGenericArguments'.
7491 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
7492 `ves_icall_MonoType_get_IsGenericParameter'.
7493 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
7494 this is no interncall anymore.
7495 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
7496 `ves_icall_TypeBuilder_get_IsGenericParameter'.
7498 2003-10-14 Martin Baulig <martin@ximian.com>
7500 * reflection.c (mono_reflection_bind_generic_parameters): Also
7501 inflate generic methods if we're reading the class from IL.
7503 2003-10-13 Martin Baulig <martin@ximian.com>
7505 * reflection.c (mono_reflection_define_generic_parameter): This
7506 method isn't called directly from the icall anymore; take a
7507 `MonoReflectionAssemblyBuilder *' so we can use this for type and
7508 method generic parameters.
7509 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
7510 (method_builder_encode_signature): Encode generic parameters.
7511 (mono_image_get_method_info): Write generic params to the
7512 MONO_TABLE_GENERICPARAM table.
7514 * reflection.h (MonoReflectionMethodBuilder): Added
7515 `MonoArray *generic_params'.
7517 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
7519 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
7520 wrapper for mono_reflection_define_generic_parameter().
7521 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
7523 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
7525 * marshal.h: Add missing function to fix build.
7527 * marshal.c (mono_marshal_get_native_wrapper): Add support for
7528 the SetLastError pinvoke attribute.
7530 * marshal.c (mono_marshal_set_last_error): New helper function called
7531 by the generated code.
7533 * marshal.c (mono_mb_emit_branch): New helper function.
7535 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
7537 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
7538 classes as parameters and return values of delegates. Fixes #29256.
7540 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
7542 * locales.c: use gint32 in non HAVE_ICU case
7544 2003-10-11 Martin Baulig <martin@ximian.com>
7546 * mono-debug.c (mono_debug_add_method): Added a workaround for
7549 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
7551 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
7552 delegates passed to native code must use the STDCALL calling
7553 convention. Fixes #35987.
7555 2003-10-10 Martin Baulig <martin@ximian.com>
7557 * class.c (inflate_generic_type): If we're inflating for a generic
7558 type instance (and not for a generic method), return
7559 MONO_TYPE_MVAR unchanged.
7561 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7563 * string-icalls.c: Join ignores null strings in the source array.
7564 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
7565 * threads.c: GetAvailableTheads is slightly more accurate.
7567 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
7569 * threads.h threads.c : add mono_threads_set_default_stacksize
7570 and pass default to CreateThread calls.
7572 2003-10-09 Dick Porter <dick@ximian.com>
7576 * locales.c: Internal calls for constructing CultureInfo and
7577 related objects from libicu (if its available.)
7579 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
7581 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
7583 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7585 * threadpool.c: added an argument to async_invoke_thread that is the
7586 item to process, pass the MonoAsyncResult to the thread start function
7587 when creating a new thread. This way we don't need to acquire any lock
7588 when we're creating a new thread. Readded a semaphore for faster
7589 response times (instead of that Sleep i added).
7591 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
7593 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
7594 get daylight change dates better on Windows, fix handling
7595 of platforms without tm_gmtoff.
7597 2003-10-06 Martin Baulig <martin@ximian.com>
7599 * class.c (inflate_generic_method): Renamed to
7600 mono_class_inflate_generic_method() and made public.
7601 (mono_class_init): Don't inflate the generic methods here.
7602 (mono_class_from_generic): Added `gboolean inflate_methods'
7603 argument. Inflate the methods here.
7605 * loader.c (mono_method_get_param_names): Ignore instances of
7606 generic types for the moment.
7608 * reflection.c (fixup_method): Added support for inflated methods.
7609 (mono_image_create_token): Use mono_image_get_methodref_token()
7610 for inflated methods.
7611 (mono_custom_attrs_from_param): Ignore instances of generic types
7613 (mono_reflection_bind_generic_parameters): New public function.
7614 Moved all the functionality from
7615 ves_icall_Type_BindGenericParameters() here and added support for
7617 (mono_reflection_define_generic_parameter): Initialize
7618 `klass->methods' here.
7620 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
7621 functionality into mono_reflection_define_generic_parameter().
7622 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
7623 TypeBuilder, return that TypeBuilder.
7625 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7627 * appdomain.c: removed mono_delegate_semaphore.
7630 (mono_thread_pool_add): moved hash table creation inside and the thread
7631 creation outside of the critical region.
7632 (mono_thread_pool_finish): removed obsolete code.
7633 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
7634 continue or exit the thread depending on the queue.
7636 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
7638 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
7639 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
7640 handle more bool marshalling options
7642 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
7644 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
7645 arrays of structs. Also add a more descriptive error message when
7646 a structure member is marshalled as LPArray.
7648 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
7650 * marshal.c (mono_marshal_get_native_wrapper): Add support for
7651 marshalling arrays of complex types. Fixes #29098. Also remove an
7652 usused and incomplete function.
7654 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
7656 * gc.c: report heap_size - free_bytes as total memory allocated
7659 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
7661 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
7662 fix timezone handling problems on Windows.
7664 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
7665 asserts when the year is outside the range handled by ms the functions.
7667 * class.c (setup_interface_offsets): If the class is an interface,
7668 fill out its interface_offsets slot.
7670 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7672 * threadpool.c: mark threadpool threads as background.
7674 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
7676 * decimal.c - define DECINLINE to nothing if not using GCC
7678 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
7680 * assembly.c: More refcount fixes.
7682 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7684 * string-icalls.c: if we're not trimming, return the same string.
7685 When not splitting, don't create a new string.
7687 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7690 (mono_image_open): increment the ref_count inside the critical section.
7692 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
7694 * image.c (mono_image_open): Fix reference counting bug.
7696 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
7698 * marshal.c (mono_marshal_type_size) struct alignment changed for
7699 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
7700 64bits. Avoid leak in mono_marshal_get_native_wrapper when
7701 mono_lookup_pinvoke_call throws.
7703 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
7705 * reflection.c (mono_reflection_parse_type): Fix #49114.
7707 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
7708 temporary workaround for cygwin header problem.
7710 * object.c (mono_object_isinst): Synchronize this with the code
7711 generated by the JIT for casts.
7713 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
7715 * reflection.c (encode_type): Fix #38332.
7717 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
7719 * marshal.c (mono_marshal_method_from_wrapper): New function to return
7720 the original method from the wrapper method.
7722 2003-09-25 Martin Baulig <martin@ximian.com>
7724 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
7725 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
7726 (ves_icall_Type_get_IsGenericInstance): New interncall.
7728 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
7730 * object.c: fix cast warning in big endian code.
7732 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
7734 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
7736 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7738 * assembly.c: don't call check_env from mono_assembly_load. It's
7739 already done once in mono_assemblies_init and may cause headaches when
7740 multiple threads are loading assemblies.
7742 2003-09-19 Martin Baulig <martin@ximian.com>
7744 * reflection.c (mono_reflection_define_generic_parameter): Don't
7745 allocate `klass->methods', set `klass->flags' to
7746 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
7748 2003-09-18 Martin Baulig <martin@ximian.com>
7750 * class.c (mono_class_init): Don't create `class->methods' if it's
7751 already initialized.
7753 * metadata.c (mono_metadata_load_generic_params): Make this
7756 * reflection.c (mono_reflection_define_generic_parameter): Set
7757 parent class and interfaces from the constraints.
7759 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
7760 to keep this struct in sync with the declaration in TypeBuilder.cs.
7762 2003-09-17 Martin Baulig <martin@ximian.com>
7764 * metadata.h (MonoType): Replaced the data's `int type_param'
7765 field with `MonoGenericParam *generic_param'.
7766 (MonoGenericParam): Added `MonoClass *klass'.
7768 * class.c (mono_class_from_gen_param): Removed the
7769 `MonoImage *image' and `int type_num' arguments.
7771 * metadata.c (mono_metadata_parse_generic_param): New static
7772 method; creates a MonoGenericParam which just contains the index.
7773 (do_mono_metadata_parse_type): Call
7774 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
7777 * reflection.c (mono_image_typedef_or_ref): Generic type
7778 parameters may be in the same assembly, but never use a typedef
7780 (mono_reflection_define_generic_parameter): We're now creating a
7781 "real" class for the type parameter; it's now safe to call
7782 mono_class_from_mono_type() on the class'es type, it'll do the
7785 2003-09-16 Martin Baulig <martin@ximian.com>
7787 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
7788 `symfile->range_entry_size' and `symfile->class_entry_size' here;
7789 the `symfile' data structure must be fully initialized before it
7790 gets added to the table.
7792 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
7794 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
7796 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
7797 class init trampolines.
7799 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
7801 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
7802 to the built-in profiler to turn off time and allocation profiling
7805 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
7807 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
7810 * debug-helpers.c (mono_method_full_name): Print the wrapper type
7811 in human readable form.
7813 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
7815 * reflection.c icall.c: Fixed warnings.
7817 * image.c (load_class_names): Use a temporary hash table to hold the
7818 namespaces in order to avoid doing many string comparisons.
7820 * image.h: Fix typo.
7822 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
7823 Pass NULL instead of g_direct_equal to the GHashTable constructor
7824 since the NULL case is short-circuited inside g_hash_table_lookup,
7825 leading to better performance.
7827 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
7828 obtain the first custom attribute for a given index. Depends on the
7829 CustomAttribute table being sorted by the parent field.
7831 * reflection.c (mono_custom_attrs_from_index): Use the new function
7832 for better performance.
7834 2003-09-07 Martin Baulig <martin@ximian.com>
7836 * class.c (mono_class_init): If we're a generic instance, inflate
7837 all our methods instead of loading them from the image.
7838 (mono_class_from_generic): Set `class->methods = gklass->methods'.
7840 2003-09-07 Martin Baulig <martin@ximian.com>
7842 * mono-debug-debugger.c: Added support for constructors.
7844 2003-09-06 Martin Baulig <martin@ximian.com>
7846 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
7849 * reflection.c (mono_reflection_setup_generic_class): Call
7850 ensure_runtime_vtable() to create the vtable.
7852 2003-09-05 Martin Baulig <martin@ximian.com>
7854 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
7857 2003-09-04 Martin Baulig <martin@ximian.com>
7859 * reflection.c (mono_reflection_define_generic_parameter): Generic
7860 parameters start with zero.
7862 2003-09-04 Martin Baulig <martin@ximian.com>
7864 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
7866 * reflection.h (MonoReflectionGenericParam): New typedef.
7867 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
7868 the generic parameters from the managed TypeBuilder.
7870 * reflection.c (mono_reflection_define_generic_parameter): New function.
7871 (mono_reflection_create_runtime_class): Encode generic parameters.
7872 (mono_reflection_setup_generic_class): New function; this is
7873 called after adding adding all generic params to the TypeBuilder.
7874 (encode_type): Added MONO_TYPE_VAR.
7876 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
7878 * class.h class.c (mono_class_needs_cctor_run): Moved this method
7881 * assembly.h assembly.c: Moved the AOT loading code into an assembly
7884 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
7886 * reflection.h reflection.c class.h class.c: Delete duplicate
7887 definition of mono_type_get_name () from reflection.c and export the
7890 * class.c: Class loading fixes from Bernie Solomon
7891 (bernard@ugsolutions.com).
7893 * reflection.c: Endianness fixes from Bernie Solomon
7894 (bernard@ugsolutions.com).
7896 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
7898 * assembly.h assembly.c: Define a file format version for AOT
7901 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
7903 * appdomain.h (MonoJitInfo): New field to determine whenever the
7904 code is domain neutral.
7906 2003-08-31 Miguel de Icaza <miguel@ximian.com>
7908 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
7910 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
7912 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
7913 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
7914 Avoid caching the result since strings must be domain specific. Fixes
7917 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
7919 * marshal.c (mono_marshal_init): Make this callable multiple times
7920 since it is hard to find a correct place to call it.
7922 * object.c (mono_runtime_class_init): Execute static constructors in
7923 the correct appdomain.
7925 * image.c (build_guid_table): Handle the case when multiple images have
7928 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7930 * icall.c: added a couple of icalls for System.Web.
7932 2003-08-28 Martin Baulig <martin@ximian.com>
7934 * icall.c (ves_icall_Type_BindGenericParameters): Use
7935 `klass->generic_inst' instead of `&klass->byval_arg' in the
7936 mono_type_get_object() call. The returned type must be
7937 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
7939 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
7943 * object.c (mono_class_proxy_vtable): Make it thread safe.
7945 * pedump.c: Fix warning.
7947 * object.c appdomain.h: Get rid of metadata_section.
7948 It is no longer needed and it was causing deadlocks with domain->lock.
7950 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
7952 2003-08-26 Martin Baulig <martin@ximian.com>
7954 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
7956 2003-08-26 Martin Baulig <martin@ximian.com>
7958 * pedump.c (main): Call mono_metadata_init(),
7959 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
7960 and mono_loader_init().
7962 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
7964 * loader.h: Add missing include to fix build.
7966 * image.h: mono_image_load_references is no more.
7968 * assembly.c: Reworked assembly loading to make it really thread safe.
7969 After these changes, the assembly returned by mono_assembly_open is
7970 fully initialized, i.e. all its references assemblies are loaded.
7972 * assembly.c (mono_image_load_references): Renamed to
7973 mono_assembly_load_references, and made private, since clients no
7974 longer need to call it.
7976 * class.c: Removed calls to mono_assembly_load_references, since it was
7977 a source of deadlocks.
7979 * loader.h loader.c class.h class.c: Protect data structures using a
7980 new lock, the loader lock.
7982 * class.c (mono_class_setup_vtable): Create temporary hash tables and
7983 GPtrArrays only when needed.
7985 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
7986 into empty structures by mcs. Fixes pinvoke7.cs.
7988 * domain.c (mono_init): Call a new initialization function.
7990 * appdomain.c (mono_runtime_init): Call the new initializer function
7991 of the marshal module.
7993 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
7994 inserted into empty structures by mcs. Fixes pinvoke7.cs.
7996 * marshal.h marshal.c: Added locks around the wrapper caches to make
7997 this module thread safe.
7999 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
8000 this argument. Fixes pinvoke1.exe.
8002 2003-08-25 Lluis Sanchez <lluis@ximian.com>
8004 * object.h: Added call_type field to MonoMethodMessage and the corresponding
8005 enumeration of values. Removed fields to store remote call output values in
8006 MonoAsyncResult. Not needed any more.
8007 * object.c: Initialize call_type and async_result fields in mono_message_init.
8008 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
8009 dispatching the message.
8010 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
8011 async call to finish. To do it use a message with EndInvoke call type.
8013 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
8015 * loader.h loader.c (mono_method_hash_marhal_info): New function which
8016 determines whenever a method has marshalling info.
8018 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8020 * assembly.c: fix the build on windows.
8022 2003-08-22 Lluis Sanchez <lluis@ximian.com>
8024 * object.cs: Fixed bug #47785.
8026 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
8028 * string-icalls.c (StringReplace): If their are no occurances of
8029 the old string found return a reference to the supplied
8030 string. This saves some memory and matches MS behavoir.
8032 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8034 * socket-io.c: fixed compilation for systems that define AF_INET6
8035 and don't define SOL_IP/SOL_IPV6.
8037 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
8039 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
8040 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
8042 * rawbuffer.c rawbuffer.h: Make this module thread safe.
8044 * domain.c: Make this module thread safe.
8046 * domain.c (mono_init): Call new initialization function.
8048 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
8049 reference types too. Fixes #38812.
8051 * image.c (mono_image_init): Fixed warnings.
8053 * class.c (mono_class_from_typeref): Handle assembly load failure
8056 * appdomain.c (add_assemblies_to_domain): Handle the case when
8057 the references of an assembly are not yet loaded.
8059 * metadata.c image.c assembly.c: Moved initialization of global
8060 variables to a separate function called at startup since lazy
8061 initialization of these variables is not thread safe.
8063 * image.c assembly.c: Made this module thread safe by adding locks in
8064 the appropriate places.
8066 * domain.c (mono_init): Call the new initialization functions of the
8069 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
8071 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
8072 make a direct call. It is proxy's work to make the call asynchronous.
8073 mono_delegate_end_invoke(): If the targe is a proxy, just collect
8075 * object.cs: mono_method_call_message_new(): read AsyncResult and
8076 state object from parameters list, if this info is requested.
8077 * object.h: Added fields to store remote call output values in
8078 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
8080 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
8082 * object.h: add needed fields to MonoThread.
8083 * threads.c, threads.h: allow registering a function to cleanup data
8084 allocated per thread by the JIT.
8086 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
8088 * loader.h: portability fix by Bernie Solomon
8089 * <bernard@ugsolutions.com>.
8091 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
8093 * reflection.h reflection.c (mono_param_get_objects): Changed this to
8094 return a MonoArray. This simplifies the code and also ensures that
8095 the cache allways contains an object reference as a value.
8097 * icall.c (ves_icall_get_parameter_info): Simplified using the new
8100 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8102 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
8103 fixes a problem with byte ordering when getting the address family for
8106 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
8108 * .cvsignore: Added monosn.
8110 * reflection.h reflection.c loader.c: Added support for parameter
8111 marshalling to dynamically created types. Fixes #47295.
8113 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
8115 * rand.c: remove useless warnings.
8117 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
8119 * class.c: implemented ldtoken for methods and fieldrefs.
8121 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8123 * threadpool.c: when mono_async_invoke was called, no one took care of
8124 monitoring the queue. So if the method invoked took some time and we
8125 got new async invoke requests after 500 ms (the thread created waited
8126 that long in WaitForSingleObject), the new async invoke was not called
8127 until the previous one finished.
8129 This is fixed now. Thanks to Totte for helping with it.
8131 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8133 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
8135 2003-08-11 Martin Baulig <martin@ximian.com>
8137 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
8139 2003-08-06 Martin Baulig <martin@ximian.com>
8141 * mono-debug-debugger.c: Added support for static fields,
8142 properties and methods.
8144 2003-08-06 Martin Baulig <martin@ximian.com>
8146 * mono-debug-debugger.c: Don't store the MonoString's vtable to
8147 make this work for applications with multiple application domains.
8149 2003-08-04 Martin Baulig <martin@ximian.com>
8151 * mono-debug-debugger.c: Completely reworked the type support; the
8152 most important thing is that we're now just using one single
8153 `MonoType' instance per type.
8155 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
8157 * mono-endian.h, mono-endian.c, icall.c: Added icall
8158 ves_icall_System_Double_AssertEndianity to assert double word endianity
8159 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
8161 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
8163 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
8164 support, icalls and fixes.
8166 2003-07-31 Miguel de Icaza <miguel@ximian.com>
8168 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
8169 classes that are a punctuation character in .NET is not the same a
8172 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
8174 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
8176 2003-07-29 Miguel de Icaza <miguel@ximian.com>
8178 * icall.c: Add new MemCopy internalcall.
8179 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
8180 Simplified code; It is not necessary to handle all the cases here,
8181 as the C# code takes care of it. Only handle the case of the name
8182 resource embedded into the assembly.
8184 Changed signature to return the data pointer and the size of the
8187 2003-07-26 Miguel de Icaza <miguel@ximian.com>
8189 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
8190 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
8192 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
8194 * socket-io.c: ignore EINTR error in select.
8196 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
8198 * class.h, class.c: removed unused subclasses field in MonoClass.
8200 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
8202 * icall.c: improve fix of get_base_definition(). If the parent class
8203 doesn't have the mehod, look at the parent of the parent.
8204 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
8205 to check if a parameter is an in or out parameter
8206 (PARAM_ATTRIBUTE_IN is not set by default).
8207 mono_method_return_message_restore(): Use mono_class_value_size to
8208 get the size of a value type. mono_type_stack_size (parameterType)
8209 does not return the correct value if parameterType is byRef.
8210 mono_load_remote_field(), mono_load_remote_field_new(),
8211 mono_store_remote_field(), mono_store_remote_field_new():
8212 raise exception if the remote call returns an exception.
8214 2003-07-28 Martin Baulig <martin@ximian.com>
8216 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
8217 method. This is a wrapper around mono_runtime_invoke() which
8218 boxes the instance object if neccessary.
8220 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
8222 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
8223 metadata.h, row-indexes.h, verify.c: first cut of generics support.
8225 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
8227 * icall.c: disable mcs bug workaround.
8229 2003-07-21 Miguel de Icaza <miguel@ximian.com>
8231 * object.c (mono_runtime_class_init): Take the metadata_section
8232 mutex before obtaining the domain mutex.
8234 * appdomain.h: Added definition of metadata_section mutex here.
8236 * object.c: define metadata_mutex here.
8238 2003-07-24 Ravi Pratap <ravi@ximian.com>
8240 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
8243 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
8245 * reflection.c: Fix bug #46669
8247 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8252 * object.h: fill in the type name for TypeLoadException.
8254 2003-07-23 Ravi Pratap <ravi@ximian.com>
8256 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
8257 relationship between TypeBuilders while compiling corlib) and bug
8258 45993 (Array types returned from the runtime while compiling
8259 corlib were from the loaded corlib).
8261 2003-07-22 Martin Baulig <martin@ximian.com>
8263 * mono-debug-debugger.c: Reworked the type support a bit more;
8264 distinguish between types and classes.
8266 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
8268 * icall.c: add IsArrayImpl icall.
8270 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
8272 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
8273 initializing real_size only once. Also fix bug #46602.
8275 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
8277 * object.c: Renamed mono_metadata_section to metadata_section.
8279 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
8281 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
8282 empty array if the type is an array. Fixed.
8283 ves_icall_MonoMethod_get_base_definition: if the base method
8284 is abstract, get the MethodInfo from the list of methods of
8286 * reflection.c: ParameterInfo.PositionImpl should be zero-based
8287 and it was 1-based. Fixed in mono_param_get_objects.
8289 2003-07-20 Martin Baulig <martin@ximian.com>
8291 * mono-debug.h: Set version number to 31.
8292 (mono_debug_init): Added `MonoDomain *' argument.
8294 * mono-debug-debugger.c: Reworked the type support; explicitly
8295 tell the debugger about builtin types; pass the `klass' address to
8298 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
8300 * image.c: Allow new metadata tables to be loaded without a
8301 warning. Also update the warning message to give the new constant value.
8303 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
8305 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
8306 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
8307 array type representation changes.
8309 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
8311 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
8312 on Environment.Exit () call.
8314 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
8316 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
8317 requires a matching corlib.
8319 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
8321 * Changelog: My editor decided to add a CR to each line. Sorry about that.
8322 Committed again without the CRs.
8324 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
8326 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
8327 getting it from the "this" socket instance. Did not work
8328 if the socket is a subclass of Socket.
8329 Also fixed bug #35371.
8331 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
8333 * metadata.c: fixed size for TypedByRef.
8334 * loader.c: when searching for a method, consider the vararg amrker.
8335 * unicode.c, decimal.c: constify some arrays.
8337 2003-07-15 Dick Porter <dick@ximian.com>
8339 * socket-io.c: Fixed compilation for gcc < 3.2.
8341 Fixed compilation for machines that don't have AF_INET6 (thanks to
8342 Bernie Solomon <bernard@ugsolutions.com> for that part.)
8344 Fixed compile warnings.
8346 Fixed formatting and line endings.
8348 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
8351 * socket-io.c: Added IPv6 support.
8353 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
8355 * class.c (mono_class_is_assignable_from): New function to implement
8356 the is_assignable_from logic. Used by mono_object_isinst,
8357 Type::IsAssignableFrom () and the interpreter.
8359 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
8360 Object, even interfaces.
8362 * object.c (mono_object_isinst): Implement in terms of
8365 * icall.c (ves_icall_type_is_assignable_from): New icall.
8367 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
8369 * domain.c (foreach_domain): fix compiler warning.
8371 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
8373 * image.c (load_metadata_ptrs): use g_strndup because strndup is
8374 not available on all plattforms
8376 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
8378 * image.h image.c: Store the metadata version string in MonoImage.
8379 * icall.c: New icall to retrieve the image version.
8380 * reflection.c (create_dynamic_image): Fill in the image version field
8381 * reflection.c (build_compressed_metadata): Use the image version
8382 from the image structure.
8384 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8386 * appdomain.c: modified comment.
8387 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
8388 That will be its last iteration when mono_gc_cleanup is called from
8389 mono_runtime_cleanup and before the domain is unloaded.
8393 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
8395 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
8398 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
8400 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
8401 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
8402 Bernie Solomon <bernard@ugsolutions.com>.
8404 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
8406 * object.c, object.h: provide mono_object_new_fast() for faster
8407 allocation in some special cases.
8409 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
8411 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
8412 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
8414 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
8416 * threadpool.c: fix leaks.
8418 2003-07-01 Dick Porter <dick@ximian.com>
8420 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
8421 using MonoGHashTables. Fixes threadpool bug posted to list.
8423 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
8425 * image.h, image.c: added support to load an assembly from a byte array.
8426 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
8427 assembly bundle support.
8429 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
8431 * threadpool.c (mono_thread_pool_add): keep a reference to the
8432 AsyncResult to prevent GC
8434 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
8436 * class.c: leak fix.
8438 2003-06-25 Dick Porter <dick@ximian.com>
8440 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
8441 for the async object, the WaitHandle object will close the handle.
8444 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
8446 * class.c: in mono_array_class_get (), lookup from the hash with the
8447 same type we insert: this works around a bug in
8448 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
8449 lluis. The real fix will have to wait for after the release.
8451 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
8453 * icall.c: fix memory leak when getting type members.
8455 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
8457 * reflection.c: added more pubtoken special cases.
8459 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
8461 * class.c: handle field offset correctly when class size
8462 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
8464 2003-06-20 Martin Baulig <martin@ximian.com>
8466 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
8469 2003-06-20 Martin Baulig <martin@ximian.com>
8471 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
8473 2003-06-20 Martin Baulig <martin@ximian.com>
8475 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
8476 just distinguish between variables in registers and variables at
8477 an offset relative to a register.
8479 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8481 * icall.c: #ifdef out latest changes until mcs is fixed.
8483 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
8485 * icall.c: return members in metadata order.
8487 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
8489 * icall.c: avoid infinite loop in GetTimeZoneData.
8491 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
8493 * icall.c: added Marshal.Prelink/All icalls.
8495 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
8497 * object.c, object.h: fix warnings and do some overflow checking
8498 when creating arrays.
8500 2003-06-17 Dick Porter <dick@ximian.com>
8503 * file-io.c: File attributes need to be tweaked slightly when
8504 passed from the managed to the w32 world.
8506 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
8507 * profiler.h profiler-private.h profiler.c: Rework last patch
8508 based on suggestion by Paolo.
8510 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
8512 * profiler.h profiler-private.h profiler.c: Added infrastructure for
8513 instruction level coverage data collection.
8514 * profiler.h profiler.c (: Added new callback function which can be
8515 used by the profiler to limit which functions should have coverage
8517 * profiler.c (mono_profiler_load): Call g_module_build_path to
8518 generate the file name of the profiler library.
8520 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
8522 * profiler.c, profiler.h, profiler-private.h: added basic block
8523 coverage profiling API.
8525 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
8527 * reflection.c (mono_reflection_create_runtime_class): Add support
8528 for events in dynamically generated code.
8530 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
8533 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
8535 * icall.c: when getting timezone info, return reasonable values if we
8536 can't get the actual data.
8538 2003-06-14 Dick Porter <dick@ximian.com>
8540 * threads.c (start_wrapper): Remove the reference to the thread
8541 object in the TLS data, so the thread object can be finalized.
8542 This won't be reached if the thread threw an uncaught exception,
8543 so those thread handles will stay referenced :-( (This is due to
8544 missing support for scanning thread-specific data in the Boehm GC
8545 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
8547 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
8549 * reflection.c: ensure streams and tables are first allocated with
8550 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
8552 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
8554 * icall.c: fixed GetElementType for byrefs (bug# 44792).
8556 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
8558 * reflection.c (mono_reflection_create_runtime_class): Add support for
8559 properties to dynamically created classes.
8560 * reflection.c: Fix a few places where non-MonoObjects were inserted
8561 into the tokens hashtable.
8563 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
8565 * object.c: some support to handle out of memory exceptions.
8567 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
8569 * marshal.c (mono_marshal_get_native_wrapper): support reference
8572 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
8574 * object.h, object.c: more portability stuff from Bernie Solomon.
8575 Unexport mono_object_allocate(). Added mono_object_unbox ().
8576 Set exitcode when an unhandled exception is thrown.
8578 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
8580 * marshal.c (mono_marshal_get_native_wrapper): use custom
8581 marshaler for return types.
8583 2003-06-10 Dick Porter <dick@ximian.com>
8585 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
8586 ip_mreq is available
8588 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
8590 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
8591 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
8592 by Bernie Solomon <bernard@ugsolutions.com>.
8594 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
8596 * gc.c (mono_gc_init): Avoid error message on shutdown when
8597 GC_DONT_GC=1 is used.
8599 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
8600 New icall to return the GUID of a module.
8602 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
8604 * class.c: ensure instance size always includes the parent's size
8605 even whem class size is set explicitly (fixes bug#44294).
8607 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
8609 * profiler.h, profiler.c: made the simple profiler thread-safe,
8610 get more accurate timing info. Allow the loading of an
8611 externally-developed profiler module.
8613 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
8615 * marshal.c (mono_marshal_get_native_wrapper): improved
8616 class/byref arguments.
8617 (mono_marshal_get_native_wrapper): better string marshaling support.
8619 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
8621 * class.c: ensure .pack and .size are handled correctly and
8622 simplified layout of static fields.
8624 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
8627 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
8629 * loader.c (mono_lookup_pinvoke_call): look for modules in the
8630 current directory (fix bug 44008)
8632 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
8634 * marshal.c (mono_marshal_get_native_wrapper): started support for
8636 (mono_delegate_to_ftnptr): consider marshalling specifications
8638 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
8640 * reflection.c, reflection.h: emit custom marshal info.
8642 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8644 * object.c: free the GError.
8645 * icall.c: added CloseEvent_internal.
8647 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
8650 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
8652 * loader.c (mono_method_get_signature): Add support for dynamic
8655 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
8657 * reflection.c: fixed bug #43905.
8659 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
8661 * class.c, domain.c, icall.c, metadata.h, object.h: support for
8662 handling TypedReference and ArgIterator.
8663 * loader.c, loader.h: added function to get signature at call site.
8665 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
8667 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
8668 data readonly. Buglets and warning fixes. Some MethodSpec support.
8670 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
8672 * class.h, class.c, object.c: remove relative numbering support.
8674 2003-05-26 Miguel de Icaza <miguel@ximian.com>
8676 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
8677 free the string, until we get a chance to fix Gtk#
8679 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8681 * marshal.c: revert last patch.
8683 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
8685 * icall.c: updates for new mono_class_vtable() not calling
8686 the type constructor anymore.
8688 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
8690 * object.h, object.c: separate vtable creation from type
8691 initialization. Make running the .cctor thread safe.
8693 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
8695 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
8697 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
8699 * loader.c (mono_get_method): consider calling convention
8701 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
8703 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
8704 to return the invisible global type for a module.
8706 * reflection.c (mono_image_build_metadata): Emit global fields too.
8708 2003-05-20 Peter Williams <peterw@ximian.com>
8710 * loader.c (mono_lookup_internal_call): Add a few newlines.
8712 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
8714 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
8717 * appdomain.c (set_domain_search_path): Recalculate search path when
8718 AppDomainSetup.PrivateBinPath changes.
8720 * object.c (mono_class_compute_gc_descriptor): It turns out some
8721 parts of the class libs (like System.Thread) holds pointers to
8722 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
8723 to treat native int a pointer type here.
8725 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
8727 * appdomain.h, domain.c: add hashtable for jump target resolution.
8729 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
8731 * reflection.h reflection.c icall.c: Added new icalls
8732 GetManifestResourceInfoInternal, GetModulesInternal and support
8735 2003-05-16 Dick Porter <dick@ximian.com>
8739 * file-io.c: Implement System.IO.MonoIO::GetTempPath
8741 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
8743 * object.c: mono_store_remote_field: little fix to previous patch.
8745 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
8747 * class.c: add constructors to array classes.
8748 * icall.c: special case array construction for InternalInvoke (),
8750 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
8752 * class.h class.c reflection.c object.c: Added support for field
8753 defaults in dynamically generated classes.
8755 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
8757 * reflection.c: properly encode charset for ddlimport.
8759 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
8761 * threads.c: allow compiling without GC.
8763 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
8765 * appdomain.h, object.c, object.h, threads.c, threads.h: added
8766 handling of thread static data.
8768 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
8770 * reflection.h, reflection.c: added mono_custom_attrs_free ().
8772 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
8774 * class.c (mono_array_class_get): always set the serializable flags
8775 (mono_array_class_get): always set the SEALED attribute for array types
8777 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
8779 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
8780 attributes (fix for bug 42021).
8782 2003-05-12 Dick Porter <dick@ximian.com>
8784 * gc.c: Don't run finalizers when the finalizer thread is
8785 finishing up, because the default domain has already been
8788 2003-05-11 Miguel de Icaza <miguel@ximian.com>
8790 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
8791 value is null, we should throw an exception. This is slightly
8792 different than the other conventions used for the constructor.
8794 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8796 * socket-io.c: fixed windows build.
8798 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8800 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
8802 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
8804 * object.c (mono_string_new_wrapper): Compatibility fix for MS
8807 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
8809 * class.c (mono_class_layout_fields): Add experimental GC aware
8810 auto layout facility. Requires class library changes to work correctly.
8812 (mono_class_setup_vtable): Avoid overriding explicit interface
8813 method implementations. Fixes iface3.exe test.
8815 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
8817 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
8818 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
8820 * metadata.h: Add new type classification macro which determines
8821 whenever the type holds an object reference.
8823 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
8825 * marshal.c (mono_marshal_get_native_wrapper): cleanups
8827 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
8829 * gc.c (finalizer_thread): Work around a GC bug.
8831 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
8833 * marshal.c (emit_struct_conv): allow unions
8835 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
8837 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
8839 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
8841 2003-05-06 Martin Baulig <martin@ximian.com>
8843 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
8845 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8848 (Select_internal): allow NULLs, don't create arrays if not needed.
8849 Coupled with Socket.cs changes.
8852 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
8853 register a finalizer for it that will close the semaphore handle. This
8854 fixes the leak and make Lupus' test run with > 4080 loops.
8856 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
8858 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
8859 Jerome Laban (bug #42287)
8861 2003-05-02 Martin Baulig <martin@ximian.com>
8863 * debug-mono-symfile.h
8864 (MonoSymbolFile): Moved declaration into mono-debug.h.
8865 (MonoDebugMethodJitInfo): Likewise.
8866 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
8868 (_mono_debug_address_from_il_offset): Take a
8869 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
8872 (MonoDebugDomainData): New struct.
8873 (mono_debug_get_domain_data): New function.
8874 (mono_debug_add_method): Take an additional `MonoDomain *'
8876 (mono_debug_source_location_from_address): Likewise.
8877 (mono_debug_il_offset_from_address): Likewise.
8878 (mono_debug_address_from_il_offset): Likewise.
8880 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
8882 * reflection.c: one more check for null type in custom attrs.
8884 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8886 * reflection.c: avoid warning (comparison is always false due to limited
8887 range of data type).
8889 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8891 * icall.c: throw an exception in Type.GetField if the argument 'name'
8894 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
8896 * reflection.c: fixed handling of enums in named arguments to custom
8897 attributes (bug #42123).
8899 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
8901 * reflection.c: use the right array element type and handle
8902 a null for a Type argument, too.
8904 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
8906 * reflection.c: handle arrays as arguments to custom attributes.
8908 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
8910 * reflection.c: handle a string value in a custom attr
8911 ctor that takes an object.
8913 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
8915 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
8918 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
8920 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
8922 2003-04-27 Martin Baulig <martin@ximian.com>
8924 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
8925 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
8926 MONO_DEBUGGER_EVENT_BREAKPOINT.
8927 (mono_breakpoint_trampoline_code): Removed.
8928 (mono_debugger_event_handler): The last argument is now a
8930 (mono_debugger_insert_breakpoint_full): Removed the
8931 `use_trampoline' argument.
8932 (mono_debugger_method_has_breakpoint): Likewise.
8933 (mono_debugger_trampoline_breakpoint_callback): Renamed to
8934 mono_debugger_breakpoint_callback(); take the method and
8935 breakpoint number as arguments.
8937 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
8939 * metadata.c: fix off by one when loading parameters attributes.
8941 2003-04-24 Martin Baulig <martin@ximian.com>
8943 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
8945 2003-04-24 Martin Baulig <martin@ximian.com>
8947 * mono-debug-debugger.c: Moved all code which interacts with the
8950 * debug-mono-symfile.c: This code now just deals with the symbol
8951 file itself, the debugger code is now in mono-debug-debugger.c.
8953 2003-04-23 Martin Baulig <martin@ximian.com>
8955 * mono-debug.c (mono_debug_source_location_from_il_offset):
8956 New method; like mono_debug_source_location_from_address(), but
8957 takes an IL offset instead of a machine address.
8959 2003-04-23 Martin Baulig <martin@ximian.com>
8961 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
8962 `line' field; this is now computed by the debugger.
8964 2003-04-23 Martin Baulig <martin@ximian.com>
8966 * mono-debug.[ch]: New files. This is the new debugging interface.
8968 * mono-debug-debugger.[ch]: New files. Moved all code which
8969 interacts with the Mono Debugger here.
8971 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
8973 * domain.c (mono_init): initialize mono_defaults.monitor_class
8975 2003-04-21 Miguel de Icaza <miguel@ximian.com>
8977 * reflection.c (method_encode_code): Add a spicy exception to help
8978 future compiler authors.
8980 2003-04-21 Martin Baulig <martin@ximian.com>
8983 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
8984 Make this work with relative pathnames; g_filename_to_uri() needs
8985 an absolute filename.
8987 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
8989 * icall.c: Track name changes in Object and ValueType.
8991 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
8993 * metadata.c (mono_type_stack_size): size should be a multiple of
8996 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8999 (internal_domain_finalize): moved into mono_domain_finalize. No need
9000 to create another thread because the finalizers will be run in the
9003 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
9004 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
9005 to be run (MS does this too).
9007 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
9009 * object.c (mono_class_compute_gc_descriptor): Update comment.
9011 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
9013 * image.h: Add synchronized wrapper cache.
9015 * image.c (do_mono_image_open): Initialize cache.
9017 * reflection.c (create_dynamic_mono_image): Initialize cache.
9019 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9021 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
9022 ves_icall_System_Buffer_ByteLengthInternal.
9024 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
9026 * reflection.c: setup klass->nested_in earlier. Allow
9027 a dash in the assembly name.
9029 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
9031 * metadata.c (mono_type_to_unmanaged): dont access
9032 type->data.klass for MONO_TYPE_OBJECT
9033 (mono_type_to_unmanaged): consider System.Delegate class
9035 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
9037 * class.c: just setup supertypes in the proper place instead of
9038 initializing the full element class for arrays.
9040 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
9042 * class.c: ensure the element class of arrays is initialized.
9043 Setup the supertype info for array classes, too.
9045 2003-04-14 Miguel de Icaza <miguel@ximian.com>
9047 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
9049 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9051 * Makefile.am: re-added -m option when running cygpath. This way,
9052 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
9054 * mono-config.c: same codepath for locating mono config file for WIN32
9056 * assembly.c: if mono_assembly_setrootdir is called, don't override
9059 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9061 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
9062 MONO_ASSEMBLIES variable.
9064 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
9066 * icall.c: added Assembly::GetNamespaces() icall.
9068 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9070 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
9072 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
9074 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
9075 * object.c: fixed bug in the construction of vtable for proxies
9077 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
9079 * object.c (mono_array_new): Mark mono_array_new as an icall.
9081 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9083 * class.c: fixed test for public method when overriding interfaces.
9086 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
9088 * appdomain.h, domain.c: added mono_domain_foreach() to
9089 be able to access the currently loaded appdomains.
9090 * object.c: make string interning work across sppdomains.
9091 Mark some functions for use as icalls.
9093 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
9095 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
9097 * reflection.h reflection.c: Allocate long living data using
9098 GC_MALLOC_ATOMIC so the collector does not need to scan it.
9100 * reflection.c: Double the allocation size in streams instead of
9101 increasing it, to prevent unneccesary copying on large assemblies.
9103 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
9104 creation if the assembly does not have the Run flag set.
9106 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
9108 * class.h: avoid the C++ keywords in header files (Jerome Laban
9109 spotted and fixed this).
9111 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9114 (mono_unhandled_exception): fill in the arguments for the
9115 UnhandledException event. Only trigger that event for the default
9116 domain (as MS does).
9118 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
9120 * object.c: Improve typed allocation stuff based on suggestions from
9121 Paolo. Also turn it on if the GC library supports it.
9123 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
9125 * object.c object.h class.h: Added experimental typed allocation
9126 facility using the interfaces in gc_gcj.h.
9128 * os/gc_wrapper.h: Added new include files.
9130 2003-04-03 Martin Baulig <martin@ximian.com>
9132 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
9133 which is not yet enabled by default.
9135 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
9137 (mono_gc_lock, mono_gc_unlock): New static functions.
9139 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
9140 functions; stop/start the world for the garbage collector. This
9141 is using the windows API; we need to complete the SuspendThread()/
9142 ResumeThread() implementation in the io-layer to make this work on Unix.
9143 (mono_gc_push_all_stacks): New public function; tells the garbage
9144 collector about the stack pointers from all managed threads.
9146 2003-04-03 Martin Baulig <martin@ximian.com>
9148 * object.h (MonoThread): Added `gpointer stack_ptr'.
9150 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
9152 2003-04-03 Martin Baulig <martin@ximian.com>
9154 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
9156 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
9158 * reflection.c (typebuilder_setup_fields): Initialize field.first and
9161 2003-04-02 Miguel de Icaza <miguel@ximian.com>
9163 * loader.c (mono_lookup_internal_call): Report the corlib that is
9166 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
9168 * icall.c (ves_icall_type_GetTypeCode): fixed check for
9169 System.DBNull (it's class not valuetype).
9171 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
9173 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
9174 if the array method was already assigned a token (fixes bug#40646).
9176 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
9178 * reflection.c (mono_reflection_get_type): Attempt type resolve even
9179 if no assembly is given.
9181 2003-04-01 Miguel de Icaza <miguel@ximian.com>
9183 * metadata.h: Added the new tables.
9185 * row-indexes.h: Added definitions for new tables.
9187 * metadata.c: Add schemas for new tables, and add support for
9188 computing the sizes of them.
9190 * class.c: Update for handling the new type cases.
9192 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
9194 * metadata.h (MONO_TYPE_IS_VOID): new macro
9196 2003-03-31 Martin Baulig <martin@ximian.com>
9198 * threads.h (MonoThreadCallbacks): Added `thread_created'.
9200 * threads.c (mono_thread_new_init): Call `thread_created' in the
9201 mono_thread_callbacks.
9203 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
9205 * loader.h: added marshalbyrefobject_class to mono_defaults
9206 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
9207 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
9208 generation of output parameters.
9209 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
9210 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
9211 contextbound and the target object belongs to the context of the caller.
9212 * object.h: added context and unwrapped_server variables in MonoRealProxy.
9213 * object.c: Implemented support for interfaces and abstract classes
9214 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
9215 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
9217 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
9219 * class.h class.c (mono_class_is_subclass_of): New function.
9221 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
9222 routines for most common case (calls from ArrayList::ToArray).
9224 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
9225 routine so programs which call Environment::Exit() can be profiled.
9227 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
9228 Added MONO_ARCH_SAVE_REGS.
9230 * icall.c (ves_icall_type_is_subtype_of): Use new function.
9232 2003-03-29 Miguel de Icaza <miguel@ximian.com>
9234 * blob.h: Add a couple of new MonoType types definitions.
9236 * tabledefs.h: Add a couple of new call convs.
9238 2003-03-27 Zoltan Varga <vargaz@freemail.h>
9240 * reflection.h (MonoReflectionDynamicAssembly): track changes in
9241 the layout of the class.
9243 * reflection.c (alloc_table): double the size on overflow to avoid
9244 unnecessary copying.
9246 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
9247 avoid filling out metadata tables and blobs. Also set mb->ilgen to
9248 null so it can be garbage collected.
9250 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
9252 * reflection.c (mono_reflection_get_type): Return the resolved type
9253 only if it is in the assembly we searched.
9255 * reflection.c (ensure_runtime_vtable): Initialize method slots.
9257 * class.c (mono_class_setup_vtable): Set the slot of the overriding
9260 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9263 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
9264 the right one is 'file:///blah', but MS allows it.
9266 (mono_assembly_open): allow 'file://blah'
9268 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
9270 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
9272 * socket-io.c: fixes bug #40310.
9274 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
9276 * reflection.c (mono_reflection_parse_type): handle deeply nested
9279 * reflection.c (mono_image_create_token): Use unique token values
9280 since they will be put into a hash table.
9282 * class.c (mono_class_setup_vtable): If a method occurs in more than
9283 one place in the vtable, and it gets overriden, then change the
9284 other occurances too.
9286 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
9287 object as return type.
9289 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
9291 * icall.c: Deleted "ToString" implementation for double and float
9292 because they are full implemented in managed code.
9294 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
9296 * reflection.c, reflection.h: implemented and exported functions
9297 to retrieve info about custom attributes.
9299 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9301 * appdomain.c: moved Uri handling to assembly.c
9302 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
9303 work when using a file Uri in *nix and windows.
9305 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
9306 GetReferencedAssemblies.
9308 2003-03-18 Dick Porter <dick@ximian.com>
9310 * icall.c: Rename a couple of internal calls
9312 * threads.c: Set the thread state to Stopped when a thread exits.
9315 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
9317 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
9320 * object.c (mono_class_vtable): fix warning.
9322 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
9324 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
9326 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
9328 (method_encode_clauses): Create exception info structures in the right
9330 (mono_reflection_setup_internal_class): Initialize supertypes field.
9332 * class.c object.c: Handle interfaces which implement other interfaces
9335 * class.h class.c: Move the supertypes array initialization code into
9336 a separate function so it can be used for dynamic types too. Also call
9337 it earlier, in mono_class_init(), since it can be used before the
9338 type is initialized.
9340 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9344 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
9349 * object.c: remove warnings.
9351 2003-03-13 Martin Baulig <martin@ximian.com>
9353 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
9354 (MonoDebugLexicalBlockEntry): New types.
9356 * debug-mono-symfile.c
9357 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
9359 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9361 * process.c: ret can be any non-zero value accroding to MS doc.
9363 2003-03-07 Miguel de Icaza <miguel@ximian.com>
9365 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
9366 fixing a warning for a miss-used prototype, would have cause
9367 random memory corruption.
9369 2003-03-07 Martin Baulig <martin@ximian.com>
9371 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
9372 getting really annoying ....
9374 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
9376 * reflection.c (fixup_method): added support for array methods.
9378 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
9380 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
9381 (pointed out by Michael Adams).
9383 2003-03-04 Dick Porter <dick@ximian.com>
9385 * icall.c: Temporarily reverted the Double and Single ToString()
9386 change, because it broke nunit.
9388 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
9390 * object.h, threads.h: make include files compatible with C++
9391 (patch by Jerome Laban <jlaban@wanadoo.fr>).
9393 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
9395 * icall.c: Erased ToString helper functions for Double and Single.
9396 Now, that implementations ar all in managed code (Double and Single
9399 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
9401 * appdomain.c: Added method for initializing the default context of
9402 a domain. Added internal call for getting the default context.
9403 * appdomain.h: Added context variable in MonoDomain struct.
9404 * domain.c: mono_domain_set also sets the default context of the domain
9405 * icall.c: Mapped internal method InternalGetDefaultContext.
9406 * object.c: mono_object_get_virtual_method returns always a remoting
9407 wrapper if the object is a transparent proxy.
9408 mono_runtime_invoke_array: when creating an object by calling the
9409 constructor, if the created object is a proxy, then the constructor should
9410 be called using the a remoting wrapper.
9412 2003-03-03 Dick Porter <dick@ximian.com>
9414 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
9415 variable so it compiles on solaris. Problem spotted by
9416 Christopher Taylor <ct@cs.clemson.edu>
9418 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9421 (get_info_from_assembly_name): don't leak value.
9424 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
9427 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
9429 * assembly.c: export mono_image_load_references ().
9430 * class.c: handle function pointers. mono_class_from_name() now
9431 supports nested type names directly.
9433 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
9435 * reflection.h reflection.c: Encode already created dynamic methods
9436 and fields correctly as a DEF instead of a REF.
9438 * reflection.c: Get rid of the force_ref argument to
9439 mono_image_typedef_or_ref since it was wrong in the first place.
9441 * string-icalls.c: add error checking to string constructors according
9444 * reflection.c: Emit types in the order their TypeBuilders were
9445 created. Previously, a new table index was assigned to each type before
9446 the tables were emitted. This was wrong because the signature blob
9447 might already refer to a type by its original table index.
9449 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
9451 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
9454 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9456 * Makefile.am: make assemblies dir have \ instead of / on windows.
9458 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
9460 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
9461 iterate over the NESTEDCLASS table using a linear search since the
9462 table is not guaranteed to be sorted by the secondary key.
9464 * class.c (mono_class_create_from_typedef): fixed up call to
9465 mono_metadata_nesting_typedef.
9467 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
9469 * marshal.c (mono_string_to_byvalstr): clear the memory as
9470 suggested by Jerome Laban <jlaban@wanadoo.fr>
9472 2003-02-26 Dick Porter <dick@ximian.com>
9474 * process.c: Cope with padding in .rsrc blocks
9476 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
9478 * metadata.h: reverted the filter_len change, it breaks reflection
9480 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
9482 * metadata.h: added a new field to store the filter_len
9485 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
9487 * reflection.c: handle custom attributes for types and members
9488 created with Reflection.Emit (bug#38422).
9490 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
9492 * reflection.c: define RTSpecialName automatically for constructors for
9493 compatibility with MS.NET.
9495 * reflection.c (mono_reflection_create_runtime_class): initialize
9496 nested_in field of dynamically created classes.
9498 2003-02-22 Martin Baulig <martin@ximian.com>
9500 * debug-mono-symfile.h: Incremented version number.
9502 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
9504 * object.h icall.c process.c: fix warnings.
9506 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
9508 * appdomain.h appdomain.c:
9509 (mono_domain_try_type_resolve): split the
9510 name_or_tb argument into a name and a tb argument.
9511 (mono_domain_has_type_resolve): new function to check whenever the
9512 application has registered a TypeResolve event handler.
9514 * icall.c reflection.h reflection.c: move the type resolve logic into
9515 mono_reflection_get_type () so it will be invoked when
9516 Assembly::GetType () is called.
9519 (mono_reflection_get_type): renamed to get_type_internal.
9520 (mono_reflection_get_type): fixed type name generation so it works
9521 for nested types too.
9522 (mono_reflection_get_type): call has_type_resolve () to avoid the
9523 costly type name generation if there is no resolve event handler.
9525 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
9527 * class.c, image.c: load exported types from file references.
9529 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
9531 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
9532 used to cache the managed methods used to create proxies and make
9533 remote invocation of methods.
9534 * class.h: Added in MonoVTable a flag to indicate that a class needs
9535 to be remotely created.
9536 * object.c: Modified the method mono_class_vtable(). It now initializes
9537 the remote flag of the vtable. Modified mono_object_new_specific(),
9538 so now it checks the remote flag.
9539 * icall.c: Added a couple of internal methods, one for enabling instance
9540 creation interception for a type, and one for creating objects bypassing
9543 2003-02-18 Martin Baulig <martin@ximian.com>
9545 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
9546 New interncall to get a method's metadata token.
9548 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
9549 New interncall for the debugger.
9551 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
9553 * class.c (mono_class_setup_vtable): allocate supertype array
9555 2003-02-18 Martin Baulig <martin@ximian.com>
9557 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
9559 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9562 (assembly_name_to_aname): jump over unknown properties (i've found
9563 something like: 'type, assembly, version=xxx, custom=null, public...',
9564 so now will ignore custom=null and still get the rest of the values).
9566 2003-02-17 Dick Porter <dick@ximian.com>
9568 * threads.c: Have Thread.Start() wait for a semaphore to signal
9569 that the thread has set up all its local data. This fixes bug
9570 34323, where Abort() raced the new thread's TLS data.
9572 Also removes the handle_store() call from start_wrapper, because
9573 threads are now always created suspended and there is no longer a
9574 race between the parent and child threads to store the info.
9576 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
9578 * image.c: explain the #- heap issue in a message, hopefully
9579 avoiding FAQs on mono-list.
9581 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9584 (GetEntryAssembly): if the domain has not invoked
9585 AppDomain.ExecuteAssembly yet, return the assembly of the default
9588 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
9590 * class.c (mono_ldtoken): make it work in dynamic assemblies.
9592 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
9594 * metadata.c, reflection.c: simple speedup to type hash
9597 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
9599 * image.c, image.h, class.c, assembly.c: move module loading
9600 to MonoImage. When loading metadata, consider alignemnet from
9601 the start of metadata, not from the metadata address in memory.
9603 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
9605 * reflection.c (mono_reflection_get_custom_attrs): Added support for
9606 AssemblyBuilder objects. Factored out custom attribute creation into
9607 a separate function.
9608 (create_custom_attr): new function to create custom attributes.
9610 2003-02-12 Miguel de Icaza <miguel@ximian.com>
9612 * Makefile.am: Got tired of typing the full pathname to pedump.
9613 Until there is another option, am installing this.
9615 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
9617 * class.c (class_compute_field_layout): always set field->parent
9618 (mono_ldtoken): use mono_defaults.fieldhandle_class;
9620 2003-02-11 Dick Porter <dick@ximian.com>
9623 * monitor.c: Rewrote Monitor, making lock much faster and
9624 Pulse/Wait work as specified. Also uses much fewer handles, and only
9625 creates them as needed.
9627 * exception.c: Added SynchronizationLockException
9629 * threads.c: Deleted old Monitor implementation. The new one is
9632 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
9634 * class.c: handled TypedReference type code. Set the correct size for
9635 class data. Setup interface_offsets for interface classes, too.
9637 2003-02-09 Martin Baulig <martin@ximian.com>
9639 * debug-mono-symfile.h: Reflect latest symbol writer changes.
9641 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
9643 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
9644 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
9645 * object.c: fixed mono_object_get_virtual_method () for interfaces.
9646 * verify.c: check for code that runs after the end of the method.
9648 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
9650 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
9651 "System.Math::Round2".
9652 * sysmath.h: Added Floor, Round and Round2 definitions.
9653 * sysmath.c: Modified certain functions that were not 100% compliant
9654 with MS.NET (math precision) and added the implementation of Floor,
9657 2003-02-07 Martin Baulig <martin@ximian.com>
9659 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
9661 2003-02-07 Martin Baulig <martin@ximian.com>
9663 * debug-mono-symfile.c: Reflected latest symwriter changes.
9664 (mono_debug_create_mono_symbol_file): Removed.
9665 (mono_debug_open_mono_symbol_file): Take an argument which
9666 specifies whether to create a dynamic symbol file.
9668 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
9670 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
9672 2003-02-05 Martin Baulig <martin@ximian.com>
9674 * reflection.c (mono_image_build_metadata): Make this public,
9675 protect it against being called multiple times, don't create
9676 resources and don't build the compressed metadata here.
9677 (mono_image_create_pefile): Do this here.
9680 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
9682 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9684 * socket-io.c: fixed bug #36322.
9686 2003-02-06 Piers Haken <piersh@friskit.com>
9690 * debug-mono-symfile.c:
9696 * socket-io.c: warning cleanups
9698 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
9700 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
9701 function. works like remoting invoke, but does a check for the Proxy first.
9703 2003-02-05 Miguel de Icaza <miguel@ximian.com>
9705 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
9707 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
9709 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
9711 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
9712 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
9714 * object.c (mono_store_remote_field_new): used by the new jit
9715 instead of mono_store_remote_field
9716 (mono_load_remote_field_new): used by the new jit
9717 instead of mono_load_remote_field
9719 2003-02-05 Patrik Torstensson
9721 * appdomain.c: changed unload to take the domain id instead
9724 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
9727 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9729 * appdomain.c: don't look for assemblies in ApplicationBase if
9730 PrivateBinPathProbe is set.
9732 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9734 * object.c: make the first argument in main_args contain the absolute
9735 path to the assembly. Fixes bug #37511.
9737 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9739 * icall.c: get correct UTC offset for countries not using daylight
9740 time saving. Fixes bug #30030.
9742 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9744 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
9745 and 1 are the family).
9747 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
9749 * icall.c (ves_icall_InternalExecute): removed wrong assertion
9751 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
9753 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
9755 * reflection.c: added support for SignatureHelper tokens, which is
9756 needed by the Calli opcode.
9758 * reflection.h: track changes to SignatureHelper class.
9760 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
9762 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9764 * appdomain.c: fixed loading assemblies from PrivateBinPath.
9766 2003-02-03 Patrik Torstensson
9767 * appdomain.[c|h], domain.c :
9768 - Added support for getting a domain via domain id
9769 - Support for setting and getting domain from System.AppDomain
9770 (used in cross appdomain channel)
9771 - Added support for get/set for a MonoAppContext on a thread
9772 (Context class in System.Runtime.Remoting.Contexts),
9773 - Removed hack in Get/SetData and ExecuteAssembly.
9775 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
9776 the managed world to get control when a proxy is created.
9778 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
9780 2003-02-03 Miguel de Icaza <miguel@ximian.com>
9783 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9784 Populate the codebase field as well.
9786 2003-02-02 Martin Baulig <martin@ximian.com>
9788 * debug-mono-symfile.c
9789 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
9790 (mono_debug_symfile_add_method): Allow interncalls.
9792 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9794 * icall.c: throw parse exception if strtod fails or the string is empty.
9796 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
9798 * marshal.c: handle object type separately from defined
9801 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
9803 * marshal.c: handle NATIVE_LPSTR for strings when it's
9804 explicitly specified.
9806 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
9808 * reflection.c, reflection.h, icall.c: setup the reflection
9809 handle cache for ModuleBuilders and AssemblyBuilders.
9811 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
9813 * reflection.c (reflection_methodbuilder_to_mono_method): set
9816 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9818 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
9820 2003-01-29 Dick Porter <dick@ximian.com>
9822 * threads.c: No need for the fake_thread kludge now that Thread
9823 doesn't run a class constructor
9825 2003-01-29 Dick Porter <dick@ximian.com>
9827 * threads.c: Use g_direct_hash instead of the rather bogus
9830 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
9832 * marshal.c (mono_marshal_get_native_wrapper): add check for null
9834 (mono_marshal_get_struct_to_ptr): generate valid IL code
9835 (mono_marshal_get_ptr_to_struct): generate valid IL code
9836 (*): correctly set sig->pinvoke, we need to memdup the signature
9839 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
9841 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
9842 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
9844 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
9846 * profiler.c: provide more callers information.
9848 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
9850 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
9852 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
9854 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
9856 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
9858 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
9859 exception instead of going into an infinite loop on dates which it
9862 * string-icalls.c (ves_icall_System_String_get_Chars): raise
9863 out-of-range exception if needed.
9865 * class.c (mono_class_setup_vtable): allow a virtual method to provide
9866 an implementation for an interface method and to override an inherited
9867 method at the same time.
9868 Imagine a scenario when a virtual method is used to override a
9869 virtual abstract method in a parent class, and this same method
9870 provides an implementation for an method inherited from an interface.
9871 In this case, the interface resolution code will set im->slot, which
9872 means that the virtual method override pass will skip this method
9873 which means a pointer to the abstract method inherited from the parent
9874 will remain in the vtable of this non-abstract class.
9876 * class.c: (mono_class_setup_vtable): continue search for a real
9877 method if only an abstract method is found.
9879 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
9881 * reflection.c: add size to encoding for ByValStr and ByValArray
9882 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
9884 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
9886 * class.c (mono_class_setup_vtable): pass the override info as an
9889 * class.c (mono_class_setup_vtable): set the slot of overriding methods
9892 * reflection.c (ensure_runtime_vtable); add support for method
9895 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
9897 * reflection.c (resolution_scope_from_image): Hack to work to work with
9900 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
9901 added a 'force_ref' argument to force this function to allways return
9902 a TypeRef. This is needed by mono_image_get_memberref_token ().
9904 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
9906 * reflection.c (mono_image_get_type_info): interfaces really don't have
9909 * reflection.c (mono_image_basic_init): fill out missing fields of
9912 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
9913 dynamic assemblies. This is required so dynamic assemblies show up in
9914 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
9915 Type::GetType() etc. This is consistent with MS behaviour.
9917 * image.c image.h reflection.c: add newly created classes to the name
9918 cache so mono_class_get () will find them.
9920 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
9922 First part of changes to get IKVM.NET running under mono.
9924 * appdomain.h, appdomain.c: added new function
9925 mono_domain_try_type_resolve() which will emit TypeResolve events.
9926 This function will call AppDomain::DoTypeResolve to do the actual work.
9928 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
9929 moved existing code dealing with dynamic tokens to a new function
9930 called mono_reflection_lookup_dynamic_token (). This function will
9931 raise TypeResolve events when appropriate. Since reflection.c is not
9932 part of libmetadata, a new hook function called
9933 mono_lookup_dynamic_token() is added to class.c which will call this.
9935 * assembly.h assembly.c: make the invoke_load_hook function public,
9936 so it can be called for dynamic assemblies.
9938 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
9940 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
9943 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
9944 MonoGHashTable, since it contains pointers to objects which the GC
9947 * assembly.c (search_loaded): remove unused variable.
9949 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
9951 * object.c: fixed issue exposed by gcc-generated IL programs
9952 that use RVA data for pointers.
9954 2003-01-25 Martin Baulig <martin@ximian.com>
9956 * threads.c (start_wrapper): Moved the initialization of
9957 `start_func' above the mono_new_thread_init() call to which we
9958 pass it as argument.
9960 2003-01-24 Martin Baulig <martin@ximian.com>
9962 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
9963 the MonoThread pointer.
9965 2003-01-21 Miguel de Icaza <miguel@ximian.com>
9967 * icall.c: Rename `PowImpl' to Pow.
9969 2003-01-23 Dick Porter <dick@ximian.com>
9971 * threads.c (start_wrapper): Create a Thread object if needed, so
9972 the Main() thread can do the class initialisation in a subthread
9973 that has been set up to allow managed code execution.
9975 Pass the thread ID instead of the MonoThread pointer to the thread
9976 start and attach callbacks. This change is required, because the
9977 jit thread start callback must be called _before_ the Thread
9978 object can be created.
9980 (mono_thread_init): Removed much object creation code that is no
9981 longer needed. No managed code is called from here now.
9983 * object.c (mono_runtime_exec_managed_code): Create a subthread
9984 for Main, and call back to the runtime to use it.
9985 Set the exit code when Main exits.
9987 * gc.c: Make sure domain finalisation happens in a subthread.
9988 Re-enable threaded GC, fixing bug 31333 (again).
9990 * environment.c: System.Environment internall calls (so far just
9991 ExitCode is here, the others are still in icall.c)
9993 * appdomain.c (mono_runtime_cleanup): All threads running managed
9994 code should have finished before mono_runtime_cleanup() is
9995 reached, so no need to clean up threads.
9997 2003-01-22 Martin Baulig <martin@ximian.com>
9999 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
10000 `gpointer func' arguments.
10001 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
10002 but added `MonoThread *thread' argument.
10003 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
10005 * threads.c (mono_new_thread_init): Added `gpointer func' argument
10006 and pass it to the mono_thread_start_cb callback.
10007 (mono_install_thread_callbacks): New public function to install a
10008 set of callbacks which are set by the debugger.
10009 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
10011 2003-01-22 Martin Baulig <martin@ximian.com>
10013 * Makefile.am: Install debug-mono-symfile.h.
10015 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
10017 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
10019 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
10021 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
10022 * class.c (mono_ptr_class_get): correctly set access levels of pointers
10023 (mono_array_class_get): correctly set access levels of arrays
10025 2003-01-20 Patrik Torstensson
10026 * image.h (MonoAssemblyName): changed major, minor, build, revision
10027 from signed to unsigned.
10029 2003-01-20 sean kasun <skasun@azstarnet.com>
10031 * reflection.c (load_cattr_value): Now this handles
10032 MONO_TYPE_SZARRAY. Fixes bug #35629
10034 2003-01-20 Miguel de Icaza <miguel@ximian.com>
10036 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
10039 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10041 * decimal.c: fixed bug #26056.
10043 2003-01-17 Martin Baulig <martin@ximian.com>
10045 * gc.c: Raise an ExecutionEngineException instead of using g_error().
10047 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10050 (mono_get_exception_type_initialization): new function.
10052 * object.c: throw a TypeInitializationException when an exception is
10053 thrown invoking the class constructor.
10055 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10057 * reflection.c: fixed attribute reading.
10059 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10062 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
10063 provided, look for the type in the calling assembly and then in
10064 mscorlib; if the assembly name is provided, only try that one.
10066 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
10068 * object.c: register the vtable before there is a chance it's
10069 queried again recursively.
10071 2003-01-13 Duncan Mak <duncan@ximian.com>
10073 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
10076 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
10078 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
10080 2003-01-11 Martin Baulig <martin@ximian.com>
10082 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
10083 this to 20 for the release.
10085 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
10087 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
10089 * loader.c (mono_method_get_marshal_info): bug fix
10091 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
10092 structures with explicit layout
10094 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
10096 * profiler.c: made the output more readable (and sorted).
10097 Added caller information for the allocation profiler.
10099 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
10101 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
10103 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10105 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
10106 to get value types.
10108 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
10110 * object.c, profiler.h, profiler.c, profiler-private.h:
10111 Added object allocation profiler.
10113 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
10115 * reflection.h, reflection.c: handle global methods.
10116 Compress blob entries.
10118 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
10120 * marshal.c: fix compilation.
10122 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
10124 * loader.c (mono_method_get_marshal_info): impl.
10126 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
10128 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10130 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
10131 for reference types.
10133 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
10135 * loader.c: fixed off by one error in loaded parameter names.
10137 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
10139 * marshal.c (mono_marshal_get_icall_wrapper): like
10140 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
10141 instead of a MonoMethod.
10143 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10145 * decimal.c: fixed bug #36537.
10147 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
10149 * marshal.c: throw a missing method exception if a
10150 P/Invoke method is not found.
10152 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
10154 * icall.c: allow a null this for constructors.
10156 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
10158 * icall.c: raise the proper exceptions if the arguments to the
10159 internal Invoke are incorrect.
10161 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
10163 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
10165 2003-01-03 Martin Baulig <martin@ximian.com>
10167 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
10169 2002-12-31 Martin Baulig <martin@ximian.com>
10171 * debug-mono-symfile.c: Completely rewrote the type section.
10172 Instead of using individual malloc()ed fields, we use one big
10173 continuous memory area and offsets into this area.
10174 See the comments in the source code for details.
10176 2002-12-30 Martin Baulig <martin@ximian.com>
10178 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
10180 2002-12-30 Martin Baulig <martin@ximian.com>
10182 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
10183 line number table in this data blob instead of using an external
10186 2002-12-28 Martin Baulig <martin@ximian.com>
10188 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
10190 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
10192 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
10193 as a boxed return type.
10195 2002-12-21 Miguel de Icaza <miguel@ximian.com>
10198 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
10199 g_build_filename to properly get separators on the filename created.
10201 * object.h: Small change, introduce MonoMarshalByRefObject to
10202 track the layout of that structure in the C# universe as we make
10205 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
10207 * object.c: removed assert to allow static fields on interfaces.
10208 * loader.c: a TypeSpec may be used for any type, not just arrays.
10210 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10212 * class.c, class.h: added mono_class_array_element_size ().
10213 Ignore static methods in interfaces.
10215 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10217 * threads.c: fixed the build under cygwin.
10219 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
10221 * reflection.c: handle nullref constants. Allocate keys for
10222 reflection handles with the GC.
10224 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
10226 * threads.c, threads.h: added mono_thread_get_abort_signal()
10227 to get a suitable signal for thread abort.
10229 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
10231 * metadata.c: fix handling of ExportedType table.
10233 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10235 * icall.c: added WriteWindowsDebugString internal call.
10237 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10239 * reflection.h: added fields to match C# implementation.
10241 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10243 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
10245 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
10247 * gc.h, gc-internal.h: Rename header for GC internal calls to
10248 gc-internal.h from gc.h as to not clash with Boehm GC having its
10249 header installed as <gc.h> in outside include paths.
10250 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
10251 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
10253 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10255 * icall.c: assign minor, build and revision in FillName.
10257 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
10259 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
10260 Added support for running code generated by Reflection.Emit.
10262 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10264 * appdomain.c: check for NULL argument in LoadFrom.
10266 2002-12-10 Dick Porter <dick@ximian.com>
10268 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
10270 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10272 * appdomain.c: fix buglet when building exe file name. Handle full
10273 assembly name (needed after latest changes to AssemblyName).
10275 (mono_image_close): free some hashtables.
10277 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
10279 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
10280 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
10281 on some systems (redhat 7.3)
10283 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
10285 * threads.c: delete the critical section of a sync block,
10286 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
10288 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
10290 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
10292 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10294 * appdomain.[ch]: handle the assembly preload event to try loading the
10295 assemblies using the paths we have in the current domain.
10297 * assembly.[ch]: created an assembly preload hook that is called to try
10298 loading the assembly by other means that the ones provided here.
10300 * domain.c: initialize the domain search path.
10302 From now on, assemblies (TODO: except corlib and System) are loaded
10303 according to these rules when using mono_assembly_load ():
10305 1. It tries to load the assembly from the ApplicationBase
10306 of the current domain appending .dll and .exe (TODO: have to
10307 try loading from name/name.dll and name/name.exe).
10309 2. It tries the search path specified in PrivateBinPath for the
10310 current domain (if any).
10312 3. Previous behavior.
10314 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
10316 * icall.c: implemented GetInterfaceMap() related icall.
10317 * domain.c, loader.h: load MethodInfo in mono_defaults.
10319 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10321 * gc.c: disable the finalizer thread for now, untill all the issues
10322 with it are resolved.
10324 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10326 * string-icalls.c: handle embedded nulls in string ctor when the
10327 length is specified.
10329 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10331 * class.c: look for explicit interface implementation in parent
10334 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
10336 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
10338 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
10340 * gc.c: protect handles with a critical section.
10342 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10345 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
10346 parameters. If no assembly specified, try getting the type from all
10347 the assemblies in the current domain, else, load the assembly and get
10350 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10352 * marshal.c: applied patch from Aleksey Demakov that fixes
10353 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
10355 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10357 * icall.c: fixed get_location.
10359 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
10361 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
10362 declarations to make it work with older gcc.
10364 * loader.c (mono_get_method): set signature->pinvoke for native calls
10366 2002-11-20 Dick Porter <dick@ximian.com>
10368 * threads.c (mono_thread_init): Set the main thread's handle
10370 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
10372 * gc.c: allow compilation without GC support. Changed to match the
10375 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10377 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
10379 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
10381 * reflection.c: set a public key token on the core assemblies.
10383 2002-11-18 Dick Porter <dick@ximian.com>
10385 * threads.c: Split out some thread initialisation so that other
10386 files can set the start callback function.
10388 * gc.c: Run finalisers in a separate thread, to avoid stack
10389 overflow. Fixes bug 31333.
10391 * appdomain.c: Set up GC finalisation thread.
10395 * domain.c: Use gc.h macros for GC_malloc
10397 2002-11-15 Dick Porter <dick@ximian.com>
10401 * appdomain.c: Removed mono_runtime_init_with_attach(),
10402 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
10403 merging the extra parameter with the existing function. Removed
10404 unneeded code in mono_thread_attach().
10406 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
10408 * image.c (mono_image_loaded_by_guid): a method to get loaded
10410 (load_metadata_ptrs): we store the guid as string.
10412 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
10414 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
10416 * metadata.c (mono_guid_to_string): imported method form Zoltan
10417 Varga (slightly modified)
10419 * assembly.c (mono_assembly_open): load precompiled code
10421 * loader.h (MonoMethod): we store the method token for use in the
10424 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10426 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
10427 the hook function called when an assembly is loaded.
10429 * domain.c: Modified file.
10430 (mono_domain_assembly_load): removed hash table insertion of assemblies.
10434 2002-11-07 Miguel de Icaza <miguel@ximian.com>
10436 * reflection.c: Map PEFileKind to the value expected by the WinNT
10439 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10441 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
10442 Read until the buffer is filled completely.
10444 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10446 * icall.c: implemented MonoType.InternalGetEvent ().
10448 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10450 * appdomain.c: implemented InitAppDomainSetup. Delayed
10451 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
10452 the entry_assembly.
10454 * assembly.c: base_dir is now an absolute path ending with
10457 * icall.c: modified get_location according to the above changes.
10459 * object.c: init AppDomain.SetupInformation for the default domain after
10460 we have the entry assembly.
10462 * domain.c: when unloading a domain, setup = NULL.
10464 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
10466 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
10468 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
10470 * object.h, object.c: introduced mono_object_get_virtual_method ()
10471 to lookup the method invoked on an object when a callvirt is done on
10473 * icall.c: make MethodInfo::Invoke() always do a virtual call.
10475 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10477 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
10478 current domain when loaded an assembly and failed to load it.
10480 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
10482 2002-10-31 Dick Porter <dick@ximian.com>
10486 * file-io.c: Return the error status in a parameter, as the
10487 GetLastError() value has long since been blown away if we try and
10488 look it up in a subsequent internal call invocation. Delete the
10489 GetLastError() internal call, because it's useless.
10491 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
10493 * class.[ch]: added cast_class to fix bug 29517
10495 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
10497 * marshal.c: create valid IL code in the filter clause:
10498 the new JIT is less forgiving:-)
10500 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10502 * icall.c: removed get_property internal call.
10504 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
10506 * appdomain.h domain.c: Added an ID to appdomains.
10508 * threads.c threads.h icall.c: Implement icall
10509 Thread:GetDomainID(), and remove unused icall
10510 CurrentThreadDomain_internal.
10512 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10514 * icall.c: Don't recurse through the base types in GetConstructor.
10517 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
10519 * mempool.h, mempool.c: added mono_mempool_empty() and
10520 mono_mempool_stats().
10522 2002-10-23 Dick Porter <dick@ximian.com>
10526 * icall.c: Added MonoIO.GetFileType internal call
10528 2002-10-17 Dick Porter <dick@ximian.com>
10530 * appdomain.c (mono_runtime_cleanup): Don't signal the async
10531 delegate semaphore before waiting for all threads to finish,
10532 because new threads can also call async delegates. Fixes bug
10535 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
10536 of 3 seconds, in case another async job is queued. (This part is
10537 needed because the bug fix reintroduced the 3s exit lag.) This
10538 makes the mono_runtime_shutdown flag superfluous.
10540 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
10542 * reflection.c: include ehader size in method section headers.
10543 Really check for suplicated modules entries.
10545 2002-10-17 Martin Baulig <martin@gnome.org>
10547 * debug-mono-symfile.c: Added back support for locals.
10549 2002-10-14 Martin Baulig <martin@gnome.org>
10551 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
10554 2002-10-14 Martin Baulig <martin@gnome.org>
10556 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
10557 mono_class_get() instead of looking in the class cache.
10559 2002-10-13 Martin Baulig <martin@gnome.org>
10561 * debug-mono-symfile.c: Set version number to 28, include the
10562 signature in method names.
10564 2002-10-13 Martin Baulig <martin@gnome.org>
10566 * debug-mono-symfile.h: Set version number to 27.
10568 2002-10-11 Martin Baulig <martin@gnome.org>
10570 * gc.c: Don't register/unregister NULL pointers as disappearing links.
10572 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
10574 * metadata.c, metadata.h: added helper function to allocate signatures.
10576 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10578 * icall.c: added internal call to get the location of machine.config.
10580 2002-10-08 Martin Baulig <martin@gnome.org>
10582 * debug-mono-symfile.c: Ignore classes with a pending init for the
10585 2002-10-03 Dick Porter <dick@ximian.com>
10587 * threads.c: Freebsd pthread_t is a pointer
10589 2002-10-03 Dick Porter <dick@ximian.com>
10591 * socket-io.c: Implemented GetHostName_internal
10593 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10596 (mono_config_parse_file): don't leak the text.
10598 2002-10-02 Martin Baulig <martin@gnome.org>
10600 * debug-mono-symfile.c: Added support for methods.
10602 2002-10-01 Martin Baulig <martin@gnome.org>
10604 * debug-mono-symfile.c: Don't emit methods and line numbers for
10605 the dynamic symbol file, just write the type table. We can easily
10606 have an external helper program which creates a symbol file for an
10609 2002-10-01 Dick Porter <dick@ximian.com>
10611 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
10612 Only add the handle to the cleanup array when we're about to
10613 launch the thread. Bug 31425 deadlocked when the test was run on
10616 2002-10-01 Martin Baulig <martin@gnome.org>
10618 * debug-mono-symfile.c: Added support for properties.
10620 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
10622 * reflection.c: unaligned store fix from Mark Crichton
10623 <crichton@gimp.org>.
10625 2002-09-27 Martin Baulig <martin@gnome.org>
10627 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
10630 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
10632 * assembly.h, assembly.c: use a sane API to hook into the assembly
10633 loading process instead of a useless special-purpouse hack
10634 (ngen needs a hook, too, for example).
10636 2002-09-27 Dick Porter <dick@ximian.com>
10638 * threads.c (mono_thread_init): Call GetCurrentProcess() so
10639 io-layer can set up some process handle info. Not needed on w32,
10640 but doesn't hurt either.
10642 * process.c: Pass the program name in the second parameter to
10643 CreateProcess, so the path is searched. Include the working
10644 directory. Implemented process name, process enumeration, and some
10645 process detail internal calls.
10647 * icall.c: Added internal calls for process lookup, and some
10650 2002-09-26 Martin Baulig <martin@gnome.org>
10652 * assembly.c (mono_install_open_assembly_hook): New global
10653 function to install a function to be invoked each time a new
10654 assembly is loaded.
10655 (mono_assembly_open): Run this callback function if set.
10657 * debug-mono-symfile.c: Put back line numbers for the dynamic
10658 symbol file and also record the .il file as source file. This
10659 allows us to install the temporary symbol file as `file.dbg' just
10660 like a compiler-generated one.
10662 2002-09-26 Nick Zigarovich <nick@chemlab.org>
10664 * Corrected typo in gc.c (BOHEM vs BOEHM).
10666 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10668 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
10669 GetProperties. Also avoid calling g_slist_length in GetProperties and
10672 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
10674 * reflection.c: avoid unaligned stores (bug spotted by
10675 Mark Crichton <crichton@gimp.org>).
10677 2002-09-25 Martin Baulig <martin@gnome.org>
10679 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
10680 instead of guint64 for addresses and added prologue/epilogue info.
10682 2002-09-25 Martin Baulig <martin@gnome.org>
10684 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
10685 store line number info. For the dynamic symbol file, we only need
10686 to provide the JIT generated dynamic line number info for the dynamic
10689 2002-09-25 Martin Baulig <martin@gnome.org>
10691 * debug-mono-symfile.h: Incremented version number.
10693 2002-09-24 Martin Baulig <martin@gnome.org>
10695 * class.c (mono_debugger_class_init_func): New global function
10697 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
10700 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
10701 function. This is called via the mono_debugger_class_init_func
10702 hook to add all types to the dynamic type table.
10703 (ves_icall_MonoDebugger_GetType): New interncall to get a class
10704 from its metadata token.
10706 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
10707 New interncall for the debugger.
10709 2002-09-24 Nick Drochak <ndrochak@gol.com>
10711 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
10712 before using it in case it is null.
10714 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
10716 * metadata.c: allow custom modifiers in local var signatures
10717 (bug spotted by Zoltan Varga).
10719 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
10721 * class.c: deal with the <Module> class that may have a NULL vtable.
10722 Eliminate warnings.
10724 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
10726 * image.c, image.h: more strong name helpers.
10727 * monosn.c: more work: convert pem keys to cryptoapi format.
10729 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
10731 * string-icalls.c: speedup IndexOf.
10733 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
10735 * icall.c: updates from Zoltan.2.Varga@nokia.com.
10737 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
10739 * icall.c: cleanup: use mono_object_domain ().
10741 2002-09-23 Martin Baulig <martin@gnome.org>
10743 * debug-mono-symfile.c: Improved type support.
10745 2002-09-22 Martin Baulig <martin@gnome.org>
10747 * debug-mono-symfile.c: Added support for reference types and strings.
10749 2002-09-22 Martin Baulig <martin@gnome.org>
10751 * debug-mono-symfile.c: Started to work on the type table.
10753 2002-09-21 Martin Baulig <martin@gnome.org>
10755 * debug-mono-symfile.c: Largely reworked the symbol table format.
10756 The symbol table is now incrementally updated each time a new
10757 method is added. We're now also using our own magic and version
10758 so that you don't need to recompile all your classes if the
10759 dynamic table changes.
10760 (mono_debug_update_mono_symbol_file): Removed.
10761 (mono_debug_symfile_add_method): New function to add a method.
10763 2002-09-21 Martin Baulig <martin@gnome.org>
10766 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
10769 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
10770 New interncall to get a method from its metadata token.
10772 2002-09-21 Martin Baulig <martin@gnome.org>
10774 * debug-mono-symfile.c: Create type table.
10776 2002-09-20 Martin Baulig <martin@gnome.org>
10778 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
10780 2002-09-20 Martin Baulig <martin@gnome.org>
10782 * debug-mono-symfile.c: Provide information about params and locals.
10784 2002-09-20 Martin Baulig <martin@gnome.org>
10786 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
10789 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
10790 interncall to get a method from its metadata token.
10792 2002-09-20 Martin Baulig <martin@gnome.org>
10794 * debug-mono-symfile.c: Added a few checks for method->header
10795 being non-NULL. This should never happen, but for the moment
10796 let's use a g_warning() rather than a g_assert().
10798 2002-09-19 Mark Crichton <crichton@gimp.org>
10800 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
10801 even if support for it isn't present. Added an #ifdef to fix this.
10803 * socket-io.c: Added checks back for Solaris support.
10805 2002-09-19 Martin Baulig <martin@gnome.org>
10807 * debug-mono-symfile.c (read_string, write_string): Reflect latest
10808 changes in the symbol file format.
10810 2002-09-18 Martin Baulig <martin@gnome.org>
10812 * debug-mono-symfile.c: Set version number to 21.
10814 2002-09-18 Dick Porter <dick@ximian.com>
10816 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
10817 on netbsd. Fixes bug 30051.
10819 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10822 (set_version_from_string): little fix.
10824 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
10826 * monosn.c, Makefile.am: added strong name utility.
10827 * reflection.h, reflection.c: implemented delayed signing,
10828 locale, version and hash id assembly attributes.
10830 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
10832 * loader.c, metadata.c: load param attributes in signatures.
10834 2002-09-16 Martin Baulig <martin@gnome.org>
10836 * debug-mono-symfile.c: Added string table with all method names.
10838 2002-09-14 Martin Baulig <martin@gnome.org>
10840 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
10841 fast method lookup.
10843 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
10845 * reflection.c: record the public key token of referenced assemblies.
10847 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
10849 * image.c, image.h: added functions to get the strong name and the
10850 public key of an assembly.
10851 * pedump.c: use them.
10853 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
10855 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
10857 2002-09-12 Miguel de Icaza <miguel@ximian.com>
10859 * marshal.c (mono_marshal_get_managed_wrapper): Added
10862 2002-09-11 Martin Baulig <martin@gnome.org>
10864 * gc.c: Call GC_unregister_disappearing_link() on all links when
10865 finalizing them, this is necessary to aviod a crash in boehm's
10868 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
10870 * gc.c: handle GetTarget for finalized objects spotted and fixed by
10873 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
10875 * icall.c: implemented MonoType::Module.
10876 * reflection.c, reflection.h: mono_module_get_object () from
10877 Tomi Pakarinen <tomi.pakarinen@welho.com>.
10879 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
10881 * icall.c: ignore overridden methods in GetMethods ().
10882 Fix for FieldInfo::SetValue().
10883 * object.c: handle float/double in runtime invoke.
10885 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
10887 * object.c: allow a constructor to be called again on an object.
10889 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
10891 * class.h, class.c: move field layout code to it's own function and
10892 export it. Get an interface id earlier. Move fields in MonoClass
10893 so they are more cache friendly and align the bitfields.
10894 * loader.c: temporary handle get_param_names() for a runtime method.
10895 * reflection.c, reflection.h: more code to handle runtime creation of
10898 2002-09-09 Martin Baulig <martin@gnome.org>
10900 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
10901 signature with the pinvoke field being set for the actual call.
10903 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
10905 * icall.c: removed some unused icalls. Start of map of glib charsets
10906 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
10908 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
10910 * debug-helpers.c: break infinite loop (found and fixed by
10911 Holger Arnold <harnold@gmx.de>).
10913 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
10915 * icall.c: target may be null in create_delegate.
10917 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
10919 * marshal.c: handle a boolean return type.
10921 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
10923 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
10925 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
10927 * gc.c: fix weakreferences.
10929 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
10931 * icall.c: added icall to get default codepage.
10933 2002-09-03 Dick Porter <dick@ximian.com>
10936 * threads.c: Use MonoThread instead of MonoObject where
10939 Store running thread objects in a hash table, so that we have all
10940 the info to hand when waiting for them to finish
10941 (means we don't need OpenThread() any more, so mingw builds should
10942 be fully functional again.)
10945 * object.h: Added thread ID to MonoThread
10947 2002-09-03 Martin Baulig <martin@gnome.org>
10949 * icall.c (System.Reflection.Assembly::get_location): New interncall.
10951 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10953 * icall.c: fixed leak in get_temp_path. Thanks lupus.
10955 2002-09-03 Martin Baulig <martin@gnome.org>
10957 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
10958 argument to store the end address of the disassembled instruction.
10960 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
10961 here from debug-symfile.h.
10962 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
10963 JIT into this struct.
10964 (MonoSymbolFile): Added `char *image_file' field.
10965 (MonoDebugGetMethodFunc): Removed.
10966 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
10967 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
10968 (mono_debug_find_method): New method.
10970 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
10971 create a full symbol file.
10972 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
10973 and static symbol files.
10974 (mono_debug_find_method): The symbol file keeps an internal method hash,
10975 call this to get a MonoDebugMethodInfo from a MonoMethod.
10977 * debug-symfile.[ch]: Removed.
10979 2002-08-29 Miguel de Icaza <miguel@ximian.com>
10981 * image.c (do_mono_image_open): Remove linker version check.
10983 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
10985 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
10986 wrappers for instance methods.
10988 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10990 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
10992 2002-08-28 Dick Porter <dick@ximian.com>
10994 * Makefile.am: Export HOST_CC for w32 builds
10996 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
10998 * file-io.c process.c: MonoString are null terminated, no
10999 need for mono_string_to_utf16() anymore.
11001 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
11003 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
11005 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
11007 * icall.c, reflection.h: speedup System.MonoType.
11009 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
11011 * reflection.c: allow null as the value of a string argument in
11012 custom attributes constructors.
11014 2002-08-27 Martin Baulig <martin@gnome.org>
11016 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
11017 `trampoline_address' field.
11019 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
11021 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
11022 check (fixes bug #29486)
11024 2002-08-27 Martin Baulig <martin@gnome.org>
11026 * debug-mono-symfile.c: Changed the file format in a way that allows us
11027 open it read-only and to use a specially malloced area for all the
11028 dynamic data. We can now also generate a symbol file on-the-fly if we're
11029 debugging IL code and there is no MCS generated symbol file for it.
11031 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
11033 * object.c: added a define for a good string and array
11034 creation speedup (not enabled by default because we need to deal with
11037 2002-08-26 Martin Baulig <martin@gnome.org>
11039 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
11040 function to create a dynamic symbol file. This is used by the
11041 debugger to create a symbol file for IL code on-the-fly.
11043 2002-08-26 Martin Baulig <martin@gnome.org>
11045 * loader.c (mono_lookup_pinvoke_call): Include the error message
11046 from g_module_error() in the error message.
11048 2002-08-24 Martin Baulig <martin@gnome.org>
11050 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
11051 function to update the symbol file. The symbol file is mmap()ed
11052 writable, but private. This allows us to install the symbol file
11053 together with the assembly.
11055 2002-08-24 Martin Baulig <martin@gnome.org>
11057 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
11058 but they can read the new symbol file format which mcs is now creating.
11060 * debug-symfile.c (mono_debug_find_source_location): Moved to
11061 debug-mono-symfile.c; this is now operating on the new symbol file.
11063 2002-08-23 Martin Baulig <martin@gnome.org>
11065 * debug-helpers.c (mono_method_desc_from_method): New function to get
11066 a MonoMethodDesc from a MonoMethod.
11068 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
11070 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
11071 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
11073 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
11075 * string-icalls.[ch]: make helper methods static.
11077 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11079 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
11080 types to it and to SetValueInternal.
11082 * object.c: Moved handle_enum label to its proper place. This was the
11085 This time i compiled mcs and gtk-sharp and they both work.
11087 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11089 * icall.c: reverted partially my previous patch until
11090 object.c:set_value handles enums correcly.
11092 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11095 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
11096 (ves_icall_System_Environment_get_MachineName): removed warning when
11097 compiling under cygwin.
11099 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
11101 * object.c: fixed field_get_value() for reference types.
11103 2002-08-22 Dick Porter <dick@ximian.com>
11105 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
11106 Don't free a buffer while it's still needed. Patch from Jonathan
11107 Liger <Jonathan.liger@wanadoo.fr>
11109 2002-08-21 Miguel de Icaza <miguel@ximian.com>
11111 * icall.c (ves_icall_System_Environment_get_Platform): Add new
11114 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
11116 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
11117 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
11119 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
11120 we call unmanaged code which throws exceptions.
11122 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
11124 * appdomain.h: added per-domain entry_assembly.
11125 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
11127 * icall.c: Assembly::GetEntryAssembly icall.
11128 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
11129 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
11131 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
11133 * appdomain.h, gc.c: added mono_domain_finalize ().
11135 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11138 (mono_print_unhandled_exception): changed g_warning by g_printerr
11139 because g_log has a 1024 characters limit (yeah, i got a big stack
11140 trace). Don't print exception name, that should be in ToString
11143 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11145 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
11146 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
11148 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11151 (mono_print_unhandled_exception): after previous commit, i realized
11152 that MS calls ToString on the exception. I changed this function to
11153 do that. This way we get stack_trace for free.
11155 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11158 (mono_print_unhandled_exception): invoke Message property instead of
11159 getting 'message' field from Exception. Don't allocate memory for
11160 'trace' and 'message' if not needed.
11162 2002-08-18 Dick Porter <dick@ximian.com>
11164 * unicode.c: Fix asserts to match Encoder.cs checks
11166 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11168 * marshal.c: fix unaligned store issue and a few wrong
11169 opcode argument types.
11171 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11173 * icall.c: added GetUninitializedObjectInternal internal call.
11175 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
11177 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
11178 to the right domain.
11180 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
11182 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
11184 * class.c (class_compute_field_layout): set blittable to false for Strings
11186 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
11188 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
11190 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
11191 first chunk of code to create types at runtime. Code to
11192 handle ReflectedType/DeclaringType. Make reflection handles
11195 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
11197 * class.c: set correct name in arrays.
11199 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
11201 * appdomain.c (mono_domain_transfer_object): make it work with
11202 valuetypes. bug fixes.
11204 2002-08-12 Dick Porter <dick@ximian.com>
11206 * object.h: Rename some parameters to avoid c++ keywords (Patch
11207 from Joseph Wenninger <kde@jowenn.at>)
11209 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
11211 * icall.c: added icall to implement Assembly.GetFile*.
11213 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
11215 * reflection.h, reflection.c: code to embed managed resources.
11217 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
11219 * class.c: move all the type size stuff into
11220 class_compute_field_layout().
11222 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
11224 * class.c: ensure enums have always the correct instance size.
11225 * unicode.c: remove wrong assert.
11227 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
11229 * assembly.c: fix mem corruption issue.
11230 * image.h, image.c: added mono_image_get_resource () to access
11232 * icall.c: implemented Assembly.EntryPoint property and some
11233 Managed Resources related internalcalls.
11236 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
11238 * image.c, image.h: impemented mono_image_get_entry_point ().
11239 * appdomain.c: use mono_image_get_entry_point.
11241 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
11243 * reflection.c: support the object type argument when loading
11246 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
11248 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
11249 String as return type.
11251 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
11253 * reflection.c: fix encoding of named args for custom attrs to match
11254 the ms implementation. Read them back when instantiating custom
11257 2002-08-02 Radek Doulik <rodo@ximian.com>
11259 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
11260 by Dietmar as quick fix
11261 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
11262 16 as stack size, used on more places as quick fix before Dietmar
11263 will fix it properly
11265 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
11267 * object.h, object.c: added accessors for fields and properties.
11269 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
11271 * class.c, class.h: made mono_class_get_field_from_name ()
11272 loop on parent types.
11273 Added mono_class_get_property_from_name ().
11275 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
11277 * class.c, class.h: move the code to setup the type vtable in its own
11278 function so that it can be reused also for types created at runtime.
11279 Eliminate the "class" identifier from the header file.
11280 * reflection.c: setup the vtable for enums so that we can create
11281 objects for use in SetConstant ().
11283 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
11285 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
11286 instead of the delegate itself as this pointer (bug #28383)
11288 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
11290 * marshal.c (mono_marshal_get_managed_wrapper): added return type
11293 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11295 * loader.c: don't set the pinvoke bit on icalls.
11297 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
11299 * debug-helpers.c (mono_method_full_name): only print a number to
11300 indicate wrapper type (so that the output is more readable in traces).
11302 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
11304 * class.c (mono_class_init): include method override patch from Paolo
11306 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
11308 * icall.c: fixed GetTypeCode().
11310 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
11312 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
11313 use real delegate invoke function to make it work with multicast
11314 delegates (fix bug# 28291).
11316 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
11318 * object.c: load constant strings.
11320 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
11322 * reflection.c: no magic numbers.
11323 * tabledefs.h: security action enum.
11325 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
11327 * assembly.c: fix possible memory corruption.
11329 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
11331 * reflection.h, reflection.c: added support for linking resources.
11332 * verify.c: check we have an updated corlib.
11334 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
11336 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
11338 (mono_marshal_string_array): null terminate unmanaged string arrays.
11339 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
11341 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
11343 * icall.c: Type.GetType () can now return also types from the
11346 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
11348 * loader.h, loader.c: stack walking support.
11349 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
11350 GetCallingAssembly.
11352 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
11354 * marshal.c: added optimisations for blittable types
11356 * class.c (mono_array_class_get): do not set blittable attribute on arrays
11357 (mono_class_setup_mono_type): set blittable attribute for single
11360 * marshal.c (mono_string_utf8_to_builder): impl.
11361 (mono_string_builder_to_utf8): impl.
11362 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
11364 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
11366 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
11367 (mono_marshal_get_managed_wrapper): impl. byref types
11369 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11372 (search_method): don't display debug message.
11374 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
11376 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
11378 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
11380 * appdomain.c: set the missing filename when throwing exception.
11382 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
11384 * metadata.c (mono_type_size): code cleanup
11385 (mono_type_stack_size): removed some test code
11387 2002-07-21 Miguel de Icaza <miguel@ximian.com>
11389 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
11390 mono_get_exception_file_not_found now.
11392 * exception.c (mono_exception_from_name_two_strings): New version
11393 that will call a constructor with two string arguments.
11394 (mono_get_exception_file_not_found): New helper routine, used to
11395 report file-not-found errors.
11397 2002-07-20 Dick Porter <dick@ximian.com>
11400 * process.c: Pass file handles to CreateProcess
11404 * file-io.c: Implemented CreatePipe
11406 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
11408 * metadata.c (mono_get_param_info): set alignment for value types
11410 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
11412 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
11413 Constify mono_domain_assembly_open().
11414 * loader.c: handle null namespace in icalls.
11416 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
11418 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
11419 (emit_str_to_ptr_conv): marshal object as structs
11421 * metadata.c (mono_type_to_unmanaged): marshal object as structs
11423 * marshal.c (mono_marshal_get_runtime_invoke): support value types
11425 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
11427 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
11428 (mono_marshal_get_native_wrapper): we an now return value types
11430 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11432 * verify.c: more checks implemented.
11434 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
11436 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
11438 (mono_marshal_get_native_wrapper): allow byref arguments
11439 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
11440 impl. PtrToStringXXX methods
11441 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
11442 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
11443 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
11444 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
11445 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
11447 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11449 * reflection.c: fix buglet in parsing an assembly name.
11451 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
11453 * marshal.c (emit_ptr_to_str_conv): first impl.
11455 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
11457 * object.c, class.h: cache the vtable in the class as suggested by
11458 vargaz@freemail.hu (Zoltan Varga).
11460 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11462 * class.h, loader.c: added mono_field_from_token().
11463 * verify.c: first cut of type checking code.
11465 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
11467 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
11469 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
11471 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
11473 (mono_marshal_get_remoting_invoke): impl.
11474 (mono_delegate_begin_invoke): impl.
11475 (mono_mb_emit_save_args): impl.
11476 (mono_delegate_end_invoke): impl.
11477 (mono_marshal_get_delegate_begin_invoke):
11478 (mono_marshal_get_delegate_end_invoke):
11479 (mono_marshal_get_delegate_invoke): generate a special name for
11480 those methods (including the signature) and associate them whith
11481 the delegate class.
11483 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
11486 (mono_reflection_type_from_name): now it has a MonoImage parameter
11487 which is used as the default image to search the type in. If the image
11488 is NULL or getting the type from it fails, it defaults to corlib.
11490 * icall.c: changed 1 call to mono_reflection_type_from_name to match
11493 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11495 * reflection.c: update the parameter table index.
11497 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
11499 * domain.c: don't include the mark byte in the string hash.
11501 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
11503 * icall.cs: icall for Type.GetTypeCode ().
11504 * verify: a couple of fixes and disabled local initialization checks.
11506 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
11508 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
11510 * debug-helpers.c (mono_method_full_name): print the type of the
11513 * metadata.c (mono_signature_hash): a hash function for signatures
11514 (mono_signature_hash): better hash algorithm
11516 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
11518 * debug-helpers.c (mono_method_full_name): this can now generate
11519 method names with signatures
11521 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
11522 method dont have this pointers.
11524 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
11526 * reflection.c: fixup typebuilder tokens.
11527 * image.c: fix buglet.
11528 * marshal.h: remove whitespace.
11529 * metadata.h, metadata.c: reinstate code that was removed.
11530 * verify.c: handle catch directives and fix another couple of bugs.
11532 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
11534 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
11535 (mono_marshal_get_native_wrapper): make it comp. with the old code
11536 (mono_marshal_get_native_wrapper): support boolean
11537 (mono_marshal_get_managed_wrapper): support more types
11539 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
11541 * class.c (class_compute_field_layout): compute class->blittable attribute.
11543 2002-07-09 Dick Porter <dick@ximian.com>
11545 * threads.c: Make the thread cleaning up cope with threads that
11548 2002-07-08 Radek Doulik <rodo@ximian.com>
11550 * reflection.c (method_encode_code): use non-translated values to
11551 compute finally_start, this fixes exception handling on ppc, yay!
11553 * decimal.h (struct signscale): fix endianess
11555 2002-07-07 Radek Doulik <rodo@ximian.com>
11557 * reflection.c: swap box_val and not val
11559 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
11561 * reflection.c, reflection.h: handle full assembly info in type name.
11562 Handle Type arguments when loading custom attributes.
11563 * icall.c: updated to use new mono_reflection_type_from_name () method.
11565 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11568 (method_from_memberref): also print assembly name when method not found.
11570 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11573 (ves_icall_TypeGetProperties): fixed bug #27473.
11575 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11577 * reflection.c: display image name and token when cannot find the
11578 .ctor for an attribute.
11580 2002-07-05 Martin Baulig <martin@gnome.org>
11582 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
11584 2002-07-04 Dick Porter <dick@ximian.com>
11586 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
11587 compile on mingw. This will cause mingw builds to not wait for
11588 subthreads to terminate after the main thread does. I've lodged a
11589 bug with the mingw developers for them to wrap OpenThread().
11591 2002-07-03 Dick Porter <dick@ximian.com>
11593 * threads.c: Store thread IDs instead of handles, because
11594 GetCurrentThread() returns a pseudohandle and therefore stores
11595 useless values. mono_thread_cleanup() continues checking the
11596 array of threads until it is empty, to cope with subthreads
11597 spawning new threads after the main thread has finished.
11601 * profiler-private.h: Pass the thread ID to thread profiler
11602 functions, instead of a handle
11604 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
11606 * verify.c: fixes to make it more usable.
11607 * pedump.c: added --verify code to verify IL code in an assembly.
11609 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11611 * reflection.c: turn errors into warnings to allow compiling corlib.
11613 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
11615 * reflection.c: add special cases to compile corlib.
11617 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
11619 * reflection.c: handle properties with only a set method.
11621 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
11623 * opcodes.h: add enum with opcodes in opval order.
11625 2002-07-01 Dick Porter <dick@ximian.com>
11628 * object.c (mono_runtime_run_main): Removed unneeded argument
11630 2002-06-28 Martin Baulig <martin@gnome.org>
11632 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
11634 2002-06-27 Dick Porter <dick@ximian.com>
11636 * threads.c: Store the handle in both the parent thread and in the
11637 subthread, to minimise the time between starting a new thread and
11640 2002-06-26 Dick Porter <dick@ximian.com>
11642 * appdomain.c (mono_runtime_cleanup): Close the socket library
11643 after all the threads have finished, not before
11645 2002-06-26 Martin Baulig <martin@gnome.org>
11647 * debug-symfile.c (mono_debug_find_source_location): Added
11648 `guint32 *line_number' argument. If it's not NULL, store the line number
11649 there and return the file name without the line number.
11651 2002-06-25 Dick Porter <dick@ximian.com>
11655 * process.c: Process forking and other support functions
11657 2002-06-25 Dick Porter <dick@ximian.com>
11659 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
11660 things dont happen when the image is closed.
11661 (mono_image_lookup_resource): Walk the resource section looking
11662 for a particular entry
11664 * cil-coff.h: PE resource section decoding
11666 2002-06-25 Dick Porter <dick@ximian.com>
11670 (mono_assembly_foreach): Accessor functions to walk the list of
11672 (mono_assembly_set_main):
11673 (mono_assembly_get_main): Process methods need to know which
11674 assembly is the "main" one
11676 * object.c (mono_runtime_run_main): Record the main assembly
11678 * debug-helpers.c: Fix typo
11680 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
11682 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
11683 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
11685 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
11687 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
11689 2002-06-21 Miguel de Icaza <miguel@ximian.com>
11691 * image.c (do_mono_image_open): Initialize reference count,
11692 otherwise we leak the MonoImage.
11694 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
11696 * reflection.c: small tweak to handle self-hosting.
11698 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
11700 * reflection.c: fix type name parse code.
11702 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
11704 * reflection.c: break out of the loop.
11705 * image.c: special case corlib.
11707 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11709 * reflection.c: add all the custom attrs at the end to ensure the
11710 ctors have been properly initialized when the attributes are defined
11711 in the current assembly.
11713 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
11715 * reflection.c: handle correctly multiple-nested types.
11717 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
11719 * row-indexes.h: fix typos.
11720 * reflection.c: adjust for typos and fix method_def_or_ref
11721 encoding in MethodImpl table.
11723 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
11725 * reflection.c: fix entry point patching (thanks Serge!).
11727 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
11729 * verify.c: add check for System.Exception
11731 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
11733 * image.c, class.c: minifix for code just c&p'ed.
11734 * reflection.c: warning fix.
11735 * object.h, loader.h, domain.c: load also StringBuilder.
11737 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
11739 * marshal.h, marshal.c: some support code to handle complex marshaling.
11741 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11743 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
11744 Better signatures with vtable error dump.
11746 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
11748 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
11750 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
11752 * icall.c (ves_icall_Type_GetField): impl.
11754 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11756 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
11757 to retrieve a marshal description blob for a field or param.
11759 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
11761 * reflection.h, reflection.c: change order of nested type emission
11762 to avoid table corruption. The NestedTypes table is sorted.
11763 * icall.c: change order of GetConstructor results to workaround mcs bug.
11765 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
11767 * reflection.h, reflection.c: handle field and param marshal
11770 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11772 * icall.c, marshal.c marshal.h: more Marshal class implementation.
11774 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11776 * reflection.c: fix call convention.
11778 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11780 * reflection.h, reflection.c: mono_image_get_memberref_token()
11781 takes a type instead of a class, now. Added
11782 mono_image_get_array_token() to create tokens for the special
11783 multi-dim array methods.
11785 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
11787 * assembly.c: handle modules (no assembly table). Split
11788 loading references in its own function.
11789 * class.c: handle moduleref resolution scope.
11790 * image.c, image.h: cache module name in image.
11792 2002-06-07 Martin Baulig <martin@gnome.org>
11794 * reflection.c (mono_image_get_type_info): Only add a class layout entry
11795 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
11797 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
11799 * icall.c: more signature fixes that used uint instead of int.
11801 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11803 * reflection.c: fixed signature of field refs.
11805 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
11807 * class.c, reflection.c: handle typerefs of nested types
11808 (both on read and when writing files).
11810 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
11812 * icall.c: fix method signatures that tried to workaround the previous
11815 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
11817 * debug-helpers.c: fix typo.
11819 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
11821 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
11822 rewrote the PE/COFF writing code (our programs are understood by the
11825 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
11827 * gc.c, gc.h, icall.c: weakreference support.
11829 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11831 * Makefile.am, mono-config.c: use $(sysconfdir).
11833 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
11835 * icall.c: changed default precision of Double.ToString() to 15.
11836 Fixed memory leak. Unified with Single.ToString.
11838 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
11840 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
11842 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
11844 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
11845 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
11846 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
11849 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
11851 * debug-symfile.c, sysmath.c: yet more compilation fixes.
11853 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11855 * reflection.c, socket-io.c: more compilation fixes.
11857 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
11859 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
11860 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
11861 unicode.c: warning and compiler compatibility fixes.
11863 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
11865 * class.h, metadata.c: fixed warnings/compilation errors.
11867 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
11869 * Makefile.am, mono-config.c, mono-config.h: configuration file
11871 * loader.c, loader.h: make Dll mapping configurable at runtime in the
11872 config file. Export methods to insert and lookup mappings.
11874 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
11876 * reflection.c: handle types and boxed objects in custom attr
11879 2002-05-30 Martin Baulig <martin@gnome.org>
11882 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
11884 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
11886 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
11887 to lookup the implmap row for a P/Invoke method.
11888 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
11889 P/Invoke method from the runtime on an as needed basis.
11891 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
11893 * metadata.c (mono_metadata_parse_signature): impl.
11895 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11897 * class.c: handle .pack directive.
11899 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
11901 * object.c: initialize static fields with RVA data.
11903 2002-05-25 Martin Baulig <martin@gnome.org>
11906 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
11908 2002-05-24 Martin Baulig <martin@gnome.org>
11911 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
11912 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
11913 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
11915 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
11917 * object.c: special case string ctros in invoke.
11918 * gc.c: silly whitespace changes.
11920 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
11922 * threadpool.[ch]: impl. a threadpool that can
11923 be used by mint and mono.
11925 2002-05-22 Martin Baulig <martin@gnome.org>
11927 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
11928 The first argument is now a `MonoReflectionModuleBuilder *', the return
11929 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
11930 `methods' field to get the method builder. The `token' argument is the
11933 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
11934 invalid characters instead of g_assert_not_reached()ing. This seems
11935 to be the behaviour of mscorlib.
11937 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
11939 * object.c (mono_runtime_invoke_array): applied patch from Rachel
11940 Hestilow to fix bug #25104
11942 2002-05-21 Martin Baulig <martin@gnome.org>
11944 * debug-symfile.c (mono_debug_find_source_location): New function.
11945 Looks up an IL offset in the line number table and returns the source
11946 location as a string.
11948 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11951 (mono_double_ToStringImpl): changed %f by %g until we have something
11954 2002-05-21 Nick Drochak <ndrochak@gol.com>
11956 * icall.c : Use different name for Math.Pow's icall. Needed to check
11957 parameters first in C#.
11959 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
11961 * icall.c, reflection.h: added icall to get info about an event.
11963 2002-05-20 Radek Doulik <rodo@ximian.com>
11965 * object.c (mono_value_box): don't use memcpy for boxing on BIG
11967 (mono_value_box): don't use memcpy for small sizes on
11968 architectures with unaligned access
11970 2002-05-20 Martin Baulig <martin@gnome.org>
11972 * reflection.c (mono_reflection_setup_internal_class): Don't crash
11973 if `tb->parent == NULL'.
11974 (mono_reflection_create_internal_class): New function. This is
11975 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
11978 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
11981 2002-05-19 Martin Baulig <martin@gnome.org>
11983 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
11984 argument to get the length, don't default to the array length.
11986 2002-05-18 Miguel de Icaza <miguel@ximian.com>
11988 * assembly.c (mono_assembly_setrootdir): New function used to
11989 override the MONO_ASSEMBLIES directory.
11991 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
11993 * icall.c: ValueType_GetHashCode() initialize local var.
11995 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
11997 * reflection.c: sort custom attributes table.
11999 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
12001 * reflection.c: support named args in custom attributes (write support).
12003 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
12005 * reflection.c: fix finally position calculation.
12007 2002-05-15 Radek Doulik <rodo@ximian.com>
12009 * reflection.c: fixed endianess at many places
12011 * icall.c (ves_icall_InitializeArray): comment out debug msg
12013 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
12015 * object.c (mono_unhandled_exception): new function to handle
12016 unhandled exceptions.
12017 (mono_unhandled_exception): call the UnhandledException event.
12018 (mono_runtime_delegate_invoke): impl.
12020 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
12022 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
12023 returns the RVA, not the direct pointer to the data. Handle the case
12024 when the class size is fixed.
12026 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
12028 * reflection.c: fix some endianess issues.
12030 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
12032 * object.c (mono_runtime_invoke): is now able to catch exceptions.
12034 * threads.c (mono_thread_init): added a callback which is invoked
12037 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
12039 * icall.c: make GetHashCode return non-negative values.
12041 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
12043 * object.c, icall.c, gc.c: revert to address-based hashcode.
12045 2002-05-13 Miguel de Icaza <miguel@ximian.com>
12047 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
12049 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
12051 * icall.c, class.c: special case <Module>.
12053 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
12055 * icall.c: fix bug in GetNow().
12057 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
12059 * object.c (mono_runtime_class_init): make sure that we call all
12060 static class constructors.
12062 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
12064 * reflection.c: sort methodsemantics table.
12066 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
12068 * reflection.h, reflection.c: honour init locals setting.
12070 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
12072 * icall.c: copied Double ToStringImpl for Single ToStringImpl
12074 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
12076 * reflection.c: support ContructorBuilders in attribute blob creation.
12078 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12080 * reflection.c: some changes to build a binary that can be run
12081 directly in windows.
12083 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
12085 * loader.c: print a big message when an icall can't be found.
12087 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12089 * string-icalls.c: fix bug 24248.
12091 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
12093 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
12094 icall.c, reflection.h: separate assembly loading by pathname and by
12095 assembly name. Use the MONO_PATH env var to search for assemblies.
12097 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
12099 * assembly.c, image.h: add some support for assemblies
12100 with multiple modules.
12101 * class.c, class.h: export mono_class_from_typeref().
12102 * loader.c: remove duplicated code and use mono_class_from_typeref(),
12105 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
12107 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
12108 documentation says (the ECMA one is correct).
12110 2002-05-02 Dick Porter <dick@ximian.com>
12112 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
12113 Don't name the synchronisation mutex.
12115 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
12118 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
12119 Make the prototypes match.
12120 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
12124 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
12125 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
12126 all systems have tm.tm_zone, so use strftime() with %Z to print
12127 the timezone abreviation into a temp string.
12129 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
12130 rather than mono_array_addr() on a MonoString on Big Endian
12133 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
12135 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
12138 2002-04-30 Dick Porter <dick@ximian.com>
12140 * socket-io.c: Cope with SOCKET being an integer rather than a
12143 * threads.c: Added Thread_free_internal, to deal with thread
12144 handle cleanup. Moved calls to handle_store() and handle_remove()
12145 to start_wrapper(), so each can only be called once. Allocate
12146 synchronisation blocks with GC_malloc(), and use GC finalisation
12147 to close the handles.
12149 * icall.c: added System.Threading.Thread::Thread_free_internal
12151 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
12153 * icall.c: support Environment.Exit, CommandLineArgs().
12155 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
12157 * object.c, object.h: added mono_runtime_run_main () and
12158 mono_runtime_get_main_args () for use in System.Environment.
12160 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
12162 * gc.c: fix thinko, enable actual finalization since the jit is now
12165 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
12167 * gc.c, object.c: take into account that an object may be offset wrt the address
12168 returned by GC_malloc().
12170 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
12172 * image.c: handle files without entries in the assembly table (modules).
12174 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
12176 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
12177 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
12178 allowed to be null when it's System.Object class setup.
12180 2002-04-27 Martin Baulig <martin@gnome.org>
12182 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
12183 if `tb->parent == NULL' rather than crashing.
12185 2002-04-28 Nick Drochak <ndrochak@gol.com>
12187 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
12188 calling acos() where asin() should have been called.
12190 2002-04-26 Martin Baulig <martin@gnome.org>
12192 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
12193 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
12194 there's a subdirectory called `System', but we don't want to read that
12195 subdirectory as an assembly.
12197 2002-04-25 Martin Baulig <martin@gnome.org>
12199 * debug-symfile.c: Reflect latest MonoString changes.
12201 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
12203 * rand.c, rand.h: instance method icalls need to have an explicit
12204 this pointer as first argument in the C implementation.
12206 2002-04-25 Nick Drochak <ndrochak@gol.com>
12208 * icall.c: Fix typo in map for GetNonZeroBytes
12210 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
12212 * string-icalls.c : String does now passes unit tests without any
12213 errors, the following changes has been made:
12215 Implemented replace methods.
12216 Renaming of methods to (try) follow the standard.
12217 Fixed compare ordinal
12218 Made all memory allocated directly to function instead of via icall function.
12219 Small performance fix in is_in_array function
12221 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
12223 c (mono_string_Internal_ctor_charp_int_int):
12224 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
12225 sindex < 0, throw ArgumentOutOfRangeException instead of
12226 ArgumentNullException.
12228 Added new check for length == 0, however
12229 I need to make it return String.Empty from the C code.
12231 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
12232 that calculate the length for us here.
12234 (mono_string_Internal_ctor_sbytep_int_int): Replaced
12235 mono_string_new_utf16 with mono_string_new, since value is utf8.
12237 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
12239 * object.c: register the object for finalization if needed.
12240 Allocate one more char in the string for the terminating 0 char.
12242 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
12244 * class.c, class.h, image.c: check if a type implemenst a destructor.
12245 Use the proper key for array class lookups.
12246 * icall.c: register the icalls in the System.GC class.
12247 * gc.c, gc.h: GC-related functions and icalls.
12249 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12253 * unicode.c: free some strings gotten from mono_string_to_utf8 and
12254 changed a couple of free () by g_free ().
12256 * decimal.c: one-liner in the comments for decimal2string ().
12258 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
12260 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
12262 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
12264 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
12265 * object.c (mono_runtime_invoke_array) : handle null in params
12267 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
12269 * string-icalls.c: fixed bug in split (one off bug)
12271 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
12273 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
12274 * icalls.c: added String::Equals as internal method
12276 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
12278 * threads.c: fixed bug in the double interlocked functions
12280 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
12282 * threads.c: implemented all of the new interlocked icalls.
12283 * string-icalls.c: fix a bug in insert.
12284 * icalls.c: added the icalls for interlocked, removed old string functions.
12286 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
12288 * loader.c: fix off-by-one error when reading argument names.
12290 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12292 * profiler.c: win32 counter implementation (untested).
12293 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
12294 (the latter needs testing and more complete impl. from win32 folks).
12296 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
12298 * object.c: mono_array_new_full workaround mono_array_class_get
12301 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
12303 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
12304 * object.h (mono_string_chars): Changed casting type.
12306 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
12308 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
12309 method signatures to use gunichar2 instead of gint16.
12311 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
12313 * object.h, object.c: domain-specific versions of mono_object_new and
12316 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
12318 * object.c: changed String layout
12320 * string-icalls.c (mono_string_Internal_ctor_chara): added
12321 internal string constructors.
12323 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
12325 * threads.c: pass 'this' to the thread start routine.
12327 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12329 * string-icalls.c: fix IndexOf and LastIndexOf. Now
12330 InternalCompareStr don't call twice mono_string_cmp_char for the last
12331 character. Improved performance in mono_string_cmp_char.
12333 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
12335 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
12336 code into its own library: libmonoruntime.
12338 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
12340 * object.h, object.c: changed array format so that szarrays do not
12341 require a bounds structure.
12342 * icall.c, appdomain.c: support for new szarray format.
12344 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
12346 * metadata.c: compare also the retuns type when comparing signatures:
12347 we didn't do this as an optimization since really overloaded methods
12348 must differ also in the arguments, but this doesn't work with
12349 low-level IL code (or when using explicit conversion operators: see
12350 bug#23498 for an example).
12352 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
12354 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
12356 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
12358 * icall.c: make MonoType::GetElementType its own icall.
12360 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
12362 * icall.c: remove MonoMethod_get_Name().
12363 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
12366 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
12368 * string-icalls.c: optimized a few methods.
12370 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
12372 * icall.c: added all new string internal calls
12373 * string-icalls.c: added, new string internal call implementation.
12374 * object.c: added mono_string_new_size for allocating a string a size
12376 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
12378 * object.c (mono_object_isinst): use the same code as in the
12379 optimized x86 version.
12381 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
12383 * profiler.c: TSC-based timer code (faster and more accurate).
12384 Not hooked up in configure, yet (set USE_X86TSC to 1).
12386 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
12388 * profiler.c, profiler.h: track time spent compiling methods.
12389 * threads.c: track thread creation/destruction.
12391 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
12393 * profiler.c, profiler.h, profiler-private.h: profiling interface
12394 and sample implementation. Moved here so that it can be used also by
12397 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
12399 * reflection.c, reflection.h: keep types and other handles separate in
12400 the hash tables for referred tokens. Add guid for modules.
12402 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
12404 * assembly.c: fix bugs found with valgrind.
12405 * metadata.h, metadata.c: added mono_metadata_guid_heap().
12407 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
12409 * threads: added icall support for getting current domain for
12412 2002-04-13 Martin Baulig <martin@gnome.org>
12414 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
12415 (MonoDebugVarInfo): Added `index' field for register based addresses.
12416 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
12417 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
12418 `MonoDebugVarInfo *params' and `guint32 this_offset' with
12419 `MonoDebugVarInfo *this_var'.
12421 * debug-symfile.c (relocate_variable): New static function to write
12422 a location description for a local variable or method parameter.
12424 2002-04-12 Martin Baulig <martin@gnome.org>
12426 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
12427 stack offset and begin/end scope address of a local variable.
12428 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
12429 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
12430 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
12432 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
12433 Added new relocation types for start/end scope of a local variable.
12435 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
12437 * object.h: add mono_object_domain() macro.
12438 * reflection.c: handle typespecs.
12439 * icall.c: MonoMethod::get_Name() implementation.
12441 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12443 * icall.c: String::GetHashCode() icall implementation.
12445 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
12447 * icall.c: String::IndexOfAny icall.
12448 * object.c, object.h: make array->max_length more useful.
12449 Intrduced mono_object_class() and mono_string_length() macros.
12451 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12453 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
12454 instead of g_unichar_isdigit.
12456 2002-04-11 Nick Drochak <ndrochak@gol.com>
12458 * icall.c: Implement a simple Double.ToString().
12460 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
12462 * appdomain.h: only io-layer.h is supposed to be included.
12463 * icall.c: explicitly import environ. Fix warning.
12465 2002-04-10 Nick Drochak <ndrochak@gol.com>
12467 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
12468 return true even if it's not Daylight Savings time.
12469 Only return false for the case where the function isn't
12470 implemented for a plaform (read Windows).
12472 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
12474 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
12477 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
12479 * mempool.c (mono_mempool_alloc): only use g_malloc when
12480 absolutely necessary.
12482 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
12484 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
12486 * class.c (mono_class_vtable): use domain mempool to allocate vtable
12487 (mono_class_proxy_vtable): use domain mempool
12489 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
12491 * appdomain.h, appdomain.c: split initialization that requires the
12492 execution engine support into mono_runtime_init().
12494 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
12496 * class.c (mono_class_init): don't include vtable inside MonoClass
12497 to save some memory, gather some statistics.
12498 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
12500 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
12502 * icall.c: internalcall implementation for ValueType.Equals().
12504 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
12506 * object.c (mono_message_init): moved
12507 (mono_runtime_exec_main): new arch. independent impl.
12508 (mono_runtime_invoke_array): new method - like
12509 mono_runtime_invoke, but you can pass an array of objects.
12510 (mono_remoting_invoke): new arch. independent impl.
12511 (mono_message_invoke): new arch. independent impl.
12512 (mono_runtime_class_init): new arch. independent impl.
12513 (mono_runtime_object_init): new arch. independent impl.
12515 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12517 * metadata.c, object.c, reflection.c: documented the exported
12520 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
12522 * icall.c: simpler code to pass the assembly builder data to corlib.
12523 Implement GetNestedTypes() internalcall.
12525 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
12527 * class.c: warn if a type can't be loaded.
12529 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
12531 * image.h: typedef MonoImageOpenStatus
12532 * types.h: removed unused file
12534 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
12536 * icall.c: Enum_ToObject accepts enum value arguments.
12538 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
12540 * class.c: move initialization of properties, events and nested
12541 classes, so that they happen for interfaces, too.
12543 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
12545 * icall.c: cleanup some ugly casts in Array_SetValue*.
12547 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
12549 * icall.c: the values array fro enums is of the correct type, now.
12550 Implement (correctly) getFullName instead of assQualifiedName for
12552 * reflection.h, reflection.c: added mono_type_get_name ().
12554 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
12556 * assembly.c, image.h: for each MonoImage, record from wich assembly
12558 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
12559 Make Type.Assembly work.
12561 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
12563 * debug-symfile.h: use char* instead of gpointer to avoid
12566 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
12568 * icall.c (ves_icall_InternalExecute): impl. FielSetter
12569 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
12571 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
12573 * icall.c (mono_message_init): impl. (code cleanup)
12574 (ves_icall_InternalExecute): impl. FieldGetter
12576 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
12577 defined we call all (non-static)methods through the vtable.
12579 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
12581 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
12582 finalizer even though the memory is still referenced (and the chunk of
12583 memory is not freed).
12585 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
12587 * assembly.c: fix brokeness.
12589 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
12591 * class.c: kill some warnings. Check explicit interface method
12592 implementation also without considering the namespace.
12593 Load also literal strings in static class data.
12595 2002-03-29 Miguel de Icaza <miguel@ximian.com>
12597 * assembly.c (default_assembly_name_resolver): Kill memory leak.
12598 (default_assembly_name_resolver): Make the resolver take the
12599 "base" directory where the assembly was originally defined, so we
12600 can load DLLs that are in the same directory as the assembly that
12601 is being referenced.
12603 2002-03-28 Dick Porter <dick@ximian.com>
12609 * unicode.c: Warning cleanups
12611 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
12613 * object.h, reflection.h: use the correct type instead of MonoObject.
12615 2002-03-28 Martin Baulig <martin@gnome.org>
12617 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
12618 (mono_debug_update_symbol_file): Initialize classes if necessary.
12620 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
12622 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
12623 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
12625 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
12627 * assembly.h: fix function prototype.
12628 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
12629 * mono-endian.h: use const cast.
12631 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
12633 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
12635 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
12637 * loader.c: don't assert when a typeref can't be loaded, give
12638 a chance to the runtime to trow an exception instead.
12639 * loader.h: fix warning.
12641 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
12643 * class.c (mono_class_proxy_vtable): added proxy support
12645 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
12647 * icall.c: removed last of PAL calls, added System.Environment
12648 * file-io.h, file-io.c: MonoIO implementation
12649 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
12651 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
12653 * appdomain.c: do not use the byte marker in ldstr table lookup.
12654 * debug-helpers.c: allow two ':' to separate class and method name.
12655 * object.c: allocate arrays bounds with the GC, too.
12656 * verify: add a few more checks.
12658 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
12660 * reflection.c: output also literal strings. Allocate parameter data
12661 with GC_malloc() (thanks, Martin, for catching this!).
12663 2002-03-26 Martin Baulig <martin@gnome.org>
12665 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
12666 include the `this' offset in the `param_offsets'.
12668 2002-03-25 Martin Baulig <martin@gnome.org>
12670 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
12671 mono_debug_get_class() function to get the classes. Added new
12672 relocation types for arrays and strings.
12673 (mono_debug_get_class): New static function to search in all
12674 referenced assemblies for a metadata token.
12676 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
12678 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
12680 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
12681 hold gc-allocated objects. Make the string heap a stream like the
12682 others. Removed duplicated code when writing stream info.
12683 Added asserts to catch possible buffer overflows. Set the sorted map
12684 for tables that need sorting. Added some documentation.
12686 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
12688 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
12689 for interned strings and vtables.
12691 2002-03-24 Martin Baulig <martin@gnome.org>
12693 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
12694 it in the array since it was created with g_slist_prepend().
12696 2002-03-24 Martin Baulig <martin@gnome.org>
12698 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
12699 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
12700 (mono_debug_method_from_token): Renamed to
12701 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
12702 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
12704 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
12707 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
12709 2002-03-24 Martin Baulig <martin@gnome.org>
12711 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
12712 (mono_debug_method_from_token): New func.
12714 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
12715 New interncall, calls mono_debug_local_type_from_signature().
12716 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
12717 calls mono_debug_method_from_token().
12719 2002-03-23 Martin Baulig <martin@gnome.org>
12721 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
12722 specifies the number of bytes to be converted, not the array size.
12723 Return the number of chars, not the number of bytes.
12724 (ves_icall_iconv_get_chars): The `byteCount' argument
12725 specifies the number of bytes to be converted, not the array size.
12727 2002-03-23 Martin Baulig <martin@gnome.org>
12729 * reflection.h (MonoReflectionSigHelper): New type.
12731 * reflection.c (mono_reflection_sighelper_get_signature_local),
12732 (mono_reflection_sighelper_get_signature_local): New functions.
12734 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
12735 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
12738 2002-03-23 Martin Baulig <martin@gnome.org>
12740 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
12741 is_writeable is set.
12742 (mono_raw_buffer_update): New function to write the modified map
12745 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
12747 * debug-symfile.c (mono_debug_update_symbol_file): Call
12748 mono_raw_buffer_update() when done writing.
12750 2002-03-23 Martin Baulig <martin@gnome.org>
12752 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
12754 * debug-symfile.c: Added support for arguments and local variables.
12756 2002-03-23 Dick Porter <dick@ximian.com>
12758 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
12759 protected by ifdefs, hence breaking the w32 build.
12761 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
12763 * object.c: implement is_interned() the right way.
12765 2002-03-21 Martin Baulig <martin@gnome.org>
12767 * debug-symfile.[ch]: New files to handle debugging information
12768 files. There's also support to dynamically update these symbol
12769 files to include machine dependent information.
12771 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
12773 * threads.c (mono_thread_create): new function to create thread
12776 2002-03-20 Martin Baulig <martin@gnome.org>
12778 * icall.c (ves_icall_InternalInvoke): Create a new object if the
12779 method is a constructor.
12780 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
12781 points to ves_icall_InternalInvoke().
12783 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
12785 * file-io.c: Flush shouldn't throw exceptions.
12787 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
12789 * file-io.c: FileStream flush support; FileSetLength now
12790 restores file pointer.
12792 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
12794 * class.c: set image for pointer classes.
12796 2002/03/19 Nick Drochak <ndrochak@gol.com>
12798 * sysmath.c: Forgot one.
12800 2002-03-18 Miguel de Icaza <miguel@ximian.com>
12802 * sysmath.c: Avoid redefining existing names.
12804 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
12806 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
12807 handled by runtime as icall rather than dllimport from libm.so
12808 * file-io.c, file-io.h: fixed handle argument type.
12810 2002-03-18 Dick Porter <dick@ximian.com>
12812 * reflection.c (mono_image_get_type_info): rename interface to
12813 iface, because of "#define interface struct" on windows.
12815 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
12817 * class.c, class.h: rename and export mono_ptr_class_get().
12818 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
12819 * reflection.c, reflection.h, icall.c: better/saner type name
12820 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
12823 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
12825 * class.c (mono_class_init): removed hardcoded GHC_SLOT
12827 * icall.c (ves_icall_InternalInvoke): impl.
12829 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
12831 * reflection.c: output the interface map table, too.
12833 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
12835 * class.c (class_compute_field_layout): separate computation of
12836 static field layout
12838 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
12840 * icall.c: added System.Buffer support.
12841 * file-io.c: moved file icalls from PAL to FileStream.
12843 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
12845 * icall.c (ves_icall_System_Object_GetHashCode): impl.
12847 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
12849 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
12851 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
12853 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
12855 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
12857 * debug-helpers.{c,h}: moved here from monograph some useful functions
12858 to locate a method by name/signature in a class or image. Included
12859 also a small and flexible IL disassembler.
12861 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
12863 * reflection.c: fixup tokens in methods with small header size, too.
12865 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
12867 * object.c (mono_string_to_utf8): remove assert(!error), instead
12870 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
12872 * icall.c: update to the new mono_Array_class_get interface.
12874 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
12876 * appdomain.c, object.c: Boehm-GC enable.
12877 * icall.c: make get_data_chunk() support split data requests.
12878 Ensure a class is initialized in more cases. Return only the first
12879 property found in GetProperties() or the compiler gets confused.
12880 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
12881 * reflection.h, reflection.c: add fixup mechanism for field and method
12882 tokens. Initialize assembly->typeref in a single place. Output
12883 properties after events. Support custom attributes for events, too.
12884 Typo fix for paramter custom attrs.
12886 2002-03-07 Martin Baulig <martin@gnome.org>
12888 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
12890 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
12892 * class.c (mono_array_class_get): fix. for multi. dim. arrays
12894 2002-03-06 Martin Baulig <martin@gnome.org>
12896 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
12897 non-zero lower bounds. See testcases #F10-#F13.
12899 2002-03-05 Martin Baulig <martin@gnome.org>
12901 * exception.c (mono_get_exception_argument_out_of_range): New exception.
12903 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
12904 ves_icall_System_Array_GetValue(), only calculate the absolute array position
12906 (ves_icall_System_Array_SetValue): Likewise.
12907 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
12908 as argument and does the actual work. This function is used when copying a
12909 multi-dimensional array.
12910 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
12911 now do all the widening conversions of value types.
12912 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
12914 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
12916 * class.c: remove some magic numbers and use the smbolic names,
12917 instead. Added init_events() to load event info at class init time.
12918 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
12919 and mono_metadata_methods_from_event().
12920 * reflection.h, reflection.c: added support for writing out the evnets
12921 related information.
12923 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
12925 * reflection.h, icall.c: use a different method (GetInterfaces)
12926 to gather interface info and add isbyref, isprimitive and
12927 ispointer to the ves_icall_get_type_info() return value.
12929 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
12931 * class.h: stared adding support for events.
12932 * icall.c: split find_members implementation. Added debug icall to get
12933 the address of an object.
12934 * reflection.c: handle TypeBuilders in mono_type_get_object().
12936 2002-03-01 Martin Baulig <martin@gnome.org>
12938 * icall.c (ves_icall_System_Array_GetLength): This must throw an
12939 ArgumentOutOfRangeException(), not an ArgumentException().
12940 (ves_icall_System_Array_GetLowerBound): Likewise.
12941 (ves_icall_System_Array_GetValue): Improved argument checking.
12942 (ves_icall_System_Array_SetValue): Improved argument checking.
12944 2002-03-01 Martin Baulig <martin@gnome.org>
12946 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
12947 called with invalid arguments rather than just dying with g_assert().
12948 (ves_icall_System_Array_SetValue): Likewise.
12949 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
12950 raise a NotImplementedException instead.
12951 (ves_icall_System_Array_GetLength): Added argument checking.
12952 (ves_icall_System_Array_GetLowerBound): Added argument checking.
12954 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
12956 * object.h (mono_assert): new macros mono_assert and
12957 mono_assert_not_reached
12959 2002-02-28 Martin Baulig <martin@gnome.org>
12961 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
12962 and "System::String::IsInterned" to "System::String::_IsInterned".
12964 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
12966 * icall.c: remove hacks for typebuilder. Added icall to create a
12967 modified type from a tybebuilder.
12968 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
12969 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
12970 to create a backing MonoClass for a TypeBuilder.
12972 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
12974 * class.c, class.h: more refactoring of class init.
12975 Export mono_class_setup_mono_type() and mono_class_setup_parent().
12977 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
12979 * marshal.c, marshal.h: start of marshaling interface.
12981 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
12983 * icall.c: fix order in assembly qualified name icall.
12985 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
12987 * class.c: do not free str, since we store it in the hash table.
12988 * reflection.h: add label field to MonoILExceptionInfo.
12989 * reflection.c: handle references to more than one assembly. Handle
12990 case when there isn't a module created in the assembly.
12992 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
12994 * class.c: Fix typo. Start refactoring of class init code.
12996 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
12998 * appdomain.c: exit with 1 on error.
12999 * class.c: we already have the name in MonoClassField.
13000 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
13001 MonoStreamHeader instead of an offset of image->raw_metadata.
13003 2002-02-26 Miguel de Icaza <miguel@ximian.com>
13005 * appdomain.c (mono_init): Be even more descriptive about the error.
13007 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
13009 * appdomain.c: give the user an informative message when corlib can't
13012 2002-02-26 Martin Baulig <martin@gnome.org>
13014 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
13015 New icall to get the time zone data.
13017 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
13019 * reflection.c: set virtual and raw size of section correctly.
13020 * threads.c: transfer domain information to newly created threads.
13022 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
13024 * class.c: when instancing a class in a domain, load the default
13025 vaules for static fields from the constant table. Fix System.Enum to
13027 * icall.c: implement Object::GetType() internalcall. Implemented
13028 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
13029 Fixed checking of binding flags in find_members().
13030 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
13031 * reflection.c: handle enumerations when writing to the constant
13032 table. Use a different object cache for types.
13035 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
13037 * object.c (mono_object_isinst): fix for arrays
13039 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
13041 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
13043 * object.c: don't use mprotect () and fix intern pool hash table
13044 lookup for big endian systems.
13046 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
13048 * icall.c: change type_is_subtype_of () signature.
13050 2002-02-21 Mark Crichton <crichton@gimp.org>
13052 * rand.c, rand.h: Added random number generator for
13053 System.Security.Cryptography classes.
13055 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
13057 * icall.c: Added System.Security.Cryptography calls.
13059 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
13061 * class.c, icall.c, metadata.c: better support for pointer types.
13062 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
13063 * reflection.c: Add support for getting custom attrs for properties
13064 and simplify some code.
13066 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
13068 * icall.c: change getToken () and add custom attribute GetBlob()helper
13070 * reflection.h: add custom attrs array to the reflection builder structures.
13071 * reflection.c: encode and emit custom attributes for all the relevant
13072 reflection objects. Cache fieldref and methodref tokens. Change
13073 mono_image_create_token() interface to take a MonoDynamicAssembly.
13074 More complete custom attributes decoder. Load custom attributes for
13075 Assembly, Field, Method and Constructor objects, too. Make the
13076 returned array an Attribute[] one, not object[]. Added
13077 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
13078 custom attribute constructor.
13080 2002-02-20 Dick Porter <dick@ximian.com>
13084 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
13085 problem code out for now).
13087 2002-02-19 Radek Doulik <rodo@ximian.com>
13089 * object.c (mono_ldstr): use hash table to avoid multiple swapping
13091 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
13093 * icall.c: register the GetCustomAttributes method.
13094 * object.c, object.h: add mono_string_new_len ().
13095 * reflection.h, reflection.c: added mono_runtime_invoke(),
13096 mono_install_runtime_invoke(). Added
13097 mono_reflection_get_custom_attrs () to load custom attributes and
13098 create the attribute objects.
13100 2002-02-19 Dick Porter <dick@ximian.com>
13101 * threads-dummy-types.c:
13102 * threads-dummy-types.h:
13105 * threads-pthread-types.c:
13106 * threads-pthread-types.h:
13107 * threads-pthread.c:
13108 * threads-pthread.h: Deleted obsolete files
13110 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
13112 * class.c (mono_class_vtable): runtime init the class when we
13113 allocate static class data.
13115 * icall.c (ves_icall_System_Array_SetValue): check for null values.
13117 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
13118 and String - but we will need generic marshalling support in the
13120 (mono_init): set the domain name in a ms compatible way
13122 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
13125 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
13127 * object.c (mono_array_clone): use alloca() instead of g_malloc
13130 * appdomain.c (mono_domain_unload): impl.
13132 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
13134 * appdomain.c, object.c: fix intern pool implementation.
13135 * class.c: fix alignment code.
13137 2002-02-16 Radek Doulik <rodo@ximian.com>
13139 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
13140 and s2 > s1, just copy lower bytes to be compatible with little
13141 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
13142 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
13144 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
13145 force big_endian to be 1 for big endian machines
13146 (ves_icall_iconv_new_decoder): ditto
13148 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
13150 * socket-io.c (convert_sockopt_level_and_name): If the system
13151 doesn't define SOL_IP or SOL_TCP, get them by hand using
13152 getprotobyname() and caching the values (because this could be a
13154 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
13155 Use the appropriate struct when the system does support it. Ie,
13156 not all systems have struct ip_mreqn so use struct ip_mreq when
13159 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
13161 * reflection.c: handle finally clauses.
13163 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
13165 * socket-io.c: use g_snprintf() instead of snprintf.
13167 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
13169 * reflection.c (mono_param_get_objects): Cast second argument to
13170 mono_method_get_param_names to a const char** to silence the
13173 * appdomain.c (mono_domain_assembly_open): Put parens around the
13174 truth statement in the for-loop.
13176 * unicode.c (iconv_convert): Got rid of a compiler warning about
13177 int i being unused when the system has a new iconv.
13178 (iconv_get_length): Same.
13180 * image.c (load_class_names): Cast the second argument to
13181 g_hash_table_insert() to char* to hush compiler warnings about the
13183 (mono_image_open): Same here.
13185 * socket-io.c: Don't conditionally include sys/filio.h or
13186 sys/sockio.h here anymore since we now get them from
13187 io-layer/io-layer.h
13188 (inet_pton): If the system doesn't support inet_aton, implement
13189 using inet_addr and also #define INADDR_NONE if it isn't defined
13192 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
13194 * metadata.c, metadata.h: added function to get packing and size info
13196 * reflection.h, reflection.c: handle field RVA data. Save info about
13197 the table layout if needed. Assign typedef indexes to all the types
13198 before dumping the info about them to avoid forward reference problems.
13200 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
13202 * socket-io.c (convert_sockopt_level_and_name): ifdef
13203 SO_ACCEPTCONN because it is not defined on my system (old debian)
13205 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
13207 * opcode.c: use stddef.h to get NULL.
13209 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
13211 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
13212 for FIONBIO, FIONREAD and SIOCATMARK.
13213 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
13214 define INADDR_NONE and besides, inet_addr() is deprecated and
13215 should not be used. Use inet_pton() instead - it also has the
13216 added bonus that it can easily handle IPv6 addresses as well.
13217 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
13219 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
13221 * decimal.c: remove _MSC_VER conditional.
13223 2002-02-13 Dick Porter <dick@ximian.com>
13226 * icall.c: Internal calls for Blocking, Select, Shutdown,
13227 GetSocketOption and SetSocketOption
13229 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
13231 * assembly.cs: better resolver: use it instead of some kludgy
13234 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
13236 * reflection.c: the best way to speed-up the compiler is to avoid
13239 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
13241 * class.c (mono_class_vtable): changed the object layout
13242 (obj->vtable->class).
13243 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
13245 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
13247 * assembly.c: look for assemblies in the assembly dir, too.
13249 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
13251 * class.c: fix thinko in mono_class_from_type().
13253 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
13255 * exception.h, exception.c: added TypeLoadException.
13256 * object.h, object.c: added mono_array_clone ().
13257 * icall.c: handle throwOnError in AssemblyGetType().
13258 Added Array.Clone().
13259 * opcode.h, opcode.c: use a single value for the opcode val.
13260 Compile fix for non-gcc compilers.
13262 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
13264 * opcodes.c, opcodes.h: export interesting info about opcodes.
13266 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
13268 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
13271 * class.c (class_compute_field_layout): set element_class for enums
13272 (mono_class_create_from_typedef): set element_class for normal classes
13274 * icall.c (ves_icall_System_Enum_get_value): impl.
13276 * class.c (mono_class_create_from_typedef): do not set valuetype
13277 flag for System.ValueType and System.Enum
13279 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
13281 * unicode.c (iconv_convert): fix big endian problem.
13283 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
13285 * class.c: add asserts if we are ever going to scribble over memory.
13286 * socket-io.c: not all systems have AF_IRDA defined.
13288 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
13290 * class.c (class_compute_field_layout): do not consider static
13291 fields to compute alignment
13293 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
13295 * appdomain.c (mono_appdomain_get): impl.
13296 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
13298 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
13300 * icall.c: ignore "file://" prefix when loading an assembly.
13302 2002-01-23 Dick Porter <dick@ximian.com>
13306 * Makefile.am: Added socket support
13308 2002-01-23 Miguel de Icaza <miguel@ximian.com>
13310 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
13311 code back. This should return the assemblies that are loaded by
13312 the runtime on behalf of an application domain.
13314 The current implementation is still broken, it just returns every
13315 assembly loaded, but until we get real applications domain this
13318 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
13320 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
13323 2002-01-23 Miguel de Icaza <miguel@ximian.com>
13325 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
13326 the mono_class_from_name lookup.
13327 (ves_icall_get_parameter_info): ditto.
13328 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
13330 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
13332 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
13334 * class.c: load also nested classes on class init.
13335 System.ValueType instance methods gets passed boxed
13336 values, unless methods in derived classed that get a pointer to the
13338 * icall.c: use better name parsing code in GetType().
13339 * image.c, image.h: add mono_image_loaded ().
13340 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
13341 * reflection.c, reflection.h: added mono_reflection_parse_type().
13343 2002-01-22 Veronica De Santis <veron78@interfree.it>
13345 * icall.c : Added mapping of internal calls for Manual and Auto reset events
13346 * threads.c : Added the implementation of internal calls for events
13347 * threads.h : Added prototypes of internal calls for events
13349 2002-01-21 Radek Doulik <rodo@ximian.com>
13351 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
13353 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
13355 * class.c (mono_class_init): set min_align to 1 (instead of 0)
13356 (mono_class_value_size): use min_align
13358 2002-01-20 Dick Porter <dick@ximian.com>
13361 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
13362 so it compiles on w32.
13364 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
13366 * metadata.c (mono_type_stack_size): impl.
13368 * class.c (mono_class_get_field): impl. memberref token
13370 2002-01-16 Veronica De Santis <veron78@@interfree.it>
13372 * icall.h : Added the internal calls mapping for CreateMutex_internal
13373 and ReleaseMutex_internal.
13374 * threads.h : Added the prototype of mutexes internal calls.
13375 * threads.c : Added the implementations of mutexes internal calls.
13377 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
13379 * metaparse.h: removed unused file.
13380 * reflection.c, reflection.h: added stream_data_align () function
13381 to align data in streams and keep stream aligned. Add support for
13382 exception support in method headers.
13384 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
13386 * unicode.c: make iconv_convert () return the number of bytess written
13387 in the output buffer.
13389 2002-01-15 Dick Porter <dick@ximian.com>
13390 * threads.c: Make the runtime's idea of infinite timeouts coincide
13391 with the class library's
13393 Fix a particularly egregious bug in mono_thread_cleanup(). That
13394 code was so utterly bogus it must have been written on a Monday.
13396 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
13398 * reflection.h: add subtypes field to TypeBuilder.
13399 * reflection.c: encode constants for literal fields.
13400 Handle subtypes. Fix user string token (and add a zero byte)
13403 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
13405 * class.c (mono_class_init): bug fix: assign slot numbers for
13408 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
13410 * reflection.c: don't try to output a code RVA for abstract methods.
13411 Small fixes for method header format. Output parameter info to the
13412 ParamDef table. Save method overriding info to MethodImpl table.
13413 Fix property support. Allow typedef.extends to be a type in the
13415 * verify.c: fix off-by-one error.
13417 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
13419 * class.c: fix mono_class_from_mono_type () for szarray types.
13420 Remove unused cache check in mono_class_from_type_spec().
13421 * icall.c: *type_from_name () functions handle simple arrays and byref.
13422 * reflection.c: handle byref and szarray types. Handle methods without
13423 body (gets P/Invoke compilation working). Handle types and fields in
13425 * reflection.h: add rank to MonoTypeInfo.
13427 2002-01-10 Dick Porter <dick@ximian.com>
13429 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
13432 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
13434 * icall.c: initialize class in type_from_handle ().
13435 Loop also in parent classes for get_method ().
13436 * reflection.c: properly encode class and valuetype types.
13437 Start on encoding TypeBuilder types. Handle fieldrefs.
13438 Use correct length when registering a user string.
13439 Handle ConstructorBuilder and MonoMethod in get_token ().
13440 Make mono_type_get_object () aware of cached types.
13441 * object.c: back out change to mono_string_new ().
13443 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
13444 * object.c: mono_string_new should return a NULL when the string
13445 passed in is NULL -- not try to deference it.
13447 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
13449 * icall.c: hack to make IsSubType work for TypeBuilders.
13450 * reflection.c: emit constructors before methods.
13451 Retrieve param names in mono_param_get_objects().
13453 2002/01/05 Nick Drochak <ndrochak@gol.com>
13455 * Makefile.am: fix list of headers and sources so automake 1.5
13456 doesn't complain. Removed \# at end of list.
13458 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
13460 * reflection.c: get token for a method ref. Set return type of
13461 constructor to void.
13462 * loader.c: debug message.
13463 * class.c: typo fix.
13465 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
13467 * icall.c: fix array init with rank > 1. FindMembers
13468 loops in parent class as well.
13469 * image.c: do not insert nested types in name cache.
13470 * reflection.c: warning fix.
13471 * reflection.h: add override method (for interface impl).
13473 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
13475 * metadata.c: fix customattr decoding.
13477 2001-12-21 Miguel de Icaza <miguel@ximian.com>
13479 * rawbuffer.cs: Added native Win32 implementation, avoids using
13480 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
13482 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
13484 * class.c: make the low-level routines handle the cache.
13486 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
13488 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
13490 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
13492 * class.c: fix mono_array_element_size() for objects.
13493 * class.h, class.c: add properties to MonoClass and load them
13495 * icall.c: check with isinst() when assigning a value to an array
13496 instead of requiring the classes to match exactly.
13497 Implemented icall for System.Type::GetType().
13498 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
13499 enums. Handle bindingflags when looking for methods and fields.
13500 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
13501 and mono_metadata_methods_from_property().
13502 * reflection.h, reflection.c: added structures for propreties,
13503 parameters and enums. Implemented mono_property_get_object() and
13504 mono_param_get_objects().
13506 2001-12-18 Dick Porter <dick@ximian.com>
13508 * file-io.c: Use mono_string_to_utf16() instead of
13509 mono_string_chars()
13511 * object.c: Added mono_string_to_utf16(), which copies the non
13512 NULL-terminated MonoString into a new double-null-terminated
13515 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
13517 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
13519 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
13521 * file-io.c: raise exceptions if handle is invalid.
13523 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
13525 * assembly.c: yet another check for mscorlib.
13526 * class.c, class.h: load nesting info for classes.
13527 * icall.c: many new functions to support the Reflection classes.
13528 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
13529 * reflection.h, reflection.c: mono_image_create_token(),
13530 mono_assembly_get_object(), mono_type_get_object(),
13531 mono_method_get_object(), mono_field_get_object(): methods to return
13532 objects that parallel the C representation of assemblies, types,
13535 2001-12-11 Dick Porter <dick@ximian.com>
13538 * file-io.c: Internal calls for file IO.
13540 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
13542 * tabledefs.h: missing FileAttributes.
13543 * verify.h, verify.c: use is_valid_string () to simplify and check for
13544 valid strings more correctly. Fix warnings and speeling.
13545 Check more tables: Filed, File, ModuleRef, StandAloneSig.
13546 Check code: branches, maxstack, method calls.
13548 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
13550 * object.c (mono_object_allocate): removed static, so that the jit
13551 can allocate value types.
13553 * icall.c (ves_icall_System_DateTime_GetNow): impl.
13555 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
13557 * class.c: init enum types right away and register the
13558 token->MonoClass map in mono_class_create_from_typedef ().
13559 * verify.h, verify.c: first cut of the verifier.
13560 * pedump.c: add --verify switch to verify metadata tables.
13561 * tabledefs.h: add some missing enums.
13563 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
13565 * class.c (mono_install_runtime_class_init): impl.
13566 (mono_class_init): renamed mono_class_metadata_init to
13567 mono_class_init, also removed the metadata_inited flag
13569 * object.c (mono_object_isinst): use faster algorithm
13571 2001-11-30 Radek Doulik <rodo@ximian.com>
13573 * mono-endian.h: reverted last change
13574 added function prototypes
13576 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
13577 add mono-endian.c back
13579 * mono-endian.c: returned back, as Paolo pointed out, it's needed
13580 for unaligned access, I've mistaked it with endianess. I am
13582 (mono_read16): fix reverted endianess
13583 (mono_read64): ditto
13584 (mono_read32): ditto
13586 2001-11-30 Dick Porter <dick@ximian.com>
13588 * exception.c: Implement mono_exception_from_name()
13590 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
13592 * metadata.h, metadata.c: remove params_size and locals_size and their
13593 calculation from the metadata code: they are only usefult to the
13596 2001-11-29 Radek Doulik <rodo@ximian.com>
13598 * object.c (mono_ldstr): swap bytes here, it's probably not the
13599 best place, but works for me now, I'll redo it once I know mono
13600 better, also note that I add PROT_WRITE and don't reset back, also
13601 note that it's only affects big endians, so x86 should be OK
13603 * mono-endian.h (read16): use just glib macros for both endians
13605 * mono-endian.c: removed as glib macros are used in in
13606 mono-endian.h so we don't need to care about endianess for read
13607 macros as glib does that for us already
13609 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
13611 * class.h, class.h: take minimum alignment into consideration so
13612 that the fields of a class remain aligned also when in an array.
13614 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
13616 * loader.h, loader.c: add mono_method_get_param_names().
13617 * class.c: 0-init class fields.
13619 2001-11-26 Dick Porter <dick@ximian.com>
13623 * threads.c: New file that handles System.Threading on all platforms
13626 * object.h: Remove the synchronisation struct from MonoObject,
13627 replace it with a pointer that gets initialised on demand
13629 * Makefile.am: Replace all the system-specific threading code with
13630 a single file that uses the new wrapper library
13632 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
13634 * class.c, class.h: add mono_install_trampoline() so that the runtime
13635 can register a function to create a trampoline: removes the ugly
13636 requirement that a runtime needed to export arch_create_jit_trampoline.
13637 * object.h, object.c: added mono_install_handler() so that the runtime
13638 can install an handler for exceptions generated in C code (with
13639 mono_raise_exception()). Added C struct for System.Delegate.
13640 * pedump.c: removed arch_create_jit_trampoline.
13641 * reflection.c: some cleanups to allow registering user strings and
13642 later getting a token for methodrefs and fieldrefs before the assembly
13644 * row-indexes.h: updates and fixes from the new ECMA specs.
13646 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
13648 * class.h, class.c: add enum_basetype field to MonoClass.
13649 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
13650 to get index in the constant table reated to a field, param or
13652 * reflection.h, reflection.c: handle constructors. Set public-key and
13653 version number of the built assembly to 0.
13654 * row-indexes.h: update from new ECMA spec.
13656 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
13658 * class.h, class.c: add a max_interface_id to MonoClass.
13659 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
13660 since it's used to do that. Added mono_type_type_from_obj().
13661 Make GetType() return NULL instead of segfaulting if the type was not
13662 found. Handle simple arrays in assQualifiedName.
13663 * object.h: add a struct to represent an Exception.
13664 * reflection.c: output call convention in method signature.
13665 Add code to support P/Invoke methods and fixed offsets for fields.
13667 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
13669 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
13671 * icall.c: use mono_array_addr instead of array->vector: fixes the
13672 reflection image writing.
13673 * reflection.c: init call convention byte to 0 in method signature.
13674 Encode the property signature. Don't output property-related methods
13675 twice. Really process the properties for a type (don't cast a field to
13676 a property, my mom always told me that).
13677 Fix 64 bit issues in pointer alignment in a different and more
13680 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
13682 * loader.h: Removed type class from MonoDefaults, added monotype
13684 * loader.c: Loaded MonoType, removed loading of Type
13686 * icall.c (my_mono_new_object): Now returns a System.MonoType,
13687 and fills in System.Type._impl with a RuntimeTypeHandle rather
13688 than the actual MonoClass *
13690 (ves_icall_type_from_handle): change from type_class to
13693 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
13696 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
13699 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
13701 (ves_icall_System_Reflection_Assembly_GetType): implemented
13703 (ves_icall_System_MonoType_assQualifiedName): implemented
13705 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
13707 2001-11-09 Miguel de Icaza <miguel@ximian.com>
13709 * assembly.c (mono_assembly_open): Implement a cache for the
13712 (mono_assembly_close): only destroy the assembly when the last
13715 2001-11-09 Dick Porter <dick@ximian.com>
13717 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
13719 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
13721 * class.c (mono_class_metadata_init): bug fix: compute the right slot
13723 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
13725 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
13726 from Martin Weindel.
13727 * object.h: add mono_string_chars ().
13729 2001-11-07 Miguel de Icaza <miguel@ximian.com>
13731 * reflection.c (build_compressed_metadata): Eliminates warnings
13732 and uses 64-bit clean code.
13734 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
13735 (mono_type_equal): Change signature to eliminate warnings.
13737 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
13739 * icall.c, loader.c: remove the internalcall array constructors.
13740 Changes to match the new MonoArray structure.
13741 * object.h, object.c: an array object doesn't allocate an extra
13742 vector. Add mono_array_new_full () to create jagged arrays easily.
13744 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
13746 * metadata.h, metadata.c: add mono_metadata_field_info () to
13747 retreive all the info about a field from vairous tables.
13748 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
13749 * class.h, class.c: augment MonoClassField with more info.
13750 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
13751 policy and load a field's RVA if needed.
13753 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
13755 * class.c (mono_class_metadata_init): create a trampoline for all
13756 virtual functions instead of actually compiling them.
13758 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
13760 * class.h, class.c: include name in MonoClassField.
13761 * class.c: fix fundamental type of System.Object and System.String.
13762 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
13764 * icall.c: remove internalcalls for the Reflection stuff that is now
13766 * loader.c: mono_field_from_memberref () implementation.
13767 * mono-endian.c: thinko (s/struct/union/g).
13768 * object.c, object.h: make the mono_string_* prototypes actually use
13769 MonoString instead of MonoObject.
13770 * reflection.c, reflection.h: updates for changes in the reflection
13771 code in corlib: we use C structures that map to the actual C# classes.
13772 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
13773 fat method header if needed and use the info from the ILGenerator for
13774 methods. Handle fields in types. Misc fixes.
13776 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
13778 * class.c (mono_class_metadata_init): bug fix: always allocate
13779 space for static class data
13781 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
13783 * class.c (mono_compute_relative_numbering): use relative
13784 numbering to support fast runtime type checks.
13786 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
13788 * class.c (mono_class_create_from_typeref): added debugging output
13789 to print class name when MonoDummy is returned instead of real class
13791 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
13793 * class.c (mono_class_metadata_init): interface offset table now
13794 contains pointers into the vtable - this is more efficient for the jit
13796 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
13798 * class.c (mono_class_metadata_init): use a temporary vtable (the
13799 old algorithm only worked for the interpreter, but not for the jit)
13801 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
13803 * loader.c (method_from_memberref): use mono_class_get to get the
13804 class of an array instead of using System.Array directly.
13805 (mono_get_method): also add MEMBERREF methods to the method cache
13806 which usefull for arrays.
13808 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
13810 * pedump.c (arch_compile_method): added to compute vtable entry
13812 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
13813 number of interfaces.
13815 * class.h: merged MonoArrayClass into MonoClass
13817 * class.c (mono_class_create_from_typedef): compute the vtable size and
13818 allocate space to include the vtable inside MonoClass
13819 (mono_class_metadata_init): initialize the vtable
13821 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
13823 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
13824 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
13825 * image.c: endian fixes by Laurent Rioux.
13826 * object.h, object.c: rename MonoStringObject to MonoString and
13827 MonoArrayObject to MonoArray. Change some function names to conform to
13828 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
13829 guint16* as first argument, so don't use char*.
13830 Provide macros to do the interesting things on arrays in a portable way.
13831 * threads-pthread.c: updates for the API changes and #include <sched.h>
13832 (required for sched_yield()).
13833 * icall.c: updates for the API changes above.
13834 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
13835 platforms that need them.
13837 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
13839 * class.c: set the correct type for all the fundamental
13840 type when loading the class.
13842 2001-10-05 Dick Porter <dick@ximian.com>
13844 * threads-pthread.c (pthread_mutex_timedlock): Simple
13845 compatibility version for C libraries that lack this call.
13847 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
13849 * class.c: MonoTypes stored in MonoClass are stored as
13850 fundamental MonoTypes when the class represents a
13851 fundamental type (System.Int32, ...).
13852 The TypeHandle return by ldtoken is a MonoType*.
13853 * icall.c: ves_icall_get_data_chunk () write out all the
13854 PE/COFF stuff. Implement ves_icall_define_method (),
13855 ves_icall_set_method_body (), ves_icall_type_from_handle ().
13856 * image.c: properly skip unknown streams.
13857 * loader.h, loader.c: add type_class to mono_defaults.
13858 * metadata.c, metadata.h: export compute_size () as
13859 mono_metadata_compute_size () with a better interface.
13860 Typo and C&P fixes.
13861 * pedump.c: don't try to print the entry point RVA if there is no entry point.
13862 * reflection.c, reflection.h: many cleanups, fixes, output method
13863 signatures and headers, typedef and typeref info, compress the metadata
13864 tables, output all the heap streams, cli header etc.
13865 * row-indexes.h: typo fixes.
13867 2001-10-04 Dick Porter <dick@ximian.com>
13869 * object.h: Add a synchronisation mutex struct to MonoObject
13871 * object.c (mono_new_object): Initialise the object
13872 synchronisation mutexes
13874 * icall.c: System.Threading.Monitor internal calls
13876 * threads-pthread.h:
13877 * threads-pthread.c: System.Threading.Monitor internal calls
13879 * threads-types.h: New file, includes the system-specific thread
13882 * threads-pthread-types.h:
13883 * threads-pthread-types.c: New files, handle pthread-specific
13884 synchronisation types
13886 * threads-dummy-types.h:
13887 * threads-dummy-types.c: New files of dummy support for
13888 thread-specific types
13892 * pedump.c: include mono-endian.h not endian.h
13894 * Makefile.am: More threads files.
13895 Name mono-endian.h not endian.h
13897 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
13899 * Makefile.am, reflection.h, reflection.c: move here the reflection related
13900 stuff and implement a few more bits.
13901 * icall.c: a field needs to be dereferenced twice. Do not use the same
13902 name for two variables in the same scope.
13903 * image.c, image.h: cleanups.
13905 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
13907 * class.c (mono_class_metadata_init): bug fix: compute the right size
13909 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
13911 * icall.c: implemented some of the Reflection internalcalls.
13912 * image.c, image.h: start writing out the PE/COFF image.
13913 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
13914 that does the reverse than decode_blob_size ().
13915 * object.c: use mono_metadata_encode_value (). Move here
13916 temporary implementation of mono_string_to_utf8 ().
13917 * rawbuffer.c: make malloc_map static.
13919 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
13921 * metadata.c: fix type comparison for arrays.
13922 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
13923 Added a couple of new classes to monodefaults.
13924 * icall.c: added a couple of Reflection-related internalcalls.
13925 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
13926 Added a byval_arg MonoType to MonoClass.
13928 2001-09-28 Dick Porter <dick@ximian.com>
13931 * threads-pthread.h:
13932 * threads-pthread.c: Implemented internal calls for
13933 LocalDataStoreSlot operations. Applied mutexes around all shared
13934 data. Reworked the thread creation and Start() operations to
13935 avoid a race condition.
13938 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
13940 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
13942 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
13944 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
13946 * class.c, loader.c: warn and return NULL instead of erroring out.
13947 * icall.c: added System.AppDomain::getCurDomain().
13948 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
13950 2001-09-25 Dick Porter <dick@ximian.com>
13952 * threads-pthread.h:
13953 * threads-pthread.c: Implemented timed thread joining and added
13954 System.Threading.Thread::Join_internal internal call
13956 * icall.c: Added System.Threading.Thread::Join_internal internal call
13959 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
13961 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
13963 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
13964 mono_string_intern () to implement the semantics of the ldstr opcode
13965 and the interning of System.Strings.
13966 * icall.c: provide hooks to make String::IsIntern and String::Intern
13969 2001-09-23 Dick Porter <dick@ximian.com>
13972 * threads-dummy.h: New files of dummy threading routines
13974 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
13975 support code based on system specifics
13977 Rename PTHREAD_LIBS to THREAD_LIBS
13979 2001-09-23 Dick Porter <dick@ximian.com>
13981 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
13982 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
13984 (mono_thread_init): Set up a Thread object instance to return when
13985 the main thread calls Thread.CurrentThread
13986 (mono_thread_cleanup): Wait for all subthreads to exit
13988 * icall.c: New internal calls for System.Threading.Thread::Sleep
13989 (including Schedule) and CurrentThread
13991 * threads.h: New file, to insulate thread-specific stuff from the
13994 2001-09-21 Dick Porter <dick@ximian.com>
13996 * threads-pthread.h:
13997 * threads-pthread.c: New file, for handling pthreads-style
13998 threading support. Start() now starts a new thread and executes
13999 the ThreadStart delegate instance.
14001 * icall.c: Added the internalcall for
14002 System.Threading.Thread::Start_internal
14004 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
14006 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
14008 * loader.c: work around the different signatures for delegates
14009 constructors csc generates in compiled code vs the ones compiled in mscorlib.
14011 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
14013 * class.h, class.c: add mono_class_get_field_from_name ().
14014 * *: Fix C comments and other ANSI C issues.
14016 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
14018 * endian.h, assembly.c: fix some endianness issues.
14020 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
14022 * loader.h, load.c: add delegate_class to mono_defaults.
14023 Handle runtime provided methods in mono_get_method ().
14025 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
14027 * loader.c (mono_get_method): use pinvoke for internal call
14029 * icall.c: use pinvoke for internal call
14031 * loader.c (method_from_memberref): set the method name
14033 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
14035 * metadata.c: help the compiler generate better code for
14036 mono_class_from_mono_type ().
14038 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
14040 * class.c (mono_class_metadata_init): delayed computing of the
14041 class size to mono_class_metadata_init ()
14043 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
14045 * class.c, class.h: add an interfaces member to MonoClass.
14046 * image.c, image.h: add assembly_name field to MonoImage
14047 from the assembly table.
14048 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
14050 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
14052 * class.c: Handle Array in mono_class_from_mono_type ().
14053 * metadata.c, pedump.c: some endian fixes.
14055 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
14057 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
14058 * metadata.c: fix small problem introduced with the latest commit.
14060 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
14062 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
14063 We don't need a MonoMetadata pointer anymore to compare signatures in
14064 mono_metadata_signature_equal (), update callers.
14065 Reduced memory usage an number of allocations for MonoMethodHeader and
14066 MonoMethodSignature.
14068 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
14070 * metadata.c: added compare for szarray.
14072 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
14074 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
14075 and add a couple more types to it and mono_defaults. Give an hint on
14076 classes that need implementing in our corlib and are referenced
14079 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
14081 * class.h, class.c: keep track if a class is also an Enum.
14082 * loader.c: Implement a couple more types for use in libffi
14083 marshalling. Gives better diagnostics when failing to dlopen
14084 a library. Set method->klass for P/Invoke methods, too.
14086 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
14088 * class.c, class.h: add a MonoType this_arg to MonoClass that
14089 represents a pointer to an object of the class' type that
14090 can be used by the interpreter and later the type cache.
14091 Add best guess alignment info for valuetype objects.
14093 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
14095 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
14096 into MonoType: one less level of indirection and allocation and
14097 simplifies quite a bit of code. Added cache for MonoTypes that are
14098 used frequently, so that we don't need to allocate them all the time.
14100 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
14102 * class.c (mono_class_create_from_typedef): System.Enum is also a
14103 value type, although it does not derive from System.ValueType
14104 (maybe a bug in the ms compiler?)
14106 * metadata.c (mono_type_size): return the right size for value types
14108 * loader.c (mono_get_method): only initialize method header if not abstract
14110 * class.c (mono_class_from_mono_type): use mono_default values.
14112 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
14114 * *: use MonoClass pointers instead of <type_tokens>
14116 * class.h: new flag: metadata_inited.
14118 * class.c (mono_class_metadata_init): impl.
14119 (mono_class_instance_size): impl.
14120 (mono_class_data_size): impl.
14122 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
14124 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
14125 MonoClass now has the name and name_space fields.
14126 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
14127 mono_get_method () takes and optional MonoClass as argument.
14128 Removed mono_typedef_from_name() and added mono_class_token_from_name()
14129 instead that takes advantage of a map from class names to typedef
14130 tokens in MonoImage.
14132 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
14134 * metadata.c: zero is not a valid alignment boundary.
14135 Merge MONO_TYPE_VOID in default decoding code.
14137 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
14139 * image.h: merged MonoMetadata into MonoImage
14141 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
14142 identify the type of elements.
14144 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
14146 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
14147 * cil-coff.h: split MonoMSDOSHeader and add size info.
14148 * image.c: add some consistency checks.
14149 * metadata.c: fix row size computation: one programmer
14150 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
14151 add explanation for the locator routine.
14152 Fix decoding of size in method header.
14154 2001-08-20 Miguel de Icaza <miguel@ximian.com>
14156 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
14157 (g_concat_dir_and_file): Bring g_concat_dir_and_file
14158 function from gnome-libs. This uses the right path separator
14159 based on the OS, and also works around a bug in some systems where
14160 a double slash is not allowed.
14161 (default_assembly_name_resolver): Use g_concat_dir_and_file
14162 (mono_assembly_open): ditto.
14164 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
14166 * metadata.c (mono_metadata_signature_equal): impl.
14168 * *: void is now a realy MonoType (instead of using NULL)
14170 * metadata.c (do_mono_metadata_parse_type): use
14171 mono_metadata_parse_type to parse void value.
14173 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
14175 * metadata.c, metadata.h: in the signature and method header store
14176 only the space required for holding the loca vars and incoming arguments.
14178 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
14180 * metadata.c (do_mono_metadata_parse_type): treat void like any
14181 other type (instead of assigning NULL);
14183 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
14185 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
14187 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
14189 * image.c (do_mono_image_open): added a cache for arrays.
14191 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
14193 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
14194 decode a single column from a row in a metadata table and changes
14195 to take advantage of it in the typedef locator (gives a nice speed up).
14196 Store offset info for function params.
14198 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
14200 * image.h (MONO_IMAGE_IS_CORLIB): removed
14202 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
14204 * assembly.c: how could mono_assembly_close () had ever worked?
14205 * metadata.c, metadata.h: provide offset info for local vars.
14206 Implement mono_type_size () to take care of alignment as well
14207 as size (it was mono_field_type_size in cli/class.c before).
14209 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
14211 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
14213 * assembly.h (CORLIB_NAME): set to corlib.dll
14215 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
14217 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
14219 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
14220 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
14221 tokentype.h: massive namespace cleanup.
14223 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
14225 * metadata.h, metadata.c: decode exception clauses when parsing method header.
14227 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
14229 * metadata.c (mono_metadata_free_type): added check for type !=
14230 NULL (void) before calling mono_metadata_free_type()
14232 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
14234 * metadata.h, row_indexes.h: added header with enumerations to use
14235 to index in the columns from tables in metadata and to decode coded
14236 tokens: we should start using this instead of embedding magic numbers
14239 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
14241 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
14242 Move metadata_t info from cli_image_info_t to MonoImage, where
14243 it's easily accessible. Changed all the uses accordingly.
14244 Added the method and class caches to MonoImage.
14245 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
14246 and mono_metadata_decode_value () signature to be more consistent
14247 with the other parse functions (and simplify code). Taken advantage
14248 of zero-length array allocation with GCC. Removed reduntant (and
14249 wrong) MonoFieldType struct and use MonoParam instead. Changed
14250 mono_metadata_parse_field_type () to use common code for parsing.
14251 Added mono_metadata_typedef_from_field () and
14252 mono_metadata_typedef_from_method () to lookup a typedef index from a
14253 field or method token.
14254 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
14256 2001-07-23 Miguel de Icaza <miguel@ximian.com>
14258 * metadata.c (mono_metadata_parse_field_type): Implement.
14259 (do_mono_metadata_parse_type): Split engine from
14260 mono_metadata_parse_type, so that we can create smaller structures
14261 for things that just have one pointer to the MonoType (look at
14264 2001-07-20 Miguel de Icaza <miguel@ximian.com>
14266 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
14267 as Jan Gray found out, it is incorrect.
14269 2001-07-18 Miguel de Icaza <miguel@ximian.com>
14271 * assembly.c: Implement asssembly loading. This loads an image
14272 and loads all the referenced assemblies. Come to think of it, we
14273 could always do lazy loading of the assemblies.
14275 * image.c (mono_image_open): Keep loaded images in a hashtable.
14277 * image.h (MonoImage): Add reference count.
14279 2001-07-17 Miguel de Icaza <miguel@ximian.com>
14281 * assembly.c (mono_assembly_open): Keep track of the file name in
14282 case the assembly has no ASSEMBLY table.
14284 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
14287 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
14289 * metadata.c, metadata.h: decode local vars in method header
14290 parse function. Change callers accordingly.
14292 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
14294 * metadata.h, cil-coff.h: protect against multiple inclusion.
14295 Added some new structures to hold information decoded from metadata:
14296 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
14297 and relevant decoding/free functions.
14298 * metadata.c: implement decoding functions. Add warning for out of bounds
14299 index in mono_metadata_locate(). Implement mono_get_method () to retreive
14300 all the info about a method signature and invocation. Remove check on
14301 uninitialized local var in parse_mh() and fix memory leak.
14303 2001-07-12 Miguel de Icaza <miguel@ximian.com>
14305 * metadata.h: More macros.
14307 * tokentype.h: New file.
14309 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
14311 * assembly.c: added a consistency check and initialize
14312 some structures with g_new0().
14313 * metadata.c: fixed a couple more bugs in table size computation
14314 and add other checks for out-of bound access to metadata.
14316 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
14318 * metatada.c: fix bugs computing table sizes. Spew a
14319 warning when index in string heap is out of bounds.
14321 2001-07-04 Miguel de Icaza <miguel@ximian.com>
14323 * metadata.h: Add a couple of macros to manipulate tokens.
14325 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
14327 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
14328 cli_section_tables).
14330 2001-07-01 Miguel de Icaza <miguel@ximian.com>
14332 * metadata.c (mono_metadata_user_string): New function, provides
14333 access to the UserString heap.
14335 2001-06-27 Miguel de Icaza <miguel@ximian.com>
14337 * metadata.c: Add inline documentation.
14339 2001-06-26 Miguel de Icaza <miguel@ximian.com>
14341 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
14344 2001-06-22 Miguel de Icaza <miguel@ximian.com>
14346 * typeattr.h: New file, TypeAttribute flags.
14348 2001-06-21 Miguel de Icaza <miguel@ximian.com>
14350 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
14351 mono_assembly_ensure_section): Section loading code.
14352 (load_section_tables): Load the sections.
14354 * mono/metadata/metadata.c (mono_metadata_locate_token,
14355 mono_metadata_locate): Functions to locate the information
14356 definition given a token or a table and an index.
14357 (mono_metadata_compute_table_bases): New.
14358 (compute_size): New function to compute the sizes of the various
14361 * mono/metadata/metadata.h: Finish listing the different index
14364 * mono/metadata/pedump.c: Improve to dump new information.
14366 2001-06-19 Miguel de Icaza <miguel@ximian.com>
14368 * mono/metadata/metadata.c: Entered all the tables matching
14371 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2