1 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
3 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
4 managed code. Fixes #73012.
6 * metadata.h (MonoMarshalSpec): Add elem_mult field.
8 * metadata.c reflection.c: Load/Emit elem_mult as well.
10 * metadata.h (MonoMarshalSpec): Add comment.
12 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
14 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
15 num_elem to -1 if not given.
17 * object-internals.h (MonoReflectionMarshal): Add has_size field.
19 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
22 2005-03-01 Marek Safar <marek.safar@seznam.cz>
24 * null-gc.c (mono_gc_free_fixed): Was not compilable.
26 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
28 * reflection.c (encode_marshal_blob): Encode param_num field as well.
30 * object-internals.h (MonoReflectionMarshal): Add param_num field.
32 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
34 * object.c: generalized the reference bitmap creation
35 and added hooks for the new GC.
36 * class-internals.c: removed the gc_bitmap field from MonoClass.
38 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
40 * domain.c: help the compiler to produce better code
41 in mono_jit_info_table_find ().
43 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
45 * object.c: make all allocations look typed.
47 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
49 * socket-io.c: load Mono.Posix if it's not loaded already
52 2005-02-24 Martin Baulig <martin@ximian.com>
54 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
55 * reflection.c (dup_type): Likewise.
57 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
59 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
60 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
62 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
64 * domain.c, threads.c, object-internals.h: make the critical thread
65 local vars use the fast access mode (even when we're compiled in
66 a lib). Provide accessors to be used by the jit during codegen.
68 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
70 * appdomain.c: Changed hook functios behavior to include
71 support for the reflection only assemblies. Some icalls were changed
72 to support the mentioned assemblies too. Signatures of static methods
73 try_assembly_resolve and real_load now have an additional parameter:
76 * assembly.c: General changes to mono_assembly_ methods to support
77 reflection only api. Functions mono_assembly_open, mono_assembly_load,
78 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
79 suffix, to support an additional gbool parameter to specify whether
80 the assembli is reflection only or not. Created some new hook functions
81 to add support for reflection only assemblies. Signatures of static
82 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
83 have now an additional parameter: refonly.
85 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
86 indicating whether the assembly is reflection only or not.
88 * exception.c: Add mono_get_exception_invalid_operation.
90 * icall.c: Throw an InvalidOperationException when trying to invoke
91 a property/method/event, or trying to set/get the value of a field.
92 Also add an icall to retrieve the ref_only flag to the
93 MonoReflectionAssembly.
95 2005-02-23 Chris Toshok <toshok@ximian.com>
97 Part of fix for #72827.
98 * mono-debug.c (mono_debug_add_method): add lexical block data to
99 the info we write. Kind of a hack at the moment - we copy the
100 lexical block info from the MonoDebugMethodInfo to the
101 MonoDebugMethodJitInfo here, before writing it.
102 (mono_debug_read_method): read the lexical block info.
104 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
106 * debug-mono-symfile.h: add lexical block support.
108 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
111 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
113 * loader.c (mono_lookup_pinvoke_call): Fix warning.
115 * object.c (mono_runtime_free_method): Call mono_free_method () and
118 * loader.c (mono_free_method): Free up most memory allocated for
121 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
123 * reflection.c: properly flag a Type argument to a
124 named custom attr value (bug #72248).
126 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
128 * reflection.c: reduce code duplication in named custom
131 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
133 * reflection.c: properly encode custom attrs of type object
136 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
138 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
140 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
142 * socket-io.c: load System.dll if it's not loaded already
143 (bug #72850 and #70477).
145 2005-02-21 Martin Baulig <martin@ximian.com>
147 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
150 2005-02-21 Martin Baulig <martin@ximian.com>
152 * reflection.c (mono_image_build_metadata): We also need to
153 "fixup" the MethodImpl table after we computed the final method
154 indices. Call fixup_methodimpl() to do that.
155 (fixup_methodimpl): New private method.
157 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
159 * assembly.c: special case mscorlib.dll (bug#72536),
160 patch from Carlos Alberto Cortez.
162 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
164 * threads-types.h threads.c: Fix build bustage.
166 * threads.c: Use a union for long<->double conversions.
168 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
169 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
171 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
172 containing the checkpoint call with NOT_TAKEN.
174 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
175 checkpoint before pushing the arguments, so they won't have to be
178 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
180 * domain.c, assembly.c, domain-internals.h: make some data
181 const and relocation-free.
183 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
185 * object.c, appdomain.c, class-internals.h: introduce the
186 MonoClassRuntimeInfo structure to hold the info needed to
187 use a class at runtime. Made mono_class_vtable() lock-free
188 for all the appdomains.
190 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
192 * metadata-internals.h, image.c: introduce a per-image mempool to
193 be used for memory that has the same lifetime as the image.
195 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
197 * domain.c: In mono_init_internal(), instead of selecting the first
198 runtime version supported by an executable, get a list of all
199 supported versions and select the one for which an mscorlib exists
200 (since even if the runtime supports a given version, it doesn't mean
201 that the framework for that version is installed).
202 Modified get_runtimes_from_exe to support this behavior.
203 In supported_runtimes, added information about additional system
206 * assembly.c: Added support for more than one system assembly version
207 per runtime version. Updated the assembly list.
208 In mono_assembly_remap_version, removed the initial version check,
209 since we don't know to which version we need to compare until we
210 get the version set on which the assembly is based.
211 Moved the code for loading corlib into the new method
212 mono_assembly_load_corlib(), so it can be used by the initialization
215 * domain-internals.h: Updated data structures and added declaration
216 for mono_assembly_load_corlib.
218 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
220 * reflection.c (resolve_object): Fix the creation of the signature in
221 the SignatureHelper case.
223 * assembly.c (mono_assembly_remap_version): Fix binary search.
225 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
227 * class.c: Added inheritance check when a method is overloaded (from a
228 virtual method or when implementing an interface) and when a class is
229 inherited. Added functions to set a failure for a class and to
230 retreive the exception from a failure.
231 * class-internals.h: Added fields to MonoClass to keep the exception
232 information status for inheritance (or other exceptions) to be thrown
233 later (i.e. not at load time).
234 * object.c: Throw the inheritance SecurityException when a type is to
235 be created with either class or method inheritance violations.
236 * reflection.c|h: Fix when getting declsec from a class. Removed
237 unrequired code for class. Improved sanity in parameter naming.
238 * security-manager.c|h: Added functions to check for class and method
241 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
243 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
244 and has_finalize in dynamic types as well.
246 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
248 * culture-info-table.h : fixed currency format for en-GB (and so on).
250 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
252 * gc.c: ensure the GC handles never have 0 as a value.
254 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
256 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
257 a pointer to a struct to unmanaged code. Fixes #72625.
259 2005-02-16 Martin Baulig <martin@ximian.com>
261 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
263 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
265 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
267 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
269 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
271 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
272 UnmanagedFunctionPointerAttribute, use it for determining calling convention
275 * reflection.c (mono_custom_attrs_get_attr): New helper function.
277 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
279 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
281 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
282 changes to make the current context a field in MonoThread.
284 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
286 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
289 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
290 extracted from mono_marshal_get_native_wrapper.
292 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
293 to create wrappers around native functions.
295 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
296 delegates for arbitrary function pointers. Fixes #71472.
298 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
300 * threads.c: cleaned up the code a little.
302 2005-02-15 Martin Baulig <martin@ximian.com>
304 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
307 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
308 allocate larger chunks if needed.
310 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
312 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
315 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
317 * domain.c: keep the domains in an array and ensure the domain ids
318 are kept small, so they can be used as indexes to domain-specific data
319 with a small memory overhead.
321 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
323 * icall.c: Handle byref types in Type icalls. Fixes #72544.
325 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
327 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
329 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
331 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
333 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
336 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
338 2005-02-12 Ben Maurer <bmaurer@ximian.com>
340 * domain-internals.h: add the hashtable here.
342 * class-internals.h: Remove `info' from MonoMethod
344 * domain.c: Add a new hashtable, jit_trampoline_hash
346 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
348 * object.c: don't set the value of static fields
351 2005-02-11 Martin Baulig <martin@ximian.com>
353 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
354 (mono_debug_add_method): Silently ignore the method if it's too big.
355 (mono_debug_add_type): Likewise.
357 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
359 * threads.c, appdomain.c: remove #ifdefs from the code.
361 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
363 * metadata-internals.h: Added flags to MonoAssembly to cache the most
364 common security informations. This allows us to stay in unmanaged code
365 when doing LinkDemand and it's special cases (except for the first
366 time for initialization). The flags a very much used with --security.
367 * reflection.c|h: Added code to get declarative security attributes
368 for LinkDemand and InheritanceDemand. This required to refactor the
369 existing code for Demand.
370 * security-manager.c|h: Added new method fields for the special cases
373 2005-02-10 Martin Baulig <martin@ximian.com>
375 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
376 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
378 2005-02-10 Martin Baulig <martin@ximian.com>
380 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
381 debugging code; this is almost a complete rewrite.
383 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
385 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
387 * domain.c, object.h: expose mono_string_equal () and
389 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
390 it's implemented in managed code.
392 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
394 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
395 lo leak objects between appdomains.
397 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
399 * assembly.c: old compilers compilation fix from
400 robertj@gmx.net (Robert Jordan).
402 2005-02-09 Ben Maurer <bmaurer@ximian.com>
404 * class-internals.h: Little reminder for the future.
406 * debug-helpers.c: Fix up wrapper_type_names
408 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
410 * image.c, metadata-internals.h: when loading an image from a file,
411 mmap all of it and use the same codepaths as when using a
412 in-memory image: the code is simpler and we use less memory
413 (both writable and readonly).
415 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
417 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
418 API to alloc runtime data structures that need to be tracked by the
419 GC and contain pointers.
420 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
421 make the code more readable and eventually use a different GC.
423 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
425 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
428 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
430 * object.c: In release_type_locks(), don't release the cctor lock
431 if it has already been released. This fixes a crash in the
434 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
436 * gc.c, marshal.c, icall.c: register a delegate for finalization
437 only when the native function pointer has been allocated for it.
439 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
441 * object.c: cleaned up some code, allocate objects that are
442 pointer free with the atomic malloc variant. Allocate memory
443 for static data from the mempool if it's pointer-free.
444 Allocate the bounds array at the end of the array data, when needed.
445 * object-internals.h, object.h: move a private function in a private
447 * class.c: handle missing case in tracking references in fields.
449 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
451 * class.c, class-internals.h: keep track if a type has
452 reference fields in either the instance or static fields.
454 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
456 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
457 and renamed to MonoRuntimeInfo. Added fields to store the expected
458 framework assembly version. Changed mono_get_framework_version and
459 mono_get_runtime_version for a single mono_get_runtime_info method.
461 * assembly.c: Added method to remap system assembly versions to the
462 current executing runtime version. Removed old mapping code.
463 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
465 * icall.c, reflection.c: Track api changes.
467 2005-02-06 Miguel de Icaza <miguel@novell.com>
469 * loader.c (method_from_memberref): Improve error reporting,
470 produce the class name instead of the typeref/typedef index.
472 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
474 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
476 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
478 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
479 stdcall and charset name mangling. Reorganize the code and add
482 2005-02-05 Ben Maurer <bmaurer@ximian.com>
484 * monodiet.c: More iters!
486 * marshal.c: Iter usage.
488 * icall.c: Iter usage.
490 * object.c: Use iters.
492 * debug-helpers.c: More iters
494 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
496 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
499 2005-02-05 Ben Maurer <bmaurer@ximian.com>
501 * mono-debug-debugger.c: use iters
503 * class.c, class-internals.h: mono_class_setup_events is static
506 * All callers: use iters
508 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
510 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
511 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
513 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
515 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
517 * marshal.h: Add prototypes for ldfld/stfld_remote.
519 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
520 this is called during startup.
522 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
524 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
525 MonoThreadsSync struct private in monitor.c. Changed the way
526 MonoThreadsSync is allocated so it's faster and there is no
527 need to keep track of it with a finalizer and it uses less memory.
528 This also finally allows us to allocate mono objects as ptrfree when
529 there are no reference fields.
531 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
533 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
534 disappearing link to the GC interface and use them to simplify
537 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
539 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
540 stfld_remote which call mono_load/store_field_new. This allows methods
541 calling ldfld/stfld wrappers to be AOTed.
543 * console-io.c: Include sys/filio.h under solaris.
545 * console-io.c: Include curses.h if needed correctly.
547 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
549 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
550 method->klass as well.
552 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
554 * class.c (mono_class_init): Switch on lazy initialization of
557 * class.c (mono_class_get_finalizer): Handle the case when the
558 finalizer is inherited.
560 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
562 * console-io.c: <curses.h> is needed by term.h on solaris.
564 2005-02-03 Ben Maurer <bmaurer@ximian.com>
566 * icall.c, class-internals.h, monodiet.c, class.c: Remove
567 mono_class_setup_properties where possible. Remove this ftn from
568 the header file, and make it static.
570 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
572 * loader.c: Add missing setup_... call.
574 * class.c: Add missing setup_... calls.
576 * class.c (mono_class_init): Switch on lazy initialization of
579 * class.c (mono_class_init): Fix generics broken by the recent changes.
581 * monodiet.c (handle_type): Add missing setup_... calls.
583 * class.c: Back out garbage in previous patch.
585 * class.c: Add missing setup_... calls.
587 * class.c (mono_class_get_method_from_name_flags): Avoid calling
588 mono_class_setup_methods () if possible.
590 * class-internals.h (MonoClass): Add 'has_cctor' flag.
592 * class-internals.h (MonoCachedClassInfo): New structure.
594 * class.c: Initialize properties and events fields of MonoClass lazily.
596 * class.c: Add infrastructure for lazily initializing the methods and
597 vtable fields of MonoClass. Not yet used.
599 * class.c (mono_class_get_finalizer): New helper function.
601 * class.c: Add infrastructure for loading some class related data from
604 * object.c: Add infrastructure for initializing the vtable from data
607 * gc.c (run_finalize): Use mono_class_get_finalizer ().
609 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
610 appropriate initialization function before accessing parts of the
613 * marshal.c: Fix warnings.
615 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
617 * mono-debug-debugger.c (get_exception_message): Use
618 mono_class_get_method_from_name_flags ().
620 2005-02-02 Ben Maurer <bmaurer@ximian.com>
622 * reflection.c, appdomain.c: Replace a few manual searches that
623 Zoltan missed. (Paolo approved this part of my initial patch).
625 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
627 * profiler.c: disable recording statistical events at report time.
629 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
631 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
632 to byteswap arrays of enum values, too (bug #72080).
634 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
636 * appdomain.c (set_domain_search_path): Allow this to be called if
637 domain->setup is not yet set.
639 * loader.c (mono_method_get_index): New helper function.
641 * loader.c reflection.c: Use mono_method_get_index ().
643 * class.c (mono_class_get_method_from_name_flags): New helper method.
645 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
648 * class.c (mono_class_get_cctor): New helper method.
650 * string-icalls.c object.c class.c marshal.c reflection.c: Use
651 mono_class_get_method () to look up methods.
653 2005-02-01 Miguel de Icaza <miguel@novell.com>
655 * console-io.c: Fix the build, this should work on Windows.
657 2005-01-31 Ben Maurer <bmaurer@ximian.com>
659 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
660 be set to null to keep things valid
662 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
664 * icall.c: added Console 2.0 icalls.
665 * Makefile.am: added console-io.[ch]
666 * console-io.[ch]: internal calls for Console 2.0 API.
668 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
670 * class.c: make sure we consider all the interfaces
671 when calculating max_interface_id (bug found by
672 Jeroen Frijters running ikvm).
674 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
676 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
677 valuetype fields to null.
679 * object.c (set_value): Ditto. Fixes #71669.
681 2005-01-31 Martin Baulig <martin@ximian.com>
683 * metadata.c (mono_metadata_has_generic_params): New public
684 function; checks whether something is a generic method.
686 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
688 * appdomain.c: fix infinite recursion when adding assemblies.
690 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
692 * object.c: Fix small typo to return all items for Environment.
695 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
697 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
698 reflection.c: more domain and assembly-unload related fixes
699 and memory leaks plugs.
701 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
703 * 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.
705 2005-01-29 Ben Maurer <bmaurer@ximian.com>
707 * loader.c (mono_method_signature): Make this method lazy
708 (mono_get_method_from_token): Don't computate the signature here.
710 Doing this saves quite a bit of memory. I got 90 kb on starting up
711 monodoc. It should also save some disk reads on startup.
713 * *: MonoMethod->signature might be NULL now. You *MUST* use
714 mono_method_signature.
716 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
718 * object.c (mono_runtime_get_main_args): Return an array from the
719 current domain here. Fixes #71938.
721 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
723 * monitor.c: formatting changes to comply with the
724 mono coding style and remove #ifdefs from the code.
726 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
728 * metadata.c, private.h: remove some unneeded data
729 and use a more compact representation for table schemas.
731 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
733 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
734 to get a better distribution in hash tables.
735 * *.c: use mono_aligned_addr_hash() where appropriate.
736 * assembly.c: make var static.
738 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
740 * domain-internals.h: Put MonoJitInfo on a diet.
742 * domain.c: Fix a warning.
744 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
746 * gc.c: rework the gc handles code to reuse handles
749 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
751 * domain.c: fixed long standing bug in mono_string_equal() which
752 was brought to light with the ldstr changes.
754 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
756 * reflection.c: Remove warning by adding missing include for marshal.h
758 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
760 * domain.c, object.c: change the ldstr_table to hold
761 MonoString* as keys: makes the runtime isinterned lookup
762 faster and simplifies memory management.
764 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
766 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
767 possible to add imperative security checks before calling the icall.
768 * reflection.c: Return security attributes on the original MonoMethod
769 (and not the wrapped one). This fix permissions on icalls.
771 2005-01-25 Dick Porter <dick@ximian.com>
773 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
774 the check for mktime() support actually test the mktime() return
775 value. "Fixes" bug 71682, though the output is still different to
778 2005-01-25 Martin Baulig <martin@ximian.com>
780 * class.c (mono_class_is_assignable_from): Make this work for
783 2005-01-24 Ben Maurer <bmaurer@ximian.com>
785 * marshal.c (mono_string_utf8_to_builder)
786 (mono_string_builder_to_utf16): We might not have ownership of the
787 string. In thise case, we need to create a new buffer.
789 * object-internals.h (mono_stringbuilder_capacity): sb->str might
790 be null, in which case, use the default capacity.
792 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
794 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
795 GC events to the profiler.
797 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
799 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
800 if you don't want the GC to run.
802 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
804 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
805 start providing a GC API and keeping different implementations in
807 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
809 2005-01-22 Ben Maurer <bmaurer@ximian.com>
811 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
812 mmap rather than allocating a huge buffer.
813 (mono_debug_close_mono_symbol_file): Free the buffer allocated
816 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
818 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
819 and CheckExecutionRights.
820 * reflection.c|h: Keep the index of the declarative security to be
821 used, instead of the pointer, when AOT compiler is used. Also add
822 class initialization when requesting demands.
823 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
824 CheckExecutionRights. Both properties are now FALSE by default, and
825 unmodifiable, unless the --security option is used.
827 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
829 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
830 reflection.c: properly refcount images and assemblies, many leaks fixed.
832 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
834 * threadpool.c: increase the timeout for threads in the thread pool to
835 10s. Fixes bug #67159.
837 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
839 * class-internals.h: Sun's compiler insists on explicit
840 signed on bit fields to handle then correctly.
842 2005-01-19 Miguel de Icaza <miguel@ximian.com>
844 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
845 Make the size of the array fit only the number of invalid path
848 * class.c (_mono_class_get): Improve the error reporting when a
849 class referenced is not found, to assist debugging.
851 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
853 * threads.c: fix off-by-one error.
854 * domain.c: free data allocated in the domain.
856 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
858 * reflection.c (mono_method_body_get_object): Fill out exception info
861 * object-internals.h: Add MonoReflectionExceptionHandlingClause
864 2005-01-19 Martin Baulig <martin@ximian.com>
866 * loader.c (mono_get_method_constrained): Make this work again.
868 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
870 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
871 guint16 to match the managed side.
873 * reflection.c (mono_reflection_body_get_object): Fill out local
876 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
879 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
880 'local_var_sig_token'.
882 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
884 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
887 * reflection.c (mono_method_body_get_object): Handle abstract and
890 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
892 * marshal.c, loader.c, class-internals.h, reflection.c:
893 store the emthod data for a wrapper in an array instead of a list.
895 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
897 * marshal.c: change the code to allocate memory more
898 conservatively for method wrappers.
900 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
902 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
903 fields from MonoClass to the marshal info structure where they belong.
905 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
907 * class.c, object.c, class-internals.h, marshal.c: rearrange
908 some fields and tweak some types to lower memory usage.
910 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
912 * threads.c (signal_thread_state_change): Handle the case when the
913 target thread is the current thread.
915 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
917 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
918 emit_ptr_to_object_conv.
920 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
921 marshalling. Fixes #71352.
923 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
925 * metadata.h, blob.h: move table enum to blob.h so it can be included
927 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
928 cut the size of MonoImage/MonoDynamicImage.
930 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
932 * profiler.c (mono_profiler_install_simple): Fix default arguments.
934 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
936 * reflection.c, reflection.h, icall.c: add a function to check
937 if an attribute type is defined for a metadata object.
939 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
941 * object-internals.h: Added some needed fields from StringBuilder class.
942 * marshal.c: Set the maxCapacity when creating a StringBuilder.
944 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
946 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
947 threads before shutting down the runtime.
949 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
951 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
953 * object-internal.h, threads.c: implement stacksize and
954 parameterized thread start functionality (requires
955 matching corlib). Marked broken code for later removal.
957 2005-01-12 Martin Baulig <martin@ximian.com>
959 * class-internals.h (MonoGenericClass): Moved the `initialized'
960 flag to MonoDynamicGenericClass, removed `init_pending'.
961 (MonoGenericInst): Added `is_reference' flag.
963 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
965 * reflection.c (mono_image_create_pefile): Only set the pe_offset
966 inside the MSDOS header. Fixes #71201.
968 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
970 (mono_domain_finalize): Ditto.
972 2005-01-12 Martin Baulig <martin@ximian.com>
974 * class.c (mono_get_shared_generic_class): Use the cache for
975 non-dynamic generic classes.
977 * class-internals.h (mono_class_create_generic_2): Removed
978 function prototype, this function is now static inside class.c.
980 * class.c (mono_class_create_generic_2): Made this static, only
981 call it from mono_class_init() and mono_class_setup_parent().
982 (collect_implemented_interfaces_aux): Call mono_class_init() on
983 the interfaces we collect.
984 (mono_class_setup_vtable): Call mono_class_init (class->parent).
986 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
988 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
989 it a real thread handle.
991 * domain-internals.h: Move exvar_offset from MonoJitInfo to
992 MonoJitExceptionInfo, since each catch clause needs its own variable.
994 2005-01-11 Dick Porter <dick@ximian.com>
996 * image.c (mono_pe_file_open): New variant on mono_image_open()
997 that does not set up the CLI metadata; used for FileVersionInfo so
998 it can get the data for windows binaries too.
1000 * process.c (process_read_string_block): Don't read off the end of
1001 the StringTable block.
1003 These both fix bug 70766.
1005 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
1007 * gc.c: set some fields to NULL at GC cleanup time.
1008 * threads.c: if we quit the main thread, call exit ().
1010 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
1012 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
1014 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
1016 * threads.h, threads.c, object.c: added accessor and settor for
1017 main_thread. Handle it specially when exiting from it: wait
1018 for other foreground threads to exit.
1020 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
1022 * process.c, verify.c: remove some bloat.
1024 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
1026 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
1027 the calling convention to cdecl under win32.
1029 2005-01-08 Ben Maurer <bmaurer@ximian.com>
1031 * object.c (mono_object_get_size): New function to get the size of
1034 * profiler.c (simple_allocation): Use above.
1036 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
1038 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
1039 ves_icall_System_AppDomain_getRootDomain (as it's not required to
1040 get an appdomain by it's id and we can't assume the root's id is 0).
1041 * domain-internals.h: Change the function prototype to match.
1042 * icall.c: Change the icall table for AppDomain.
1044 2005-01-08 Miguel de Icaza <miguel@ximian.com>
1046 * locales.c (string_invariant_compare_char): Only compute
1047 GUnicodeTypes in the case where we need them. Test for ordinality
1048 first and return if so.
1053 * FIXME: here we must use the information from c1type and c2type
1054 * to find out the proper collation, even on the InvariantCulture, the
1055 * sorting is not done by computing the unicode values, but their
1056 * actual sort order.
1059 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
1061 * loader.c: for P/Invoke methods, allow the "Internal" shared
1062 library name to refer to the calling process symbol namespace.
1064 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
1066 * Makefile.am: Add the security manager to the build.
1067 * security-manager.c|h: New. Initialization of the security manager.
1069 2005-01-07 Dick Porter <dick@ximian.com>
1072 * monitor.c: Update thread state during Monitor and WaitHandle
1073 waits. Fixes bug 71031.
1075 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
1077 * reflection.c (property_encode_signature): Correctly handle when the
1078 property has no methods.
1080 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
1082 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
1084 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
1085 fields from mb, not rmb. Fixes #71017.
1087 * marshal.c (emit_ptr_to_str_conv): Add support for
1088 ByValTStr -> string conversion. Fixes #71015.
1090 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
1092 * mempool.c (mono_mempool_contains_addr): New helper function.
1094 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
1096 * metadata.c (mono_metadata_compute_size): Fix size calculation of
1097 HasSematics encoded fields.
1099 * metadata.c (mono_type_to_unmanaged): Improve error message for
1100 invalid string marshalling.
1102 * metadata.c: Fix warnings.
1104 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
1106 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
1109 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
1111 * domain.c object.c domain-internals.h: Revert part of r38077 since the
1112 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
1115 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
1117 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
1118 so methods containing these can be AOTed.
1120 2005-01-03 Martin Baulig <martin@ximian.com>
1122 * loader.c (find_method): Removed the hack for generic instances.
1123 (method_from_memberref): If our parent is a generic instance, pass
1124 its generic type definition to find_method() and then inflate the
1126 (mono_get_method_constrained): Pass the generic type definition to
1127 find_method() and inflate the method later.
1129 * class-internals.h (MonoStats): Added `generic_class_count'.
1131 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
1132 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
1134 * reflection.c (mono_custom_attrs_from_params): Don't ignore
1135 generic type definitions.
1137 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
1139 * loader.c icall.c: Fix warnings.
1141 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
1143 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
1144 blittable types. Fixes #70864.
1146 2004-12-29 Martin Baulig <martin@ximian.com>
1149 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
1151 * reflection.c (mono_method_get_object): Create a
1152 "System.Reflection.MonoGenericMethod" for inflated methods; don't
1153 call mono_get_inflated_method().
1155 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
1157 2004-12-27 Martin Baulig <martin@ximian.com>
1159 * class-internals.h (MonoMethod): Added `is_inflated' flag.
1160 (MonoMethodInflated): Added `inflated' field.
1162 * class.c (mono_class_inflate_generic_method): Don't really
1163 inflate the method here; just set the `is_inflated' flag in the
1165 (mono_class_get_inflated_method): Actually inflate the method here
1166 if it's not already inflated; we use the MonoMethodInflated's new
1167 `inflated' field as a cache.
1169 2004-12-26 Martin Baulig <martin@ximian.com>
1172 (inflate_generic_class): Moved some code out of inflate_generic_type().
1173 (mono_class_inflate_generic_method): If we're already inflated,
1174 inflate the context and use the declaring method; ie. make sure
1175 the declaring method of an inflated method is always the generic
1177 (mono_class_create_from_typedef): Create
1178 `class->generic_container->context->gclass'.
1180 2004-12-24 Ben Maurer <bmaurer@ximian.com>
1182 * metadata-internals.h, marshal.c, reflection.c: More
1183 MonoGHashTable->GHashTable.
1185 * domain-internals.h, class.c: Change MonoGHashTable's into
1186 GHashTables for some cases where no gc stuff is used
1188 All users: update apis
1190 2004-12-23 Ben Maurer <bmaurer@ximian.com>
1192 * metadata.c (builtin_types): Make this `const'. Makes this get
1193 put into the shareable section.
1194 (mono_metadata_init): Casts to make gcc happy.
1196 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
1198 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
1200 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
1202 * icall.c: Added an internal call to retrieve the position and length
1203 of assembly-level declarative security attributes (RequestMinimum,
1204 RequestOptional and RequestRefuse). This is used by the Assembly class
1205 to re-create the corresponding permission sets.
1207 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
1209 * marshal.c: fix the stelemref wrapper to be type correct
1212 2004-12-20 Ben Maurer <bmaurer@ximian.com>
1214 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
1215 to do key & 0x7fffffff. Hashtable already does this. It just
1216 results in longer code.
1218 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
1220 * appdomain.c: Bump corlib version.
1221 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
1222 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
1223 * reflection.c|h: Add functions to get declarative security infos
1224 (blob position and length) for assemblies, classes and methods.
1226 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
1228 * reflection.c: sort the constant table (bug #70693).
1230 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
1232 * object-internals.h, threads.c, domain.c: add accessors for
1233 the MonoThread and MonoDomain tls keys.
1235 2004-12-18 Martin Baulig <martin@ximian.com>
1237 * class.c (inflate_generic_type): If we're inflating a generic
1238 instance, set `ngclass->context->container = context->container';
1239 ie. the container we inflated into.
1241 * metadata.c (mono_metadata_parse_generic_param): Reflect above
1242 inflate_generic_type() changes.
1244 2004-12-17 Martin Baulig <martin@ximian.com>
1247 (MonoGenericClass): Replaced `MonoType *generic_type' with
1248 `MonoClass *generic_class'. Removed `dynamic_info'; if
1249 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
1250 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
1252 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
1254 * exception.c (mono_exception_from_token): New helper function.
1256 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
1258 * assembly.c (mono_assembly_load_with_partial_name): Call
1259 mono_assembly_loaded before invoking the preload hooks. Fixes
1262 * object-internals.h (MonoThread): Change culture_info and
1263 ui_culture_info into an array.
1265 * threads.c: Cache culture info objects from more than one appdomain.
1267 * threads.c threads-types.h icall.c: Add icalls for manipulating the
1270 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
1272 * threads.h threads.c appdomain.c: Clear the culture_info field of
1273 all threads during unloading if they point to an object in the dying
1276 2004-12-13 Ben Maurer <bmaurer@ximian.com>
1278 * culture-info.h (TextInfoEntry): New struct
1279 * object-internals.h: sync with managed
1280 * locales.c: fill the `text_info_data' field
1281 * culture-info-tables.h: update
1283 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
1285 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
1288 2004-12-12 Ben Maurer <bmaurer@ximian.com>
1290 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
1291 (ves_icall_ModuleBuilder_getMethodToken): Ditto
1293 2004-12-12 Martin Baulig <martin@ximian.com>
1295 * mono-debug-debugger.c (write_type): If we're an enum and the
1296 builtin types have already been initialized, call mono_class_init().
1298 2004-12-11 Martin Baulig <martin@ximian.com>
1300 * metadata.c (mono_metadata_load_generic_params): Added
1301 `MonoGenericContainer *parent_container' argument; automatically
1302 compute `container->is_method'; pass the correct owner to
1305 * reflection.c (compare_genericparam): Sort the GenericParam table
1306 according to increasing owners.
1308 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
1310 * profiler.c: allow disabling the default profiler.
1312 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
1314 * decimal.c, icall.c: allow disabling System.Decimal support.
1316 2004-12-09 Marek Safar <marek.safar@seznam.cz>
1318 * reflection.c: Add support for null attribute arguments.
1320 2004-12-09 Martin Baulig <martin@ximian.com>
1322 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
1323 names to get rid of compiler warnings.
1325 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
1327 * marshal.c (mono_marshal_get_struct_to_ptr): Call
1328 mono_marshal_load_type_info (). Fixes #69625.
1329 (mono_marshal_get_ptr_to_struct): Likewise.
1331 2004-12-08 Martin Baulig <martin@ximian.com>
1333 * mono-debug.h: Bumped version number to 47.
1335 * mono-debug-debugger.c
1336 (mono_debugger_event_handler, mono_debugger_event): Take two
1337 guint64 arguments insteed of a gpointer and a guint32.
1339 2004-12-08 Martin Baulig <martin@ximian.com>
1341 * debug-mono-symfile.h
1342 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
1343 `address' to `native_offset'.
1345 2004-12-08 Martin Baulig <martin@ximian.com>
1347 * class.c (mono_class_create_from_typespec): Only inflate if we
1348 either have `context->gclass' or `context->gmethod'.
1350 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
1352 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
1354 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
1356 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
1358 * reflection.c (mono_assembly_get_object): Remove the workaround put
1361 * appdomain.c: Use the corlib_internal field from MonoAssembly.
1363 * appdomain.c: Bump corlib version.
1365 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
1366 be visible in other appdomains.
1368 2004-12-07 Ben Maurer <bmaurer@ximian.com>
1370 * threads.c: Interlocked inc and dec for longs were messed up,
1371 use a KISS based impl for this. Fixes 70234
1373 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
1375 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
1377 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
1379 * icall.c: fix to follow policy not to allow struct
1380 arguments in icalls.
1382 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1384 * process.c: make the patch that handles spaces in file paths work
1385 on mono/windows too.
1387 2004-12-06 Martin Baulig <martin@ximian.com>
1389 * class.c (mono_class_create_generic): Call
1390 mono_class_setup_supertypes() if we're dynamic.
1391 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
1393 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
1395 * object-internals.h: Add new fields to MonoThread.
1397 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
1399 * icall.c threads-types.h threads.c: Add new icalls.
1401 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
1403 * object-internals.h (MonoReflectionAssembly): Sync object layout with
1406 * appdomain.c: Bump corlib version.
1408 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
1409 internal assemblies. Fixes #69181.
1411 2004-12-05 Martin Baulig <martin@ximian.com>
1413 * class.c (mono_class_inflate_generic_signature): Make this a
1414 no-op if `context' is NULL or we don't have any type parameters;
1415 also copy `sentinelpos'.
1417 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
1419 * image.c: Add unbox_wrapper_cache.
1421 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
1423 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
1426 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
1429 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
1431 2004-12-04 Martin Baulig <martin@ximian.com>
1433 * loader.c (mono_method_get_signature_full): New public function;
1434 like mono_method_get_signature(), but with an additional
1435 `MonoGenericContext *' argument.
1437 * class.c (mono_class_inflate_generic_signature): Formerly known
1438 as inflate_generic_signature(); make this public.
1440 2004-12-04 Martin Baulig <martin@ximian.com>
1443 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
1444 instead of a `MonoGenericContainer *'.
1445 (mono_metadata_parse_array_full): Likewise.
1446 (mono_metadata_parse_signature_full): Likewise.
1447 (mono_metadata_parse_method_signature_full): Likewise.
1448 (mono_metadata_parse_generic_inst): Likewise.
1449 (mono_metadata_parse_generic_param): Likewise.
1450 (mono_metadata_parse_mh_full): Likewise.
1451 (mono_type_create_from_typespec_full): Likewise.
1453 2004-12-03 Martin Baulig <martin@ximian.com>
1455 * class-internals.h (MonoGenericContainer): Replaced the
1456 `MonoGenericContext * pointer with a `MonoGenericContext'
1457 structure and made it the first element.
1459 2004-12-03 Martin Baulig <martin@ximian.com>
1462 (inflate_generic_type): Set the `context->container' when creating
1463 a new MonoGenericContext.
1464 (mono_class_inflate_generic_method): Likewise.
1465 (mono_class_create_from_typespec): Just use `context->container'
1466 to get the container.
1468 * loader.c (method_from_methodspec): Set `context->parent' from
1469 `context->container' - and if that's a method container, use its
1470 parent. Also set the `context->container' when creating a new
1472 (mono_get_method_from_token): Use just `context->container' to get
1475 * metadata.c (do_mono_metadata_parse_generic_class): Also set
1476 `gclass->context->container'.
1478 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
1479 the `context->container' when creating a new MonoGenericContext.
1481 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
1483 * reflection.c (compare_genericparam): Sort params with identical
1484 owner by their number. Fixes gen-111 on sparc.
1486 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
1488 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
1489 around the domain changes.
1491 * appdomain.c (mono_domain_unload): Handle the case when the thread
1492 calling Unload is itself being aborted during unloading. Fixes #70022.
1494 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
1496 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
1497 checkpoint_func as an icall so it gets a wrapper.
1498 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
1499 in the cross-appdomain wrappers too.
1501 * threads.c (mono_thread_has_appdomain_ref): Make this public.
1503 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
1505 * reflection.c: Fix some memory leaks.
1507 2004-12-02 Martin Baulig <martin@ximian.com>
1509 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
1511 * metadata.c (generic_class_cache): New static hashtable.
1512 (mono_metadata_lookup_generic_class): New public method.
1514 2004-12-02 Martin Baulig <martin@ximian.com>
1516 * class.c (mono_class_create_from_typedef): Call
1517 mono_class_setup_parent() and mono_class_create_mono_type() before
1518 parsing the interfaces.
1520 2004-12-02 Martin Baulig <martin@ximian.com>
1522 * metadata.c (generic_inst_cache): New static hashtable.
1523 (mono_metadata_lookup_generic_inst): New public function.
1524 (mono_metadata_inflate_generic_inst): New public function.
1525 (mono_metadata_parse_generic_inst): New public function.
1526 (do_mono_metadata_parse_generic_class): Use the new
1527 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
1528 since this'll also use the cache.
1530 * reflection.c (mono_reflection_bind_generic_method_parameters):
1531 Use mono_metadata_lookup_generic_inst() to use the new cache.
1533 * class.c (inflate_mono_type): Use
1534 mono_metadata_inflate_generic_inst() to inflate a generic
1535 instance; this'll also use the new cache.
1537 * loader.c (method_from_methodspec): Use
1538 mono_metadata_parse_generic_inst() and
1539 mono_metadata_inflate_generic_inst() rather than parsing it
1540 manually, so we can use the new cache.
1542 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
1544 * threads.c (wait_for_tids): Do not incorrectly free threads when
1547 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
1549 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
1550 iter->args based on whether parameters are passed in registers (i.e.
1551 MONO_ARCH_REGPARMS is defined)
1553 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
1555 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
1556 the exception message. Fixes #70070.
1557 (method_from_methodspec): Fix warnings.
1559 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1561 * process.c: (complete_path) return the path quoted
1563 2004-12-01 Martin Baulig <martin@ximian.com>
1565 * class-internals.h (MonoGenericInst): New structure.
1566 (MonoGenericClass): Replaced `type_argc', `type_argv' and
1567 `is_open' with `MonoGenericInst *inst'.
1568 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
1569 `is_open' with `MonoGenericInst *inst'.
1571 2004-11-30 Martin Baulig <martin@ximian.com>
1573 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
1575 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
1576 to `generic_class_cache'.
1579 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
1580 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
1581 (mono_generic_inst_is_valuetype): Renamed to
1582 mono_generic_class_is_valuetype().
1585 (MonoGenericInst): Renamed to MonoGenericClass.
1586 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
1587 (MonoClass): Renamed `generic_inst' to `generic_class'.
1588 (MonoGenericContext): Renamed `ginst' to `gclass'.
1590 * object-internals.h
1591 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
1593 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
1594 mono_reflection_generic_class_initialize().
1596 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
1597 now known as "System.Reflection.MonoGenericClass".
1598 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
1600 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
1602 * class-internals.h: Added a flag field to MonoClass to cache the
1603 declarative security attributes actions associated with the class.
1604 * domain-internals.h: Added booleans to MonoJitInfo to cache the
1605 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
1606 applicable to the JITted method.
1607 * reflection.c|h: Added functions to extract (as flags) which security
1608 actions are available (declaratively) for a method, class or assembly.
1609 * metadata.c|h: Added functions to search the declarative security
1610 table in the metadata.
1612 2004-11-29 Ben Maurer <bmaurer@ximian.com>
1614 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
1615 EXPORTEDTYPES are already in the class name cache, so there is no
1616 need to add extra code here to look at them. Just removes a bit of
1619 (ves_icall_System_Environment_get_TickCount): No need for #if
1620 WINDOWS. We already have the code in io-layer.
1622 2004-11-28 Martin Baulig <martin@ximian.com>
1625 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
1628 2004-11-27 Miguel de Icaza <miguel@ximian.com>
1630 * assembly.c (do_mono_assembly_open): Instead of having a
1631 conditional WITH_BUNDLE, incorporate support for bundles here, by
1632 having a global `bundles' variable holding a pointer to the actual
1635 (mono_register_bundled_assemblies): New API call used by the
1638 See mkbundle.1 for details.
1640 2004-11-27 Martin Baulig <martin@ximian.com>
1642 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
1643 the vtable for generic methods.
1645 2004-11-26 Martin Baulig <martin@ximian.com>
1648 (mono_metadata_generic_method_hash): New public function.
1649 (mono_metadata_generic_method_equal): Likewise.
1652 (MonoGenericContainer): Added `GHashTable *method_hash'.
1654 * reflection.c (ReflectionMethodBuilder): Added
1655 `MonoGenericContainer *generic_container'.
1656 (reflection_methodbuilder_to_mono_method): Don't create a new
1657 MonoGenericContainer each time we're called.
1658 (mono_reflection_bind_generic_method_parameters): Use
1659 `container->method_hash' to cache the results so we don't create a
1660 different method if we're called several times with the same
1663 * loader.c (method_from_methodspec): Use the new
1664 `container->method_hash' here, too.
1666 2004-11-26 Martin Baulig <martin@ximian.com>
1668 * class.c (inflate_generic_signature): Correctly compute
1669 `res->has_type_parameters'.
1670 (mono_class_vtable): Use the `has_type_parameters' flag to
1671 determine whether we're a generic method.
1673 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
1675 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
1677 * object.c (mono_runtime_run_main): Fix a small memory leak.
1679 2004-11-25 Martin Baulig <martin@ximian.com>
1681 * class.c (set_generic_param_owner): Fixed the loop.
1683 2004-11-25 Martin Baulig <martin@ximian.com>
1685 * object.c (mono_class_vtable): Don't create any JIT wrappers for
1688 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
1690 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
1691 names. Fixes #69787.
1693 2004-11-24 Martin Baulig <martin@ximian.com>
1695 * class.c (mono_class_create_generic_2): If we don't have a
1696 `ginst->parent', inflate `gklass->parent' to get our parent.
1698 2004-11-24 Martin Baulig <martin@ximian.com>
1700 * reflection.c (compare_genericparam): Correctly sort the
1701 GenericParam table; fixes #69779.
1703 2004-11-23 Ben Maurer <bmaurer@ximian.com>
1705 * reflection.c: When writing a PE file, don't create a huge
1706 buffer in memory. Just write the arrays we have to the file.
1707 This reduces memory usage.
1709 * metadata-internals.h: MonoDynamicStream pefile is no longer used
1712 2004-11-17 Martin Baulig <martin@ximian.com>
1714 * class.c (mono_class_init): Don't setup `class->parent' for
1715 dynamic instances; moved this to mono_class_generic_2().
1716 (mono_class_create_generic): Also set `klass->inited' for dynamic
1718 (mono_class_create_generic_2): Don't do anything for dynamic
1719 generic instances. Set `klass->parent' here and also call
1720 mono_class_setup_parent() here.
1722 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
1723 `MonoType *parent' argument; set `ginst->parent' before calling
1724 mono_class_create_generic_2(), so we set the correct parent.
1726 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
1728 * reflection.c: allow getting attributes from ModuleBuilder
1731 2004-11-17 Martin Baulig <martin@ximian.com>
1733 * class.c (mono_class_create_from_typedef): If a type parameter is
1734 inherited from an outer class, set its owner to that class.
1736 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
1738 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
1739 for (int*) written size. This fixes bug #69592.
1741 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
1743 * icall.c: Added IsAuthenticodePresnet internal call.
1744 * image.c|h: New function that check a MonoImage for an Authenticode
1745 signature in the certificate PE data directory.
1746 * security.c|h: New internal call to ask the runtime if an
1747 Authenticode signature seems referenced in the PE header.
1749 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
1751 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
1753 * reflection.c (mono_image_create_pefile): Free the assembly streams
1754 after writing out the assembly file.
1756 * object.c (mono_runtime_run_main): Fix small memory leak.
1758 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
1759 property access modifiers. Fixes #69389.
1761 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
1763 * domain.c, object.c, object-internals.h, domain-internals.h,
1764 object.h, marshal.c: keep dynamic code info per domain.
1766 2004-11-15 Martin Baulig <martin@ximian.com>
1768 * class.c (mono_type_get_name_recurse): Put type arguments in
1769 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
1772 2004-11-15 Martin Baulig <martin@ximian.com>
1774 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
1775 (mono_class_setup_vtable): When computing `the_cname' for a
1776 generic instance, don't include the namespace since we'd otherwise
1779 2004-11-15 Martin Baulig <martin@ximian.com>
1781 * class.c (mono_class_create_generic): Changed return type to void.
1782 (mono_class_create_generic_2): New public function; setup
1783 `class->method', `class->field' and `class->interfaces' here
1784 instead of in mono_class_init().
1786 * class.h (mono_class_create_generic): Moved to class-internals.h.
1788 2004-11-14 Ben Maurer <bmaurer@ximian.com>
1790 * reflection.c (mono_image_create_pefile): take a file HANDLE.
1791 rather than writing to memory, write to this file. Right now,
1792 we are just writting into a buffer, and copying that. However
1793 we can avoid the buffer later.
1795 (mono_dynamic_stream_reset): new function
1797 * icall.c, object-internals.h: update for the above.
1799 2004-11-13 Ben Maurer <bmaurer@ximian.com>
1801 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
1802 have been using gc'd memory. First it is slower, unlikely
1803 the comment in the source code said, secondly, it increases
1804 our footprint to do it in the gc.
1806 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
1807 the method so that it does not have to copy to managed code.
1809 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
1811 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
1813 2004-11-12 Martin Baulig <martin@localhost>
1815 * reflection.c (mono_image_create_token): Allow generic method
1816 definitions here, since they may appear in an `.override'; see
1817 gen-98/gen-99 for an example.
1819 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
1821 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
1824 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
1827 2004-11-11 Martin Baulig <martin@ximian.com>
1829 * class.c (mono_class_setup_vtable): In an explicit interface
1830 implementation, the method name now includes the arity.
1832 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
1834 * object.c (mono_array_full_copy): Fix warning.
1836 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
1838 * appdomain.c: Removed look_for_method_by_name(). Use the new method
1839 mono_class_get_method_from_name() instead.
1841 * class-internals.h: Added two new types of wrappers.
1842 Added MonoRemotingTarget enum. Added new trampoline function type, which
1843 takes an additional MonoRemotingTarget value as parameter, so it is
1844 possible to request a trampoline for a specific target.
1846 * class.c: Added new mono_class_get_method_from_name() method.
1848 * class.h: In MonoRemoteClass, we can have now to vtables, one for
1849 general remoting sinks and one specific for cross domain calls.
1851 * debug-helpers.c: Added new wrapper names.
1853 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
1856 * image.c: Porperly delete value objects form the remoting invoke hashtable.
1858 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
1859 with several other methods (mono_marshal_get_xappdomain_dispatch,
1860 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
1861 and others) can generate a fast remoting wrapper for cross domain calls.
1862 More information can be found in docs/remoting.
1863 Other changes: Removed mono_find_method_by_name, and used
1864 mono_class_get_method_from_name instead.
1865 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
1866 is stored in the remoting invoke hashtable.
1868 * marshal.h: published the new method for getting the xdomain wrapper,
1869 and also added a method for getting the adequate wrapper for a given
1872 * object-internals.h, object.c: Added a couple of methods for capying and
1874 Modified mono_install_remoting_trampoline, which takes the new remoting
1875 trampoline that has a remoting target as parameter.
1876 mono_class_proxy_vtable now also takes a remoting target as parameter, and
1877 will return the most suitable vtable for the target.
1878 Added mono_remote_class_vtable, which returns the vtable of a remote class
1879 (which can be the normal remoting vtable or the xdomain vtable).
1881 * threads.c: the xdomain invoke and dispatch wrappers must also be
1882 protected against interruptions.
1884 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1886 * icall.c: use memmove in BlockCopyInternal when the source and
1887 destination arrays are the same.
1889 2004-11-09 Martin Baulig <martin@ximian.com>
1891 * class-internals.h (MonoGenericContainer): Removed `method' and
1892 `signature', replaced them with `is_method' and `is_signature'
1893 flags. Added `context'.
1895 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
1896 instead of a `MonoGenericContainer *'.
1898 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
1899 for dynamic type parameters.
1900 (mono_metadata_load_generic_params): Setup `container->context'.
1902 * reflection.c (mono_reflection_setup_generic_class): Setup
1903 `tb->generic_container->context'.
1904 (do_mono_reflection_bind_generic_parameters): Use
1905 mono_class_inflate_generic_type() to correctly inflate types,
1906 rather than using our own hack just for MONO_TYPE_VAR.
1908 2004-11-09 Martin Baulig <martin@ximian.com>
1910 * class.c (mono_class_inflate_generic_method): Small fix; don't
1914 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
1915 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
1916 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
1917 (ves_icall_Type_BindGenericParameters): Likewise.
1918 (ves_icall_Type_get_IsGenericInstance): Likewise.
1919 (ves_icall_Type_GetGenericParameterPosition): Likewise.
1920 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
1921 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
1922 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
1924 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
1926 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
1927 assembly versions and public key tokens. Fixes #69113.
1929 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
1931 * metadata.c: fix bug introduced with the type cache changes
1934 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
1936 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
1937 the MonoClass pointer instead of the token in exception clauses.
1938 * reflection.c: updates for the above and make the code not depend
1939 on the structure of MonoExceptionClause.
1941 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
1943 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
1944 Add support for dynamic assemblies. Fixes #69114.
1946 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
1948 2004-11-07 Ben Maurer <bmaurer@ximian.com>
1950 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
1951 since most only those methods use it. the code member of
1952 MonoMethodPInvoke was dead, so that can be removed too. Also,
1953 remove inline_count (again, not used), and move slot so that it
1954 can share bits with some other flags. This saves 8 bytes in the
1955 structure and gives us about 50 kb back for mcs helloworld.cs
1957 * *.[ch]: Do naming changes for the above.
1959 * loader.c (mono_method_get_header): Lazily init the header
1961 (mono_get_method_from_token): don't init the header here
1962 (mono_free_method): the header may never be allocated
1964 Overall, this saves 150 kb of unmanaged allocations
1965 for mcs helloworld.cs. That accounts for 10% of the unmanaged
1968 * loader.c, loader.h (mono_method_get_header): new accessor.
1970 * *.[ch]: use the above method. Prepares us to lazily load
1973 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
1974 three warnings, which are actual bugs (see 69206).
1976 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
1977 unused. Saves a cool 4 bytes / method.
1979 2004-11-06 Ben Maurer <bmaurer@ximian.com>
1981 * metadata.c (builtin_types): Add types for System.Object here.
1982 (mono_metadata_parse_type_full): Cache MonoType*'s that are
1983 for a class or valuetype from klass->this_arg or klass->byval_arg.
1985 On mcs for a hello world, this gets us down from 21836 MonoType's
1988 (mono_metadata_free_type): Account for the above change.
1990 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
1992 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
1993 exception instead of asserting if name is null.
1994 (ves_icall_System_AppDomain_GetData): Ditto.
1996 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
1998 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
2001 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
2002 Return NULL when the domain does not have entry_assembly set.
2004 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
2005 Add a 'resource_modules' argument.
2006 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
2008 * reflection.c (mono_reflection_create_runtime_class): Move setting
2009 of wastypebuilder here, so mono_get_type_object () returns a MonoType
2012 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
2013 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
2014 Throw an ArgumentNullException if 'ptr' is null.
2016 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
2017 assemblies here. Fixes #69020.
2019 2004-11-05 Geoff Norton <gnorton@customerdna.com>
2021 * reflection.c (build_compressed_metadata): Fix the previous patch for
2022 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
2025 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
2027 * assembly.c (mono_assembly_names_equal): Allow a match if one of
2028 the cultures is false. Fixes #69090.
2030 * reflection.c (build_compressed_metadata): Fix invalid memory read
2031 detected by valgrind.
2033 * reflection.c (mono_reflection_get_type): Avoid triggering a
2034 TypeResolve multiple times for the same type. Fixes #65577.
2036 2004-11-04 Ben Maurer <bmaurer@ximian.com>
2038 * marshal.c: Avoid using ldftn to call managed functions. It is
2039 much slower than just a call.
2041 * reflection.c (mono_module_get_object): free the basename we
2042 allocate here from glib.
2044 * reflection.c (ensure_runtime_vtable): make sure to free
2045 overrides. Also, we were allocating an array of MonoMethod not an
2046 array of MonoMethod*.
2048 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
2050 * image.c (mono_image_close): free image->guid here.
2052 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
2054 * reflection.c: Fix some spec conformance issues with the PE file
2055 structures so mcs compiled apps run on the Net 2.0 beta.
2057 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
2059 * string-icalls.c (ves_icall_System_String_ctor_encoding):
2060 Implement this. Fixes #67264.
2062 * debug-helpers.h debug-helpers.c marshal.c: Move
2063 mono_find_method_by_name to debug-helpers.c.
2065 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
2067 * object.c (mono_release_type_locks): type_initialization_hash is
2070 * reflection.c object.c object-internals.h: Fix warnings.
2072 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
2073 without accessors. Fixes #61561.
2075 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
2076 application base from the root domain if not set. Fixes #65641.
2077 (mono_runtime_init): Fix warning.
2079 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2081 * appdomain.c: call mono_thread_pool_init.
2082 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
2083 of worker threads based on the number of CPUs and the environment
2084 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
2085 for non-windows (windows) systems.
2087 2004-10-27 Chris Toshok <toshok@ximian.com>
2089 * mono-debug-debugger.c (write_class): don't call mono_class_init
2090 here, as even with the check for (!klass->init_pending), we get
2091 into a situation where we're hitting cycles in class
2092 initialization. Fixes #68816.
2094 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
2096 * image.c: Avoid overwriting values in the loaded_images_hash when an
2097 assembly is loaded multiple times. Fixes #61152.
2099 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
2100 so multiple satellite assemblies for the same name can be loaded.
2103 * mono_domain_assembly_preload: Actually return the loaded assembly,
2106 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
2107 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
2109 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
2110 pending finalizers are not invoked after the appdomain has been
2111 unloaded. Fixes #67862.
2113 2004-10-22 Martin Baulig <martin@ximian.com>
2115 * mono-debug-debugger.c
2116 (mono_debugger_runtime_invoke): Don't box valuetypes.
2118 2004-10-22 Chris Toshok <toshok@ximian.com>
2120 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
2121 don't hide private methods.
2123 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
2125 * icall.c: Allows the runtime to "share" (when known) the public key
2126 token of an assembly. This avoid the need to recalculate the token
2127 (from the public key) in managed code.
2129 2004-10-21 Chris Toshok <toshok@ximian.com>
2131 * debug-helpers.c (append_class_name): argh, revert last patch.
2133 2004-10-21 Chris Toshok <toshok@ximian.com>
2135 * debug-helpers.c (append_class_name): use '+' as the delimiter,
2136 not '/', so that it matches what the debugger uses to look up
2139 2004-10-21 Martin Baulig <martin@ximian.com>
2141 * mono-debug-debugger.c (mono_debugger_throw_exception): New
2142 public method; this is called each time an exception is thrown and
2143 allows the debugger to use exception catch points.
2145 2004-10-21 Martin Baulig <martin@ximian.com>
2147 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
2148 the stack pointer and the exception object in some struct and pass
2149 that to the debugger.
2151 2004-10-21 Chris Toshok <toshok@ximian.com>
2153 * mono-debug-debugger.c (do_write_class): add instance/static
2154 event support. We don't expose "raise" or "other" yet.
2155 (event_is_static): new method.
2157 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
2159 * mono-debug-debugger.c
2160 (mono_debugger_handle_exception): Remove
2161 bogus return value for fussy compilers.
2163 2004-10-20 Martin Baulig <martin@ximian.com>
2165 * mono-debug-debugger.c
2166 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
2167 (mono_debugger_handled_exception): Likewise.
2169 2004-10-20 Martin Baulig <martin@ximian.com>
2171 * mono-debug-debugger.h (MonoDebuggerEvent): Added
2172 MONO_DEBUGGER_EVENT_EXCEPTION.
2174 * mono-debug-debugger.c (mono_debugger_handle_exception): New
2175 public function to send the debugger a notification for an
2176 exception and inform it about a catch/finally clause.
2178 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
2180 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
2181 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
2184 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
2186 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
2188 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
2189 marshalled as [In,Out]. Fixes #58325.
2191 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
2193 * reflection.c (mono_method_body_get_object): Implement some fields.
2195 2004-10-12 Martin Baulig <martin@ximian.com>
2197 * reflection.c (mono_reflection_bind_generic_parameters): Small
2198 fix, correctly retrieve our parent from a generic instance.
2200 2004-10-12 Martin Baulig <martin@ximian.com>
2202 * metadata.c (mono_metadata_generic_param_equal): We always have
2206 (mono_class_from_generic_parameter): We need to have an owner.
2207 (my_mono_class_from_generic_parameter): Likewise.
2209 * reflection.c (mono_reflection_setup_generic_class): Renamed to
2210 mono_reflection_create_generic_class() and added a new
2211 mono_reflection_setup_generic_class().
2212 (mono_reflection_initialize_generic_param): If we're a nested
2213 generic type and inherited from the containing class, set our
2214 owner to the outer class.
2216 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
2218 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
2220 * reflection.c (mono_method_body_get_object): New function to create
2221 a MethodBody object.
2223 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
2225 2004-10-11 Martin Baulig <martin@ximian.com>
2227 * metadata.c (_mono_metadata_type_equal): Renamed to
2228 do_mono_metadata_type_equal() and made static.
2230 2004-10-11 Martin Baulig <martin@ximian.com>
2232 * appdomain.c: Bump corlib version number to 28.
2234 2004-10-10 Martin Baulig <martin@ximian.com>
2237 (MonoGenericInst): Added `MonoGenericContainer *container'.
2238 (MonoGenericMethod): Likewise.
2239 (MonoGenericContext): Likewise.
2240 (MonoGenericParam): Added `MonoGenericContainer *owner'.
2243 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
2244 (do_mono_metadata_parse_generic_inst): Likewise.
2245 (mono_metadata_parse_type_full): New public method. This is the actual
2246 mono_metadata_parse_type() implementation - with an additional
2247 `MonoGenericContainer *' argument.
2248 (mono_metadata_parse_array_full): Likewise.
2249 (mono_metadata_parse_signature_full): Likewise.
2250 (mono_metadata_parse_method_signature_full): Likewise.
2251 (mono_metadata_parse_mh_full): Likewise.
2252 (mono_type_create_from_typespec): Likewise.
2253 (mono_metadata_interfaces_from_typedef_full): New public method;
2254 this is similar to the other _full() methods, but we take a
2255 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
2256 (mono_metadata_parse_generic_param): Take an additional
2257 `MonoGenericContainer *' argument and lookup the MonoGenericParam
2258 from that container.
2259 (mono_metadata_generic_param_equal): New static method to compare
2260 two type parameters.
2261 (_mono_metadata_type_equal): New static method; takes an
2262 additional `gboolean signature_only' argument - if true, we don't
2263 compare the owners of generic parameters.
2264 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
2265 with a TRUE argument - do a signature-only comparision.
2267 * loader.c: Use the new _full() methods and pass the
2268 MonoGenericContainer to them.
2270 * object-internals.h (MonoReflectionTypeBuilder): Added
2271 `MonoGenericContainer *generic_container' field.
2272 (MonoReflectionMethodBuilder): Likewise.
2274 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
2276 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
2277 case initial images of dynamic assemblies.
2279 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
2281 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
2283 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
2284 length of event->other array.
2285 (typebuilder_setup_events): Ditto.
2287 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
2288 'assembly_by_name' and add an 'assemblies' list.
2290 * assembly.h assembly.c: Add a new search hook for determining whenever
2291 an assembly is already loaded. Use this instead of searching in the
2292 loaded_assemblies list.
2294 * domain.c appdomain.c: Implement the new search hook so loaded
2295 assemblies are now scoped by appdomain. Fixes #67727.
2297 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
2299 * threads.c (mono_thread_attach): Initialize synch_lock field so
2300 mono_thread_detach works again.
2302 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
2303 'lib' too. Fixes #63130.
2305 2004-10-06 Jackson Harper <jackson@ximian.com>
2307 * culture-info-tables.h: regenerated.
2309 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
2311 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
2312 implemented by other interfaces in the result. Fixes #65764.
2314 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
2315 Handle unloadable modules without crashing.
2317 * image.c (load_modules): Revert the previous patch since modules must
2318 have a fixed index inside the array.
2320 * image.c (load_modules): Don't include native modules in the modules
2323 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
2325 * reflection.h: Add param_defaults field.
2327 * reflection.c: Add support for parameter defaults in dynamic methods.
2330 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
2331 an empty string when a type has no namespace. Fixes #64230.
2333 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
2335 * tabledefs.h: Added "internal" security actions to support non-CAS
2336 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
2337 Note: they do not seems to be used anymore in 2.0 (new metadata format)
2339 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
2341 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
2342 constructor of abstract class. Fixes #61689.
2344 2004-10-04 Martin Baulig <martin@ximian.com>
2346 * class-internals.h (MonoGenericContainer): New type.
2347 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
2348 `MonoGenericContainer *generic_container'.
2349 (MonoClass): Replaced `gen_params' and `num_gen_params' with
2350 `MonoGenericContainer *generic_container'.
2352 * metadata.c (mono_metadata_load_generic_params): Return a
2353 `MonoGenericContainer *' instead of a `MonoGenericParam *';
2354 removed the `num' argument.
2356 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
2358 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
2361 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
2364 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
2366 * reflection.c: Save pe_kind and machine values into the generated
2369 * appdomain.c: Bump corlib version number.
2371 * object-internals.h: Reorganize layout of LocalBuilder.
2373 * class-internals.h class.c (mono_class_get_implemented_interfaces):
2374 New helper function.
2376 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
2377 created MonoType for dynamic types. Fixes #66180.
2379 2004-10-02 Ben Maurer <bmaurer@ximian.com>
2381 * threadpool.c: the ares hashtable needs a critical section around it.
2382 this prevents some nasty segfaults
2384 2004-10-02 Massimiliano Mantione <massi@ximian.com>
2386 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
2387 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
2390 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
2392 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
2394 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
2396 * image.c: Always canonicalize image file names, to avoid loading
2397 the same assembly twice when referenced using a relative path.
2399 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
2401 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
2403 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
2405 * marshal.c: Fix warnings.
2407 2004-09-29 Geoff Norton <gnorton@customerdna.com>
2409 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
2410 attempting to marshal the delegate_trampoline as the method_addr.
2411 This patch has a static hashtable of marshalled delegates so that
2412 we can map delegate_trampoline addresses back to delegates. This
2413 allows a delegate passed to managed code to be passed back into native
2416 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
2418 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
2420 * reflection.c (method_encode_code): Align method headers properly.
2423 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
2425 * marshal.c: In the runtime invoke wrapper, reset the abort
2426 exception if it is cached. This avoids the automatic rethrowal of
2427 the exception after the catch of the wrapper. Also check for pending
2428 interruptions before calling the managed method. This is done using
2429 the new method emit_thread_force_interrupt_checkpoint, since the
2430 normal checkpoint method is ignored when running the invoke wrapper.
2431 * object.c: If the abort exception is rethrown, set the abort_exc
2432 field of the thread, so it will be rethrown aftere every catch.
2433 * threadpool.c: Only run an interruption checkpoint if what has been
2434 requested is a stop of the thread (aborts will be ignored).
2435 * threads.c: By default, a thread will now never be interrumped while
2436 running the runtime invoke wrapper (this ensures that runtime_invoke
2437 will always return to the caller if an exception pointer is provided).
2438 There is a new special method mono_thread_force_interruption_checkpoint()
2439 to force an interruption checkpoint even if running a protected
2440 wrapper, which is used by the same runtime invoke wrapper to do a check
2443 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
2445 * object.c, object-internals.h: Implemented mono_release_type_locks,
2446 which releases the cctor locks held by a thread.
2447 * threads.c, threads.h: In thread_cleanup, release cctor locks held
2448 by a thread. Added mono_thread_exit() method to be used to safely stop
2451 2004-09-28 Raja R Harinath <rharinath@novell.com>
2453 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
2454 Move null check before dereference. Avoid indexing beyond the end
2455 of the 'modules' array.
2457 2004-09-28 Raja R Harinath <rharinath@novell.com>
2459 * metadata-internals.h (MonoImage): Add module_count field.
2460 * image.c (load_modules): Set image->module_count.
2461 (mono_image_load_file_for_image): Use image->module_count.
2462 * reflection.c (mono_image_load_module): Append to image->modules array
2463 of dynamic assembly.
2464 (mono_module_get_object): Fix loop to actually increment index.
2465 Use image->module_count.
2466 * assembly.c (mono_assembly_load_references): Use image->module_count.
2467 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
2470 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
2472 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
2473 Avoid assert on generic types.
2475 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
2477 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
2479 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
2481 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
2482 function to convert a MarshalSpec structure to its managed counterpart.
2484 * reflection.c: Fix warnings.
2486 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
2489 * icall.c (mono_create_icall_signature): Fix build.
2491 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
2493 * icall.c: Add MakePointType icall.
2495 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
2498 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2500 * threadpool.c: reuse allocated slots in the queue.
2502 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
2504 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
2506 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
2508 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
2511 * tabledefs.h: Add constants for pinvoke attributes BestFit and
2512 ThrowOnUnmappableChar.
2514 * icall.c (ves_icall_Type_GetPacking): New icall.
2516 2004-09-24 Martin Baulig <martin@ximian.com>
2518 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
2520 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2523 (mono_domain_set): allow setting a domain that is being unloaded.
2524 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
2527 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
2529 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
2530 the GetCustomAttributes icall.
2532 2004-09-23 Martin Baulig <martin@ximian.com>
2534 * object-internals.h (MonoReflectionGenericParam): Replaced
2535 'has_ctor_constraint', `has_reference_type' and `has_value_type'
2536 with `guint32 attrs'.
2538 2004-09-23 Martin Baulig <martin@ximian.com>
2540 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
2542 2004-09-23 Martin Baulig <martin@ximian.com>
2544 * object-internals.h (GenericParameterAttributes): New enum.
2546 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
2548 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
2550 * class.c (init_events): Fill out event->other field.
2552 * class.c: Fix warnings.
2554 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
2556 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
2558 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
2559 walk which doesn't supply the IL offset.
2561 2004-09-22 Martin Baulig <martin@ximian.com>
2563 * reflection.c (mono_reflection_setup_internal_class): If we're
2564 System.ValueType, System.Object or System.Enum, set
2565 `klass->instance_size' and create the vtable.
2566 (mono_reflection_create_internal_class): If we're an enum type,
2567 get the base class from our current corlib.
2569 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
2571 * reflection.h (MonoResolveTokenError): New type.
2573 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
2576 * icall.c: Add an 'error' argument to the ResolveToken icalls.
2578 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
2580 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
2581 Support also calling constructors, but only for already allocated objects.
2583 2004-09-17 Geoff Norton <gnorton@customerdna.com>
2585 * reflection.c (type_get_qualified_name): If the klass is null
2586 return the typename to avoid a NullRefEx.
2587 (encode_cattr_value): Get the qualified name of the boxed type,
2588 not the underlying enumtype. Fixes #62984.
2590 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
2592 * marshal.c: Fix problems with previous checkin.
2594 2004-09-21 <vargaz@freemail.hu>
2596 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
2597 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
2599 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
2601 2004-09-21 Geoff Norton <gnorton@customerdna.com>
2603 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
2604 should only return a type for pointers, arrays, and passbyref types.
2607 2004-09-21 Martin Baulig <martin@ximian.com>
2609 * domain.c (mono_debugger_check_runtime_version): New public
2612 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
2614 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
2616 * reflection.c: Added missing sort to the declarative security
2617 attributes table. MS implementation stops seeing the attributes if the
2618 token number regress in the table (as shown by ildasm and permview).
2620 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
2622 * object-internals.h (MonoReflectionModule): Add 'token' field.
2624 * reflection.c (mono_reflection_get_token): Add support for Module
2626 (mono_module_get_object): Set 'token' field.
2627 (mono_module_file_get_object): Set 'token' field.
2629 * icall.c: Add new Assembly and Module icalls.
2631 * appdomain.c: Bump corlib version.
2633 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
2635 * loader.h loader.c class.h class.c: Add helper functions for obtaining
2636 tokens of metadata objects.
2638 * reflection.h reflection.c (mono_reflection_get_token): New function
2639 to obtain the token of a metadata object.
2641 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
2643 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
2645 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
2647 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
2649 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
2651 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
2652 * object-internals.h: Added 3 MonoArray* members to MonoReflection
2653 AssemblyBuilder to access the permissions set in the class lib.
2654 * reflection.c: Added security attributes encoding step in
2655 mono_image_build_metadata.
2656 * tabledefs.h: Added new security actions defined in 2.0:
2657 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
2659 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
2661 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
2664 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
2666 * locales.c: nullify the ICU_collator member of CompareInfo when it is
2667 finalized. There where random SIGSEVs at program termination, when
2668 an object being finalized was trying to do a string comparison and
2669 the current culture was already finalized.
2671 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2673 * threads.c: call thread_cleanup before finishing the thread if we get
2676 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
2678 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
2679 assemblies from the parent. Fixes #65665.
2681 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
2683 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
2686 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
2688 * reflection.h: add prototype for mono_get_dbnull_object
2689 * reflection.c: add prototypes for get_default_param_value_blobs
2690 and mono_get_object_from_blob for fussier compilers
2692 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
2694 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
2695 false deadlock checks in class initialization.
2697 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
2699 * image.c (mono_image_addref): Fix comment.
2701 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
2704 2004-09-12 Jambunathan K <kjambunathan@novell.com>
2706 * reflection.c (mono_param_get_objects): Modified to return
2707 ParameterInfo.DefaultValue object.
2709 (get_default_param_value_blobs):
2710 (mono_get_object_from_blob):
2711 (mono_get_dbnull_object): New helper routines.
2713 * object.c (mono_get_constant_value_from_blob): New helper routine
2714 carved out from get_default_field_value ()
2716 * object-internals.h (mono_get_constant_value_from_blob): Added
2717 function declaration.
2719 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
2721 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
2722 referenced assemblies. Fixes #62135.
2724 * exception.h exception.c (mono_get_exception_file_not_found2): New
2727 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
2729 * class.h class.c: Add mono_type_get_underlying_type ().
2731 2004-09-09 Geoff Norton <gnorton@customerndna.com>
2733 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
2734 Fix GetTypes() to support dynamically created assemblies.
2736 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
2738 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
2740 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
2743 * reflection.h reflection.c loader.c: Allow dynamic construction of
2744 pinvoke methods. Fixes #65571.
2746 * reflection.c (mono_reflection_get_type): Revert previous change since
2747 it causes regressions.
2749 2004-09-08 Martin Baulig <martin@ximian.com>
2751 * class.c (class_compute_field_layout): Don't call
2752 mono_class_layout_fields() for open generic instances.
2754 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
2755 * threads.c appdomain.c: fix typo in GC macro
2757 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2759 * threads.c: don't call mono_thread_detach() in start_wrapper(),
2760 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
2762 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
2764 * image.c (mono_image_close): Applied patch from
2765 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
2766 assembly is loaded multiple times from data.
2768 * image.c (mono_image_open): Fix warning.
2770 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
2772 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
2775 * reflection.c (mono_reflection_create_runtime_class): Initialize
2776 klass->nested_classes. Fixes #61224.
2778 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
2780 * threads.c: sched_yield() on exit, to allow threads to quit.
2782 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
2784 * object.c (mono_unhandled_exception): Remove leftover debug code.
2786 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
2788 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
2790 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
2792 * marshal.c (emit_marshal_array): Really null terminate string arrays.
2794 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
2796 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
2798 * marshal.c (emit_marshal_array): Null terminate string arrays.
2800 * marshal.c (raise_auto_layout_exception): Fix warning.
2802 * reflection.c (mono_param_get_objects): Initialize the default value
2803 with DBNull.Value, not null. Fixes #62123.
2805 2004-09-01 Miguel de Icaza <miguel@ximian.com>
2807 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
2808 throw an exception with a cute explanation.
2810 2004-09-06 Dick Porter <dick@ximian.com>
2812 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
2813 Close the new process's thread handle, as we don't use it. The
2814 handle stays around forever otherwise.
2816 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
2818 * object.c (arith_overflow): Fix warning.
2820 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
2821 calling conventions in method refs. Fixes #65352.
2823 * reflection.c: Fix warnings.
2825 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
2827 * icall.c: Add a new icall for Array.Clear
2829 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
2831 * object.c: When allocating an array, we have to throw
2832 an overflow exception if any of the lengths are < 0.
2834 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
2836 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
2837 properly. Also move implementation of string array marshalling to
2838 managed code. Fixes #42316.
2840 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2842 * assembly.c: provide more information when loading an assembly fails.
2844 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
2846 * filewatcher.c: don't expect the development fam package to be
2849 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
2851 * marshal.c: Make a copy of the signature cookie since it will be
2852 freed by the caller.
2854 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
2856 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
2858 * metadata.c (mono_metadata_free_marshal_spec): New function to free
2861 * marshal.c: More refactoring.
2863 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
2866 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
2868 * object.c: In mono_message_invoke, fill the output parameter array after
2869 calling the managed method (it was done before the call). This fixes
2872 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
2874 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
2877 2004-09-02 Martin Baulig <martin@ximian.com>
2879 * class.c (mono_class_instance_size): Don't allow generic type
2880 definitions or open generic instances.
2881 (mono_class_array_element_size): If we're a value type, call
2882 mono_class_instance_size() on the original class.
2884 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
2885 handle generic instances.
2887 * mono-debug-debugger.c (write_type): Handle generic instances
2890 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
2892 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
2893 the allocation request fails. Fixes #65089.
2895 * object.c (mono_runtime_free_method): Do not call mono_free_method.
2897 * object.c (mono_runtime_free_method): New function to free a dynamic
2900 * marshal.c (mono_delegate_free_ftnptr): New function to free the
2901 delegate trampoline.
2903 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
2904 with hasthis as dynamic,
2906 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
2908 * domain.c (mono_jit_info_table_remove): New function to remove an
2909 entry from the jit info table.
2911 * class-internals.h (MonoMethod): Add 'dynamic' field.
2913 * loader.c: Fix warnings.
2915 2004-09-01 Martin Baulig <martin@ximian.com>
2917 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
2918 instead of mono_debugger_lock() because the latter one is a no-op
2919 unless running in the debugger.
2921 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
2923 * class.c (class_compute_field_layout): Classes with auto-layout or
2924 reference fields are not blittable.
2926 2004-09-01 Dick Porter <dick@ximian.com>
2928 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
2929 mono_image_get_filename() to get the assembly location.
2932 * metadata.h: Fix compile warnings
2934 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
2936 * class.c (class_compute_field_layout): System.Object is blittable.
2938 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
2939 as in/out. Fixes #59909.
2941 2004-09-01 Martin Baulig <martin@ximian.com>
2943 * metadata.h (MONO_TYPE_ISREFERENCE): Call
2944 mono_metadata_generic_inst_is_valuetype() if we're a generic
2945 instance to check whether our underlying type is a reference type.
2947 2004-09-01 Martin Baulig <martin@ximian.com>
2949 * metadata.c (mono_type_size): If we're a generic instance, call
2950 mono_class_value_size() for value types.
2952 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
2954 * marshal.c: Implement more custom marshalling functionality. Fixes
2957 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
2959 * mono-debug.c, debug-mono-symfile.c: add some locking love.
2961 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
2963 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
2965 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
2967 * icall.c: Fix some warnings.
2969 * threads.c (abort_appdomain_thread): Fix unref errors.
2970 (mono_thread_current): Fix THREAD_DEBUG define.
2972 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
2974 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
2976 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
2978 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
2980 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
2983 2004-08-28 Martin Baulig <martin@ximian.com>
2986 (mono_metadata_generic_inst_is_valuetype): New public function.
2988 * metadata.h (MONO_TYPE_ISSTRUCT): Call
2989 mono_metadata_generic_inst_is_valuetype() if we're a generic
2990 instance to check whether our underlying type is a valuetype.
2992 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
2994 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
2997 2004-08-25 Martin Baulig <martin@ximian.com>
2999 * loader.c (mono_get_method_from_token): Abstract methods can also
3000 be generic and thus have type parameters.
3002 * metadata-internals.h
3003 (MonoDynamicImage): Added `GPtrArray *gen_params'.
3005 * reflection.c (mono_image_get_generic_param_info): Don't create a
3006 metadata row, just add an entry to the `gen_params' array.
3007 (build_compressed_metadata): Sort the `gen_params' array and then
3008 actually create the metadata.
3010 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3012 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
3014 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
3016 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
3018 2004-08-24 Martin Baulig <martin@ximian.com>
3020 * class.cs (mono_class_is_subclass_of): Like an interface, a
3021 generic instance also derives from System.Object.
3023 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
3025 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
3026 custom modifiers to be in any order. Fixes #61990.
3028 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
3030 * object.c: Register mono_object_new_fast icall.
3032 * object.c (mono_class_get_allocation_ftn): Return to calling
3033 mono_object_new_fast, since it seems faster to compute the object
3034 size in unmanaged code than passing it as a parameter.
3036 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
3038 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
3039 this function with Boehm as the oom handler, so we don't have to check
3040 the result of GC_malloc.
3042 * object.c: Remove checks for oom.
3044 * object.h object.c (mono_class_get_allocation_ftn): New function to
3045 return the icall which can be used to allocate an instance of a given
3048 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
3050 * class-internals.h: Add 'enabled' field.
3052 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
3054 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
3056 2004-08-18 Jambunathan K <kjambunathan@novell.com>
3057 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
3060 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
3062 * appdomain.c: use the Tls function for appdomain too,
3063 at Zoltan's request. Actually return in mono_context_get
3065 * appdomain.c, profiler.c, threads.c: use __thread
3067 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
3069 * appdomain.c threads.c: Call GC_CreateThread on windows.
3071 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
3072 multiple libraries since this don't work on windows.
3074 2004-08-18 Martin Baulig <martin@ximian.com>
3077 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
3080 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
3081 MonoMethodNormal since we also need it for abstract and interface
3085 (build_compressed_metadata): Sort the GenericParam table.
3086 (mono_image_create_token): Added `gboolean create_methodspec'
3087 argument; this is false when generating a MethodImpl token.
3088 (reflection_methodbuilder_to_mono_method): Abstract and interface
3089 methods may also have generic parameters.
3091 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
3093 * appdomain.c: thread local alloc
3095 2004-08-17 Martin Baulig <martin@ximian.com>
3097 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
3100 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
3103 * class.c (mono_type_get_full_name): New public function.
3104 (mono_type_get_name): Don't include the type arguments.
3106 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
3108 * Makefile.am: Build static versions of libmetadata and libmonoruntime
3109 for inclusion into the mono executable.
3111 2004-08-16 Martin Baulig <martin@ximian.com>
3113 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
3114 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
3116 2004-08-14 Martin Baulig <martin@ximian.com>
3118 * class.c (dup_type): Also copy the `byref' field.
3120 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
3122 * reflection.c (create_dynamic_mono_image): Revert the last change
3123 since it breaks bootstrap.
3125 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
3127 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
3129 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
3130 not free them with g_free.
3132 2004-08-11 Martin Baulig <martin@ximian.com>
3134 * reflection.c (mono_reflection_setup_internal_class): Also call
3135 mono_class_setup_mono_type() if we already have a `tb->type.type'.
3137 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
3139 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
3140 called during default (first) AppDomain creation. Keep track of
3141 Evidence when loading assemblies.
3143 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
3145 * opcodes.c, opcodes.h: reduce runtime relocations.
3147 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
3149 * culture-info.h, locales.c: fixes and chages to sue the new
3150 optimized format of the locale data.
3151 * culture-info-tables.h: regenerated.
3153 2004-08-06 Geoff Norton <gnorton@customerdna.com>
3155 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
3157 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
3159 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
3160 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
3161 * domain-internals.h: icall declaration.
3162 * icall.c: icall registration.
3163 * object-internals.h: New fields in MonoAssembly for CAS.
3165 2004-08-05 Duncan Mak <duncan@ximian.com>
3167 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
3170 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
3172 * reflection.c: fix to deal with object[] arrays in custom ctors
3175 2004-08-05 Martin Baulig <martin@ximian.com>
3177 * class.c (mono_class_array_element_size): Added support for
3178 generic instances and correctly handle "recursive" types.
3180 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
3182 * assembly.c: Fix warnings.
3184 2004-08-04 Martin Baulig <martin@ximian.com>
3187 (mono_type_get_name_recurse): Added `gboolean include_arity'
3188 argument specifying whether or not we should include the generic
3189 arity in the type name.
3190 (_mono_type_get_name): New static function.
3191 (mono_class_setup_vtable): If we're a generic instance, don't
3192 include the generic arity in the names of explicit method
3195 2004-08-03 Martin Baulig <martin@ximian.com>
3197 * class.c (mono_type_get_name_recurse): Enclose the generic type
3198 arguments in `<', '>'.
3200 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
3202 * gc.c: make GC warning messages use the trace API, they are just
3203 noise to most of the users.
3205 2004-08-03 Martin Baulig <martin@ximian.com>
3207 * debug-mono-symfile.c (read_string): Correctly read the string.
3209 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
3211 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
3213 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
3215 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
3217 2004-07-30 Martin Baulig <martin@ximian.com>
3219 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
3220 Reflect latest symbol writer changes.
3222 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
3224 * object.c: always create an object if null is passed
3225 to Invoke() where a valuetype is expected.
3227 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
3229 * marshal.c (mono_marshal_init): make managed
3230 signatures match native ones better for 64bits.
3232 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3234 * appdomain.c: hack to build correctly the private bin path on windows.
3237 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
3239 * assembly.c: Load mscorlib from the correct framework directory
3240 (mono/<version>/mscorlib.dll).
3241 * appdomain.h: Added prototypes for new functions.
3242 * internals.h: Added some prototypes.
3243 * domain.c: When initializing the runtime, get from the executable and
3244 the configuration files the runtime version that the app supports.
3245 Added support methods for reading app.exe.config. Added list of versions
3246 supported by the JIT. Added two new methods: mono_init_from_assembly,
3247 which initializes the runtime and determines the required version from
3248 the provided exe file, and mono_init_version, which initializes
3249 the runtime using the provided version.
3250 * icall.c: Get machine.config from version-specific directory.
3251 * reflection.c: When generating an image, embed the version number
3252 of the current runtime.
3254 2004-07-28 Dick Porter <dick@ximian.com>
3257 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
3258 returned sockaddr size before creating the remote address object.
3259 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
3262 2004-07-28 Dick Porter <dick@ximian.com>
3264 * locales.c (string_invariant_compare_char): Fix invariant char
3265 compares between upper and lower cases. Fixes bug 61458.
3267 2004-07-27 Ben Maurer <bmaurer@ximain.com>
3269 * marshal.c: actually cache stelem.ref wrappers.
3271 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
3273 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
3274 sections and remove the mono_cli_rva_map () function.
3276 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
3278 * debug-mono-symfile.c: fix one more endianess issue, from a patch
3279 by Geoff Norton (<gnorton@customerdna.com>).
3281 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
3283 * class.c: fix class loads for pointer types (typeof(int) !=
3286 2004-07-27 Martin Baulig <martin@ximian.com>
3288 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
3289 reading the debugging information from an external ".mdb" file.
3291 2004-07-24 Martin Baulig <martin@ximian.com>
3293 * reflection.c (mono_image_get_type_info): Only write a class
3294 layout entry if we actually have a size or a packing size.
3296 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
3298 * reflection.c (type_get_fully_qualified_name):
3299 insert cast to get type checking of ?: with non-gcc compilers
3301 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
3303 * rand.c: use g_getenv for both lookups of
3306 2004-07-17 Martin Baulig <martin@ximian.com>
3308 * reflection.c (mono_reflection_bind_generic_method_parameters):
3309 Set `gmethod->reflection_info'.
3311 2004-07-17 Martin Baulig <martin@ximian.com>
3313 * class.c (mono_class_create_from_typedef): Insert the newly
3314 created class into the hash table before computing the interfaces
3315 since we could be called recursively.
3317 2004-07-16 Ben Maurer <bmaurer@ximain.com>
3319 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
3320 function to implement stelem.ref in managed code
3321 * class-internals.h, debug-helpers.c: a new wrapper type
3324 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
3326 * gc.c: allow GC handles to work even when no GC is compiled in.
3327 Fix part of bug #61134 (GetAddrOfPinnedObject).
3329 2004-07-13 Peter Williams <peter@newton.cx>
3331 * process.c (complete_path): Make sure we don't attempt to execute
3334 2004-07-12 Geoff Norton <gnorton@customerdna.com>
3336 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
3337 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
3338 and will add/subtract the hour if needed
3340 2004-07-12 Martin Baulig <martin@ximian.com>
3342 * reflection.c (mono_field_get_object): If we have
3343 `field->generic_info', take the attributes from
3344 `field->generic_info->generic_type'.
3346 2004-07-12 Martin Baulig <martin@ximian.com>
3348 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
3349 This function must be called before initializing the runtime.
3350 (mono_debug_init_1): New function; call this after initializing
3351 the runtime, but before loading the assembly. It tells the
3352 debugger to load corlib and the builtin types.
3354 * mono-debug-debugger.c: Did some larger changes in the debugging
3355 code; support recursive class declarations, make sure we actually
3358 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3360 * debug-helpers.c: undo my previous patch and fixed the real issue in
3361 ../mini/exceptions-x86.c
3363 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3365 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
3366 when no HOME env. variable was set and a NullRef was thrown in a .cctor
3367 called from other .cctors.
3369 2004-07-09 Miguel de Icaza <miguel@ximian.com>
3371 * loader.c: Removed the mono_loader_wine_init hack now that we are
3372 doing a managed version of Windows.Forms.
3374 2004-07-09 Ben Maurer <bmaurer@ximian.com>
3376 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
3377 threadpool.c, threads.c: remove static data from rootset.
3379 2004-07-09 Dick Porter <dick@ximian.com>
3381 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
3382 Don't do any more processing if the matched length was 0. It was
3383 increasing the size of the string before. Fixes bug 61167.
3385 2004-07-09 Dick Porter <dick@ximian.com>
3389 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
3390 Add support for SO_PEERCRED if its available.
3392 2004-07-09 Peter Bartok <pbartok@novell.com>
3393 * loader.c: winelib.exe.so error message is now only displayed if
3394 MONO_DEBUG is set. To help us avoid questions when people are trying
3395 out the new Managed.Windows.Forms.
3397 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
3399 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
3400 for isinst and castclass wrappers.
3402 * class-internals.h icall.c: Move registration and lookup of JIT icalls
3403 to libmetadata from the JIT, so they could be used by the marshalling
3404 code and the interpreter.
3406 * marshal.c: Register marshalling related JIT icalls here instead of
3407 in mini.c. Use CEE_MONO_ICALL instead of the family of
3408 CEE_MONO_PROC<x> opcodes to call marshalling functions.
3410 * metadata.h: Remove unneeded marshalling conversions.
3412 * opcodes.c: Update for new opcodes.
3414 2004-07-08 Martin Baulig <martin@ximian.com>
3416 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
3417 (mono_debug_get_domain_data): Make this function static.
3419 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
3421 * gc.c, object.h: add nice GC handle API for embedders.
3423 2004-07-06 Ben Maurer <bmaurer@ximian.com>
3425 * reflection.c: more changes for the new api
3427 * object.c: When we reflect on a field w/ a constant value, it
3428 will not have a memory location, so we must access metadata. Also,
3429 allow easier reading of strings so that we can read them from
3432 * class.c (mono_class_layout_fields): no need for literal fields here.
3434 * class-internals.h: api changes for const fields
3436 * icall.c (ves_icall_get_enum_info): use new apis for const fields
3438 2004-07-06 Martin Baulig <martin@ximian.com>
3440 * mono-debug.h: Increment version number to 44.
3442 * mono-debug.c (mono_debug_add_wrapper): The second argument is
3443 now a gpointer, rewrote this whole method.
3445 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
3446 function. Add information about the wrapper in a new "misc table".
3448 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
3449 for the new misc table.
3451 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
3453 * metadata-internals.h image.c: Add a cache for helper signatures.
3455 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
3457 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
3459 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
3460 delegates from a delegate. Fixes #61033.
3462 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
3463 marshalling of stringbuilder arrays. Fixes #59900.
3465 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
3467 * icall.c: Add EnumBuilder:setup_enum_type icall.
3469 2004-06-30 Ben Maurer <bmaurer@ximian.com>
3471 * icall.c: Added a new icall for the property version of
3474 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
3476 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
3477 it has a constant size across platforms.
3479 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
3482 2004-06-29 Martin Baulig <martin@ximian.com>
3484 * mono-debug.c (mono_debug_add_method): Protect the whole function
3485 in mono_debugger_lock(), not just parts of it.
3487 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
3489 * reflection.c: make sure padding bytes in heaps are zeroed.
3491 2004-06-24 David Waite <mass@akuma.org>
3493 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
3494 image.c, loader.c, locales.c, marshal.c, metadata.c,
3495 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
3496 string-icalls.c, threads.c: change to C90-style comments from C99 /
3499 2004-06-24 Dick Porter <dick@ximian.com>
3502 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
3503 return createdNew. Fixes bug 60412.
3506 * icall.c: Add createdNew parameter to CreateMutex icall
3508 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
3510 * reflection.c, object-internals.h: save default value in params.
3512 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3514 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
3515 no need to build a new path combining that with the application base.
3518 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
3520 * reflection.c: fixed minor standard compliance issues.
3522 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
3524 * reflection.c: fixed issue with encoding some custom attributes
3525 (arrays in properties and fields, bug #60411).
3527 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3529 * reflection.c: fix start address when copying the public key token.
3531 2004-06-23 Martin Baulig <martin@ximian.com>
3533 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
3534 the `exc' object in a static object to put it into the GC's root set.
3536 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
3538 * reflection.c: make mono_reflection_setup_internal_class ()
3539 callable a second time to setup a new parent class.
3541 2004-06-23 Dick Porter <dick@ximian.com>
3543 * threads.c: Check for WAIT_IO_COMPLETION return values.
3545 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
3547 * appdomain.c: Removed the g_free on the public key token. Now copy
3548 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
3549 * assembly.c: Added public key token string value when loading
3550 assemblies. Fix bug #60439.
3551 * icall.c: Added missing informations (like public key) in
3552 GetReferencedAssemblies. Fix #60519.
3553 * image.h: Changed definition for public key token from const char*
3554 public_tok_value to guchar public_key_token [17];
3555 * reflection.c: Updated for changes to public key token.
3557 2004-06-22 Lluis Sanchez Gual
3559 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
3560 for the field in base classes.
3562 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
3564 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
3565 mark headers as not supported, they are installed only for use by the
3568 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
3570 * *.c, *.h: avoid namespace pollution in public headers.
3572 2004-06-21 Martin Baulig <martin@ximian.com>
3574 * exception.c (mono_get_exception_security): It's in
3575 "System.Security", not in "System".
3577 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
3578 the exception classes.
3580 2004-06-21 Martin Baulig <martin@ximian.com>
3582 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
3583 Protect the exception object from being finalized.
3585 2004-06-21 Martin Baulig <martin@ximian.com>
3587 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
3590 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
3592 * reflection.c: Load the assembly in mono_reflection_type_from_name,
3593 if it was not loaded before. Fix parts of #60439.
3595 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
3597 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
3598 code that was broken since Ben's change: wrappers are now
3599 dependent on the method signature only again.
3601 2004-06-21 Martin Baulig <martin@ximian.com>
3603 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
3604 added interface support.
3606 2004-06-21 Martin Baulig <martin@ximian.com>
3608 * class.c (mono_vtable_get_static_field_data): New public method.
3610 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
3612 * filewatcher.c : Windows build fix to be compliant with API changes.
3614 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
3616 * class.h, class.c: more accessors.
3617 * metadata.h, metadata.c: prepare for hiding MonoType and
3618 MonoMethodSignature: people should use the accessors from now on
3619 outside of the tree.
3621 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
3623 * *.c, *.h: more API cleanups.
3625 2004-06-18 Jackson Harper <jackson@ximian.com>
3627 * assembly.c: Trace loading assemblies.
3628 * loader.c: Trace loading native libraries.
3629 * mono-config.c: Trace loading config files.
3631 2004-06-18 Dick Porter <dick@ximian.com>
3633 * locales.c: Tell ICU the lengths of strings, it can cope with
3634 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
3636 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
3638 * image.c: swapped name/filename;
3640 2004-06-18 Martin Baulig <martin@ximian.com>
3642 * mono-debug-debugger.c (write_class): Write the parent class at
3643 the end of the header.
3645 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
3647 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
3649 2004-06-17 Raja R Harinath <rharinath@novell.com>
3651 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
3652 (bundle_obj): New conditional define.
3653 (BUILT_SOURCES): Remove.
3654 ($(bundle_srcs)): Make parallel-make safe.
3655 (libmonoruntime_la_LIBADD): Make unconditional.
3656 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
3657 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
3659 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
3661 * culture-info-tables.h: It was inconsistent with the latest
3664 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
3666 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
3669 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
3672 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
3674 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
3675 cleaned up public header threads.h.
3677 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
3679 * Makefile.am, *.c, *.h: more API cleanups.
3681 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
3683 * Makefile.am: removed monosn from compilation.
3684 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
3685 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
3686 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
3687 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
3688 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
3689 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
3691 2004-06-15 Jackson Harper <jackson@ximian.com>
3693 * assembly.c: Make locales lower case when searching the GAC for
3694 assemblies. gacutil will always make locales lowercase when
3695 installing so this effectively makes them case insensitive.
3697 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
3699 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
3700 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
3701 parameter which allows to choose whether the wait can be interrupted or
3702 not. Also added the method mono_monitor_enter(), which locks the monitor
3703 using an infinite wait and without allowing interruption.
3704 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
3706 * object.h: Added new fields in MonoThread. suspend_event holds the event
3707 used to susped/resume the thread. synch_lock is the lock object to use for
3708 modifying the thread state.
3709 * threads.c: Use the new synch_lock object for locking, instead of "this",
3710 which can generate deadlocks.
3711 Moved thread state change in Thread.Sleep and Thread.Join from managed
3712 to unmanaged code. This avoids a deadlock when the thread was suspended
3713 just after acquiring the thread lock.
3714 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
3715 Implemented Thread.Suspend using an event instead of ThreadSuspend,
3716 which is not fully implemented in the io-layer.
3717 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
3719 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
3721 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
3722 threads-types.h: more API cleanups.
3724 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
3726 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
3727 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
3728 threadpool.c, threads.c: first pass at the exported API cleanup.
3730 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
3732 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
3734 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3736 * icall.c: added internalGetHome.
3738 2004-06-14 Dick Porter <dick@ximian.com>
3740 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
3741 possible to return successfully when '.' or '..' were the only
3742 entries in a directory, but were skipped. The MonoIOStat was not
3743 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
3746 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
3748 * reflection.c: make binaries run on .Net 1.1 by default.
3750 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
3752 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
3754 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
3756 * marshal.c: keep track of struct size with explicit layout
3759 2004-06-12 Martin Baulig <martin@ximian.com>
3761 * mono-debug-debugger.c: Comment out a debugging g_message().
3763 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
3765 * reflection.c, reflection.h: do not free custom attrs that are cached.
3766 * icall.c: use braces to make code clearer.
3768 2004-06-11 Martin Baulig <martin@ximian.com>
3770 * class.h (MonoInflatedField): New type.
3771 (MonoClassField): Replaced `MonoType *generic_type' with
3772 `MonoInflatedField *generic_info'.
3775 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
3777 2004-06-11 Martin Baulig <martin@ximian.com>
3779 * reflection.c (mono_image_create_method_token): Correctly encode
3782 2004-06-11 Martin Baulig <martin@ximian.com>
3784 * metadata.c (mono_metadata_parse_method_signature): When parsing
3785 a MethodDef which has VarArgs, also set sentinelpos if we don't
3786 have any parameters.
3788 2004-06-11 Martin Baulig <martin@ximian.com>
3790 * verify.c (mono_method_verify): In CEE_CALL, use
3791 mono_method_get_signature() to get the method's signature, unless
3792 we're a PInvoke method.
3794 2004-06-10 Jackson Harper <jackson@ximian.com>
3796 * assembly.c: Use <path>/lib/mono/gac for the extra paths
3797 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
3798 logical name as the supplied path is just a prefix to the gac not
3799 the direct path to it.
3801 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
3803 * reflection.c: make the token for a created method match
3804 the token of the MethodBuilder it was created from
3805 (IKVM requires this behaviour now).
3807 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
3809 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
3810 reflection.c, socket-io.c: leak fixes.
3812 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
3814 * icall.c: handle sentinel pos in vararg methods in position different
3817 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3819 * culture-info-tables.h: freshly generated.
3821 2004-06-09 Martin Baulig <martin@ximian.com>
3823 * loader.c (mono_get_method_constrained): Call `mono_class_init
3824 (constrained_class)'.
3826 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
3828 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
3829 any methods. Fixes #59629.
3831 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
3833 * culture-info-tables.h: reflecting locale-builder updates.
3835 2004-06-08 Dick Porter <dick@ximian.com>
3838 * locales.c: Fixed compile warnings, including a real bug in
3839 CompareInfo_internal_compare.
3841 2004-06-08 Dick Porter <dick@ximian.com>
3844 (ves_icall_System_Globalization_CompareInfo_internal_index):
3845 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
3846 Double-check the resuls of usearches, because ICU currently
3847 ignores most of the collator settings here. Fixes bug 59720.
3849 2004-06-08 Dick Porter <dick@ximian.com>
3852 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
3853 Fix memory leak and segfault-causing typo. No idea how this one
3854 lasted so long without being noticed.
3856 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
3858 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
3859 any methods. Fixes #59629.
3861 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3864 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
3865 own the critical section before). Removed dead code (that's done
3866 in the preload hook).
3868 (mono_assembly_load_with_partial_name): call the preload hook.
3870 2004-06-08 Martin Baulig <martin@ximian.com>
3872 * metadata.c (mono_metadata_signature_alloc): Default
3873 `sentinelpos' to -1.
3875 * reflection.c (mono_image_get_array_token): Likewise.
3877 2004-06-08 Martin Baulig <martin@ximian.com>
3879 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
3881 * metadata.c (mono_metadata_parse_method_signature): When parsing
3882 a MethodDef which has VarArgs, set sentinelpos.
3884 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
3885 `gint16' since we're using -1 for non-varargs methods.
3888 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
3889 (method_encode_signature): Added varargs support.
3890 (method_builder_encode_signature): Likewise.
3891 (mono_image_get_varargs_method_token): New static method.
3892 (mono_image_create_method_token): New public method; this is
3893 called via an icall instead of mono_image_create_token() when
3894 calling a varargs method.
3896 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
3898 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
3900 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
3902 * culture-info-tables.h : Reflecting the latest locale-builder that
3903 fixed empty array representation ({} to {0}).
3905 2004-06-07 Jackson Harper <jackson@ximian.com>
3907 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
3908 looking up extra gac paths. This allows MONO_GAC_PATH to act
3909 exactly like a prefix.
3911 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
3913 * reflection.c (mono_reflection_type_from_name): Make a copy of the
3914 type name before modifying it. Fixes #59405.
3916 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
3918 * culture-info.h: added fields for "all datetime patterns".
3919 * locales.c: ( ves_icall_System_Globalization_CultureInfo
3920 _construct_datetime_format ()): fill xxx_patterns fields.
3921 * object.h: added fields for "all datetime patterns" to
3922 MonoDateTimeFormatInfo.
3923 * culture-info-tables.h: reflecting locale-builder updates.
3925 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
3927 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
3928 the event has no add and remove methods. Fixes #59629.
3930 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
3932 * object.c: Fixed possible integer overflow when allocating large
3935 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
3937 * culture-info-tables.h: reflecting locale-builder updates.
3939 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
3941 * culture-info-tables.h: reflecting locale-builder updates.
3943 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
3945 * culture-info-tables.h: reflecting locale-builder updates.
3947 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
3949 * threads.c: Made Thread.Sleep abortable.
3951 2004-06-02 Martin Baulig <martin@ximian.com>
3953 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
3955 * debug-mono-symfile.h: Bumped symbol file version number to 37.
3957 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
3959 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
3961 2004-05-30 Jackson Harper <jackson@ximian.com>
3963 * reflection.c: Do not hardcode assembly versions or public key
3964 tokens anymore. All of this except the corlib section was dead
3967 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
3969 * object.c (mono_runtime_invoke_array): Automatically create boxed
3970 objects for byref valuetypes if needed. Fixes #59300.
3972 * object.c (mono_method_return_message_restore): Handle
3973 MONO_TYPE_OBJECT as well.
3975 2004-05-28 Jackson Harper <jackson@ximian.com>
3977 * reflection.c: The modified type encoding was causing build
3978 problems. Reverted for now.
3980 2004-05-28 Jackson Harper <jackson@ximian.com>
3982 * reflection.c/h: Take an assembly ref so that we dont create
3983 fully qualified names when encoding types in the same assembly as
3984 the custom attribute being emitted.
3985 * appdomain.c: Increment version number.
3987 2004-05-26 Duncan Mak <duncan@ximian.com>
3990 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
3991 Set the full version number (major, minor, build, revision).
3993 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
3995 * marshal.c (emit_struct_conv): increment src/dst after blit
3996 (mono_marshal_get_managed_wrapper,
3997 mono_marshal_get_native_wrapper): make sure we have marshalling
3998 info before marshalling params (info computation affects
4001 * class.c (class_compute_field_layout): correctly deal with
4003 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
4004 value types (as per what windows dows by default)
4005 (mono_class_setup_mono_type): System.ValueType is blittable
4006 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
4009 * marshal.c (mono_marshal_load_type_info): flag types as
4010 non-blittable if the native layout doesn't match the managed
4013 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4015 * appdomain.c: don't add stuff in the private search path that is
4016 above the application base. If application base is not set, there's
4017 no private search path.
4019 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
4021 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
4022 byref struct arguments in native->managed marshalling.
4024 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
4026 * marshal.c (mono_marshal_get_runtime_invoke): correctly
4027 cache methods using signature (special case for methods
4028 that are value type or string class)
4030 * image.c (mono_image_close): clean up allocated GSList's
4031 in runtime_invoke_cache.
4033 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4035 * mono-config.c: set the correct path for mono_cfg_dir on windows when
4036 there's no MONO_CFG_DIR environment variable defined.
4038 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4040 * threads.c: windows version must be >= 0x0500 to include OpenThread.
4042 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
4044 * threadpool.c: Really wait for 500ms after the async call, even if the wait
4046 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
4047 before waiting for it, and call CloseHandle after the wait to unref it.
4048 This will make sure that handles are not disposed too early.
4050 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4055 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
4058 * object.c: se the application_base only for the domain that runs
4059 Main. Fixes bug #59216,
4061 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4064 * object.c: only the domain in which Main is run have
4065 SetupInformation.ConfigurationFile set, so moved a few lines from
4066 appdomain.c to object.c.
4068 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4070 * appdomain.c: we tried to load [name].(dll|exe), but according
4071 to bug #57710, we must also try [culture]/[name].(dll|exe) and
4072 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
4073 There's a test case attached to bug #58922.
4075 2004-05-27 Dick Porter <dick@ximian.com>
4078 * file-io.c: Implemented icalls for locking and unlocking regions
4080 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
4081 FALSE on error (fixes both compiler warning and real bug.)
4083 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
4085 * culture-info-tables.h: reflecting locale-builder updates.
4087 (Added missing ChangeLog entry for 05/26)
4089 2004-05-27 Jackson Harper <jackson@ximian.com>
4091 * locales.c: Fix some cut and paste errors.
4093 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4095 * mono-config.c: set the correct path for config. directory on windows.
4097 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
4099 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
4102 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
4104 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
4105 from pinvoke functions.
4107 * marshal.c (mono_ftnptr_to_delegate): Implement this.
4109 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
4111 * culture-info-tables.h: reflecting locale-builder updates.
4113 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
4115 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
4118 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
4120 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
4121 * icall.c: Modified icalls for RNG.
4122 * rand.c|h: Changed RNG interface to allow thread-safe usage under
4123 Windows (CryptoAPI).
4125 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
4127 * locales.c: Fix build.
4129 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
4131 * culture-info-tables.h: reflecting locale-builder updates.
4133 2004-05-25 Jackson Harper <jackson@ximian.com>
4135 * locales.c: When creating the current culture use the $LANGs
4136 specific culture. So DateTimeFormat and NumberFormat entries are created.
4138 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
4140 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
4141 a char array as parameter.
4143 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
4145 * image.c: In mono_image_open(), always use an absolute path name to
4146 look for already loaded images.
4148 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
4150 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
4151 missing in the windows build (like older cygwin include files).
4153 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
4155 * icall.c: Fixed check for possible integer overflow in Buffer_
4156 BlockCopy icall. Replaced comments style // by /* */.
4158 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
4160 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
4162 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
4163 check after MONO_VTADDR. Fixes pinvoke2.exe.
4165 * marshal.h marshal.c metadata.h: Add beginnings of support for
4166 ftnptr -> delegate marshalling.
4168 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
4170 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
4171 * threads.c: Fix warnings.
4173 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
4175 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
4176 * icall.c: Registered icalls for Suspend and Resume.
4177 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
4179 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
4180 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
4181 * process.c: Use WaitForSingleObjectEx.
4182 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
4184 * threads.c, threads.h: Make use of new Ex wait methods. Improved
4185 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
4186 for Suspend and Resume. Added new mono_thread_stop, used for stoping
4187 background threads. Added basic support for Abort in Windows.
4188 Start new threads using a managed delegate invoke wrapper. This wrapper
4189 has an interruption checkpoint that is needed since an interruption
4190 can be requested before the thread leaves the unmanaged code that starts
4192 * marshal.c: Added interruption checkpoint after every native call, and
4193 also before managed calls for wrappers called from unmanaged code to
4194 go into managed code.
4195 * object.h: Added new field in MonoThread to keep track of interruption
4198 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
4200 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
4203 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4210 * rand.c: getenv -> g_getenv (windows!)
4212 * process.c: complete_path is also used on non-windows platforms.
4214 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4216 * icall.c: new signature for Process_Start.
4218 * process.[ch]: new signature for Process_Start. If we're on windows
4219 and UseShellExecute is false, we have to search for the program by
4220 ourselves if we don't get a full path.
4222 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
4224 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
4225 marshalling and call CleanUpNativeData if needed. Fixes #58646.
4227 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4229 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
4232 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4234 * process.c: use double quotes to quote program name and arguments on
4235 windows. Fixes bug #58575.
4237 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4239 * file-io.c: don't return "." and ".." when using windows Find*File.
4241 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
4243 * marshal.c: Don't pass wrappers to message init because method
4244 addressed used to lookup metadata. part of remoting[2|3] fix.
4246 2004-05-15 Jackson Harper <jackson@ximian.com>
4248 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
4249 path is essentially the same as MONO_PATH except that it points to
4250 GACs instead of lib directories.
4251 * loader.h: The user gac is gone so we dont need function to
4253 * mono-config.c: user gac option is now gone.
4255 2004-05-15 Jackson Harper <jackson@ximian.com>
4257 * culture-info.h: Make defines more consistent, add calendar data
4258 to the culture info table.
4259 * culture-info-tables.h: Add basic calendar data. Basically
4260 everyone gets default gregorian until all the data is
4262 * locales.c: Use the new consistent defines. Set calendar data for
4263 culture info objects.
4264 * object.h: add a field for calendar data to CultureInfo
4266 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
4268 * image.c: image->runtime_invoke_cache is keyed on signatures now.
4269 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
4271 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
4272 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
4273 an extra param that is the pointer of the method to invoke. The IL for
4274 the invoke method is no longer specific to the method, but to the
4275 signature of the method. Thus, we can share the same code for multiple
4276 methods. This reduces the number of methods that have to be compiled.
4278 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
4280 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
4282 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
4284 * icall.c: Optimize Buffer.BlockCopy.
4286 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4288 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
4289 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
4290 quote). Changed them to "MMMM yyyy".
4292 2004-05-12 Miguel de Icaza <miguel@ximian.com>
4295 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
4297 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
4299 * reflection.h: Updated after changes to managed structures.
4301 * appdomain.c: Bump corlib version.
4303 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4305 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
4308 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4310 * Makefile.am: link to ../os/libmonoos.la on windows.
4313 -If MONO_DEBUG, warn about non-existing directories in
4315 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
4316 compile time variable.
4317 -Removed init_default_path and call mono_set_rootdir from
4318 libmonoos.a instead (windows only).
4320 * assembly.h: declare mono_assembly_getrootdir().
4323 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
4325 * loader.c: s/getenv/g_getenv/
4327 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
4329 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
4331 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
4333 * metadata.h: Add new marshalling conversions.
4335 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
4338 * reflection.c (mono_reflection_get_type): Lookup the type in all
4339 modules of a multi-module assembly. Fixes #58291.
4341 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
4343 * threads.c: Before aborting a background, set the StopRequested
4344 state. This avoids throwing the Abort exception.
4345 In mono_thread_manage, don't continue with the shutdown until all
4346 aborted threads have actually stopped.
4348 2004-05-10 Jackson Harper <jackson@ximian.com>
4350 * locales.c: Remove the modifier from culture names.
4352 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4354 * Makefile.am: monosn is not installed any more. It has been deprecated
4357 2004-05-07 Jackson Harper <jackson@ximian.com>
4360 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
4361 Fix array construction, add bailout if the length is 0.
4363 2004-05-07 Dick Porter <dick@ximian.com>
4365 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
4366 machine doesn't have a DNS entry. Patch by Urs Muff
4367 (umuff@quark.com), fixes bug 57928.
4369 2004-05-06 Jackson Harper <jackson@ximian.com>
4371 * reflection.c: Handle null PublicTokens properly. alloc mem for
4372 assembly names culture so we dont crash when freeing it.
4374 2004-05-06 Jackson Harper <jackson@ximian.com>
4376 * assembly.c: Check the usergac when loading with partial names.
4378 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
4380 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
4381 does nothing for now (not required for Linux/Windows) but the class
4382 library can call it (and a newer or modified runtime could need it).
4383 * icall.c: Registred icall.
4385 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4387 * loader.c: prints a message on module loading error we set MONO_DEBUG
4388 environment variable.
4390 2004-05-05 Jackson Harper <jackson@ximian.com>
4392 * appdomain.c: Handle PublicKeyToken=null properly.
4394 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
4396 * environment.c|h: Added icall ves_icall_System_Environment_
4397 GetOSVersionString to get the current OS version as a string.
4398 * icall.c: Registred icall.
4400 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
4402 * object.c: in mono_object_get_virtual_method(), take into account that
4403 non-virtual methods don't have a slot in the vtable. Check needed when
4404 the object is a proxy.
4406 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
4408 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
4409 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
4411 * object.c (mono_class_compute_gc_descriptor): Fix warning.
4413 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
4414 passed when a valuetype is expected.
4416 * object.c (mono_unhandled_exception): Only set the exit code if the
4417 exception happens in the main thread. Fixes thread5.exe.
4419 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
4420 invalid names. Fixes #58047.
4422 2004-05-03 Jackson Harper <jackson@ximian.com>
4424 * assembly.c: This line was committed accidently and is unneeded.
4426 2004-05-03 Jackson Harper <jackson@ximian.com>
4428 * icall.c: Add new icall for Assembly::LoadWithPartialName
4429 * assembly.c/.h: new function that probes the GAC to load partial
4430 assembly names by Paolo Molaro.
4432 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4434 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
4435 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
4436 (type_get_fully_qualified_name): Added PublicKeyToken when building a
4439 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4441 * appdomain.c: fixed check for 'neutral' culture and removed warning.
4442 * reflection.c: fix bug when parsing a full type name and Version is not
4443 the last thing in the string.
4445 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
4447 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
4448 crashes when it is freed.
4450 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4452 * assembly.c: print the compat warning to stderr.
4454 2004-05-01 Miguel de Icaza <miguel@ximian.com>
4456 * assembly.c (mono_assembly_load_references): Add a compatibility
4457 hack to run old applications that might be still referencing the
4458 3300-based assemblies, only do this for System.xxx.
4460 2004-05-01 Jackson Harper <jackson@ximian.com>
4462 * appdomain.c: If the culture is neutral we set it to "".
4464 2004-04-29 Jackson Harper <jackson@ximian.com>
4466 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
4468 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
4470 * string-icalls.c: added low overhead function for copying chars
4471 * icall.c: added needed icall for the above function
4473 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4475 * icall.c: fix return value of get_global_assembly_cache. Implemented
4476 Environment.GetLogicalDrives.
4478 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
4480 * rand.c: try and talk to egd or prngd
4481 for random bytes if opening devices fail.
4483 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
4485 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
4486 alignment for the type using the native alignment of its members
4487 instead of using klass->min_align.
4489 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
4491 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4494 * socket-io.c: added check for sys/aio.h.
4496 2004-04-28 Dick Porter <dick@ximian.com>
4498 * threads.c: Don't abort a thread thats already aborting, when
4499 terminating everything.
4501 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4503 * icall.c: added 2 new async calls for Socket.
4505 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
4508 * threadpool.c: removed unused variable.
4510 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
4512 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
4514 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
4516 * locales.c: put back string_invariant_tolower () and
4517 string_invariant_toupper ().
4519 2004-04-26 David Waite <mass@akuma.org>
4524 * unicode.h: remove comma from end of enumeration declarations
4526 2004-04-26 David Waite <mass@akuma.org>
4528 * debug-mono-symfile.h:
4531 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
4534 2004-04-26 Jackson Harper <jackson@ximian.com>
4536 * appdomain.c: Increment version number.
4538 2004-04-26 Jackson Harper <jackson@ximian.com>
4540 * appdomain.c: Set assembly references public token value when
4541 PublicKeyToken is specified, not the hash_value. Free public token
4542 values when free assembly name data. Previously the public key
4543 token was hex decoded, however we are using hex encoded public key
4544 tokens, so this is not neccasary.
4545 * assembly.c: Lookup assemblies in the gac if their public token
4546 value is set. Add function to allow enabling user gac
4547 lookups. Specify whether or not the assembly was loaded from the
4548 GAC. Compare full assembly names when checking the cache for
4549 assemblies (Temporarily disabled see comment in code). Remove
4550 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
4551 specifies trace-loader they get extra info to stdout on the
4552 loading of assemblies.
4553 * image.h: Add a field for an assembly references public token
4554 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
4555 whether an assembly has been loaded from the GAC.
4556 * image.c: Remove a corlib -> mscorlib name mapping.
4557 * loader.h: Add function to enable/disable the user gac.
4558 * mono-config.c: Check if the usergac is enabled in the config
4560 * icall.c: New icall to determine whether or not an assembly has
4561 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
4562 * tabldefs.h: Add constant for assemblyref flag that specifies a
4563 full public key is used instead of a public token.
4564 * reflection.c: Remove mscorlib -> corlib mappings. Set
4565 PublicTokenValue instead of hash value. This value is a hex
4566 string so it does not need to be expanded.
4568 2004-04-26 Martin Baulig <martin@ximian.com>
4570 * mono-debug-debugger.c (mono_debugger_initialize): Set
4571 `mono_debugger_initialized' before calling mono_debug_lock().
4573 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
4575 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
4576 InternalToUpper/InternalToLower.
4577 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
4578 removed invariant culture shortcut. This is now done in managed code.
4579 * locales.c: (string_invariant_toupper/tolower) removed.
4581 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4583 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
4584 Added Poll internal call.
4586 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
4587 call for Poll. Select was too heavy for polling a single socket.
4589 * threadpool.[ch]: added mono_threadpool_cleanup.
4590 * threads.c: use it. Don't use Thread_Abort on windows.
4592 2004-04-23 Martin Baulig <martin@ximian.com>
4594 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
4596 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
4598 * icall.c: Registred new icalls for key pair protection and added an
4599 icall for Environment.GetFolderPath on Windows.
4600 * security.c|h: Added new icalls for key pair protection.
4602 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4604 * socket-io.c: don't display the non-supported family warning for known
4605 families. Now this is not displayed on windows when checking support
4608 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4610 * class.c: don't display the layout warning for static fields.
4612 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
4614 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
4615 * locales.c, locales.h: Added new icalls for culture-specific
4616 Char.ToLower and Char.ToUpper.
4618 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4620 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
4623 2004-04-20 Martin Baulig <martin@ximian.com>
4625 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
4626 of the type name before passing it to mono_reflection_type_from_name().
4628 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
4630 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
4631 encodings here. Fixes #56965.
4633 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
4635 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
4636 fix test on strstr result not that I can see anything that
4637 relies on the result.
4639 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
4641 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
4644 * marshal.c (mono_marshal_get_string_encoding): New helper function.
4646 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
4647 function to determine which marshalling to use for strings. Fixes
4650 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
4652 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
4654 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
4656 * icall.c: #include mono-config.h
4658 2004-04-15 Jackson Harper <jackson@ximian.com>
4660 * culture-info-tables.h: Fix date formats for en-US culture.
4662 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
4664 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
4665 ThreadPool.SetMinThreads.
4666 * threadpool.c: Implemented ThreadPool.GetMinThreads and
4667 ThreadPool.SetMinThreads.
4669 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
4671 * mono-config.c: also load the .config file in the directory
4672 where the assembly was found.
4674 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
4676 * assembly.c: load per-assembly config files.
4677 * icall.c: decrapified code to get the config dir and moved to
4679 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
4680 per-assembly config files. When doing a dll map lookup give precedence
4681 to the per-assembly data.
4683 2004-04-14 Martin Baulig <martin@ximian.com>
4685 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
4686 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
4687 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
4689 * mono-debugger-debugger.c: While the debugger is locked, remember
4690 whether the symbol tables have changes and send one single
4691 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
4693 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
4695 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
4697 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
4700 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
4701 account when marshalling string arrays. Fixes #56965.
4703 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
4705 * icall.c: Add new icalls mapping for security.
4706 * security.c|h: Add internal calls for WindowsIdentity,
4707 WindowsImpersonationContext and WindowsPrincipal.
4709 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
4711 * class.c: Added comment to ensure the System.MonoDummy class
4712 is removed when no longer necessary
4714 2004-04-13 Miguel de Icaza <miguel@ximian.com>
4716 * appdomain.c: Pass arguments to the bootstraping exceptions to
4717 minimize JITed methods at boot
4719 * metadata.c (mono_exception_from_name_two_strings): Allow for the
4720 second string to be null.
4722 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
4723 Change the protocol to minimize the JIT methods at startup. Now
4724 it Returns the internal codepage, if the value of "int_code_page"
4725 is 1 at entry, and we can not compute a suitable code page
4726 number, returns the code page as a string.
4728 2004-04-13 Jackson Harper <jackson@ximian.com>
4730 * culture-info-tables.h: Fix number of decimal digits for all
4733 2004-04-13 Jackson Harper <jackson@ximian.com>
4735 * icall.c: Clairfy out of sync error message. It is not always
4736 your corlib that is out of sync.
4738 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
4740 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
4741 properties when only the set accessor is overriden. Fixes #55874.
4743 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
4745 * assembly.c (mono_assembly_load_references): Make this thread safe.
4748 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
4750 * monosn.c: Add missing initialization calls.
4752 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
4755 ves_icall_System_Globalization_CultureInfo_construct_number_format
4756 Fix g_assert so it compiles on fussier compilers re int/ptr
4759 2004-04-08 Dick Porter <dick@ximian.com>
4762 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
4763 53992. Also rearrange the code so that the internal calls return
4764 an error value and exceptions are thrown from managed code.
4766 * icall.c: Add type info to the socket icalls.
4768 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4770 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
4773 2004-04-07 Martin Baulig <martin@ximian.com>
4775 * class.c (mono_class_from_generic_parameter): Don't default
4776 `klass->parent' to `mono_defaults.object_type'.
4778 2004-04-07 Martin Baulig <martin@ximian.com>
4780 * reflection.c (mono_reflection_initialize_generic_parameter): Set
4781 `param->pklass->reflection_info'.
4783 2004-04-07 Jackson Harper <jackson@ximian.com>
4785 * culture-info-tables.h: Fix date separator symbol.
4787 2004-04-07 Martin Baulig <martin@ximian.com>
4789 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
4790 from System.Type to System.MonoType.
4792 2004-04-07 Martin Baulig <martin@ximian.com>
4795 (MonoReflectionGenericParam): Added `has_reference_type' and
4796 `has_value_type' fields.
4798 * reflection.c (mono_image_get_generic_param_info): Encode the
4799 correct flags if we have the `class' or `struct' constraint.
4801 2004-04-07 Martin Baulig <martin@ximian.com>
4804 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
4806 2004-04-07 Jackson Harper <jackson@ximian.com>
4808 * appdomain.c: Revert extra patches, just wanted to bump the
4811 2004-04-07 Jackson Harper <jackson@ximian.com>
4813 * Makefile.am: Add culture-info private headers.
4814 * icall.c: Add new icalls for contructing locales.
4815 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
4816 * locales.h: Declare new culture info construction methods.
4817 * object.h: Add new fields used to avoid the CultureMap to
4819 * culture-info.h: Definition of structs used in the culture info
4821 * culture-info-tables.h: Autogenerated tables that contain culture
4822 info data. This file was generated with the locale-builder tool.
4823 * appdomain.c: Incement corlib version number.
4825 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
4827 * appdomain.c: (mono_runtime_init) move mono_thread_init
4828 to before mono_object_new calls so critical sections
4829 are initialized before use.
4831 2004-04-07 Martin Baulig <martin@ximian.com>
4834 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
4835 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
4836 (ves_icall_MonoGenericParam_initialize): Removed.
4837 (monogenericparam_icalls): Removed.
4838 (generictypeparambuilder_icalls): Added new table for
4839 System.Reflection.Emit.GenericTypeParameterBuilder.
4842 (mono_reflection_define_generic_parameter): Removed.
4843 (mono_reflection_initialize_generic_parameter): This is now called
4844 from GenericTypeParameterBuilder's .ctor.
4846 2004-04-06 Martin Baulig <martin@ximian.com>
4848 * class.c (mono_class_init): Don't inflate nested classes in a
4850 (mono_type_get_name_recurse): Include the generic arguments for
4851 generic instances and generic type declarations.
4852 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
4853 (_mono_class_get_instantiation_name): Removed.
4854 (mono_class_create_generic): Always use `gklass->name' as our name.
4856 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
4858 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
4859 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
4860 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
4861 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
4862 closed generic methods here.
4865 (mono_reflection_generic_inst_get_nested_types): Removed.
4866 (inflate_mono_method): Copy the generic parameters from the
4867 MonoMethodHeader into out MonoGenericMethod.
4869 2004-04-06 Martin Baulig <martin@ximian.com>
4872 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
4874 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
4876 * reflection.c (build_compressed_metadata): If we have any entries
4877 in the GenericParam, MethodSpec or GenericParamConstraint tables,
4878 set the header version to 1.1.
4880 2004-04-06 Martin Baulig <martin@ximian.com>
4882 * class.c (mono_class_init): If we're a generic instance,
4883 initialize our nested classes, too.
4884 (_mono_class_get_instantiation_name): Deal with the new `!%d'
4887 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4889 * process.c: quote the argument passed to the shell on windows.
4891 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
4893 * threads.c (mono_alloc_special_static_data): Allow this to be
4894 called during startup.
4896 2004-04-02 Martin Baulig <martin@ximian.com>
4899 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
4901 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
4903 * icall.c: Fix build.
4905 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
4907 * Makefile.am: Added security.c|h.
4908 * icall.c: Added icall for get_UserName;
4909 * security.c: New file for security related icalls. Added function
4910 get_UserName for System.Environment (fix #56144).
4911 * security.h: New. Header file for security.c
4913 2004-04-02 Dick Porter <dick@ximian.com>
4915 * icall.c: Deleted the icalls that were obsoleted some time ago
4916 by the ICU string code, and which were mixed into the icall
4917 rearranging. Fixes bug 55969.
4920 * string-icalls.c: Deleted the code that those icalls reference.
4922 2004-04-01 Martin Baulig <martin@ximian.com>
4924 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
4926 * class.c (mono_class_from_generic_parameter): Don't set
4927 TYPE_ATTRIBUTE_INTERFACE.
4928 (my_mono_class_from_generic_parameter): Likewise.
4930 2004-04-01 Martin Baulig <martin@ximian.com>
4932 * loader.c (find_method): Added an optional `MonoClass *ic'
4933 argument to search in a specific interface.
4934 (mono_get_method_constrained): New public function.
4936 2004-04-01 Martin Baulig <martin@ximian.com>
4938 * reflection.c (mono_image_get_generic_field_token): Use the
4939 `handleref' cache here.
4941 2004-04-01 Martin Baulig <martin@ximian.com>
4943 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
4945 * reflection.c (create_generic_typespec): Use the `typespec' hash
4946 here, not the `typeref' one.
4948 2004-04-01 Martin Baulig <martin@ximian.com>
4950 * class.c (mono_class_inflate_generic_type): Moved the
4951 functionality into a new static inflate_generic_type() which
4952 returns NULL if it didn't do anything. Only increment the
4953 `mono_stats.inflated_type_count' if we actually inflated
4955 (mono_class_get_full): Check the classes type to see whether we
4956 need to inflate it; also inflate MONO_TYPE_(M)VAR.
4958 2004-04-01 Jackson Harper <jackson@ximian.com>
4960 * reflection.c: Set culture for assembly references.
4962 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
4964 * reflection.[ch], icall.[ch], Fix support for pinning variables.
4966 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4969 (do_mono_assembly_open): the critical section also covers
4970 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
4972 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4975 (mono_manage_threads): abort the background threads when finishing.
4978 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4980 * gc.c: only close the done_event handle if there was no timeout.
4983 2004-03-30 Martin Baulig <martin@ximian.com>
4985 * icall.c (icall_entries): It's called "System.Activator", not
4986 "System.Activation".
4988 2004-03-30 Martin Baulig <martin@ximian.com>
4990 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
4991 (mono_class_create_from_typespec): Likewise.
4993 2004-03-30 Martin Baulig <martin@ximian.com>
4995 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
4996 `has_ctor_constraint' and `initialized'.
4998 2004-03-30 Martin Baulig <martin@ximian.com>
5000 * reflection.c (encode_new_constraint): New static function to add
5001 the constructor constraint attribute to a type parameter.
5002 (encode_constraints): Call encode_new_constraint() if necessary.
5005 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
5007 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
5009 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
5011 * reflection.c, icall.c: add support for pinning variables.
5013 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
5015 * marshal.c (mono_marshal_get_managed_wrapper):
5016 init bool local with zero rather than null.
5018 2004-03-29 Martin Baulig <martin@ximian.com>
5020 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
5021 the "official" behavior here.
5022 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
5024 2004-03-29 Martin Baulig <martin@ximian.com>
5026 * icall.c: Reflect latest API changes.
5028 2004-03-29 Martin Baulig <martin@ximian.com>
5030 * loader.c (mono_get_method_from_token): Also call
5031 mono_metadata_load_generic_params () for abstract and interface
5032 methods; replace the type arguments in the method signature with
5033 the ones which are loaded from the metadata.
5035 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
5037 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
5038 of the lock is not the current thread. MS.NET don't do it, in spite of
5039 what the documentation says. See bug #56157.
5041 2004-03-28 Martin Baulig <martin@ximian.com>
5043 * class.c (mono_class_init): Don't call init_properties() and
5044 init_events() for generic instances; set `prop->parent' when
5045 inflating properties.
5047 * reflection.c (mono_generic_inst_get_object): Call
5048 `mono_class_init (ginst->klass)'.
5049 (mono_type_get_object): Only create a MonoGenericInst if your
5050 generic type is a TypeBuilder.
5051 (do_mono_reflection_bind_generic_parameters): Only set
5052 `ginst->is_dynamic' if our generic type is a TypeBuilder.
5054 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
5056 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
5059 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5061 * icall.c: added Kill_internal icall.
5062 * process.[ch]: added Kill_internal icall.
5064 2004-03-25 Martin Baulig <martin@ximian.com>
5066 * class.h (MonoStats): Added `generic_instance_count',
5067 `inflated_method_count', `inflated_type_count' and
5068 `generics_metadata_size'.
5070 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5072 * reflection.c: no warnings now.
5074 2004-03-25 Martin Baulig <martin@ximian.com>
5076 * class.c (mono_class_get_full): New public function; does a
5077 mono_class_get(), but also takes a `MonoGenericContext *'.
5079 * loader.c (mono_field_from_memberref): Renamed to
5080 `field_from_memberref', made static and added `MonoGenericContext *'
5082 (mono_field_from_token): Added `MonoGenericInst *' argument.
5083 (method_from_memberef): Likewise.
5084 (mono_get_method_from_token): Likewise.
5085 (mono_get_method_full): New public function; does a
5086 mono_get_method(), but also takes a `MonoGenericContext *'.
5088 * verify.c (mono_method_verify): Get the method's generic context
5089 and pass it to mono_field_from_token(), mono_get_method_full() and
5090 mono_class_get_full().
5092 2004-03-25 Martin Baulig <martin@ximian.com>
5094 * class.c (mono_class_inflate_generic_type): Take a
5095 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
5096 `MonoGenericMethod *'.
5098 2004-03-25 Martin Baulig <martin@ximian.com>
5100 * loader.h (MonoMethodInflated): Store the MonoGenericContext
5101 instead of the MonoGenericMethod here.
5103 2004-03-25 Martin Baulig <martin@ximian.com>
5105 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
5106 each time we create a new MonoGenericInst, we also create a new
5107 context which points back to us.
5109 * class.c (inflate_method): Use `ginst->context' instead of
5110 creating a new context.
5112 * loader.c (method_from_memberref): Use
5113 `klass->generic_inst->context' instead of creating a new context.
5115 2004-03-25 Martin Baulig <martin@ximian.com>
5117 * class.h (MonoGenericContext): New struct.
5118 (MonoGenericMethod): Removed `generic_inst'.
5120 * class.c (mono_class_inflate_generic_method): Take a
5121 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
5123 2004-03-25 Martin Baulig <martin@ximian.com>
5125 * loader.h (MonoMethodInflated): New typedef.
5127 * metadata.h (MonoMethodSignature): Removed `gen_method', make
5128 `generic_param_count' consume just 30 bits, added `is_inflated'
5129 and `has_type_parameters' flags (one bit each).
5131 * class.c (mono_class_inflate_generic_method): Create a
5132 MonoMethodInflated instead of a MonoMethodNormal and set
5133 `is_inflated' in the method signature.
5135 * class.h (MonoGenericMethod): Removed `generic_method'.
5137 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
5139 * image.c: Make sure the name of a MonoImage is always an absolute path.
5140 This fixes bug #54415.
5142 2004-03-24 Martin Baulig <martin@ximian.com>
5144 * class.c (mono_class_setup_vtable): If we're a generic instance,
5145 use our generic type's vtable size.
5147 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
5149 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
5150 MONO_NO_UNLOAD env var as a temporary workaround for unloading
5153 2004-03-23 Martin Baulig <martin@ximian.com>
5155 * class.h (MonoDynamicGenericInst): Added `int count_events' and
5156 `MonoEvent *events'.
5158 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
5159 (typebuilder_icalls): Added "get_event_info"; calls
5160 mono_reflection_event_builder_get_event_info().
5162 * reflection.c (mono_reflection_generic_inst_initialize): Added
5163 `MonoArray *events'.
5164 (mono_reflection_event_builder_get_event_info): New function.
5166 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
5168 * object.h: add mono_type_initialization_init
5170 * object.c (mono_runtime_class_init):
5171 implement class constructor synchronization rules
5172 to cope with threading issues.
5173 add mono_type_initialization_init
5175 * appdomain.c (mono_runtime_init): call
5176 mono_type_initialization_init
5178 * class.h: removing initializing field from MonoVTable
5180 2004-03-23 Martin Baulig <martin@ximian.com>
5182 * class.c (my_mono_class_from_generic_parameter): Use
5183 `param->name' if it's not NULL.
5185 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
5187 * class.c: do not insert non-virtual methods in the vtable.
5188 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
5189 that means the method is non-virtual. This never would have
5192 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
5194 * profiler.c: Added lock for accessing coverage_hash.
5196 2004-03-22 Martin Baulig <martin@ximian.com>
5198 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
5199 `method->method->signature->generic_param_count != 0' to make it
5200 work for interface methods.
5202 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5204 * process.c: quote the string passed to the shell using g_shell_quote.
5206 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5209 (mono_threads_manage): don't remove the finalizer thread and self
5210 from the threads hash table so that mono_thread_manage can be called
5213 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5215 * process.c: quote the arguments when UseShellExecute is true. Fixes
5218 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5220 * threads.c: set mono_thread_detach as a cleanup routine for every
5221 thread. This way it's always executed upon thread termination, either
5222 aborted or finished normally. No more xsp hangs!
5224 2004-03-17 Martin Baulig <martin@ximian.com>
5226 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
5227 `int count_nested' and a `MonoType **nested'.
5229 * reflection.c (mono_reflection_bind_generic_parameters): Moved
5230 most of the functionality into a new static
5231 do_mono_reflection_bind_generic_parameters() and don't take a
5232 `MonoType *nested_in' argument any more. Don't compute nested
5234 (mono_reflection_generic_inst_get_nested_types): New public method
5235 to get nested types.
5237 * class.c (mono_class_create_generic): Set `klass->nested_in' if
5238 we're a nested class.
5240 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
5241 mono_reflection_generic_inst_get_nested_types() to compute the
5244 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
5246 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
5247 descriptive error message under windows.
5249 2004-03-17 Martin Baulig <martin@ximian.com>
5251 * class.c (dup_type): Added `const MonoType *original' argument;
5252 copy the attrs from the original type.
5254 2004-03-17 Martin Baulig <martin@ximian.com>
5256 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
5257 `m->generic_inst_cache' here.
5259 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
5261 * exception.h exception.c: Add stack_overflow_exception.
5263 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5266 (overlapped_callback): call SetEvent *after* invoking the callback.
5267 No need to call CloseHandle.
5269 2004-03-16 Martin Baulig <martin@ximian.com>
5271 * reflection.c (mono_image_get_fieldref_token): Take a
5272 `MonoReflectionField *' instead of a `MonoClassField *' and a
5273 `MonoClass *'; store the `MonoReflectionField *' in the hash.
5275 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5277 * appdomain.c: don't add the culture to the filename we're looking for
5278 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
5280 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5282 * locales.c: don't ignore symbols when doing case insensitive compares.
5283 Thanks Dick! Fixes bug #54046.
5285 * threads.c: surround 'threads' usage with enter/leave in
5288 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
5290 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
5291 implicitly marshalled as [Out]. Fixes #55450.
5293 (mono_marshal_get_runtime_invoke): Zero out the result if there is
5296 2004-03-16 Martin Baulig <martin@ximian.com>
5298 * class.c (mono_class_from_generic_parameter): Use the actual
5301 2004-03-16 Martin Baulig <martin@ximian.com>
5303 * reflection.c (type_get_signature_size): New static function.
5304 Compues the size of the type in a method signature.
5305 (method_get_signature_size): New static function; calls
5306 type_get_signature_size() to compute the actual size of the
5308 (method_encode_signature): Use method_get_signature_size() to get
5309 the signature's size rather than using `nparams * 10'.
5311 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5313 * file-io.h: define here WapiOverlapped on windows. I don't want the
5314 regular OVERLAPPED one.
5317 * threadpool.c: somehow, BindIoCompletionCallback is not found.
5318 Disabling AIO on windows.
5320 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5322 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
5325 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5327 * appdomain.c: upgraded corlib version.
5329 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
5330 and BeginWrite. Allow opening files for asynchrnous operations.
5332 * file-io.h: new struct that maps FileStreamAsyncResult.
5333 * icall.c: added new icalls.
5334 * process.[ch]: support setting child process environment variables
5335 and use the SHELL or COMSPEC when UseShellExecute is true.
5337 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
5338 callback for async. IO is here and also BindHandle.
5340 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
5343 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
5345 * reflection.c (create_custom_attr): Allow len == 0.
5347 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
5348 computation on big-endian machines.
5350 2004-03-13 Martin Baulig <martin@ximian.com>
5352 * class.h (MonoGenericInst): Added `int count_ifaces'.
5354 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
5355 `ginst->count_ifaces' instead `klass->interface_count' since we
5356 may get called before the vtable is created.
5358 * loader.c (mono_method_get_param_names): If we're a generic
5359 instance, return and don't initialize the class.
5361 * reflection.c (mono_reflection_setup_generic_class): Don't call
5362 ensure_runtime_vtable().
5363 (mono_reflection_bind_generic_parameters): Set
5364 `ginst->count_ifaces'.
5366 2004-03-11 Jackson Harper <jackson@ximian.com>
5370 * unicode.h: Remove unused System.Char icalls.
5372 2004-03-11 Miguel de Icaza <miguel@ximian.com>
5374 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
5375 code when we P/Invoke the first library in Windows.Forms, instead
5376 of when we first open the assembly.
5378 * assembly.c: Drop the lookup from here.
5380 2004-03-10 Martin Baulig <martin@ximian.com>
5382 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
5383 class for properties, fields and events. Finally fixes #54945.
5385 2004-03-10 Martin Baulig <martin@ximian.com>
5387 * metadata.c (mono_metadata_class_equal): New static function;
5388 checks whether two generic instances or two generic parameters are
5390 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
5393 2004-03-10 Martin Baulig <martin@ximian.com>
5395 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
5397 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
5398 argument and write it into the `reflection_info' field.
5401 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
5402 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
5404 2004-03-09 Jackson Harper <jackson@ximian.com>
5406 * char-conversions.h: use 8 bits for numeric data its all we need
5407 * icall.c: numeric data is only 8 bits now.
5409 2004-03-09 Martin Baulig <martin@ximian.com>
5411 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
5413 * class.c (init_properties, init_events): Initialize the new
5416 * reflection.c (typebuilder_setup_properties): Likewise.
5417 (typebuilder_setup_events): Likewise.
5419 * reflection.h (MonoEventInfo): Replaced `parent with
5420 `declaring_type' and `reflected_type'.
5422 * icall.c (ves_icall_get_property_info): Distinguish between
5423 declaring and reflected type.
5424 (ves_icall_get_event_info): Likewise.
5426 2004-03-09 Martin Baulig <martin@ximian.com>
5428 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
5429 (ves_icall_Type_GetField): Correctly set field->klass.
5431 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
5433 * loader.h: Fix warning.
5435 2004-03-08 Miguel de Icaza <miguel@ximian.com>
5437 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
5438 library routine if present. Notice that it will still continue
5439 executing even if its missing, for those working on the Gtk#
5440 edition of Windows.Forms.
5442 * assembly.c (do_mono_assembly_open): If loading the
5443 System.Windows.Forms call mono_loader_wini_init.
5445 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
5447 * class.h: Added MonoRemoteClass struct.
5448 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
5449 function for MonoStrings.
5450 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
5451 Added internal call for getting the proxy type.
5452 * marshal.c: Get the type of transparent proxies from its remote_class.
5453 Added methods that generate the IL for type checks and casts:
5454 mono_marshal_get_isinst, mono_marshal_get_castclass,
5455 mono_marshal_get_proxy_cancast.
5456 * marshal.h: Declaration of the previous new methods.
5457 * object.c: Added new moethods for creating and updating MonoRemoteClass
5458 instances: mono_remote_class, mono_upgrade_remote_class,
5459 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
5460 * verify.c: FIx transparent_proxy_fields layout.
5461 * appdomain.c: Bump corlib version.
5463 2004-03-04 Jackson Harper <jackson@ximian.com>
5465 * icall.c: Add icall to access char conversion tables.
5466 * char-conversions.h: Character conversion tables.
5467 * Makefile.am: Add char-conversions.h private header file.
5469 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
5471 * appdomain.c (unload_thread_main): Increase unloading timeout to
5472 10 sec as a temporary workaround for Nant problems.
5474 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
5476 * gc.c: Add checks for GC_enable and GC_disable.
5478 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
5479 (jaak@zd.com.pl). Fix memory corruption in String.Replace
5482 2004-02-27 Martin Baulig <martin@ximian.com>
5484 * reflection.c (mono_reflection_bind_generic_parameters): Take a
5485 `MonoReflectionType *' instead of a `MonoType *'.
5487 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
5489 * gc.c (run_finalize): Avoid finalizing the object representing the
5491 (finalizer_thread): Fix warning.
5493 2004-02-25 Martin Baulig <martin@ximian.com>
5495 * class.c (_mono_class_get_instantiation_name): Added `int offset'
5496 argument for nested types.
5497 (mono_class_create_generic): Added support for nested generictypes.
5499 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
5502 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
5504 * reflection.c (method_encode_signature): Increase the minimum
5505 value of `size' from 10 to 11.
5506 (mono_reflection_bind_generic_parameters): Take `int type_argc'
5507 and `MonoType **types' arguments instead of the `MonoArray
5508 *types'; added `MonoType *nested_in'. Recursively instantiate
5511 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
5513 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
5514 stack_overflow_ex members which are used by exception handling.
5516 * appdomain.c (mono_runtime_init): Initialize the new members.
5518 * gc.c (mono_gc_enable): New helper function.
5519 * gc.c (mono_gc_disable): New helper function.
5521 2004-02-23 Martin Baulig <martin@ximian.com>
5523 * icall.c: I must have been really stupid - make it actually work
5526 2004-02-23 Martin Baulig <martin@ximian.com>
5528 * loader.c (method_from_memberref): Only inflate the method if
5529 it's in another klass.
5531 2004-02-23 Martin Baulig <martin@ximian.com>
5533 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
5534 (mono_class_init): If we're a generic instance and an interface,
5535 compute `class->interface_id'; also create `class->interfaces'
5536 here and inflate them.
5538 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
5540 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
5542 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
5544 2004-02-15 Miguel de Icaza <miguel@ximian.com>
5546 * reflection.c (method_encode_code): Improved the error message
5547 generated by the exception.
5549 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5551 * icall.c: Martin did not do what he said in the ChangeLog for
5552 2004-02-18, but put back the changes for properties and events.
5553 Commenting those changes out again and adding comment to bug #54518.
5555 * process.c: removed warning.
5557 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
5559 * marshal.c (emit_struct_conv): Print an error message instead of
5560 asserting when a type does not have the StructLayout attribute.
5562 2004-02-20 Martin Baulig <martin@ximian.com>
5564 * reflection.c (mono_type_get_object): Also use the cache for
5566 (mono_reflection_bind_generic_parameters): Always compute
5569 2004-02-20 Martin Baulig <martin@ximian.com>
5571 * class.h (MonoGenericMethod): Removed `klass'.
5573 * class.c (mono_class_inflate_generic_method): Added `MonoClass
5576 2004-02-20 Martin Baulig <martin@ximian.com>
5578 * reflection.c (method_encode_methodspec): Actually use the
5579 uninflated signature for the memberref.
5581 2004-02-20 Martin Baulig <martin@ximian.com>
5583 * class.h (MonoGenericMethod): Removed `declaring'.
5585 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
5586 is NULL, compute it here.
5588 2004-02-20 Martin Baulig <martin@ximian.com>
5590 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
5592 * metadata.c (mono_metadata_generic_inst_hash): New method.
5593 (mono_metadata_generic_inst_equal): New method.
5595 * reflection.c (mono_reflection_bind_generic_parameters): Use the
5596 `klass->image->generic_inst_cache' cache to avoid creating
5597 duplicate MonoGenericInst's.
5599 * class.c (mono_class_inflate_generic_type): Use the cache.
5601 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
5603 * object.c: fixed gc descriptor calculation for embedded valuetypes.
5605 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5607 * icall.c: added Socket.WSAIoctl icall.
5609 * socket-io.[ch]: implemented
5610 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
5612 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
5614 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
5616 2004-02-18 Urs C Muff <umuff@quark.com>
5618 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
5619 this work on PPC and other big-endian architectures.
5621 * debug-mono-symfile.h: Prepended the names of all the `guint32'
5622 fields with an underscore to make sure they're only accessed by
5625 2004-02-18 Martin Baulig <martin@ximian.com>
5627 * icall.c: Put the klass->refclass changes back for methods and
5628 fields, but not for properties and events. We're currently not
5629 distinguishing between DeclaringType and ReflectedType for
5630 properties and events, that's what caused the regressions.
5632 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5635 (mono_async_result_new): the handle can be NULL.
5637 * threadpool.c: Use an event instead of a semaphore, don't initialize
5638 it until needed. This saves quite a few semaphores from being created
5639 when using the threadpool.
5641 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
5643 * object.c (mono_string_is_interned_lookup): Fix interning of long
5644 strings. Fixes #54473.
5646 * domain.c (ldstr_equal): Optimize if the two strings are equal.
5648 * icall.c: Revert the klass->refclass changes since they introduce
5649 regressions (bug #54518).
5651 2004-02-18 Martin Baulig <martin@ximian.com>
5653 * class.c (mono_class_init): If we're a generic instance and don't
5654 come from a TypeBuilder, inflate our members here.
5655 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
5656 (mono_class_create_generic): New public method.
5657 (mono_class_initialize_generic): Removed.
5658 (get_instantiation_name): Renamed to
5659 _mono_class_get_instantiation_name() and made it public.
5661 2004-02-18 Martin Baulig <martin@ximian.com>
5663 * class.c (mono_class_inflate_generic_type): Clear the new
5664 instance's `nginst->klass' when inflating a generic instance.
5665 (mono_class_is_subclass_of): Added (basic) support for generic
5668 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
5670 * appdomain.h, domain.c: use a MonoCodeManager instead of a
5671 MonoMempool to hold compiled native code.
5673 2004-02-17 Martin Baulig <martin@ximian.com>
5675 * class.h (MonoDynamicGenericInst): Added `count_properties' and
5678 * reflection.c (mono_reflection_generic_inst_initialize): Added
5679 `MonoArray *properties' argument.
5681 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
5683 2004-02-17 Martin Baulig <martin@ximian.com>
5685 * icall.c (ves_icall_Type_GetFields): Renamed to
5686 ves_icall_Type_GetFields_internal() and added a
5687 `MonoReflectionType *rtype' argument; pass it to
5688 mono_field_get_object() to set the field's "reflected" type.
5689 (ves_icall_Type_GetConstructors): Likewise.
5690 (ves_icall_Type_GetEvents): Likewise.
5691 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
5692 argument; pass it to mono_method_get_object() to set the method's
5695 2004-02-17 Martin Baulig <martin@ximian.com>
5697 * class.h (MonoDynamicGenericInst): New type.
5698 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
5700 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
5701 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
5702 (ves_icall_MonoGenericInst_GetFields): New interncall.
5704 * class.c (mono_class_from_generic): Don't call
5705 mono_class_initialize_generic() if this is a dynamic instance;
5706 ie. it's being created from a TypeBuilder.
5707 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
5708 `class->byval_arg.type'.
5710 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
5711 to `inflate_method' and made static.
5712 (mono_reflection_inflate_field): Removed.
5713 (mono_reflection_generic_inst_initialize): New public method.
5715 * reflection.h (MonoReflectionGenericInst): Removed `methods',
5716 `ctors' and `fields'; added `initialized'.
5718 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
5720 * debug-helpers.c (mono_method_full_name): Fix output for empty
5723 2004-02-12 Martin Baulig <martin@ximian.com>
5725 * class.h (MonoClassField): Added `MonoType *generic_type'.
5727 * reflection.c (mono_image_get_fieldref_token): Added support for
5728 instantiated generic types.
5729 (field_encode_inflated_field): Removed.
5730 (mono_image_get_inflated_field_token): Removed.
5731 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
5733 * reflection.h (MonoReflectionInflatedField): Removed.
5735 2004-02-12 Martin Baulig <martin@ximian.com>
5737 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
5738 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
5740 * reflection.c (mono_image_get_methodspec_token): Take a
5741 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
5742 (mono_image_create_token): Check whether we have a
5743 `method->signature->gen_method' and call
5744 mono_image_get_methodspec_token() if appropriate.
5745 (inflated_method_get_object): Removed.
5746 (mono_reflection_bind_generic_method_parameters): Return a
5747 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
5748 (mono_reflection_inflate_method_or_ctor): Likewise.
5750 * reflection.h (MonoReflectionInflatedMethod): Removed.
5752 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
5754 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
5755 for custom valuetype marshalling.
5757 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
5759 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5761 * icall.c: fixed WSAGetLastError_internal name.
5763 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
5765 * threads.c (mono_thread_attach): Allow this to be called multiple
5768 * threads.c (build_wait_tids): Do not wait for ourselves.
5770 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
5771 appdomain list is empty.
5773 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
5774 memory returned by mono_string_builder_to_utf16, since it points into
5775 managed memory. Thanks to Bernie Solomon for noticing this.
5777 * icall.c: Add AppDomainSetup icalls.
5779 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
5781 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
5784 * reflection.c (reflection_methodbuilder_to_mono_method): Save
5785 custom attributes to the method_aux struct. Also fix array indexes etc.
5787 * loader.c (mono_method_get_param_names): Make dynamic case work again.
5789 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
5791 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
5792 (both static and runtime) and reduce startup time.
5794 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
5796 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
5797 AsAny marshalling conversion instead of crashing.
5799 * marshal.c: Fix warnings.
5801 2004-02-09 Martin Baulig <martin@ximian.com>
5803 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
5805 * reflection.h (MonoReflectionInflatedMethod): Removed the
5806 `declaring' field, it's now in the unmanaged MonoGenericMethod.
5808 * reflection.c (method_encode_methodspec): Removed the `method'
5809 argument; we get it from `gmethod->declaring'.
5810 (inflated_method_get_object): Removed the `declaring' argument.
5812 2004-02-09 Martin Baulig <martin@ximian.com>
5814 * class.h (MonoGenericMethod): New type.
5815 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
5818 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
5819 a `MonoGenericMethod *gen_method' one.
5821 * class.c (mono_class_inflate_generic_type): Take an additional
5822 `MonoGenericMethod * argument. This is only non-NULL if we're
5823 inflating types for a generic method.
5824 (mono_class_inflate_generic_signature): Renamed to
5825 inflate_generic_signature() and made static; take a
5826 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
5827 (inflate_generic_header): Take a `MonoGenericMethod *' argument
5828 instead of a `MonoGenericInst *' one.
5829 (mono_class_inflate_generic_method): Likewise.
5831 * reflection.c (encode_generic_method_sig): Take a
5832 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
5833 (method_encode_methodspec): Likewise.
5834 (inflated_method_get_object): Likewise.
5836 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
5837 field with a `MonoGenericMethod *gmethod' one.
5839 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
5841 * class.h (mono_class_has_parent): add parens to expansion
5844 2004-02-08 Martin Baulig <martin@ximian.com>
5846 * image.h (MonoImage): Removed `generics_cache'.
5848 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
5849 instead of a `MonoType *' argument; removed the `inflate_methods'
5850 argument. Don't inflate methods here.
5852 * loader.c (find_method): If it's a generic instance, call
5853 mono_class_init() on the `sclass->generic_inst->generic_type'.
5855 * metadata.c (mono_type_size): Make this work on uninitialized
5856 generic instances; call it on the `ginst->generic_type's class.
5858 * reflection.c (mono_reflection_bind_generic_parameters): Call
5859 mono_class_from_generic() to create the `ginst->klass'.
5861 2004-02-08 Martin Baulig <martin@ximian.com>
5863 * class.h (MonoClass): Changed type of `generic_inst' from
5864 `MonoType *' to `MonoGenericInst *'.
5866 2004-02-08 Martin Baulig <martin@ximian.com>
5868 * icall.c (ves_icall_Type_BindGenericParameters): Just call
5869 mono_type_get_object(), this is now creating a `MonoGenericInst'
5870 for MONO_TYPE_GENERICINST.
5871 (ves_icall_MonoGenericInst_GetParentType): Likewise.
5872 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
5874 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
5875 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
5876 (inflated_method_get_object): Added `MonoClass *refclass' argument.
5877 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
5880 * reflection.h (MonoReflectionInflatedMethod): Removed
5881 `declaring_type' and `reflected_type'.
5883 2004-02-08 Martin Baulig <martin@ximian.com>
5885 * class.h (MonoGenericInst): Added `MonoType *parent' and
5886 `MonoType **ifaces'.
5888 * reflection.h (MonoReflectionGenericInst): Removed `klass',
5889 `parent' and `interfaces'.
5891 * reflection.c (mono_reflection_bind_generic_parameters): Take a
5892 `MonoType *' argument and return a `MonoType *'.
5895 (ves_icall_MonoGenericInst_GetParentType): New interncall.
5896 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
5898 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
5900 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
5901 valuetype marshalling.
5903 2004-02-06 Martin Baulig <martin@ximian.com>
5906 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
5907 (my_mono_class_from_generic_parameter): Likewise.
5909 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
5911 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
5912 contents of the symbol files lazily.
5914 * object.h (MonoThread): Add 'name' and 'name_len' fields.
5916 * threads.h threads.c icall.c: New icalls for getting and setting the
5919 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
5921 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
5922 Raise an exception when the domain is not found.
5924 2004-02-03 Martin Baulig <martin@ximian.com>
5926 * reflection.c (mono_image_get_methodspec_token): Use the
5927 uninflated signature; fixes gen-33.
5929 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
5931 * gc.c threads.c: Make the finalizer thread a normal managed thread so
5932 the finalizer code can use thread functionality.
5934 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
5935 the finalizer thread.
5937 * threads.c: Make some functions more robust.
5939 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
5941 * metadata.h: Add new marshalling conventions.
5943 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
5944 stringbuilder marshalling. Fixes #53700.
5946 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
5948 * reflection.c (mono_image_get_type_info): Save declarative security
5951 * reflection.c (mono_image_get_field_info): Handle uninitialized
5952 unmanaged fields as well.
5954 * appdomain.c: Bump corlib version.
5956 2004-02-01 Martin Baulig <martin@ximian.com>
5958 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
5959 method type arguments.
5961 2004-01-30 Duncan Mak <duncan@ximian.com>
5963 * marshal.h: Add prototype for
5964 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
5966 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
5969 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
5971 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
5972 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
5974 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
5976 * marshal.c (mono_marshal_get_native_wrapper): Add support for
5977 custom marshalling of valuetypes.
5979 * marshal.c: Fix some warnings.
5981 2004-01-29 Martin Baulig <martin@ximian.com>
5983 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
5984 for generic method parameters.
5986 * reflection.c (method_encode_methodspec): Write the uninflated
5987 signature into the methodspec table.
5988 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
5989 is always the uninflated method.
5990 (reflection_methodbuilder_to_mono_method): Copy the generic
5991 parameters from the MethodBuilder into `header->gen_params'.
5993 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
5995 * class.c (mono_class_from_generic_parameter): Fix warning.
5997 2004-01-27 Martin Baulig <martin@ximian.com>
5999 * class.c (mono_class_from_generic_parameter): Don't create
6000 `klass->methods' here.
6002 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
6004 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
6005 extension since it does not work with libraries named lib<FOO>.dll.so.
6007 2004-01-25 Martin Baulig <martin@ximian.com>
6009 * class.c (mono_class_inflate_generic_type): Added support for
6010 MONO_TYPE_GENERICINST.
6012 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
6013 inflate methods on open constructed types.
6015 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6017 * object.c: fire ProcessExit event in the root AppDomain after running
6018 Main. Fixes bug #53299.
6020 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
6022 * socket-io.c: include the new socket-wrappers.h header.
6023 Use the wrappers instead of the unix socket functions to make the code
6026 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
6028 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
6030 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
6033 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
6035 * reflection.c (mono_image_create_pefile): Handle the case when the
6036 entry point is not a MethodBuilder.
6038 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
6039 field to ReflectionMethod since it is not allways a builder.
6041 * reflection.c (type_get_fully_qualified_name): New helper function to
6042 return the fully qualified name of a type.
6044 * reflection.c (encode_marshal_blob): Always emit the fully qualified
6045 type name for custom marshallers.
6047 * reflection.c (mono_marshal_spec_from_builder): Ditto.
6049 * class.c (mono_class_setup_vtable): If a parent class already
6050 implements an interface, use the implementing methods from that class.
6053 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6055 * threadpool.c: just return instead of ExitThread to allow for thread
6058 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
6060 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
6061 when closing resource modules.
6063 * reflection.c (mono_image_create_pefile): Handle the case when the
6064 entry point is not a MethodBuilder.
6066 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
6067 field to ReflectionMethod since it is not allways a builder.
6069 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
6071 * marshal.c (mono_marshal_get_managed_wrapper):
6072 mono_marshal_alloc takes native int so CONV_I
6075 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
6077 * reflection.c (fixup_cattrs): New function to fixup the methoddef
6078 tokens in the cattr table. Fixes #53108.
6080 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6082 * loader.c: don't trim ".dll" before looking up in the config file.
6083 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
6085 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
6087 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
6088 Return the module which contains the resource as well.
6089 (ves_icall_System_Reflection_Module_Close): New icall.
6091 * appdomain.c: Bump corlib version number.
6093 * image.c (mono_image_addref): New public function.
6095 * assembly.c: Call mono_image_addref.
6097 * reflection.c (mono_module_get_object): Increase reference count of
6100 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
6103 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
6104 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
6105 proper exceptions on DllImport problems.
6107 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
6109 * class.c, metadata.c: eliminate CSIZE macro.
6111 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
6113 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
6114 * object.h: Added async_callback field in MonoAsyncResult.
6115 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
6116 * verify.c: Added async_callback in MonoAsyncResult layout.
6118 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
6120 * reflection.c (mono_reflection_get_custom_attrs): Add support
6123 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
6125 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
6127 (mono_marshal_method_from_wrapper): Add null pointer check.
6129 2004-01-16 Martin Baulig <martin@ximian.com>
6131 * debug-mono-symfile.h: Set version number to 36 and reflect
6132 latest symbol writer changes.
6134 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
6136 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
6137 multi-dimensional arrays.
6138 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
6139 (mono_class_from_mono_type): Use bounded_array_class_get.
6141 * class.c (mono_bounded_array_class_get): New function which takes
6142 a 'bounded' bool argument to distinguish vectors from one dimensional
6145 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
6146 bounded_array_class_get if the array has bounds.
6148 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
6149 Search modules loaded using AssemblyBuilder:AddModule as well.
6151 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6153 * appdomain.c: increased corlib version.
6154 * filewatcher.c: removed g_print.
6156 (get_property_info): only allocate what is actually requested.
6157 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
6159 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6161 * Makefile.am: added filewatcher.[ch]
6162 * filewatcher.[ch]: FileSystemWatcher runtime support.
6163 * icall.c: added new FSW icalls.
6165 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
6167 * string-icalls.c: fix stringbuilder regression as suggested by
6168 Iain McCoy <iain@mccoy.id.au>.
6170 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
6172 * process.c (process_read_stringtable_block): Recognize '007f' as
6173 a language neutral stringtable block.
6175 2004-01-12 Patrik Torstensson
6177 * object.h (MonoStringBuilder) : Changed layout to support our
6178 new stringbuilder class.
6179 * marshal.c: Change marshalling to support the new layout of
6181 * appdomain.c: increased version number because new layout of
6184 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
6186 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
6187 assembly name as an string instead of an AssemblyName, since it is
6188 easier to extract info from it.
6190 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
6191 the culture subdirectories too. Fixes #52231.
6193 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6195 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
6196 It takes 2 new parameters with an optional name for the method to look
6197 for and case ignoring info.
6199 * threadpool.c: removed unused variable.
6201 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6203 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
6204 It takes 2 new parameters with an optional name for the property to look
6205 for and case ignoring info.
6208 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
6210 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
6213 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6216 * assembly.c: escape the uri before passing it to g_filename_from_uri.
6219 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
6221 * reflection.c: Add support for more than one unmanaged resource.
6223 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
6224 in field->def_value, as done in all other cases.
6226 * reflection.c (mono_reflection_get_custom_attrs): Add support for
6229 * reflection.c (mono_reflection_create_runtime_class): Remove
6230 errorneous assignment to klass->element_class, since it is already
6231 done in mono_reflection_setup_internal_class.
6233 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6235 * gc.c: added missing LeaveCriticalSection.
6236 * icall.c: indented a couple of lines.
6237 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
6238 if we call EndInvoke inside a callback. Fixes bug #52601.
6240 2004-01-07 Martin Baulig <martin@ximian.com>
6242 * mono-debug-debugger.h
6243 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
6245 2004-01-06 Miguel de Icaza <miguel@ximian.com>
6247 * appdomain.c: Use messages in NotImplementedException.
6249 * exception.c (mono_get_exception_not_implemented): Now this takes
6252 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
6253 exception instead of g_asserting an aborting when something is not
6256 Add some inline docs.
6258 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
6260 * reflection.h: Update after changes to object layout.
6262 * reflection.c: Implement saving of unmanaged aka win32 resources.
6264 * appdomain.c: Bump version number.
6266 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
6267 Handle missing domains gracefully.
6269 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
6271 * file-io.c : On Windows, there are much more invalid_path_chars.
6273 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
6275 * class.h, object.c: prepare for GetType () speedup.
6277 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
6279 * profiler.c: workaround for --profile null reference exception on
6280 cygwin. Patch by Patrik Torstensson.
6282 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
6284 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
6285 make work for unaligned access.
6287 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
6289 * class.c: small cleanup (class->fields [i] -> field).
6290 * image.c: check address of metadata is valid.
6292 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
6294 * assembly.h assembly.c (mono_assembly_loaded): New public function to
6295 search the list of loaded assemblies.
6297 * reflection.c (mono_reflection_type_from_name): Use
6298 mono_assembly_loaded instead of mono_image_loaded.
6300 * reflection.c: Fix warnings.
6302 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
6304 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
6305 is dynamic. This is needed since an assembly can contain both dynamic and
6308 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
6311 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
6313 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
6314 to store modules loaded using AddModule.
6316 * reflection.c (mono_image_fill_file_table): Generalize this so it works
6319 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
6321 * reflection.c (mono_image_fill_export_table_from_module): New function to
6322 fill out the EXPORTEDTYPES table from a module.
6324 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
6325 into a separate function. Also handle loaded non-dynamic modules.
6327 * reflection.c (mono_image_basic_init): Fix memory allocation.
6329 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6331 * assembly.c (mono_assembly_load_references): Make this public.
6333 2003-12-19 Martin Baulig <martin@ximian.com>
6335 * class.c (mono_class_initialize_generic): Made this static, take
6336 a `MonoGenericInst *' instead of a `MonoClass *'.
6337 (mono_class_from_generic): Call mono_class_initialize_generic()
6338 unless we're already initialized or being called from
6339 do_mono_metadata_parse_generic_inst().
6341 * class.h (MonoGenericInst): Added `initialized' and
6342 `init_pending' flags.
6344 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
6345 `mono_class_init (gklass)' or mono_class_initialize_generic()
6346 here; set `generic_inst->init_pending' while parsing the
6349 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
6351 * locales.c: include string.h for memxxx prototypes
6353 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
6355 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
6356 constructor when accessing literal fields.
6358 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
6360 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6362 * reflection.c (assembly_add_resource_manifest): New function to fill
6363 the MANIFESTRESOURCE table.
6365 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
6367 * reflection.h: Update to changes in class layout.
6369 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
6370 Reenable call to mono_runtime_is_shutting_down ().
6372 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
6373 determine if the runtime is shutting down.
6375 2003-12-16 Jackson Harper <jackson@ximian.com>
6377 * icall.c: comment out call to mono_runtime_is_shutting_down to
6380 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
6382 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
6383 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
6385 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
6387 * reflection.c: move definition of swap_with_size
6388 to before its first call
6390 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
6392 * appdomain.c (mono_runtime_is_shutting_down): New public function.
6394 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
6397 * object.c: Fix warnings.
6399 * icall.c (ves_icall_Type_Get...): Only consider inherited static
6400 members if FlattenHierarchy is set.
6402 * reflection.c (mono_image_add_decl_security): New function to emit
6403 declarative security.
6405 * reflection.h reflection.c: Add support for declarative security.
6407 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
6409 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
6411 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
6413 * appdomain.c verify.c: Moved corlib version checking into its own
6414 function in appdomain.c since it needs to create vtables etc.
6416 2003-12-13 Patrik Torstensson <p@rxc.se>
6418 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
6419 instead of unwrapped server.
6421 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
6423 * verify.c (check_corlib): Fix field index.
6425 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
6427 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
6430 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
6432 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
6433 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
6434 cope with sizeof(size_t) != sizeof(guint32).
6436 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6438 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
6441 2003-12-10 Mark Crichton <crichton@gimp.org>
6443 * icall.c: removed the GetNonZeroBytes. We now handle this case
6446 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
6448 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
6450 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
6453 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
6455 * verify.c (check_corlib): Handle the case when the version field is
6456 initialized by a static constructor.
6458 2003-12-08 Patrik Torstensson <p@rxc.se>
6460 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
6462 2003-12-08 Martin Baulig <martin@ximian.com>
6464 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
6465 a MonoReflectionGenericParameter, also take the parameter index
6466 and name as arguments.
6467 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
6468 (ves_icall_MonoGenericParam_initialize): New interncall.
6469 (ves_icall_Type_make_byref_type): New interncall.
6471 * reflection.h (MonoReflectionGenericParam): Derive from
6472 MonoReflectionType, not just from MonoObject. Added `refobj' and
6475 * reflection.c (mono_reflection_define_generic_parameter): Create
6476 and return a new MonoReflectionGenericParam; don't initialize the
6478 (mono_reflection_initialize_generic_parameter): New public method;
6479 initializes the constraints and creates the `param->pklass'.
6481 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
6483 * reflection.h reflection.c: Use the new fields 'num_types',
6484 'num_fields' and 'num_methods' to track the number of types etc.
6486 * verify.c (check_corlib): Check corlib version number.
6488 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
6490 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
6491 function works on all methods.
6493 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
6495 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
6496 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
6497 the custom_type_info flag of the transparent proxy.
6498 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
6499 objects that supports IRemotingTypeInfo.
6500 * object.h: Added custom_type_info field in transparent proxy.
6502 2003-12-06 Martin Baulig <martin@ximian.com>
6504 * class.c (mono_class_create_from_generic): Removed.
6505 (mono_class_from_generic): Check `ginst->klass' before doing
6506 anything else. This is important to fully support "recursive"
6509 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
6510 empty `generic_inst->klass' before doing anything else.
6512 2003-12-06 Dick Porter <dick@ximian.com>
6517 * locales.c: Use C structs to access class fields. Don't do a
6518 conversion between MonoString and UChar because both are
6519 platform-endian UTF-16. Compare now takes startindex and count
6520 parameters. Add a char overload for IndexOf. Speed up the
6521 invariant string IndexOf.
6523 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
6525 * Makefile.am (monosn_LDADD): Fix parallel build.
6527 2003-12-04 Martin Baulig <martin@ximian.com>
6530 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
6531 (ves_icall_Type_make_array_type): New interncall.
6533 2003-12-04 Martin Baulig <martin@ximian.com>
6535 * locales.c: also change it in the !HAVE_ICU case.
6537 2003-12-04 Dick Porter <dick@ximian.com>
6540 * locales.c: construct_compareinfo is now in CompareInfo, not
6543 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
6545 * image.c (mono_image_load_file_for_image): Cache loaded images in the
6548 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
6551 * assembly.c (mono_assembly_load_references): Only load references
6554 * class.c (mono_class_from_name): Avoid linear search of the
6557 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
6559 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
6561 * image.h (MonoImage): Add 'field_cache' field.
6563 * loader.c (mono_field_from_token): Cache field lookups.
6565 * reflection.c (mono_module_get_object): Fix name property.
6567 * icall.c (ves_icall_get_enum_info): Update after changes to
6568 mono_metadata_get_constant_index ().
6570 * icall.c: Get rid of get_type_info icall, use a separate icall for
6571 each type property to avoid needless memory allocations. Fixes #51514.
6573 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
6574 to avoid needless binary searches.
6576 * class.c (class_compute_field_layout): Move the initialization of
6577 field->def_value to mono_class_vtable ().
6579 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
6582 * object.c (mono_object_allocate): Make it inline.
6584 * object.c (mono_object_allocate_spec): Make it inline.
6586 2003-12-02 Dick Porter <dick@ximian.com>
6588 * locales.c (create_NumberFormat): NumberFormatInfo construction.
6589 Patch by Mohammad DAMT (mdamt@cdl2000.com).
6591 2003-12-01 Dick Porter <dick@ximian.com>
6593 * threads.c: Fix signature and call in CreateMutex and
6596 2003-12-01 Dick Porter <dick@ximian.com>
6599 * locales.c: Implement string compares and searching
6601 * object.h: Add extra Thread field
6603 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
6605 * reflection.c (fixup_method): Add support for MonoCMethod.
6607 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
6609 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
6611 * reflection.c (assembly_name_to_aname): Allow extra characters in
6612 assembly names. Fixes #51468.
6614 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
6616 * exception.c (mono_exception_from_name_domain): New helper function.
6618 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
6619 exception object in the correct domain.
6621 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
6622 formatting + make a copy a the input data.
6624 * loader.c (mono_get_method_from_token): Methods which contain
6625 native code do not have entries in the ImplMap.
6627 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
6628 Thanks to Gonzalo for spotting this.
6630 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
6631 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
6633 * assembly.h (mono_assembly_load_from): Split the second part of
6634 assembly loading into a new public function.
6636 * exception.h (mono_get_exception_bad_image_format): New function.
6638 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
6640 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
6641 Enumerate all modules inside a dynamic assembly. Fixes #51293.
6643 * icall.c: Add new icall for creating dynamic methods.
6645 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
6647 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
6649 * reflection.c (mono_reflection_create_dynamic_method): New icall to
6650 create a dynamic method.
6652 * reflection.c (resolve_object): New helper function.
6654 * reflection.c: Generalize ReflectionMethodBuilder and the functions
6655 which manipulate it so they can also work on dynamic methods.
6657 * reflection.c (reflection_method_builder_to_mono_method): Avoid
6658 creating the MonoReflectionMethodAux structure if it is not needed.
6660 * reflection.h verify.c: Update after changes to object layout.
6662 * reflection.c (method_builder_encode_signature): Fix compilation on
6665 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
6667 * appdomain.h: Added support for context static fields. Added static_data
6668 field to MonoAppContext and renamed thread_static_fields to a more
6669 generic special_static_fields in MonoAppDomain, since it can now contain
6670 context static fields.
6671 * domain.c: Updated hashtable name.
6672 * object.c: Replaced field_is_thread_static() for a more generic
6673 field_is_special_static() which also checks for context static attribute.
6674 In mono_class_vtable(), added support for static context fields.
6675 * threads.c: Changed methods that manage thread static fields to more
6676 generic methods so they can be reused both for thread and context static
6678 * threads.h: Declared some new methods.
6680 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
6682 * reflection.h: Update after changes to the managed types.
6684 * reflection.c (encode_custom_modifiers): New helper function.
6686 * reflection.c (method_encode_signature): Emit custom modifiers.
6688 * reflection.c (field_encode_signature): Emit custom modifiers.
6690 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
6692 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
6694 * icall.c (ves_icall_System_ValueType_Equals): New optimized
6697 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
6700 * object.c (mono_field_get_value_object): New function.
6702 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
6705 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
6707 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
6708 return a preallocated out-of-memory exception instance.
6710 * object.c (out_of_memory): Use the new function.
6712 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
6713 flag is before the custom modifiers. Fixes #49802.
6715 2003-11-16 Martin Baulig <martin@ximian.com>
6717 * class.c (mono_class_is_open_constructed_type): Implemented the
6718 MONO_TYPE_GENERICINST case.
6720 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
6722 * assembly.c (mono_assembly_fill_assembly_name): New function to
6723 fill out the MonoAssemblyName structure.
6724 (mono_assembly_open): Use the new function.
6726 * icall.c (fill_reflection_assembly_name): New helper function.
6728 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
6731 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
6733 2003-11-15 Martin Baulig <martin@ximian.com>
6735 * class.c (mono_class_is_open_constructed_type): New public
6736 function; checks whether a type is an open constructed type,
6737 ie. whether it still contains type parameters.
6738 (mono_class_inflate_generic_type): If we're a type parameter and
6739 the inflated type is also a MONO_TYPE_(M)VAR, return the original
6742 * class.h (MonoGenericInst): Added `guint32 is_open'.
6744 * loader.c (method_from_methodspec): Check whether we're an open
6745 or closed constructed type and set `ginst->is_open'.
6747 * reflection.c (mono_reflection_bind_generic_parameters): Check
6748 whether we're an open or closed constructed type and set
6750 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
6751 from open constructed types.
6753 2003-11-15 Martin Baulig <martin@ximian.com>
6755 * reflection.c (mono_reflection_bind_generic_parameters): If we're
6756 a generic instance (instead of a generic type declaration) with
6757 unbound generic parameters, bind them to our actual types.
6759 2003-11-14 Martin Baulig <martin@ximian.com>
6761 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
6763 * reflection.c (mono_reflection_bind_generic_parameters): If we're
6764 an interface type, populate `res->interfaces' with instantiated
6765 versions of all the interfaces we inherit.
6767 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
6769 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
6770 when MONO_PATH is set but doesn't contain the install dir.
6772 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6775 (ves_icall_Type_GetInterfaces): don't return an interface twice when
6776 it's also implemented in base classes. Fixes bug #50927.
6778 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
6780 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
6781 if this method is called from a finalizer. Fixes #50913.
6783 2003-11-12 Miguel de Icaza <miguel@ximian.com>
6785 * threads.c: Implement VolatileRead/VolatileWrite
6787 * icall.c: Add new icalls for VolatileRead/VolatileWrite
6789 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
6791 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
6792 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
6795 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
6796 from Peter Ross (pro@missioncriticalit.com).
6798 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
6800 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
6802 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
6804 * assembly.c (mono_assembly_load_references): Disable check because it
6805 triggers on older corlibs which lots of people have.
6807 2003-11-12 Jackson Harper <jackson@ximian.com>
6809 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
6810 load corlib.dll if mscorlib.dll is not found.
6811 * assembly.h: Remove corlib name define.
6814 * image.c: Change corlib name to mscorlib.
6816 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
6818 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
6820 2003-11-11 Miguel de Icaza <miguel@ximian.com>
6822 * appdomain.h: Added loader_optimization here to sync with the C#
6823 code, and add disallow_binding_redirects field.
6825 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
6827 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
6829 * reflection.c (mono_image_build_metadata): Fix crash on modules
6832 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
6834 * icall.c (ves_icall_get_method_info): Return callingConvention as
6837 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
6838 namespaces from the EXPORTEDTYPE table as well.
6840 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
6841 from all modules inside the assembly.
6843 2003-11-11 Martin Baulig <martin@ximian.com>
6845 * reflection.c (mono_reflection_bind_generic_parameters): Make
6846 this work for interfaces.
6848 2003-11-11 Martin Baulig <martin@ximian.com>
6850 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
6852 2003-11-11 Martin Baulig <martin@ximian.com>
6854 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
6855 "MonoInflatedMethod" and "MonoInflatedCtor".
6857 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
6859 * reflection.c (resolution_scope_from_image): Use the assembly table
6860 from the manifest module, since other modules don't have it.
6862 * debug-helpers.c (mono_type_full_name): New helper function.
6864 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
6866 * image.c (mono_image_load_file_for_image): New public function which
6867 is a replacement for the load_file_for_image in class.c.
6869 * assembly.c (mono_assembly_load_module): A wrapper for the function
6870 above which does assembly association and reference loading too.
6872 * class.c (mono_class_from_name): Call mono_assembly_load_module.
6874 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6876 * appdomain.c: not all of the attributes for the full assembly name
6877 are required and the order doesn't matter. Fixes bug #50787.
6879 2003-11-10 Dick Porter <dick@ximian.com>
6881 * locales.c: Use platform-endian UTF16
6883 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
6885 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
6887 2003-11-10 Martin Baulig <martin@ximian.com>
6890 (mono_metadata_load_generic_params): Make this actually work.
6892 * reflection.c (mono_reflection_bind_generic_parameters): If our
6893 parent is a generic instance, pass all the `types' to it, no
6894 matter whether it has the same number of type parameters or not.
6896 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
6898 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
6900 * assembly.c (mono_assembly_load_references): Move the image<->assembly
6901 assignment code to this function so it gets called recursively for all
6904 * image.c (load_modules): Remove the assembly assignment since it is
6905 now done by mono_assembly_load_references.
6907 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
6908 Add 'module' argument.
6909 (mono_module_get_types): New helper function.
6910 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
6912 2003-11-08 Martin Baulig <martin@ximian.com>
6914 * class.c (mono_class_inflate_generic_method): Interface method
6915 don't have a header.
6917 * reflection.c (mono_image_get_methodspec_token): Take an
6918 additional `MonoGenericInst *' argument instead of reading it from
6919 the header; this is necessary to support interfaces.
6920 (mono_image_create_token): Pass the `MonoGenericInst *' from the
6921 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
6922 (inflated_method_get_object): Take an additional `MonoGenericInst *'
6925 * reflection.h (MonoReflectionInflatedMethod): Added
6926 `MonoGenericInst *ginst'.
6928 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
6930 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
6932 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
6934 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
6936 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
6939 (reflection_methodbuilder_from_method_builder):
6940 (reflection_methodbuilder_from_ctor_builder): New helper functions to
6941 initialize a ReflectionMethodBuilder structure.
6942 (mono_image_get_methodbuilder_token):
6943 (mono_image_get_ctorbuilder_token): New functions to emit memberref
6944 tokens which point to types in another module inside the same assembly.
6946 * reflection.c: Use the new helper functions.
6948 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
6950 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
6951 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
6953 * reflection.c (resolution_scope_from_image): Emit a moduleref if
6956 * reflection.c (mono_image_build_metadata): Emit metadata only for the
6957 current module. Emit the manifest only for the main module.
6959 * reflection.c (mono_image_create_token): Add assertion when a
6960 memberref needs to be created.
6962 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
6964 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
6965 larger buffer for the custom attribute blob. Fixes #50637.
6967 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6969 * threadpool.c: notify listener on async processing handles after
6970 invoking the async callback. Thanks to Zoltan.
6972 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
6974 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
6975 avoid code duplication.
6977 * reflection.h (MonoDynamicImage): New type which is currently unused,
6978 but will be used through the ref.emit code in place of
6979 MonoDynamicAssembly.
6981 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
6984 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
6985 a MonoDynamicImage instead of just a MonoImage.
6987 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
6988 icalls to ModuleBuilder but keep their semantics, so they will work
6989 with moduleb->assemblyb. This will change later.
6991 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
6993 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
6996 * reflection.c (mono_image_build_metadata): Avoid creation of a default
6997 main module, since it is now done by the managed code.
6999 2003-11-03 Martin Baulig <martin@ximian.com>
7001 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
7002 `ginst->klass' here.
7003 (method_encode_methodspec): Don't use the `ginst->generic_method's
7004 klass if it's a generic instance, use `ginst->klass' in this case.
7006 2003-11-03 Martin Baulig <martin@ximian.com>
7008 * reflection.c (mono_image_get_generic_method_param_info):
7009 Removed, use mono_image_get_generic_param_info() instead.
7010 (mono_image_get_type_info): Write the GenericParam table before
7011 the Method table. This is neccessary because in the GenericParam
7012 table, type parameters of the class (ie. '!0' etc.) must come
7013 before the ones from its generic methods (ie. '!!0' etc).
7015 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
7017 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
7019 2003-11-02 Martin Baulig <martin@ximian.com>
7021 * reflection.c (create_generic_typespec): Take a
7022 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
7023 the generic parameters from it.
7025 2003-11-02 Martin Baulig <martin@ximian.com>
7027 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
7028 instead of a `MonoClassField *' since we just need the type.
7029 (create_generic_typespec): New static function. Creates a
7030 TypeSpec token for a generic type declaration.
7031 (mono_image_get_generic_field_token): New static function.
7032 (mono_image_create_token): If we're a FieldBuilder in a generic
7033 type declaration, call mono_image_get_generic_field_token() to get
7036 2003-11-02 Martin Baulig <martin@ximian.com>
7039 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
7040 `MonoReflectionGenericInst *declaring_type' and
7041 `MonoReflectionGenericInst *reflected_type' fields.
7043 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
7044 `MonoReflectionGenericInst *declaring_type' and a
7045 `MonoReflectionGenericInst *reflected_type' argument instead of a
7046 single `MonoReflectionGenericInst *type' one. Set
7047 `res->declaring_type' and `res->reflected_type' from them.
7048 (mono_reflection_inflate_field): Likewise.
7050 2003-11-02 Martin Baulig <martin@ximian.com>
7052 * class.c (mono_class_setup_vtable): Don't store generic methods
7055 2003-11-02 Martin Baulig <martin@ximian.com>
7057 * reflection.h (MonoReflectionGenericInst): Added
7058 `MonoReflectionType *declaring_type'.
7060 * reflection.c (mono_reflection_bind_generic_parameters): Use
7061 `if (tb->parent)' instead of `klass->parent'.
7063 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
7065 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
7066 with an empty ASSEMBLY table.
7068 * reflection.c (mono_image_build_metadata): Avoid using the same loop
7069 variable in the inner and outer loops.
7071 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
7073 * metadata.h (mono_metadata_make_token): Put parentheses around macro
7076 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
7078 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
7079 icalls. Instead, do everything in managed code. This is needed since
7080 it is hard to restore the original domain etc. in unmanaged code in the
7081 presence of undeniable exceptions.
7083 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
7084 New icalls to push and pop appdomain refs.
7086 2003-10-31 Martin Baulig <martin@ximian.com>
7088 * class.c (inflate_generic_type): Renamed to
7089 mono_class_inflate_generic_type() and made it public.
7091 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
7094 * loader.c (mono_field_from_memberref): Also set the retklass for
7097 * fielder.c (mono_image_get_inflated_field_token): New static
7098 method; creates a metadata token for an inflated field.
7099 (mono_image_create_token, fixup_method): Added support for
7100 "MonoInflatedField".
7101 (fieldbuilder_to_mono_class_field): New static function.
7102 (mono_reflection_inflate_field): New public function.
7105 (MonoReflectionGenericInst): Added `MonoArray *fields'.
7106 (MonoReflectionInflatedField): New typedef.
7108 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
7110 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
7111 for Solaris and other platforms without s6_addr16
7113 2003-10-30 Martin Baulig <martin@ximian.com>
7115 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
7116 argument instead of two.
7117 (mono_class_inflate_generic_signature): Likewise.
7118 (inflate_generic_header): Likewise.
7119 (mono_class_inflate_generic_method): Likewise. In addition, if
7120 `ginst->klass' is set, it becomes the new `method->klass'.
7122 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
7125 * reflection.c (encode_generic_method_sig): Write a 0xa as the
7127 (method_encode_methodspec): If we have generic parameters, create
7128 a MethodSpec instead of a MethodRef.
7129 (fixup_method): Added support for "MonoInflatedMethod" and
7131 (mono_image_create_token): Added support for "MonoInflatedMethod"
7132 and "MonoInflatedCtor".
7133 (inflated_method_get_object): New static function; returns a
7134 managed "System.Reflection.MonoInflatedMethod" object.
7135 (mono_reflection_bind_generic_method_parameters): Return a
7136 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
7137 (mono_reflection_inflate_method_or_ctor): Likewise.
7138 (mono_image_get_generic_method_param_info): Initialize unused
7140 (mono_image_get_generic_param_info): Likewise.
7142 * reflection.h (MonoReflectionInflatedMethod): New public
7143 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
7144 "S.R.MonoInflatedCtor" classes.
7146 * loader.c (method_from_memberref): If we're a TypeSpec and it
7147 resolves to a generic instance, inflate the method.
7149 2003-10-28 Dick Porter <dick@ximian.com>
7151 * object.c (mono_runtime_run_main): Convert command-line arguments
7152 into utf8, falling back to the user's locale encoding to do so.
7154 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
7156 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
7159 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
7161 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
7162 up icalls at method definition time. Partially fixes #33569.
7164 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
7166 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
7167 marshalling of arrays. Fixes #50116.
7169 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
7171 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
7172 points to a vtable in the dying appdomain.
7174 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
7175 listeners into unmanaged code inside the lock.
7177 * object.c (mono_class_vtable): Turn off typed allocation in non-root
7178 domains and add some comments.
7180 2003-10-25 Martin Baulig <martin@ximian.com>
7182 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
7184 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
7186 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
7187 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
7188 currently parsing. Create the generic class and store it in
7189 `generic_inst->klass' before parsing the type arguments. This is
7190 required to support "recursive" definitions; see mcs/tests/gen-23.cs
7192 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
7193 to support recursive typespec entries.
7195 * class.c (mono_class_setup_parent): If our parent is a generic
7196 instance, we may get called before it has its name set.
7197 (mono_class_from_generic): Splitted into
7198 mono_class_create_from_generic() and mono_class_initialize_generic().
7200 2003-10-25 Martin Baulig <martin@ximian.com>
7202 * icall.c (ves_icall_Type_BindGenericParameters): Return a
7203 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
7204 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
7205 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
7207 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
7208 (create_typespec): Likewise.
7209 (mono_reflection_bind_generic_parameters): Return a
7210 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
7211 (mono_reflection_inflate_method_or_ctor): New public function.
7213 * reflection.h (MonoReflectionGenericInst): New typedef.
7215 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
7217 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
7218 inside the domain lock. Fixes #49993.
7220 * object.c (mono_class_vtable): When typed allocation is used,
7221 allocate vtables in the GC heap instead of in the mempool, since the
7222 vtables contain GC descriptors which are used by the collector even
7223 after the domain owning the mempool is unloaded.
7225 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
7227 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
7228 reflect what it does. Also invalidate mempools instead of freeing
7229 them if a define is set.
7231 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
7234 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
7235 hold the finalizable objects in this domain.
7237 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
7240 * appdomain.c (mono_domain_set): New function to set the current
7241 appdomain, but only if it is not being unloaded.
7243 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
7244 appdomain which is being unloaded.
7246 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
7247 unloading of the root appdomain.
7249 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
7250 icall to execute a method in another appdomain. Intended as a
7251 replacement for InternalSetDomain, which can confuse the code
7252 generation in the JIT.
7254 * appdomain.c (mono_domain_is_unloading): New function to determine
7255 whenever an appdomain is unloading.
7257 * appdomain.c (mono_domain_unload): New function to correctly unload
7260 * assembly.c (mono_assembly_load_references): Check that an assembly
7261 does not references itself.
7263 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
7264 domain manually, it asks the finalizer thread to do it, then waits for
7265 the result. Also added a timeout.
7267 * icall.c: Register the new icalls.
7269 * threads.h threads.c: Export the mono_gc_stop_world and
7270 mono_gc_start_world functions.
7272 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
7273 function to fill out the mempool with 0x2a.
7275 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
7277 * reflection.h (MonoReflectionMethodAux): New structure to store
7278 information which is rarely used, thus is not in the MonoMethod
7281 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
7284 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
7285 and marshalling info into the aux structure.
7287 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
7288 from the aux structure.
7290 * loader.c (mono_method_get_param_names): Retrieve the param names from
7293 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
7295 * exception.h exception.c: Add AppDomainUnloadedException && fix
7298 2003-10-21 Dick Porter <dick@ximian.com>
7301 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
7302 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
7304 2003-10-21 Martin Baulig <martin@ximian.com>
7306 * reflection.c (mono_reflection_bind_generic_parameters):
7307 `klass->parent' is NULL for interfaces.
7309 2003-10-21 Martin Baulig <martin@ximian.com>
7311 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
7313 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
7315 * exception.c (mono_exception_from_name_msg): New helper function for
7316 creating exceptions and initializing their message field.
7318 * exception.c: Simplify functions using the new helper.
7320 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
7323 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
7324 mono_raise_exception, since otherwise gcc doesn't generate the function
7325 epilog for raise_exception, confusing the stack unwinding in the JIT.
7328 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
7329 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
7332 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7334 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
7337 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
7339 * icall.c: Removed GetUninitializedObject method because
7340 AllocateUninitializedClassInstance does the same.
7342 2003-10-18 Martin Baulig <martin@ximian.com>
7344 * class.c (inflate_generic_signature): Renamed to
7345 mono_class_inflate_generic_signature() and made it public.
7346 (my_mono_class_from_generic_parameter): New static function; if we
7347 don't already have the generic parameter's MonoClass, create a
7348 very simple one which is just used internally in the runtime and
7349 not passed back to managed code.
7351 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
7353 * metadata.h (MonoMethodSignature): Moved the
7354 `MonoGenericParam *gen_params' to the MonoMethodHeader.
7355 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
7357 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
7358 ves_icall_MonoMethod_GetGenericArguments(); this is now an
7359 interncall on the MonoMethod class, not on MethodInfo.
7360 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
7361 calling mono_reflection_bind_generic_method_parameters() directly.
7363 * loader.c (mono_method_get_signature): If this is a MethodSpec;
7364 return the already computed `method->signature'.
7365 (method_from_methodspec): New static function to load a method
7366 from a MethodSpec entry.
7367 (mono_get_method_from_token): Call the new method_from_methodspec()
7368 for MethodSpec tokens.
7369 (mono_get_method_from_token): If we're a generic method, load the
7372 * reflection.c (mono_image_get_memberref_token): Allow
7373 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
7375 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
7376 (mono_image_create_token): First check whether it's a generic
7377 method (so we'd need to create a MethodSpec), then do the other
7379 (mono_reflection_bind_generic_method_parameters): Return a
7380 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
7381 called directly from the interncall.
7383 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
7385 * reflection.c (load_public_key): Move loading of the public key
7388 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
7390 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
7393 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
7394 culture, hash_alg and public_key. Fixes #49555.
7396 2003-10-17 Martin Baulig <martin@ximian.com>
7398 * class.h (MonoGenericInst): Moved this declaration here and added
7399 `MonoMethod *generic_method'.
7402 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
7403 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
7405 * metadata.c (mono_metadata_type_equal): Two types of
7406 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
7407 index; ie. don't compare the address of the `MonoGenericParam'
7409 (mono_metadata_load_generic_params): Removed the `MonoMethod
7412 * metadata.h (MonoGenericInst): Moved declaration to class.h.
7413 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
7415 * reflection.c (method_encode_signature): Encode the number of
7417 (encode_generic_method_sig): New static function.
7418 (method_encode_methodspec): New static function; creates an entry
7419 in the MethodSpec table for a generic method.
7420 (mono_image_get_methodspec_token): New static function.
7421 (mono_image_create_token): Call mono_image_get_methodspec_token()
7422 for generic methods.
7423 (mono_reflection_bind_generic_method_parameters): New public
7424 function. Instantiates a generic method.
7426 2003-10-16 Martin Baulig <martin@ximian.com>
7428 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
7429 *gen_params' here from MonoMethodHeader.
7431 * metadata.c (mono_metadata_parse_method_signature): If we have
7432 generic parameters, initialize `method->gen_params' and then set
7433 the correct `type->data.generic_param' in all the parameters.
7435 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
7437 * threads.c (mono_threads_get_default_stacksize): New function to
7438 return the default stacksize.
7440 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
7441 termination of the finalizer thread, since the previous method had
7442 race conditions. Fixes #49628.
7444 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
7445 as for the other managed threads.
7447 2003-10-16 Martin Baulig <martin@ximian.com>
7449 * class.c (inflate_generic_signature): Copy `generic_param_count'
7452 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
7455 * metadata.c (mono_metadata_parse_method_signature): Actually set
7456 the `method->generic_param_count' here.
7457 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
7459 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
7461 * object.h: Add a new field to TypedRef to simplify the implementation
7462 of the REFANY opcodes in the JIT.
7464 * icall.c: Make use of the new field.
7466 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
7469 2003-10-15 Martin Baulig <martin@ximian.com>
7471 * class.c (mono_class_from_gen_param): Renamed to
7472 mono_class_from_generic_parameter() and moved most of the
7473 functionality from mono_reflection_define_generic_parameter()
7474 here; ie. we create a "real" class here.
7475 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
7476 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
7477 previously been called.
7479 * class.h (MonoGenericParam): Moved the declaration of this struct
7480 here from metadata.h and added `MonoMethod *method'.
7482 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
7485 * loader.c (mono_get_method_from_token): If we have any generic
7486 parameters, call mono_metadata_load_generic_params() to read them
7487 from the MONO_TABLE_GENERICPAR.
7489 * metadata.c (mono_metadata_load_generic_params): Added
7490 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
7492 * metadata.h (MonoMethodSignature): Replaced
7493 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
7494 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
7496 * reflection.c (mono_reflection_define_generic_parameter): Moved
7497 most of the functionality into the new
7498 mono_class_from_generic_parameter(); set the `method' field if
7499 we're a method parameter.
7501 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
7503 * marshal.c (emit_struct_conv): if native size is 0
7506 2003-10-14 Martin Baulig <martin@ximian.com>
7508 * icall.c: The generics API has changed in the spec since it was
7509 added to System.Type; these modifications make it match the spec
7511 (ves_icall_Type_GetGenericParameters): Renamed to
7512 `ves_icall_Type_GetGenericArguments'.
7513 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
7514 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
7515 `ves_icall_MonoType_get_HasGenericArguments'.
7516 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
7517 `ves_icall_MonoType_get_IsGenericParameter'.
7518 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
7519 this is no interncall anymore.
7520 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
7521 `ves_icall_TypeBuilder_get_IsGenericParameter'.
7523 2003-10-14 Martin Baulig <martin@ximian.com>
7525 * reflection.c (mono_reflection_bind_generic_parameters): Also
7526 inflate generic methods if we're reading the class from IL.
7528 2003-10-13 Martin Baulig <martin@ximian.com>
7530 * reflection.c (mono_reflection_define_generic_parameter): This
7531 method isn't called directly from the icall anymore; take a
7532 `MonoReflectionAssemblyBuilder *' so we can use this for type and
7533 method generic parameters.
7534 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
7535 (method_builder_encode_signature): Encode generic parameters.
7536 (mono_image_get_method_info): Write generic params to the
7537 MONO_TABLE_GENERICPARAM table.
7539 * reflection.h (MonoReflectionMethodBuilder): Added
7540 `MonoArray *generic_params'.
7542 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
7544 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
7545 wrapper for mono_reflection_define_generic_parameter().
7546 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
7548 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
7550 * marshal.h: Add missing function to fix build.
7552 * marshal.c (mono_marshal_get_native_wrapper): Add support for
7553 the SetLastError pinvoke attribute.
7555 * marshal.c (mono_marshal_set_last_error): New helper function called
7556 by the generated code.
7558 * marshal.c (mono_mb_emit_branch): New helper function.
7560 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
7562 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
7563 classes as parameters and return values of delegates. Fixes #29256.
7565 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
7567 * locales.c: use gint32 in non HAVE_ICU case
7569 2003-10-11 Martin Baulig <martin@ximian.com>
7571 * mono-debug.c (mono_debug_add_method): Added a workaround for
7574 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
7576 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
7577 delegates passed to native code must use the STDCALL calling
7578 convention. Fixes #35987.
7580 2003-10-10 Martin Baulig <martin@ximian.com>
7582 * class.c (inflate_generic_type): If we're inflating for a generic
7583 type instance (and not for a generic method), return
7584 MONO_TYPE_MVAR unchanged.
7586 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7588 * string-icalls.c: Join ignores null strings in the source array.
7589 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
7590 * threads.c: GetAvailableTheads is slightly more accurate.
7592 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
7594 * threads.h threads.c : add mono_threads_set_default_stacksize
7595 and pass default to CreateThread calls.
7597 2003-10-09 Dick Porter <dick@ximian.com>
7601 * locales.c: Internal calls for constructing CultureInfo and
7602 related objects from libicu (if its available.)
7604 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
7606 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
7608 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7610 * threadpool.c: added an argument to async_invoke_thread that is the
7611 item to process, pass the MonoAsyncResult to the thread start function
7612 when creating a new thread. This way we don't need to acquire any lock
7613 when we're creating a new thread. Readded a semaphore for faster
7614 response times (instead of that Sleep i added).
7616 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
7618 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
7619 get daylight change dates better on Windows, fix handling
7620 of platforms without tm_gmtoff.
7622 2003-10-06 Martin Baulig <martin@ximian.com>
7624 * class.c (inflate_generic_method): Renamed to
7625 mono_class_inflate_generic_method() and made public.
7626 (mono_class_init): Don't inflate the generic methods here.
7627 (mono_class_from_generic): Added `gboolean inflate_methods'
7628 argument. Inflate the methods here.
7630 * loader.c (mono_method_get_param_names): Ignore instances of
7631 generic types for the moment.
7633 * reflection.c (fixup_method): Added support for inflated methods.
7634 (mono_image_create_token): Use mono_image_get_methodref_token()
7635 for inflated methods.
7636 (mono_custom_attrs_from_param): Ignore instances of generic types
7638 (mono_reflection_bind_generic_parameters): New public function.
7639 Moved all the functionality from
7640 ves_icall_Type_BindGenericParameters() here and added support for
7642 (mono_reflection_define_generic_parameter): Initialize
7643 `klass->methods' here.
7645 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
7646 functionality into mono_reflection_define_generic_parameter().
7647 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
7648 TypeBuilder, return that TypeBuilder.
7650 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7652 * appdomain.c: removed mono_delegate_semaphore.
7655 (mono_thread_pool_add): moved hash table creation inside and the thread
7656 creation outside of the critical region.
7657 (mono_thread_pool_finish): removed obsolete code.
7658 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
7659 continue or exit the thread depending on the queue.
7661 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
7663 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
7664 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
7665 handle more bool marshalling options
7667 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
7669 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
7670 arrays of structs. Also add a more descriptive error message when
7671 a structure member is marshalled as LPArray.
7673 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
7675 * marshal.c (mono_marshal_get_native_wrapper): Add support for
7676 marshalling arrays of complex types. Fixes #29098. Also remove an
7677 usused and incomplete function.
7679 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
7681 * gc.c: report heap_size - free_bytes as total memory allocated
7684 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
7686 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
7687 fix timezone handling problems on Windows.
7689 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
7690 asserts when the year is outside the range handled by ms the functions.
7692 * class.c (setup_interface_offsets): If the class is an interface,
7693 fill out its interface_offsets slot.
7695 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7697 * threadpool.c: mark threadpool threads as background.
7699 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
7701 * decimal.c - define DECINLINE to nothing if not using GCC
7703 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
7705 * assembly.c: More refcount fixes.
7707 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7709 * string-icalls.c: if we're not trimming, return the same string.
7710 When not splitting, don't create a new string.
7712 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7715 (mono_image_open): increment the ref_count inside the critical section.
7717 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
7719 * image.c (mono_image_open): Fix reference counting bug.
7721 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
7723 * marshal.c (mono_marshal_type_size) struct alignment changed for
7724 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
7725 64bits. Avoid leak in mono_marshal_get_native_wrapper when
7726 mono_lookup_pinvoke_call throws.
7728 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
7730 * reflection.c (mono_reflection_parse_type): Fix #49114.
7732 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
7733 temporary workaround for cygwin header problem.
7735 * object.c (mono_object_isinst): Synchronize this with the code
7736 generated by the JIT for casts.
7738 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
7740 * reflection.c (encode_type): Fix #38332.
7742 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
7744 * marshal.c (mono_marshal_method_from_wrapper): New function to return
7745 the original method from the wrapper method.
7747 2003-09-25 Martin Baulig <martin@ximian.com>
7749 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
7750 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
7751 (ves_icall_Type_get_IsGenericInstance): New interncall.
7753 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
7755 * object.c: fix cast warning in big endian code.
7757 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
7759 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
7761 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7763 * assembly.c: don't call check_env from mono_assembly_load. It's
7764 already done once in mono_assemblies_init and may cause headaches when
7765 multiple threads are loading assemblies.
7767 2003-09-19 Martin Baulig <martin@ximian.com>
7769 * reflection.c (mono_reflection_define_generic_parameter): Don't
7770 allocate `klass->methods', set `klass->flags' to
7771 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
7773 2003-09-18 Martin Baulig <martin@ximian.com>
7775 * class.c (mono_class_init): Don't create `class->methods' if it's
7776 already initialized.
7778 * metadata.c (mono_metadata_load_generic_params): Make this
7781 * reflection.c (mono_reflection_define_generic_parameter): Set
7782 parent class and interfaces from the constraints.
7784 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
7785 to keep this struct in sync with the declaration in TypeBuilder.cs.
7787 2003-09-17 Martin Baulig <martin@ximian.com>
7789 * metadata.h (MonoType): Replaced the data's `int type_param'
7790 field with `MonoGenericParam *generic_param'.
7791 (MonoGenericParam): Added `MonoClass *klass'.
7793 * class.c (mono_class_from_gen_param): Removed the
7794 `MonoImage *image' and `int type_num' arguments.
7796 * metadata.c (mono_metadata_parse_generic_param): New static
7797 method; creates a MonoGenericParam which just contains the index.
7798 (do_mono_metadata_parse_type): Call
7799 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
7802 * reflection.c (mono_image_typedef_or_ref): Generic type
7803 parameters may be in the same assembly, but never use a typedef
7805 (mono_reflection_define_generic_parameter): We're now creating a
7806 "real" class for the type parameter; it's now safe to call
7807 mono_class_from_mono_type() on the class'es type, it'll do the
7810 2003-09-16 Martin Baulig <martin@ximian.com>
7812 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
7813 `symfile->range_entry_size' and `symfile->class_entry_size' here;
7814 the `symfile' data structure must be fully initialized before it
7815 gets added to the table.
7817 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
7819 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
7821 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
7822 class init trampolines.
7824 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
7826 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
7827 to the built-in profiler to turn off time and allocation profiling
7830 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
7832 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
7835 * debug-helpers.c (mono_method_full_name): Print the wrapper type
7836 in human readable form.
7838 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
7840 * reflection.c icall.c: Fixed warnings.
7842 * image.c (load_class_names): Use a temporary hash table to hold the
7843 namespaces in order to avoid doing many string comparisons.
7845 * image.h: Fix typo.
7847 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
7848 Pass NULL instead of g_direct_equal to the GHashTable constructor
7849 since the NULL case is short-circuited inside g_hash_table_lookup,
7850 leading to better performance.
7852 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
7853 obtain the first custom attribute for a given index. Depends on the
7854 CustomAttribute table being sorted by the parent field.
7856 * reflection.c (mono_custom_attrs_from_index): Use the new function
7857 for better performance.
7859 2003-09-07 Martin Baulig <martin@ximian.com>
7861 * class.c (mono_class_init): If we're a generic instance, inflate
7862 all our methods instead of loading them from the image.
7863 (mono_class_from_generic): Set `class->methods = gklass->methods'.
7865 2003-09-07 Martin Baulig <martin@ximian.com>
7867 * mono-debug-debugger.c: Added support for constructors.
7869 2003-09-06 Martin Baulig <martin@ximian.com>
7871 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
7874 * reflection.c (mono_reflection_setup_generic_class): Call
7875 ensure_runtime_vtable() to create the vtable.
7877 2003-09-05 Martin Baulig <martin@ximian.com>
7879 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
7882 2003-09-04 Martin Baulig <martin@ximian.com>
7884 * reflection.c (mono_reflection_define_generic_parameter): Generic
7885 parameters start with zero.
7887 2003-09-04 Martin Baulig <martin@ximian.com>
7889 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
7891 * reflection.h (MonoReflectionGenericParam): New typedef.
7892 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
7893 the generic parameters from the managed TypeBuilder.
7895 * reflection.c (mono_reflection_define_generic_parameter): New function.
7896 (mono_reflection_create_runtime_class): Encode generic parameters.
7897 (mono_reflection_setup_generic_class): New function; this is
7898 called after adding adding all generic params to the TypeBuilder.
7899 (encode_type): Added MONO_TYPE_VAR.
7901 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
7903 * class.h class.c (mono_class_needs_cctor_run): Moved this method
7906 * assembly.h assembly.c: Moved the AOT loading code into an assembly
7909 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
7911 * reflection.h reflection.c class.h class.c: Delete duplicate
7912 definition of mono_type_get_name () from reflection.c and export the
7915 * class.c: Class loading fixes from Bernie Solomon
7916 (bernard@ugsolutions.com).
7918 * reflection.c: Endianness fixes from Bernie Solomon
7919 (bernard@ugsolutions.com).
7921 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
7923 * assembly.h assembly.c: Define a file format version for AOT
7926 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
7928 * appdomain.h (MonoJitInfo): New field to determine whenever the
7929 code is domain neutral.
7931 2003-08-31 Miguel de Icaza <miguel@ximian.com>
7933 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
7935 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
7937 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
7938 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
7939 Avoid caching the result since strings must be domain specific. Fixes
7942 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
7944 * marshal.c (mono_marshal_init): Make this callable multiple times
7945 since it is hard to find a correct place to call it.
7947 * object.c (mono_runtime_class_init): Execute static constructors in
7948 the correct appdomain.
7950 * image.c (build_guid_table): Handle the case when multiple images have
7953 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7955 * icall.c: added a couple of icalls for System.Web.
7957 2003-08-28 Martin Baulig <martin@ximian.com>
7959 * icall.c (ves_icall_Type_BindGenericParameters): Use
7960 `klass->generic_inst' instead of `&klass->byval_arg' in the
7961 mono_type_get_object() call. The returned type must be
7962 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
7964 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
7968 * object.c (mono_class_proxy_vtable): Make it thread safe.
7970 * pedump.c: Fix warning.
7972 * object.c appdomain.h: Get rid of metadata_section.
7973 It is no longer needed and it was causing deadlocks with domain->lock.
7975 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
7977 2003-08-26 Martin Baulig <martin@ximian.com>
7979 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
7981 2003-08-26 Martin Baulig <martin@ximian.com>
7983 * pedump.c (main): Call mono_metadata_init(),
7984 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
7985 and mono_loader_init().
7987 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
7989 * loader.h: Add missing include to fix build.
7991 * image.h: mono_image_load_references is no more.
7993 * assembly.c: Reworked assembly loading to make it really thread safe.
7994 After these changes, the assembly returned by mono_assembly_open is
7995 fully initialized, i.e. all its references assemblies are loaded.
7997 * assembly.c (mono_image_load_references): Renamed to
7998 mono_assembly_load_references, and made private, since clients no
7999 longer need to call it.
8001 * class.c: Removed calls to mono_assembly_load_references, since it was
8002 a source of deadlocks.
8004 * loader.h loader.c class.h class.c: Protect data structures using a
8005 new lock, the loader lock.
8007 * class.c (mono_class_setup_vtable): Create temporary hash tables and
8008 GPtrArrays only when needed.
8010 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
8011 into empty structures by mcs. Fixes pinvoke7.cs.
8013 * domain.c (mono_init): Call a new initialization function.
8015 * appdomain.c (mono_runtime_init): Call the new initializer function
8016 of the marshal module.
8018 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
8019 inserted into empty structures by mcs. Fixes pinvoke7.cs.
8021 * marshal.h marshal.c: Added locks around the wrapper caches to make
8022 this module thread safe.
8024 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
8025 this argument. Fixes pinvoke1.exe.
8027 2003-08-25 Lluis Sanchez <lluis@ximian.com>
8029 * object.h: Added call_type field to MonoMethodMessage and the corresponding
8030 enumeration of values. Removed fields to store remote call output values in
8031 MonoAsyncResult. Not needed any more.
8032 * object.c: Initialize call_type and async_result fields in mono_message_init.
8033 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
8034 dispatching the message.
8035 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
8036 async call to finish. To do it use a message with EndInvoke call type.
8038 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
8040 * loader.h loader.c (mono_method_hash_marhal_info): New function which
8041 determines whenever a method has marshalling info.
8043 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8045 * assembly.c: fix the build on windows.
8047 2003-08-22 Lluis Sanchez <lluis@ximian.com>
8049 * object.cs: Fixed bug #47785.
8051 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
8053 * string-icalls.c (StringReplace): If their are no occurances of
8054 the old string found return a reference to the supplied
8055 string. This saves some memory and matches MS behavoir.
8057 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8059 * socket-io.c: fixed compilation for systems that define AF_INET6
8060 and don't define SOL_IP/SOL_IPV6.
8062 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
8064 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
8065 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
8067 * rawbuffer.c rawbuffer.h: Make this module thread safe.
8069 * domain.c: Make this module thread safe.
8071 * domain.c (mono_init): Call new initialization function.
8073 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
8074 reference types too. Fixes #38812.
8076 * image.c (mono_image_init): Fixed warnings.
8078 * class.c (mono_class_from_typeref): Handle assembly load failure
8081 * appdomain.c (add_assemblies_to_domain): Handle the case when
8082 the references of an assembly are not yet loaded.
8084 * metadata.c image.c assembly.c: Moved initialization of global
8085 variables to a separate function called at startup since lazy
8086 initialization of these variables is not thread safe.
8088 * image.c assembly.c: Made this module thread safe by adding locks in
8089 the appropriate places.
8091 * domain.c (mono_init): Call the new initialization functions of the
8094 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
8096 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
8097 make a direct call. It is proxy's work to make the call asynchronous.
8098 mono_delegate_end_invoke(): If the targe is a proxy, just collect
8100 * object.cs: mono_method_call_message_new(): read AsyncResult and
8101 state object from parameters list, if this info is requested.
8102 * object.h: Added fields to store remote call output values in
8103 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
8105 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
8107 * object.h: add needed fields to MonoThread.
8108 * threads.c, threads.h: allow registering a function to cleanup data
8109 allocated per thread by the JIT.
8111 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
8113 * loader.h: portability fix by Bernie Solomon
8114 * <bernard@ugsolutions.com>.
8116 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
8118 * reflection.h reflection.c (mono_param_get_objects): Changed this to
8119 return a MonoArray. This simplifies the code and also ensures that
8120 the cache allways contains an object reference as a value.
8122 * icall.c (ves_icall_get_parameter_info): Simplified using the new
8125 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8127 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
8128 fixes a problem with byte ordering when getting the address family for
8131 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
8133 * .cvsignore: Added monosn.
8135 * reflection.h reflection.c loader.c: Added support for parameter
8136 marshalling to dynamically created types. Fixes #47295.
8138 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
8140 * rand.c: remove useless warnings.
8142 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
8144 * class.c: implemented ldtoken for methods and fieldrefs.
8146 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8148 * threadpool.c: when mono_async_invoke was called, no one took care of
8149 monitoring the queue. So if the method invoked took some time and we
8150 got new async invoke requests after 500 ms (the thread created waited
8151 that long in WaitForSingleObject), the new async invoke was not called
8152 until the previous one finished.
8154 This is fixed now. Thanks to Totte for helping with it.
8156 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8158 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
8160 2003-08-11 Martin Baulig <martin@ximian.com>
8162 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
8164 2003-08-06 Martin Baulig <martin@ximian.com>
8166 * mono-debug-debugger.c: Added support for static fields,
8167 properties and methods.
8169 2003-08-06 Martin Baulig <martin@ximian.com>
8171 * mono-debug-debugger.c: Don't store the MonoString's vtable to
8172 make this work for applications with multiple application domains.
8174 2003-08-04 Martin Baulig <martin@ximian.com>
8176 * mono-debug-debugger.c: Completely reworked the type support; the
8177 most important thing is that we're now just using one single
8178 `MonoType' instance per type.
8180 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
8182 * mono-endian.h, mono-endian.c, icall.c: Added icall
8183 ves_icall_System_Double_AssertEndianity to assert double word endianity
8184 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
8186 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
8188 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
8189 support, icalls and fixes.
8191 2003-07-31 Miguel de Icaza <miguel@ximian.com>
8193 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
8194 classes that are a punctuation character in .NET is not the same a
8197 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
8199 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
8201 2003-07-29 Miguel de Icaza <miguel@ximian.com>
8203 * icall.c: Add new MemCopy internalcall.
8204 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
8205 Simplified code; It is not necessary to handle all the cases here,
8206 as the C# code takes care of it. Only handle the case of the name
8207 resource embedded into the assembly.
8209 Changed signature to return the data pointer and the size of the
8212 2003-07-26 Miguel de Icaza <miguel@ximian.com>
8214 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
8215 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
8217 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
8219 * socket-io.c: ignore EINTR error in select.
8221 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
8223 * class.h, class.c: removed unused subclasses field in MonoClass.
8225 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
8227 * icall.c: improve fix of get_base_definition(). If the parent class
8228 doesn't have the mehod, look at the parent of the parent.
8229 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
8230 to check if a parameter is an in or out parameter
8231 (PARAM_ATTRIBUTE_IN is not set by default).
8232 mono_method_return_message_restore(): Use mono_class_value_size to
8233 get the size of a value type. mono_type_stack_size (parameterType)
8234 does not return the correct value if parameterType is byRef.
8235 mono_load_remote_field(), mono_load_remote_field_new(),
8236 mono_store_remote_field(), mono_store_remote_field_new():
8237 raise exception if the remote call returns an exception.
8239 2003-07-28 Martin Baulig <martin@ximian.com>
8241 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
8242 method. This is a wrapper around mono_runtime_invoke() which
8243 boxes the instance object if neccessary.
8245 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
8247 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
8248 metadata.h, row-indexes.h, verify.c: first cut of generics support.
8250 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
8252 * icall.c: disable mcs bug workaround.
8254 2003-07-21 Miguel de Icaza <miguel@ximian.com>
8256 * object.c (mono_runtime_class_init): Take the metadata_section
8257 mutex before obtaining the domain mutex.
8259 * appdomain.h: Added definition of metadata_section mutex here.
8261 * object.c: define metadata_mutex here.
8263 2003-07-24 Ravi Pratap <ravi@ximian.com>
8265 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
8268 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
8270 * reflection.c: Fix bug #46669
8272 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8277 * object.h: fill in the type name for TypeLoadException.
8279 2003-07-23 Ravi Pratap <ravi@ximian.com>
8281 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
8282 relationship between TypeBuilders while compiling corlib) and bug
8283 45993 (Array types returned from the runtime while compiling
8284 corlib were from the loaded corlib).
8286 2003-07-22 Martin Baulig <martin@ximian.com>
8288 * mono-debug-debugger.c: Reworked the type support a bit more;
8289 distinguish between types and classes.
8291 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
8293 * icall.c: add IsArrayImpl icall.
8295 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
8297 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
8298 initializing real_size only once. Also fix bug #46602.
8300 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
8302 * object.c: Renamed mono_metadata_section to metadata_section.
8304 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
8306 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
8307 empty array if the type is an array. Fixed.
8308 ves_icall_MonoMethod_get_base_definition: if the base method
8309 is abstract, get the MethodInfo from the list of methods of
8311 * reflection.c: ParameterInfo.PositionImpl should be zero-based
8312 and it was 1-based. Fixed in mono_param_get_objects.
8314 2003-07-20 Martin Baulig <martin@ximian.com>
8316 * mono-debug.h: Set version number to 31.
8317 (mono_debug_init): Added `MonoDomain *' argument.
8319 * mono-debug-debugger.c: Reworked the type support; explicitly
8320 tell the debugger about builtin types; pass the `klass' address to
8323 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
8325 * image.c: Allow new metadata tables to be loaded without a
8326 warning. Also update the warning message to give the new constant value.
8328 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
8330 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
8331 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
8332 array type representation changes.
8334 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
8336 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
8337 on Environment.Exit () call.
8339 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
8341 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
8342 requires a matching corlib.
8344 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
8346 * Changelog: My editor decided to add a CR to each line. Sorry about that.
8347 Committed again without the CRs.
8349 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
8351 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
8352 getting it from the "this" socket instance. Did not work
8353 if the socket is a subclass of Socket.
8354 Also fixed bug #35371.
8356 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
8358 * metadata.c: fixed size for TypedByRef.
8359 * loader.c: when searching for a method, consider the vararg amrker.
8360 * unicode.c, decimal.c: constify some arrays.
8362 2003-07-15 Dick Porter <dick@ximian.com>
8364 * socket-io.c: Fixed compilation for gcc < 3.2.
8366 Fixed compilation for machines that don't have AF_INET6 (thanks to
8367 Bernie Solomon <bernard@ugsolutions.com> for that part.)
8369 Fixed compile warnings.
8371 Fixed formatting and line endings.
8373 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
8376 * socket-io.c: Added IPv6 support.
8378 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
8380 * class.c (mono_class_is_assignable_from): New function to implement
8381 the is_assignable_from logic. Used by mono_object_isinst,
8382 Type::IsAssignableFrom () and the interpreter.
8384 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
8385 Object, even interfaces.
8387 * object.c (mono_object_isinst): Implement in terms of
8390 * icall.c (ves_icall_type_is_assignable_from): New icall.
8392 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
8394 * domain.c (foreach_domain): fix compiler warning.
8396 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
8398 * image.c (load_metadata_ptrs): use g_strndup because strndup is
8399 not available on all plattforms
8401 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
8403 * image.h image.c: Store the metadata version string in MonoImage.
8404 * icall.c: New icall to retrieve the image version.
8405 * reflection.c (create_dynamic_image): Fill in the image version field
8406 * reflection.c (build_compressed_metadata): Use the image version
8407 from the image structure.
8409 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8411 * appdomain.c: modified comment.
8412 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
8413 That will be its last iteration when mono_gc_cleanup is called from
8414 mono_runtime_cleanup and before the domain is unloaded.
8418 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
8420 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
8423 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
8425 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
8426 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
8427 Bernie Solomon <bernard@ugsolutions.com>.
8429 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
8431 * object.c, object.h: provide mono_object_new_fast() for faster
8432 allocation in some special cases.
8434 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
8436 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
8437 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
8439 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
8441 * threadpool.c: fix leaks.
8443 2003-07-01 Dick Porter <dick@ximian.com>
8445 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
8446 using MonoGHashTables. Fixes threadpool bug posted to list.
8448 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
8450 * image.h, image.c: added support to load an assembly from a byte array.
8451 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
8452 assembly bundle support.
8454 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
8456 * threadpool.c (mono_thread_pool_add): keep a reference to the
8457 AsyncResult to prevent GC
8459 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
8461 * class.c: leak fix.
8463 2003-06-25 Dick Porter <dick@ximian.com>
8465 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
8466 for the async object, the WaitHandle object will close the handle.
8469 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
8471 * class.c: in mono_array_class_get (), lookup from the hash with the
8472 same type we insert: this works around a bug in
8473 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
8474 lluis. The real fix will have to wait for after the release.
8476 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
8478 * icall.c: fix memory leak when getting type members.
8480 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
8482 * reflection.c: added more pubtoken special cases.
8484 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
8486 * class.c: handle field offset correctly when class size
8487 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
8489 2003-06-20 Martin Baulig <martin@ximian.com>
8491 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
8494 2003-06-20 Martin Baulig <martin@ximian.com>
8496 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
8498 2003-06-20 Martin Baulig <martin@ximian.com>
8500 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
8501 just distinguish between variables in registers and variables at
8502 an offset relative to a register.
8504 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8506 * icall.c: #ifdef out latest changes until mcs is fixed.
8508 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
8510 * icall.c: return members in metadata order.
8512 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
8514 * icall.c: avoid infinite loop in GetTimeZoneData.
8516 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
8518 * icall.c: added Marshal.Prelink/All icalls.
8520 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
8522 * object.c, object.h: fix warnings and do some overflow checking
8523 when creating arrays.
8525 2003-06-17 Dick Porter <dick@ximian.com>
8528 * file-io.c: File attributes need to be tweaked slightly when
8529 passed from the managed to the w32 world.
8531 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
8532 * profiler.h profiler-private.h profiler.c: Rework last patch
8533 based on suggestion by Paolo.
8535 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
8537 * profiler.h profiler-private.h profiler.c: Added infrastructure for
8538 instruction level coverage data collection.
8539 * profiler.h profiler.c (: Added new callback function which can be
8540 used by the profiler to limit which functions should have coverage
8542 * profiler.c (mono_profiler_load): Call g_module_build_path to
8543 generate the file name of the profiler library.
8545 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
8547 * profiler.c, profiler.h, profiler-private.h: added basic block
8548 coverage profiling API.
8550 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
8552 * reflection.c (mono_reflection_create_runtime_class): Add support
8553 for events in dynamically generated code.
8555 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
8558 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
8560 * icall.c: when getting timezone info, return reasonable values if we
8561 can't get the actual data.
8563 2003-06-14 Dick Porter <dick@ximian.com>
8565 * threads.c (start_wrapper): Remove the reference to the thread
8566 object in the TLS data, so the thread object can be finalized.
8567 This won't be reached if the thread threw an uncaught exception,
8568 so those thread handles will stay referenced :-( (This is due to
8569 missing support for scanning thread-specific data in the Boehm GC
8570 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
8572 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
8574 * reflection.c: ensure streams and tables are first allocated with
8575 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
8577 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
8579 * icall.c: fixed GetElementType for byrefs (bug# 44792).
8581 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
8583 * reflection.c (mono_reflection_create_runtime_class): Add support for
8584 properties to dynamically created classes.
8585 * reflection.c: Fix a few places where non-MonoObjects were inserted
8586 into the tokens hashtable.
8588 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
8590 * object.c: some support to handle out of memory exceptions.
8592 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
8594 * marshal.c (mono_marshal_get_native_wrapper): support reference
8597 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
8599 * object.h, object.c: more portability stuff from Bernie Solomon.
8600 Unexport mono_object_allocate(). Added mono_object_unbox ().
8601 Set exitcode when an unhandled exception is thrown.
8603 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
8605 * marshal.c (mono_marshal_get_native_wrapper): use custom
8606 marshaler for return types.
8608 2003-06-10 Dick Porter <dick@ximian.com>
8610 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
8611 ip_mreq is available
8613 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
8615 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
8616 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
8617 by Bernie Solomon <bernard@ugsolutions.com>.
8619 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
8621 * gc.c (mono_gc_init): Avoid error message on shutdown when
8622 GC_DONT_GC=1 is used.
8624 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
8625 New icall to return the GUID of a module.
8627 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
8629 * class.c: ensure instance size always includes the parent's size
8630 even whem class size is set explicitly (fixes bug#44294).
8632 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
8634 * profiler.h, profiler.c: made the simple profiler thread-safe,
8635 get more accurate timing info. Allow the loading of an
8636 externally-developed profiler module.
8638 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
8640 * marshal.c (mono_marshal_get_native_wrapper): improved
8641 class/byref arguments.
8642 (mono_marshal_get_native_wrapper): better string marshaling support.
8644 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
8646 * class.c: ensure .pack and .size are handled correctly and
8647 simplified layout of static fields.
8649 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
8652 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
8654 * loader.c (mono_lookup_pinvoke_call): look for modules in the
8655 current directory (fix bug 44008)
8657 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
8659 * marshal.c (mono_marshal_get_native_wrapper): started support for
8661 (mono_delegate_to_ftnptr): consider marshalling specifications
8663 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
8665 * reflection.c, reflection.h: emit custom marshal info.
8667 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8669 * object.c: free the GError.
8670 * icall.c: added CloseEvent_internal.
8672 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
8675 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
8677 * loader.c (mono_method_get_signature): Add support for dynamic
8680 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
8682 * reflection.c: fixed bug #43905.
8684 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
8686 * class.c, domain.c, icall.c, metadata.h, object.h: support for
8687 handling TypedReference and ArgIterator.
8688 * loader.c, loader.h: added function to get signature at call site.
8690 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
8692 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
8693 data readonly. Buglets and warning fixes. Some MethodSpec support.
8695 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
8697 * class.h, class.c, object.c: remove relative numbering support.
8699 2003-05-26 Miguel de Icaza <miguel@ximian.com>
8701 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
8702 free the string, until we get a chance to fix Gtk#
8704 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8706 * marshal.c: revert last patch.
8708 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
8710 * icall.c: updates for new mono_class_vtable() not calling
8711 the type constructor anymore.
8713 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
8715 * object.h, object.c: separate vtable creation from type
8716 initialization. Make running the .cctor thread safe.
8718 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
8720 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
8722 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
8724 * loader.c (mono_get_method): consider calling convention
8726 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
8728 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
8729 to return the invisible global type for a module.
8731 * reflection.c (mono_image_build_metadata): Emit global fields too.
8733 2003-05-20 Peter Williams <peterw@ximian.com>
8735 * loader.c (mono_lookup_internal_call): Add a few newlines.
8737 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
8739 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
8742 * appdomain.c (set_domain_search_path): Recalculate search path when
8743 AppDomainSetup.PrivateBinPath changes.
8745 * object.c (mono_class_compute_gc_descriptor): It turns out some
8746 parts of the class libs (like System.Thread) holds pointers to
8747 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
8748 to treat native int a pointer type here.
8750 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
8752 * appdomain.h, domain.c: add hashtable for jump target resolution.
8754 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
8756 * reflection.h reflection.c icall.c: Added new icalls
8757 GetManifestResourceInfoInternal, GetModulesInternal and support
8760 2003-05-16 Dick Porter <dick@ximian.com>
8764 * file-io.c: Implement System.IO.MonoIO::GetTempPath
8766 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
8768 * object.c: mono_store_remote_field: little fix to previous patch.
8770 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
8772 * class.c: add constructors to array classes.
8773 * icall.c: special case array construction for InternalInvoke (),
8775 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
8777 * class.h class.c reflection.c object.c: Added support for field
8778 defaults in dynamically generated classes.
8780 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
8782 * reflection.c: properly encode charset for ddlimport.
8784 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
8786 * threads.c: allow compiling without GC.
8788 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
8790 * appdomain.h, object.c, object.h, threads.c, threads.h: added
8791 handling of thread static data.
8793 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
8795 * reflection.h, reflection.c: added mono_custom_attrs_free ().
8797 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
8799 * class.c (mono_array_class_get): always set the serializable flags
8800 (mono_array_class_get): always set the SEALED attribute for array types
8802 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
8804 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
8805 attributes (fix for bug 42021).
8807 2003-05-12 Dick Porter <dick@ximian.com>
8809 * gc.c: Don't run finalizers when the finalizer thread is
8810 finishing up, because the default domain has already been
8813 2003-05-11 Miguel de Icaza <miguel@ximian.com>
8815 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
8816 value is null, we should throw an exception. This is slightly
8817 different than the other conventions used for the constructor.
8819 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8821 * socket-io.c: fixed windows build.
8823 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8825 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
8827 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
8829 * object.c (mono_string_new_wrapper): Compatibility fix for MS
8832 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
8834 * class.c (mono_class_layout_fields): Add experimental GC aware
8835 auto layout facility. Requires class library changes to work correctly.
8837 (mono_class_setup_vtable): Avoid overriding explicit interface
8838 method implementations. Fixes iface3.exe test.
8840 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
8842 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
8843 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
8845 * metadata.h: Add new type classification macro which determines
8846 whenever the type holds an object reference.
8848 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
8850 * marshal.c (mono_marshal_get_native_wrapper): cleanups
8852 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
8854 * gc.c (finalizer_thread): Work around a GC bug.
8856 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
8858 * marshal.c (emit_struct_conv): allow unions
8860 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
8862 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
8864 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
8866 2003-05-06 Martin Baulig <martin@ximian.com>
8868 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
8870 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8873 (Select_internal): allow NULLs, don't create arrays if not needed.
8874 Coupled with Socket.cs changes.
8877 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
8878 register a finalizer for it that will close the semaphore handle. This
8879 fixes the leak and make Lupus' test run with > 4080 loops.
8881 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
8883 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
8884 Jerome Laban (bug #42287)
8886 2003-05-02 Martin Baulig <martin@ximian.com>
8888 * debug-mono-symfile.h
8889 (MonoSymbolFile): Moved declaration into mono-debug.h.
8890 (MonoDebugMethodJitInfo): Likewise.
8891 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
8893 (_mono_debug_address_from_il_offset): Take a
8894 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
8897 (MonoDebugDomainData): New struct.
8898 (mono_debug_get_domain_data): New function.
8899 (mono_debug_add_method): Take an additional `MonoDomain *'
8901 (mono_debug_source_location_from_address): Likewise.
8902 (mono_debug_il_offset_from_address): Likewise.
8903 (mono_debug_address_from_il_offset): Likewise.
8905 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
8907 * reflection.c: one more check for null type in custom attrs.
8909 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8911 * reflection.c: avoid warning (comparison is always false due to limited
8912 range of data type).
8914 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8916 * icall.c: throw an exception in Type.GetField if the argument 'name'
8919 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
8921 * reflection.c: fixed handling of enums in named arguments to custom
8922 attributes (bug #42123).
8924 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
8926 * reflection.c: use the right array element type and handle
8927 a null for a Type argument, too.
8929 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
8931 * reflection.c: handle arrays as arguments to custom attributes.
8933 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
8935 * reflection.c: handle a string value in a custom attr
8936 ctor that takes an object.
8938 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
8940 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
8943 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
8945 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
8947 2003-04-27 Martin Baulig <martin@ximian.com>
8949 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
8950 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
8951 MONO_DEBUGGER_EVENT_BREAKPOINT.
8952 (mono_breakpoint_trampoline_code): Removed.
8953 (mono_debugger_event_handler): The last argument is now a
8955 (mono_debugger_insert_breakpoint_full): Removed the
8956 `use_trampoline' argument.
8957 (mono_debugger_method_has_breakpoint): Likewise.
8958 (mono_debugger_trampoline_breakpoint_callback): Renamed to
8959 mono_debugger_breakpoint_callback(); take the method and
8960 breakpoint number as arguments.
8962 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
8964 * metadata.c: fix off by one when loading parameters attributes.
8966 2003-04-24 Martin Baulig <martin@ximian.com>
8968 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
8970 2003-04-24 Martin Baulig <martin@ximian.com>
8972 * mono-debug-debugger.c: Moved all code which interacts with the
8975 * debug-mono-symfile.c: This code now just deals with the symbol
8976 file itself, the debugger code is now in mono-debug-debugger.c.
8978 2003-04-23 Martin Baulig <martin@ximian.com>
8980 * mono-debug.c (mono_debug_source_location_from_il_offset):
8981 New method; like mono_debug_source_location_from_address(), but
8982 takes an IL offset instead of a machine address.
8984 2003-04-23 Martin Baulig <martin@ximian.com>
8986 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
8987 `line' field; this is now computed by the debugger.
8989 2003-04-23 Martin Baulig <martin@ximian.com>
8991 * mono-debug.[ch]: New files. This is the new debugging interface.
8993 * mono-debug-debugger.[ch]: New files. Moved all code which
8994 interacts with the Mono Debugger here.
8996 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
8998 * domain.c (mono_init): initialize mono_defaults.monitor_class
9000 2003-04-21 Miguel de Icaza <miguel@ximian.com>
9002 * reflection.c (method_encode_code): Add a spicy exception to help
9003 future compiler authors.
9005 2003-04-21 Martin Baulig <martin@ximian.com>
9008 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9009 Make this work with relative pathnames; g_filename_to_uri() needs
9010 an absolute filename.
9012 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
9014 * icall.c: Track name changes in Object and ValueType.
9016 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
9018 * metadata.c (mono_type_stack_size): size should be a multiple of
9021 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9024 (internal_domain_finalize): moved into mono_domain_finalize. No need
9025 to create another thread because the finalizers will be run in the
9028 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
9029 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
9030 to be run (MS does this too).
9032 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
9034 * object.c (mono_class_compute_gc_descriptor): Update comment.
9036 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
9038 * image.h: Add synchronized wrapper cache.
9040 * image.c (do_mono_image_open): Initialize cache.
9042 * reflection.c (create_dynamic_mono_image): Initialize cache.
9044 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9046 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
9047 ves_icall_System_Buffer_ByteLengthInternal.
9049 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
9051 * reflection.c: setup klass->nested_in earlier. Allow
9052 a dash in the assembly name.
9054 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
9056 * metadata.c (mono_type_to_unmanaged): dont access
9057 type->data.klass for MONO_TYPE_OBJECT
9058 (mono_type_to_unmanaged): consider System.Delegate class
9060 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
9062 * class.c: just setup supertypes in the proper place instead of
9063 initializing the full element class for arrays.
9065 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
9067 * class.c: ensure the element class of arrays is initialized.
9068 Setup the supertype info for array classes, too.
9070 2003-04-14 Miguel de Icaza <miguel@ximian.com>
9072 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
9074 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9076 * Makefile.am: re-added -m option when running cygpath. This way,
9077 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
9079 * mono-config.c: same codepath for locating mono config file for WIN32
9081 * assembly.c: if mono_assembly_setrootdir is called, don't override
9084 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9086 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
9087 MONO_ASSEMBLIES variable.
9089 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
9091 * icall.c: added Assembly::GetNamespaces() icall.
9093 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9095 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
9097 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
9099 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
9100 * object.c: fixed bug in the construction of vtable for proxies
9102 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
9104 * object.c (mono_array_new): Mark mono_array_new as an icall.
9106 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9108 * class.c: fixed test for public method when overriding interfaces.
9111 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
9113 * appdomain.h, domain.c: added mono_domain_foreach() to
9114 be able to access the currently loaded appdomains.
9115 * object.c: make string interning work across sppdomains.
9116 Mark some functions for use as icalls.
9118 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
9120 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
9122 * reflection.h reflection.c: Allocate long living data using
9123 GC_MALLOC_ATOMIC so the collector does not need to scan it.
9125 * reflection.c: Double the allocation size in streams instead of
9126 increasing it, to prevent unneccesary copying on large assemblies.
9128 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
9129 creation if the assembly does not have the Run flag set.
9131 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
9133 * class.h: avoid the C++ keywords in header files (Jerome Laban
9134 spotted and fixed this).
9136 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9139 (mono_unhandled_exception): fill in the arguments for the
9140 UnhandledException event. Only trigger that event for the default
9141 domain (as MS does).
9143 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
9145 * object.c: Improve typed allocation stuff based on suggestions from
9146 Paolo. Also turn it on if the GC library supports it.
9148 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
9150 * object.c object.h class.h: Added experimental typed allocation
9151 facility using the interfaces in gc_gcj.h.
9153 * os/gc_wrapper.h: Added new include files.
9155 2003-04-03 Martin Baulig <martin@ximian.com>
9157 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
9158 which is not yet enabled by default.
9160 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
9162 (mono_gc_lock, mono_gc_unlock): New static functions.
9164 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
9165 functions; stop/start the world for the garbage collector. This
9166 is using the windows API; we need to complete the SuspendThread()/
9167 ResumeThread() implementation in the io-layer to make this work on Unix.
9168 (mono_gc_push_all_stacks): New public function; tells the garbage
9169 collector about the stack pointers from all managed threads.
9171 2003-04-03 Martin Baulig <martin@ximian.com>
9173 * object.h (MonoThread): Added `gpointer stack_ptr'.
9175 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
9177 2003-04-03 Martin Baulig <martin@ximian.com>
9179 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
9181 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
9183 * reflection.c (typebuilder_setup_fields): Initialize field.first and
9186 2003-04-02 Miguel de Icaza <miguel@ximian.com>
9188 * loader.c (mono_lookup_internal_call): Report the corlib that is
9191 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
9193 * icall.c (ves_icall_type_GetTypeCode): fixed check for
9194 System.DBNull (it's class not valuetype).
9196 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
9198 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
9199 if the array method was already assigned a token (fixes bug#40646).
9201 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
9203 * reflection.c (mono_reflection_get_type): Attempt type resolve even
9204 if no assembly is given.
9206 2003-04-01 Miguel de Icaza <miguel@ximian.com>
9208 * metadata.h: Added the new tables.
9210 * row-indexes.h: Added definitions for new tables.
9212 * metadata.c: Add schemas for new tables, and add support for
9213 computing the sizes of them.
9215 * class.c: Update for handling the new type cases.
9217 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
9219 * metadata.h (MONO_TYPE_IS_VOID): new macro
9221 2003-03-31 Martin Baulig <martin@ximian.com>
9223 * threads.h (MonoThreadCallbacks): Added `thread_created'.
9225 * threads.c (mono_thread_new_init): Call `thread_created' in the
9226 mono_thread_callbacks.
9228 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
9230 * loader.h: added marshalbyrefobject_class to mono_defaults
9231 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
9232 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
9233 generation of output parameters.
9234 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
9235 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
9236 contextbound and the target object belongs to the context of the caller.
9237 * object.h: added context and unwrapped_server variables in MonoRealProxy.
9238 * object.c: Implemented support for interfaces and abstract classes
9239 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
9240 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
9242 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
9244 * class.h class.c (mono_class_is_subclass_of): New function.
9246 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
9247 routines for most common case (calls from ArrayList::ToArray).
9249 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
9250 routine so programs which call Environment::Exit() can be profiled.
9252 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
9253 Added MONO_ARCH_SAVE_REGS.
9255 * icall.c (ves_icall_type_is_subtype_of): Use new function.
9257 2003-03-29 Miguel de Icaza <miguel@ximian.com>
9259 * blob.h: Add a couple of new MonoType types definitions.
9261 * tabledefs.h: Add a couple of new call convs.
9263 2003-03-27 Zoltan Varga <vargaz@freemail.h>
9265 * reflection.h (MonoReflectionDynamicAssembly): track changes in
9266 the layout of the class.
9268 * reflection.c (alloc_table): double the size on overflow to avoid
9269 unnecessary copying.
9271 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
9272 avoid filling out metadata tables and blobs. Also set mb->ilgen to
9273 null so it can be garbage collected.
9275 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
9277 * reflection.c (mono_reflection_get_type): Return the resolved type
9278 only if it is in the assembly we searched.
9280 * reflection.c (ensure_runtime_vtable): Initialize method slots.
9282 * class.c (mono_class_setup_vtable): Set the slot of the overriding
9285 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9288 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
9289 the right one is 'file:///blah', but MS allows it.
9291 (mono_assembly_open): allow 'file://blah'
9293 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
9295 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
9297 * socket-io.c: fixes bug #40310.
9299 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
9301 * reflection.c (mono_reflection_parse_type): handle deeply nested
9304 * reflection.c (mono_image_create_token): Use unique token values
9305 since they will be put into a hash table.
9307 * class.c (mono_class_setup_vtable): If a method occurs in more than
9308 one place in the vtable, and it gets overriden, then change the
9309 other occurances too.
9311 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
9312 object as return type.
9314 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
9316 * icall.c: Deleted "ToString" implementation for double and float
9317 because they are full implemented in managed code.
9319 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
9321 * reflection.c, reflection.h: implemented and exported functions
9322 to retrieve info about custom attributes.
9324 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9326 * appdomain.c: moved Uri handling to assembly.c
9327 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
9328 work when using a file Uri in *nix and windows.
9330 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
9331 GetReferencedAssemblies.
9333 2003-03-18 Dick Porter <dick@ximian.com>
9335 * icall.c: Rename a couple of internal calls
9337 * threads.c: Set the thread state to Stopped when a thread exits.
9340 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
9342 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
9345 * object.c (mono_class_vtable): fix warning.
9347 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
9349 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
9351 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
9353 (method_encode_clauses): Create exception info structures in the right
9355 (mono_reflection_setup_internal_class): Initialize supertypes field.
9357 * class.c object.c: Handle interfaces which implement other interfaces
9360 * class.h class.c: Move the supertypes array initialization code into
9361 a separate function so it can be used for dynamic types too. Also call
9362 it earlier, in mono_class_init(), since it can be used before the
9363 type is initialized.
9365 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9369 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
9374 * object.c: remove warnings.
9376 2003-03-13 Martin Baulig <martin@ximian.com>
9378 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
9379 (MonoDebugLexicalBlockEntry): New types.
9381 * debug-mono-symfile.c
9382 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
9384 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9386 * process.c: ret can be any non-zero value accroding to MS doc.
9388 2003-03-07 Miguel de Icaza <miguel@ximian.com>
9390 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
9391 fixing a warning for a miss-used prototype, would have cause
9392 random memory corruption.
9394 2003-03-07 Martin Baulig <martin@ximian.com>
9396 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
9397 getting really annoying ....
9399 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
9401 * reflection.c (fixup_method): added support for array methods.
9403 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
9405 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
9406 (pointed out by Michael Adams).
9408 2003-03-04 Dick Porter <dick@ximian.com>
9410 * icall.c: Temporarily reverted the Double and Single ToString()
9411 change, because it broke nunit.
9413 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
9415 * object.h, threads.h: make include files compatible with C++
9416 (patch by Jerome Laban <jlaban@wanadoo.fr>).
9418 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
9420 * icall.c: Erased ToString helper functions for Double and Single.
9421 Now, that implementations ar all in managed code (Double and Single
9424 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
9426 * appdomain.c: Added method for initializing the default context of
9427 a domain. Added internal call for getting the default context.
9428 * appdomain.h: Added context variable in MonoDomain struct.
9429 * domain.c: mono_domain_set also sets the default context of the domain
9430 * icall.c: Mapped internal method InternalGetDefaultContext.
9431 * object.c: mono_object_get_virtual_method returns always a remoting
9432 wrapper if the object is a transparent proxy.
9433 mono_runtime_invoke_array: when creating an object by calling the
9434 constructor, if the created object is a proxy, then the constructor should
9435 be called using the a remoting wrapper.
9437 2003-03-03 Dick Porter <dick@ximian.com>
9439 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
9440 variable so it compiles on solaris. Problem spotted by
9441 Christopher Taylor <ct@cs.clemson.edu>
9443 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9446 (get_info_from_assembly_name): don't leak value.
9449 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
9452 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
9454 * assembly.c: export mono_image_load_references ().
9455 * class.c: handle function pointers. mono_class_from_name() now
9456 supports nested type names directly.
9458 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
9460 * reflection.h reflection.c: Encode already created dynamic methods
9461 and fields correctly as a DEF instead of a REF.
9463 * reflection.c: Get rid of the force_ref argument to
9464 mono_image_typedef_or_ref since it was wrong in the first place.
9466 * string-icalls.c: add error checking to string constructors according
9469 * reflection.c: Emit types in the order their TypeBuilders were
9470 created. Previously, a new table index was assigned to each type before
9471 the tables were emitted. This was wrong because the signature blob
9472 might already refer to a type by its original table index.
9474 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
9476 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
9479 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9481 * Makefile.am: make assemblies dir have \ instead of / on windows.
9483 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
9485 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
9486 iterate over the NESTEDCLASS table using a linear search since the
9487 table is not guaranteed to be sorted by the secondary key.
9489 * class.c (mono_class_create_from_typedef): fixed up call to
9490 mono_metadata_nesting_typedef.
9492 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
9494 * marshal.c (mono_string_to_byvalstr): clear the memory as
9495 suggested by Jerome Laban <jlaban@wanadoo.fr>
9497 2003-02-26 Dick Porter <dick@ximian.com>
9499 * process.c: Cope with padding in .rsrc blocks
9501 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
9503 * metadata.h: reverted the filter_len change, it breaks reflection
9505 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
9507 * metadata.h: added a new field to store the filter_len
9510 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
9512 * reflection.c: handle custom attributes for types and members
9513 created with Reflection.Emit (bug#38422).
9515 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
9517 * reflection.c: define RTSpecialName automatically for constructors for
9518 compatibility with MS.NET.
9520 * reflection.c (mono_reflection_create_runtime_class): initialize
9521 nested_in field of dynamically created classes.
9523 2003-02-22 Martin Baulig <martin@ximian.com>
9525 * debug-mono-symfile.h: Incremented version number.
9527 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
9529 * object.h icall.c process.c: fix warnings.
9531 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
9533 * appdomain.h appdomain.c:
9534 (mono_domain_try_type_resolve): split the
9535 name_or_tb argument into a name and a tb argument.
9536 (mono_domain_has_type_resolve): new function to check whenever the
9537 application has registered a TypeResolve event handler.
9539 * icall.c reflection.h reflection.c: move the type resolve logic into
9540 mono_reflection_get_type () so it will be invoked when
9541 Assembly::GetType () is called.
9544 (mono_reflection_get_type): renamed to get_type_internal.
9545 (mono_reflection_get_type): fixed type name generation so it works
9546 for nested types too.
9547 (mono_reflection_get_type): call has_type_resolve () to avoid the
9548 costly type name generation if there is no resolve event handler.
9550 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
9552 * class.c, image.c: load exported types from file references.
9554 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
9556 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
9557 used to cache the managed methods used to create proxies and make
9558 remote invocation of methods.
9559 * class.h: Added in MonoVTable a flag to indicate that a class needs
9560 to be remotely created.
9561 * object.c: Modified the method mono_class_vtable(). It now initializes
9562 the remote flag of the vtable. Modified mono_object_new_specific(),
9563 so now it checks the remote flag.
9564 * icall.c: Added a couple of internal methods, one for enabling instance
9565 creation interception for a type, and one for creating objects bypassing
9568 2003-02-18 Martin Baulig <martin@ximian.com>
9570 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
9571 New interncall to get a method's metadata token.
9573 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
9574 New interncall for the debugger.
9576 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
9578 * class.c (mono_class_setup_vtable): allocate supertype array
9580 2003-02-18 Martin Baulig <martin@ximian.com>
9582 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
9584 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9587 (assembly_name_to_aname): jump over unknown properties (i've found
9588 something like: 'type, assembly, version=xxx, custom=null, public...',
9589 so now will ignore custom=null and still get the rest of the values).
9591 2003-02-17 Dick Porter <dick@ximian.com>
9593 * threads.c: Have Thread.Start() wait for a semaphore to signal
9594 that the thread has set up all its local data. This fixes bug
9595 34323, where Abort() raced the new thread's TLS data.
9597 Also removes the handle_store() call from start_wrapper, because
9598 threads are now always created suspended and there is no longer a
9599 race between the parent and child threads to store the info.
9601 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
9603 * image.c: explain the #- heap issue in a message, hopefully
9604 avoiding FAQs on mono-list.
9606 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9609 (GetEntryAssembly): if the domain has not invoked
9610 AppDomain.ExecuteAssembly yet, return the assembly of the default
9613 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
9615 * class.c (mono_ldtoken): make it work in dynamic assemblies.
9617 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
9619 * metadata.c, reflection.c: simple speedup to type hash
9622 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
9624 * image.c, image.h, class.c, assembly.c: move module loading
9625 to MonoImage. When loading metadata, consider alignemnet from
9626 the start of metadata, not from the metadata address in memory.
9628 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
9630 * reflection.c (mono_reflection_get_custom_attrs): Added support for
9631 AssemblyBuilder objects. Factored out custom attribute creation into
9632 a separate function.
9633 (create_custom_attr): new function to create custom attributes.
9635 2003-02-12 Miguel de Icaza <miguel@ximian.com>
9637 * Makefile.am: Got tired of typing the full pathname to pedump.
9638 Until there is another option, am installing this.
9640 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
9642 * class.c (class_compute_field_layout): always set field->parent
9643 (mono_ldtoken): use mono_defaults.fieldhandle_class;
9645 2003-02-11 Dick Porter <dick@ximian.com>
9648 * monitor.c: Rewrote Monitor, making lock much faster and
9649 Pulse/Wait work as specified. Also uses much fewer handles, and only
9650 creates them as needed.
9652 * exception.c: Added SynchronizationLockException
9654 * threads.c: Deleted old Monitor implementation. The new one is
9657 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
9659 * class.c: handled TypedReference type code. Set the correct size for
9660 class data. Setup interface_offsets for interface classes, too.
9662 2003-02-09 Martin Baulig <martin@ximian.com>
9664 * debug-mono-symfile.h: Reflect latest symbol writer changes.
9666 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
9668 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
9669 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
9670 * object.c: fixed mono_object_get_virtual_method () for interfaces.
9671 * verify.c: check for code that runs after the end of the method.
9673 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
9675 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
9676 "System.Math::Round2".
9677 * sysmath.h: Added Floor, Round and Round2 definitions.
9678 * sysmath.c: Modified certain functions that were not 100% compliant
9679 with MS.NET (math precision) and added the implementation of Floor,
9682 2003-02-07 Martin Baulig <martin@ximian.com>
9684 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
9686 2003-02-07 Martin Baulig <martin@ximian.com>
9688 * debug-mono-symfile.c: Reflected latest symwriter changes.
9689 (mono_debug_create_mono_symbol_file): Removed.
9690 (mono_debug_open_mono_symbol_file): Take an argument which
9691 specifies whether to create a dynamic symbol file.
9693 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
9695 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
9697 2003-02-05 Martin Baulig <martin@ximian.com>
9699 * reflection.c (mono_image_build_metadata): Make this public,
9700 protect it against being called multiple times, don't create
9701 resources and don't build the compressed metadata here.
9702 (mono_image_create_pefile): Do this here.
9705 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
9707 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9709 * socket-io.c: fixed bug #36322.
9711 2003-02-06 Piers Haken <piersh@friskit.com>
9715 * debug-mono-symfile.c:
9721 * socket-io.c: warning cleanups
9723 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
9725 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
9726 function. works like remoting invoke, but does a check for the Proxy first.
9728 2003-02-05 Miguel de Icaza <miguel@ximian.com>
9730 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
9732 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
9734 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
9736 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
9737 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
9739 * object.c (mono_store_remote_field_new): used by the new jit
9740 instead of mono_store_remote_field
9741 (mono_load_remote_field_new): used by the new jit
9742 instead of mono_load_remote_field
9744 2003-02-05 Patrik Torstensson
9746 * appdomain.c: changed unload to take the domain id instead
9749 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
9752 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9754 * appdomain.c: don't look for assemblies in ApplicationBase if
9755 PrivateBinPathProbe is set.
9757 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9759 * object.c: make the first argument in main_args contain the absolute
9760 path to the assembly. Fixes bug #37511.
9762 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9764 * icall.c: get correct UTC offset for countries not using daylight
9765 time saving. Fixes bug #30030.
9767 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9769 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
9770 and 1 are the family).
9772 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
9774 * icall.c (ves_icall_InternalExecute): removed wrong assertion
9776 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
9778 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
9780 * reflection.c: added support for SignatureHelper tokens, which is
9781 needed by the Calli opcode.
9783 * reflection.h: track changes to SignatureHelper class.
9785 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
9787 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9789 * appdomain.c: fixed loading assemblies from PrivateBinPath.
9791 2003-02-03 Patrik Torstensson
9792 * appdomain.[c|h], domain.c :
9793 - Added support for getting a domain via domain id
9794 - Support for setting and getting domain from System.AppDomain
9795 (used in cross appdomain channel)
9796 - Added support for get/set for a MonoAppContext on a thread
9797 (Context class in System.Runtime.Remoting.Contexts),
9798 - Removed hack in Get/SetData and ExecuteAssembly.
9800 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
9801 the managed world to get control when a proxy is created.
9803 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
9805 2003-02-03 Miguel de Icaza <miguel@ximian.com>
9808 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
9809 Populate the codebase field as well.
9811 2003-02-02 Martin Baulig <martin@ximian.com>
9813 * debug-mono-symfile.c
9814 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
9815 (mono_debug_symfile_add_method): Allow interncalls.
9817 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9819 * icall.c: throw parse exception if strtod fails or the string is empty.
9821 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
9823 * marshal.c: handle object type separately from defined
9826 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
9828 * marshal.c: handle NATIVE_LPSTR for strings when it's
9829 explicitly specified.
9831 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
9833 * reflection.c, reflection.h, icall.c: setup the reflection
9834 handle cache for ModuleBuilders and AssemblyBuilders.
9836 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
9838 * reflection.c (reflection_methodbuilder_to_mono_method): set
9841 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9843 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
9845 2003-01-29 Dick Porter <dick@ximian.com>
9847 * threads.c: No need for the fake_thread kludge now that Thread
9848 doesn't run a class constructor
9850 2003-01-29 Dick Porter <dick@ximian.com>
9852 * threads.c: Use g_direct_hash instead of the rather bogus
9855 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
9857 * marshal.c (mono_marshal_get_native_wrapper): add check for null
9859 (mono_marshal_get_struct_to_ptr): generate valid IL code
9860 (mono_marshal_get_ptr_to_struct): generate valid IL code
9861 (*): correctly set sig->pinvoke, we need to memdup the signature
9864 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
9866 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
9867 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
9869 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
9871 * profiler.c: provide more callers information.
9873 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
9875 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
9877 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
9879 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
9881 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
9883 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
9884 exception instead of going into an infinite loop on dates which it
9887 * string-icalls.c (ves_icall_System_String_get_Chars): raise
9888 out-of-range exception if needed.
9890 * class.c (mono_class_setup_vtable): allow a virtual method to provide
9891 an implementation for an interface method and to override an inherited
9892 method at the same time.
9893 Imagine a scenario when a virtual method is used to override a
9894 virtual abstract method in a parent class, and this same method
9895 provides an implementation for an method inherited from an interface.
9896 In this case, the interface resolution code will set im->slot, which
9897 means that the virtual method override pass will skip this method
9898 which means a pointer to the abstract method inherited from the parent
9899 will remain in the vtable of this non-abstract class.
9901 * class.c: (mono_class_setup_vtable): continue search for a real
9902 method if only an abstract method is found.
9904 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
9906 * reflection.c: add size to encoding for ByValStr and ByValArray
9907 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
9909 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
9911 * class.c (mono_class_setup_vtable): pass the override info as an
9914 * class.c (mono_class_setup_vtable): set the slot of overriding methods
9917 * reflection.c (ensure_runtime_vtable); add support for method
9920 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
9922 * reflection.c (resolution_scope_from_image): Hack to work to work with
9925 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
9926 added a 'force_ref' argument to force this function to allways return
9927 a TypeRef. This is needed by mono_image_get_memberref_token ().
9929 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
9931 * reflection.c (mono_image_get_type_info): interfaces really don't have
9934 * reflection.c (mono_image_basic_init): fill out missing fields of
9937 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
9938 dynamic assemblies. This is required so dynamic assemblies show up in
9939 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
9940 Type::GetType() etc. This is consistent with MS behaviour.
9942 * image.c image.h reflection.c: add newly created classes to the name
9943 cache so mono_class_get () will find them.
9945 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
9947 First part of changes to get IKVM.NET running under mono.
9949 * appdomain.h, appdomain.c: added new function
9950 mono_domain_try_type_resolve() which will emit TypeResolve events.
9951 This function will call AppDomain::DoTypeResolve to do the actual work.
9953 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
9954 moved existing code dealing with dynamic tokens to a new function
9955 called mono_reflection_lookup_dynamic_token (). This function will
9956 raise TypeResolve events when appropriate. Since reflection.c is not
9957 part of libmetadata, a new hook function called
9958 mono_lookup_dynamic_token() is added to class.c which will call this.
9960 * assembly.h assembly.c: make the invoke_load_hook function public,
9961 so it can be called for dynamic assemblies.
9963 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
9965 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
9968 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
9969 MonoGHashTable, since it contains pointers to objects which the GC
9972 * assembly.c (search_loaded): remove unused variable.
9974 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
9976 * object.c: fixed issue exposed by gcc-generated IL programs
9977 that use RVA data for pointers.
9979 2003-01-25 Martin Baulig <martin@ximian.com>
9981 * threads.c (start_wrapper): Moved the initialization of
9982 `start_func' above the mono_new_thread_init() call to which we
9983 pass it as argument.
9985 2003-01-24 Martin Baulig <martin@ximian.com>
9987 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
9988 the MonoThread pointer.
9990 2003-01-21 Miguel de Icaza <miguel@ximian.com>
9992 * icall.c: Rename `PowImpl' to Pow.
9994 2003-01-23 Dick Porter <dick@ximian.com>
9996 * threads.c (start_wrapper): Create a Thread object if needed, so
9997 the Main() thread can do the class initialisation in a subthread
9998 that has been set up to allow managed code execution.
10000 Pass the thread ID instead of the MonoThread pointer to the thread
10001 start and attach callbacks. This change is required, because the
10002 jit thread start callback must be called _before_ the Thread
10003 object can be created.
10005 (mono_thread_init): Removed much object creation code that is no
10006 longer needed. No managed code is called from here now.
10008 * object.c (mono_runtime_exec_managed_code): Create a subthread
10009 for Main, and call back to the runtime to use it.
10010 Set the exit code when Main exits.
10012 * gc.c: Make sure domain finalisation happens in a subthread.
10013 Re-enable threaded GC, fixing bug 31333 (again).
10015 * environment.c: System.Environment internall calls (so far just
10016 ExitCode is here, the others are still in icall.c)
10018 * appdomain.c (mono_runtime_cleanup): All threads running managed
10019 code should have finished before mono_runtime_cleanup() is
10020 reached, so no need to clean up threads.
10022 2003-01-22 Martin Baulig <martin@ximian.com>
10024 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
10025 `gpointer func' arguments.
10026 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
10027 but added `MonoThread *thread' argument.
10028 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
10030 * threads.c (mono_new_thread_init): Added `gpointer func' argument
10031 and pass it to the mono_thread_start_cb callback.
10032 (mono_install_thread_callbacks): New public function to install a
10033 set of callbacks which are set by the debugger.
10034 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
10036 2003-01-22 Martin Baulig <martin@ximian.com>
10038 * Makefile.am: Install debug-mono-symfile.h.
10040 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
10042 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
10044 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
10046 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
10047 * class.c (mono_ptr_class_get): correctly set access levels of pointers
10048 (mono_array_class_get): correctly set access levels of arrays
10050 2003-01-20 Patrik Torstensson
10051 * image.h (MonoAssemblyName): changed major, minor, build, revision
10052 from signed to unsigned.
10054 2003-01-20 sean kasun <skasun@azstarnet.com>
10056 * reflection.c (load_cattr_value): Now this handles
10057 MONO_TYPE_SZARRAY. Fixes bug #35629
10059 2003-01-20 Miguel de Icaza <miguel@ximian.com>
10061 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
10064 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10066 * decimal.c: fixed bug #26056.
10068 2003-01-17 Martin Baulig <martin@ximian.com>
10070 * gc.c: Raise an ExecutionEngineException instead of using g_error().
10072 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10075 (mono_get_exception_type_initialization): new function.
10077 * object.c: throw a TypeInitializationException when an exception is
10078 thrown invoking the class constructor.
10080 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10082 * reflection.c: fixed attribute reading.
10084 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10087 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
10088 provided, look for the type in the calling assembly and then in
10089 mscorlib; if the assembly name is provided, only try that one.
10091 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
10093 * object.c: register the vtable before there is a chance it's
10094 queried again recursively.
10096 2003-01-13 Duncan Mak <duncan@ximian.com>
10098 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
10101 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
10103 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
10105 2003-01-11 Martin Baulig <martin@ximian.com>
10107 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
10108 this to 20 for the release.
10110 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
10112 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
10114 * loader.c (mono_method_get_marshal_info): bug fix
10116 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
10117 structures with explicit layout
10119 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
10121 * profiler.c: made the output more readable (and sorted).
10122 Added caller information for the allocation profiler.
10124 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
10126 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
10128 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10130 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
10131 to get value types.
10133 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
10135 * object.c, profiler.h, profiler.c, profiler-private.h:
10136 Added object allocation profiler.
10138 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
10140 * reflection.h, reflection.c: handle global methods.
10141 Compress blob entries.
10143 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
10145 * marshal.c: fix compilation.
10147 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
10149 * loader.c (mono_method_get_marshal_info): impl.
10151 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
10153 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10155 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
10156 for reference types.
10158 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
10160 * loader.c: fixed off by one error in loaded parameter names.
10162 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
10164 * marshal.c (mono_marshal_get_icall_wrapper): like
10165 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
10166 instead of a MonoMethod.
10168 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10170 * decimal.c: fixed bug #36537.
10172 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
10174 * marshal.c: throw a missing method exception if a
10175 P/Invoke method is not found.
10177 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
10179 * icall.c: allow a null this for constructors.
10181 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
10183 * icall.c: raise the proper exceptions if the arguments to the
10184 internal Invoke are incorrect.
10186 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
10188 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
10190 2003-01-03 Martin Baulig <martin@ximian.com>
10192 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
10194 2002-12-31 Martin Baulig <martin@ximian.com>
10196 * debug-mono-symfile.c: Completely rewrote the type section.
10197 Instead of using individual malloc()ed fields, we use one big
10198 continuous memory area and offsets into this area.
10199 See the comments in the source code for details.
10201 2002-12-30 Martin Baulig <martin@ximian.com>
10203 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
10205 2002-12-30 Martin Baulig <martin@ximian.com>
10207 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
10208 line number table in this data blob instead of using an external
10211 2002-12-28 Martin Baulig <martin@ximian.com>
10213 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
10215 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
10217 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
10218 as a boxed return type.
10220 2002-12-21 Miguel de Icaza <miguel@ximian.com>
10223 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
10224 g_build_filename to properly get separators on the filename created.
10226 * object.h: Small change, introduce MonoMarshalByRefObject to
10227 track the layout of that structure in the C# universe as we make
10230 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
10232 * object.c: removed assert to allow static fields on interfaces.
10233 * loader.c: a TypeSpec may be used for any type, not just arrays.
10235 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
10237 * class.c, class.h: added mono_class_array_element_size ().
10238 Ignore static methods in interfaces.
10240 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10242 * threads.c: fixed the build under cygwin.
10244 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
10246 * reflection.c: handle nullref constants. Allocate keys for
10247 reflection handles with the GC.
10249 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
10251 * threads.c, threads.h: added mono_thread_get_abort_signal()
10252 to get a suitable signal for thread abort.
10254 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
10256 * metadata.c: fix handling of ExportedType table.
10258 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10260 * icall.c: added WriteWindowsDebugString internal call.
10262 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10264 * reflection.h: added fields to match C# implementation.
10266 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10268 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
10270 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
10272 * gc.h, gc-internal.h: Rename header for GC internal calls to
10273 gc-internal.h from gc.h as to not clash with Boehm GC having its
10274 header installed as <gc.h> in outside include paths.
10275 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
10276 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
10278 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10280 * icall.c: assign minor, build and revision in FillName.
10282 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
10284 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
10285 Added support for running code generated by Reflection.Emit.
10287 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10289 * appdomain.c: check for NULL argument in LoadFrom.
10291 2002-12-10 Dick Porter <dick@ximian.com>
10293 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
10295 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10297 * appdomain.c: fix buglet when building exe file name. Handle full
10298 assembly name (needed after latest changes to AssemblyName).
10300 (mono_image_close): free some hashtables.
10302 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
10304 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
10305 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
10306 on some systems (redhat 7.3)
10308 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
10310 * threads.c: delete the critical section of a sync block,
10311 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
10313 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
10315 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
10317 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10319 * appdomain.[ch]: handle the assembly preload event to try loading the
10320 assemblies using the paths we have in the current domain.
10322 * assembly.[ch]: created an assembly preload hook that is called to try
10323 loading the assembly by other means that the ones provided here.
10325 * domain.c: initialize the domain search path.
10327 From now on, assemblies (TODO: except corlib and System) are loaded
10328 according to these rules when using mono_assembly_load ():
10330 1. It tries to load the assembly from the ApplicationBase
10331 of the current domain appending .dll and .exe (TODO: have to
10332 try loading from name/name.dll and name/name.exe).
10334 2. It tries the search path specified in PrivateBinPath for the
10335 current domain (if any).
10337 3. Previous behavior.
10339 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
10341 * icall.c: implemented GetInterfaceMap() related icall.
10342 * domain.c, loader.h: load MethodInfo in mono_defaults.
10344 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
10346 * gc.c: disable the finalizer thread for now, untill all the issues
10347 with it are resolved.
10349 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
10351 * string-icalls.c: handle embedded nulls in string ctor when the
10352 length is specified.
10354 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
10356 * class.c: look for explicit interface implementation in parent
10359 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
10361 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
10363 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
10365 * gc.c: protect handles with a critical section.
10367 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10370 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
10371 parameters. If no assembly specified, try getting the type from all
10372 the assemblies in the current domain, else, load the assembly and get
10375 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10377 * marshal.c: applied patch from Aleksey Demakov that fixes
10378 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
10380 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10382 * icall.c: fixed get_location.
10384 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
10386 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
10387 declarations to make it work with older gcc.
10389 * loader.c (mono_get_method): set signature->pinvoke for native calls
10391 2002-11-20 Dick Porter <dick@ximian.com>
10393 * threads.c (mono_thread_init): Set the main thread's handle
10395 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
10397 * gc.c: allow compilation without GC support. Changed to match the
10400 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
10402 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
10404 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
10406 * reflection.c: set a public key token on the core assemblies.
10408 2002-11-18 Dick Porter <dick@ximian.com>
10410 * threads.c: Split out some thread initialisation so that other
10411 files can set the start callback function.
10413 * gc.c: Run finalisers in a separate thread, to avoid stack
10414 overflow. Fixes bug 31333.
10416 * appdomain.c: Set up GC finalisation thread.
10420 * domain.c: Use gc.h macros for GC_malloc
10422 2002-11-15 Dick Porter <dick@ximian.com>
10426 * appdomain.c: Removed mono_runtime_init_with_attach(),
10427 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
10428 merging the extra parameter with the existing function. Removed
10429 unneeded code in mono_thread_attach().
10431 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
10433 * image.c (mono_image_loaded_by_guid): a method to get loaded
10435 (load_metadata_ptrs): we store the guid as string.
10437 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
10439 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
10441 * metadata.c (mono_guid_to_string): imported method form Zoltan
10442 Varga (slightly modified)
10444 * assembly.c (mono_assembly_open): load precompiled code
10446 * loader.h (MonoMethod): we store the method token for use in the
10449 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10451 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
10452 the hook function called when an assembly is loaded.
10454 * domain.c: Modified file.
10455 (mono_domain_assembly_load): removed hash table insertion of assemblies.
10459 2002-11-07 Miguel de Icaza <miguel@ximian.com>
10461 * reflection.c: Map PEFileKind to the value expected by the WinNT
10464 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10466 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
10467 Read until the buffer is filled completely.
10469 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10471 * icall.c: implemented MonoType.InternalGetEvent ().
10473 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10475 * appdomain.c: implemented InitAppDomainSetup. Delayed
10476 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
10477 the entry_assembly.
10479 * assembly.c: base_dir is now an absolute path ending with
10482 * icall.c: modified get_location according to the above changes.
10484 * object.c: init AppDomain.SetupInformation for the default domain after
10485 we have the entry assembly.
10487 * domain.c: when unloading a domain, setup = NULL.
10489 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
10491 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
10493 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
10495 * object.h, object.c: introduced mono_object_get_virtual_method ()
10496 to lookup the method invoked on an object when a callvirt is done on
10498 * icall.c: make MethodInfo::Invoke() always do a virtual call.
10500 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10502 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
10503 current domain when loaded an assembly and failed to load it.
10505 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
10507 2002-10-31 Dick Porter <dick@ximian.com>
10511 * file-io.c: Return the error status in a parameter, as the
10512 GetLastError() value has long since been blown away if we try and
10513 look it up in a subsequent internal call invocation. Delete the
10514 GetLastError() internal call, because it's useless.
10516 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
10518 * class.[ch]: added cast_class to fix bug 29517
10520 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
10522 * marshal.c: create valid IL code in the filter clause:
10523 the new JIT is less forgiving:-)
10525 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10527 * icall.c: removed get_property internal call.
10529 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
10531 * appdomain.h domain.c: Added an ID to appdomains.
10533 * threads.c threads.h icall.c: Implement icall
10534 Thread:GetDomainID(), and remove unused icall
10535 CurrentThreadDomain_internal.
10537 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10539 * icall.c: Don't recurse through the base types in GetConstructor.
10542 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
10544 * mempool.h, mempool.c: added mono_mempool_empty() and
10545 mono_mempool_stats().
10547 2002-10-23 Dick Porter <dick@ximian.com>
10551 * icall.c: Added MonoIO.GetFileType internal call
10553 2002-10-17 Dick Porter <dick@ximian.com>
10555 * appdomain.c (mono_runtime_cleanup): Don't signal the async
10556 delegate semaphore before waiting for all threads to finish,
10557 because new threads can also call async delegates. Fixes bug
10560 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
10561 of 3 seconds, in case another async job is queued. (This part is
10562 needed because the bug fix reintroduced the 3s exit lag.) This
10563 makes the mono_runtime_shutdown flag superfluous.
10565 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
10567 * reflection.c: include ehader size in method section headers.
10568 Really check for suplicated modules entries.
10570 2002-10-17 Martin Baulig <martin@gnome.org>
10572 * debug-mono-symfile.c: Added back support for locals.
10574 2002-10-14 Martin Baulig <martin@gnome.org>
10576 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
10579 2002-10-14 Martin Baulig <martin@gnome.org>
10581 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
10582 mono_class_get() instead of looking in the class cache.
10584 2002-10-13 Martin Baulig <martin@gnome.org>
10586 * debug-mono-symfile.c: Set version number to 28, include the
10587 signature in method names.
10589 2002-10-13 Martin Baulig <martin@gnome.org>
10591 * debug-mono-symfile.h: Set version number to 27.
10593 2002-10-11 Martin Baulig <martin@gnome.org>
10595 * gc.c: Don't register/unregister NULL pointers as disappearing links.
10597 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
10599 * metadata.c, metadata.h: added helper function to allocate signatures.
10601 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10603 * icall.c: added internal call to get the location of machine.config.
10605 2002-10-08 Martin Baulig <martin@gnome.org>
10607 * debug-mono-symfile.c: Ignore classes with a pending init for the
10610 2002-10-03 Dick Porter <dick@ximian.com>
10612 * threads.c: Freebsd pthread_t is a pointer
10614 2002-10-03 Dick Porter <dick@ximian.com>
10616 * socket-io.c: Implemented GetHostName_internal
10618 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10621 (mono_config_parse_file): don't leak the text.
10623 2002-10-02 Martin Baulig <martin@gnome.org>
10625 * debug-mono-symfile.c: Added support for methods.
10627 2002-10-01 Martin Baulig <martin@gnome.org>
10629 * debug-mono-symfile.c: Don't emit methods and line numbers for
10630 the dynamic symbol file, just write the type table. We can easily
10631 have an external helper program which creates a symbol file for an
10634 2002-10-01 Dick Porter <dick@ximian.com>
10636 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
10637 Only add the handle to the cleanup array when we're about to
10638 launch the thread. Bug 31425 deadlocked when the test was run on
10641 2002-10-01 Martin Baulig <martin@gnome.org>
10643 * debug-mono-symfile.c: Added support for properties.
10645 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
10647 * reflection.c: unaligned store fix from Mark Crichton
10648 <crichton@gimp.org>.
10650 2002-09-27 Martin Baulig <martin@gnome.org>
10652 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
10655 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
10657 * assembly.h, assembly.c: use a sane API to hook into the assembly
10658 loading process instead of a useless special-purpouse hack
10659 (ngen needs a hook, too, for example).
10661 2002-09-27 Dick Porter <dick@ximian.com>
10663 * threads.c (mono_thread_init): Call GetCurrentProcess() so
10664 io-layer can set up some process handle info. Not needed on w32,
10665 but doesn't hurt either.
10667 * process.c: Pass the program name in the second parameter to
10668 CreateProcess, so the path is searched. Include the working
10669 directory. Implemented process name, process enumeration, and some
10670 process detail internal calls.
10672 * icall.c: Added internal calls for process lookup, and some
10675 2002-09-26 Martin Baulig <martin@gnome.org>
10677 * assembly.c (mono_install_open_assembly_hook): New global
10678 function to install a function to be invoked each time a new
10679 assembly is loaded.
10680 (mono_assembly_open): Run this callback function if set.
10682 * debug-mono-symfile.c: Put back line numbers for the dynamic
10683 symbol file and also record the .il file as source file. This
10684 allows us to install the temporary symbol file as `file.dbg' just
10685 like a compiler-generated one.
10687 2002-09-26 Nick Zigarovich <nick@chemlab.org>
10689 * Corrected typo in gc.c (BOHEM vs BOEHM).
10691 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10693 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
10694 GetProperties. Also avoid calling g_slist_length in GetProperties and
10697 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
10699 * reflection.c: avoid unaligned stores (bug spotted by
10700 Mark Crichton <crichton@gimp.org>).
10702 2002-09-25 Martin Baulig <martin@gnome.org>
10704 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
10705 instead of guint64 for addresses and added prologue/epilogue info.
10707 2002-09-25 Martin Baulig <martin@gnome.org>
10709 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
10710 store line number info. For the dynamic symbol file, we only need
10711 to provide the JIT generated dynamic line number info for the dynamic
10714 2002-09-25 Martin Baulig <martin@gnome.org>
10716 * debug-mono-symfile.h: Incremented version number.
10718 2002-09-24 Martin Baulig <martin@gnome.org>
10720 * class.c (mono_debugger_class_init_func): New global function
10722 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
10725 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
10726 function. This is called via the mono_debugger_class_init_func
10727 hook to add all types to the dynamic type table.
10728 (ves_icall_MonoDebugger_GetType): New interncall to get a class
10729 from its metadata token.
10731 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
10732 New interncall for the debugger.
10734 2002-09-24 Nick Drochak <ndrochak@gol.com>
10736 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
10737 before using it in case it is null.
10739 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
10741 * metadata.c: allow custom modifiers in local var signatures
10742 (bug spotted by Zoltan Varga).
10744 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
10746 * class.c: deal with the <Module> class that may have a NULL vtable.
10747 Eliminate warnings.
10749 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
10751 * image.c, image.h: more strong name helpers.
10752 * monosn.c: more work: convert pem keys to cryptoapi format.
10754 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
10756 * string-icalls.c: speedup IndexOf.
10758 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
10760 * icall.c: updates from Zoltan.2.Varga@nokia.com.
10762 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
10764 * icall.c: cleanup: use mono_object_domain ().
10766 2002-09-23 Martin Baulig <martin@gnome.org>
10768 * debug-mono-symfile.c: Improved type support.
10770 2002-09-22 Martin Baulig <martin@gnome.org>
10772 * debug-mono-symfile.c: Added support for reference types and strings.
10774 2002-09-22 Martin Baulig <martin@gnome.org>
10776 * debug-mono-symfile.c: Started to work on the type table.
10778 2002-09-21 Martin Baulig <martin@gnome.org>
10780 * debug-mono-symfile.c: Largely reworked the symbol table format.
10781 The symbol table is now incrementally updated each time a new
10782 method is added. We're now also using our own magic and version
10783 so that you don't need to recompile all your classes if the
10784 dynamic table changes.
10785 (mono_debug_update_mono_symbol_file): Removed.
10786 (mono_debug_symfile_add_method): New function to add a method.
10788 2002-09-21 Martin Baulig <martin@gnome.org>
10791 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
10794 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
10795 New interncall to get a method from its metadata token.
10797 2002-09-21 Martin Baulig <martin@gnome.org>
10799 * debug-mono-symfile.c: Create type table.
10801 2002-09-20 Martin Baulig <martin@gnome.org>
10803 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
10805 2002-09-20 Martin Baulig <martin@gnome.org>
10807 * debug-mono-symfile.c: Provide information about params and locals.
10809 2002-09-20 Martin Baulig <martin@gnome.org>
10811 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
10814 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
10815 interncall to get a method from its metadata token.
10817 2002-09-20 Martin Baulig <martin@gnome.org>
10819 * debug-mono-symfile.c: Added a few checks for method->header
10820 being non-NULL. This should never happen, but for the moment
10821 let's use a g_warning() rather than a g_assert().
10823 2002-09-19 Mark Crichton <crichton@gimp.org>
10825 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
10826 even if support for it isn't present. Added an #ifdef to fix this.
10828 * socket-io.c: Added checks back for Solaris support.
10830 2002-09-19 Martin Baulig <martin@gnome.org>
10832 * debug-mono-symfile.c (read_string, write_string): Reflect latest
10833 changes in the symbol file format.
10835 2002-09-18 Martin Baulig <martin@gnome.org>
10837 * debug-mono-symfile.c: Set version number to 21.
10839 2002-09-18 Dick Porter <dick@ximian.com>
10841 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
10842 on netbsd. Fixes bug 30051.
10844 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10847 (set_version_from_string): little fix.
10849 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
10851 * monosn.c, Makefile.am: added strong name utility.
10852 * reflection.h, reflection.c: implemented delayed signing,
10853 locale, version and hash id assembly attributes.
10855 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
10857 * loader.c, metadata.c: load param attributes in signatures.
10859 2002-09-16 Martin Baulig <martin@gnome.org>
10861 * debug-mono-symfile.c: Added string table with all method names.
10863 2002-09-14 Martin Baulig <martin@gnome.org>
10865 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
10866 fast method lookup.
10868 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
10870 * reflection.c: record the public key token of referenced assemblies.
10872 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
10874 * image.c, image.h: added functions to get the strong name and the
10875 public key of an assembly.
10876 * pedump.c: use them.
10878 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
10880 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
10882 2002-09-12 Miguel de Icaza <miguel@ximian.com>
10884 * marshal.c (mono_marshal_get_managed_wrapper): Added
10887 2002-09-11 Martin Baulig <martin@gnome.org>
10889 * gc.c: Call GC_unregister_disappearing_link() on all links when
10890 finalizing them, this is necessary to aviod a crash in boehm's
10893 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
10895 * gc.c: handle GetTarget for finalized objects spotted and fixed by
10898 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
10900 * icall.c: implemented MonoType::Module.
10901 * reflection.c, reflection.h: mono_module_get_object () from
10902 Tomi Pakarinen <tomi.pakarinen@welho.com>.
10904 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
10906 * icall.c: ignore overridden methods in GetMethods ().
10907 Fix for FieldInfo::SetValue().
10908 * object.c: handle float/double in runtime invoke.
10910 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
10912 * object.c: allow a constructor to be called again on an object.
10914 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
10916 * class.h, class.c: move field layout code to it's own function and
10917 export it. Get an interface id earlier. Move fields in MonoClass
10918 so they are more cache friendly and align the bitfields.
10919 * loader.c: temporary handle get_param_names() for a runtime method.
10920 * reflection.c, reflection.h: more code to handle runtime creation of
10923 2002-09-09 Martin Baulig <martin@gnome.org>
10925 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
10926 signature with the pinvoke field being set for the actual call.
10928 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
10930 * icall.c: removed some unused icalls. Start of map of glib charsets
10931 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
10933 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
10935 * debug-helpers.c: break infinite loop (found and fixed by
10936 Holger Arnold <harnold@gmx.de>).
10938 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
10940 * icall.c: target may be null in create_delegate.
10942 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
10944 * marshal.c: handle a boolean return type.
10946 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
10948 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
10950 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
10952 * gc.c: fix weakreferences.
10954 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
10956 * icall.c: added icall to get default codepage.
10958 2002-09-03 Dick Porter <dick@ximian.com>
10961 * threads.c: Use MonoThread instead of MonoObject where
10964 Store running thread objects in a hash table, so that we have all
10965 the info to hand when waiting for them to finish
10966 (means we don't need OpenThread() any more, so mingw builds should
10967 be fully functional again.)
10970 * object.h: Added thread ID to MonoThread
10972 2002-09-03 Martin Baulig <martin@gnome.org>
10974 * icall.c (System.Reflection.Assembly::get_location): New interncall.
10976 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10978 * icall.c: fixed leak in get_temp_path. Thanks lupus.
10980 2002-09-03 Martin Baulig <martin@gnome.org>
10982 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
10983 argument to store the end address of the disassembled instruction.
10985 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
10986 here from debug-symfile.h.
10987 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
10988 JIT into this struct.
10989 (MonoSymbolFile): Added `char *image_file' field.
10990 (MonoDebugGetMethodFunc): Removed.
10991 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
10992 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
10993 (mono_debug_find_method): New method.
10995 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
10996 create a full symbol file.
10997 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
10998 and static symbol files.
10999 (mono_debug_find_method): The symbol file keeps an internal method hash,
11000 call this to get a MonoDebugMethodInfo from a MonoMethod.
11002 * debug-symfile.[ch]: Removed.
11004 2002-08-29 Miguel de Icaza <miguel@ximian.com>
11006 * image.c (do_mono_image_open): Remove linker version check.
11008 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
11010 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
11011 wrappers for instance methods.
11013 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11015 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
11017 2002-08-28 Dick Porter <dick@ximian.com>
11019 * Makefile.am: Export HOST_CC for w32 builds
11021 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
11023 * file-io.c process.c: MonoString are null terminated, no
11024 need for mono_string_to_utf16() anymore.
11026 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
11028 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
11030 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
11032 * icall.c, reflection.h: speedup System.MonoType.
11034 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
11036 * reflection.c: allow null as the value of a string argument in
11037 custom attributes constructors.
11039 2002-08-27 Martin Baulig <martin@gnome.org>
11041 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
11042 `trampoline_address' field.
11044 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
11046 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
11047 check (fixes bug #29486)
11049 2002-08-27 Martin Baulig <martin@gnome.org>
11051 * debug-mono-symfile.c: Changed the file format in a way that allows us
11052 open it read-only and to use a specially malloced area for all the
11053 dynamic data. We can now also generate a symbol file on-the-fly if we're
11054 debugging IL code and there is no MCS generated symbol file for it.
11056 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
11058 * object.c: added a define for a good string and array
11059 creation speedup (not enabled by default because we need to deal with
11062 2002-08-26 Martin Baulig <martin@gnome.org>
11064 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
11065 function to create a dynamic symbol file. This is used by the
11066 debugger to create a symbol file for IL code on-the-fly.
11068 2002-08-26 Martin Baulig <martin@gnome.org>
11070 * loader.c (mono_lookup_pinvoke_call): Include the error message
11071 from g_module_error() in the error message.
11073 2002-08-24 Martin Baulig <martin@gnome.org>
11075 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
11076 function to update the symbol file. The symbol file is mmap()ed
11077 writable, but private. This allows us to install the symbol file
11078 together with the assembly.
11080 2002-08-24 Martin Baulig <martin@gnome.org>
11082 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
11083 but they can read the new symbol file format which mcs is now creating.
11085 * debug-symfile.c (mono_debug_find_source_location): Moved to
11086 debug-mono-symfile.c; this is now operating on the new symbol file.
11088 2002-08-23 Martin Baulig <martin@gnome.org>
11090 * debug-helpers.c (mono_method_desc_from_method): New function to get
11091 a MonoMethodDesc from a MonoMethod.
11093 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
11095 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
11096 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
11098 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
11100 * string-icalls.[ch]: make helper methods static.
11102 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11104 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
11105 types to it and to SetValueInternal.
11107 * object.c: Moved handle_enum label to its proper place. This was the
11110 This time i compiled mcs and gtk-sharp and they both work.
11112 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11114 * icall.c: reverted partially my previous patch until
11115 object.c:set_value handles enums correcly.
11117 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11120 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
11121 (ves_icall_System_Environment_get_MachineName): removed warning when
11122 compiling under cygwin.
11124 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
11126 * object.c: fixed field_get_value() for reference types.
11128 2002-08-22 Dick Porter <dick@ximian.com>
11130 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
11131 Don't free a buffer while it's still needed. Patch from Jonathan
11132 Liger <Jonathan.liger@wanadoo.fr>
11134 2002-08-21 Miguel de Icaza <miguel@ximian.com>
11136 * icall.c (ves_icall_System_Environment_get_Platform): Add new
11139 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
11141 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
11142 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
11144 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
11145 we call unmanaged code which throws exceptions.
11147 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
11149 * appdomain.h: added per-domain entry_assembly.
11150 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
11152 * icall.c: Assembly::GetEntryAssembly icall.
11153 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
11154 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
11156 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
11158 * appdomain.h, gc.c: added mono_domain_finalize ().
11160 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11163 (mono_print_unhandled_exception): changed g_warning by g_printerr
11164 because g_log has a 1024 characters limit (yeah, i got a big stack
11165 trace). Don't print exception name, that should be in ToString
11168 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11170 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
11171 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
11173 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11176 (mono_print_unhandled_exception): after previous commit, i realized
11177 that MS calls ToString on the exception. I changed this function to
11178 do that. This way we get stack_trace for free.
11180 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11183 (mono_print_unhandled_exception): invoke Message property instead of
11184 getting 'message' field from Exception. Don't allocate memory for
11185 'trace' and 'message' if not needed.
11187 2002-08-18 Dick Porter <dick@ximian.com>
11189 * unicode.c: Fix asserts to match Encoder.cs checks
11191 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11193 * marshal.c: fix unaligned store issue and a few wrong
11194 opcode argument types.
11196 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11198 * icall.c: added GetUninitializedObjectInternal internal call.
11200 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
11202 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
11203 to the right domain.
11205 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
11207 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
11209 * class.c (class_compute_field_layout): set blittable to false for Strings
11211 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
11213 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
11215 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
11216 first chunk of code to create types at runtime. Code to
11217 handle ReflectedType/DeclaringType. Make reflection handles
11220 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
11222 * class.c: set correct name in arrays.
11224 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
11226 * appdomain.c (mono_domain_transfer_object): make it work with
11227 valuetypes. bug fixes.
11229 2002-08-12 Dick Porter <dick@ximian.com>
11231 * object.h: Rename some parameters to avoid c++ keywords (Patch
11232 from Joseph Wenninger <kde@jowenn.at>)
11234 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
11236 * icall.c: added icall to implement Assembly.GetFile*.
11238 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
11240 * reflection.h, reflection.c: code to embed managed resources.
11242 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
11244 * class.c: move all the type size stuff into
11245 class_compute_field_layout().
11247 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
11249 * class.c: ensure enums have always the correct instance size.
11250 * unicode.c: remove wrong assert.
11252 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
11254 * assembly.c: fix mem corruption issue.
11255 * image.h, image.c: added mono_image_get_resource () to access
11257 * icall.c: implemented Assembly.EntryPoint property and some
11258 Managed Resources related internalcalls.
11261 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
11263 * image.c, image.h: impemented mono_image_get_entry_point ().
11264 * appdomain.c: use mono_image_get_entry_point.
11266 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
11268 * reflection.c: support the object type argument when loading
11271 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
11273 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
11274 String as return type.
11276 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
11278 * reflection.c: fix encoding of named args for custom attrs to match
11279 the ms implementation. Read them back when instantiating custom
11282 2002-08-02 Radek Doulik <rodo@ximian.com>
11284 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
11285 by Dietmar as quick fix
11286 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
11287 16 as stack size, used on more places as quick fix before Dietmar
11288 will fix it properly
11290 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
11292 * object.h, object.c: added accessors for fields and properties.
11294 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
11296 * class.c, class.h: made mono_class_get_field_from_name ()
11297 loop on parent types.
11298 Added mono_class_get_property_from_name ().
11300 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
11302 * class.c, class.h: move the code to setup the type vtable in its own
11303 function so that it can be reused also for types created at runtime.
11304 Eliminate the "class" identifier from the header file.
11305 * reflection.c: setup the vtable for enums so that we can create
11306 objects for use in SetConstant ().
11308 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
11310 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
11311 instead of the delegate itself as this pointer (bug #28383)
11313 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
11315 * marshal.c (mono_marshal_get_managed_wrapper): added return type
11318 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11320 * loader.c: don't set the pinvoke bit on icalls.
11322 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
11324 * debug-helpers.c (mono_method_full_name): only print a number to
11325 indicate wrapper type (so that the output is more readable in traces).
11327 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
11329 * class.c (mono_class_init): include method override patch from Paolo
11331 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
11333 * icall.c: fixed GetTypeCode().
11335 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
11337 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
11338 use real delegate invoke function to make it work with multicast
11339 delegates (fix bug# 28291).
11341 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
11343 * object.c: load constant strings.
11345 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
11347 * reflection.c: no magic numbers.
11348 * tabledefs.h: security action enum.
11350 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
11352 * assembly.c: fix possible memory corruption.
11354 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
11356 * reflection.h, reflection.c: added support for linking resources.
11357 * verify.c: check we have an updated corlib.
11359 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
11361 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
11363 (mono_marshal_string_array): null terminate unmanaged string arrays.
11364 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
11366 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
11368 * icall.c: Type.GetType () can now return also types from the
11371 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
11373 * loader.h, loader.c: stack walking support.
11374 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
11375 GetCallingAssembly.
11377 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
11379 * marshal.c: added optimisations for blittable types
11381 * class.c (mono_array_class_get): do not set blittable attribute on arrays
11382 (mono_class_setup_mono_type): set blittable attribute for single
11385 * marshal.c (mono_string_utf8_to_builder): impl.
11386 (mono_string_builder_to_utf8): impl.
11387 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
11389 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
11391 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
11392 (mono_marshal_get_managed_wrapper): impl. byref types
11394 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11397 (search_method): don't display debug message.
11399 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
11401 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
11403 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
11405 * appdomain.c: set the missing filename when throwing exception.
11407 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
11409 * metadata.c (mono_type_size): code cleanup
11410 (mono_type_stack_size): removed some test code
11412 2002-07-21 Miguel de Icaza <miguel@ximian.com>
11414 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
11415 mono_get_exception_file_not_found now.
11417 * exception.c (mono_exception_from_name_two_strings): New version
11418 that will call a constructor with two string arguments.
11419 (mono_get_exception_file_not_found): New helper routine, used to
11420 report file-not-found errors.
11422 2002-07-20 Dick Porter <dick@ximian.com>
11425 * process.c: Pass file handles to CreateProcess
11429 * file-io.c: Implemented CreatePipe
11431 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
11433 * metadata.c (mono_get_param_info): set alignment for value types
11435 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
11437 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
11438 Constify mono_domain_assembly_open().
11439 * loader.c: handle null namespace in icalls.
11441 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
11443 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
11444 (emit_str_to_ptr_conv): marshal object as structs
11446 * metadata.c (mono_type_to_unmanaged): marshal object as structs
11448 * marshal.c (mono_marshal_get_runtime_invoke): support value types
11450 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
11452 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
11453 (mono_marshal_get_native_wrapper): we an now return value types
11455 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11457 * verify.c: more checks implemented.
11459 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
11461 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
11463 (mono_marshal_get_native_wrapper): allow byref arguments
11464 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
11465 impl. PtrToStringXXX methods
11466 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
11467 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
11468 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
11469 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
11470 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
11472 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11474 * reflection.c: fix buglet in parsing an assembly name.
11476 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
11478 * marshal.c (emit_ptr_to_str_conv): first impl.
11480 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
11482 * object.c, class.h: cache the vtable in the class as suggested by
11483 vargaz@freemail.hu (Zoltan Varga).
11485 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11487 * class.h, loader.c: added mono_field_from_token().
11488 * verify.c: first cut of type checking code.
11490 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
11492 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
11494 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
11496 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
11498 (mono_marshal_get_remoting_invoke): impl.
11499 (mono_delegate_begin_invoke): impl.
11500 (mono_mb_emit_save_args): impl.
11501 (mono_delegate_end_invoke): impl.
11502 (mono_marshal_get_delegate_begin_invoke):
11503 (mono_marshal_get_delegate_end_invoke):
11504 (mono_marshal_get_delegate_invoke): generate a special name for
11505 those methods (including the signature) and associate them whith
11506 the delegate class.
11508 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
11511 (mono_reflection_type_from_name): now it has a MonoImage parameter
11512 which is used as the default image to search the type in. If the image
11513 is NULL or getting the type from it fails, it defaults to corlib.
11515 * icall.c: changed 1 call to mono_reflection_type_from_name to match
11518 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11520 * reflection.c: update the parameter table index.
11522 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
11524 * domain.c: don't include the mark byte in the string hash.
11526 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
11528 * icall.cs: icall for Type.GetTypeCode ().
11529 * verify: a couple of fixes and disabled local initialization checks.
11531 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
11533 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
11535 * debug-helpers.c (mono_method_full_name): print the type of the
11538 * metadata.c (mono_signature_hash): a hash function for signatures
11539 (mono_signature_hash): better hash algorithm
11541 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
11543 * debug-helpers.c (mono_method_full_name): this can now generate
11544 method names with signatures
11546 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
11547 method dont have this pointers.
11549 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
11551 * reflection.c: fixup typebuilder tokens.
11552 * image.c: fix buglet.
11553 * marshal.h: remove whitespace.
11554 * metadata.h, metadata.c: reinstate code that was removed.
11555 * verify.c: handle catch directives and fix another couple of bugs.
11557 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
11559 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
11560 (mono_marshal_get_native_wrapper): make it comp. with the old code
11561 (mono_marshal_get_native_wrapper): support boolean
11562 (mono_marshal_get_managed_wrapper): support more types
11564 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
11566 * class.c (class_compute_field_layout): compute class->blittable attribute.
11568 2002-07-09 Dick Porter <dick@ximian.com>
11570 * threads.c: Make the thread cleaning up cope with threads that
11573 2002-07-08 Radek Doulik <rodo@ximian.com>
11575 * reflection.c (method_encode_code): use non-translated values to
11576 compute finally_start, this fixes exception handling on ppc, yay!
11578 * decimal.h (struct signscale): fix endianess
11580 2002-07-07 Radek Doulik <rodo@ximian.com>
11582 * reflection.c: swap box_val and not val
11584 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
11586 * reflection.c, reflection.h: handle full assembly info in type name.
11587 Handle Type arguments when loading custom attributes.
11588 * icall.c: updated to use new mono_reflection_type_from_name () method.
11590 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11593 (method_from_memberref): also print assembly name when method not found.
11595 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11598 (ves_icall_TypeGetProperties): fixed bug #27473.
11600 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11602 * reflection.c: display image name and token when cannot find the
11603 .ctor for an attribute.
11605 2002-07-05 Martin Baulig <martin@gnome.org>
11607 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
11609 2002-07-04 Dick Porter <dick@ximian.com>
11611 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
11612 compile on mingw. This will cause mingw builds to not wait for
11613 subthreads to terminate after the main thread does. I've lodged a
11614 bug with the mingw developers for them to wrap OpenThread().
11616 2002-07-03 Dick Porter <dick@ximian.com>
11618 * threads.c: Store thread IDs instead of handles, because
11619 GetCurrentThread() returns a pseudohandle and therefore stores
11620 useless values. mono_thread_cleanup() continues checking the
11621 array of threads until it is empty, to cope with subthreads
11622 spawning new threads after the main thread has finished.
11626 * profiler-private.h: Pass the thread ID to thread profiler
11627 functions, instead of a handle
11629 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
11631 * verify.c: fixes to make it more usable.
11632 * pedump.c: added --verify code to verify IL code in an assembly.
11634 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11636 * reflection.c: turn errors into warnings to allow compiling corlib.
11638 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
11640 * reflection.c: add special cases to compile corlib.
11642 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
11644 * reflection.c: handle properties with only a set method.
11646 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
11648 * opcodes.h: add enum with opcodes in opval order.
11650 2002-07-01 Dick Porter <dick@ximian.com>
11653 * object.c (mono_runtime_run_main): Removed unneeded argument
11655 2002-06-28 Martin Baulig <martin@gnome.org>
11657 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
11659 2002-06-27 Dick Porter <dick@ximian.com>
11661 * threads.c: Store the handle in both the parent thread and in the
11662 subthread, to minimise the time between starting a new thread and
11665 2002-06-26 Dick Porter <dick@ximian.com>
11667 * appdomain.c (mono_runtime_cleanup): Close the socket library
11668 after all the threads have finished, not before
11670 2002-06-26 Martin Baulig <martin@gnome.org>
11672 * debug-symfile.c (mono_debug_find_source_location): Added
11673 `guint32 *line_number' argument. If it's not NULL, store the line number
11674 there and return the file name without the line number.
11676 2002-06-25 Dick Porter <dick@ximian.com>
11680 * process.c: Process forking and other support functions
11682 2002-06-25 Dick Porter <dick@ximian.com>
11684 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
11685 things dont happen when the image is closed.
11686 (mono_image_lookup_resource): Walk the resource section looking
11687 for a particular entry
11689 * cil-coff.h: PE resource section decoding
11691 2002-06-25 Dick Porter <dick@ximian.com>
11695 (mono_assembly_foreach): Accessor functions to walk the list of
11697 (mono_assembly_set_main):
11698 (mono_assembly_get_main): Process methods need to know which
11699 assembly is the "main" one
11701 * object.c (mono_runtime_run_main): Record the main assembly
11703 * debug-helpers.c: Fix typo
11705 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
11707 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
11708 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
11710 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
11712 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
11714 2002-06-21 Miguel de Icaza <miguel@ximian.com>
11716 * image.c (do_mono_image_open): Initialize reference count,
11717 otherwise we leak the MonoImage.
11719 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
11721 * reflection.c: small tweak to handle self-hosting.
11723 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
11725 * reflection.c: fix type name parse code.
11727 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
11729 * reflection.c: break out of the loop.
11730 * image.c: special case corlib.
11732 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11734 * reflection.c: add all the custom attrs at the end to ensure the
11735 ctors have been properly initialized when the attributes are defined
11736 in the current assembly.
11738 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
11740 * reflection.c: handle correctly multiple-nested types.
11742 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
11744 * row-indexes.h: fix typos.
11745 * reflection.c: adjust for typos and fix method_def_or_ref
11746 encoding in MethodImpl table.
11748 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
11750 * reflection.c: fix entry point patching (thanks Serge!).
11752 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
11754 * verify.c: add check for System.Exception
11756 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
11758 * image.c, class.c: minifix for code just c&p'ed.
11759 * reflection.c: warning fix.
11760 * object.h, loader.h, domain.c: load also StringBuilder.
11762 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
11764 * marshal.h, marshal.c: some support code to handle complex marshaling.
11766 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11768 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
11769 Better signatures with vtable error dump.
11771 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
11773 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
11775 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
11777 * icall.c (ves_icall_Type_GetField): impl.
11779 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11781 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
11782 to retrieve a marshal description blob for a field or param.
11784 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
11786 * reflection.h, reflection.c: change order of nested type emission
11787 to avoid table corruption. The NestedTypes table is sorted.
11788 * icall.c: change order of GetConstructor results to workaround mcs bug.
11790 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
11792 * reflection.h, reflection.c: handle field and param marshal
11795 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
11797 * icall.c, marshal.c marshal.h: more Marshal class implementation.
11799 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11801 * reflection.c: fix call convention.
11803 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11805 * reflection.h, reflection.c: mono_image_get_memberref_token()
11806 takes a type instead of a class, now. Added
11807 mono_image_get_array_token() to create tokens for the special
11808 multi-dim array methods.
11810 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
11812 * assembly.c: handle modules (no assembly table). Split
11813 loading references in its own function.
11814 * class.c: handle moduleref resolution scope.
11815 * image.c, image.h: cache module name in image.
11817 2002-06-07 Martin Baulig <martin@gnome.org>
11819 * reflection.c (mono_image_get_type_info): Only add a class layout entry
11820 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
11822 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
11824 * icall.c: more signature fixes that used uint instead of int.
11826 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11828 * reflection.c: fixed signature of field refs.
11830 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
11832 * class.c, reflection.c: handle typerefs of nested types
11833 (both on read and when writing files).
11835 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
11837 * icall.c: fix method signatures that tried to workaround the previous
11840 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
11842 * debug-helpers.c: fix typo.
11844 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
11846 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
11847 rewrote the PE/COFF writing code (our programs are understood by the
11850 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
11852 * gc.c, gc.h, icall.c: weakreference support.
11854 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
11856 * Makefile.am, mono-config.c: use $(sysconfdir).
11858 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
11860 * icall.c: changed default precision of Double.ToString() to 15.
11861 Fixed memory leak. Unified with Single.ToString.
11863 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
11865 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
11867 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
11869 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
11870 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
11871 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
11874 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
11876 * debug-symfile.c, sysmath.c: yet more compilation fixes.
11878 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
11880 * reflection.c, socket-io.c: more compilation fixes.
11882 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
11884 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
11885 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
11886 unicode.c: warning and compiler compatibility fixes.
11888 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
11890 * class.h, metadata.c: fixed warnings/compilation errors.
11892 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
11894 * Makefile.am, mono-config.c, mono-config.h: configuration file
11896 * loader.c, loader.h: make Dll mapping configurable at runtime in the
11897 config file. Export methods to insert and lookup mappings.
11899 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
11901 * reflection.c: handle types and boxed objects in custom attr
11904 2002-05-30 Martin Baulig <martin@gnome.org>
11907 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
11909 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
11911 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
11912 to lookup the implmap row for a P/Invoke method.
11913 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
11914 P/Invoke method from the runtime on an as needed basis.
11916 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
11918 * metadata.c (mono_metadata_parse_signature): impl.
11920 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
11922 * class.c: handle .pack directive.
11924 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
11926 * object.c: initialize static fields with RVA data.
11928 2002-05-25 Martin Baulig <martin@gnome.org>
11931 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
11933 2002-05-24 Martin Baulig <martin@gnome.org>
11936 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
11937 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
11938 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
11940 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
11942 * object.c: special case string ctros in invoke.
11943 * gc.c: silly whitespace changes.
11945 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
11947 * threadpool.[ch]: impl. a threadpool that can
11948 be used by mint and mono.
11950 2002-05-22 Martin Baulig <martin@gnome.org>
11952 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
11953 The first argument is now a `MonoReflectionModuleBuilder *', the return
11954 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
11955 `methods' field to get the method builder. The `token' argument is the
11958 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
11959 invalid characters instead of g_assert_not_reached()ing. This seems
11960 to be the behaviour of mscorlib.
11962 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
11964 * object.c (mono_runtime_invoke_array): applied patch from Rachel
11965 Hestilow to fix bug #25104
11967 2002-05-21 Martin Baulig <martin@gnome.org>
11969 * debug-symfile.c (mono_debug_find_source_location): New function.
11970 Looks up an IL offset in the line number table and returns the source
11971 location as a string.
11973 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11976 (mono_double_ToStringImpl): changed %f by %g until we have something
11979 2002-05-21 Nick Drochak <ndrochak@gol.com>
11981 * icall.c : Use different name for Math.Pow's icall. Needed to check
11982 parameters first in C#.
11984 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
11986 * icall.c, reflection.h: added icall to get info about an event.
11988 2002-05-20 Radek Doulik <rodo@ximian.com>
11990 * object.c (mono_value_box): don't use memcpy for boxing on BIG
11992 (mono_value_box): don't use memcpy for small sizes on
11993 architectures with unaligned access
11995 2002-05-20 Martin Baulig <martin@gnome.org>
11997 * reflection.c (mono_reflection_setup_internal_class): Don't crash
11998 if `tb->parent == NULL'.
11999 (mono_reflection_create_internal_class): New function. This is
12000 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
12003 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
12006 2002-05-19 Martin Baulig <martin@gnome.org>
12008 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
12009 argument to get the length, don't default to the array length.
12011 2002-05-18 Miguel de Icaza <miguel@ximian.com>
12013 * assembly.c (mono_assembly_setrootdir): New function used to
12014 override the MONO_ASSEMBLIES directory.
12016 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
12018 * icall.c: ValueType_GetHashCode() initialize local var.
12020 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
12022 * reflection.c: sort custom attributes table.
12024 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
12026 * reflection.c: support named args in custom attributes (write support).
12028 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
12030 * reflection.c: fix finally position calculation.
12032 2002-05-15 Radek Doulik <rodo@ximian.com>
12034 * reflection.c: fixed endianess at many places
12036 * icall.c (ves_icall_InitializeArray): comment out debug msg
12038 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
12040 * object.c (mono_unhandled_exception): new function to handle
12041 unhandled exceptions.
12042 (mono_unhandled_exception): call the UnhandledException event.
12043 (mono_runtime_delegate_invoke): impl.
12045 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
12047 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
12048 returns the RVA, not the direct pointer to the data. Handle the case
12049 when the class size is fixed.
12051 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
12053 * reflection.c: fix some endianess issues.
12055 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
12057 * object.c (mono_runtime_invoke): is now able to catch exceptions.
12059 * threads.c (mono_thread_init): added a callback which is invoked
12062 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
12064 * icall.c: make GetHashCode return non-negative values.
12066 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
12068 * object.c, icall.c, gc.c: revert to address-based hashcode.
12070 2002-05-13 Miguel de Icaza <miguel@ximian.com>
12072 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
12074 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
12076 * icall.c, class.c: special case <Module>.
12078 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
12080 * icall.c: fix bug in GetNow().
12082 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
12084 * object.c (mono_runtime_class_init): make sure that we call all
12085 static class constructors.
12087 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
12089 * reflection.c: sort methodsemantics table.
12091 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
12093 * reflection.h, reflection.c: honour init locals setting.
12095 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
12097 * icall.c: copied Double ToStringImpl for Single ToStringImpl
12099 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
12101 * reflection.c: support ContructorBuilders in attribute blob creation.
12103 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12105 * reflection.c: some changes to build a binary that can be run
12106 directly in windows.
12108 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
12110 * loader.c: print a big message when an icall can't be found.
12112 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12114 * string-icalls.c: fix bug 24248.
12116 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
12118 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
12119 icall.c, reflection.h: separate assembly loading by pathname and by
12120 assembly name. Use the MONO_PATH env var to search for assemblies.
12122 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
12124 * assembly.c, image.h: add some support for assemblies
12125 with multiple modules.
12126 * class.c, class.h: export mono_class_from_typeref().
12127 * loader.c: remove duplicated code and use mono_class_from_typeref(),
12130 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
12132 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
12133 documentation says (the ECMA one is correct).
12135 2002-05-02 Dick Porter <dick@ximian.com>
12137 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
12138 Don't name the synchronisation mutex.
12140 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
12143 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
12144 Make the prototypes match.
12145 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
12149 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
12150 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
12151 all systems have tm.tm_zone, so use strftime() with %Z to print
12152 the timezone abreviation into a temp string.
12154 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
12155 rather than mono_array_addr() on a MonoString on Big Endian
12158 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
12160 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
12163 2002-04-30 Dick Porter <dick@ximian.com>
12165 * socket-io.c: Cope with SOCKET being an integer rather than a
12168 * threads.c: Added Thread_free_internal, to deal with thread
12169 handle cleanup. Moved calls to handle_store() and handle_remove()
12170 to start_wrapper(), so each can only be called once. Allocate
12171 synchronisation blocks with GC_malloc(), and use GC finalisation
12172 to close the handles.
12174 * icall.c: added System.Threading.Thread::Thread_free_internal
12176 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
12178 * icall.c: support Environment.Exit, CommandLineArgs().
12180 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
12182 * object.c, object.h: added mono_runtime_run_main () and
12183 mono_runtime_get_main_args () for use in System.Environment.
12185 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
12187 * gc.c: fix thinko, enable actual finalization since the jit is now
12190 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
12192 * gc.c, object.c: take into account that an object may be offset wrt the address
12193 returned by GC_malloc().
12195 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
12197 * image.c: handle files without entries in the assembly table (modules).
12199 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
12201 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
12202 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
12203 allowed to be null when it's System.Object class setup.
12205 2002-04-27 Martin Baulig <martin@gnome.org>
12207 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
12208 if `tb->parent == NULL' rather than crashing.
12210 2002-04-28 Nick Drochak <ndrochak@gol.com>
12212 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
12213 calling acos() where asin() should have been called.
12215 2002-04-26 Martin Baulig <martin@gnome.org>
12217 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
12218 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
12219 there's a subdirectory called `System', but we don't want to read that
12220 subdirectory as an assembly.
12222 2002-04-25 Martin Baulig <martin@gnome.org>
12224 * debug-symfile.c: Reflect latest MonoString changes.
12226 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
12228 * rand.c, rand.h: instance method icalls need to have an explicit
12229 this pointer as first argument in the C implementation.
12231 2002-04-25 Nick Drochak <ndrochak@gol.com>
12233 * icall.c: Fix typo in map for GetNonZeroBytes
12235 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
12237 * string-icalls.c : String does now passes unit tests without any
12238 errors, the following changes has been made:
12240 Implemented replace methods.
12241 Renaming of methods to (try) follow the standard.
12242 Fixed compare ordinal
12243 Made all memory allocated directly to function instead of via icall function.
12244 Small performance fix in is_in_array function
12246 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
12248 c (mono_string_Internal_ctor_charp_int_int):
12249 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
12250 sindex < 0, throw ArgumentOutOfRangeException instead of
12251 ArgumentNullException.
12253 Added new check for length == 0, however
12254 I need to make it return String.Empty from the C code.
12256 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
12257 that calculate the length for us here.
12259 (mono_string_Internal_ctor_sbytep_int_int): Replaced
12260 mono_string_new_utf16 with mono_string_new, since value is utf8.
12262 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
12264 * object.c: register the object for finalization if needed.
12265 Allocate one more char in the string for the terminating 0 char.
12267 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
12269 * class.c, class.h, image.c: check if a type implemenst a destructor.
12270 Use the proper key for array class lookups.
12271 * icall.c: register the icalls in the System.GC class.
12272 * gc.c, gc.h: GC-related functions and icalls.
12274 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12278 * unicode.c: free some strings gotten from mono_string_to_utf8 and
12279 changed a couple of free () by g_free ().
12281 * decimal.c: one-liner in the comments for decimal2string ().
12283 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
12285 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
12287 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
12289 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
12290 * object.c (mono_runtime_invoke_array) : handle null in params
12292 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
12294 * string-icalls.c: fixed bug in split (one off bug)
12296 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
12298 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
12299 * icalls.c: added String::Equals as internal method
12301 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
12303 * threads.c: fixed bug in the double interlocked functions
12305 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
12307 * threads.c: implemented all of the new interlocked icalls.
12308 * string-icalls.c: fix a bug in insert.
12309 * icalls.c: added the icalls for interlocked, removed old string functions.
12311 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
12313 * loader.c: fix off-by-one error when reading argument names.
12315 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12317 * profiler.c: win32 counter implementation (untested).
12318 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
12319 (the latter needs testing and more complete impl. from win32 folks).
12321 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
12323 * object.c: mono_array_new_full workaround mono_array_class_get
12326 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
12328 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
12329 * object.h (mono_string_chars): Changed casting type.
12331 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
12333 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
12334 method signatures to use gunichar2 instead of gint16.
12336 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
12338 * object.h, object.c: domain-specific versions of mono_object_new and
12341 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
12343 * object.c: changed String layout
12345 * string-icalls.c (mono_string_Internal_ctor_chara): added
12346 internal string constructors.
12348 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
12350 * threads.c: pass 'this' to the thread start routine.
12352 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12354 * string-icalls.c: fix IndexOf and LastIndexOf. Now
12355 InternalCompareStr don't call twice mono_string_cmp_char for the last
12356 character. Improved performance in mono_string_cmp_char.
12358 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
12360 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
12361 code into its own library: libmonoruntime.
12363 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
12365 * object.h, object.c: changed array format so that szarrays do not
12366 require a bounds structure.
12367 * icall.c, appdomain.c: support for new szarray format.
12369 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
12371 * metadata.c: compare also the retuns type when comparing signatures:
12372 we didn't do this as an optimization since really overloaded methods
12373 must differ also in the arguments, but this doesn't work with
12374 low-level IL code (or when using explicit conversion operators: see
12375 bug#23498 for an example).
12377 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
12379 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
12381 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
12383 * icall.c: make MonoType::GetElementType its own icall.
12385 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
12387 * icall.c: remove MonoMethod_get_Name().
12388 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
12391 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
12393 * string-icalls.c: optimized a few methods.
12395 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
12397 * icall.c: added all new string internal calls
12398 * string-icalls.c: added, new string internal call implementation.
12399 * object.c: added mono_string_new_size for allocating a string a size
12401 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
12403 * object.c (mono_object_isinst): use the same code as in the
12404 optimized x86 version.
12406 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
12408 * profiler.c: TSC-based timer code (faster and more accurate).
12409 Not hooked up in configure, yet (set USE_X86TSC to 1).
12411 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
12413 * profiler.c, profiler.h: track time spent compiling methods.
12414 * threads.c: track thread creation/destruction.
12416 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
12418 * profiler.c, profiler.h, profiler-private.h: profiling interface
12419 and sample implementation. Moved here so that it can be used also by
12422 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
12424 * reflection.c, reflection.h: keep types and other handles separate in
12425 the hash tables for referred tokens. Add guid for modules.
12427 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
12429 * assembly.c: fix bugs found with valgrind.
12430 * metadata.h, metadata.c: added mono_metadata_guid_heap().
12432 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
12434 * threads: added icall support for getting current domain for
12437 2002-04-13 Martin Baulig <martin@gnome.org>
12439 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
12440 (MonoDebugVarInfo): Added `index' field for register based addresses.
12441 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
12442 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
12443 `MonoDebugVarInfo *params' and `guint32 this_offset' with
12444 `MonoDebugVarInfo *this_var'.
12446 * debug-symfile.c (relocate_variable): New static function to write
12447 a location description for a local variable or method parameter.
12449 2002-04-12 Martin Baulig <martin@gnome.org>
12451 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
12452 stack offset and begin/end scope address of a local variable.
12453 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
12454 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
12455 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
12457 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
12458 Added new relocation types for start/end scope of a local variable.
12460 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
12462 * object.h: add mono_object_domain() macro.
12463 * reflection.c: handle typespecs.
12464 * icall.c: MonoMethod::get_Name() implementation.
12466 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12468 * icall.c: String::GetHashCode() icall implementation.
12470 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
12472 * icall.c: String::IndexOfAny icall.
12473 * object.c, object.h: make array->max_length more useful.
12474 Intrduced mono_object_class() and mono_string_length() macros.
12476 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12478 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
12479 instead of g_unichar_isdigit.
12481 2002-04-11 Nick Drochak <ndrochak@gol.com>
12483 * icall.c: Implement a simple Double.ToString().
12485 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
12487 * appdomain.h: only io-layer.h is supposed to be included.
12488 * icall.c: explicitly import environ. Fix warning.
12490 2002-04-10 Nick Drochak <ndrochak@gol.com>
12492 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
12493 return true even if it's not Daylight Savings time.
12494 Only return false for the case where the function isn't
12495 implemented for a plaform (read Windows).
12497 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
12499 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
12502 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
12504 * mempool.c (mono_mempool_alloc): only use g_malloc when
12505 absolutely necessary.
12507 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
12509 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
12511 * class.c (mono_class_vtable): use domain mempool to allocate vtable
12512 (mono_class_proxy_vtable): use domain mempool
12514 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
12516 * appdomain.h, appdomain.c: split initialization that requires the
12517 execution engine support into mono_runtime_init().
12519 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
12521 * class.c (mono_class_init): don't include vtable inside MonoClass
12522 to save some memory, gather some statistics.
12523 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
12525 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
12527 * icall.c: internalcall implementation for ValueType.Equals().
12529 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
12531 * object.c (mono_message_init): moved
12532 (mono_runtime_exec_main): new arch. independent impl.
12533 (mono_runtime_invoke_array): new method - like
12534 mono_runtime_invoke, but you can pass an array of objects.
12535 (mono_remoting_invoke): new arch. independent impl.
12536 (mono_message_invoke): new arch. independent impl.
12537 (mono_runtime_class_init): new arch. independent impl.
12538 (mono_runtime_object_init): new arch. independent impl.
12540 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
12542 * metadata.c, object.c, reflection.c: documented the exported
12545 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
12547 * icall.c: simpler code to pass the assembly builder data to corlib.
12548 Implement GetNestedTypes() internalcall.
12550 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
12552 * class.c: warn if a type can't be loaded.
12554 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
12556 * image.h: typedef MonoImageOpenStatus
12557 * types.h: removed unused file
12559 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
12561 * icall.c: Enum_ToObject accepts enum value arguments.
12563 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
12565 * class.c: move initialization of properties, events and nested
12566 classes, so that they happen for interfaces, too.
12568 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
12570 * icall.c: cleanup some ugly casts in Array_SetValue*.
12572 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
12574 * icall.c: the values array fro enums is of the correct type, now.
12575 Implement (correctly) getFullName instead of assQualifiedName for
12577 * reflection.h, reflection.c: added mono_type_get_name ().
12579 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
12581 * assembly.c, image.h: for each MonoImage, record from wich assembly
12583 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
12584 Make Type.Assembly work.
12586 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
12588 * debug-symfile.h: use char* instead of gpointer to avoid
12591 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
12593 * icall.c (ves_icall_InternalExecute): impl. FielSetter
12594 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
12596 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
12598 * icall.c (mono_message_init): impl. (code cleanup)
12599 (ves_icall_InternalExecute): impl. FieldGetter
12601 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
12602 defined we call all (non-static)methods through the vtable.
12604 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
12606 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
12607 finalizer even though the memory is still referenced (and the chunk of
12608 memory is not freed).
12610 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
12612 * assembly.c: fix brokeness.
12614 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
12616 * class.c: kill some warnings. Check explicit interface method
12617 implementation also without considering the namespace.
12618 Load also literal strings in static class data.
12620 2002-03-29 Miguel de Icaza <miguel@ximian.com>
12622 * assembly.c (default_assembly_name_resolver): Kill memory leak.
12623 (default_assembly_name_resolver): Make the resolver take the
12624 "base" directory where the assembly was originally defined, so we
12625 can load DLLs that are in the same directory as the assembly that
12626 is being referenced.
12628 2002-03-28 Dick Porter <dick@ximian.com>
12634 * unicode.c: Warning cleanups
12636 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
12638 * object.h, reflection.h: use the correct type instead of MonoObject.
12640 2002-03-28 Martin Baulig <martin@gnome.org>
12642 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
12643 (mono_debug_update_symbol_file): Initialize classes if necessary.
12645 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
12647 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
12648 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
12650 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
12652 * assembly.h: fix function prototype.
12653 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
12654 * mono-endian.h: use const cast.
12656 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
12658 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
12660 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
12662 * loader.c: don't assert when a typeref can't be loaded, give
12663 a chance to the runtime to trow an exception instead.
12664 * loader.h: fix warning.
12666 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
12668 * class.c (mono_class_proxy_vtable): added proxy support
12670 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
12672 * icall.c: removed last of PAL calls, added System.Environment
12673 * file-io.h, file-io.c: MonoIO implementation
12674 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
12676 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
12678 * appdomain.c: do not use the byte marker in ldstr table lookup.
12679 * debug-helpers.c: allow two ':' to separate class and method name.
12680 * object.c: allocate arrays bounds with the GC, too.
12681 * verify: add a few more checks.
12683 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
12685 * reflection.c: output also literal strings. Allocate parameter data
12686 with GC_malloc() (thanks, Martin, for catching this!).
12688 2002-03-26 Martin Baulig <martin@gnome.org>
12690 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
12691 include the `this' offset in the `param_offsets'.
12693 2002-03-25 Martin Baulig <martin@gnome.org>
12695 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
12696 mono_debug_get_class() function to get the classes. Added new
12697 relocation types for arrays and strings.
12698 (mono_debug_get_class): New static function to search in all
12699 referenced assemblies for a metadata token.
12701 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
12703 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
12705 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
12706 hold gc-allocated objects. Make the string heap a stream like the
12707 others. Removed duplicated code when writing stream info.
12708 Added asserts to catch possible buffer overflows. Set the sorted map
12709 for tables that need sorting. Added some documentation.
12711 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
12713 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
12714 for interned strings and vtables.
12716 2002-03-24 Martin Baulig <martin@gnome.org>
12718 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
12719 it in the array since it was created with g_slist_prepend().
12721 2002-03-24 Martin Baulig <martin@gnome.org>
12723 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
12724 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
12725 (mono_debug_method_from_token): Renamed to
12726 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
12727 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
12729 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
12732 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
12734 2002-03-24 Martin Baulig <martin@gnome.org>
12736 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
12737 (mono_debug_method_from_token): New func.
12739 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
12740 New interncall, calls mono_debug_local_type_from_signature().
12741 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
12742 calls mono_debug_method_from_token().
12744 2002-03-23 Martin Baulig <martin@gnome.org>
12746 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
12747 specifies the number of bytes to be converted, not the array size.
12748 Return the number of chars, not the number of bytes.
12749 (ves_icall_iconv_get_chars): The `byteCount' argument
12750 specifies the number of bytes to be converted, not the array size.
12752 2002-03-23 Martin Baulig <martin@gnome.org>
12754 * reflection.h (MonoReflectionSigHelper): New type.
12756 * reflection.c (mono_reflection_sighelper_get_signature_local),
12757 (mono_reflection_sighelper_get_signature_local): New functions.
12759 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
12760 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
12763 2002-03-23 Martin Baulig <martin@gnome.org>
12765 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
12766 is_writeable is set.
12767 (mono_raw_buffer_update): New function to write the modified map
12770 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
12772 * debug-symfile.c (mono_debug_update_symbol_file): Call
12773 mono_raw_buffer_update() when done writing.
12775 2002-03-23 Martin Baulig <martin@gnome.org>
12777 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
12779 * debug-symfile.c: Added support for arguments and local variables.
12781 2002-03-23 Dick Porter <dick@ximian.com>
12783 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
12784 protected by ifdefs, hence breaking the w32 build.
12786 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
12788 * object.c: implement is_interned() the right way.
12790 2002-03-21 Martin Baulig <martin@gnome.org>
12792 * debug-symfile.[ch]: New files to handle debugging information
12793 files. There's also support to dynamically update these symbol
12794 files to include machine dependent information.
12796 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
12798 * threads.c (mono_thread_create): new function to create thread
12801 2002-03-20 Martin Baulig <martin@gnome.org>
12803 * icall.c (ves_icall_InternalInvoke): Create a new object if the
12804 method is a constructor.
12805 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
12806 points to ves_icall_InternalInvoke().
12808 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
12810 * file-io.c: Flush shouldn't throw exceptions.
12812 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
12814 * file-io.c: FileStream flush support; FileSetLength now
12815 restores file pointer.
12817 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
12819 * class.c: set image for pointer classes.
12821 2002/03/19 Nick Drochak <ndrochak@gol.com>
12823 * sysmath.c: Forgot one.
12825 2002-03-18 Miguel de Icaza <miguel@ximian.com>
12827 * sysmath.c: Avoid redefining existing names.
12829 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
12831 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
12832 handled by runtime as icall rather than dllimport from libm.so
12833 * file-io.c, file-io.h: fixed handle argument type.
12835 2002-03-18 Dick Porter <dick@ximian.com>
12837 * reflection.c (mono_image_get_type_info): rename interface to
12838 iface, because of "#define interface struct" on windows.
12840 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
12842 * class.c, class.h: rename and export mono_ptr_class_get().
12843 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
12844 * reflection.c, reflection.h, icall.c: better/saner type name
12845 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
12848 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
12850 * class.c (mono_class_init): removed hardcoded GHC_SLOT
12852 * icall.c (ves_icall_InternalInvoke): impl.
12854 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
12856 * reflection.c: output the interface map table, too.
12858 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
12860 * class.c (class_compute_field_layout): separate computation of
12861 static field layout
12863 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
12865 * icall.c: added System.Buffer support.
12866 * file-io.c: moved file icalls from PAL to FileStream.
12868 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
12870 * icall.c (ves_icall_System_Object_GetHashCode): impl.
12872 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
12874 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
12876 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
12878 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
12880 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
12882 * debug-helpers.{c,h}: moved here from monograph some useful functions
12883 to locate a method by name/signature in a class or image. Included
12884 also a small and flexible IL disassembler.
12886 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
12888 * reflection.c: fixup tokens in methods with small header size, too.
12890 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
12892 * object.c (mono_string_to_utf8): remove assert(!error), instead
12895 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
12897 * icall.c: update to the new mono_Array_class_get interface.
12899 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
12901 * appdomain.c, object.c: Boehm-GC enable.
12902 * icall.c: make get_data_chunk() support split data requests.
12903 Ensure a class is initialized in more cases. Return only the first
12904 property found in GetProperties() or the compiler gets confused.
12905 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
12906 * reflection.h, reflection.c: add fixup mechanism for field and method
12907 tokens. Initialize assembly->typeref in a single place. Output
12908 properties after events. Support custom attributes for events, too.
12909 Typo fix for paramter custom attrs.
12911 2002-03-07 Martin Baulig <martin@gnome.org>
12913 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
12915 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
12917 * class.c (mono_array_class_get): fix. for multi. dim. arrays
12919 2002-03-06 Martin Baulig <martin@gnome.org>
12921 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
12922 non-zero lower bounds. See testcases #F10-#F13.
12924 2002-03-05 Martin Baulig <martin@gnome.org>
12926 * exception.c (mono_get_exception_argument_out_of_range): New exception.
12928 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
12929 ves_icall_System_Array_GetValue(), only calculate the absolute array position
12931 (ves_icall_System_Array_SetValue): Likewise.
12932 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
12933 as argument and does the actual work. This function is used when copying a
12934 multi-dimensional array.
12935 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
12936 now do all the widening conversions of value types.
12937 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
12939 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
12941 * class.c: remove some magic numbers and use the smbolic names,
12942 instead. Added init_events() to load event info at class init time.
12943 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
12944 and mono_metadata_methods_from_event().
12945 * reflection.h, reflection.c: added support for writing out the evnets
12946 related information.
12948 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
12950 * reflection.h, icall.c: use a different method (GetInterfaces)
12951 to gather interface info and add isbyref, isprimitive and
12952 ispointer to the ves_icall_get_type_info() return value.
12954 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
12956 * class.h: stared adding support for events.
12957 * icall.c: split find_members implementation. Added debug icall to get
12958 the address of an object.
12959 * reflection.c: handle TypeBuilders in mono_type_get_object().
12961 2002-03-01 Martin Baulig <martin@gnome.org>
12963 * icall.c (ves_icall_System_Array_GetLength): This must throw an
12964 ArgumentOutOfRangeException(), not an ArgumentException().
12965 (ves_icall_System_Array_GetLowerBound): Likewise.
12966 (ves_icall_System_Array_GetValue): Improved argument checking.
12967 (ves_icall_System_Array_SetValue): Improved argument checking.
12969 2002-03-01 Martin Baulig <martin@gnome.org>
12971 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
12972 called with invalid arguments rather than just dying with g_assert().
12973 (ves_icall_System_Array_SetValue): Likewise.
12974 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
12975 raise a NotImplementedException instead.
12976 (ves_icall_System_Array_GetLength): Added argument checking.
12977 (ves_icall_System_Array_GetLowerBound): Added argument checking.
12979 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
12981 * object.h (mono_assert): new macros mono_assert and
12982 mono_assert_not_reached
12984 2002-02-28 Martin Baulig <martin@gnome.org>
12986 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
12987 and "System::String::IsInterned" to "System::String::_IsInterned".
12989 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
12991 * icall.c: remove hacks for typebuilder. Added icall to create a
12992 modified type from a tybebuilder.
12993 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
12994 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
12995 to create a backing MonoClass for a TypeBuilder.
12997 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
12999 * class.c, class.h: more refactoring of class init.
13000 Export mono_class_setup_mono_type() and mono_class_setup_parent().
13002 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
13004 * marshal.c, marshal.h: start of marshaling interface.
13006 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
13008 * icall.c: fix order in assembly qualified name icall.
13010 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
13012 * class.c: do not free str, since we store it in the hash table.
13013 * reflection.h: add label field to MonoILExceptionInfo.
13014 * reflection.c: handle references to more than one assembly. Handle
13015 case when there isn't a module created in the assembly.
13017 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
13019 * class.c: Fix typo. Start refactoring of class init code.
13021 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
13023 * appdomain.c: exit with 1 on error.
13024 * class.c: we already have the name in MonoClassField.
13025 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
13026 MonoStreamHeader instead of an offset of image->raw_metadata.
13028 2002-02-26 Miguel de Icaza <miguel@ximian.com>
13030 * appdomain.c (mono_init): Be even more descriptive about the error.
13032 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
13034 * appdomain.c: give the user an informative message when corlib can't
13037 2002-02-26 Martin Baulig <martin@gnome.org>
13039 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
13040 New icall to get the time zone data.
13042 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
13044 * reflection.c: set virtual and raw size of section correctly.
13045 * threads.c: transfer domain information to newly created threads.
13047 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
13049 * class.c: when instancing a class in a domain, load the default
13050 vaules for static fields from the constant table. Fix System.Enum to
13052 * icall.c: implement Object::GetType() internalcall. Implemented
13053 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
13054 Fixed checking of binding flags in find_members().
13055 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
13056 * reflection.c: handle enumerations when writing to the constant
13057 table. Use a different object cache for types.
13060 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
13062 * object.c (mono_object_isinst): fix for arrays
13064 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
13066 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
13068 * object.c: don't use mprotect () and fix intern pool hash table
13069 lookup for big endian systems.
13071 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
13073 * icall.c: change type_is_subtype_of () signature.
13075 2002-02-21 Mark Crichton <crichton@gimp.org>
13077 * rand.c, rand.h: Added random number generator for
13078 System.Security.Cryptography classes.
13080 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
13082 * icall.c: Added System.Security.Cryptography calls.
13084 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
13086 * class.c, icall.c, metadata.c: better support for pointer types.
13087 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
13088 * reflection.c: Add support for getting custom attrs for properties
13089 and simplify some code.
13091 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
13093 * icall.c: change getToken () and add custom attribute GetBlob()helper
13095 * reflection.h: add custom attrs array to the reflection builder structures.
13096 * reflection.c: encode and emit custom attributes for all the relevant
13097 reflection objects. Cache fieldref and methodref tokens. Change
13098 mono_image_create_token() interface to take a MonoDynamicAssembly.
13099 More complete custom attributes decoder. Load custom attributes for
13100 Assembly, Field, Method and Constructor objects, too. Make the
13101 returned array an Attribute[] one, not object[]. Added
13102 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
13103 custom attribute constructor.
13105 2002-02-20 Dick Porter <dick@ximian.com>
13109 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
13110 problem code out for now).
13112 2002-02-19 Radek Doulik <rodo@ximian.com>
13114 * object.c (mono_ldstr): use hash table to avoid multiple swapping
13116 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
13118 * icall.c: register the GetCustomAttributes method.
13119 * object.c, object.h: add mono_string_new_len ().
13120 * reflection.h, reflection.c: added mono_runtime_invoke(),
13121 mono_install_runtime_invoke(). Added
13122 mono_reflection_get_custom_attrs () to load custom attributes and
13123 create the attribute objects.
13125 2002-02-19 Dick Porter <dick@ximian.com>
13126 * threads-dummy-types.c:
13127 * threads-dummy-types.h:
13130 * threads-pthread-types.c:
13131 * threads-pthread-types.h:
13132 * threads-pthread.c:
13133 * threads-pthread.h: Deleted obsolete files
13135 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
13137 * class.c (mono_class_vtable): runtime init the class when we
13138 allocate static class data.
13140 * icall.c (ves_icall_System_Array_SetValue): check for null values.
13142 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
13143 and String - but we will need generic marshalling support in the
13145 (mono_init): set the domain name in a ms compatible way
13147 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
13150 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
13152 * object.c (mono_array_clone): use alloca() instead of g_malloc
13155 * appdomain.c (mono_domain_unload): impl.
13157 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
13159 * appdomain.c, object.c: fix intern pool implementation.
13160 * class.c: fix alignment code.
13162 2002-02-16 Radek Doulik <rodo@ximian.com>
13164 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
13165 and s2 > s1, just copy lower bytes to be compatible with little
13166 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
13167 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
13169 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
13170 force big_endian to be 1 for big endian machines
13171 (ves_icall_iconv_new_decoder): ditto
13173 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
13175 * socket-io.c (convert_sockopt_level_and_name): If the system
13176 doesn't define SOL_IP or SOL_TCP, get them by hand using
13177 getprotobyname() and caching the values (because this could be a
13179 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
13180 Use the appropriate struct when the system does support it. Ie,
13181 not all systems have struct ip_mreqn so use struct ip_mreq when
13184 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
13186 * reflection.c: handle finally clauses.
13188 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
13190 * socket-io.c: use g_snprintf() instead of snprintf.
13192 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
13194 * reflection.c (mono_param_get_objects): Cast second argument to
13195 mono_method_get_param_names to a const char** to silence the
13198 * appdomain.c (mono_domain_assembly_open): Put parens around the
13199 truth statement in the for-loop.
13201 * unicode.c (iconv_convert): Got rid of a compiler warning about
13202 int i being unused when the system has a new iconv.
13203 (iconv_get_length): Same.
13205 * image.c (load_class_names): Cast the second argument to
13206 g_hash_table_insert() to char* to hush compiler warnings about the
13208 (mono_image_open): Same here.
13210 * socket-io.c: Don't conditionally include sys/filio.h or
13211 sys/sockio.h here anymore since we now get them from
13212 io-layer/io-layer.h
13213 (inet_pton): If the system doesn't support inet_aton, implement
13214 using inet_addr and also #define INADDR_NONE if it isn't defined
13217 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
13219 * metadata.c, metadata.h: added function to get packing and size info
13221 * reflection.h, reflection.c: handle field RVA data. Save info about
13222 the table layout if needed. Assign typedef indexes to all the types
13223 before dumping the info about them to avoid forward reference problems.
13225 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
13227 * socket-io.c (convert_sockopt_level_and_name): ifdef
13228 SO_ACCEPTCONN because it is not defined on my system (old debian)
13230 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
13232 * opcode.c: use stddef.h to get NULL.
13234 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
13236 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
13237 for FIONBIO, FIONREAD and SIOCATMARK.
13238 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
13239 define INADDR_NONE and besides, inet_addr() is deprecated and
13240 should not be used. Use inet_pton() instead - it also has the
13241 added bonus that it can easily handle IPv6 addresses as well.
13242 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
13244 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
13246 * decimal.c: remove _MSC_VER conditional.
13248 2002-02-13 Dick Porter <dick@ximian.com>
13251 * icall.c: Internal calls for Blocking, Select, Shutdown,
13252 GetSocketOption and SetSocketOption
13254 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
13256 * assembly.cs: better resolver: use it instead of some kludgy
13259 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
13261 * reflection.c: the best way to speed-up the compiler is to avoid
13264 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
13266 * class.c (mono_class_vtable): changed the object layout
13267 (obj->vtable->class).
13268 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
13270 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
13272 * assembly.c: look for assemblies in the assembly dir, too.
13274 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
13276 * class.c: fix thinko in mono_class_from_type().
13278 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
13280 * exception.h, exception.c: added TypeLoadException.
13281 * object.h, object.c: added mono_array_clone ().
13282 * icall.c: handle throwOnError in AssemblyGetType().
13283 Added Array.Clone().
13284 * opcode.h, opcode.c: use a single value for the opcode val.
13285 Compile fix for non-gcc compilers.
13287 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
13289 * opcodes.c, opcodes.h: export interesting info about opcodes.
13291 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
13293 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
13296 * class.c (class_compute_field_layout): set element_class for enums
13297 (mono_class_create_from_typedef): set element_class for normal classes
13299 * icall.c (ves_icall_System_Enum_get_value): impl.
13301 * class.c (mono_class_create_from_typedef): do not set valuetype
13302 flag for System.ValueType and System.Enum
13304 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
13306 * unicode.c (iconv_convert): fix big endian problem.
13308 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
13310 * class.c: add asserts if we are ever going to scribble over memory.
13311 * socket-io.c: not all systems have AF_IRDA defined.
13313 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
13315 * class.c (class_compute_field_layout): do not consider static
13316 fields to compute alignment
13318 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
13320 * appdomain.c (mono_appdomain_get): impl.
13321 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
13323 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
13325 * icall.c: ignore "file://" prefix when loading an assembly.
13327 2002-01-23 Dick Porter <dick@ximian.com>
13331 * Makefile.am: Added socket support
13333 2002-01-23 Miguel de Icaza <miguel@ximian.com>
13335 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
13336 code back. This should return the assemblies that are loaded by
13337 the runtime on behalf of an application domain.
13339 The current implementation is still broken, it just returns every
13340 assembly loaded, but until we get real applications domain this
13343 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
13345 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
13348 2002-01-23 Miguel de Icaza <miguel@ximian.com>
13350 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
13351 the mono_class_from_name lookup.
13352 (ves_icall_get_parameter_info): ditto.
13353 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
13355 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
13357 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
13359 * class.c: load also nested classes on class init.
13360 System.ValueType instance methods gets passed boxed
13361 values, unless methods in derived classed that get a pointer to the
13363 * icall.c: use better name parsing code in GetType().
13364 * image.c, image.h: add mono_image_loaded ().
13365 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
13366 * reflection.c, reflection.h: added mono_reflection_parse_type().
13368 2002-01-22 Veronica De Santis <veron78@interfree.it>
13370 * icall.c : Added mapping of internal calls for Manual and Auto reset events
13371 * threads.c : Added the implementation of internal calls for events
13372 * threads.h : Added prototypes of internal calls for events
13374 2002-01-21 Radek Doulik <rodo@ximian.com>
13376 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
13378 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
13380 * class.c (mono_class_init): set min_align to 1 (instead of 0)
13381 (mono_class_value_size): use min_align
13383 2002-01-20 Dick Porter <dick@ximian.com>
13386 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
13387 so it compiles on w32.
13389 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
13391 * metadata.c (mono_type_stack_size): impl.
13393 * class.c (mono_class_get_field): impl. memberref token
13395 2002-01-16 Veronica De Santis <veron78@@interfree.it>
13397 * icall.h : Added the internal calls mapping for CreateMutex_internal
13398 and ReleaseMutex_internal.
13399 * threads.h : Added the prototype of mutexes internal calls.
13400 * threads.c : Added the implementations of mutexes internal calls.
13402 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
13404 * metaparse.h: removed unused file.
13405 * reflection.c, reflection.h: added stream_data_align () function
13406 to align data in streams and keep stream aligned. Add support for
13407 exception support in method headers.
13409 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
13411 * unicode.c: make iconv_convert () return the number of bytess written
13412 in the output buffer.
13414 2002-01-15 Dick Porter <dick@ximian.com>
13415 * threads.c: Make the runtime's idea of infinite timeouts coincide
13416 with the class library's
13418 Fix a particularly egregious bug in mono_thread_cleanup(). That
13419 code was so utterly bogus it must have been written on a Monday.
13421 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
13423 * reflection.h: add subtypes field to TypeBuilder.
13424 * reflection.c: encode constants for literal fields.
13425 Handle subtypes. Fix user string token (and add a zero byte)
13428 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
13430 * class.c (mono_class_init): bug fix: assign slot numbers for
13433 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
13435 * reflection.c: don't try to output a code RVA for abstract methods.
13436 Small fixes for method header format. Output parameter info to the
13437 ParamDef table. Save method overriding info to MethodImpl table.
13438 Fix property support. Allow typedef.extends to be a type in the
13440 * verify.c: fix off-by-one error.
13442 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
13444 * class.c: fix mono_class_from_mono_type () for szarray types.
13445 Remove unused cache check in mono_class_from_type_spec().
13446 * icall.c: *type_from_name () functions handle simple arrays and byref.
13447 * reflection.c: handle byref and szarray types. Handle methods without
13448 body (gets P/Invoke compilation working). Handle types and fields in
13450 * reflection.h: add rank to MonoTypeInfo.
13452 2002-01-10 Dick Porter <dick@ximian.com>
13454 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
13457 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
13459 * icall.c: initialize class in type_from_handle ().
13460 Loop also in parent classes for get_method ().
13461 * reflection.c: properly encode class and valuetype types.
13462 Start on encoding TypeBuilder types. Handle fieldrefs.
13463 Use correct length when registering a user string.
13464 Handle ConstructorBuilder and MonoMethod in get_token ().
13465 Make mono_type_get_object () aware of cached types.
13466 * object.c: back out change to mono_string_new ().
13468 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
13469 * object.c: mono_string_new should return a NULL when the string
13470 passed in is NULL -- not try to deference it.
13472 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
13474 * icall.c: hack to make IsSubType work for TypeBuilders.
13475 * reflection.c: emit constructors before methods.
13476 Retrieve param names in mono_param_get_objects().
13478 2002/01/05 Nick Drochak <ndrochak@gol.com>
13480 * Makefile.am: fix list of headers and sources so automake 1.5
13481 doesn't complain. Removed \# at end of list.
13483 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
13485 * reflection.c: get token for a method ref. Set return type of
13486 constructor to void.
13487 * loader.c: debug message.
13488 * class.c: typo fix.
13490 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
13492 * icall.c: fix array init with rank > 1. FindMembers
13493 loops in parent class as well.
13494 * image.c: do not insert nested types in name cache.
13495 * reflection.c: warning fix.
13496 * reflection.h: add override method (for interface impl).
13498 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
13500 * metadata.c: fix customattr decoding.
13502 2001-12-21 Miguel de Icaza <miguel@ximian.com>
13504 * rawbuffer.cs: Added native Win32 implementation, avoids using
13505 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
13507 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
13509 * class.c: make the low-level routines handle the cache.
13511 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
13513 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
13515 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
13517 * class.c: fix mono_array_element_size() for objects.
13518 * class.h, class.c: add properties to MonoClass and load them
13520 * icall.c: check with isinst() when assigning a value to an array
13521 instead of requiring the classes to match exactly.
13522 Implemented icall for System.Type::GetType().
13523 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
13524 enums. Handle bindingflags when looking for methods and fields.
13525 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
13526 and mono_metadata_methods_from_property().
13527 * reflection.h, reflection.c: added structures for propreties,
13528 parameters and enums. Implemented mono_property_get_object() and
13529 mono_param_get_objects().
13531 2001-12-18 Dick Porter <dick@ximian.com>
13533 * file-io.c: Use mono_string_to_utf16() instead of
13534 mono_string_chars()
13536 * object.c: Added mono_string_to_utf16(), which copies the non
13537 NULL-terminated MonoString into a new double-null-terminated
13540 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
13542 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
13544 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
13546 * file-io.c: raise exceptions if handle is invalid.
13548 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
13550 * assembly.c: yet another check for mscorlib.
13551 * class.c, class.h: load nesting info for classes.
13552 * icall.c: many new functions to support the Reflection classes.
13553 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
13554 * reflection.h, reflection.c: mono_image_create_token(),
13555 mono_assembly_get_object(), mono_type_get_object(),
13556 mono_method_get_object(), mono_field_get_object(): methods to return
13557 objects that parallel the C representation of assemblies, types,
13560 2001-12-11 Dick Porter <dick@ximian.com>
13563 * file-io.c: Internal calls for file IO.
13565 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
13567 * tabledefs.h: missing FileAttributes.
13568 * verify.h, verify.c: use is_valid_string () to simplify and check for
13569 valid strings more correctly. Fix warnings and speeling.
13570 Check more tables: Filed, File, ModuleRef, StandAloneSig.
13571 Check code: branches, maxstack, method calls.
13573 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
13575 * object.c (mono_object_allocate): removed static, so that the jit
13576 can allocate value types.
13578 * icall.c (ves_icall_System_DateTime_GetNow): impl.
13580 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
13582 * class.c: init enum types right away and register the
13583 token->MonoClass map in mono_class_create_from_typedef ().
13584 * verify.h, verify.c: first cut of the verifier.
13585 * pedump.c: add --verify switch to verify metadata tables.
13586 * tabledefs.h: add some missing enums.
13588 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
13590 * class.c (mono_install_runtime_class_init): impl.
13591 (mono_class_init): renamed mono_class_metadata_init to
13592 mono_class_init, also removed the metadata_inited flag
13594 * object.c (mono_object_isinst): use faster algorithm
13596 2001-11-30 Radek Doulik <rodo@ximian.com>
13598 * mono-endian.h: reverted last change
13599 added function prototypes
13601 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
13602 add mono-endian.c back
13604 * mono-endian.c: returned back, as Paolo pointed out, it's needed
13605 for unaligned access, I've mistaked it with endianess. I am
13607 (mono_read16): fix reverted endianess
13608 (mono_read64): ditto
13609 (mono_read32): ditto
13611 2001-11-30 Dick Porter <dick@ximian.com>
13613 * exception.c: Implement mono_exception_from_name()
13615 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
13617 * metadata.h, metadata.c: remove params_size and locals_size and their
13618 calculation from the metadata code: they are only usefult to the
13621 2001-11-29 Radek Doulik <rodo@ximian.com>
13623 * object.c (mono_ldstr): swap bytes here, it's probably not the
13624 best place, but works for me now, I'll redo it once I know mono
13625 better, also note that I add PROT_WRITE and don't reset back, also
13626 note that it's only affects big endians, so x86 should be OK
13628 * mono-endian.h (read16): use just glib macros for both endians
13630 * mono-endian.c: removed as glib macros are used in in
13631 mono-endian.h so we don't need to care about endianess for read
13632 macros as glib does that for us already
13634 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
13636 * class.h, class.h: take minimum alignment into consideration so
13637 that the fields of a class remain aligned also when in an array.
13639 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
13641 * loader.h, loader.c: add mono_method_get_param_names().
13642 * class.c: 0-init class fields.
13644 2001-11-26 Dick Porter <dick@ximian.com>
13648 * threads.c: New file that handles System.Threading on all platforms
13651 * object.h: Remove the synchronisation struct from MonoObject,
13652 replace it with a pointer that gets initialised on demand
13654 * Makefile.am: Replace all the system-specific threading code with
13655 a single file that uses the new wrapper library
13657 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
13659 * class.c, class.h: add mono_install_trampoline() so that the runtime
13660 can register a function to create a trampoline: removes the ugly
13661 requirement that a runtime needed to export arch_create_jit_trampoline.
13662 * object.h, object.c: added mono_install_handler() so that the runtime
13663 can install an handler for exceptions generated in C code (with
13664 mono_raise_exception()). Added C struct for System.Delegate.
13665 * pedump.c: removed arch_create_jit_trampoline.
13666 * reflection.c: some cleanups to allow registering user strings and
13667 later getting a token for methodrefs and fieldrefs before the assembly
13669 * row-indexes.h: updates and fixes from the new ECMA specs.
13671 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
13673 * class.h, class.c: add enum_basetype field to MonoClass.
13674 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
13675 to get index in the constant table reated to a field, param or
13677 * reflection.h, reflection.c: handle constructors. Set public-key and
13678 version number of the built assembly to 0.
13679 * row-indexes.h: update from new ECMA spec.
13681 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
13683 * class.h, class.c: add a max_interface_id to MonoClass.
13684 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
13685 since it's used to do that. Added mono_type_type_from_obj().
13686 Make GetType() return NULL instead of segfaulting if the type was not
13687 found. Handle simple arrays in assQualifiedName.
13688 * object.h: add a struct to represent an Exception.
13689 * reflection.c: output call convention in method signature.
13690 Add code to support P/Invoke methods and fixed offsets for fields.
13692 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
13694 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
13696 * icall.c: use mono_array_addr instead of array->vector: fixes the
13697 reflection image writing.
13698 * reflection.c: init call convention byte to 0 in method signature.
13699 Encode the property signature. Don't output property-related methods
13700 twice. Really process the properties for a type (don't cast a field to
13701 a property, my mom always told me that).
13702 Fix 64 bit issues in pointer alignment in a different and more
13705 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
13707 * loader.h: Removed type class from MonoDefaults, added monotype
13709 * loader.c: Loaded MonoType, removed loading of Type
13711 * icall.c (my_mono_new_object): Now returns a System.MonoType,
13712 and fills in System.Type._impl with a RuntimeTypeHandle rather
13713 than the actual MonoClass *
13715 (ves_icall_type_from_handle): change from type_class to
13718 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
13721 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
13724 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
13726 (ves_icall_System_Reflection_Assembly_GetType): implemented
13728 (ves_icall_System_MonoType_assQualifiedName): implemented
13730 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
13732 2001-11-09 Miguel de Icaza <miguel@ximian.com>
13734 * assembly.c (mono_assembly_open): Implement a cache for the
13737 (mono_assembly_close): only destroy the assembly when the last
13740 2001-11-09 Dick Porter <dick@ximian.com>
13742 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
13744 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
13746 * class.c (mono_class_metadata_init): bug fix: compute the right slot
13748 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
13750 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
13751 from Martin Weindel.
13752 * object.h: add mono_string_chars ().
13754 2001-11-07 Miguel de Icaza <miguel@ximian.com>
13756 * reflection.c (build_compressed_metadata): Eliminates warnings
13757 and uses 64-bit clean code.
13759 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
13760 (mono_type_equal): Change signature to eliminate warnings.
13762 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
13764 * icall.c, loader.c: remove the internalcall array constructors.
13765 Changes to match the new MonoArray structure.
13766 * object.h, object.c: an array object doesn't allocate an extra
13767 vector. Add mono_array_new_full () to create jagged arrays easily.
13769 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
13771 * metadata.h, metadata.c: add mono_metadata_field_info () to
13772 retreive all the info about a field from vairous tables.
13773 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
13774 * class.h, class.c: augment MonoClassField with more info.
13775 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
13776 policy and load a field's RVA if needed.
13778 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
13780 * class.c (mono_class_metadata_init): create a trampoline for all
13781 virtual functions instead of actually compiling them.
13783 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
13785 * class.h, class.c: include name in MonoClassField.
13786 * class.c: fix fundamental type of System.Object and System.String.
13787 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
13789 * icall.c: remove internalcalls for the Reflection stuff that is now
13791 * loader.c: mono_field_from_memberref () implementation.
13792 * mono-endian.c: thinko (s/struct/union/g).
13793 * object.c, object.h: make the mono_string_* prototypes actually use
13794 MonoString instead of MonoObject.
13795 * reflection.c, reflection.h: updates for changes in the reflection
13796 code in corlib: we use C structures that map to the actual C# classes.
13797 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
13798 fat method header if needed and use the info from the ILGenerator for
13799 methods. Handle fields in types. Misc fixes.
13801 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
13803 * class.c (mono_class_metadata_init): bug fix: always allocate
13804 space for static class data
13806 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
13808 * class.c (mono_compute_relative_numbering): use relative
13809 numbering to support fast runtime type checks.
13811 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
13813 * class.c (mono_class_create_from_typeref): added debugging output
13814 to print class name when MonoDummy is returned instead of real class
13816 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
13818 * class.c (mono_class_metadata_init): interface offset table now
13819 contains pointers into the vtable - this is more efficient for the jit
13821 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
13823 * class.c (mono_class_metadata_init): use a temporary vtable (the
13824 old algorithm only worked for the interpreter, but not for the jit)
13826 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
13828 * loader.c (method_from_memberref): use mono_class_get to get the
13829 class of an array instead of using System.Array directly.
13830 (mono_get_method): also add MEMBERREF methods to the method cache
13831 which usefull for arrays.
13833 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
13835 * pedump.c (arch_compile_method): added to compute vtable entry
13837 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
13838 number of interfaces.
13840 * class.h: merged MonoArrayClass into MonoClass
13842 * class.c (mono_class_create_from_typedef): compute the vtable size and
13843 allocate space to include the vtable inside MonoClass
13844 (mono_class_metadata_init): initialize the vtable
13846 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
13848 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
13849 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
13850 * image.c: endian fixes by Laurent Rioux.
13851 * object.h, object.c: rename MonoStringObject to MonoString and
13852 MonoArrayObject to MonoArray. Change some function names to conform to
13853 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
13854 guint16* as first argument, so don't use char*.
13855 Provide macros to do the interesting things on arrays in a portable way.
13856 * threads-pthread.c: updates for the API changes and #include <sched.h>
13857 (required for sched_yield()).
13858 * icall.c: updates for the API changes above.
13859 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
13860 platforms that need them.
13862 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
13864 * class.c: set the correct type for all the fundamental
13865 type when loading the class.
13867 2001-10-05 Dick Porter <dick@ximian.com>
13869 * threads-pthread.c (pthread_mutex_timedlock): Simple
13870 compatibility version for C libraries that lack this call.
13872 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
13874 * class.c: MonoTypes stored in MonoClass are stored as
13875 fundamental MonoTypes when the class represents a
13876 fundamental type (System.Int32, ...).
13877 The TypeHandle return by ldtoken is a MonoType*.
13878 * icall.c: ves_icall_get_data_chunk () write out all the
13879 PE/COFF stuff. Implement ves_icall_define_method (),
13880 ves_icall_set_method_body (), ves_icall_type_from_handle ().
13881 * image.c: properly skip unknown streams.
13882 * loader.h, loader.c: add type_class to mono_defaults.
13883 * metadata.c, metadata.h: export compute_size () as
13884 mono_metadata_compute_size () with a better interface.
13885 Typo and C&P fixes.
13886 * pedump.c: don't try to print the entry point RVA if there is no entry point.
13887 * reflection.c, reflection.h: many cleanups, fixes, output method
13888 signatures and headers, typedef and typeref info, compress the metadata
13889 tables, output all the heap streams, cli header etc.
13890 * row-indexes.h: typo fixes.
13892 2001-10-04 Dick Porter <dick@ximian.com>
13894 * object.h: Add a synchronisation mutex struct to MonoObject
13896 * object.c (mono_new_object): Initialise the object
13897 synchronisation mutexes
13899 * icall.c: System.Threading.Monitor internal calls
13901 * threads-pthread.h:
13902 * threads-pthread.c: System.Threading.Monitor internal calls
13904 * threads-types.h: New file, includes the system-specific thread
13907 * threads-pthread-types.h:
13908 * threads-pthread-types.c: New files, handle pthread-specific
13909 synchronisation types
13911 * threads-dummy-types.h:
13912 * threads-dummy-types.c: New files of dummy support for
13913 thread-specific types
13917 * pedump.c: include mono-endian.h not endian.h
13919 * Makefile.am: More threads files.
13920 Name mono-endian.h not endian.h
13922 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
13924 * Makefile.am, reflection.h, reflection.c: move here the reflection related
13925 stuff and implement a few more bits.
13926 * icall.c: a field needs to be dereferenced twice. Do not use the same
13927 name for two variables in the same scope.
13928 * image.c, image.h: cleanups.
13930 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
13932 * class.c (mono_class_metadata_init): bug fix: compute the right size
13934 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
13936 * icall.c: implemented some of the Reflection internalcalls.
13937 * image.c, image.h: start writing out the PE/COFF image.
13938 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
13939 that does the reverse than decode_blob_size ().
13940 * object.c: use mono_metadata_encode_value (). Move here
13941 temporary implementation of mono_string_to_utf8 ().
13942 * rawbuffer.c: make malloc_map static.
13944 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
13946 * metadata.c: fix type comparison for arrays.
13947 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
13948 Added a couple of new classes to monodefaults.
13949 * icall.c: added a couple of Reflection-related internalcalls.
13950 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
13951 Added a byval_arg MonoType to MonoClass.
13953 2001-09-28 Dick Porter <dick@ximian.com>
13956 * threads-pthread.h:
13957 * threads-pthread.c: Implemented internal calls for
13958 LocalDataStoreSlot operations. Applied mutexes around all shared
13959 data. Reworked the thread creation and Start() operations to
13960 avoid a race condition.
13963 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
13965 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
13967 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
13969 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
13971 * class.c, loader.c: warn and return NULL instead of erroring out.
13972 * icall.c: added System.AppDomain::getCurDomain().
13973 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
13975 2001-09-25 Dick Porter <dick@ximian.com>
13977 * threads-pthread.h:
13978 * threads-pthread.c: Implemented timed thread joining and added
13979 System.Threading.Thread::Join_internal internal call
13981 * icall.c: Added System.Threading.Thread::Join_internal internal call
13984 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
13986 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
13988 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
13989 mono_string_intern () to implement the semantics of the ldstr opcode
13990 and the interning of System.Strings.
13991 * icall.c: provide hooks to make String::IsIntern and String::Intern
13994 2001-09-23 Dick Porter <dick@ximian.com>
13997 * threads-dummy.h: New files of dummy threading routines
13999 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
14000 support code based on system specifics
14002 Rename PTHREAD_LIBS to THREAD_LIBS
14004 2001-09-23 Dick Porter <dick@ximian.com>
14006 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
14007 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
14009 (mono_thread_init): Set up a Thread object instance to return when
14010 the main thread calls Thread.CurrentThread
14011 (mono_thread_cleanup): Wait for all subthreads to exit
14013 * icall.c: New internal calls for System.Threading.Thread::Sleep
14014 (including Schedule) and CurrentThread
14016 * threads.h: New file, to insulate thread-specific stuff from the
14019 2001-09-21 Dick Porter <dick@ximian.com>
14021 * threads-pthread.h:
14022 * threads-pthread.c: New file, for handling pthreads-style
14023 threading support. Start() now starts a new thread and executes
14024 the ThreadStart delegate instance.
14026 * icall.c: Added the internalcall for
14027 System.Threading.Thread::Start_internal
14029 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
14031 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
14033 * loader.c: work around the different signatures for delegates
14034 constructors csc generates in compiled code vs the ones compiled in mscorlib.
14036 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
14038 * class.h, class.c: add mono_class_get_field_from_name ().
14039 * *: Fix C comments and other ANSI C issues.
14041 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
14043 * endian.h, assembly.c: fix some endianness issues.
14045 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
14047 * loader.h, load.c: add delegate_class to mono_defaults.
14048 Handle runtime provided methods in mono_get_method ().
14050 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
14052 * loader.c (mono_get_method): use pinvoke for internal call
14054 * icall.c: use pinvoke for internal call
14056 * loader.c (method_from_memberref): set the method name
14058 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
14060 * metadata.c: help the compiler generate better code for
14061 mono_class_from_mono_type ().
14063 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
14065 * class.c (mono_class_metadata_init): delayed computing of the
14066 class size to mono_class_metadata_init ()
14068 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
14070 * class.c, class.h: add an interfaces member to MonoClass.
14071 * image.c, image.h: add assembly_name field to MonoImage
14072 from the assembly table.
14073 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
14075 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
14077 * class.c: Handle Array in mono_class_from_mono_type ().
14078 * metadata.c, pedump.c: some endian fixes.
14080 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
14082 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
14083 * metadata.c: fix small problem introduced with the latest commit.
14085 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
14087 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
14088 We don't need a MonoMetadata pointer anymore to compare signatures in
14089 mono_metadata_signature_equal (), update callers.
14090 Reduced memory usage an number of allocations for MonoMethodHeader and
14091 MonoMethodSignature.
14093 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
14095 * metadata.c: added compare for szarray.
14097 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
14099 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
14100 and add a couple more types to it and mono_defaults. Give an hint on
14101 classes that need implementing in our corlib and are referenced
14104 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
14106 * class.h, class.c: keep track if a class is also an Enum.
14107 * loader.c: Implement a couple more types for use in libffi
14108 marshalling. Gives better diagnostics when failing to dlopen
14109 a library. Set method->klass for P/Invoke methods, too.
14111 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
14113 * class.c, class.h: add a MonoType this_arg to MonoClass that
14114 represents a pointer to an object of the class' type that
14115 can be used by the interpreter and later the type cache.
14116 Add best guess alignment info for valuetype objects.
14118 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
14120 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
14121 into MonoType: one less level of indirection and allocation and
14122 simplifies quite a bit of code. Added cache for MonoTypes that are
14123 used frequently, so that we don't need to allocate them all the time.
14125 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
14127 * class.c (mono_class_create_from_typedef): System.Enum is also a
14128 value type, although it does not derive from System.ValueType
14129 (maybe a bug in the ms compiler?)
14131 * metadata.c (mono_type_size): return the right size for value types
14133 * loader.c (mono_get_method): only initialize method header if not abstract
14135 * class.c (mono_class_from_mono_type): use mono_default values.
14137 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
14139 * *: use MonoClass pointers instead of <type_tokens>
14141 * class.h: new flag: metadata_inited.
14143 * class.c (mono_class_metadata_init): impl.
14144 (mono_class_instance_size): impl.
14145 (mono_class_data_size): impl.
14147 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
14149 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
14150 MonoClass now has the name and name_space fields.
14151 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
14152 mono_get_method () takes and optional MonoClass as argument.
14153 Removed mono_typedef_from_name() and added mono_class_token_from_name()
14154 instead that takes advantage of a map from class names to typedef
14155 tokens in MonoImage.
14157 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
14159 * metadata.c: zero is not a valid alignment boundary.
14160 Merge MONO_TYPE_VOID in default decoding code.
14162 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
14164 * image.h: merged MonoMetadata into MonoImage
14166 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
14167 identify the type of elements.
14169 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
14171 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
14172 * cil-coff.h: split MonoMSDOSHeader and add size info.
14173 * image.c: add some consistency checks.
14174 * metadata.c: fix row size computation: one programmer
14175 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
14176 add explanation for the locator routine.
14177 Fix decoding of size in method header.
14179 2001-08-20 Miguel de Icaza <miguel@ximian.com>
14181 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
14182 (g_concat_dir_and_file): Bring g_concat_dir_and_file
14183 function from gnome-libs. This uses the right path separator
14184 based on the OS, and also works around a bug in some systems where
14185 a double slash is not allowed.
14186 (default_assembly_name_resolver): Use g_concat_dir_and_file
14187 (mono_assembly_open): ditto.
14189 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
14191 * metadata.c (mono_metadata_signature_equal): impl.
14193 * *: void is now a realy MonoType (instead of using NULL)
14195 * metadata.c (do_mono_metadata_parse_type): use
14196 mono_metadata_parse_type to parse void value.
14198 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
14200 * metadata.c, metadata.h: in the signature and method header store
14201 only the space required for holding the loca vars and incoming arguments.
14203 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
14205 * metadata.c (do_mono_metadata_parse_type): treat void like any
14206 other type (instead of assigning NULL);
14208 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
14210 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
14212 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
14214 * image.c (do_mono_image_open): added a cache for arrays.
14216 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
14218 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
14219 decode a single column from a row in a metadata table and changes
14220 to take advantage of it in the typedef locator (gives a nice speed up).
14221 Store offset info for function params.
14223 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
14225 * image.h (MONO_IMAGE_IS_CORLIB): removed
14227 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
14229 * assembly.c: how could mono_assembly_close () had ever worked?
14230 * metadata.c, metadata.h: provide offset info for local vars.
14231 Implement mono_type_size () to take care of alignment as well
14232 as size (it was mono_field_type_size in cli/class.c before).
14234 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
14236 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
14238 * assembly.h (CORLIB_NAME): set to corlib.dll
14240 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
14242 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
14244 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
14245 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
14246 tokentype.h: massive namespace cleanup.
14248 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
14250 * metadata.h, metadata.c: decode exception clauses when parsing method header.
14252 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
14254 * metadata.c (mono_metadata_free_type): added check for type !=
14255 NULL (void) before calling mono_metadata_free_type()
14257 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
14259 * metadata.h, row_indexes.h: added header with enumerations to use
14260 to index in the columns from tables in metadata and to decode coded
14261 tokens: we should start using this instead of embedding magic numbers
14264 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
14266 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
14267 Move metadata_t info from cli_image_info_t to MonoImage, where
14268 it's easily accessible. Changed all the uses accordingly.
14269 Added the method and class caches to MonoImage.
14270 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
14271 and mono_metadata_decode_value () signature to be more consistent
14272 with the other parse functions (and simplify code). Taken advantage
14273 of zero-length array allocation with GCC. Removed reduntant (and
14274 wrong) MonoFieldType struct and use MonoParam instead. Changed
14275 mono_metadata_parse_field_type () to use common code for parsing.
14276 Added mono_metadata_typedef_from_field () and
14277 mono_metadata_typedef_from_method () to lookup a typedef index from a
14278 field or method token.
14279 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
14281 2001-07-23 Miguel de Icaza <miguel@ximian.com>
14283 * metadata.c (mono_metadata_parse_field_type): Implement.
14284 (do_mono_metadata_parse_type): Split engine from
14285 mono_metadata_parse_type, so that we can create smaller structures
14286 for things that just have one pointer to the MonoType (look at
14289 2001-07-20 Miguel de Icaza <miguel@ximian.com>
14291 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
14292 as Jan Gray found out, it is incorrect.
14294 2001-07-18 Miguel de Icaza <miguel@ximian.com>
14296 * assembly.c: Implement asssembly loading. This loads an image
14297 and loads all the referenced assemblies. Come to think of it, we
14298 could always do lazy loading of the assemblies.
14300 * image.c (mono_image_open): Keep loaded images in a hashtable.
14302 * image.h (MonoImage): Add reference count.
14304 2001-07-17 Miguel de Icaza <miguel@ximian.com>
14306 * assembly.c (mono_assembly_open): Keep track of the file name in
14307 case the assembly has no ASSEMBLY table.
14309 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
14312 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
14314 * metadata.c, metadata.h: decode local vars in method header
14315 parse function. Change callers accordingly.
14317 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
14319 * metadata.h, cil-coff.h: protect against multiple inclusion.
14320 Added some new structures to hold information decoded from metadata:
14321 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
14322 and relevant decoding/free functions.
14323 * metadata.c: implement decoding functions. Add warning for out of bounds
14324 index in mono_metadata_locate(). Implement mono_get_method () to retreive
14325 all the info about a method signature and invocation. Remove check on
14326 uninitialized local var in parse_mh() and fix memory leak.
14328 2001-07-12 Miguel de Icaza <miguel@ximian.com>
14330 * metadata.h: More macros.
14332 * tokentype.h: New file.
14334 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
14336 * assembly.c: added a consistency check and initialize
14337 some structures with g_new0().
14338 * metadata.c: fixed a couple more bugs in table size computation
14339 and add other checks for out-of bound access to metadata.
14341 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
14343 * metatada.c: fix bugs computing table sizes. Spew a
14344 warning when index in string heap is out of bounds.
14346 2001-07-04 Miguel de Icaza <miguel@ximian.com>
14348 * metadata.h: Add a couple of macros to manipulate tokens.
14350 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
14352 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
14353 cli_section_tables).
14355 2001-07-01 Miguel de Icaza <miguel@ximian.com>
14357 * metadata.c (mono_metadata_user_string): New function, provides
14358 access to the UserString heap.
14360 2001-06-27 Miguel de Icaza <miguel@ximian.com>
14362 * metadata.c: Add inline documentation.
14364 2001-06-26 Miguel de Icaza <miguel@ximian.com>
14366 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
14369 2001-06-22 Miguel de Icaza <miguel@ximian.com>
14371 * typeattr.h: New file, TypeAttribute flags.
14373 2001-06-21 Miguel de Icaza <miguel@ximian.com>
14375 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
14376 mono_assembly_ensure_section): Section loading code.
14377 (load_section_tables): Load the sections.
14379 * mono/metadata/metadata.c (mono_metadata_locate_token,
14380 mono_metadata_locate): Functions to locate the information
14381 definition given a token or a table and an index.
14382 (mono_metadata_compute_table_bases): New.
14383 (compute_size): New function to compute the sizes of the various
14386 * mono/metadata/metadata.h: Finish listing the different index
14389 * mono/metadata/pedump.c: Improve to dump new information.
14391 2001-06-19 Miguel de Icaza <miguel@ximian.com>
14393 * mono/metadata/metadata.c: Entered all the tables matching
14396 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2