1 2010-04-08 Zoltan Varga <vargaz@gmail.com>
3 * threads.c (mono_thread_suspend_all_other_threads): Call ensure_synch_cs_set ()
4 to avoid crashes on newly created threads.
6 2010-04-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
8 * file-io.c: reset the MonoIOStat structure in case of error.
11 2010-04-06 Rodrigo Kumpera <rkumpera@novell.com>
13 * class.c (print_implemented_interfaces): Print proper type name.
15 * class.c (mono_class_setup_vtable): Don't try that hard to produce
16 the override map for generic instances since it later ignored.
18 * class.c (mono_class_implement_interface_slow): Don't break for
19 dynamic generic instances.
21 * object.c (mono_runtime_invoke_array): Add an assert for allocation.
23 * reflection.c (mono_reflection_method_get_handle): New method that
24 resolves a method handle.
26 * reflection.c (mono_reflection_get_dynamic_overrides): Handle the
27 case when we override methods from a dynamic generic instance interface.
31 2010-04-05 Gonzalo Paniagua Javier <gonzalo@novell.com>
33 * threadpool.c: don't attempt to close the pipe when it has not been
36 2010-04-05 Gonzalo Paniagua Javier <gonzalo@novell.com>
38 * threadpool.c: if there are no waiting threads, try to start a new
39 one. This fixes the not-so-random hangs in System.ServiceModel tests.
40 No need to use InterlockedCompareExchange to read volatile variables.
42 2010-04-05 Rodrigo Kumpera <rkumpera@novell.com>
44 * verify.c (verify_type_compatibility_full): Fail mixed valuetype
45 and reference types that point to the same class.
49 2010-04-05 Rodrigo Kumpera <rkumpera@novell.com>
51 * verify.c (verify_stack_type_compatibility_full): Ignore constraints
52 when verifying compatibility between a generic instance and a generic
55 * verify.c (check_is_valid_type_for_field_ops): Improve error message.
57 * verify.c (stack_slot_stack_type_full_name): Improve verification type
62 2010-04-04 Mark Probst <mark.probst@gmail.com>
64 * sgen-gc.c: Remove superfluous scanning of alloc-pinned objects.
66 2010-04-04 Zoltan Varga <vargaz@gmail.com>
68 * threads.c Applied some openbsd changes from Robert Nagy <robert@openbsd.org>.
70 2010-04-03 Marek Habersack <mhabersack@novell.com>
72 * process.c: when cross-compiling with MinGW, force GetProcessId
73 lookup using GetProcAddress.
75 2010-04-02 Mark Probst <mark.probst@gmail.com>
77 * sgen-gc.c: parse_environment_string_extract_number() must be
80 2010-04-02 Mark Probst <mark.probst@gmail.com>
82 * sgen-gc.c, sgen-gray.c: Macros for gray_object_enqueue() and
83 gray_object_dequeue(), to make sure they're inlined.
85 2010-04-02 Mark Probst <mark.probst@gmail.com>
87 * sgen-gc.c, sgen-gray.c: Fix a few debug levels, put a few
88 asserts in inner loops into DEBUG and lower MAX_DEBUG_LEVEL.
90 2010-04-02 Jb Evain <jbevain@novell.com>
92 * exception.c: remove dead code.
94 2010-04-02 Zoltan Varga <vargaz@gmail.com>
96 * *-gc.c: Fix the signature of mono_gc_get_used/heap_size () to be consistent
99 2010-04-01 Sanjoy Das <sanjoy@playingwithpointers.com>
101 * sgen-gc.c: Make the nursery size adjustable by the
102 MONO_GC_PARAMS environment variable.
104 Code is contributed under MIT/X11 license.
106 2010-04-01 Gonzalo Paniagua Javier <gonzalo@novell.com>
108 * threadpool.c: threadpool threads wait is alertable.
110 Reduced the stack size of the *poll_wait thread.
112 2010-04-01 Sebastien Pouliot <sebastien@ximian.com>
114 * exception.c|metadata-internals.h: Add new mono_get_exception_
115 field_access_msg and mono_get_exception_method_access_msg
116 functions that accept a const char* parameter to provide more
117 details when the exception is thrown.
118 * security-core-clr.c|h: Rework code to allow logging exceptions
119 (export MONO_LOG_MASK="security") and to supply more details in
120 [TypeLoad|MethodAccess|FieldAccess]Exception thrown. Also added
121 mono_security_core_clr_is_field_access_allowed and
122 mono_security_core_clr_is_call_allowed to return an exception,
123 with messages and logging, that can be emitted by method-to-ir.c
125 2010-04-01 Mark Probst <mark.probst@gmail.com>
127 * sgen-gc.c, sgen-pinning-stats.c: In the heap-dump, dump each
130 2010-04-01 Zoltan Varga <vargaz@gmail.com>
132 * appdomain.c (mono_domain_assembly_postload_search): Avoid a crash/assert if
133 the assembly name is not well formed utf8. Fixes #567882.
135 2010-04-01 Zoltan Varga <vargaz@gmail.com>
137 * reflection.c (mono_reflection_create_generic_class): Set the flags field of
138 the generic parameters from the builder. Fixes #473298.
140 2010-03-31 Miguel de Icaza <miguel@novell.com>
142 * object.c (mono_class_proxy_vtable): Eliminate warning.
144 * marshal.c (emit_marshal_boolean): Eliminate possible
145 uninitialized local warning.
147 2010-03-30 Sebastien Pouliot <sebastien@ximian.com>
149 * class.c (mono_class_init): Postpone coreclr inheritance check
150 until the end of the initialization (so we can check up the
151 default ctor manually for the core-clr inheritance rules).
152 * security-core-clr.c: Add the missing (undocumented) checks on
153 default constructors when verifying inheritance rules.
155 2010-03-30 Rodrigo Kumpera <rkumpera@novell.com>
157 * domain-internals.h (MonoJitExceptionInfo): Add new field
158 handler_end to the data union. To be used to point the end
161 2010-03-30 Rodrigo Kumpera <rkumpera@novell.com>
163 * reflection.c: Add support for new v4 type
164 System.Reflection.MonoModule that is the concrete version
165 of Module which is abstract unver v4.
167 2010-03-30 Rodrigo Kumpera <rkumpera@novell.com>
169 * class.c (mono_class_init): Don't set class failure after
170 inited = 1 is set. It must be done before.
172 2010-03-30 Andreas Färber <andreas.faerber@web.de>
174 * mono-config.c: Add support for OS "haiku"
175 * ChangeLog: Fix UTF-8 encoding
177 Code is contributed under MIT/X11 license.
179 Tue Mar 30 15:53:06 CEST 2010 Paolo Molaro <lupus@ximian.com>
181 * console-unix.c: fixed include logic for sys/ioctl.h.
183 2010-03-30 Mark Probst <mark.probst@gmail.com>
185 * threads.c: Fix bitmap generation for TLS marking on 64 bit
188 2010-03-30 Zoltan Varga <vargaz@gmail.com>
190 * icall.c (ves_icall_System_Enum_get_underlying_type): Don't crash on
191 unfinished/broken typebuilders.
193 2010-03-29 Mark Probst <mark.probst@gmail.com>
195 * sgen-gc.c: Use the same heuristic for the LOS target that we use
196 for the minor section allowance.
198 2010-03-29 Raja R Harinath <harinath@hurrynot.org>
200 * metadata-verify.c (INVALID_METHOD_IMPLFLAG_BITS): Allow bit 6
203 2010-03-29 Mark Probst <mark.probst@gmail.com>
205 * sgen-gc.c: Count bytes allocated with heavy statistics.
207 2010-03-29 Mark Probst <mark.probst@gmail.com>
209 * sgen-gc.c: More detailed time statistics.
211 Mon Mar 29 11:52:34 CEST 2010 Paolo Molaro <lupus@ximian.com>
213 * gc-internal.h, sgen-gc.c, threads.c, utils/mono-hash.c:
214 fix the user defined mark interface to pass a pointer
215 to the object location and not the object itself.
217 2010-03-27 Rodrigo Kumpera <rkumpera@novell.com>
219 * reflection.c (mono_method_body_get_object): Release
220 the method header before the call to CACHE_OBJECT since
221 this is a macro that returns.
223 2010-03-26 Rodrigo Kumpera <rkumpera@novell.com>
225 * class.c (inflate_generic_type): mono_metadata_type_dup
226 already dupes array information, the g_memdup was just
229 2010-03-26 Rodrigo Kumpera <rkumpera@novell.com>
231 * verify.c: Add stack_peek function. Fix CEE_DUP
232 to not read from invalid memory if push did expand
235 2010-03-26 Rodrigo Kumpera <rkumpera@novell.com>
237 * verify.c: Remove old table verification code that has
238 been superseeded by the new metadata verifier.
240 * verify.h: Remove mono_image_verify_tables from the public
243 * pedump.c: Fix for removed bits.
245 2010-03-26 Rodrigo Kumpera <rkumpera@novell.com>
247 * verify.c: Allocate stack slows lazily to reduce stack usage
248 in case of methods with huge stacks. Reduces memory consumption
249 for mcs yyparse from 459Mb to 1.8Mb.
251 2010-03-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
253 * threadpool.c: don't try executing items from domains being
254 unloaded. Fixes appdomain-async-invoke test.
256 2010-03-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
258 * threadpool.c: spin while the threadpool initializes.
259 * mono-wsq.c: if the WSQ has not been initialized or has been shut
260 down, don't do anything.
262 2010-03-26 Zoltan Varga <vargaz@gmail.com>
264 * threads.c (mono_thread_create_internal): Set the GC type of the
265 threads_starting_up hash table.
267 2010-03-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
269 * threadpool.c: reset 'state' to avoid returning non-null when the
270 event type is not found.
272 Fri Mar 26 19:03:09 CET 2010 Paolo Molaro <lupus@ximian.com>
274 * sgen-gc.c: make copy_object () take the address of the
275 slot holding the reference. This allows saving memory stores
276 when not needed and it allows keeping track of oldspace->nursery
277 references for the card table code.
279 2010-03-26 Andreas Färber <andreas.faerber@web.de>
281 * null-gc.c (mono_gc_invoke_with_gc_lock): Fix function name.
283 Code is contributed under MIT/X11 license.
285 Fri Mar 26 11:33:17 CET 2010 Paolo Molaro <lupus@ximian.com>
287 * object.c, threads.c, threads-types.h, threads.h: make the
288 managed thread local storage references precisely tracked.
290 2010-03-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
292 * threadpool.[ch]: reworked the threadpool:
293 -Threadpool threads use a work-stealing queue. Adding a work
294 item from a threadpool thread will queue it in the thread
295 local queue without locking (in most cases).
296 -epoll events are coalesced before being added to the IO
298 -Dynamically change the number of active threads
299 -Changed the global queue to be more GC friendly
301 * class-internals.h: add 2 new performance counters for the number of
302 threads in the threadpool and the IO threadpool.
304 * object-internals.h: new field in MonoAsyncResult.
305 * icall-def.h: new internal call for queueing work items.
307 * Makefile.am: add 2 new files.
309 * appdomain.c: bump up corlib version.
311 * mono-wsq.[ch]: an implementation of a work-stealing queue.
313 * mono-perfcounters-def.h:
314 * mono-perfcounters.c: added 2 new performance counters.
316 2010-03-26 Mark Probst <mark.probst@gmail.com>
318 * sgen-gc.c: More FIXME/TODO updates.
320 2010-03-25 Mark Probst <mark.probst@gmail.com>
322 * gc-internal.h, sgen-gc.c, sgen-gc.h, boehm-gc.c, null-gc.c: New
323 function mono_gc_invoke_with_gc_lock() which invokes a function
324 with the guarantee that no collection will occur during its execution.
326 2010-03-25 Mark Probst <mark.probst@gmail.com>
328 * sgen-gc.c: Update a few comments.
330 2010-03-24 Rodrigo Kumpera <rkumpera@novell.com>
332 * reflection.c: Add support for new v4 type
333 System.Reflection.MonoAssembly that is the concrete version
334 of Assembly which is abstract unver v4.
336 2010-03-24 U-anarquia\miguel <miguel@anarquia>
338 * reflection.c (mono_reflection_get_custom_attrs_info): Protect
339 code that uses System.Reflection.Emit in DISABLE_REFLECTION_EMIT.
341 Expose a few macros that are needed for SR but not SRE to the
342 world (previous inside the SRE ifdef)
344 2010-03-24 Mark Probst <mark.probst@gmail.com>
346 * sgen-gc.c (gc_register_current_thread): We need
347 stack_start_limit as well in the non-attribute pthread case.
349 2010-03-23 Rodrigo Kumpera <rkumpera@novell.com>
351 * threads.c: Fix windows build.
353 2010-03-22 Rodrigo Kumpera <rkumpera@novell.com>
355 * thread-types.h: Add mono_thread_resume_interruption.
357 * threads.c: Add mono_thread_resume_interruption, this
358 function should be called after the last protected handler
359 found at interruption time has finished.
361 2010-03-22 Rodrigo Kumpera <rkumpera@novell.com>
363 * threads.c (ves_icall_System_Threading_Thread_ResetAbort):
364 Check MonoInternalThread's ::state instead of ::abort_exc
365 since the later can be lazily created.
367 This is specially problematic when running a finally block
368 under AbortRequested state. ResetAbort must work, but the
369 abort_exc object has not been created because interruption
372 2010-03-22 Geoff Norton <gnorton@novell.com>
374 * locales.c: Its possible for CFStringGetCStringPtr
375 to return null and not convert encodings. Use
376 CFStringGetCString instead.
378 Mon Mar 22 18:06:38 CET 2010 Paolo Molaro <lupus@ximian.com>
380 * class-internals.h, class.c, object.c: introduce compressed
381 interface bitmaps (for now only under small config): this saves
382 about 600 KB of runtime memory on gmcs bootstraps or monodevelop
385 Mon Mar 22 16:03:34 CET 2010 Paolo Molaro <lupus@ximian.com>
387 * mono-debug.c: don't try to get the method header, it causes a
388 deadlock and it is not used for anything anymore.
390 2010-03-22 Zoltan Varga <vargaz@gmail.com>
392 * loader.c (mono_method_get_marshal_info): Fix the handling of dynamic methods
393 broken by the last change.
395 2010-03-21 Andreas Färber <andreas.faerber@web.de>
397 * socket-io.c: Don't depend on AF_SNA, AF_DECnet,
400 Code is contributed under MIT/X11 license.
402 2010-03-20 Sanjoy Das <sanjoy@playingwithpointers.com>
404 * sgen-gc.c (mono_gc_get_write_barrier): Handle non-aligned
407 Code is contributed under MIT/X11 license.
409 2010-03-19 Martin Baulig <martin@ximian.com>
411 * mono-debug.c (MonoDebugWrapperData): Replace `cil_code' with a
412 dummy field, containing an empty string.
413 (mono_debug_add_method): Don't call mono_disasm_code() for wrappers.
416 Fri Mar 19 17:26:43 CET 2010 Paolo Molaro <lupus@ximian.com>
418 * class.c: setup_interface_offsets() refactor to not call
419 mono_class_get_implemented_interfaces () more times than needed and
420 to reduce the runtime memory requirements to be O(num_interfaces)
421 instead of O(max_interface_id).
423 2010-03-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
425 * mono-mlist.[ch]: add mono_mlist_set_next ().
427 2010-03-16 Rodrigo Kumpera <rkumpera@novell.com>
429 * domain-internals.h: Add MonoTryBlockHoleJitInfo struct and
430 associated changes to support holes in the protected range of a
433 * domain.c: Add mono_jit_info_get_try_block_hole_table_info, which
434 retrieves the holes table from a given MonoJitInfo.
436 Tue Mar 16 13:11:15 CET 2010 Paolo Molaro <lupus@ximian.com>
438 * object.h, object-internals.h, object.c, icall.c, gc-internal.h,
439 debug-helpers.c, cominterop.c, process.c, sgen-gc.c, socket-io.c:
440 hide the contents of the MonoString and MonoArray structs from the
441 public API. Change the accessor macros to accessors functions where
442 needed. Adjusted the array API to allow for pointer-sized lengths and
443 starting positions, so 64 bit arrays can be optionally provided in an
444 API compatible way if needed on 64 bit systems.
446 Tue Mar 16 10:18:07 CET 2010 Paolo Molaro <lupus@ximian.com>
448 * class-internals.h, class.c, loader.c, marshal.c, metadata.c,
449 reflection.c: the MonoMethodNormal struct is now unused, so remove it.
451 Mon Mar 15 18:28:00 CET 2010 Paolo Molaro <lupus@ximian.com>
453 * class-internals.h: remove the method header from MonoMethod since
454 from now on it will be transient. We have a header pointer for method
455 wrappers, since in that case we need to keep track of it. For this
456 reason, all the Reflection.Emit generated methods use MonoMethodWrapper
457 structs now. The same happens with MonoMethodInflated.
458 * class.c: reset the sre_method flag for inflated method structures:
459 this makes the code that cares look at the header in the MonoMethodInflated
461 * loader.c: lookup the method header in the appropriate field now that
462 it is removed from MonoMethod.
463 * metadata-internals.h: add a flag to the method header to know if it
464 can be freed inside mono_metadata_free_mh ().
465 * method-builder.c: updates after moving the header field from
466 MonoMethod to MonoMethodWrapper.
467 * reflection.c: MonoMethods generated from Reflection.Emit use
468 MonoMethodWrapper structs if they need a method header now (later take
469 advantage of this and remove all the current unsafe uses of method_aux_hash).
470 * metadata.c: make method header parsing not leak when verification
471 fails. Alloc it with g_malloc() and free it in mono_metadata_free_mh().
472 These changes save a few hundred KB of runtime memory in a mcs
473 bootstrap or a monodevelop startup.
475 2010-03-12 Rodrigo Kumpera <rkumpera@novell.com>
477 * verify.c: Improve error message.
479 2010-03-12 Jb Evain <jbevain@novell.com>
481 * reflection.c (add_exported_type): populate the exported
482 table with the type's nested type.
484 2010-03-10 Mark Probst <mark.probst@gmail.com>
486 * sgen-gc.c (STRING_SIZE): Semi-revert r153342. I'm an idiot who
487 can't read parentheses.
489 2010-03-10 Mark Probst <mark.probst@gmail.com>
491 * threads.c (thread_cleanup): Add a guard to dereferencing
492 "thread" to avoid an unlikely race condition.
494 2010-03-09 Sebastien Pouliot <sebastien@ximian.com>
496 * assembly.c: Fix crash in moon-unit when aname->culture is NULL
497 instead of an empty string.
499 2010-03-09 Zoltan Varga <vargaz@gmail.com>
501 * object-internals.h (_G_BOOLEAN_EXPR): Fix the definition of this to explicitly
502 convert to a boolean, recent gcc versions compile this differently.
504 2010-03-09 Zoltan Varga <vargaz@gmail.com>
506 * sgen-gc.c (safe_object_get_size): Avoid a function call so this can really be
509 2010-03-09 Mark Probst <mark.probst@gmail.com>
511 * sgen-gc.c (STRING_SIZE): Off by one.
513 2010-03-09 Mark Probst <mark.probst@gmail.com>
515 * sgen-archdep.h: Fix the signal context register access for
518 2010-03-09 Zoltan Varga <vargaz@gmail.com>
520 * sgen-gray.c: Get rid of the unused 'start' field in GrayQueueSection.
522 2010-03-08 Rodrigo Kumpera <rkumpera@novell.com>
524 * verify.c: Store the initial basic block returned by mono_basic_block_split
525 so we can release the whole list and not just the first one.
527 Mon Mar 8 17:30:44 CET 2010 Paolo Molaro <lupus@ximian.com>
529 * verify.c, debug-helpers.c, profiler.c, loader.c,
530 mono-basic-block.c, mono-debug.c, reflection.c: prepare to make
531 MonoMethodHeader a transient entity.
533 2010-03-08 Zoltan Varga <vargaz@gmail.com>
535 * sgen-gc.c (scan_needed_big_objects): Call drain_gray_stack () to avoid
536 uncontrolled growth of the gray stack.
538 * sgen-gray.c: Rewrite this so it behaves like a stack, not a queue, so recently
539 added items are removed first, improving cache locality. Avoid freeing queue
540 segments in the fast path, use the list of segments as the free list, truncate
541 it to its max size at the start of collection.
543 Mon Mar 8 10:13:52 CET 2010 Paolo Molaro <lupus@ximian.com>
545 * metadata-internals.h: more memory savings, both with small config and without.
548 Sat Mar 6 19:12:12 CET 2010 Paolo Molaro <lupus@ximian.com>
550 * appdomain.c, domain-internals.h, domain.c, object.c:
551 make class_vtable_hash into an array to reduce memory usage.
553 Sat Mar 6 18:16:35 CET 2010 Paolo Molaro <lupus@ximian.com>
555 * mempool.c, class-internals.h, class.c, icall.c, metadata.c,
556 object-internals.h, object.c, reflection.c, threadpool.c:
557 reduce resource usage when the small config is selected.
558 In particular, up to 64K of methods/fields/properties/events
559 are allowed and "other" methods in events are ignored.
561 Fri Mar 5 19:05:47 CET 2010 Paolo Molaro <lupus@ximian.com>
563 * threads.c: reduce resource usage when compiled for a small config.
565 2010-03-05 Mark Probst <mark.probst@gmail.com>
567 * sgen-gc.c: Also collect number of degraded-alloced objects with
570 2010-03-04 Geoff Norton <gnorton@novell.com>
572 * assembly.c: Only support OSX bundling if the bundle is
575 2010-03-04 Geoff Norton <gnorton@novell.com>
577 * loader.c: The marshal specs are freed at the end of the call
578 but it explicitly frees the strings as well as the container,
579 so we need to dup them too to avoid referencing free'd memory.
581 2010-03-04 Geoff Norton <gnorton@novell.com>
584 * icall.c: Add a new private internal icall to construct
585 an object from its type without running the ctor.
587 Thu Mar 4 15:37:09 CET 2010 Paolo Molaro <lupus@ximian.com>
589 * profiler.c: allow multiple profiler engines to be loaded
592 Wed Mar 3 20:19:45 CET 2010 Paolo Molaro <lupus@ximian.com>
594 * profiler-private.h, profiler.c, profiler.h, sgen-gc.c: introduce
595 profiler event to track object moves.
597 Wed Mar 3 19:20:39 CET 2010 Paolo Molaro <lupus@ximian.com>
599 * object.c, profiler.c, profiler.h, string-icalls.c:
600 remove the reduntant MONO_PROFILE_STRING_ALLOC profiler event.
602 2010-03-03 Miguel de Icaza <miguel@novell.com>
604 * decimal.c (mono_double2decimal): Add support for reducing the
605 scale of a decimal. It turns the 0.6000000000000 into 0.6 as
608 2010-03-03 Rodrigo Kumpera <rkumpera@novell.com>
611 * icall.c: Implement System.MonoType::get_core_clr_security_level icall.
613 2010-03-03 Marek Habersack <mhabersack@novell.com>
615 * mono-config.c (mono_config_parse_assembly_bindings): added -
616 parses assembly binding redirections from appdomain's config
619 * metadata-internals.h: added definition of a new function -
620 mono_config_parse_assembly_bindings - to support parsing assembly
621 binding redirections defined in appdomain's config file.
623 * domain-internals.h: added two new fields to _MonoDomain - a list
624 of assembly bindings and a flag to parse the config file only
627 * assembly.c (assembly_binding_maps_name): empty culture name and
628 NULL culture name are considered equal.
629 (mono_assembly_apply_binding): added support for domain specific
630 assembly binding redirections, read from the appdomain's
631 configuration file. Fixes bug #580185
633 Wed Mar 3 11:46:06 CET 2010 Paolo Molaro <lupus@ximian.com>
635 * appdomain.c, domain.c, icall.c, image.c, marshal.c, object.c,
636 reflection.c, socket-io.c, threadpool.c, threads.c: removed 1.1/1.0
639 2010-03-02 Rodrigo Kumpera <rkumpera@novell.com>
641 * reflection.c (mono_image_get_memberref_token): Extract mono_image_add_memberef_row
642 from this function. The new function receive the parent token instead of a type.
644 * reflection.c (mono_image_get_methodref_token_for_methodbuilder):
645 * reflection.c (mono_image_get_ctorbuilder_token): Use new function to encode
646 typebuilders. This make it possible to properly encode generic type builders since
647 their unmanaged type don't have generics data while unfinished.
651 2010-03-02 Mark Probst <mark.probst@gmail.com>
653 * sgen-gc.c, sgen-protocol.c, sgen-protocol.h: New facility for
654 writing binary log files (can be enabled by #define'ing
655 BINARY_PROTOCOL) for better debugging of timing-dependent bugs or
656 bugs in longer running programs.
658 Mon Mar 1 19:35:32 CET 2010 Paolo Molaro <lupus@ximian.com>
660 * metadata.c: added some API documentation.
662 2010-03-01 Robert Jordan <robertj@gmx.net>
664 * filewatcher.h: Include glib.h to fix the MSVC build.
666 2010-03-01 Zoltan Varga <vargaz@gmail.com>
668 * class-internals.h (MonoClass): Get rid of the reflection_info field, add
669 a GC handle instead. This is a bit slower to access, but avoids burdening the
670 GC with 100s of individual roots.
672 * reflection.c (mono_class_get_ref_info):
673 (mono_class_set_ref_info):
674 (mono_class_free_ref_info): New internal helper fuctions.
676 * reflection.c appdomain.c icall.c class.c: Use the new helper functions instead
677 of accessing klass->reflection_info directly.
679 * sgen-gc.c (alloc_complex_descriptor): Fix the computation of the number of
682 * gc.c (alloc_handle): Create a GC descriptor for the 'entries' array, free
685 2010-02-28 Zoltan Varga <vargaz@gmail.com>
687 * marshal.c (get_runtime_invoke_type): Avoid sharing byref with I, as the latter
688 needs an indirection.
690 2010-02-26 Zoltan Varga <vargaz@gmail.com>
692 * generic-sharing.c: Removed, moved its contents to mini/mini-generic-sharing.c,
693 so all generic sharing code is in one place.
695 * class.c (get_implicit_generic_array_interfaces): Fix the last change so
696 we don't call setup_interface_offsets () for unfinished types.
698 2010-02-26 Zoltan Varga <vargaz@gmail.com>
700 * class.c (mono_class_generic_sharing_enabled): Move this to
703 * image.c: Add an unload hook which is called before an image is unloaded.
705 * generic-sharing.c: Use the unload hook to unregister per-image data, to avoid
706 metadata.c having to depend on generic sharing.
708 Fri Feb 26 19:23:18 CET 2010 Paolo Molaro <lupus@ximian.com>
710 * class.c: reduce size of ridiculously large cache.
712 2010-02-26 Martin Baulig <martin@ximian.com>
715 (MONO_DEBUGGER_MINOR_VERSION): Bump to 5.
717 * threads.c (mono_thread_internal_reset_abort): New method; resets
718 the abort, but doesn't throw any exception if no abort was requested.
720 2010-02-26 Zoltan Varga <vargaz@gmail.com>
722 * class.c (get_implicit_generic_array_interfaces): Call
723 mono_class_setup_interface_offsets () before accessing
724 eclass->interface_offsets_count. This only shows up on platforms without IMT for
727 Thu Feb 25 12:12:44 CET 2010 Paolo Molaro <lupus@ximian.com>
729 * environment.c, environment.h, icall.c: make the GetOSVersionString()
732 Thu Feb 25 11:37:50 CET 2010 Paolo Molaro <lupus@ximian.com>
734 * metadata.c, metadata.h: make MONO_TYPE_IS* functional without
735 direct access to the MonoType fields.
737 2010-02-25 Zoltan Varga <vargaz@gmail.com>
739 * threads.h: Move some internal functions which were added to this header by
740 mistake to threads-types.h.
742 * class.c (mono_class_init): Get rid of mono_setup_vtable_in_class_init.
744 Wed Feb 24 17:45:27 CET 2010 Paolo Molaro <lupus@ximian.com>
746 * class-internals.h, class.h, object.h: make MonoRemoteClass
747 and mono_remote_class() internal.
749 Wed Feb 24 17:05:18 CET 2010 Paolo Molaro <lupus@ximian.com>
751 * metadata-internals.h, class-internals.h, metadata.h: make the
752 MonoType guts internal as well.
754 Wed Feb 24 16:02:42 CET 2010 Paolo Molaro <lupus@ximian.com>
756 * reflection.h: the MonoTypeNameParse guts are internal now.
757 * assembly.c, assembly.h, image.h: the MonoAssemblyName guts
758 are internal now, provide accessors as needed.
759 * metadata.h, metadata-internals.h: the MonoMethodSignature
760 guts are internal now.
761 * Makefile.am: mempool.h is an internal header now.
762 * *.h, *.c: remove glib.h usage from the public headers.
764 2010-02-24 Atsushi Enomoto <atsushi@ximian.com>
766 * culture-info-table.h : regenerated.
768 2010-02-22 Rodrigo Kumpera <rkumpera@novell.com>
770 * metadata.c: Add mono_method_get_header_summary which returns minimal
771 information about the header of a method. This is the information used
772 by the inline oracle to reject methods.
774 This method doesn't decode local variables and doesn't cache it's result,
775 so it should cause a minimal reduction in memory usage.
777 * metadata-internals.h: Add MonoMethodHeaderSummary structure and
778 mono_method_get_header_summary.
780 2010-02-22 Jeffrey Stedfast <fejj@novell.com>
782 * threads.c (mono_thread_exit): Make sure that the main thread is
783 non-null before dereferencing it.
785 2010-02-21 Geoff Norton <gnorton@novell.com>
787 * Makefile.am: Add CoreFoundation linkage on darwin to properly get the current
789 * locaes.c: When running on darwin, try to get the local from CoreFoundation
790 before falling back to the posix lookup.
792 2010-02-19 Zoltan Varga <vargaz@gmail.com>
794 * threads.c (mono_thread_suspend_all_other_threads): Ignore threads which have
795 the DONT_MANAGE flag set.
797 2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
799 * domain.c: Remove old v1 version strings. Let the runtime
800 default to 2.0 instead of failing because it can't find a
801 working 1.0 instalation.
803 2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
805 * domain.c: Add v4 RC version string.
807 2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
809 * mono-basic-block.c (mono_opcode_value_and_size): Use pointer variant
810 of overflow checking function.
812 2010-02-18 Rodrigo Kumpera <rkumpera@novell.com>
814 * reflection.c (mono_reflection_method_on_tb_inst_get_handle): Handle non
817 * reflection.c (mono_reflection_get_custom_attrs_info): Handle compiler context
818 cases for ParameterInfo.
822 2010-02-18 Zoltan Varga <vargaz@gmail.com>
824 * class.c (mono_class_get_cctor): Fix support for dynamic classes, which doesn't
825 have has_cctor set. Fixes #575946.
827 2010-02-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
829 * appdomain.c: display a warning if the parsing the config file
831 Skip the BOM in UTF-8 files.
832 Copy the AppDomainSetup before setting the privateBinPath so that the
833 correct configuration file is read.
835 2010-02-15 Zoltan Varga <vargaz@gmail.com>
837 * object.c: Instead of using one vtable trampoline, allow the JIT to use one
838 vtable trampoline per vtable slot index. Not used yet.
840 2010-02-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
843 * icall.c: add internal call that returns the system page size.
845 2010-02-13 Zoltan Varga <vargaz@gmail.com>
847 * debug-helpers.c (mono_method_desc_search_in_image): Handle short names like
848 'int' for system classes.
850 Fri Feb 12 18:36:02 CET 2010 Paolo Molaro <lupus@ximian.com>
852 * icall.c, icall-def.h: new icall to check for sufficient
855 2010-02-12 Mark Probst <mark.probst@gmail.com>
857 * reflection.c (ensure_complete_type): Check that reflection_info
858 is set, too. Fixes crash of corlib testsuite with -O=-all.
860 2010-02-11 Rodrigo Kumpera <rkumpera@novell.com>
863 * tabledefs.h: Add NoOptimization flag.
865 2010-02-10 Mark Probst <mark.probst@gmail.com>
867 * sgen-gc.c: Don't consider it a missing remset if the target
868 object is pinned - we might have done the store but not added the
871 2010-02-10 Mark Probst <mark.probst@gmail.com>
873 * sgen-gc.c: When checking for missing remsets, don't assert on
874 the first one, but print them all and then assert.
876 2010-02-10 Mark Probst <mark.probst@gmail.com>
878 * sgen-gc.c (find_in_remset_loc): Handle the small bitmap case.
880 2010-02-09 Miguel de Icaza <miguel@novell.com>
882 * console-unix.c: On OSX Control-Y is assigned to
883 VDSUSP (non-Posix), the
884 suspend-program-next-time-it-tries-to-read-input command (this is
885 different than C-z, which suspends immediately).
887 Do the same thing that bash does and ignore this setting,
888 making our repl/getline support pasting.
890 2010-02-10 Mark Probst <mark.probst@gmail.com>
892 * sgen-gc.c: Simple plausibility check for scan_starts.
894 2010-02-10 Mark Probst <mark.probst@gmail.com>
896 * sgen-gc.c: Round up when calculating the number of scan starts.
898 2010-02-10 Rodrigo Kumpera <rkumpera@novell.com>
900 * reflection.c: Export mono_get_object_from_blob.
902 * object-internals.h: Ditto.
904 * icall.c: New icall property_info_get_default_value to get the default
905 value of a property. Since using this is not common, no caching is done.
907 * icall-def.h: Add new icall.
909 2010-02-10 Rodrigo Kumpera <rkumpera@novell.com>
911 * class.c: Add mono_class_get_property_default_value.
913 * class-internal.h: Export mono_class_get_property_default_value.
915 2010-02-10 Rodrigo Kumpera <rkumpera@novell.com>
917 * reflection.c (mono_image_get_property_info): Encode the default value of a property.
919 Wed Feb 10 14:48:45 CET 2010 Paolo Molaro <lupus@ximian.com>
921 * sgen-gc.c: introduced critical regions to allow some lockless
922 operations and increase scalability.
924 2010-02-10 Geoff Norton <gnorton@novell.com>
926 * reflection.c: Support building with DISABLE_REFLECTION
928 2010-02-09 Gonzalo Paniagua Javier <gonzalo@novell.com>
930 * threadpool.c: Fixes for SetMinThreads and SetMaxThreads.
933 * exception.c: fix typo in comment.
935 2010-02-09 Rodrigo Kumpera <rkumpera@novell.com>
937 * icall.c (param_info_get_type_modifiers): Handle the case when the member object is a
938 property. This happens which instances returned by PropertyInfo::GetIndexParameters ().
940 * reflection.c (mono_reflection_get_custom_attrs_info): Ditto.
942 * object-internals.h: Export mono_class_is_reflection_method_or_constructor as part of
947 2010-02-09 Mark Probst <mark.probst@gmail.com>
949 * threads.c: Removed two assertions that were too strict. Added a
950 clarifying comment. Fixes #577090.
952 2010-02-08 Zoltan Varga <vargaz@gmail.com>
954 * domain.c (mono_jit_info_table_find): Avoid looking in the root domain, since
955 the caller has no way of knowing the domain which owns the returned MonoJitInfo.
957 * appdomain.c (create_exceptions): Call mono_thread_push/popappdomain_ref ().
959 * verify.c (mono_type_get_stack_name): Fix a warning.
961 2010-02-07 Zoltan Varga <vargaz@gmail.com>
963 * marshal.c (mono_marshal_get_wrapper_info): Rename from
964 mono_marshal_wrapper_info_from_wrapper.
966 * marshal.c (mono_marshal_set_wrapper_info): Rename from
967 mono_marshal_method_set_wrapper_data, and export.
969 * boehm-gc.c sgen-gc.c null-gc.c: Get rid of mono_gc_get_allocator_type, store
970 the allocator type in a AllocatorWrapperInfo structure instead, which is accesible
971 by calling mono_marshal_get_wrapper_info ().
973 * sgen-gc.c (mono_gc_get_managed_allocator): Add a specialized allocator for
974 small objects which does no size checks.
976 2010-02-05 Rodrigo Kumpera <rkumpera@novell.com>
978 * icall-def.h: Rename get_MetadataToken to GetMetadataToken.
980 2010-02-04 Rodrigo Kumpera <rkumpera@novell.com>
982 * verify.c (mono_method_verify): Use the new basic block formation pass
983 to avoid verifying dead basic blocks. This is the same behavior as the
986 2010-02-04 Rodrigo Kumpera <rkumpera@novell.com>
988 * mono-basic-block.c:
989 * mono-basic-block.h: New implementation of a basic block formation pass.
990 The formation pass does static liveness analysis as well to detect dead
993 2010-02-04 Zoltan Varga <vargaz@gmail.com>
995 * marshal.c (mono_marshal_get_native_wrapper): Emit a null check for the
996 'this' argument in icalls.
998 2010-02-02 Zoltan Varga <vargaz@gmail.com>
1000 * reflection.c (resolve_object): Handle MonoArrayMethod. Fixes #575955.
1002 2010-02-01 Mark Probst <mark.probst@gmail.com>
1004 * object.c, domain.c: When using SGen, we must register
1005 vtable->type as a root if it's not a MonoType, because then it
1008 2010-02-01 Mark Probst <mark.probst@gmail.com>
1010 * sgen-gc.c: Reset to_space_bumper to to_space_section->next_data
1011 at the start of nursery collections, because we might have had
1012 degraded allocations which changed next_data.
1014 2010-01-30 Zoltan Varga <vargaz@gmail.com>
1016 * marshal.c (mono_marshal_get_managed_wrapper): Avoid constructing the
1017 custom attr so this function works in cross-compiling mode.
1019 2010-01-29 Zoltan Varga <vargaz@gmail.com>
1021 * class.c (make_generic_param_class): Initialize interface offsets since we
1022 set klass->inited. Fixes #574819.
1024 2010-01-28 Zoltan Varga <vargaz@gmail.com>
1026 * domain.c (mono_domain_free): Send the END_UNLOAD profiler event before
1027 calling the JIT domain cleanup hook.
1029 2010-01-28 Rodrigo Kumpera <rkumpera@novell.com>
1031 * pedump.c (main): Properly set the verifier mode when running the metadata
1034 2010-01-28 Rodrigo Kumpera <rkumpera@novell.com>
1036 * verify.c (verify_class_for_overlapping_reference_fields): Properly verify
1037 overlapping fields now that we're called before has_references is set.
1039 * pedump.c (dump_verify_info): Clear any loader error before verifying another
1040 method. Otherwise all sort of weird stuff happens.
1042 2010-01-27 Zoltan Varga <vargaz@gmail.com>
1044 * object.c (mono_field_get_value_object): Handle nullable types correctly.
1047 2010-01-25 Zoltan Varga <vargaz@gmail.com>
1049 * icall.c (ves_icall_System_Array_SetValueImpl): Handle nullable types correctly.
1052 2010-01-23 Mark Probst <mark.probst@gmail.com>
1054 * sgen-pinning.c (evacuate_pin_staging_area): Don't assume
1055 pin_staging_area_index is greater than 0.
1057 2010-01-22 Miguel de Icaza (miguel@novell.com)
1059 * loader.c: Since we do nothing with the error returned, pass NULL
1060 to ignore the error.
1062 2010-01-21 Rodrigo Kumpera <rkumpera@novell.com>
1064 * reflection.c (typebuilder_setup_fields): Pretend field setup already
1065 happened before starting to encode the actual fields. This avoid ciclic
1066 dependencies and eventual crashes.
1070 2010-01-21 Mark Probst <mark.probst@gmail.com>
1072 * sgen-gc.c, gc-internal.h, object.c: Make string allocation
1073 atomic and remove the half-constructed hack in SGen.
1075 2010-01-21 Rodrigo Kumpera <rkumpera@novell.com>
1077 * metadata-verify.c (parse_generic_inst): Fail a type signature if it
1078 has a recursive reference to itself.
1082 2010-01-21 Rodrigo Kumpera <rkumpera@novell.com>
1084 * loader.c (mono_method_signature): Fix error message.
1086 2010-01-21 Mark Probst <mark.probst@gmail.com>
1088 * sgen-gc.c: Reuse to-space sections between nursery collections.
1090 2010-01-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1092 * icall.c: don't raise AppDomain.TypeResolve when the type is loaded
1093 from the current assembly or mscorlib. Fixes bug #322957.
1095 2010-01-20 Zoltan Varga <vargaz@gmail.com>
1097 * marshal.c: Calculate the target class of the delegete invoke wrappers using
1098 get_wrapper_target_class.
1100 2010-01-19 Mark Probst <mark.probst@gmail.com>
1102 * sgen-gc.c: Fix warnings.
1104 2010-01-19 Rodrigo Kumpera <rkumpera@novell.com>
1106 * verify.c (store_local): Better error message.
1108 2010-01-19 Rodrigo Kumpera <rkumpera@novell.com>
1110 * object.c (mono_object_get_virtual_method): Handle generic interfaces with variant
1113 2010-01-19 Rodrigo Kumpera <rkumpera@novell.com>
1115 * icall.c (ves_icall_Remoting_RemotingServices_GetVirtualMethod): This
1116 function is generics variance aware.
1118 2010-01-19 Sebastien Pouliot <sebastien@ximian.com>
1120 * security-core-clr.c (mono_security_core_clr_can_access_internals):
1121 Handle the case where 'basedir' can be NULL (e.g. SRE assemblies)
1123 2010-01-19 Sylvain Dupont <duposyl@gmail.com>
1125 * cominterop.c marshal.c: Added support for marshalling in, in/byref,
1126 in/out, in/out/byref parameters of type SAFEARRAY[VARIANT].
1128 Code is contributed under MIT/X11 license.
1130 2010-01-19 Rodrigo Kumpera <rkumpera@novell.com>
1132 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Handle inflated generic methods
1135 2010-01-19 Zoltan Varga <vargaz@gmail.com>
1137 * marshal.c (mono_marshal_wrapper_info_from_wrapper): New helper function to
1138 return a point to a wrapper specific info structure describing the wrapper.
1139 (mono_marshal_get_array_address): Store the rank+elem_size in the wrapper info.
1141 2010-01-18 Mark Probst <mark.probst@gmail.com>
1143 * sgen-gc.c: Make minor collection section allowance adaptive,
1144 depending on the amount of memory reclaimed in the last major
1145 collection. If more memory was reclaimed (i.e. more garbage
1146 produced), do the next collection earlier.
1148 2010-01-18 Rodrigo Kumpera <rkumpera@novell.com>
1150 * metadata-verify.c (parse_type): Fail a type signature if it has a recursive reference
1153 * metadata-verify.c (mono_verifier_verify_typespec_signature): Change signature to take
1154 the token as parameter.
1156 * verify-internals.h: Ditto.
1158 * metadata.c (mono_type_create_from_typespec): Pass token to verifier.
1162 2010-01-18 Mark Probst <mark.probst@gmail.com>
1164 * sgen-gc.c: Make store_remset_buffer_index long.
1166 2010-01-18 Rodrigo Kumpera <rkumpera@novell.com>
1168 * class.c (mono_class_from_typeref): Fail loading of self-referencing typeref tokens.
1172 2010-01-18 Zoltan Varga <vargaz@gmail.com>
1174 * sgen-gc.c (mono_gc_base_init): Add 'conservative_stack_mark' option to turn
1175 off precise marking if it is available.
1176 (mono_gc_get_bitmap_for_descr): Fix the handling of run length descriptors.
1178 2010-01-17 Zoltan Varga <vargaz@gmail.com>
1180 * sgen-gc.c (mono_gc_conservatively_scan_area): Resurrect this.
1182 * sgen-pinning.c (evacuate_pin_staging_area): Don't assert if there are no
1185 * sgen-gc.c (create_allocator): Add the missing n > MONO_ARRAY_MAX_INDEX check
1186 to the array allocator.
1188 2010-01-16 Zoltan Varga <vargaz@gmail.com>
1190 * generic-sharing.c (instantiate_other_info): Don't create ftnptr's from the
1191 result of mono_compile_method (), it already includes an ftnptr.
1193 2010-01-16 Zoltan Varga <vargaz@gmail.com>
1195 * metadata.c (get_image_set): Remove an assert which can happen in normal use.
1197 2010-01-15 Zoltan Varga <vargaz@gmail.com>
1199 * metadata.c (mono_metadata_str_hash): New helper function to compute a stable
1200 hash value which doesn't depend on glib/eglib versions.
1201 (mono_metadata_type_hash): Use it.
1203 * object.c (mono_method_get_imt_slot): Ditto.
1205 2010-01-14 Rodrigo Kumpera <rkumpera@novell.com>
1207 * class.c (mono_type_has_exceptions): Check the generic instance. It can fail
1208 independently of the GTD.
1210 * class.c (mono_class_setup_fields): Fail if field has negative offset.
1212 * class.c (mono_class_setup_fields): Fail if valuetype has zero size. Add sizeof(MonoObject)
1213 to the upper limit since instance_size includes this amount.
1215 * class.c (mono_class_layout_fields): Check if the types of the static fields have failed.
1219 2010-01-14 Zoltan Varga <vargaz@gmail.com>
1221 * object.c (build_imt_slots): Compute the vtable slot correctly for interfaces
1222 with static methods.
1224 * object.c (build_imt_slots): Avoid asserting when static methods are
1225 encountered in an interface.
1227 2010-01-13 Mark Probst <mark.probst@gmail.com>
1229 * sgen-gc.c (to_space_expand): Fix assertion.
1231 Wed Jan 13 15:42:28 CET 2010 Paolo Molaro <lupus@ximian.com>
1233 * string-icalls.c: missing declaration fixes.
1234 * sgen-gc.c: portability fixes.
1236 2010-01-12 Rodrigo Kumpera <rkumpera@novell.com>
1238 * class.c (mono_class_get_implemented_interfaces): Now take a MonoError argument.
1244 * class-internals.h: Adjust for new signature of mono_class_get_implemented_interfaces.
1246 2010-01-12 Rodrigo Kumpera <rkumpera@novell.com>
1248 * class.c (mono_class_setup_interfaces): Now take a MonoError argument and
1249 it can fail loading the type.
1251 * class.c: Add mono_class_inflate_generic_class_checked.
1255 * class-internals.h: Adjust for new signature of mono_class_setup_interfaces.
1257 2010-01-11 Zoltan Varga <vargaz@gmail.com>
1259 * loader.c (mono_method_signature_checked): New internal function taking an
1262 * socket-io.c (AI_ADDRCONFIG): Applied patch from John Lightsey (jd@cpanel.net).
1263 Fixes build on rh 7.3.
1265 2010-01-10 Aaron Bockover <abockover@novell.com>
1267 * assembly.c (mono_set_rootdir): Support finding the mono paths on OS X
1268 at runtime in the same way as on Windows, which yields a relocatable
1269 Mono. Uses dyld's _NSGetExecutablePath and realpath to resolve the path
1270 of the running mono process.
1272 On TARGET_ARM, fallback () will always be executed.
1274 2010-01-08 Rodrigo Kumpera <rkumpera@novell.com>
1276 * icall.c (ves_icall_Type_GetInterfaceMapData): This function is generics variance aware.
1278 2010-01-08 Rodrigo Kumpera <rkumpera@novell.com>
1280 * class.c (mono_class_is_assignable_from_slow): Support variant
1283 * class.c (mono_class_implement_interface_slow): Support types with
1284 variant generic arguments.
1286 2010-01-08 Rodrigo Kumpera <rkumpera@novell.com>
1288 * verify.c: Remove some code duplication.
1290 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1292 * object.c: Update docs.
1294 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1296 * object.c (add_imt_builder_entry): Improve DEBUG_IMT spew.
1298 * object.c (build_imt_slots): Interfaces with variant generic arguments use the
1299 fallback trampoline as well.
1301 * class.c (mono_class_interface_offset_with_variance): Add new non_exact_match
1302 out argument that is set to TRUE if the match was direct.
1304 * class.c (mono_class_is_assignable_from): Delegates require variance testing as well.
1306 * class-internal.h: Update prototype of mono_class_interface_offset_with_variance.
1308 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1310 * class.c: Add mono_class_interface_offset_with_variance function that does same
1311 as mono_class_interface_offset but takes variance into account.
1313 * class-internal.h: Export mono_class_interface_offset_with_variance.
1315 * object.c: Fix and improve DEBUG_IMT. Added an assert for IMT thunk building.
1317 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1321 * class.c: Add some FIXME for due to variant generic arguments.
1323 object.c (mono_object_isinst_mbyref): Interfaces with variant generic arguments
1324 can't use the simple bitfield check, so call mono_class_is_assignable_from if
1325 the bitfield check fails.
1327 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1329 * class.c (mono_class_is_assignable_from): Rework the generics variance code
1330 to be easier to read and fix bugs in the case a non generic type implements a variant
1333 * class.c (mono_class_has_variant_generic_params): Make non static.
1335 * class-internals.h: Export mono_class_has_variant_generic_params as part of
1338 2010-01-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
1340 * assembly.c: fix MONO_PATH debug output.
1342 2010-01-06 Atsushi Enomoto <atsushi@ximian.com>
1344 * culture-info-table.h : regenerated.
1346 2010-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1348 * verify.c (mono_verifier_verify_class): Properly check for broken parent. Ignore
1349 types that are meant to not have a parent.
1351 2010-01-04 Zoltan Varga <vargaz@gmail.com>
1353 * marshal.c (mono_marshal_get_runtime_invoke): Make a copy of the signature
1354 from the image mempool, so it is not leaked.
1356 2010-01-04 Zoltan Varga <vargaz@gmail.com>
1358 * metadata-internals.h (_MonoImage): Remove unused generic_class_cache field.
1360 2010-01-04 Sebastien Pouliot <sebastien@ximian.com>
1362 * verify.c (verify_valuetype_layout_with_target): Fix case
1363 that can lead to infinite recursion. Fix bug #567861
1365 2010-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1367 * pedump.c: Run code verifier even if image verification fails
1368 due to a failed type we. This allows more errors to be shown.
1370 2010-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1372 * class.c (count_virtual_methods): Remove the assert and now
1375 * class.c (setup_interface_offsets): This can fail now.
1377 * class.c (mono_class_setup_vtable_general): Check for parent vtable
1378 errors. Check setup_interface_offsets errors.
1380 * class.c (setup_interface_offsets): Simplify the return error logic
1381 and remove class_init_ok.
1385 2010-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1387 * class.c (mono_class_init): Do class verification at the beginning. Add
1388 some asserts to avoid tripping into invalid memory.
1390 * object.c (compute_class_bitmap): Replace a g_assert_not_reached with a
1391 g_error and a decent message.
1393 * verify.c (mono_verifier_verify_class): Verify for invalid super type.
1397 2010-01-03 Zoltan Varga <vargaz@gmail.com>
1399 * mempool-internals.h (g_list_prepend_mempool): Define this and related functions
1400 as inline functions instead of defining them in mempool.c.
1402 * metadata-internals.h (MonoImageSet): New structure representing a set of
1403 MonoImages, which own a collection of generic instances.
1405 * metadata.c: Get rid of the global generic caches, instead assign each generic
1406 instance to the image set which consists of all the images referenced by the
1407 instance. This greatly speeds up mono_metadata_clean_for_image (), and allows
1408 the memory used by generic instances to be allocated from a per image-set mempool
1411 2010-01-03 Zoltan Varga <vargaz@gmail.com>
1413 * marshal.c (mono_marshal_get_runtime_invoke): Fix a memory leak.
1415 2010-01-03 Zoltan Varga <vargaz@gmail.com>
1417 * appdomain.c (zero_static_data): Fix a warning.
1419 * locales.c (construct_culture_from_specific_name): Applied patch from
1420 José Antonio Sánchez Lázaro <jasl@darcysoft.es>. Fix a crash if a culture was
1421 not found. Fixes #567900.
1423 2009-12-31 Sebastien Pouliot <sebastien@ximian.com>
1425 * loader.c (mono_method_get_signature_full): Remove two asserts.
1426 Return NULL instead so that the verifier can handle both cases
1429 2009-12-30 Rodrigo Kumpera <rkumpera@novell.com>
1431 * class.c (mono_class_setup_methods): Use checked version of mono_class_inflate_generic_method_full
1432 so we can properly fail types instead of crashing.
1436 2009-12-30 Rodrigo Kumpera <rkumpera@novell.com>
1438 * reflection.c (reflection_methodbuilder_to_mono_method): Assert in case of a broken
1441 2009-12-30 Rodrigo Kumpera <rkumpera@novell.com>
1443 * marshal.c (mono_mb_emit_restore_result): Properly handle generic enums.
1445 2009-12-26 Zoltan Varga <vargaz@gmail.com>
1447 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait): Don't close the
1448 wait handle if the wait is interrupted, since it is still in mon->wait_list, and
1449 we can't remove it from it since we don't hold the lock.
1450 (mon_new): Free the orphaned events here when a mon structure is added to the
1451 freelist. Fixes #561239. Thanks to Mike Rieker <wmrieker@nii.net> for tracking
1454 2009-12-26 Rodrigo Kumpera <rkumpera@novell.com>
1456 * verify.c (init_stack_with_value_at_exception_boundary): Do stack overflow checking here
1457 as max stack might be zero.
1461 2009-12-26 Rodrigo Kumpera <rkumpera@novell.com>
1463 Rework all uses of mono_class_setup_methods to accept that it can fail now.
1465 * class.c (mono_class_setup_methods): This function now can fail the class. Do so for generic
1466 instances if the GTD did.
1468 * class.c (mono_class_setup_properties): Ditto.
1470 * class.c (mono_class_setup_events): Ditto.
1472 * class.c (mono_class_setup_vtable): Fail early if the type is already broken.
1474 * class.c (mono_class_setup_vtable_general): Add a few more missing broken type checks. Sanitize
1477 * class.c (mono_class_init): Fail if GTD did.
1480 * generic-sharing.c:
1484 * verify.c: Properly handle failure of mono_class_setup_methods.
1486 2009-12-26 Rodrigo Kumpera <rkumpera@novell.com>
1488 * class-internals.c: Add mono_class_inflate_generic_method_full_checked and make
1489 mono_class_inflate_generic_method_full internal.
1491 * class.c (inflate_generic_context): Now takes a MonoError argument.
1493 * class.c (mono_class_inflate_generic_method_full): Now calls the _checked and abort on
1496 2009-12-26 Zoltan Varga <vargaz@gmail.com>
1498 * generic-sharing.c (instantiate_other_info): Avoid creating jump trampolines since
1499 they cannot be patched. Partly fixes #564408.
1501 2009-12-24 Mark Probst <mark.probst@gmail.com>
1503 * metadata-internals.h, reflection.c: Use the
1504 MonoDynamicImage.handleref hash table only with unmanaged keys,
1505 and add a managed hash table handleref_managed for managed keys.
1507 2009-12-24 Mark Probst <mark.probst@gmail.com>
1509 * sgen-gc.c: Unset to-space bumper between collections. It might
1510 become invalid due to degraded allocations.
1512 2009-12-21 Rodrigo Kumpera <rkumpera@novell.com>
1514 * loader.c (mono_method_get_signature_full): Check if the returned signature is compatible
1515 with the one from the original method.
1517 * metadata-verify.c (mono_verifier_is_sig_compatible): New function to verify signature
1520 * verify-internals.h: Add new function to the internal API.
1522 2009-12-18 Dimitar Dobrev <dpldobrev@yahoo.com>
1524 * culture-info-tables.h: regenerated it to include the Georgian culture.
1526 2009-12-18 Zoltan Varga <vargaz@gmail.com>
1528 * sgen-gc.c: Include mono/utils/memcheck.h.
1530 * reflection.c (mono_reflection_get_type_internal_dynamic): Use assembly->domain
1531 instead of the current domain, since the two might not match if this is called
1534 * metadata-internals.h (MonoDynamicAssembly): Add a 'domain' field to specify the
1535 domain which created this assembly.
1537 2009-12-18 Zoltan Varga <vargaz@gmail.com>
1539 * debug-helpers.c (dis_one): Avoid a glib assert on empty strings.
1541 2009-12-17 Mark Probst <mark.probst@gmail.com>
1543 * sgen-gc.c: Managed implementation of the specialized generic
1544 store write barrier.
1546 2009-12-17 Rodrigo Kumpera <rkumpera@novell.com>
1548 * icall.c (ves_icall_Type_GetMethodsByName): Don't pin virtual methods if they are newslot.
1549 A private virtual newslot method is used to implement an interface method without exposing
1550 it to users. When querying for public instance methods, such method would hide a public one
1555 2009-12-17 Zoltan Varga <vargaz@gmail.com>
1557 * reflection.c (resolve_object): Fix the encoding of unmanaged calling
1560 2009-12-16 Rodrigo Kumpera <rkumpera@novell.com>
1562 * reflection.c (mono_type_get_object): Guard against NULL generic param owner.
1564 2009-12-16 Rodrigo Kumpera <rkumpera@novell.com>
1566 * class-internals.h (MonoDynamicGenericClass): Kill property and event related fields
1567 as they are no longer used.
1569 * metadata.c (free_generic_class_dependents): Remove reference to previous fields
1571 * reflection.c (mono_reflection_generic_class_initialize): Ditto.
1573 2009-12-16 Rodrigo Kumpera <rkumpera@novell.com>
1575 * reflection.c (mono_type_get_object): If the type is VAR or MVAR check
1576 if the owner class has not been finished before returning reflection_info.
1580 2009-12-16 Zoltan Varga <vargaz@gmail.com>
1582 * reflection.c (mono_custom_attrs_from_param): Avoid a crash if a dynamic
1583 param doesn't have custom attributes. Fixes #565117.
1585 * class.c (mono_bounded_array_class_get): Make these classes PUBLIC. Fixes
1588 2009-12-15 Rodrigo Kumpera <rkumpera@novell.com>
1590 * class.c (mono_class_setup_fields): Fail valuetypes that are bigger than 1Mb.
1592 2009-12-15 Rodrigo Kumpera <rkumpera@novell.com>
1594 * pedump.c: Add partial-md mode that doesn't perform full metadata verification. It does the
1595 same amount done by a core-clr enabled runtime.
1597 2009-12-15 Marek Habersack <mhabersack@novell.com>
1599 * appdomain.c (mono_make_shadow_copy): make sure access mode of
1600 the target files is reset to writable by owner and readable by
1601 everyone else to prevent problems when updating shadow copies of
1602 files whose source is read-only. Fixes bug #556884
1604 2009-12-15 Mark Probst <mark.probst@gmail.com>
1606 * class.c (mono_generic_class_get_class): Allocate the generic
1607 class via malloc again, so that it can be freed when any one of
1608 the images of its constituent types is closed.
1610 * metadata.c: When closing an image, don't free generic insts and
1611 generic classes right away, but put them into a list for later
1614 * image.c, metadata-internals.h: Store the free list and in the
1615 second pass of closing an image, free it.
1617 2009-12-14 Rodrigo Kumpera <rkumpera@novell.com>
1619 * reflection.c (mono_generic_class_get_object): Assert if this is ever called.
1621 * reflection.c (mono_reflection_register_with_runtime): Only register dynamic
1624 * reflection.c (resolve_object): Call ensure_complete_type on the inflated field.
1626 2009-12-14 Rodrigo Kumpera <rkumpera@novell.com>
1628 * reflection.c (mono_reflection_type_get_handle): Properly fail in case of a broken
1631 * reflection.c (mono_reflection_register_with_runtime): Throws in case a bad user type
1634 2009-12-14 Miguel de Icaza <miguel@novell.com>
1636 * verify.c (mono_method_verify): The Unused opcodes produce an
1637 InvalidProgramException on .NET
1639 2009-12-14 Sebastien Pouliot <sebastien@ximian.com>
1641 * loader.c (mono_method_get_header): Move assert after the verifier
1642 has been called on the method header.
1644 2009-12-12 Rodrigo Kumpera <rkumpera@novell.com>
1646 * object-internals.h: Remove useless field from MonoReflectionGenericClass.
1648 * appdomain.c: Bump corlib version.
1650 2009-12-12 Rodrigo Kumpera <rkumpera@novell.com>
1652 To properly support user types, MonoGenericClass has to be used for regular, non SRE,
1653 types as well since otherwise generic instances would not return UT as arguments but
1654 their undelying system type.
1656 * object-internals.h: Change field types of MonoGenericClass and *OnTypeBuilderInst
1657 to reflect the fact that they can have now multiple different types.
1659 * reflection.c (mono_image_get_field_on_inst_token): Handle MonoField.
1661 * reflection.c (mono_image_get_ctor_on_inst_token): Handle MonoCMethod.
1663 * reflection.c (mono_image_get_method_on_inst_token): Handle MonoMethod.
1665 * reflection.c (mono_reflection_register_with_runtime): Init super types
1666 if the image is not dynamic.
1668 * reflection.c (mono_reflection_bind_generic_parameters): In case of a MonoGenericClass,
1669 check if the generic type definition is a TypeBuilder.
1671 * reflection.c (mono_reflection_generic_class_initialize): If the generic type definition
1672 doesn't belong to a dynamic image, skip initialization.
1674 * reflection.c (resolve_object): Properly handle *OnTypeBuilderInst types where their
1675 base definition is not a dynamic type.
1677 2009-12-11 Marek Habersack <mhabersack@novell.com>
1679 * object.c (mono_ldstr, mono_ldstr_metadata_sig): added calls to
1680 mono_profiler_string_allocation
1682 * string-icalls.c (ves_icall_System_String_InternalAllocateStr):
1683 if string profiling is enabled, call
1684 mono_profiler_string_allocation
1686 * profiler.h: added two MonoProfileFlags -
1687 MONO_PROFILE_IOMAP_EVENTS and MONO_PROFILE_STRING_ALLOC as well as
1688 installation functions for the hooks below.
1690 * profiler-private.h, profiler.c: added two hooks:
1691 mono_profiler_string_allocation called whenever a string is
1692 allocated by InternalAllocateStr and mono_profiler_iomap called
1693 whenever IOMAP code performs an adjustement on a file path.
1695 Fri Dec 11 18:24:04 CET 2009 Paolo Molaro <lupus@ximian.com>
1697 * boehm-gc.c: fixed race condition while getting the target of a
1698 disappearing link (bug #522233).
1700 2009-12-10 Rodrigo Kumpera <rkumpera@novell.com>
1702 * class.c (mono_type_get_full): Produce warning instead of simply swallowing
1705 2009-12-10 Rodrigo Kumpera <rkumpera@novell.com>
1707 * reflection.c: Add mono_reflection_register_with_runtime icall to
1708 allow a MonoGenericClass to register itself as the managed mirror of
1709 a given generic instance.
1710 This is a temporary workaround until all MGC instantiation happens in
1713 * object-internals.h: Ditto.
1715 * icall-def.h: Ditto.
1717 2009-12-10 Mark Probst <mark.probst@gmail.com>
1719 * sgen-gc.c (find_in_remsets): Also search the generic store
1722 2009-12-10 Mark Probst <mark.probst@gmail.com>
1724 * sgen-gc.c: Don't access class names in debugging code when
1725 unloading a domain, because they might not be valid anymore.
1727 2009-12-10 Mark Probst <mark.probst@gmail.com>
1729 * domain.c, domain-internals.h: New function mono_domain_unset().
1731 * appdomain.c (unload_thread_main): Detach the thread again at the
1734 * threads.c: When a thread exists or is detached, unset its domain
1735 so that it's NULL when, for example, a pthread destructor runs.
1737 * sgen-gc.c: Assert that there is no domain set after a thread is
1740 2009-12-10 Mark Probst <mark.probst@gmail.com>
1742 * class.c (mono_generic_class_get_class),
1743 metadata.c (free_generic_class): Allocate generic MonoClass's from
1744 the image mempool, not via malloc. The problem with malloc is
1745 that when unloading a domain those classes are freed before
1746 clearing the heap and SGen needs the classes. Rewriting the
1747 unloading code to do the free later would be more work and there's
1748 no point in using malloc anyway.
1750 2009-12-09 Sebastien Pouliot <sebastien@ximian.com>
1752 * loader.c (mono_method_signature): Always call mono_loader_unlock
1755 2009-12-09 Rodrigo Kumpera <rkumpera@novell.com>
1757 * metadata-verify.c: Add mono_verifier_verify_string_signature to check
1760 * verify-internals.h: Add new function to the internal API.
1762 * verify.c (do_ldstr): Call into mono_verifier_verify_string_signature to
1763 check if it's a valid string.
1765 * object.c (mono_ldstr): Ditto.
1769 2009-12-09 Rodrigo Kumpera <rkumpera@novell.com>
1771 * icall.c (ves_icall_GetCurrentMethod): Drop all generic arguments
1772 from a method before returning it. This is the expected behavior.
1774 2009-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1776 * reflection.c (inflate_method): Handle the case of a regular system type.
1778 2009-12-08 Mark Probst <mark.probst@gmail.com>
1780 * sgen-gc.c, sgen-pinning-stats.c, sgen-gray.c: More statistics
1783 * mempool.c, mempool-internals.h: New function
1784 mono_mempool_get_bytes_allocated().
1786 * Makefile.am: sgen-pinning-stats.c added.
1788 2009-12-08 Mark Probst <mark.probst@gmail.com>
1790 * sgen-gc.c (create_allocator): Only use the fast path if the
1791 object size is within the small object size limit.
1793 2009-12-07 Mark Probst <mark.probst@gmail.com>
1795 * sgen-gc.c: Make sure section->data is aligned to 8 bytes by
1796 possibly adding padding to sizeof (GCMemSection).
1798 2009-12-07 Mark Probst <mark.probst@gmail.com>
1800 * sgen-gc.c (mono_gc_wbarrier_nostore): Skip the remset if the
1801 reference is not in the nursery.
1803 2009-12-07 Rodrigo Kumpera <rkumpera@novell.com>
1805 * class.c (mono_class_from_typeref): Bounds check idx against the
1808 2009-12-07 Mark Probst <mark.probst@gmail.com>
1810 * sgen-gc.c, sgen-pinning.c: When pinning, make only one pass
1811 through the potential roots, then sort the results and find the
1812 pinned objects from there.
1814 * Makefile.am: sgen-pinning.c added.
1816 2009-12-07 Mark Probst <mark.probst@gmail.com>
1818 * sgen-gc.c: Record generic stores in specialized remset buffers.
1820 2009-12-06 Mark Probst <mark.probst@gmail.com>
1822 * sgen-gc.c: Make pinned chunks the same size as major heap
1823 sections, and align them as well, so that we can check whether an
1824 object is in a pinned chunk or a major section in constant time.
1826 2009-12-06 Mark Probst <mark.probst@gmail.com>
1828 * sgen-gc.c (build_nursery_fragments): Don't leak fragments.
1830 2009-12-06 Mark Probst <mark.probst@gmail.com>
1832 * sgen-gc.c: Make all major heap sections the same size (currently
1833 128k) and allocate them on aligned addresses. Small heap sections
1834 give us better granularity with pinned objects - we can free up
1837 2009-12-06 Mark Probst <mark.probst@gmail.com>
1839 * string-icalls.c (ves_icall_System_String_GetLOSLimit): Debug
1842 2009-12-05 Zoltan Varga <vargaz@gmail.com>
1844 Applied patch from Laurent Etiemble (laurent.etiemble@gmail.com).
1846 * mono/metadata/assembly.c: When opening an assembly image, pass the real
1847 names in addition to the runtime generated one.
1849 * mono/metadata/image.h: Add a function to take the real name of the assembly
1852 * mono/metadata/image.c: If a real name has been passed to load an assembly,
1853 use it instead of the runtime generated one.
1855 Code is contributed under MIT/X11 license.
1857 2009-12-05 Zoltan Varga <vargaz@gmail.com>
1859 * marshal.c (emit_marshal_vtype): Do the klass == date_time_class checks
1860 before the other checks to prevent problems if the DateTime class is blittable.
1861 Hopefully fixes #559600.
1863 2009-12-05 Mark Probst <mark.probst@gmail.com>
1865 * string-icalls.c, string-icalls.h, icall-def.h: New icall that
1866 returns the largest string length that will not be put into the
1869 * sgen-gc.c, gc-internal.h: New function that returns the largest
1870 object size that will not be put into the LOS.
1872 * appdomain.c: Bump corlib version.
1874 2009-12-05 Zoltan Varga <vargaz@gmail.com>
1876 * class-internals.h: Add MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
1878 * generic-sharing.c: Handle MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
1880 2009-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1882 * reflection.c (inflate_method): Fix signature.
1884 * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Reflect change
1887 2009-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1889 * reflection.c (inflate_method): Make this method work with TypeBuilder as well.
1891 2009-12-03 Mark Probst <mark.probst@gmail.com>
1893 * sgen-gc.c: Abstract to-space handling.
1895 2009-12-03 Rodrigo Kumpera <rkumpera@novell.com>
1897 * loader.c (find_method_in_class): Ignore methods with broken signatures.
1901 2009-12-03 Mark Probst <mark.probst@gmail.com>
1903 * sgen-gc.c: Only add references from outside the nursery to
1904 within the nursery to the global remset list.
1906 2009-12-03 Mark Probst <mark.probst@gmail.com>
1908 * appdomain.c (create_exceptions): Set the domain temporarily if
1909 necessary to avoid cross-domain references.
1911 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1913 * verify.c (get_stack_type): Return that the type is invalid instead of
1916 * verify.c (mono_method_verify): Verify that all locals and arguments
1917 have valid stack types.
1921 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1923 * verify.c (mono_method_verify): Bounds check the filter offset. Make all
1924 bounds checking overflow aware.
1928 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1930 * verify.c (do_invoke_method): Check for invalid method signatures.
1934 2009-12-02 Jb Evain <jbevain@novell.com>
1936 * appdomain.c (MONO_CORLIB_VERSION): bump.
1937 * icall-def.h (get_base_definition): renamed to get_base_method
1938 and add a boolean argument indicating we want the original
1939 method definition, or the immediate base method.
1940 * icall.c: apply the get_base_definition to get_base_method change.
1942 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1944 * class.c (mono_class_setup_fields): Fail an enum without an instance field.
1948 Wed Dec 2 16:35:49 CET 2009 Paolo Molaro <lupus@ximian.com>
1950 * class.c: remove asserts for invalid type token in
1951 mono_class_name_from_token(), mono_assembly_name_from_token() and
1952 mono_class_create_from_typedef () (fixes bug #553318).
1954 Wed Dec 2 15:48:19 CET 2009 Paolo Molaro <lupus@ximian.com>
1956 * metadata.c, class.c, loader.c: remove assert after bsearch() for
1957 incorrect assemblies (bug #553322).
1959 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1961 * metadata.c (mono_metadata_inflate_generic_inst): Add MonoError parameter.
1963 * metadata-internals.h: Change signature of mono_metadata_inflate_generic_inst.
1965 * class.c (inflate_generic_type): Use new version of mono_metadata_inflate_generic_inst.
1967 * class.c (inflate_generic_context): Ditto.
1969 * loader.c (method_from_methodspec): Ditto.
1973 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1975 * class.c (mono_type_retrieve_from_typespec): Use MonoError machinery to report errors.
1977 * class.c (mono_class_create_from_typespec): Ditto.
1979 * class.c (mono_class_get_full): Fix for change on the above 2 functions.
1981 * class.c (mono_type_get_full): Fix for change on the above 2 functions.
1985 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1987 * verify.c (mono_class_has_default_constructor): Check fror broken signatures.
1989 * verify.c (verify_delegate_compatibility): Ditto.
1991 * verify.c (do_newobj): Ditto.
1995 2009-12-02 Mark Probst <mark.probst@gmail.com>
1997 * sgen-gc.c: Use a gray queue instead of requiring that gray
1998 objects are in a contiguous region.
2000 * sgen-gray.c: The gray queue implementation.
2002 * Makefile.am: sgen-gray.c added.
2004 2009-12-02 Mark Probst <mark.probst@gmail.com>
2006 * appdomain.c: When unloading a domain, zero its static data and
2007 perform a minor collection when using SGen. That will get rid of
2008 all the remsets pointing into that domain's static data.
2010 * sgen-gc.c: Allow remsets into static data. By doing this we
2011 need less checks so we're more efficient.
2013 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
2015 * verify.c (mono_method_verify): Check for catch clauses with broken
2020 2009-12-01 Jb Evain <jbevain@novell.com>
2022 * class.c (make_generic_param_class): set the namespace of
2023 the generic parameter class from its owner, if available.
2025 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
2027 * verify.c (code_bounds_check): Do proper overflow checking.
2029 * verify.c (mono_method_verify): The number of switch entries is
2030 an unsigned int. Properly bounds check it.
2034 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
2036 * metadata.c: Kill mono_metadata_get_param_attrs_checked. Add
2037 mono_metadata_method_has_param_attrs which only checks if a given param
2038 list has a non zero flags entry.
2040 * metadata.c (mono_metadata_get_param_attrs): Add param_count parameter
2041 to inform how many params should we expect to decode.
2043 * loader.c (mono_method_signature): Use mono_metadata_method_has_param_attrs
2044 as it's faster than mono_metadata_get_param_attrs.
2046 * metadata-internals.h: Fix mono_metadata_get_param_attrs signature and
2047 add mono_metadata_method_has_param_attrs.
2049 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
2051 * class.c (mono_class_setup_vtable_general): Check for mono_method_get_vtable_slot
2054 * class.c (mono_method_get_vtable_slot): Don't assert if the computed method slot
2055 is -1 but its class is broken.
2059 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
2061 * metadata.c: Introduce mono_metadata_get_param_attrs_checked which checks
2062 for parameter overflow.
2064 * metadata.c (mono_metadata_parse_method_signature_full): Use checked version
2065 of mono_metadata_get_param_attrs.
2067 * metadata-internals.h: Add mono_metadata_get_param_attrs_checked to the internal
2070 * loader.c (mono_method_signature): Use checked version of mono_metadata_get_param_attrs.
2072 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
2074 * class.c (mono_class_setup_fields): Check for fields with broken types.
2078 2009-11-28 Rodrigo Kumpera <rkumpera@novell.com>
2080 * reflection.c (ensure_generic_class_runtime_vtable): Split this function in 2
2081 so we can avoid calling ensure_runtime_vtable multiple times for the GTD during
2082 its TypeBuilder::CreateType ().
2084 * reflection.c (ensure_generic_class_runtime_vtable): Avoid initializing interfaces
2087 * reflection.c: Every time we change the interface array, set interfaces_packed to NULL
2088 to make setup_interface_offsets happy.
2090 * reflection.c (remove_instantiations_of_and_ensure_contents): Fix instances again as corlib
2091 compilation now works.
2093 2009-11-28 Zoltan Varga <vargaz@gmail.com>
2095 * appdomain.c (create_exceptions): New helper function extracted from
2096 mono_runtime_init () to precreate objects used during exception handling.
2097 (mono_runtime_init): Call it.
2098 (mono_domain_create_appdomain_internal): Ditto. Fixes #555264.
2100 2009-11-27 Rodrigo Kumpera <rkumpera@novell.com>
2102 * reflection.c (remove_instantiations_of_and_ensure_contents): Temp hack to fix corlib
2103 compilation until the proper one is found.
2105 2009-11-27 Zoltan Varga <vargaz@gmail.com>
2107 * class.c (mono_class_setup_vtable_general): Cache the result of
2108 get_virtual_methods () since it can be slow because of the metadata
2111 * metadata-internals.h (_MonoImage): Change 'method_cache' to a GHashTable
2112 from a MonoValueHashTable for now, since the later is based on an earlier
2113 version of hpj's internal probing code and seems to have serious collision
2116 * loader.c (mono_get_method_full): Update after the change above.
2118 2009-11-26 Zoltan Varga <vargaz@gmail.com>
2120 * class-internals.h (MonoCachedClassInfo): Add 'is_generic_container' field.
2122 2009-11-26 Rodrigo Kumpera <rkumpera@novell.com>
2124 * reflection.c (get_field_on_inst_generic_type): Try to fallback using the field from
2125 the GTD instead of the DGC instead of crashing.
2127 * reflection.c (ensure_generic_class_runtime_vtable): Only reinflate stuff that is
2128 required. Inflate fields if needed.
2130 * reflection.c (remove_instantiations_of): Ensure generic instances are properly
2133 2009-11-26 Rodrigo Kumpera <rkumpera@novell.com>
2135 * class.c (check_interface_method_override): Check for NULL signatures and fail
2138 * debug-helpers.c (mono_signature_get_desc): Return a fixed string for NULL signatures.
2142 2009-11-26 Zoltan Varga <vargaz@gmail.com>
2144 * class.c (mono_class_get_virtual_methods): Call decode_row_col to obtain
2145 the MONO_METHOD_FLAGS column instead of decoding the whole row.
2147 2009-11-25 Rodrigo Kumpera <rkumpera@novell.com>
2149 * loader.c (field_from_memberref): Resolve the class first then the field
2150 signature. Remove a lot of duplicated code and make sure we don't pass valid
2151 values to mono_loader_set_error_field_load.
2155 2009-11-25 Rodrigo Kumpera <rkumpera@novell.com>
2157 * class.c (inflate_generic_type): Change code to use new signature of
2158 mono_error_set_bad_image.
2162 2009-11-25 Sebastien Pouliot <sebastien@ximian.com>
2164 * verify.c (mono_method_verify): Don't free ctx.params items if
2165 we aborted while inflating the ctx.locals. Complete previous fix
2167 2009-11-25 Sebastien Pouliot <sebastien@ximian.com>
2169 * verify.c (mono_method_verify): Use the uninflated type name,
2170 when the inflated is null, to report errors. Also take care when
2171 freeing, not to free everything since, in case of an error, some
2172 stuff would be copies (i.e. not allocated by the function itself)
2175 2009-11-24 Rodrigo Kumpera <rkumpera@novell.com>
2177 * verify.c (stack_push, stack_pop, stack_pop_safe): Assert if we underflow
2178 or overflow. The caller must have done this check explicitly. This guard us
2179 from accessing invalid memory.
2181 * verify.c (do_push_static_field): Check for stack overflow.
2185 2009-11-24 Rodrigo Kumpera <rkumpera@novell.com>
2187 * loader.c (find_method_in_class): Don't crash if the signature cannot
2190 * metadata.c (mono_metadata_parse_generic_param): Return NULL instead
2191 of asserting for the case of invalid params.
2195 2009-11-24 Sebastien Pouliot <sebastien@ximian.com>
2197 * image.c (mono_image_load_module): Fix crash when a bad assembly
2198 has no module at all (fix bug #553412) and also replace the
2199 g_assert with a return NULL (documented return value for failure)
2201 2009-11-23 Zoltan Varga <vargaz@gmail.com>
2203 * debug-helpers.c (mono_type_get_desc): Handle typedbyref.
2205 2009-11-23 Miguel de Icaza <miguel@novell.com>
2207 * file-io.c: Change FindFirst/FindNext/FindClose API to return the
2208 file attribute to managed code and avoid doing the mask/attribute
2211 2009-11-22 Miguel de Icaza <miguel@novell.com>
2213 * file-io.c: Surface a smart FindFirst/FindNext/FindClose API to
2216 * icall-def.h: New entry points.
2218 2009-11-19 Mark Probst <mark.probst@gmail.com>
2220 * process.c: Don't put references to managed objects into a
2223 2009-11-18 Sebastien Pouliot <sebastien@ximian.com>
2225 * class.c (can_access_internals): Allow CoreCLR to participate in
2226 allowing (or not) [InternalsVisibleTo] between assemblies.
2227 * security-core-clr.c|h: Make sure that only trusted code (a
2228 superset of platform code) can access the internals of platform
2231 Mon Nov 16 16:28:11 CET 2009 Paolo Molaro <lupus@ximian.com>
2233 * reflection.c: use the correct base class to get the virtual method
2234 "get_UnderlyingSystemType" and speed up the icall. Fixes bug #555013.
2236 2009-11-16 Sebastien Pouliot <sebastien@ximian.com>
2238 * security-core-clr.c (get_caller_no_reflection_related):
2239 [Mono]Type.InvokeMember is outside System.Reflection[.Emit] but
2240 it's still reflection and must be filtered correctly.
2242 2009-11-16 Mark Probst <mark.probst@gmail.com>
2244 * object.c (compute_class_bitmap): Fix for large bitmaps.
2246 2009-11-15 Zoltan Varga <vargaz@gmail.com>
2248 (mono_gc_get_suspend_signal): Fix the build with a system libgc.
2250 * boehm-gc.c (mono_gc_base_init): Applied patch from DKoushik K. Dutta (
2251 koush@koushikdutta.com). Disable GC_no_dls on android.
2253 2009-11-12 Mark Probst <mark.probst@gmail.com>
2255 * sgen-gc.c (find_tlab_next_from_address): Handle the case where
2256 tlab_next points outside the TLAB because the allocator was
2259 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
2261 * reflection.c (mono_image_module_basic_init): Handle exceptions correctly.
2263 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
2265 * object-internals.h: Change signature for mono_string_to_utf8_image.
2267 * object.c (mono_string_to_utf8_image): Change signature to take a MonoError
2270 * reflection.c: Take care of mono_string_to_utf8_image change and avoid raising
2271 exceptions due to mono_string_to_utf8.
2273 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
2275 * object-internals.h: Change signature for mono_string_to_utf8_mp.
2277 * object.c (mono_remote_class): Make sure all resources are released before
2278 raising an exception.
2280 * object.c (mono_print_unhandled_exception): Avoid raising an exception.
2282 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
2284 * mono-perfcounters.c (network_get_impl): Change variable initialization
2285 ordering to fix potential memory leak in case of exceptions.
2287 * mono-perfcounters.c (mono_perfcounter_create): Properly handle badly
2290 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
2292 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): Change
2293 variable initialization ordering to fix potential memory leak in case
2296 2009-11-09 Zoltan Varga <vargaz@gmail.com>
2298 * icall.c (mono_ArgIterator_Setup): Remove the MONO_ARCH_REGPARMS stuff, its not
2301 2009-11-07 Rodrigo Kumpera <rkumpera@novell.com>
2303 * appdomain.c: Fix shadow path code to better deal with exceptions.
2305 2009-11-07 Rodrigo Kumpera <rkumpera@novell.com>
2307 * appdomain.c: Use checked version of mono_string_to_utf8 to avoid raising an
2308 exception in the middle of the runtime code.
2310 2009-11-07 Rodrigo Kumpera <rkumpera@novell.com>
2312 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): Don't
2313 leak memory with broken envvar value.
2315 2009-11-06 Mark Probst <mark.probst@gmail.com>
2317 * reflection.c (mono_reflection_setup_internal_class): Because
2318 nested classes are not added to the name cache, we must put them
2319 in the reflection_info_unregister_classes list.
2321 2009-11-05 Sebastien Pouliot <sebastien@ximian.com>
2323 * class.c: When CoreCLR is enabled don't call mono_init_com_types
2324 if MONO_CLASS_IS_IMPORT return true unless the type reside in
2325 platform (trusted) code. Instead we return a TypeLoadException to
2326 be thrown later. This is the exception thrown by Silverlight 2 if
2327 a type, inside application (user) code is marked with [ComImport]
2329 2009-11-05 Zoltan Varga <vargaz@gmail.com>
2331 * icall.c (ves_icall_System_Diagnostics_Debugger_IsAttached_internal): Call
2332 mono_is_debugger_attached () too.
2334 * mono-debug.c (mono_is_debugger_attached): New helper function.
2335 (mono_set_is_debugger_attached): Ditto.
2337 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2339 * object-internals.h: Add mono_string_to_utf8_checked.
2341 * object.c: Implement mono_string_to_utf8_checked.
2343 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2345 * class.c: Add missing check for load errors after every
2346 call to mono_class_setup_fields
2350 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2352 metadata-verify.c (verify_tables_schema): Fix the error message.
2354 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2356 * metadata.c: Change event table schema to use TDOR for event type
2357 as this is what it's meant to be.
2359 * metadata.c (mono_metadata_compute_size): Change MONO_TABLE_ASSEMBLYPROCESSOR
2360 to MONO_TABLE_ASSEMBLYREFPROCESSOR, which is table that has a MONO_MT_TABLE_IDX
2363 * metadata.c (mono_metadata_compute_size): Trim MT_TABLE_IDX of code that no
2364 longer makes sense: remove MONO_TABLE_EVENT and remove checks for non-existent
2365 rows in MONO_TABLE_GENERICPARAM.
2369 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2371 * class.c (mono_image_add_to_name_cache): Assert on duplicate
2374 * reflection.c (mono_reflection_setup_internal_class): Avoid
2375 registering a gc root the same MonoClass multiple times.
2376 Don't register nested types on the global scope as they should
2377 not be available there.
2379 2009-11-05 Rolf Bjarne Kvinge <RKvinge@novell.com>
2381 * culture-info-tables.h: regenerated.
2383 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
2385 * debug-helpers.c: avoid g_strdup() in mono_type_full_name().
2387 2009-11-04 Sebastien Pouliot <sebastien@ximian.com>
2389 * string-icalls.c|h: Remove string internal calls that are not
2390 used anymore by the class libraries.
2391 * icall.c: Remove System_Reflection_FieldInfo_internal_from_handle
2392 which is not used in the class librairies.
2393 * icall-def.h: Update tables.
2395 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
2397 * class.h: Move mono_class_inflate_generic_type_checked...
2399 * class-internals.h: to here and make it internal. We don't want to
2400 further expose MonoGenericContext.
2402 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
2404 * verify.c (mono_method_verify): Improve error message.
2406 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
2408 * reflection.c (fieldref_encode_signature): If field_image is NULL then
2409 the token is already properly encoded. Fixs 4.0 build.
2411 2009-11-04 Rolf Bjarne Kvinge <RKvinge@novell.com>
2413 * locales.c (construct_number_format): Check if the number index is
2414 valid before trying to use it, if not, just return.
2416 2009-11-04 Zoltan Varga <vargaz@gmail.com>
2418 * marshal.c (mono_marshal_get_runtime_invoke): Don't reset abort exceptions,
2419 since that loses the abort state. Fixes #539394.
2421 2009-11-03 Zoltan Varga <vargaz@gmail.com>
2423 * marshal.c (mono_marshal_get_native_wrapper): For icall wrappers, add an
2424 explicit this argument to the call signature.
2425 (mono_marshal_get_icall_wrapper): Ditto.
2427 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2429 * reflection.c (fieldref_encode_signature): Add new field_image parameter
2430 to indicate which assembly to use when resolving a custom-mod.
2432 Fixes handling of volatile fields used across assemblies as reported in #551513.
2434 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2436 * loader.c: Improve error messages.
2438 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2440 * class.c (mono_class_setup_methods): Only give a slot for virtual methods
2441 of interfaces. Fixes IKVM.
2443 * class.c (mono_class_setup_vtable_general): Improve debug spew.
2445 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2447 * verify.c (verifier_inflate_type): Return the inflated type on success.
2449 2009-11-02 Zoltan Varga <vargaz@gmail.com>
2451 * debug-mono-symfile.c (check_line): Fix the handling of IL offset 0.
2453 * threads.c (mono_thread_attach): Call the profiler thread start callback.
2455 * object-internals.h (_MonoThreadInternal): Add a 'flags' field.
2457 * threads.c (build_wait_tids): Ignore threads which have the DONT_MANAGE
2460 * profiler.c: Add new profiler callbacks for runtime invoke.
2462 * object.c (mono_runtime_invoke): Call the runtime invoke callbacks.
2464 2009-11-01 Mark Probst <mark.probst@gmail.com>
2466 * sgen-gc.c: Keep track of the reason for a major collection and
2467 write it to the heap-dump file.
2469 2009-10-31 Miguel de Icaza <miguel@novell.com>
2471 * threads.c: refactor the code that initializes the
2472 thread_start_args into a reusable function and use this in the two
2473 methods that start up threads.
2475 2009-10-31 Zoltan Varga <vargaz@gmail.com>
2477 * appdomain.c (mono_domain_try_unload): Applied patch from Romain Tartière.
2478 Fix returning when WaitForSingleObjectEx returns WAIT_IO_COMPLETION.
2480 2009-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
2482 * mono-perfcounters.c: add the "_Total" instance for CPU counters.
2483 Until now, we only had the per-cpu(core) counters.
2485 2009-10-28 Mark Probst <mark.probst@gmail.com>
2487 * gc-internal.h, boehm-gc, sgen-gc.c, null-gc: Add
2488 mono_gc_get_suspend_signal(), which returns the suspend signal
2489 number used by the GC.
2491 2009-10-25 Zoltan Varga <vargaz@gmail.com>
2493 * threads.c (start_wrapper): Avoid an assert if thread_start_args () is NULL.
2495 * threads.c (start_wrapper): Call mono_profiler_thread_start () later after
2496 signalling start_notify.
2498 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
2500 * appdomain.c: do not test the st_mode field for shadow-copies.
2503 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
2505 * threadpool.[ch]: added hooks for thread start/finish and item
2506 processing begin/end. For monotouch use only.
2508 2009-10-24 Zoltan Varga <vargaz@gmail.com>
2510 * threads.c (mono_thread_get_name): New helper function.
2512 * reflection.c (resolve_object): Set handle_class for strings too.
2513 (mono_reflection_create_custom_attr_data_args): New helper function to decode
2514 a cattr blob into a set of arrays and structures without creating the custom
2515 attributes themselves.
2516 (create_custom_attr_data): Simplify using create_custom_attr_data_args.
2518 * mono-debug.c (mono_debug_il_offset_from_address): New helper function.
2520 * debug-mono-symfile.c (mono_debug_symfile_get_line_numbers): New helper
2523 2009-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2525 * verify.c: Replace calls to mono_class_inflate_generic_type with
2526 mono_class_inflate_generic_type_checked. Fixes #480005.
2528 2009-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2530 * class.c (mono_class_inflate_generic_type_with_mempool): Clear the error
2531 object since not all paths lead to callees initing it.
2533 2009-10-23 Alp Toker <alp@nuanti.com>
2535 Fix embedding API breakage from r144688. mono-compiler.h is an internal
2536 header and should not be shipped:
2538 * class.h: Back out MONO_DEPRECATED change. Currently depends on config.h
2539 which is specific to the mono build. Not going to work.
2541 2009-10-23 Sebastien Pouliot <sebastien@ximian.com>
2543 * security-manager.c: Report if core-clr is active from
2544 ves_icall_System_Security_SecurityManager_get_SecurityEnabled
2545 to allow Moonlight BCL to behave appropriately (both in browser
2546 and outside, e.g. smcs)
2548 2009-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
2550 * mono-config.c: ignore UTF-8 BOM and report parser errors.
2553 2009-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2555 * class.c: fix typo.
2557 2009-10-22 Rodrigo Kumpera <rkumpera@novell.com>
2559 * class-internals.h: Change signature of mono_class_inflate_generic_type_with_mempool to take
2560 a MonoError parameter.
2562 * class.h: Mark mono_class_inflate_generic_type deprecated, add new mono_class_inflate_generic_type_checked
2563 version that can does proper error handling.
2565 * class.c (inflate_generic_type): Add a MonoError parameter. Don't assert on error, use new mono error machinery.
2567 * class.c (mono_class_inflate_generic_type_with_mempool): Add new MonoError parameter.
2569 * class.c, generics-sharing.c: Changes to handle mono_class_inflate_generic_type_with_mempool new signature.
2571 2009-10-20 Zoltan Varga <vargaz@gmail.com>
2573 * debug-helpers.c (dis_one): Fix the disassembly of empty strings when
2574 NO_UNALIGNED_ACCESS is defined.
2576 2009-10-22 Zoltan Varga <vargaz@gmail.com>
2578 * marshal.c (mono_string_builder_to_utf16): Applied patch from
2579 Hib Eris <hib@hiberis.nl>. Return empty string for empty string builders.
2582 2009-10-22 Mark Probst <mark.probst@gmail.com>
2584 * sgen-gc.c: Shorten sections whenever possible.
2586 2009-10-22 Mark Probst <mark.probst@gmail.com>
2588 * sgen-gc.c: Use our portable semaphore #defines.
2590 2009-10-22 Mark Probst <mark.probst@gmail.com>
2592 * sgen-gc.c: A debug option for dumping the heap layout to a file
2593 after each collection.
2595 2009-10-21 Mark Probst <mark.probst@gmail.com>
2597 * sgen-gc.c: Make managed write barriers atomic via
2600 2009-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2602 * verify.c (verify_delegate_compatibility): Properly verify delegate creation of static
2603 methods. Fixes #543021.
2605 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
2607 * socket-io.[ch]: fix VS build.
2609 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
2612 * socket-io.[ch]: implemented SendFile.
2614 2009-10-20 Zoltan Varga <vargaz@gmail.com>
2616 * class.c (mono_class_create_from_typedef): Initialize class->element_class
2617 before the interfaces to avoid crashes later if class initialization fails.
2620 * marshal.c (emit_marshal_vtype): Implement byref marshalling of DateTime.
2623 2009-10-20 Marek Safar <marek.safar@gmail.com>
2625 * domain.c: Bump 4.0 version.
2627 2009-10-19 Sebastien Pouliot <sebastien@ximian.com>
2629 * assembly.c (mono_assembly_load_reference): Fix leak when 'status'
2630 code is known. (parse_public_key) Remove duplicate (unneeded) NULL
2631 check since 'pubkey' can't be NULL at this stage
2632 * icall.c (ves_icall_System_Array_FastCopy): Add comment about
2633 the check. (ves_icall_Type_GetInterfaceMapData) Remove duplicate
2634 initialization of 'iter'
2636 2009-10-16 Bill Holmes <billholmes54@gmail.com>
2638 * cominterop.c : Search the interface parts of vtable to find
2639 method matches. Fixes 547030.
2641 Code is contributed under MIT/X11 license.
2643 2009-10-15 Gonzalo Paniagua Javier <gonzalo@novell.com>
2645 * marshal.c: BeginInvoke cannot be called on multicast delegates with
2646 multiple targets. Fixes bug #574426.
2648 2009-10-14 Massimiliano Mantione <massi@ximian.com>
2650 * profiler.h: Put here the definition of
2651 MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH
2652 (and fix the build...).
2654 2009-10-14 Massimiliano Mantione <massi@ximian.com>
2656 * profiler.c, profiler.h, profiler-private.h:
2657 Added support for different ways of getting call chains in stat mode.
2659 2009-10-12 Mark Probst <mark.probst@gmail.com>
2661 * object.c, object-internals.h: New function for computing the
2662 size of an array, factored out of mono_array_new_full(). Use
2663 SGen's functions for allocating arrays and vectors.
2665 * sgen-gc.c, gc-internal.h: Special functions for allocating
2666 arrays and vectors without race conditions. A managed array
2669 * boehm-gc.c, null-gc.c: Don't provide a managed array allocator.
2671 2009-10-12 Mark Probst <mark.probst@gmail.com>
2673 * object.c, object.h, icall.c: Write barriers do the copying now,
2674 as well, so no need for an additional memcpy.
2676 * sgen-gc.c: Lock when storing remsets. Do the memory
2677 copying/moving in the write barriers.
2679 * null-gc.c, boehm-gc.c: Write barriers must copy here, too.
2681 * reflection.c: Added an assert.
2683 2009-10-12 Mark Probst <mark.probst@gmail.com>
2685 * threads.c, process.c: A few missing write barriers.
2687 2009-10-12 Joel W. Reed <joelwreed@gmail.com>
2689 * mono-perfcounters.c, mono-perfcounters-def.h: Add
2690 network performance counters for bytes sent per second, bytes
2691 received per second, and bytes total per second.
2693 Code is contributed under MIT/X11 license.
2695 2009-10-09 Mark Probst <mark.probst@gmail.com>
2697 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
2700 2009-10-09 Mark Probst <mark.probst@gmail.com>
2702 * threads.c, object-internals.h, object.c: Move code for
2703 transferring an object to a different domain (via
2704 serialization/remoting) to object.c.
2706 * object.c (call_unhandled_exception_delegate): If the exception
2707 is in a different domain than the delegate, transfer the exception
2710 2009-10-07 Zoltan Varga <vargaz@gmail.com>
2712 * marshal.c (emit_marshal_vtype): Emit marshalling of DateTime to OLE DATE.
2715 2009-10-06 Zoltan Varga <vargaz@gmail.com>
2717 * domain.c (DEFAULT_RUNTIME_VERSION): Change this to v2.0.
2719 2009-10-06 Mark Probst <mark.probst@gmail.com>
2721 * object.c (mono_method_return_message_restore): Handle the case
2722 where the argument is an instance of a generic type. Fixes
2725 2009-10-06 Mark Probst <mark.probst@gmail.com>
2727 * object.c (set_value): Write barrier fix - we must pass the
2728 count, not the size.
2730 2009-10-05 Zoltan Varga <vargaz@gmail.com>
2732 * domain.c (mono_init_internal): Print a useful error message when encountering
2733 an old mscorlib, instead of crashing. Fixes #544307.
2735 2009-10-04 Zoltan Varga <vargaz@gmail.com>
2737 * appdomain.c (copy_app_domain_setup): Fix a warning.
2739 * debug-helpers.c (dis_one): Ditto.
2741 2009-10-04 Mark Probst <mark.probst@gmail.com>
2743 * domain-internals.h, appdomain.c: The AppDomainSetup is copied
2744 into the new domain, instead of referencing the original one.
2746 * marshal.c, marshal.h: Make mono_marshal_xdomain_copy_value()
2749 * appdomain.c: Corlib version bump.
2751 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2753 * threadpool.c: one more...
2755 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2757 * threadpool.c: forgot a LeaveCriticalSection when telling the idle
2758 threads to die because we're shutting down. delgate5.exe works again.
2760 2009-10-01 Bill Holmes <billholmes54@gmail.com>
2762 * cominterop.c (mono_marshal_free_ccw_entry): Updating the
2763 ccw_interface_hash table when a ccw is finalized.
2765 Code is contributed under MIT/X11 license.
2767 2009-09-30 Mark Probst <mark.probst@gmail.com>
2769 * assembly.c, domain.c, image.c, metadata-internals.h: Split
2770 domain and image unloading into two steps. We must do this
2771 because clearing the domain in SGen requires the class metadata to
2772 be intact, but we need to free the mono_g_hash_tables in case a
2773 collection occurs during domain unloading and the roots would trip
2776 2009-09-30 Mark Probst <mark.probst@gmail.com>
2778 * object-internals.h: Remove serialized culture fields from
2781 * icall-def.h, thread-types.h, threads.c: Remove serialized
2784 * appdomain.c: Corlib version bump.
2786 2009-09-30 Zoltan Varga <vargaz@gmail.com>
2788 * marshal.c (emit_marshal_object): Emit out marshalling of stringbuilders.
2791 2009-09-30 Mark Probst <mark.probst@gmail.com>
2793 * sgen-gc.c: Try to shorten the new section after a major
2794 allocation to avoid ever-growing sections.
2796 2009-10-13 Martin Baulig <martin@ximian.com>
2798 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
2799 `MONO_DEBUGGER_EVENT_TRAMPOLINE' into
2800 `MONO_DEBUGGER_EVENT_OLD_TRAMPOLINE' and added a new
2801 `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
2803 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 4.
2805 2009-09-29 Gonzalo Paniagua Javier <gonzalo@novell.com>
2807 * threadpool.c: fixed the order in which 'completed' and the wait
2808 handle, if any, are set. Fixes bug #542933 and delegate2.exe
2809 No need to use the wait_handle field of ASyncCall. Make sure the
2810 threadpool is active when adding a job or queueing an idle thread.
2812 2009-09-29 Zoltan Varga <vargaz@gmail.com>
2814 * object.c (mono_unhandled_exception): Fix a crash if there is no main thread.
2816 * threads.c (build_wait_tids): Fix a crash if there is no main thread, like
2817 when using --compile-all.
2819 2009-09-27 Mark Probst <mark.probst@gmail.com>
2821 * metadata.c (free_generic_class): Unregister the field_objects
2822 roots if we're using SGen.
2824 2009-09-27 Mark Probst <mark.probst@gmail.com>
2826 * reflection.c (mono_dynamic_image_free): Deregister the GC root
2827 for GenericParamTableEntry.gparam.
2829 2009-09-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2831 * marshal.c: don't create the handle when calling. It is created later
2834 2009-09-26 Mark Probst <mark.probst@gmail.com>
2836 * sgen-gc.c: Warning fixes.
2838 2009-09-26 Mark Probst <mark.probst@gmail.com>
2840 * sgen-gc.c: New debug option "xdomain-checks", which scans the
2841 whole heap for cross-domain references before each collection.
2843 * sgen-scan-object.h: The scan action can now use SCAN to scan the
2846 * threadpool-internals.h, threadpool.c: New function
2847 mono_thread_pool_is_queue_array() for checking whether a given
2848 array is used as a (cross-domain) queue by the thread pool code.
2850 2009-09-26 Mark Probst <mark.probst@gmail.com>
2852 * sgen-gc.c: New function mono_gc_scan_for_specific_ref() which
2853 searches the whole heap for objects containing a specific
2854 reference. Only for debugging.
2856 2009-09-26 Mark Probst <mark.probst@gmail.com>
2858 * appdomain.c (MONO_CORLIB_VERSION): Bumped.
2860 * icall-def.h, threads.c, threads-types.h: New icalls for copying
2861 byte arrays between domains.
2863 2009-09-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
2866 * class-internals.h:
2867 * mono-perfcounters-def.h:
2868 * mono-perfcounters.c:
2869 -There is a list of idle threads
2870 -Each of those idle threads wait on their own WaitHandle instead
2871 of all of them using the same semaphore. When a new work item is
2872 added, the job is assigned directly to an idle thread or a newly
2873 created one if possible and then the handle for that thread is
2874 signaled. Compare that to the current approach where all the
2875 threads in the pool compete to dequeue a job from the same
2877 -New struct ThreadPool that brings together the bunch of static
2878 variable for each threadpool (IO and regular).
2879 -New performance counters: # of items added and its rate per
2880 threadpool. The rate will be used later, perhaps together with
2881 other perf. counters, to decide when idle threads should exit.
2883 2009-09-25 Jonathan Chambers <joncham@gmail.com>
2885 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal):
2886 Fix typo on Windows build.
2887 (ves_icall_System_Net_Sockets_Socket_Accept_internal): Fix typo on Windows build.
2889 Code is contributed under MIT/X11 license.
2891 2009-09-25 Mark Probst <mark.probst@gmail.com>
2893 * object-internals.h: The Thread class is split up into Thread and
2894 InternalThread now. We have exactly one InternalThread per
2895 thread, and at most one Thread per appdomain per thread. Most
2896 data is stored in InternalThread. All InternalThread objects live
2899 * class-internals.h: Add internal_thread_class to MonoDefaults.
2901 * appdomain.c (mono_domain_unload), attach.c (receiver_thread),
2902 domain.c, gc.c, icall-def.h, monitor.c, object.c, sgen-gc.c,
2903 socket-io.c, threadpool.c, thread-types.h, threads.c: Changes
2904 resulting from the split of the Thread class.
2906 * gc-internal.h: Prototype for new function for checking whether a
2907 thread is the finalizer thread.
2909 * appdomain.c: Corlib version bump.
2911 2009-09-25 Rolf Bjarne Kvinge <RKvinge@novell.com>
2913 * appdomain.c|h: Add a mono_domain_try_unload method which is
2914 equivalent to mono_domain_unload, except that it returns an exception
2915 instead of throwing it. Make mono_domain_unload use the
2916 mono_domain_try_unload method to avoid code-duplication.
2918 2009-09-25 Zoltan Varga <vargaz@gmail.com>
2920 * debug-helpers.c (dis_one): Avoid unaligned accesses on platforms where that is
2923 2009-09-24 Zoltan Varga <vargaz@gmail.com>
2925 * marshal.c (emit_ptr_to_object_conv): Generate an exception instead of
2926 aborting when a conversion is not implemented.
2928 2009-09-23 Miguel de Icaza <miguel@novell.com>
2930 * verify.c: when comparing culture strings, use g_ascii_strcmp
2932 * assembly.c (mono_public_tokens_are_equal): Change g_strcasecmp
2933 when comparing public key tokens to use memcmp on 16 bytes. I do
2934 not believe this ever worked as advertised in the past.
2936 The standard Public Key is 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
2937 which would have always failed earlier.
2939 2009-06-25 Miguel de Icaza <miguel@novell.com>
2941 * gc.c: Raise a NullArgumentException if the object passed is
2944 2009-09-22 Zoltan Varga <vargaz@gmail.com>
2946 * image.c (mono_image_close): Atomically decrement the reference count and
2947 remove the image from the hash tables, to prevent another thread from seeing a
2948 dying MonoImage. Fixes #541194.
2950 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2952 * threadpool.c: actually use the minimum number of 'completion ports'
2953 (for us is just a potential worker thread).
2955 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2957 * threadpool.c: remove ares_htable. It does not make sense any more
2958 since the same objects are now stored in GC-tracked arrays while they are
2961 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2963 * threadpool.c: increase the minimum length of the queues to 128.
2966 2009-09-21 Zoltan Varga <vargaz@gmail.com>
2968 * marshal.c (mono_marshal_get_string_ctor_signature): New internal function to
2969 return the modified signature used by string ctors.
2971 2009-09-20 Zoltan Varga <vargaz@gmail.com>
2973 * marshal.c (mono_marshal_get_runtime_invoke_dynamic): New internal function
2974 to return a runtime-invoke wrapper which uses DYN_CALL to call the wrapped
2975 method, to be used by full-aot.
2977 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
2979 Since the runtime supports lazy initialization of a type's vtable and this can cause a type
2980 to fail, we need to ensure that the vtable is properly initialized at spots were the type must
2981 be known to be good.
2983 * class.c (mono_class_init): Fail array types if their element type fails initialization
2986 * object.c (mono_class_create_runtime_vtable): Fail array types if their element type fails
2987 initialization, additionally we request the element_type vtable to be initialized as well.
2989 This is fine and should not increase the working set in any meaningful way since it's reasonable
2990 to assume that most code will create an array and eventually populate it, which will require the
2991 type's vtable to be initialized.
2993 * loader.c (field_from_memberref): Add a comment for a possibly useless mono_class_init call.
2995 2009-09-17 Atsushi Enomoto <atsushi@ximian.com>
2997 * normalization-tables.h : regenerated.
2999 2009-09-16 Zoltan Varga <vargaz@gmail.com>
3001 * mono-debug.c (mono_debug_add_method): Increase the size of the buffer,
3002 a leb128 encoding can take up to 5 bytes.
3004 2009-09-15 Rodrigo Kumpera <rkumpera@novell.com>
3006 * class.c (verify_class_overrides): Remove useless argument.
3008 * class.c (mono_class_setup_vtable_general): Move the overrides check to happen
3009 before interface enumeration as this is no longer required.
3011 2009-09-15 Rodrigo Kumpera <rkumpera@novell.com>
3013 * class.c: New function mono_class_is_assignable_from_slow that is safe to be
3014 used under mono_class_init context. This functions avoid any code path that
3015 calls mono_class_init, which leads it to be slow as some things like the interface
3016 bitmap are not available.
3018 * class.c (verify_class_overrides): Use mono_class_is_assignable_from_slow instead
3019 of it's own broken version. Fixes the verifier part of #538588.
3021 * class-internals.h: Export mono_class_is_assignable_from_slow as part of the internal
3024 2009-09-15 Mark Probst <mark.probst@gmail.com>
3026 * class.c (mono_class_init): Always set an exception in a class if
3027 vtable setup fails. Fixes #538577.
3029 * generic-sharing.c: Raise an exception if mono_class_vtable()
3032 2009-09-13 Zoltan Varga <vargaz@gmail.com>
3034 * marshal.c (mono_marshal_get_runtime_invoke): Don't share instance
3035 methods of vtypes, as they could be incorrectly shared with static methods
3036 taking an IntPtr argument.
3038 2009-09-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
3042 * class-internals.h: renamed waithandle_class to
3043 manualresetevent_class.
3044 * marshal.c: propagate the exception if a remoting BeginInvoke call
3047 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3049 * object.c: Properly handle vtable failures.
3051 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3053 * socket-io.c: Assert on vtable failure.
3055 * mono-mlist.c: Assert on vtable failure.
3057 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3059 * marshal.c: Assert on vtable failure.
3061 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3063 * icall.c: Properly handle vtable failures.
3065 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3067 * debug-helpers.c (mono_class_describe_statics): Properly handle vtable failures.
3069 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3071 * cominterop.c (ves_icall_System_ComObject_CreateRCW): Property handle vtable failures.
3073 * console-unix.c (do_console_cancel_event): Same.
3075 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3077 * class-internals.h: Add mono_class_vtable_full function that allows control
3078 if an exception should be raised or not.
3080 * object.c (mono_class_vtable): Call into mono_class_vtable_full. Fix this function
3081 to do what its documentation say, that is to return NULL and set exception_type on
3084 * object.c (mono_class_create_runtime_vtable): Add new raise_on_error parameter
3085 and change the code to honor it.
3087 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3089 * verify.c: Fix typo in error message.
3091 2009-09-10 Sebastien Pouliot <sebastien@ximian.com>
3093 * security-core-clr.c: Fix default_platform_check so it can run
3094 the runtime coreclr tests (without an infinite recursion when
3095 throwing an exception).
3097 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3099 object.c (mono_delegate_ctor_with_method): Guard against null method.
3101 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3103 * marshal.c (mono_marshal_get_xappdomain_dispatch): Add an assert
3104 that should be replaced with error handling later.
3106 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3108 * marshal.c (mono_delegate_end_invoke): Fix warning.
3110 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3112 * loader.c (mono_field_from_token): Properly handle invalid
3115 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3117 * pedump.c (verify_image_file): Skip types that can't be
3120 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3122 * verify.c: Look for recursive valuetypes only against the
3123 type been initialized as this is a lot simpler and works.
3125 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3127 * verify.c: Ensure that fields are properly loaded before
3130 2009-09-10 Bill Holmes <billholmes54@gmail.com>
3132 * object.c (mono_object_get_virtual_method) : Call
3133 mono_cominterop_get_invoke if the object is a COM object.
3135 Code is contributed under MIT/X11 license.
3137 2009-09-09 Rodrigo Kumpera <rkumpera@novell.com>
3139 * verify.c: Check for recursive valuetype definitions.
3141 2009-09-08 Rodrigo Kumpera <rkumpera@novell.com>
3143 Use inheritance-aware interface offsets. Inherited types use the same offsets
3144 of their parents. This reduce offset duplication in case more than one type in
3145 the inheritance tree explicitly implements the same interface.
3147 This also removes a source of vtable bubbles found in #532409. An abstract type
3148 isn't required to provide abstract methods to all interfaces it implements, which
3149 resulted in a bubble with the previous scheme as the child would get a non-full
3150 vtable from its parent. We fail all concrete types with vtable bubbles, so this
3153 This change causes an increase of 1.7% in vtable memory usage for IronPython pystone but
3154 it's expected to not cause any significant increase beyond that.
3156 * class.c (setup_interface_offsets): Compute super class iface offsets
3157 first to force sharing.
3159 * class.c: Add VTABLE_SELECTOR macro to the vtable debug macros to help
3160 dumping only the relevant ones.
3162 * class.c (mono_class_setup_vtable_general): Give newslot, non final, virtual
3163 methods a new slot regardless if they belong to an interface or not. This allows
3164 an inherited type to override the iface method separately from the class one.
3166 2009-09-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
3168 * threadpool.c: make the Sleep() alertable to prevent delays exiting
3169 applications that take less than 2s to execute.
3172 2009-09-04 Zoltan Varga <vargaz@gmail.com>
3174 * object-internals.h (MonoRuntimeCallbacks): Add a 'get_runtime_build_info' callback.
3176 * object.c (mono_get_runtime_callbacks): New helper function to return
3177 the runtime callbacks.
3179 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Use the result of
3180 mono_get_runtime_build_info () as the display name.
3182 2009-09-03 Zoltan Varga <vargaz@gmail.com>
3184 * marshal.c (emit_marshal_array): Call conv.ovf.i on the array parameter
3185 argument, since NEWARR expects a native int. Fixes #481559.
3187 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
3189 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Guard
3190 against broken SRE methods.
3192 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
3194 * class.c (mono_type_get_full): Don't call mono_metadata_free_type on
3195 a NULL variable. Abort early on failure.
3197 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
3199 * class.c (can_access_type): Fail visibility test for non nested
3200 types with nested visibility.
3202 2009-09-02 Sebastien Pouliot <sebastien@ximian.com>
3204 * assembly.c (parse_public_key): Avoid allocating (and not
3205 freeing) the public key array when it's not requested by the
3207 * threads.c (mono_thread_manage, mono_thread_create_internal,
3208 ves_icall_System_Threading_Thread_Thread_internal): Free
3209 allocated memory on error.
3211 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
3213 * icall.c, icall-def.h: Remove some dead code from early SRE changes.
3215 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
3217 * class.c (mono_class_setup_fields): Remove duplicated local variable
3219 Rename gklass to gtd to reflect the fact that it points to the generic
3221 Remove the duplicated call to mono_class_setup_fields on gtd and move
3222 the error check to the beginning.
3224 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
3226 * marshal.c (mono_array_to_lparray): Do DISABLE_COM properly.
3227 Remove cruft of the previous patch.
3229 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
3231 * metadata-verify.c (verify_method_table): Check for abstract + final.
3234 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
3236 * verify.c (verify_class_fields): Check for duplicate fields.
3238 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
3240 * metadata-verify.c: Verify the typeref table for duplicates.
3242 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
3244 This reverts r140936 and properly handles interfaces with static methods. The
3245 right fix is to ensure vtables without bubles which is an easier to verify
3246 constraint. We should avoid such special cases as of the reverted patch as those
3247 only make the runtime more brittle.
3249 * class.c (mono_class_setup_vtable_general): Revert previous change that handle
3250 static methods on interfaces.
3252 * class.c (setup_interface_offsets): Use the number of virtual methods when
3253 calculating interface offsets instead of the number of methods. This way we
3254 avoid bubles on the layout.
3256 2009-08-31 Rodrigo Kumpera <rkumpera@novell.com>
3258 * metadata-verify.c (verify_metadata_header): Some very smart
3259 obfuscators like to add extra stream headers. Ignore them.
3261 2009-08-30 Zoltan Varga <vargaz@gmail.com>
3263 * class.c (mono_class_setup_vtable_general): Verify interfaces with static
3266 2009-08-29 Rodrigo Kumpera <rkumpera@novell.com>
3268 * metadata-verify.c: Verify for duplicated types.
3270 2009-08-28 Rodrigo Kumpera <rkumpera@novell.com>
3272 * metadata-verify.c (verify_typedef_table): Verify for nested types
3273 without an entry on the nested class table.
3275 2009-08-28 Zoltan Varga <vargaz@gmail.com>
3277 * cominterop.c (cominterop_get_ccw): Applied patch from tom hindle
3278 <tom_hindle@sil.org>. Add locking around hash table accesses.
3280 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3282 * verify.c (mono_verifier_verify_class): Verify all interface if
3283 really are interfaces. Fixes #534184.
3285 2009-08-27 Rodrigo Kumpera <rkumpera@novell.com>
3287 * pedump.c: Initialize all types during metadata validation so we report
3288 errors only detected as part of class initialization.
3290 2009-08-26 Rodrigo Kumpera <rkumpera@novell.com>
3292 * metadata-verify.c (verify_method_table): PInvoke requires method to
3293 be static. Fixes #534189
3295 2009-08-26 Zoltan Varga <vargaz@gmail.com>
3297 * threads.c (mono_thread_suspend_all_other_threads): Handle 'threads_starting_ip'
3300 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3302 * class.c (mono_class_setup_vtable_general): Verify the resulting vtable
3303 for holes or bad methods. Fixes #525314.
3305 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3307 * class.c (setup_interface_offsets): Don't allocate slot
3308 for the same interface multiple times. This creates bubbles
3309 that waster space and make vtable verification harder.
3311 The same interface get a slot multiple times since we need
3312 to get the closure of all implemented interfaces, which means
3313 the same interface is reported multiple times.
3315 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3317 * verify.c (mono_verifier_verify_class): Don't check the fields
3318 of generic instances since the context on which they got expanded
3319 might lead to false positives.
3321 Such thing happens when a generic type is inflated in the context
3322 of a generic method and the inflated type of a field turns into a
3323 generic method argument, which causes the checking code to think
3324 it's an invalid class when it's not.
3326 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3328 * verify.c (mono_type_is_valid_in_context): Verify if type
3329 is NULL and remove duplicate test.
3331 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3333 * verify.c (mono_verifier_verify_class): Check fields for
3334 invalid generic arguments.
3336 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3338 * class.c (verify_class_overrides): Verify if for static
3339 and non virtual methods.
3341 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3343 * icaa.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor):
3344 Check for errors after retrieving the vtable.
3346 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3348 * class.c (mono_class_setup_vtable_general): Verify
3349 if method overrides are valid before processing them.
3351 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3353 * marshal.c (mono_array_to_lparray): Fix minimal build with
3354 cominterop disabled.
3356 * marshal.c (mono_free_lparray): Same.
3358 2009-08-21 Mark Probst <mark.probst@gmail.com>
3360 * threadpool.c (mono_thread_pool_init): Use mono_object_hash() as
3361 the hash function for the ares_htable.
3363 2009-08-20 Rodrigo Kumpera <rkumpera@novell.com>
3365 * metadata-verify.c (verify_assembly_table): Accept 0x10 as a valid
3366 bit for assembly flags. MS is ok with it but there is no spec anywhere
3369 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3371 * class.c (mono_class_create_from_typedef): Emit profiler events
3374 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3376 * icall.c (ves_icall_Type_GetMethodsByName): Don't leak loader errors.
3377 Release memory on failure.
3379 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3381 * class-internals.h: Add mono_metadata_load_generic_param_constraints_full
3382 to the internal API.
3384 * metadata.c (get_constraints): Use a single-linked table as we don't
3385 traverse it backward. Fail and return FALSE if only of the contraint types
3388 * metadata.c (mono_metadata_load_generic_param_constraints_full): Identical
3389 to mono_metadata_load_generic_param_constraints except for having a return value.
3390 This has to be done since the later is part of the public API.
3392 * class.c (mono_class_create_from_typedef): Properly check the loading of constrains
3395 * loader.c (mono_get_method_from_token): Properly check the loading of constraints
3396 and fail the method.
3398 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3400 * metadata-verify.c (is_valid_method_header): Add work-around to deal
3401 with MS broken behavior of emmitting EH section sizes without the
3404 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3406 * metadata.c (mono_type_create_from_typespec): Don't allocate image
3407 memory until we're sure that we'll need it. This avoids leaking for
3408 broken types or duplicated instantiation.
3410 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3412 * metadata-verify.c (is_valid_method_header): Fix stupid formating
3415 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3417 * metadata-verify.c (is_valid_method_header): Fix number of clauses
3418 and expected size calculation.
3420 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3422 * class.c (mono_class_get_field_idx): Add fixme for broken
3423 behavior for types with multiple fields with the same name.
3424 I would rather fix it, but have no idea on how to generate
3425 such artifact for testing.
3427 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3429 * verify.c (verifier_load_field): We should allow references to
3430 fields to be made using the generic type definition. It's up to
3431 the loader system to fail invalid ops.
3433 * verify.c (get_boxable_mono_type): Only uninstantiated GTDs
3436 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3438 * class.c: Fix usage of mono_metadata_interfaces_from_typedef_full.
3440 * metadata-internals.h: Fix declaration of
3441 mono_metadata_interfaces_from_typedef_full.
3443 * metadata.c (mono_metadata_interfaces_from_typedef_full): Add extra
3444 heap_alloc_result parameter that controls if the result should be
3447 * metadata.c (mono_metadata_interfaces_from_typedef): Let the resulting
3448 array be g_malloc'd and properly document this public API function.
3450 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3452 * cil-coff.h: Fix METHOD_HEADER_FORMAT_MASK to be 2 bits and
3453 remove METHOD_HEADER_TINY_FORMAT1.
3455 * reflection.c: Remove reference to METHOD_HEADER_TINY_FORMAT1.
3457 * metadata.c (mono_metadata_parse_mh_full): Kill tiny format1.
3459 Both spec and MS uses only 2 bits to enumerate the kind of header.
3460 So given that 0x6 and 0x2 are equal under a 2 bits mask, tiny format1
3461 is superfluous, only used for tiny headers with odd code lengths.
3463 This change also make sure that mono doesn't wronly interpret bit 2
3464 of fat header flags, which is currently reserved.
3466 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3468 * metadata.c (do_mono_metadata_parse_type): Do error
3469 checking for element types. Don't abort if presented
3470 with a broken type kind.
3472 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3474 * metadata.c (mono_metadata_parse_method_signature_full):
3475 Gracefully fail bad vararg signatures.
3477 2009-08-18 Christian Hergert <chris@dronelabs.com>
3480 * class.c: Fix warnings for uninitialized variables.
3482 2009-08-18 Christian Hergert <chris@dronelabs.com>
3484 * icall.c: Fix _NSGetEnviron method declaration warning.
3486 2009-08-18 Christian Hergert <chris@dronelabs.com>
3489 * reflection.c: Make bitwise checks explicit.
3491 2009-08-18 Christian Hergert <chris@dronelabs.com>
3494 * marshal.c: Fix printf warnings.
3496 2009-08-18 Zoltan Varga <vargaz@gmail.com>
3498 * reflection.c (encode_cattr_value): Fix a warning.
3500 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3502 * metadata.c (mono_metadata_parse_array_full): Fix memory leak
3505 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3507 * loader.c (mono_method_signature): Don't assert on broken
3508 signature. Print a more useful error message.
3510 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3512 * loader.c (mono_method_get_marshal_info): Assert if
3513 signature is invalid. Bounds check stores to the
3516 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3518 * loader.c (field_from_memberref): Fix warning.
3520 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3522 * loader.c (mono_method_get_param_names): Check if signature
3523 is null. Don't store beyond the size of the name array.
3525 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3527 * loader.c (mono_get_method_constrained): Check if signature
3530 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3532 * loader.c (mono_loader_set_error_bad_image): Improve
3535 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3537 * loader.c (mono_get_method_full): Convert an assertion
3538 into a loader error.
3540 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3542 * class-internals.h, class.c: Better naming and documentation.
3544 2009-08-17 Zoltan Varga <vargaz@gmail.com>
3546 * boehm-gc.c (mono_gc_add_weak_track_handle): Don't do any work if
3549 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3551 * loader.c (mono_method_get_signature_full): Fail gracefully if signature
3554 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3556 * loader.c (mono_loader_error_prepare_exception): Handle missing field
3557 errors with no class set.
3559 * loader.c (field_from_memberref): If the field signature is of the wrong
3560 type fail with a MissingFieldException instead of a BadImageException as
3561 this is the behavior observed on MS.
3563 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3565 * loader.c (field_from_memberref): Don't crash if either the field
3566 signature or the typespec class are invalid.
3568 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3570 * verify.c (verifier_load_field): Don't allow field related
3571 ops to reference fields on generic type definition.
3573 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3575 * metadata-verify.c: Add new warning level for errors specified
3576 by ECMA 335 but that MS ignores.
3578 * metadata-verify.c (verify_method_table): Make compiler controled
3579 visibility + (rt)specialname error a warning as MS ignores this. Ignoring
3580 this check is safe because the end result will only be some visibility
3581 exceptions been thrown.
3583 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3585 * verify.c (get_boxable_mono_type): Don't allow the
3586 use of the generic type definition on boxed type positions.
3590 2009-08-14 Mark Probst <mark.probst@gmail.com>
3592 * threadpool.c: Make sure no cross-domain references remain in
3593 ares_htable or the arrays that are thrown away when resizing.
3595 2009-08-14 Mark Probst <mark.probst@gmail.com>
3597 * appdomain.c, metadata-internals.h, image.c: In MonoImage add a
3598 list of classes for which we have to unregister reflection_info
3599 with the GC and which are not in the namespace cache.
3601 * reflection.c (mono_reflection_initialize_generic_parameter): Add
3602 the class to the list.
3604 2009-08-14 Mark Probst <mark.probst@gmail.com>
3606 * domain.c (mono_domain_free): Unregister the GC roots in
3609 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
3611 * reflection.c (mono_reflection_type_get_handle): Fix typo.
3613 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
3615 * class.c: Add mono_class_get_field_from_name_full which does
3616 the same as mono_class_get_field_from_name but does check field
3619 * class-internals.h: Export mono_class_get_field_from_name_full as
3620 part of the internal API.
3622 * loader.c (field_from_memberref): Search fields by name and signature
3623 as it's valid to have two fields with same name but different types.
3627 2009-08-10 Rodrigo Kumpera <rkumpera@novell.com>
3629 * icall-def.h: Add a bunch of temporary icalls to MonoGenericClass.
3631 * reflection.c (mono_reflection_type_get_handle): Handle MonoGenericClass.
3633 * reflection.c (encode_cattr_value): Use mono_reflection_type_get_handle to encode
3636 2009-08-13 Zoltan Varga <vargaz@gmail.com>
3638 * gc.c (GCHandle_CheckCurrentDomain): Moved this here from icall.c.
3640 * boehm-gc.c (mono_gc_add_weak_track_handle): Handle nulls.
3642 2009-08-12 Mark Probst <mark.probst@gmail.com>
3644 * sgen-gc.c, sgen-scan-object.h: Object scanning code factored out
3645 to sgen-scan-object.h, which can be included and parameterized via
3648 * Makefile.am: sgen-scan-object.h added.
3650 2009-08-12 Mark Probst <mark.probst@gmail.com>
3652 * gc.c: #define GC_dont_gc if we're compiling with SGen.
3654 2009-08-12 Mark Probst <mark.probst@gmail.com>
3656 * domain.c (mono_domain_free): Free a domain's mono_g_hash_tables
3657 before clearing a domain in the GC.
3659 2009-08-12 Mark Probst <mark.probst@gmail.com>
3661 * exception.c (mono_exception_from_name_domain): Actually create
3662 the exception in the specified domain.
3664 * appdomain.c (mono_domain_create_appdomain_internal): Create the
3665 OutOfMemoryException a bit later so that the domain is inialized
3666 "enough" that it works.
3668 2009-08-12 Mark Probst <mark.probst@gmail.com>
3670 * threads.c (thread_cleanup): Clean up the cached_culture_info
3671 array to prevent cross-domain references.
3673 Tue Aug 11 14:38:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
3675 * metadata.c: more documentation for MonoType accessors.
3677 2009-08-11 Raja R Harinath <harinath@hurrynot.org>
3679 Fix incorrect size definitions where the tail array isn't a list
3681 * class-internals.h (MONO_SIZEOF_MARSHAL_TYPE): Use offsetof to
3683 * domain-internals.h (MONO_SIZEOF_JIT_INFO): Likewise.
3684 * metadata.h (MONO_SIZEOF_TYPE): Likewise.
3685 * reflection.h (MONO_SIZEOF_CUSTOM_ATTR_INFO): Likewise.
3687 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3690 * reflection.c: MONO_SIZEOF_CUSTOM_ATTR_INFO.
3692 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3696 * metadata-internals.h:
3698 * reflection.c: use MONO_SIZEOF_METHOD_HEADER.
3700 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3707 * reflection.c: #define for sizeof in MonoType and
3708 MonoMethodSignature.
3710 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3713 * domain-internals.h: add and use #define's instead of sizeof()
3714 for MonoJitInfo and MonoJitInfoTable.
3716 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3719 * class.h: use #define instead of sizeof() for MonoRemoteClass.
3721 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
3726 * class-internals.h:
3727 * generic-sharing.c:
3728 * marshal.c: use a #define instead of sizeof() for a few
3729 structures that use a zero-length array.
3731 2009-08-06 Rodrigo Kumpera <rkumpera@novell.com>
3733 * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Add new fields
3734 to handle inflated generic methods.
3736 * appdomain.c: Bump corlib version.
3738 * reflection.c (mono_image_get_method_on_inst_token): Handle generic method
3741 * reflection.c (fixup_method): Same
3743 * reflection.c (resolve_object): Same.
3745 * reflection.c (inflate_method): Replace a g_assert_not_reached with a
3746 g_error and a decent message.
3748 2009-08-06 Massimiliano Mantione <massi@ximian.com>
3750 * bohem-gc.c (mono_gc_add_weak_track_handle): Get the domain
3751 from the object because it could not yet be available globally
3752 (it happens if the profiler tries to create a gchandle on the
3753 MonoThread object of a thread that is still registering itself
3756 2009-08-04 Rodrigo Kumpera <rkumpera@novell.com>
3758 * reflection.c (mono_generic_class_get_object): Initialized the
3759 managed type arguments array.
3761 * object-internals.h (MonoReflectionGenericClass): Add type_arguments field.
3763 * appdomain.c: Bump corlib version.
3765 2009-08-04 Zoltan Varga <vargaz@gmail.com>
3767 * threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
3770 2009-08-03 Zoltan Varga <vargaz@gmail.com>
3772 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
3773 Avoid a crash if synch_cs is not set.
3775 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
3776 Handle the case when the handle is 0.
3778 * appdomain.c: Bump corlib version.
3780 2009-08-02 Zoltan Varga <vargaz@gmail.com>
3782 * reflection.c (mono_type_get_object): Fix a warning.
3784 2009-08-01 Mark Probst <mark.probst@gmail.com>
3786 * sgen-gc.c (mono_gc_wbarrier_value_copy): Don't compute the GC
3787 descriptor here. We assume it's already been computed.
3789 * generic-sharing.c (instantiate_other_info): Compute the GC
3790 descriptor for info type MONO_RGCTX_INFO_KLASS.
3792 2009-08-01 Mark Probst <mark.probst@gmail.com>
3794 * reflection.c (mono_type_get_object): MonoDomain is an unmanaged
3795 type, so don't use MONO_OBJECT_SETREF to set a field.
3797 2009-08-01 Mark Probst <mark.probst@gmail.com>
3799 * gc.c: We were missing one case where invoking a finalizer would
3800 not reset the domain. Also, in the finalizer thread loop, assert
3801 that we're in the root domain.
3803 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
3805 * icall.c (ves_icall_MonoType_GetArrayRank): Throw ArgumentException
3806 if the type is not an array.
3808 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
3810 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Return the
3811 method bound to the declaring type of the method. Raise an exception
3812 if the type is not a generic param.
3814 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
3816 * class.c (print_unimplemented_interface_method_info): Print the
3819 * class.c (mono_class_setup_vtable_general): When dealing with a
3820 generic instance first check if the generic type definition is
3823 2009-02-11 Tom Hindke <tom_hindle@sil.org>
3825 * marshal.c (mono_array_to_lparray): Implemented so managed object types are converted to native types.
3827 * marshal.c: Added new method mono_free_lparray to free memory allocated by mono_array_to_lparray
3829 * marshal.c (emit_marshal_array): call emit mono_free_lparray where approprate.
3831 * marshal.c (conv_to_icall): added MONO_MARSHAL_FREE_LPARRAY case
3833 * metadata.h (MonoMarshalConv enum): added MONO_MARSHAL_FREE_LPARRAY
3835 Code is contributed under MIT/X11 license
3837 2009-08-30 Rodrigo Kumpera <rkumpera@novell.com>
3839 * verify.c: Fix naming of stelem and ldelem.
3841 2009-07-30 Mark Probst <mark.probst@gmail.com>
3843 * generic-sharing.c: Replace the templates lock with the loader
3844 lock because of very hard to resolve deadlock issues.
3846 2009-07-30 Zoltan Varga <vargaz@gmail.com>
3848 * icall.c (ves_icall_Type_GetMethodsByName): Use
3849 mono_class_get_vtable_size () instead of accessing klass->vtable_size
3850 directly. Fixes #525338.
3852 * class.c (mono_class_get_vtable_size): New helper function.
3854 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*. Check whenever
3855 the field belongs to the type. Fixes #525733.
3857 2009-07-30 Mark Probst <mark.probst@gmail.com>
3859 * sgen-gc.c: When we stop a thread and its stack top is not within
3860 its allocated stack (because it's in an altstack signal handler),
3861 restart it and stop it again, until it is.
3863 2009-07-30 Mark Probst <mark.probst@gmail.com>
3865 * sgen-gc.c: Take a thread's stack top and registers from the
3866 sigcontext in the suspend signal handler.
3868 * sgen-gc.h, sgen-archdep.h, Makefile.am: Move arch-dependent
3869 stuff to sgen-archdep.h.
3871 * gc.c, gc-internal.h: Remove the get_ip_from_sigctx installer and
3872 caller, because have code in sgen-archdep.h to acquire that data.
3874 2009-07-29 Massimiliano Mantione <massi@ximian.com>
3876 * profiler.c, profiler.h, profiler-private.h:
3877 Added support for keeping track of code chunks and buffers.
3879 2009-07-29 Rodrigo Kumpera <rkumpera@novell.com>
3881 * metadata-verify.c: Fix endianness problems on decoding functions.
3882 Based on a patch by Ulrich Weigand <uweigand@de.ibm.com>
3884 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
3886 * icall.c (ves_icall_Type_make_array_type): Handle the new encoding
3887 schema for vectors and one dimension SZARRAY.
3889 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
3891 * reflection.c (mono_reflection_type_get_handle): Handle the new encoding
3892 schema for vectors and one dimension SZARRAY.
3894 2009-07-27 Mark Probst <mark.probst@gmail.com>
3896 * icall-def.h, thread-types.h, threads.c: New separate icalls for
3897 Interlocked.(Compare)Exchange with object arguments, which invoke
3900 2009-07-26 Miguel de Icaza <miguel@novell.com>
3902 * icall.c (ves_icall_Type_GetNestedType): Throw an exception when
3903 passed invalid arguments. Fixes another crasher in the
3904 Silverlight test suite.
3906 * class.c (mono_class_array_element_size): Return 0 for the size
3907 of the class; This fixes the crasher exposed by :
3909 typeof (void).MakeArrayType ();
3911 * icall.c (ves_icall_MonoType_GetEvent): Do not dereference method
3912 if there is no method to dereference. Put all the code that
3913 depends on this inside the if (method) block.
3915 This fixes the crasher exposed by Microsoft's Silvelright CLR test
3916 suite ./Reflection/Emit/TypeBuilder/TypeBuilderGetEvent.exe
3918 With this change, we pass the test.
3920 * reflection.c (mono_reflection_sighelper_get_signature_local):
3921 Only dereference the assembly if it has been set. Fixes a
3922 crasher exposed by #525328
3924 2009-07-25 Mark Probst <mark.probst@gmail.com>
3926 * sgen-gc.c, object.h, null-gc.c, boehm-gc.c, marshal.c: Really
3927 don't perform the store in mono_gc_wbarrier_generic_nostore().
3928 Remove the second argument (value), which is not needed.
3930 2009-07-24 Zoltan Varga <vargaz@gmail.com>
3932 * null-gc.c (mono_gc_wbarrier_generic_nostore): Define this to fix
3935 * boehm-gc.c: Ditto.
3937 2009-07-24 Mark Probst <mark.probst@gmail.com>
3939 * sgen-gc.c, marshal.c, object.h: Make the managed write barrier
3940 not perform the store itself. Introduce
3941 mono_gc_wbarrier_generic_nostore(), which is the same as
3942 mono_gc_wbarrier_generic_store(), except it doesn't perform the
3945 2009-07-24 Mark Probst <mark.probst@gmail.com>
3947 * icall.c (ves_icall_System_Array_SetGenericValueImpl):
3948 mono_gc_wbarrier_value_copy() doesn't perform the copy itself, so
3949 we still need the memcpy().
3951 2009-07-22 Mark Probst <mark.probst@gmail.com>
3953 * sgen-gc.c: Align array bounds calculation to mono_array_size_t
3954 so that big arrays are handled correctly. Always use
3955 safe_object_get_size() to calculate array object sizes, which
3956 takes bounds into account.
3958 2009-07-22 Mark Probst <mark.probst@gmail.com>
3960 * sgen-gc.c (mono_gc_wbarrier_value_copy): Make sure the class's
3961 GC descriptor is computed before we use it.
3963 2009-07-22 Mark Probst <mark.probst@gmail.com>
3965 * icall.c (ves_icall_System_Array_SetGenericValueImpl): Use a
3966 write barrier if necessary.
3968 2009-07-22 Mark Probst <mark.probst@gmail.com>
3970 * icall-def.h, icall.c, thread-types.h: New separate icall for
3971 VolatileWrite(object&,object) that uses a write barrier.
3973 * console-unix.c, file-io.c, icall.c, threads.c: Use write
3974 barriers in icalls which write to "ref" or "out" arguments.
3976 2009-07-21 Zoltan Varga <vargaz@gmail.com>
3978 * marshal.c (mono_marshal_get_runtime_invoke): Do the work done in the exception
3979 handler in a separate icall, to reduce the size of the wrappers.
3981 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
3983 * metadata-verify.c (is_valid_typespec_blob): Fix error message.
3985 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
3987 * metadata-verify.c (parse_field): Allow byref field.
3989 * metadata-verify.c (parse_locals_signature): Allow byref locals.
3991 * metadata-verify.c (is_valid_typespec_blob): Allow byref typespec.
3993 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
3995 * verify.c (do_cast): Fail for any non reference type that isn't boxed.
3998 2009-07-20 Robert Jordan <robertj@gmx.net>
4000 * cominterop.c (cominterop_get_managed_wrapper_adjusted):
4001 Fix invalid IL in valuetype handling (STOBJ must push the
4002 corresponding class). Fixes bug #523149.
4004 Code is contributed under MIT/X11 license.
4006 2009-07-20 Geoff Norton <gnorton@novell.com>
4008 * gc.c: Use proper semaphores where available on posix and darwin.
4010 2009-07-19 Geoff Norton <gnorton@novell.com>
4012 * gc.c: Unnamed posix semaphores are broken on darwin-arm too.
4014 2009-07-19 Rodrigo Kumpera <rkumpera@novell.com>
4016 * refletion.c (is_sre_usertype): Change name to is_usertype and
4017 invert it's result so it returns true if the type is an user type
4018 and not the opposite.
4020 * reflection.c (is_*_type): Change all of those to use new macro
4021 check_corlib_type_cached that cached the type lookup so we don't
4022 need to do string comparisons all the type. Changed the signature
4023 to take a MonoClass instead.
4025 * reflection.c: Change mono_image_create_token and resolve_object
4026 to use is_sre_* functions.
4028 2009-07-18 Mark Probst <mark.probst@gmail.com>
4030 * sgen-gc.c: Check for writes to the stack in the managed
4033 2009-07-18 Mark Probst <mark.probst@gmail.com>
4035 * sgen-gc.c: When a thread is unregistered, don't free its remsets
4036 but put them on a list which is processed with the other thread's
4039 2009-07-18 Mark Probst <mark.probst@gmail.com>
4041 * sgen-gc.c: Fix and enable the internal allocator instead of
4042 using malloc/free (which causes deadlocks).
4044 2009-07-16 Rodrigo Kumpera <rkumpera@novell.com>
4046 * refletion.c: Fix builds with SRE disabled by adding a minimal
4047 implementation of mono_reflection_type_get_handle.
4049 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
4051 * refletion.c: Make mono_reflection_type_get_handle non static.
4053 * object-internals.h: Export mono_reflection_type_get_handle.
4055 * icall.c (ves_icall_MonoGenericClass_InflateType): Resolve the
4056 unmanaged handle using mono_reflection_type_get_handle.
4058 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
4060 * refletion.c: Replace all reads of MonoReflectionType::type with
4061 calls to mono_reflection_type_get_handle. Only the functions that
4062 deal with constructing TypeBuilder::type have not been changed
4063 because they have to deal with NULL values.
4065 This is a first step into supporting reflection types that don't
4066 map directly into their unmanaged counterpart.
4068 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
4070 * metadata-verify.c (parse_locals_signature): Don't complain
4071 on signature with zero locals since MS generates it and doesn't
4074 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
4076 * reflection.c (mono_image_get_array_token): Resolve return
4077 type using mono_reflection_type_get_handle.
4079 * reflection.c (mono_image_get_array_token): Resolve array method
4080 parent type using mono_reflection_type_get_handle.
4082 2009-07-14 Zoltan Varga <vargaz@gmail.com>
4084 * reflection.c (mono_image_basic_init): Applied patch from
4085 <Dax@daxxfiles.net>. Set the public key token from the assembly
4086 builder. Fixes #518909.
4088 * appdomain.c: Bump corlib version.
4090 2009-07-13 Zoltan Varga <vargaz@gmail.com>
4092 * class.c (mono_class_needs_cctor_run): Make this return false if
4093 the class has no cctor.
4095 2009-07-13 Mark Probst <mark.probst@gmail.com>
4097 * sgen-gc.c: When the minor GC needs to allocate a new section,
4098 invoke the major GC afterwards.
4100 2009-07-14 Bill Holmes <billholmes54@gmail.com>
4102 * process.c (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal) :
4103 Applying the window_style field to the SHELLEXECUTEINFO struct.
4105 Code is contributed under MIT/X11 license.
4107 2009-07-13 Mark Probst <mark.probst@gmail.com>
4109 * sgen-gc.c: Fix the race condition in the unmanaged allocator by
4110 locking earlier. Fix it in the managed allocator by making sure
4111 that no thread is stopped there before the GC runs. If we do stop
4112 a thread there, we restart it and let it run a but, until it stops
4115 * gc-internal.h, gc.c: Function for getting the IP from a signal
4116 context via a function registered by mini.
4118 2009-07-11 Zoltan Varga <vargaz@gmail.com>
4120 * object-internals.h (MonoIntPtr): New structure describing a boxed
4123 * object.c (mono_runtime_invoke_array): Handle ptr arguments and
4124 returns. Fixes #519953.
4126 * marshal.c (mono_marshal_get_runtime_invoke): Handle pointer returns.
4128 2009-07-09 Mark Probst <mark.probst@gmail.com>
4130 * class-internals.h, generic-sharing.c: New RGCTX info type for
4131 getting a remoting invoke with check wrapper.
4133 2009-07-07 Geoff Norton <gnorton@novell.com>
4135 * icall-def.h: Fix the enable-minimal build.
4137 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
4139 * object-internals.h: Add MonoReflectionDerivedType.
4141 * reflection.c: Implement support for PointerType.
4142 Fixed tons of warnings.
4144 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
4146 * object-internals.h: Add MonoReflectionByRefType.
4148 * reflection.c: Implement support for ByRefType.
4150 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
4152 * icall-def.h: Add System.Reflection.Emit.DerivedType::create_unmanaged_type.
4154 * object-internals.h: Add MonoReflectionArrayType and
4155 mono_reflection_create_unmanaged_type.
4157 * reflection.c: Implement support for ArrayType.
4159 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
4161 * metadata-verify.c (is_valid_method_header): Parse EH block
4164 2009-07-03 Mark Probst <mark.probst@gmail.com>
4166 * sgen-gc.c (finish_gray_stack): Set the to_space pointer after
4167 processing the disappearing links, and process disappearing links
4168 in a loop until no new objects are copied.
4170 2009-07-03 Mark Probst <mark.probst@gmail.com>
4172 * object.c (handle_enum): Invoke the write barrier when copying
4173 value type instances.
4175 * sgen-gc.c: Register remsets for unmanaged write barriers only
4176 when the address written to is actually on the heap. This makes
4177 set_value() in object.c work without requiring that the result be
4180 2009-07-02 Rodrigo Kumpera <rkumpera@novell.com>
4182 The runtime wrappers are all bound to a given type that must
4183 exist in the same image. For regular images we use the <Module>
4184 type, which is required to exist for all images.
4186 The <Module> type can't be used for dynamic images because it
4187 might not exist at the time the wrapper is required, so we create
4188 a synthetic type to use instead.
4190 The current code works because of the 2 stage setup of MonoClass,
4191 but once this is gone it will no longer work.
4193 * icall-def.h: Add ModuleBuilder::set_wrappers_type.
4195 * metadata-internals.h (MonoDynamicImage): Add wrappers_type.
4197 * object-internals.h: Export mono_image_set_wrappers_type icall
4198 as part of the internal API.
4200 * marshal.c (get_wrapper_target_class): If the image is dynamic,
4201 use MonoDynamicImage::wrappers_type instead of the <Module> type.
4203 reflection.c: Add mono_image_set_wrappers_type qhixh sets the dynamic
4204 image wrappers_type to the provided value.
4206 2009-07-01 Rodrigo Kumpera <rkumpera@novell.com>
4208 * appdomain.c (deregister_reflection_info_roots): No need
4209 to use the image lock here.
4211 2009-07-02 Mark Probst <mark.probst@gmail.com>
4213 * sgen-gc.c (collect_nursery): Also scan from write-barrier roots.
4215 2009-06-29 Zoltan Varga <vargaz@gmail.com>
4217 * threads.c: Store the thread start argument in a hash table instead of
4218 registering it as a root, as libgc doesn't support unregistering roots
4219 under windows, leading to 'too many root sets' errors when many threads
4222 * gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
4223 shutdown, they can still be referenced by the other dying objects.
4226 2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
4228 * socket-io.c: DontLinger does not allow LingerOptions.
4230 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
4232 * metadata-verify.c: The spec doesn't mention that it's possible to add
4233 custom attribute to a generic parameter. Fixed.
4235 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
4237 * class.c (inflate_generic_type): Don't crash while trying to output a message
4238 on why we're aborting.
4240 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
4242 * socket-io.c: DontLinger can take an int or a boolean too.
4244 Fri Jun 26 17:00:04 CEST 2009 Paolo Molaro <lupus@ximian.com>
4246 * gc.c: check for a null argument to SuppressFinalize () and
4247 ReRegisterForFinalize ().
4249 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
4251 * loader.c (method_from_methodspec): Call into the verifier to check
4254 * metadata-verify.c: Addmono_verifier_verify_methodspec_signature.
4256 * verify-internals.h: Export mono_verifier_verify_methodspec_signature as
4257 part of the internal API.
4259 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4261 * metadata.c (mono_type_create_from_typespec): Call into the verifier to check
4264 * metadata-verify.c: Add mono_verifier_verify_typespec_signature.
4266 * verify-internals.h: Export mono_verifier_verify_typespec_signature as
4267 part of the internal API.
4269 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4271 * metadata.c (mono_metadata_parse_mh_full): Call into the verifier to check
4274 * metadata-verify.c: Add mono_verifier_verify_standalone_signature. Fix
4277 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
4278 part of the internal API.
4280 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4282 * metadata-verify.c: Use is_valid_blob_object to verify blob validity
4283 when doing basic verification.
4285 This check must be done since the runtime peeks into signatures in much
4286 more places than it does decoding so it makes sense to ensure that all
4287 pointers to blob objects are well formed.
4289 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4291 * metadata-verify.c (is_valid_blob_object): Add extra minsize argument.
4292 Use proper overflow dectection. Fix usage of it.
4294 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4296 * loader.c (field_from_memberref): Call into the verifier to check
4299 * loader.c (mono_method_get_signature_full): Same.
4301 * loader.c (method_from_memberref): Same.
4303 * metadata-verify.c: Add mono_verifier_verify_memberref_signature.
4305 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
4306 part of the internal API.
4308 2009-06-25 Mark Probst <mark.probst@gmail.com>
4310 * threadpool.c (mono_thread_pool_add): If the domain is unloading
4311 or unloaded, still return an AsyncResult, but don't add it to the
4314 2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
4316 * threads.c: fix missing colon when DEBUG is defined.
4318 2009-06-25 Mark Probst <mark.probst@gmail.com>
4320 * threadpool.c: Don't add new calls to a threadpool if the domain
4321 of the call is unloading or unloaded. When dequeuing a job, null
4322 the reference in the queue.
4324 2009-06-25 Mark Probst <mark.probst@gmail.com>
4326 * sgen-gc.c (null_link_in_range): Add the dislink for the old
4327 generation if an object was moved.
4329 2009-06-25 Sylvain Dupont <duposyl@gmail.com>
4331 * cominterop.h cominterop.c marshal.c: Added support for marshalling out
4332 parameters of type SAFEARRAY[VARIANT].
4334 * reflection.c (encode_marshal_blob): Properly generate element type
4335 (SafeArraySubType marshal attribute option).
4337 Code is contributed under MIT/X11 license.
4339 Thu Jun 25 15:48:09 CEST 2009 Paolo Molaro <lupus@ximian.com>
4341 * reflection.c: in mono_method_clear_object () really ensure all the
4342 objects are removed.
4344 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4346 * loader.c (mono_method_signature): Call into the verifier to check
4347 the method signature.
4349 * metadata-verify.c (verify_method_table): Move signature verification
4350 to verify_method_table_full.
4352 * metadata-verify.c: Add mono_verifier_verify_method_signature.
4354 * verify-internals.h: Export mono_verifier_verify_method_signature as
4355 part of the internal API.
4357 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4359 * loader.c (mono_method_get_header): Call into the verifier to
4360 check the method header.
4362 * metadata-verify.c: Add mono_verifier_verify_method_header.
4364 * verify-internals.h: Export mono_verifier_verify_method_header as
4365 part of the internal API.
4367 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4369 * class.c (mono_class_find_enum_basetype): Call into the verifier to
4370 check the field signature. Replace an assert with an explicit check.
4372 * class.c (mono_class_setup_fields): Call into the verifier to check
4373 the field signature.
4375 * metadata-verify.c: Add mono_verifier_verify_field_signature.
4377 * verify-internals.h: Export mono_verifier_verify_field_signature as
4378 part of the internal API.
4380 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4382 * class.c (mono_class_find_enum_basetype): Simplify this function
4383 by moving code outside of the loop and not decoding static fields.
4385 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4387 * metadata-verify.c (verify_typedef_table): Check the extends
4388 token here. Move to here a flags check from verify_typedef_table_full.
4390 2009-06-24 Zoltan Varga <vargaz@gmail.com>
4392 * metadata-verify.c (is_valid_method_header): Fix a warning.
4394 * metadata-internals.h (MonoImage): Remove the unused
4395 static_rgctx_invoke_wrapper_cache.
4397 * image.c marshal.c: Ditto.
4399 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
4401 * image.c (do_mono_image_load): Enable table data verification.
4403 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
4405 * metadata-verify.c (is_valid_constant): Fix nullref check.
4407 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
4409 * metadata-verify.c (is_valid_constant): Fix string bounds check.
4411 2009-06-22 Mark Probst <mark.probst@gmail.com>
4413 * sgen-gc.c: Managed allocation with pthreads TLS.
4415 * threads.c, threads-types.h: Functions for the JIT to tell the
4416 runtime whether it supports the MONO_TLS opcode.
4418 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
4420 * metadata-verify.c (verify_param_table): Fix a crash for assemblies
4423 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
4425 * metadata-verify.c (is_valid_constant): Fix the string length check.
4426 Use safe overflow checking. Add decent error messages.
4428 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
4430 * metadata-verify.c: Move remaininh blob checks to the offline
4433 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
4435 * metadata-verify.c: Move more blob checks to the offline verification
4438 2009-06-22 Bill Holmes <billholmes54@gmail.com>
4440 * object-internals.h : Adding interrupt_on_stop field.
4442 * threads.c (mono_thread_request_interruption) : On Windows exit the
4443 thread if interrupt_on_stop is set.
4445 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
4446 Removing old interrupt logic and setting the interrupt_on_stop for the
4447 thread when calling accept.
4449 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
4450 setting the interrupt_on_stop for the thread when calling accept.
4452 Contributed under MIT/X11 license.
4454 2009-06-20 Martin Baulig <martin@ximian.com>
4456 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 3.
4458 2009-06-21 Zoltan Varga <vargaz@gmail.com>
4460 * appdomain.c (mono_try_assembly_resolve): Don't call managed code when
4461 running in no-exec mode.
4463 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4465 * metadata-verify.c (verify_method_table): Move header
4466 checking to verify_method_table_full.
4468 * metata-verify.c (mono_verifier_verify_full_table_data):
4469 Call verify_method_table_full.
4471 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4473 * metadata-verify.c (verify_field_table): Move signature
4474 checking to verify_field_table_full.
4476 * metata-verify.c (mono_verifier_verify_full_table_data):
4477 Call verify_field_table_full.
4479 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4481 * metadata-verify.c (verify_typedef_table): Move remaining
4482 stuff to verify_typedef_table_full.
4484 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4486 * metadata-verify.c: Kill is_corlib from VerifyContext.
4487 It is only used by the offline mode.
4488 So we better remove it from the runtime path.
4490 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4492 * metadata-verify.c: Add new mono_verifier_verify_full_table_data
4493 function that perform the offline metadata verification steps.
4495 * metadata-verify.c (verify_typedef_table): Move some checks to
4496 verify_typedef_table_full and make it been called by new function
4497 mono_verifier_verify_full_table_data.
4499 * pedump.c: Call mono_verifier_verify_full_table_data.
4501 * verify-internals.h: Export mono_verifier_verify_full_table_data as
4502 part of the internal API.
4504 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4506 * metadata-verify.c (typedef_is_system_object): Fix System.Object
4509 * metadata-verify.c (verify_implmap_table): Fix implmap invalid
4510 flags bits. SupportLastError was confused as bit 7 instead of 6.
4512 * metadata-verify.c (verify_implmap_table): Fix import scope verification
4513 to check against the module ref table instead of module.
4515 * metadata-verify.c (verify_implmap_table): Fix corlib check.
4517 * pedump.c: Call mono_image_load_names.
4519 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4521 * image.c: Extract mono_image_load_names from do_mono_image_load.
4523 * metadata-internals.h: Export mono_image_load_names as part of
4526 2009-06-19 Zoltan Varga <vargaz@gmail.com>
4528 * metadata.c (mono_metadata_cleanup): Free the generic method cache
4529 first, as it could reference data in the other caches.
4531 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
4533 * metadata-verify.c: Finished with method header verification.
4535 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
4537 * metadata-verify.c: Added more header verification code.
4538 Now only EH clauses are missing.
4540 2009-06-17 Zoltan Varga <vargaz@gmail.com>
4542 * marshal.c (get_runtime_invoke_type): Don't share primitive types
4545 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
4547 * metadata-verify.c: Initial method header verification.
4549 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
4551 * metadata-verify.c (verify_import_table): The IAT contents
4552 might end been patched by the windows DL when running with
4555 2009-06-15 Rodrigo Kumpera <rkumpera@novell.com>
4557 * class.c (mono_class_from_typeref): If the enclosing type is not
4558 found return null instead of crashing. Fixes #508487.
4560 2009-06-15 Atsushi Enomoto <atsushi@ximian.com>
4562 * normalization-tables.h : updated to the latest unicode charcter
4564 * appdomain.c : bump corlib version.
4566 2009-06-14 Zoltan Varga <vargaz@gmail.com>
4568 * class.c (mono_class_from_name): Fix support for assembly references
4569 in the EXPORTEDTYPE table. Fixes #511704.
4571 2009-06-13 Geoff Norton <gnorton@novell.com>
4573 * domain.c: Ensure that mono_domain_assembly_open actually opens the
4574 assembly in the target domain.
4576 2009-06-12 Robert Jordan <robertj@gmx.net>
4578 * cominterop.c (cominterop_get_ccw): Increment mspec's SizeParamIndex
4579 because "this" of the managed signature has become an
4580 ordinary parameter in the unmanaged signature.
4582 2009-06-12 Zoltan Varga <vargaz@gmail.com>
4584 * class-internals.h (struct _MonoGenericContainer): Add an 'image'
4585 field for owner-less generic containers.
4587 * reflection.c (mono_reflection_initialize_generic_parameter): Set the
4588 image field of the owner-less generic containers created here.
4590 * metadata.c (mono_metadata_load_generic_params): Ditto, the
4591 contain is ownerless until the caller sets its owner.
4593 * metadata.c (type_in_image): Handle owner-less generic containers
4596 2009-06-11 Zoltan Varga <vargaz@gmail.com>
4598 * image.c (mono_image_close): Support debug_assembly_unload for
4601 2009-06-11 Andrés G. Aragoneses <aaragoneses@novell.com>
4603 * class.c: Fix some typos in comments.
4605 2009-06-11 Zoltan Varga <vargaz@gmail.com>
4607 * reflection.c (add_custom_modifiers): Avoid reading invalid memory.
4609 * threads.c (mono_thread_execute_interruption): Avoid creating the
4610 abort exception object while holding the synch_cs lock.
4612 2009-06-10 Rodrigo Kumpera <rkumpera@novell.com>
4614 * metadata-verify.c: Verify basic cattr content.
4616 2009-06-10 Zoltan Varga <vargaz@gmail.com>
4618 * reflection.c (add_exported_type): Don't set the FORWARDER flag on
4621 * reflection.c (mono_image_fill_export_table_from_type_forwarders): Add
4622 support for nested types. Fixes #511704.
4624 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
4626 * metadata-verify.c: Verify methodspec signatures.
4628 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
4630 * metadata-verify.c: Verify typespec signatures.
4632 2009-06-09 Zoltan Varga <vargaz@gmail.com>
4634 * metadata.c (free_inflated_method): Call
4635 mono_marshal_free_inflated_wrappers (), which was missed earlier.
4637 2009-06-08 Miguel de Icaza <miguel@novell.com>
4639 * mono-config.c: Small change to report the PPC64/ILP32 model.
4641 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
4643 * metadata-verify.c (parse_type): Check szarray.
4645 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
4647 * metadata-verify.c (parse_type): Check fnptr.
4649 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
4651 * metadata-verify.c (parse_type): Check generic instances.
4653 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
4655 * metadata-verify.c (parse_type): Check array shape.
4657 2009-06-05 Robert Jordan <robertj@gmx.net>
4659 * class.c (mono_class_create_from_typedef): Check only for
4660 mscorlib's System.Array.
4662 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
4664 * metadata-verify.c (parse_type): Check pointer, class/valuetype
4667 * metadata-verify.c (parse_field): Check the signature.
4669 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
4671 * metadata-verify.c: Implement locals signature check.
4673 2009-06-04 Marek Safar <marek.safar@gmail.com>
4675 * domain.c: Add .NET 4.0 Beta 1 version.
4677 2009-06-04 Bill Holmes <billholmes54@gmail.com>
4679 * cominterop.c (cominterop_ccw_queryinterface): Fix for bug 499566.
4680 For QueryInterface on CCWs consider the base class
4683 Code is contributed under MIT/X11 license.
4685 2009-06-04 Zoltan Varga <vargaz@gmail.com>
4687 * wrapper-types.h: Delete STATIC_RGCTX_INVOKE.
4689 * marshal.c (mono_marshal_ret_static_rgctx_invoke): Remove, no longer
4692 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
4693 adding a static-rgctx invoke wrapper, it is done by the runtime trampolines.
4695 * generic-sharing.c (inflate_other_data): Ditto.
4697 2009-06-03 Rodrigo Kumpera <rkumpera@novell.com>
4699 * metadata-verify.c: Implement property signature check.
4701 2009-06-04 Mark Probst <mark.probst@gmail.com>
4703 * sgen-gc.h: Register saving support for PPC.
4705 2009-06-04 Mark Probst <mark.probst@gmail.com>
4707 * sgen-gc.c: Fixed a pthread TLS screwup.
4709 2009-06-04 Mark Probst <mark.probst@gmail.com>
4711 * sgen-gc.c: Do TLS using pthread API if __thread keyword is not
4714 2009-06-04 Mark Probst <mark.probst@gmail.com>
4716 * sgen-gc.c: Disable TLA and managed allocation if the __thread
4717 keyword is not supported.
4719 2009-06-04 Zoltan Varga <vargaz@gmail.com>
4721 * marshal.c metadata.c: Applied patch from Ulrich Weigand
4722 <uweigand@de.ibm.com>: Free the wrappers of inflated generic methods when
4723 the inflated method is freed. Fixes #508389.
4725 The code is contributed under the MIT/X11 license.
4727 2009-06-03 Zoltan Varga <vargaz@gmail.com>
4729 * marshal.c (get_wrapper_target_class): New helper function.
4730 (mono_marshal_get_runtime_invoke): Place runtime-invoke wrappers into
4731 the <Module> class of the image. Fixes #509049.
4733 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4735 * threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
4736 Check if the thread was interrupted and proccess it straight away.
4737 Makes abortion much more responsive.
4739 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4741 * threads.c (mono_thread_execute_interruption): Use atomic cas with
4742 MonoThread::interruption_requested to match it's counterpart.
4744 Fixes a hang in abort-stress-1 on a 2 core x86.
4746 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
4749 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4751 Change MonoImage::name_cache to be protected by the image lock
4752 instead of the loader lock.
4754 * appdomain.c (deregister_reflection_info_roots): Protect access
4757 * class.c (mono_image_init_name_cache): Change from the loader lock
4758 to the image lock. Check if the cache wasn't already created.
4760 * class.c: Change from the loader to the image lock.
4762 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Fix
4763 the code to hold the image lock while iterating over name_cache and
4764 not go into mono_array_new holding it.
4766 * metadata-internals.h: Add a comment about this change.
4768 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4770 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
4771 Under the 2.0 profile raise the loader error.
4775 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4777 * marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
4778 of ldind opcode for generic instances so we don't fail for direct wrappers.
4779 This only affect direct calls.
4781 2009-05-31 Zoltan Varga <vargaz@gmail.com>
4783 * reflection.c (create_dynamic_mono_image): Fix warnings.
4785 * generic-sharing.c (other_info_equal): Ditto.
4787 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
4789 * metadata-verify.c: Implement field signature check.
4791 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
4793 * metadata-verify.c: Implement standalone signature check.
4795 2009-05-28 Rodrigo Kumpera <rkumpera@novell.com>
4797 * metadata-verify.c: Implement methodref signature check.
4799 2009-05-28 Zoltan Varga <vargaz@gmail.com>
4801 * object-internals.h (MonoRuntimeCallbacks): New structure containing
4802 callbacks supplied by the runtime.
4804 * object.c (mono_install_callbacks): New internal function to install
4807 * object.c (mono_create_ftnptr): Move the implementation of this to
4810 * object.c (mono_get_addr_from_ftnptr): Ditto.
4812 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
4814 * metadata-verify.c (parse_return_type): Proper byref check.
4815 * metadata-verify.c (is_valid_method_signature): Check for zero arity
4816 generic signatures and method params.
4818 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
4820 * metadata-verify.c (decode_signature_header): Fix bounds check.
4822 * metadata-verify.c (parse_custom_mods): Check custom mods.
4824 * metadata-verify.c (parse_type): Do initial basic verification
4827 * metadata-verify.c (is_valid_method_signature): Parse the generic
4830 2009-05-26 Rodrigo Kumpera <rkumpera@novell.com>
4832 * icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
4833 discarded based on their most specific definition so we set the method_slots
4834 array before checking if the method is acceptable or not.
4838 2009-05-26 Mark Probst <mark.probst@gmail.com>
4840 * icall.c: Free the old array when resizing a mono_ptr_array.
4842 2009-05-26 Mark Probst <mark.probst@gmail.com>
4844 * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
4845 for the hashes whose keys are managed objects.
4847 2009-05-26 Mark Probst <mark.probst@gmail.com>
4849 * object-internals.h, threads.c: Set the execution context on
4850 thread start here, not in corlib.
4852 * appdomain.c: Bump corlib version.
4854 2009-05-27 Martin Baulig <martin@ximian.com>
4856 * mono-debug.c (mono_debug_init): Use `MONO_DEBUG_FORMAT_DEBUGGER'
4857 if `_mono_debug_using_mono_debugger' is set to make things work
4858 properly when embedding Mono.
4860 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
4862 * class.c (mono_class_setup_fields): Don't mark simd types as having
4863 16 bytes alignment as the whole runtime doesn't support.
4865 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
4867 * metadata-verify.c (safe_read): Use endian safe read macros.
4869 2009-05-25 Zoltan Varga <vargaz@gmail.com>
4871 * object.c (mono_create_ftnptr): Don't allocate from the code mempool since
4872 it is read-only when using full aot.
4874 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
4876 * metadata-verify.c (is_valid_method_signature): Verify parts
4877 of the return type. Provide an error message in case of failure.
4879 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
4881 * metadata-verify.c (is_valid_method_signature): Verify the call conv.
4883 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
4885 * metadata-verify.c: Include the size prefix in the bounds check.
4887 2009-05-22 Miguel de Icaza <miguel@novell.com>
4889 * icall.c: Remove warnings.
4891 * mono-config.c: Allow for CONFIG_CPU to be set in config.h and
4892 prevent auto-detection based on GCC defines.
4896 * metadata-verify.c: Do not include signal.h
4898 * generic-sharing.c, marshal.c: Add returns to avoid some warning
4899 messages. Not sure why the g_assert_not_reached is not enough to
4903 * appdomain.c: Remove code that is not used when
4904 DISABLE_SHADOW_COPY is set.
4906 * image.c: use g_getenv
4908 2009-05-21 Miguel de Icaza <miguel@novell.com>
4910 * reflection.c: Remove code that it not used with
4911 DISABLE_REFLECTION_EMIT is defined.
4913 2009-05-21 Zoltan Varga <vargaz@gmail.com>
4915 * marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
4918 2009-05-20 Miguel de Icaza <miguel@novell.com>
4921 (ves_icall_System_Net_Sockets_Socket_Available_internal): Remove
4922 the ifdef here and instead put that on io-layer
4924 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4926 * metadata-verify.c: Verify the generic param constraint table.
4928 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4930 * metadata-verify.c (verify_generic_param_table): Fix
4931 thinko on the valid flags bits for generic params.
4933 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4935 * metadata-verify.c: Verify the methodspec table.
4937 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4939 * metadata-verify.c: Verify the generic param table.
4941 2009-05-19 Mark Probst <mark.probst@gmail.com>
4943 * sgen-gc.c: Store and use the count with REMSET_VTYPE.
4945 2009-05-19 Mark Probst <mark.probst@gmail.com>
4947 * sgen-gc.c: Use generation enum more consistently and use the
4948 correct generation in mono_gc_register_for_finalization().
4950 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
4952 * metadata-verify.c: Verify the nested class table.
4954 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
4956 * metadata-verify.c: Verify the manifest resource table.
4958 2009-05-17 Zoltan Varga <vargaz@gmail.com>
4960 * debug-helpers.c (dis_one): Add little-endian support for ldstr.
4962 2009-05-16 Zoltan Varga <vargaz@gmail.com>
4964 * class.c (mono_class_get_vtable_entry): Avoid adding static-rgctx
4965 wrappers, this is now done in the JIT.
4967 * class.c (mono_set_generic_sharing_supported): New internal function.
4968 (mono_class_generic_sharing_enabled): Move the #ifdef stuff to the JIT.
4970 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4972 * metadata-verify.c: Verify the exported type table.
4974 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4976 * pedump.c (main): Fake an assembly for netmodules to make the verifier happy.
4978 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4980 * metadata-verify.c: Verify the file table.
4982 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4984 * metadata-verify.c (verify_assembly_table): Fix an error message.
4986 * metadata-verify.c: Verify the assemblyref table.
4988 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4990 * metadata-verify.c (verify_assembly_table): Fix the valid
4991 bits mask for flags.
4993 2009-05-15 Zoltan Varga <vargaz@gmail.com>
4995 * debug-helpers.c (mono_method_full_name): Print generic parameters of
4996 generic methods as well.
4998 2009-05-15 Geoff Norton <gnorton@novell.com>
5000 * gc.c: MachO/Darwin supports and uses semaphores fine for this
5001 use-case and is significantly more performant than the wapi layer.
5003 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
5005 * metadata-verify.c: Verify the assembly table.
5007 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
5009 * metadata-verify.c: Fix rows limit check.
5011 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
5013 * metadata-verify.c: Verify the fieldrva table.
5015 2009-05-13 Mark Probst <mark.probst@gmail.com>
5017 * sgen.c: Speed up weak links and finalizers by grouping them by
5020 2009-05-13 Mark Probst <mark.probst@gmail.com>
5022 * marshal.c (delegate_hash_table_add): When overwriting an entry,
5023 free the old GCHandle (only applies to SGen).
5025 2009-05-13 Zoltan Varga <vargaz@gmail.com>
5027 * loader.c (mono_get_method_from_token): Avoid the expensive call to
5028 mono_metadata_load_generic_params () for non-generic methods.
5030 2009-05-12 Mark Probst <mark.probst@gmail.com>
5032 * monitor.c, monitor.h (mono_monitor_get_object_monitor_weak_link):
5033 New function for returning a monitor's weak link if it has one.
5035 * sgen-gc.c: Remove an object's monitor's weak link (if it has
5036 one) when clearing a domain. These can still be around because
5037 the object might not have been collected.
5039 2009-05-12 Zoltan Varga <vargaz@gmail.com>
5041 * gc.c: Fix a warning.
5043 2009-05-12 Kornél Pál <kornelpal@gmail.com>
5045 * gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
5046 prevous wait that resulted in a deadlock on Windows when initializing
5047 the runtime form DllMain. Also results in improved startup time.
5048 (finalizer_thread): Get rid of thread_started_event.
5049 * threads.c, threads-types.h (mono_thread_create_internal): Return the
5050 resulting MonoThread.
5052 Contributed under MIT/X11 license.
5054 2009-05-11 Rodrigo Kumpera <rkumpera@novell.com>
5056 * metadata-verify.c: Verify the implmap table.
5057 Don't require that #US and #Strings be present.
5059 2009-05-11 Sebastien Pouliot <sebastien@ximian.com>
5061 * security-core-clr.c: Delegate checks are done at creation time,
5062 not a invocation time. Fix exception for Telerik Silverlight demo
5064 2009-05-11 Mark Probst <mark.probst@gmail.com>
5066 * sgen-gc.c (need_remove_object_for_domain): Remove the special
5067 case for the Thread class.
5069 * threads.c: Do clean-up of abort exception/state in
5070 thread_cleanup() instead of Thread.free_internal(). Also clean up
5071 current_appcontext. The reason we have to do that is because
5072 those references might point into another domain and if that
5073 domain is unloaded before the thread is finalized, they point to
5076 2009-05-10 Andreas Faerber <andreas.faerber@web.de>
5078 * null-gc.c (mono_gc_weak_link_add, mono_gc_clear_domain): Fix
5081 Contributed unter MIT/X11 license.
5083 2009-05-09 Miguel de Icaza <miguel@novell.com>
5085 * verify.c, metadata-verifier.c: Add support for disabling the
5086 verifier in some builds.
5088 [ Sorry, my previous commit accidentally commited some work in
5091 2009-05-08 Zoltan Varga <vargaz@gmail.com>
5093 * class.c (mono_class_setup_fields): Set class->field.first for
5096 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
5098 * metadata-verify.c: Verify the typespec table.
5100 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
5102 * metadata-verify.c: Verify the module table.
5104 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5106 * metadata-verify.c: Verify the methodimpl table.
5108 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5110 * metadata-verify.c: Verify the property table.
5112 2009-05-06 Zoltan Varga <vargaz@gmail.com>
5114 * debug-helpers.c (mono_method_desc_match): Add support for generic
5117 2009-05-05 Rodrigo Kumpera <rkumpera@novell.com>
5119 * metadata-verify.c: Verify the propertymap table.
5121 2009-05-04 Rodrigo Kumpera <rkumpera@novell.com>
5123 * metadata-verify.c: Verify the event table.
5125 * metadata-verify.c (search_sorted_table): Fix offset
5128 2009-05-02 Zoltan Varga <vargaz@gmail.com>
5130 * domain-internals.h (struct _MonoJitInfo): Add a 'from_llvm' flag.
5132 2009-05-01 Mark Probst <mark.probst@gmail.com>
5134 * gc.c (mono_gc_run_finalize): Don't set the domain too late,
5135 because mono_delegate_free_ftnptr() needs it.
5137 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5139 * metadata-verify.c: Verify the eventmap table.
5141 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5143 * metadata-verify.c: Verify the standalonesig table.
5145 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5147 * metadata-verify.c: Verify the field layout table.
5149 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5151 * class.c (mono_type_get_name_recurse): Don't crash
5152 for ownerless generic params.
5154 * debug-helpers.c (mono_type_get_desc): Correct the format
5155 for ownerless generic params.
5157 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5159 * metadata-verify.c: Verify the class layout table.
5161 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5163 * metadata-verify.c: Verify the decl security table.
5165 2009-04-30 Mark Probst <mark.probst@gmail.com>
5167 * domain.c (mono_domain_set_internal_with_options): Don't do
5168 anything if the old domain is the same as the old one. Fixes
5171 2009-04-30 Mark Probst <mark.probst@gmail.com>
5173 * appdomain.c: Deregister the reflection_info roots when unloading
5176 * sgen-gc.c, domain.c, gc-internal.h: mono_gc_clear_domain() nulls
5177 memory allocated by a domain and frees its disappearing links.
5179 * boehm-gc.c, null-gc.c: Empty implementation of
5180 mono_gc_clear_domain().
5182 2009-04-30 Mark Probst <mark.probst@gmail.com>
5184 * appdomain.c (clear_cached_vtable): Free the static fields memory
5187 2009-04-30 Mark Probst <mark.probst@gmail.com>
5189 * gc.c: Set the correct domain when invoking finalizers.
5191 * appdomain.c: Set the correct domain when creating threads.
5193 2009-04-30 Mark Probst <mark.probst@gmail.com>
5195 * sgen-gc.c: Fix skip size for vectors.
5197 2009-05-03 Martin Baulig <martin@ximian.com>
5199 * mono-debug-debugger.c
5200 (mono_debugger_check_breakpoints): Check class init handlers even
5201 if we don't have any method load handers.
5203 2009-04-30 Zoltan Varga <vargaz@gmail.com>
5205 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid
5206 returning refonly assemblies if refonly is FALSE. Fixes #499013.
5208 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
5210 * metadata-verify.c: Verify the field marshal table.
5212 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
5214 * metadata-verify.c: Verify the custom attribute table.
5216 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
5218 * metadata-verify.c: Verify the constant table.
5220 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
5222 * metadata-verify.c: Verify the memberef table.
5224 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
5226 * metadata-verify.c (get_coded_index_token): Remove
5229 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
5231 * metadata-verify.c: Verify the interfaceimpl table.
5233 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
5235 * verify.c: Improve error message.
5237 * debug-helpers.c (mono_type_get_desc): Harden the code that
5238 deals with VAR and MVAR.
5240 2009-04-28 Zoltan Varga <vargaz@gmail.com>
5242 * image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes
5245 2009-04-23 Tom Hindle <tom_hindle@sil.org>
5247 * cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
5248 changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.
5250 2009-04-28 Sebastien Pouliot <sebastien@ximian.com>
5252 * security-core-clr.c: Avoid redundant checks for platform code,
5253 e.g. check for method and for class (very common) and check
5254 for class and outer class (less common)...
5256 2009-04-27 Zoltan Varga <vargaz@gmail.com>
5258 * reflection.c: Avoid returning random cattrs for synthetic methods.
5261 2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
5263 * assembly.c: assemblies in the GAC should never be shadow-copied.
5265 2009-04-26 Mark Probst <mark.probst@gmail.com>
5267 * domain.c, domain-internals.h: Disable
5268 track_resurrection_{objects,handles}_hash in MonoDomain if using
5271 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
5273 * metadata-verify.c: Verify the param table.
5275 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
5277 * metadata-verify.c (verify_typedef_table): Range check FieldList and
5280 * metadata-verify.c (verify_method_table): Proper check the ParamList
5283 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
5285 * metadata-verify.c (verify_method_table): Check for runtime
5286 implemented functions such as delegate .ctors. Remove spurious
5289 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
5291 * pedump.c: Proper initialize the runtime forcing the 2.0 profile.
5293 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
5295 Don't allocate MonoGenericInfo for ownerless generic params.
5296 * class-internals.h (MonoGenericParam::info): Move field to ...
5297 (MonoGenericParamFull): ... this. New struct.
5298 (MonoGenericContainer::type_params): Change type to
5299 MonoGenericParamFull.
5300 (MonoGenericParam, MonoGenericContainer): Update accessors.
5301 * metadata.c (mono_metadata_parse_generic_param): Don't initialize
5302 'info' field for ownerless generic param.
5303 (mono_metadata_load_generic_params): Update to changes.
5304 * reflection.c (mono_reflection_create_generic_class): Likewise.
5305 (reflection_methodbuilder_to_mono_method): Likewise.
5306 (mono_reflection_initialize_generic_parameter): Likewise.
5308 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
5310 Don't use MonoGenericParamInfo for ownerless generic params.
5311 * class.c (get_anon_gparam_class, set_anon_gparam_class): New. Don't
5312 use ParamInfo class at all.
5313 (mono_class_from_generic_parameter): Use them.
5314 (make_generic_param_class): Fix a couple of instances where 'pinfo
5315 == NULL' wasn't handle.
5317 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
5319 * class.c (make_generic_param_class): Carve out of ...
5320 (mono_class_from_generic_parameter): ... here.
5322 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
5324 Simplify mono_class_from_generic_parameter
5325 * class-internals.h (MonoGenericParamInfo::token): New field.
5326 * metadata.c (mono_metadata_load_generic_params): Initialize it
5328 * class.c (mono_class_from_generic_parameter): Use it instead of
5329 searching through metadata.
5331 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5333 * metadata-verify.c: Add verification of the method table.
5335 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5337 * icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
5338 Delegate::Invoke optimization.
5340 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5342 * appdomain.c (mono_domain_create_appdomain_internal): Free the
5343 string returned by get_shadow_assembly_location_base.
5345 * appdomain.c (get_shadow_assembly_location_base): Add a comment
5346 about caller's ownership.
5348 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5350 * reflection.c: Add mono_reflection_cleanup_domain to cleanup
5351 reflection memory on domain unload.
5353 * domain.c (mono_domain_free): Don't free refobject_hash, let the
5354 reflection cleanup code do it.
5356 * domain-internals.h: Add mono_reflection_cleanup_domain.
5358 This fixes a memory leak for managed mirrors of reflection objects
5361 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
5363 * metadata-verify.c: Implement more verification of the field table.
5365 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
5367 * pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
5368 doesn't try to parse the input assembly, which can be broken.
5370 2009-04-23 Mark Probst <mark.probst@gmail.com>
5372 * boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
5373 sgen-gc.c: Implement track resurrection in weak GC handles in SGen
5374 by using the lowest bit in the link to store whether the link is
5375 tracked. Move the track_resurrection hashes into boehm-gc.c.
5377 2009-04-22 Miguel de Icaza <miguel@novell.com>
5379 * Makefile.am: Split the console support in platform specific code
5380 and put together a framework for making this easy in the future so
5381 that we can start splitting code instead of having a mess of PLATFORM_WIN32
5383 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
5385 * pedump.c: Fix a warning.
5387 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
5389 * verify.c (mono_delegate_type_equal): Compare valuetypes using
5390 mono_class_from_mono_type to avoid bad interactions with the dual representation
5391 of the generic type definition.
5393 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
5395 * verify.c (do_invoke_method): Use mono_class_from_mono_type to
5396 get the MonoClass for the call context type as it might be a generic
5401 2009-04-21 Mark Probst <mark.probst@gmail.com>
5403 * object-internals.h: The Thread object has no execution_context
5406 * threads.c, threadpool.c, threads-types.h: Accessor functions for
5407 the execution context.
5409 * appdomain.c: Bump corlib version.
5411 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5413 * verify.c (do_newobj): Improve error message.
5415 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5417 * verify.c (verify_clause_relationship): Only mask as an error if the exception clause
5418 is nested in the filter block.
5420 * verify.c (verify_clause_relationship): The disjoint check must verify if the exception
5421 block is not fully nested.
5425 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5427 * verify.c (verify_type_compatibility_full): Compare MonoClass and
5428 not MonoType to check for equality of valuetypes as the generic type
5429 definition allows for two different encodings: the generic type definition
5430 class or a generic instance over the GTD arguments.
5434 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5436 * verify.c (dump_stack_value): Fix compilation with extra debug turned on.
5438 * verify.c (do_initobj): Improve error message.
5440 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5442 * metadata-verify.c: Enable pe verification as the issue with #496453
5443 is that the authenticode data directory have a different unspecified
5444 format. Ignore it for now.
5446 * pedump.c: Run the metadata verifier together with the IL verifier.
5450 2009-04-20 Rolf Bjarne Kvinge <RKvinge@novell.com>
5452 * metadata-verify.c: Temporarily disable pe verification due to #496453.
5454 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
5456 * class.c (can_access_type): Check visibility against
5457 the element type for pointers and arrays.
5461 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
5463 * metadata-verify.c: Fix cli and table verification to use information
5464 from the MonoImage. A lot of duplicated code got killed.
5466 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
5469 This patch starts to integrate the metadata verifier with the runtime code.
5471 This patch causes major regression in functionality for the metadata verifier
5472 as cli and table verification are disabled since they require to be ported to
5473 use MonoImage information.
5475 * image.c (do_mono_image_load): Split the code in this function
5476 into mono_image_load_pe_data and mono_image_load_cli_data.
5477 Add care_about_pecoff parameter to not load pecoff data.
5478 Call into the metadata verifier for pecoff and cli verification.
5480 * image.c (mono_image_open_raw): New function that doesn't perform
5481 any parsing of the image contents.
5483 The reason for the 3 new functions is to give pedump better control
5484 into the interaction with the verifier.
5486 * metadata-internals.h: Add new functions from image.c as part of the
5489 * metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
5490 mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
5491 to make those functions work together with the runtime.
5493 * verify.c: Add mono_verifier_is_enabled_for_image function that returns
5494 true if the image needs to be verified.
5496 * verify-internals.h: Export new functions from metadata-verify.c and verify.c.
5498 * pedump.c: Use new metadata verifier API.
5500 2009-04-19 Zoltan Varga <vargaz@gmail.com>
5502 * object.c (mono_install_vtable_trampoline): Make this receive a
5503 trampoline creation function instead of trampoline, allowing the JIT
5504 to use a different trampoline for each vtable.
5506 2009-04-18 Mark Probst <mark.probst@gmail.com>
5508 * object.c (mono_raise_exception): Don't reset the thread abort
5509 exception state here.
5511 2009-04-18 Mark Probst <mark.probst@gmail.com>
5513 * icall-def.h: New icall for getting the thread abort exception
5516 * object.c, thread.c, object-internals.h: A thread's abort
5517 exception state is now a GC handle. To get the object it stands
5518 for, we must move it into the current app domain, if it's
5519 different than the one where it originated from.
5521 * appdomain.c: Bump corlib version.
5523 * domain.c, domain-internals.h: New function for setting the
5524 domain and migrate the thread abort exception or not.
5526 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5528 * metadata-verify.c: Add initial verification of the
5531 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5533 * metadata-verify.c: Add a macro to conditionally enable
5534 dumping of verification information. Add make_coded_token
5535 and search_sorted_table to enable search sorted tables
5536 by a given coded token.
5538 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5540 * metadata-verify.c: Add array mapping from table index
5541 to description offset. Add get_col_offset and get_col_size
5544 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5546 * metadata-verify.c: Add remaining table descriptions offsets.
5547 Add remaining coded index descriptions.
5549 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5551 * metadata-verify.c: Fixed constant table description.
5552 Fixed calculation of HasCustomAttribute coded index size.
5553 Fixed calculation of size for many table indexes.
5555 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5557 * pedump.c (dump_metadata): Dump table offset instead
5558 of useless pointer in memory.
5560 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5562 * metadata-verify.c (verify_typedef_table): Add tests for MethodList.
5564 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5566 * metadata-verify.c (verify_typedef_table): Add tests for FieldList and
5567 a missing of for interface types.
5569 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5571 * metadata-verify.c (verify_pe_optional_header): Add comment of why
5572 the code is commented.
5574 * metadata-verify.c (verify_resources_table): Remove spurious printf
5575 and don't fail if there are unmanaged resources. Gmcs generates a useless
5576 one for all assemblies - I bet it's some MS compatibility junk.
5578 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5580 * metadata-verify.c (verify_typedef_table): Verify the extends field.
5582 * metadata-verify.c (mono_image_verify): Add a is_corlib.
5584 * verify-internals.h: Same.
5586 * pedump.c: Fix for mono_image_verify new signature.
5588 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5590 * metadata-verify.c (verify_typedef_table): Verify for some invalid
5593 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5595 * metadata-verify.c (verify_module_table): Ignore the generation field.
5597 2009-04-15 Martin Baulig <martin@ximian.com>
5599 * debug-mono-symfile.c
5600 (mono_debug_symfile_lookup_location): Don't print a warning for
5601 unknown extended opcodes if they're within 0x40 and 0x7f.
5603 2009-04-15 Zoltan Varga <vargaz@gmail.com>
5605 * marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
5606 invoke signatures returning an enum. Fixes #494847.
5608 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
5610 * metadata-verify.c: Initial code to verify the typedef table.
5612 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
5614 * verify.c (mono_method_verify): Don't fail if an unconditional branch
5615 with non empty stack happens before the beginning of a try block.
5619 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
5621 * metadata-verify.c: Verify typename and typenamespace fields of
5624 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
5626 * metadata-verify.c: Initial code to verify the typeref table.
5628 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
5630 * verify.c (verify_delegate_compatibility): Fix error message.
5632 2009-04-14 Sebastien Pouliot <sebastien@ximian.com>
5634 * security-core-clr.c: Fix typo
5636 2009-04-14 Zoltan Varga <vargaz@gmail.com>
5638 * marshal.c (delegate_hash_table_add): Make delegate_target_locations
5639 a MonoGHashTable to keep its values alive.
5640 (emit_marshal_boolean): Fix a warning.
5642 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
5644 * socket-io.c: don't return IPv4/IPv6 addresses if the machine does
5645 not have any interface configured for IPv4/IPv6.
5647 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
5649 * assembly.c: fix typo in error message.
5651 2009-04-14 Zoltan Varga <vargaz@gmail.com>
5653 * marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
5654 allocating the location holding the this argument to prevent
5655 'too many root sets' errors.
5657 * object.c (mono_class_create_runtime_vtable): Set field->offset to -1
5658 to mark fields as special static.
5659 (mono_field_static_get_value): Handle special static fields.
5660 (mono_field_static_set_value): Ditto.
5662 * class-internals.h (struct _MonoClassField): Document this.
5664 2009-04-13 Bill Holmes <billholmes54@gmail.com>
5666 * cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
5667 the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
5668 case. This will handle when managed code returns null to native code.
5670 Code is contributed under MIT/X11 license.
5672 2009-04-13 Bill Holmes <billholmes54@gmail.com>
5674 * object.c (build_imt_slots): Changing a free to a g_free to match
5675 the g_malloc0 in add_imt_builder_entry that allocated this memory.
5677 Code is contributed under MIT/X11 license.
5679 2009-04-13 Bill Holmes <billholmes54@gmail.com>
5681 * marshal.c (emit_marshal_boolean): Adding code to ensure that
5682 the correct TRUE value is passed through the marshaling layer.
5684 Code is contributed under MIT/X11 license.
5686 2009-04-13 Zoltan Varga <vargaz@gmail.com>
5688 * marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
5689 correctly. Fixes #492330.
5691 * marshal.c: Fix the embedding of object pointers into JITted code in
5692 the native-to-managed wrappers by allocating some GC tracked memory, and
5693 embedding the address of that.
5695 2009-04-11 Zoltan Varga <vargaz@gmail.com>
5697 * object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
5698 pointers into the vtable.
5700 2009-04-09 Rodrigo Kumpera <rkumpera@novell.com>
5702 * verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.
5704 * verify.c (verify_ldftn_delegate): Improve error message.
5706 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
5708 * reflection.c (my_mono_class_from_mono_type): Remove.
5710 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
5712 Prepare to reduce memory usage of owner-less generic parameters (1/n)
5713 * class-internals.h (MonoGenericParam): Carve out pklass, name, flags
5714 and constraints fields into ...
5715 (MonoGenericParamInfo): ... this.
5716 (mono_generic_param_info, mono_generic_container_get_param_info):
5718 * class.c, debug-helpers.c, icall.c: Update to changes.
5719 * metadata.c, reflection.c, verify.c: Likewise.
5721 2009-04-09 Zoltan Varga <vargaz@gmail.com>
5723 * debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.
5725 * marshal.c (get_runtime_invoke_type): Share enums with their base types.
5727 * marshal.c (get_runtime_invoke_type): Share pointers with ints and
5728 booleans with sbytes.
5730 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
5732 * class.c (can_access_instantiation): Verify accesibility of element types
5733 for arrays and pointers.
5735 * class.c (can_access_type): Return true if the target class is VAR or MVAR.
5737 * class.c (mono_method_can_access_method_full): Fix typos in the documentation.
5741 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
5743 * verify.c (do_invoke_method): Improve error messages.
5745 2009-04-08 Bill Holmes <billholmes54@gmail.com>
5747 * verify.c: Fixing the MSVC build.
5749 Code is contributed under MIT/X11 license.
5751 2009-04-08 Sebastien Pouliot <sebastien@ximian.com>
5753 * security-core-clr.c: Simplify get_reflection_caller not to call
5754 mono_method_get_last_managed (another stack walk) and adjust the
5755 callers to handle a (should not happen) NULL return value.
5757 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
5759 Add accessors to some MonoGenericParam fields
5760 * class-internals.h (mono_generic_param_owner): New accessor.
5761 (mono_generic_param_num): Likewise.
5762 (mono_type_get_generic_param_owner): New helper.
5763 (mono_type_get_generic_param_num): New helper.
5764 * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
5766 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
5768 * class-internals.h (mono_generic_container_get_param): New wrapper.
5769 * class.c, icall.c, metadata.c, verify.c: Use it.
5771 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
5774 * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
5775 the standard case/loop. In particular, don't complain about
5776 references to generic type definitions.
5778 2009-04-07 Zoltan Varga <vargaz@gmail.com>
5780 * debug-helpers.c (dis_one): Decode string arguments.
5782 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
5784 * pedump.c (dump_verify_info): Dump type name correctly.
5786 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
5788 * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
5789 are larger than code size.
5791 This can happen in valid code if the try/catch block is not followed by any instruction
5792 and do a backward branch on the leave instruction.
5796 2009-04-06 Sebastien Pouliot <sebastien@ximian.com>
5798 * security-core-clr.c: Fix typo while comparing second method names
5799 in can_avoid_corlib_reflection_delegate_optimization
5801 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
5803 * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
5807 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
5809 * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
5810 a MVAR using a class context.
5814 2009-04-06 Zoltan Varga <vargaz@gmail.com>
5816 * object.c (mono_class_compute_gc_descriptor): Make this non-static.
5818 * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
5820 * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
5821 functions supplied by the JIT for the SGEN GC.
5823 * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
5825 2009-04-06 Massimiliano Mantione <massi@ximian.com>
5827 monitor.c (mono_monitor_try_enter_internal):
5828 Added calls to profile monitor contentions.
5829 Also duplicated a small piece of code (the "get the monitor" logic)
5830 from the fast path to the slow path, and changed the relevant goto
5831 statements, so that monitor acquisition events can be emitted from the
5832 slow path (this is by Paolo Molaro).
5834 2009-04-06 Massimiliano Mantione <massi@ximian.com>
5836 * profiler.c, profiler.h, profiler-private.h:
5837 Added support for profiling monitor contentions.
5839 2009-04-03 Rodrigo Kumpera <rkumpera@novell.com>
5841 * metadata-verify.c: Verify the modules table.
5843 2009-04-02 Rodrigo Kumpera <rkumpera@novell.com>
5845 * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
5846 using the context of the method been verifier and not of the method been called.
5848 * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
5849 safely inflate generic types.
5851 2009-04-02 Sebastien Pouliot <sebastien@ximian.com>
5853 * security-core-clr.c: Change the strategy for checking the
5854 "reflection using delegates optimization" to avoid unneeded
5855 attributes in multiple class libraries.
5857 2009-04-02 Mark Probst <mark.probst@gmail.com>
5859 * sgen-gc.c: Remove object element in the disappearing link struct
5860 by storing the object pointer in the link.
5862 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
5864 * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
5866 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
5868 * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
5870 * verify.c (mono_method_verify): Do proper bounds checking of exception
5873 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
5875 * loader.c (mono_field_from_token): Don't crash if the field parent could
5878 2009-03-31 Mark Probst <mark.probst@gmail.com>
5880 * sgen-gc.c: Execute critical finalizers after ordinary
5883 * class-internals.h, domain.c: Add CriticalFinalizerObject to
5886 2009-03-31 Jb Evain <jbevain@novell.com>
5888 * verify.c (do_ldstr): don't check if a string is in the user strings
5889 heap if the current image is dynamic.
5891 2009-03-31 Mark Probst <mark.probst@gmail.com>
5893 * sgen-gc.c: Wait until the last finalizer has executed when
5894 returning from WaitForPendingFinalizers.
5896 2009-03-31 Martin Baulig <martin@ximian.com>
5898 * mono-debug-debugger.h (MonoDebuggerEvent): Add
5899 `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
5900 `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
5901 (mono_debugger_event_create_appdomain): New function.
5902 (mono_debugger_event_unload_appdomain): New function.
5904 * appdomain.c (mono_domain_create_appdomain_internal): Call
5905 mono_debugger_event_create_appdomain().
5907 2009-03-31 Martin Baulig <martin@ximian.com>
5909 * mono-debug-debugger.c
5910 (mono_debugger_register_class_init_callback): Also register the
5911 class init callback if the class is already initialized to make
5912 things work with shadow copied assemblies.
5914 2009-03-31 Sebastien Pouliot <sebastien@ximian.com>
5916 * security-core-clr.c
5917 (mono_security_core_clr_ensure_reflection_access_field): Let
5918 critical code access the field (just like we do for methods). Use
5919 check_field_access helper.
5920 (mono_security_core_clr_ensure_reflection_access_method): Use
5921 check_field_access helper.
5923 2009-03-31 Mark Probst <mark.probst@gmail.com>
5925 * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
5926 call the run-finalize function directly.
5928 * gc.c, gc-internal.h: Make run_finalize() non-static.
5930 2009-03-31 Mark Probst <mark.probst@gmail.com>
5932 * sgen-gc.c: Use a separate struct for disappearing links.
5934 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5936 * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
5937 * MaxIOVectorLength enabled, just ignore them.
5940 2009-03-30 Rodrigo Kumpera <rkumpera@novell.com>
5942 * metadata-verify.c: Fix eglib build.
5944 2009-03-30 Zoltan Varga <vargaz@gmail.com>
5946 * threads-types.h: Fix the win32 build.
5948 2009-03-28 Sebastien Pouliot <sebastien@ximian.com>
5950 * class.c: move coreclr inheritance/override checks to
5952 * security-core.clr.c|h: add code from class.c with additional
5953 documentation. Fix override check when the method is not critical.
5955 2009-03-28 Zoltan Varga <vargaz@gmail.com>
5957 * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
5958 (match_class): Ditto.
5960 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
5962 * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
5964 * metadata-verify.c: Implement table layout row size calculation. Verify
5965 the total size of the tables.
5967 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
5969 * metadata-verify.c: Verify heap sizes and size to decode row counts.
5971 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
5974 * console-io.[ch]: added new mono_console_init() to make sure that
5975 file descriptors 0, 1 and 2 are opened.
5978 2009-03-27 Sebastien Pouliot <sebastien@ximian.com>
5980 * appdomain.h: Export a new callback type and a new function to
5981 set this callback. This allow a mono host to provide it's own
5982 definition for "platform code".
5983 * metadata-internals.h: Add a core_clr_platform_code flag on
5984 _MonoImage to (cache and) know if it is representing platform
5986 * image.c (do_mono_image_open): Set core_clr_platform_code flag
5987 on platform code images.
5988 * security-core-clr.c|h
5989 (mono_security_set_core_clr_platform_callback): Allow the host
5990 to provide it's own platform check definition.
5991 (mono_security_core_clr_determine_platform_image): Detect if an
5992 image is platform code (using the specified callback).
5993 (mono_security_core_clr_is_platform_image): Return cached value
5996 2009-03-27 Zoltan Varga <vargaz@gmail.com>
5998 * threads.c (mono_create_thread): New helper function to wrap CreateThread
5999 which has different parameter types for the 'tid' argument in windows and
6002 * appdomain.c attach.c threads.c: Use the new helper.
6004 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
6006 * metadata-verify.c: Verify valid table bits.
6008 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
6010 * metadata-verify.c (verify_metadata_header): Store size in the size field.
6012 * metadata-verify.c: Add initial table schema verification.
6014 2009-03-26 Zoltan Varga <vargaz@gmail.com>
6016 * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
6017 obtain the refclass argument needed by mono_param_get_objects (). Fixes
6020 * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
6022 * appdomain.c (MONO_CORLIB_VERSION): Bump this.
6024 2009-03-26 Sebastien Pouliot <sebastien@ximian.com>
6026 * security-core-clr.c: Add/update documentation
6028 2009-03-26 Zoltan Varga <vargaz@gmail.com>
6030 * marshal.c (emit_marshal_object): Generate code to throw an exception
6031 instead of throwing it. Fixes #488670.
6033 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
6035 * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
6036 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
6037 an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
6038 and add a call to mono_security_core_clr_ensure_delegate_creation
6039 to do the extra checks required by CoreCLR.
6040 * security-core-clr.c|h: Add function to check delegate creation,
6041 both in the binding and accessibility, under CoreCLR.
6043 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
6045 * reflection.c (mono_reflection_create_dynamic_method): when
6046 coreclr is enabled make sure that every resolved object are
6047 checked (e.g. field and method access).
6048 * security-core-clr.c|h: Add function to check objects resolved
6049 when a dynamic method is created.
6051 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
6053 * metadata-verify.c: Cache directory rva translations.
6055 * metadata-verify.c: Add cli-header and streams verification.
6057 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
6059 * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
6060 the wrong offset (8 instead of 6).
6062 2009-03-23 Zoltan Varga <vargaz@gmail.com>
6064 * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
6065 methods, return the native function address itself. Fixes
6068 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
6070 * console-io.c: some of the values for control characters might not be
6073 2009-03-21 Sebastien Pouliot <sebastien@ximian.com>
6075 * exception.c|h: Add helpers to create [Field|Method]AccessException
6076 * icall.c: Add required coreclr check calls for field reflection.
6077 Move the existing (method) check logic into security-core-clr.c
6078 * security-core-clr.c: Add functions to check if the access of a
6079 field or method is allowed when reflecting under coreclr. This is
6080 mostly done using a stack walk to find the "real" caller: i.e. the
6081 code that is calling the reflection
6083 2009-03-20 Zoltan Varga <vargaz@gmail.com>
6085 * gc-internal.h: Change location of gc_wrapper.h
6087 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
6089 * class.c: Simplification to coreclr checks for overrides that
6090 makes it easier to set breakpoints.
6092 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
6094 * security-core-clr.c|h: (mono_security_core_clr_class_level,
6095 mono_security_core_clr_method_level): Avoid potential
6096 MonoCustomAttrInfo allocation for transparent assemblies (e.g.
6097 user/application code) and make it easier to set breakpoints
6099 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
6101 * metadata-verify.c: Reject cli header tables that mono don't handle.
6103 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
6105 * pedump.c: Fix CLI header dumping.
6107 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
6109 * metadata-verify.c: More CLI header verification.
6111 2009-03-19 Zoltan Varga <vargaz@gmail.com>
6113 * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
6115 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
6117 * metadata-verify.c: Initial verification of the CLI header.
6119 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
6121 * metadata-verify.c (verify_resources_table): Fix verification of zero
6122 sized resource section and id entries count.
6124 2009-03-18 Zoltan Varga <vargaz@gmail.com>
6126 * icall.c: Handle user types in many Type icalls. Fixes #486303.
6128 2009-03-17 Jb Evain <jbevain@novell.com>
6130 * profiler.c: call mono_gc_base_init from mono_profiler_load.
6132 2009-03-17 Zoltan Varga <vargaz@gmail.com>
6134 * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
6135 (mono_gc_make_descr_for_array): Ditto.
6137 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
6139 * verify.c (mono_verifier_is_class_full_trust): Add support for
6140 CoreCLR security mode where trusted assemblies are defined as
6143 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
6145 * metadata-verify.c: Add minimal PECOFF resource verification.
6147 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
6149 * metadata-verify.c: Be less restrictive with some coff fields.
6151 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
6153 * verify.c (init_stack_with_value_at_exception_boundary): Init generic
6154 params as boxed values on stack. Fixes #485706.
6156 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
6158 * console-io.c: the termios values may vary in different flavors of unix.
6160 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
6162 * console-io.[ch]: return the entire set of control characters when
6163 initializing the terminal.
6164 * appdomain.c: bump corlib version.
6166 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
6168 * mono-perfcounters.c: added support for in-process custom
6169 performance counters.
6171 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
6173 * metadata-verify.c: Small cleanup and add comment for IAT directory entry.
6175 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
6177 * metadata-verify.c: Verify the data pointed by the import table.
6179 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
6181 * metadata-verify.c (load_data_directories): Store data
6184 * metadata-verify.c: Verify the import table.
6186 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
6188 * metadata-verify.c: Verify data directories.
6190 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
6192 * metadata-verify.c: Check section header flags.
6194 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
6196 * appdomain.c: if the assembly name is a shadow-copied file, return
6197 TRUE from mono_is_shadow_copy_enabled but don't actually do anything
6198 in mono_make_shadow_copy.
6199 * icall.c: if the assembly name is a shadow-copied file, replace it
6200 with the original assembly path.
6202 Bug #484244 fixed. NUnit tests for corlib can be run without
6205 2009-03-12 Zoltan Varga <vargaz@gmail.com>
6207 * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
6208 entries when the table is reallocated.
6210 * icall.c: Allocate the memory used by the mono_ptr_array macros using
6211 mono_gc_alloc_fixed () since it contains GC refs.
6213 2009-03-10 Zoltan Varga <vargaz@gmail.com>
6215 * reflection.c (ensure_complete_type): New helper function to call
6216 type resolve handlers for unfinished dynamic types.
6217 (resolve_object): Call it for MonoClassFields. Fixes #483852.
6219 2009-03-09 Zoltan Varga <vargaz@gmail.com>
6221 * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
6224 2009-03-08 Rodrigo Kumpera <rkumpera@novell.com>
6226 * appdomain.c (get_shadow_assembly_location): Fix memleak.
6228 2009-03-08 Zoltan Varga <vargaz@gmail.com>
6230 * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
6231 between GCHandles of type WeakTrackResurrection and the objects they
6234 * gc.c: Partly implement the sematics of GCHandles of type
6235 WeakTrackResurrection: these handles should only be cleared after the
6236 finalizer of the object they are pointing to has ran.
6238 2009-03-06 Mark Probst <mark.probst@gmail.com>
6240 * icall.c: Partially revert r126631 because using the jump
6241 trampolines for generic shared methods makes it superfluous.
6243 2009-03-06 Zoltan Varga <vargaz@gmail.com>
6245 * threads.c (handle_store): Create the 'threads' hash table with the proper
6246 MONO_HASH_VALUE_GC type.
6248 2009-03-05 Zoltan Varga <vargaz@gmail.com>
6250 * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
6253 * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
6254 and LAST_GC_TRACKED as a GC root.
6256 * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
6258 * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
6259 the static data even if it consists of 1 reference.
6261 * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
6262 if there is a GC descriptor.
6264 * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
6265 instead of through the GC since they contain no object references.
6267 2009-03-05 Mark Probst <mark.probst@gmail.com>
6269 * generic-sharing.c (instantiate_other_info): Always return a jump
6270 trampoline for method code.
6272 2009-03-05 Marek Habersack <mhabersack@novell.com>
6274 * culture-info-tables.h: generated to include the en-tt culture.
6276 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
6278 * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
6279 capture the thread context.
6281 * object.c (mono_async_result_new): Cache the invoke wrappers to
6282 ExecutionContext::Capture.
6284 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
6286 * marshal.h: Add a prototype for what mono_compile_method returns
6287 for invoke wrappers.
6289 * gc.c: Use the new prototype declaration.
6291 2009-03-04 Geoff Norton <gnorton@novell.com>
6293 * boehm-gc.c: Add some MONO_LOG tracing for the GC
6295 * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
6297 2009-03-04 Martin Baulig <martin@ximian.com>
6300 (mono_debugger_runtime_invoke): Removed.
6302 * mono-debug-debugger.c
6303 (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
6305 2009-03-02 Martin Baulig <martin@ximian.com>
6308 (mono_debugger_unhandled_exception): Removed.
6309 (mono_debugger_handle_exception): Removed.
6310 (mono_debugger_throw_exception): Removed.
6313 (mono_debug_debugger_version): Bump to 5.
6315 * mono-debug-debugger.c: Moved the exception handling code to
6316 ../mini/debug-mini.c
6318 2009-03-03 Zoltan Varga <vargaz@gmail.com>
6320 * domain-internals.h (struct _MonoDomain): Add a separate lock for the
6321 finalize_objects_hash.
6323 * gc.c: Use the separate lock to access the finalize_objects_hash field.
6325 * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
6328 * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
6331 * image.c (mono_image_close): Free it.
6333 * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
6334 allowing a creation of a wrapper which invokes its method using a CALLVIRT
6335 on the this argument.
6337 * gc.c (run_finalize): Optimize the calling of the finalizers.
6339 2009-03-03 Martin Baulig <martin@ximian.com>
6341 * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
6342 of the `MonoGenericInst' changes.
6344 2009-03-03 Rodrigo Kumpera <rkumpera@novell.com>
6346 * icall.c (ves_icall_MonoType_GetGenericArguments): Use
6347 mono_array_class_get_cached to reduce locking contention. Extract
6350 * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
6351 intermediary managed arrays. Use caching version of mono_array_new
6352 to allocate the result array.
6354 * icall.c (ves_icall_Type_GetEvents_internal): Same.
6356 * icall.c (ves_icall_Type_GetNestedTypes): Same.
6358 * locales.c (create_names_array_idx): Use mono_array_new_cached
6359 to reduce locking contention.
6361 2009-03-03 Zoltan Varga <vargaz@gmail.com>
6363 * object.c (mono_method_add_generic_virtual_invocation): Put back the
6364 thunk builder code for the non-interface case.
6366 2009-03-02 Zoltan Varga <vargaz@gmail.com>
6368 * object.c (get_generic_virtual_entries): New helper function to collect
6369 the virtual generic method instances which need to be added to an IMT
6371 (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
6372 Instead of creating a new IMT thunk, reset the vtable slot to the
6373 trampoline, the thunk will be created the next time the trampoline is called.
6374 (build_imt_slots): Add support for virtual generic methods in interfaces by
6375 adding to the IMT thunk all the methods registered using
6376 mono_method_add_generic_virtual_invocation ().
6378 * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
6379 (struct _MonoIMTCheckItem): Ditto.
6381 * object.c (mono_method_add_generic_virtual_invocation): Take a
6382 MonoMethod argument instead of a MonoGenericInst. Fix the construction of
6383 the IMT thunk to include all items.
6385 * object.c (mono_class_create_runtime_vtable): Add a missing
6386 mono_loader_unlock ().
6388 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
6390 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6392 * object-internals.h (MonoReflectionEvent): Add cached_add_event.
6394 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
6396 * object-internals.h: Rename _MonoReflectionEvent to
6397 MonoReflectionMonoEvent so it reflects the right managed type.
6398 Add a MonoReflectionEvent that correctly represents System.EventInfo.
6401 * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
6404 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
6406 * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
6407 intermediary managed arrays. Use caching version of mono_array_new
6408 to allocate the result array.
6410 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
6412 * reflection.c: Use cached version of mono_array_new alongside
6413 the mono_reflection_get_custom_attrs_by_type call path.
6415 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
6417 * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
6418 intermediary managed arrays. Use caching version of mono_array_new
6419 to allocate the result array.
6421 * icall.c (ves_icall_Type_GetConstructors_internal): Same.
6423 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
6425 * icall.c: Add small implementation of a growable stack bound array.
6427 * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
6429 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
6430 intermediary managed arrays. Use caching version of mono_array_new
6431 to allocate the result array.
6433 2009-02-27 Rodrigo Kumpera <rkumpera@novell.com>
6435 * icall.c: New icall ves_icall_System_Enum_compare_value_to that
6436 helps Enum::CompareTo to be implemented without reboxing all enums
6437 to their underlying type.
6438 2009-02-27 Zoltan Varga <vargaz@gmail.com>
6440 * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
6441 since it acquires a global lock leading to scalability problems.
6443 * profiler.c: Make the stat profiler work with multiple appdomains, this
6444 currently only works when no appdomains are unloaded.
6446 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
6448 * appdomain.c: make the check to avoid copying when the assembly is
6449 already shadow copied actually work.
6451 2009-02-26 Zoltan Varga <vargaz@gmail.com>
6453 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6455 * object-internals.h (struct _MonoReflectionGenericClass): Sync with
6456 changes to the managed side.
6458 2009-02-25 Zoltan Varga <vargaz@gmail.com>
6460 * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
6461 classes + a separate lock for it, as it is used frequently at runtime, not
6462 just during metadata loading/JIT compilation.
6464 * class.c (mono_bounded_array_class_get): Use the separate cache + lock
6467 * object-internals.h (mono_class_from_name_cached): New macro to cache
6468 the results of the lookup locally without having to declare a static
6469 variable to hold it.
6470 (mono_class_get_field_from_name_cached): Ditto.
6471 (mono_array_class_get_cached): Ditto.
6473 * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
6476 * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
6477 slower search in metadata.
6479 * pedump.c: Fix a warning.
6481 2009-02-23 Zoltan Varga <vargaz@gmail.com>
6483 * reflection.c (encode_locals): Add checks for user types.
6484 (method_encode_clauses): Ditto.
6485 (method_encode_code): Ditto.
6486 (mono_image_create_token): Ditto.
6488 * object-internals.h: Change the type of more fields from MonoReflectionType*
6491 2009-02-22 Zoltan Varga <vargaz@gmail.com>
6493 * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
6494 the a thread does not suspend within 100ms.
6496 * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
6497 in addition to StopRequested as well.
6499 * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
6501 * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
6502 search the method_hash before inserting a new entry, to avoid crashes when
6503 the same method is inserted multiple times, causing the old
6504 MonoDebugMethodInfo structure to be freed by the value dtor function.
6506 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
6508 * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
6509 SO_EXLUSIVEADDRUSE where available.
6511 2009-02-21 Zoltan Varga <vargaz@gmail.com>
6513 * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
6514 runtime invoke wrappers, this time it is string ctor wrappers, which
6515 pass a dummy string as 'this' instead of their obj argument. Fixes
6518 2009-02-21 Jb Evain <jbevain@novell.com>
6520 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6521 only get create_culture once.
6523 2009-02-20 Zoltan Varga <vargaz@gmail.com>
6525 * reflection.c (mono_reflection_setup_internal_class): Move the user type
6526 check before the locking.
6528 * reflection.c (mono_reflection_setup_internal_class): Check for user types.
6529 (mono_reflection_create_runtime_class): Ditto.
6530 (mono_reflection_sighelper_get_signature_local): Ditto.
6531 (mono_reflection_sighelper_get_signature_field): Ditto.
6533 * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
6534 is a System.MonoType object or similar.
6535 (monotype_cast): New helper function to cast a MonoObject to a
6536 MonoReflectionType object.
6538 * object-internals.h: Change MonoReflectionType* members in structures to
6539 MonoObject* members to force the usage of the monotype_cast () function.
6541 * reflection.c icall.c: Use monotype_cast () for accessing Type members of
6542 structures/arrays. This causes us to assert instead of crashing when
6543 instances of user defined subclasses of System.Type are encountered.
6545 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
6549 * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
6550 win32 resource loaded from a PE file.
6552 * image.c: fix mono_image_lookup_resource.
6554 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
6558 * threads.c: added internal call for WaitHandle.SignalAndWait.
6560 2009-02-19 Bill Holmes <billholmes54@gmail.com>
6562 * cominterop.c : Adding cominterop_type_from_handle and
6563 registering it as an icall. Replacing all references
6564 to type_from_handle.
6566 Code is contributed under MIT/X11 license.
6568 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
6570 * Makefile.am: Add lock-tracer.h and lock-trace.c.
6572 * appdomain.c: Call the tracer init function.
6574 * domain-internals.h: Enable the tracer for the domain locks.
6576 * image.c: Enable the tracer for image locks.
6578 * loader.c: Enable the trace for the loader lock.
6581 * lock-tracer.c: Initial implementation of the lock trace utility.
6582 The tracer requires a compile time define to be enabled and a env var
6583 to be enabled at runtime.
6585 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
6587 * domain.c (mono_domain_code_foreach): Improve documentation.
6589 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
6592 * generic-sharing.c:
6594 * reflection.c: Adjust locking order to the new semantics where the loader lock
6597 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
6599 * domain.c: Add mono_domain_code_* functions that perform locking
6600 around the domain codeman.
6602 * domain-internals.h: Export those functions.
6604 * object.c: Use new functions instead of acquiring the domain lock.
6606 2009-02-19 Zoltan Varga <vargaz@gmail.com>
6608 * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
6609 delegate. Fixes #477396.
6611 2009-02-18 Zoltan Varga <vargaz@gmail.com>
6613 * reflection.c (create_custom_attr): Get rid of alloca.
6615 2009-02-18 Bill Holmes <billholmes54@gmail.com>
6617 * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
6618 Adding exception handling for all CCW calls.
6620 Code is contributed under MIT/X11 license.
6622 2009-02-18 Zoltan Varga <vargaz@gmail.com>
6624 * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
6626 * marshal.c (emit_marshal_boolean): Add null checks to the new
6627 native->managed marshalling code. Fixes #476247.
6629 2009-02-17 Zoltan Varga <vargaz@gmail.com>
6631 * class.c (mono_class_get_vtable_entry): Move the addition of
6632 static rgctx invoke wrappers for vtable methods here, this simplifies
6633 a lot of code and causes fewer rgctx wrappers to be created.
6635 * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
6636 name of the statistics to begin with an uppercase.
6638 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
6640 * reflection.c: Revert previous change as it breaks the build.
6642 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
6644 * verify.c: Properly handle SZARRAY element type.
6648 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
6650 * reflection.c (mono_image_create_method_token): Correctly encode
6651 MethodDef MemberRefParent token.
6655 2009-02-17 Zoltan Varga <vargaz@gmail.com>
6657 * image.c (mono_image_close): Delete the critical section before
6658 freeing the memory holding it.
6660 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6662 * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
6665 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6667 * pedump.c (main): Call mono_marshal_init so pedump
6670 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6672 * loader.c (method_from_memberref): Properly fix #474271 and
6673 don't break the runtime bad.
6675 2009-02-16 Zoltan Varga <vargaz@gmail.com>
6677 * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
6678 (mono_domain_alloc0): Ditto.
6680 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6682 * loader.c (method_from_memberref): Don't abort if the array
6683 method is not found. A regular loader failure is more informative
6688 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6690 *loader.c: Guard MonoImage::method_cache/methodref_cache
6691 using the image lock instead of the loader lock.
6693 * metadata.h: Add comments about which fields are protected by
6696 2009-02-16 Zoltan Varga <vargaz@gmail.com>
6698 * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
6700 * generic-sharing.c (mono_method_construct_object_context): Remove the
6701 wrapper_type == NONE assert, it is not needed.
6703 2009-02-15 Zoltan Varga <vargaz@gmail.com>
6705 * reflection.c (clear_cached_object): New helper function.
6706 (mono_method_clear_object): New function to clear the cached reflection
6707 objects for a dynamic method.
6709 * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
6710 Partly fixes # 463323.
6712 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
6716 * reflection.c: Remove all explicit uses of MonoImage::property_hash.
6718 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
6720 * image.c: Add mono_image_property_(lookup,insert,remove) functions that
6721 take the image lock instead of the loader lock.
6723 * metadata-internals.h: Export new functions.
6725 2009-02-12 Miguel de Icaza <miguel@novell.com>
6727 * domain.c (app_config_parse): Remove another use of stat that is
6728 not necessary as g_file_get_contents already does the presence
6731 2009-02-13 Zoltan Varga <vargaz@gmail.com>
6733 * cominterop.c icall-def.h: Fix the DISABLE_COM build.
6735 * marshal.c: Move the bstr handling code to cominterop.c.
6737 * marshal.c: Remove some COM interop code missed previously.
6739 2009-02-12 Miguel de Icaza <miguel@novell.com>
6741 More Paolo patches from the Wii port:
6743 * security.c: Remove ves_icall_System_Environment_get_UserName
6746 * icall.c: And put ves_icall_System_Environment_get_UserName
6749 * appdomain.c (mono_set_private_bin_path_from_config): Remove
6750 redundant call to stat that was only used to test for the file
6751 existence. Patch from Paolo.
6753 * gc.c (run_finalize): If COM is disabled, do not link in
6754 mono_marshal_free_ccw.
6756 * generic-sharing.c: Use alloca.h here as well.
6758 2009-02-13 Rodrigo Kumpera <rkumpera@novell.com>
6760 * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
6762 2009-02-13 Zoltan Varga <vargaz@gmail.com>
6764 * cominterop.c cominterop.h: New files.
6766 * marshal.c: Move the COM interop related code to cominterop.c. Make a few
6767 function/typedefs which are needed by cominterop.c global.
6769 2009-02-12 Mark Probst <mark.probst@gmail.com>
6771 * generic-sharing.c: Don't take the loader lock to guard image
6774 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6776 * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
6777 called without the loader lock which is required to guard MonoImage:tokens.
6779 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6785 * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
6787 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6789 * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
6790 Rework the code to use regular mono_image_alloc/0.
6792 * loader.c: Rework the code to use regular mono_image_alloc/0.
6794 * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
6796 2009-02-12 Bill Holmes <billholmes54@gmail.com>
6798 * object-internals.h : Fixing a typo in the
6799 MonoReflectionComVisibleAttribute struct.
6801 * marshal.c (cominterop_com_visible): Check the implemented
6802 interfaces for ComImport.
6804 * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls
6805 assume that bools should be treated as VARIANTBOOLs.
6807 * marshal.c (emit_marshal_boolean): Adding cases for
6808 MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
6810 * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to
6811 emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
6813 * marshal.c (cominterop_get_ccw): For COM calls assume that bools
6814 should be treated as VARIANTBOOLs.
6816 Code is contributed under MIT/X11 license.
6818 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6820 * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
6821 allocation with the image lock.
6823 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6825 This patch is the last of a series to remove explicit reference of MonoImage::mempool
6826 and use mono_image_alloc set of functions instead. This time we finish with reflection.c
6828 * object.c: Add mono_string_to_utf8_image.
6830 * object-internals.h: Export mono_string_to_utf8_image.
6832 * reflection.c: Rework all explicit references to the the image mempool to go thought
6833 the mono_image_alloc set of functions.
6835 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6837 This patch is the third of a series to remove explicit reference of MonoImage::mempool
6838 and use mono_image_alloc set of functions instead. This time we finish with marshal.c
6839 and generics-sharing.c.
6841 * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
6842 as first argument. Note that this function remains broken as it doesn't perform locking around the
6845 * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
6847 * image.c: Add g_slist_append_image.
6849 * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
6850 the supplied image for allocation. Move code into mono_metadata_field_info_full.
6852 * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
6853 Fix all related code to do the same.
6855 * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
6857 * metadata-internals.h: Fix the signatures.
6859 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6861 This patch is the second of a series to remove explicit reference of MonoImage::mempool
6862 and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
6863 and similar to work using MonoImage.
6865 * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
6868 * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
6870 * class.c (mono_metadata_signature_deep_dup): Same.
6872 * class.c (inflate_generic_type): Same.
6874 * class.c (mono_class_inflate_generic_type_with_mempool): Same.
6876 * metadata.c (mono_metadata_signature_dup_full): Same.
6878 * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from
6879 mono_metadata_signature_dup_full.
6881 * metadata.c (mono_metadata_type_dup): Same.
6883 * marshal.c: Pass the image to calls to mono_metadata_type_dup.
6885 * reflection.c: Same.
6887 * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
6889 * metadata-internals.h: Fix the signatures.
6891 * class-internals.h: Same.
6893 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
6895 This patch is the first of a series to remove explicit reference of MonoImage::mempool
6896 and use mono_image_alloc set of functions instead.
6898 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
6899 Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
6902 * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
6904 * class.c (g_list_prepend_mempool): Removed.
6906 * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
6908 * image.c: Add g_list_prepend_image.
6910 * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
6912 * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
6915 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
6917 * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
6920 * image.c (mono_image_init): Init the lock field.
6922 * image.c (mono_image_init): Cleanup the lock field.
6924 * image.c: Add mono_image_(un)lock functions.
6926 2009-02-11 Mark Probst <mark.probst@gmail.com>
6928 * class.c, class-internals.h: mono_method_get_context_general()
6929 combines the functionality of mono_method_get_context() and
6930 mini_method_get_context().
6932 * generic-sharing.c, domain-internals.h:
6933 mono_method_construct_object_context() and
6934 mono_domain_lookup_shared_generic() moved from mini.
6936 * icall.c (ves_icall_InternalInvoke): Handle the case where the
6937 method doesn't have the correct instantiation because it's shared
6938 generic code. Fixes #473999.
6940 2009-02-11 Zoltan Varga <vargaz@gmail.com>
6942 * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
6944 * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
6946 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
6948 * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
6950 * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
6952 * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
6953 and recheck the cache for dups after it.
6955 * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
6957 Fixes one of the deadlocks found in #473150.
6959 2009-02-11 Bill Holmes <billholmes54@gmail.com>
6961 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
6962 For Win32, add additional break conditions for accept.
6964 Code is contributed under MIT/X11 license.
6966 2009-02-10 Zoltan Varga <vargaz@gmail.com>
6968 * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
6969 lazily initialize the native wrapper cache.
6970 (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
6971 cache, since they are different from the normal wrappers.
6973 * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
6975 * metadata-internals.h (struct _MonoImage): Add a new wrapper for
6976 AOT compiled native wrappers.
6978 2009-02-09 Geoff Norton <gnorton@novell.com>
6981 * security-core-clr.c: Allow enabling core-clr from the embedding
6984 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
6986 * socket-io.c: when requesting all the local ips, if there are no
6987 interfaces up and running, MS returns 127.0.0.1.
6989 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
6991 * mono-perfcounters-def.h: processor time is an inverse time.
6994 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
6996 * socket-io.c: an empty host name returns the list of local IPs.
6997 Fixes bug #386637 part 1/2.
6999 2009-02-07 Zoltan Varga <vargaz@gmail.com>
7001 * verify.c (mono_class_interface_implements_interface): Call
7002 mono_class_setup_interfaces ().
7003 (merge_stacks): Ditto.
7005 2009-02-06 Zoltan Varga <vargaz@gmail.com>
7007 * class.c (mono_class_setup_interfaces): New function to lazily initalize
7009 (mono_generic_class_get_class): Don't initalize klass->interfaces.
7010 (mono_generic_class_get_class): Ditto.
7012 2009-02-06 U-QUACK\miguel <miguel@quack>
7014 * icall-defs.h: Include also the Encrypt/Decrypt string methods as
7015 they live in security.c
7017 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
7018 another bit from Paolo's code.
7020 2009-02-06 Zoltan Varga <vargaz@gmail.com>
7022 * object.c (build_imt_slots): Add a small optimization to avoid inflating
7023 methods which will be discarded by add_imt_builder_entry ().
7025 * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
7028 * loader.c: Add a statistics for the size of the memberref signature cache.
7030 * loader.c (find_cached_memberref_sig): New helper function.
7031 (cache_memberref_sig): Ditto.
7033 * loader.c: Cache the result of parsing memberref signatures, since otherwise
7034 they will be parsed again for every generic instantiation, leading to unbounded
7037 2009-02-05 Zoltan Varga <vargaz@gmail.com>
7039 * loader.c (mono_get_method_from_token): Avoid creating class for the generic
7040 parameters of generic methods.
7042 * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
7043 after the original method is copied to the inflated method.
7044 (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
7046 * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
7047 field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
7049 * class.c metadata.c: Update after the changes above.
7051 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
7053 * metadata-verify.c: Simplified error handling and added
7054 section table validation.
7056 2009-02-05 Zoltan Varga <vargaz@gmail.com>
7058 * class-internals.h (MonoClassExt): New structure containing rarely used
7059 fields of MonoClass.
7060 (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
7061 through a new 'ext' field.
7063 * class.c (mono_class_alloc_ext): New helper function to allocate
7066 * class.c metadata.c reflection.c: Update after MonoClass structure changes.
7068 2009-02-05 Mark Probst <mark.probst@gmail.com>
7070 * object.c (mono_object_get_virtual_method): Properly inflate
7071 generic methods. Fixes #472692.
7073 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
7075 * class.c (mono_class_create_from_typedef): The CLR supports SystemF
7076 recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
7077 for the parent type, the created type must be ready to be used on a generic
7079 We fill this_arg/byval_arg if the parent is a generic instance to make sure
7080 we won't have duplicated entries in generic_inst_cache.
7084 2009-02-05 Miguel De Icaza <miguel@novell.com>
7086 * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
7087 replace with plain BSD per the comments on the bug MONO77637.
7089 2009-02-05 Zoltan Varga <vargaz@gmail.com>
7091 * class.c (mono_class_get_generic_class): New accessor function.
7092 (mono_class_get_generic_container): Ditto.
7094 * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
7095 fields, similar to the ones in MonoMethod.
7097 * class.c (mono_generic_class_get_class): Set klass->is_inflated.
7098 (mono_class_create_from_typedef): Set klass->is_generic if needed.
7100 * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
7102 * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
7103 the same information as element_class->byval_arg.
7105 * class.c reflection.c: Remove references to class->byval_arg.
7107 * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing
7108 klass->enum_basetype directly.
7110 * verify.c metadata.c object.c icall.c reflection.c: Use
7111 mono_class_enum_basetype () instead of accessing klass->enum_basetype
7114 2009-02-04 Miguel de Icaza <miguel@novell.com>
7116 * icall-def.h: Remove internal calls for sockets when
7117 DISABLE_SOCKET is defined, file system writing features when the
7118 OS only support reading and not writing data and Policy support if
7119 the Policy is disabled.
7121 * image.c (do_mono_image_open): Apply Paolo's patches for using
7122 mono_file_map_ APIs here.
7124 * assembly.c: Add support for platforms to avoid prefix
7127 2009-02-04 Zoltan Varga <vargaz@gmail.com>
7129 * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
7132 * class.c (mono_class_inflate_generic_class): New helper function.
7134 * class.c: Use mono_class_inflate_generic_class in a few places. Add
7135 statistics for inflated methods/classes.
7137 * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
7139 * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
7140 the call is made from Delegate.CreateDelegate () for the invoke method of
7143 * loader.c: Add a statistics for the memory occupied by inflated signatures.
7145 * metadata.c (mono_metadata_signature_size): New helper function.
7147 * class.c (mono_class_get_method_from_name_flags): Add an optimization for
7150 * metadata.c (inflated_method_in_image): Avoid calling
7151 mono_method_signature () if the method does not already have a signature.
7153 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
7155 * verify.c (is_compatible_boxed_valuetype): When checking if the boxed
7156 valuetype is compatible with target type, check by inheritance as a
7157 VT is not really compatible with System.ValueType, for example.
7159 * verify.c (do_invoke_method): Improve error message.
7161 * verify.c (do_box_value): If boxing a nullable, use the type argument
7164 * verify.c (do_newobj): Improve error message.
7168 2009-02-03 Miguel de Icaza <miguel@novell.com>
7170 * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
7172 2009-02-03 Mark Probst <mark.probst@gmail.com>
7174 * generic-sharing.c: Don't hold domain lock when calling
7175 instantiate_other_info(). Fixes #471958.
7177 * domain-internals.h, loader.c: Describe locking policy of domain
7178 lock vs loader lock.
7180 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
7182 * verify.c (mono_delegate_signature_equal): Make it possible to check
7183 first-arg-bound delegates to static method.
7185 * verify.c (verify_delegate_compatibility): Correctly verify delegates to
7186 static methods with the first arg bound.
7190 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
7192 * verify.c: Added stack_slot_full_name to provide decent and more meanfull
7195 * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
7196 under strict mode. Any type, when boxed can be seen as a reference type.
7200 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
7202 * object.h: The lower bound of an array is a signed integer value.
7203 Introduce mono_array_lower_bound_t typedef. It should be used instead of
7204 gint32 as under MONO_BIG_ARRAYS it will be a gint64.
7206 * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
7207 calculate the upper bound.
7211 2009-02-02 Miguel de Icaza <miguel@novell.com>
7213 From Paolo's work, refactored, cleared up:
7215 * threadpool.c, icall.c: ifdef code that requires a working socket
7218 * metadata.c (mono_metadata_field_info): Do not attempt to return
7219 a value from a function declared as void.
7221 * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
7222 from the console stack.
7224 * assembly.c: use strrchr instead of rindex.
7226 * class.c, object.c, marshal.c, icall.c, reflection.c: include
7227 alloca.h on systems that have it.
7229 * environment.c: Avoid code that uses stuff from
7232 * appdomain.c: Include sys/time.h.
7234 * console-io.c: include sys/ioctl.h if it is available.
7236 2009-02-03 Zoltan Varga <vargaz@gmail.com>
7238 * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
7240 * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
7243 * marshal.c: Set mb->skip_visibility instead of setting it on the method
7244 after it was created and cached, as the later is not thread safe.
7246 2009-02-02 Zoltan Varga <vargaz@gmail.com>
7248 * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
7249 called while the debugging module is not initialized. Fixes #471669.
7251 2009-02-02 Rodrigo Kumpera <rkumpera@novell.com>
7253 * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
7257 2009-02-02 Mark Probst <mark.probst@gmail.com>
7259 * generic-sharing.c (lookup_or_register_other_info): Make sure the
7260 loader lock is not taken while the templates lock is held. Fixes
7263 2009-02-02 Mark Probst <mark.probst@gmail.com>
7265 * metadata.c (type_in_image): Added a check to fix a monodis
7268 2009-02-02 Zoltan Varga <vargaz@gmail.com>
7270 * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
7273 * object.c (mono_runtime_invoke_array): Ditto.
7275 * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
7276 freeing wrappers of dynamic methods.
7278 * loader.c (mono_free_method): Call it. Fixes #463323.
7280 * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
7281 methods taking vtype/byref arguments, to fix yet another bug caused by
7282 the sharing of runtime invoke wrappers. Partly fixes #471259.
7284 2009-02-01 Zoltan Varga <vargaz@gmail.com>
7286 * debug-mono-symfile.c (check_line): Return NULL instead of returning
7287 <first file in file table>:1 when the IL offset does not have an associated
7290 2009-01-31 Zoltan Varga <vargaz@gmail.com>
7292 * mono-debug.c (mono_debug_lookup_locals): New function to return local
7293 variable info for a method.
7295 * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
7297 2009-01-30 Jb Evain <jbevain@novell.com>
7299 * pedump.c: reuse code from monodis to make sure pedump honors
7300 MONO_PATH, which is needed to verify net_2_1 assemblies.
7302 2009-01-29 Zoltan Varga <vargaz@gmail.com>
7304 * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
7305 there is no line number info.
7307 2009-01-29 Raja R Harinath <harinath@hurrynot.org>
7309 Avoid some MonoType allocations
7310 * reflection.c (mono_reflection_initialize_generic_parameter):
7311 Reuse MonoType from param->pklass rather than allocating one.
7312 (mono_dynamic_image_free): Update to changes.
7314 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
7316 Rearrange some code to improve consistency
7317 * reflection.c (mono_reflection_setup_generic_class): Move body ...
7318 (mono_reflection_initialize_generic_parameter): ... here.
7320 2009-01-28 Zoltan Varga <vargaz@gmail.com>
7322 * generic-sharing.c (has_constraints): Enable gshared for methods/classes
7323 with type constraints as an experiment.
7325 * boehm-gc.c (on_gc_notification): Update mono_stats.
7327 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
7329 Avoid some allocations
7330 * class-internals.h (_MonoGenericInst::type_argv): Convert from
7331 pointer to tail array to avoid extra allocation.
7332 * metadata.c (free_generic_inst): Update to changes.
7333 (mono_metadata_get_generic_inst): Likewise. Use alloca instead of
7336 2009-01-27 Zoltan Varga <vargaz@gmail.com>
7338 * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
7339 return TRUE if the two type objects are the same.
7341 2009-01-26 Zoltan Varga <vargaz@gmail.com>
7343 * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
7344 (mono_class_native_size): Use klass->marshal_info->min_align instead of
7345 klass->min_align, since klass->min_align contains the managed alignment,
7346 while the native alignment can be different, like for longs on x86.
7349 * class-internals.h (MonoMarshalType): Add a min_align field.
7351 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
7353 * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
7356 2009-01-26 Zoltan Varga <vargaz@gmail.com>
7358 * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
7359 some comments about the usage of the used_regs field.
7361 * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
7364 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
7366 * appdomain.c: return NULL instead of throwing FileNotFoundException
7367 when LoadAssembly() fails.
7369 2009-01-23 Mark Probst <mark.probst@gmail.com>
7371 * metadata.c (mono_metadata_generic_param_equal): Only compare the
7372 image if the owner is NULL. Fixes the AOT failures.
7374 2009-01-23 Zoltan Varga <vargaz@gmail.com>
7376 * metadata.c (mono_metadata_load_generic_params): Initialize the
7377 MonoGenericParam structure using memset so the image field is initialized
7380 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
7382 * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
7385 2009-01-21 Zoltan Varga <vargaz@gmail.com>
7387 * class.c (mono_class_setup_vtable_general): In the generic instance
7388 optimization, set method->slot for abstract virtual methods. Fixes part of
7391 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
7393 * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
7394 which signals that the unloading has started but all appdomain services must
7397 * appdomain.c (mono_domain_unload): The initial state for unloading now
7398 is unloading_start and we switch to unloading after the managed call to
7399 AppDomain::DomainUnload has finished.
7401 The new unloading state has to be created because managed code in the
7402 DomainUnload event can depend on things like the threadpool still working.
7403 The domain must remain fully functional while the event executes.
7405 This shown as an issue due to Process::WaitForExit, which waits for
7406 async reads of stdout and stderr to complete. Since those are processed
7407 in the threadpool the code deadlocks because the DomainUnload callback
7408 waits for the async read finished event, which should have been set by a
7409 threadpool job but has been discarded due to the domain been in unload
7412 2009-01-21 Mark Probst <mark.probst@gmail.com>
7414 * metadata.c (mono_metadata_generic_param_equal): Owner as well as
7417 2009-01-21 Mark Probst <mark.probst@gmail.com>
7419 * reflection.c (resolve_object): For fields, inflate the class and
7420 then get the field in the inflated class.
7422 2009-01-20 Mark Probst <mark.probst@gmail.com>
7424 * object-internals.h (struct _MonoException): Added a comment
7425 explaining the new use of trace_ips.
7427 2009-01-20 Mark Probst <mark.probst@gmail.com>
7429 * generic-sharing.c (inflate_other_data): Inflate array methods
7432 * loader.c, class-internals.h: Rename search_in_array_class() to
7433 mono_method_search_in_array_class() and make it non-static.
7435 2009-01-19 Zoltan Varga <vargaz@gmail.com>
7437 * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
7438 Hopefully fixes #458168.
7440 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
7442 * object.c (mono_raise_exception): Remove call to InterlockedIncrement
7443 as it is performed elsewhere.
7445 Code is contributed under MIT/X11 license
7447 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
7449 * mono-perfcounters-def.h: Add counters for asp.net requests total and
7451 * object.c (mono_raise_exception): Increment the exceptions total
7452 counter when an exception is thrown.
7453 * class-internals.h: Add a location for storing the total number of
7454 asp.net requests served.
7455 * mono-perfcounters.c: Implement update support for asp.net counters
7456 from the class libraries. Implement read support for asp.net counters
7457 and exceptions total counter.
7459 2009-01-19 Zoltan Varga <vargaz@gmail.com>
7461 * loader.c (search_in_array_class): Call mono_class_setup_methods () before
7462 accessing klass->methods. Fixes #467385.
7464 2009-01-18 Zoltan Varga <vargaz@gmail.com>
7466 * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
7467 for byval arguments without an [Out] attribute. Fixes #467212.
7469 * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com).
7470 Fix compilation under android.
7472 * sgen-gc.c: Instead of scanning gray objects after all roots have been
7473 processed, scan them directly after they are copied, to achieve better locality
7476 * socket-io.c: Applied patch from Koushik Dutta
7477 (koush@koushikdutta.com). Disable IPV6 when running under android.
7479 2009-01-18 Zoltan Varga <vargaz@gmail.com>
7481 * icall.c (ves_icall_InternalExecute): Add write barriers.
7483 * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
7486 * sgen-gc.c: Implement write barriers in IL code.
7488 2009-01-17 Geoff Norton <gnorton@novell.com>
7490 * image.c: Avoid trying to walk the reference table of dynamic assemblies.
7492 2009-01-17 Geoff Norton <gnorton@novell.com>
7494 * image.c: When unloading the image->references table, there can be gaps
7495 in it. Ensure that we iterate every entry to avoid leaking assembly references
7496 when unloading an appdomain.
7498 2009-01-16 Zoltan Varga <vargaz@gmail.com>
7500 * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
7501 speed up ptr-in-nursery checks.
7503 * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
7504 threads_lock () to prevent deadlocks.
7506 * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
7507 does not need to be scanned during minor collections, since writes to it
7508 must use write barriers.
7510 2009-01-15 Rodrigo Kumpera <rkumpera@novell.com>
7512 * metadata-verify.c: Add pe nt header verification.
7514 2009-01-15 Zoltan Varga <vargaz@gmail.com>
7516 * gc.c: Fix a few warnings when using SGEN.
7518 2009-01-14 Rodrigo Kumpera <rkumpera@novell.com>
7520 * metadata-verify.c: Add pe optional header verification.
7522 2009-01-15 Zoltan Varga <vargaz@gmail.com>
7524 * sgen-gc.c: Add support for user defined marker functions, used by
7525 MonoGHashTable to avoid registering a GC root for every hash node.
7527 2009-01-14 Zoltan Varga <vargaz@gmail.com>
7529 * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
7530 non-pinned roots into separate hashes to avoid having to traverse them
7531 in functions which are only interested in one kind.
7533 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
7535 * metadata-verify.c: Add pe header machine field verification.
7537 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
7539 * metadata-verify.c: Add pe header size verification.
7541 2009-01-14 Zoltan Varga <vargaz@gmail.com>
7543 * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
7544 using the GC, they don't contain references.
7546 * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
7548 2009-01-13 Geoff Norton <gnorton@novell.com>
7550 * appdomain.c|h: Expose mono_domain_unload to the embedding api so that
7551 AppDomains created on the native side can be cleaned up on the native side.
7553 2009-01-13 Geoff Norton <gnorton@novell.com>
7555 * appdomain.c: Ensure that we call mono_context_init for the embedding api
7556 as well as the managed api.
7558 2009-01-13 Geoff Norton <gnorton@novell.com>
7560 * appdomain.h|c: New API for creating a MonoDomain in the embedding api
7561 with a MonoAppDomain initialized against it.
7563 2009-01-13 Zoltan Varga <vargaz@gmail.com>
7565 * reflection.c (MOVING_GC_REGISTER): Fix a warning.
7567 * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
7569 * marshal.c: Avoid setting the exception clauses after a method has been entered
7570 into the wrapper caches. Fixes #465700.
7572 * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
7574 (mono_mb_create_method): Set the clauses from the method builder.
7576 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
7578 * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
7579 Patch from Makoto Kishimoto.
7581 2009-01-13 Zoltan Varga <vargaz@gmail.com>
7583 * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by
7584 encoding them as ROOT_DESC_COMPLEX.
7585 (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
7587 2009-01-12 Zoltan Varga <vargaz@gmail.com>
7589 * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
7590 no longer point to the nursery.
7592 * sgen-gc.c: Add a few comments/FIXMEs.
7594 * sgen-gc.c: Implement scanning of the alloc_pinned objects.
7596 * marshal.c (mono_marshal_get_synchronized_wrapper): Make the
7597 initialization of the various _method variables thread safe. Fixes
7600 2009-01-12 Mark Probst <mark.probst@gmail.com>
7602 * domain.c, domain-internals.h: Remove the shared_generics_hash
7603 and its lookup functions.
7605 2009-01-12 Bill Holmes <billholmes54@gmail.com>
7607 * socket-io.c: Fixing the MSVC build.
7609 Code is contributed under MIT/X11 license.
7611 2009-01-12 Rodrigo Kumpera <rkumpera@novell.com>
7613 * metadata-verify.c: Add pe header watermark verification.
7615 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
7617 * metadata-verify.c: Add lfanew verification.
7619 2009-01-12 Jb Evain <jbevain@novell.com>
7621 * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
7622 METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
7624 2009-01-10 Zoltan Varga <vargaz@gmail.com>
7626 * socket-io.c: Fix the build.
7628 * environment.c: Fix an #ifdef.
7630 2009-01-09 Zoltan Varga <vargaz@gmail.com>
7632 * threadpool.c (async_invoke_thread): Handle the wait function returning
7633 WAIT_IO_COMPLETION as well.
7634 (async_invoke_io_thread): Ditto.
7636 2009-01-09 Bill Holmes <billholmes54@gmail.com>
7638 * threads.c: Fixing the Windows build.
7640 Code is contributed under MIT/X11 license.
7642 2009-01-09 Zoltan Varga <vargaz@gmail.com>
7644 * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
7646 (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
7647 the thread to wait again.
7649 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
7651 * metadata-verify.c: Initial skeleton of the metadata verifier.
7653 * pedump.c: Add support for the metadata verifier.
7655 * verify-internal.h: Export the whole assembly metadata verifier function.
7657 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
7659 * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
7661 2009-01-09 Zoltan Varga <vargaz@gmail.com>
7663 * Makefile.am: Upgrade dtrace-prelink.sh location.
7665 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
7667 * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
7668 well. Otherwise the shutdown deadlock that happens on unix will can happen
7670 If the main thread code finishes too fast it's possible that the finalizer
7671 thread won't have executed yet, won't record itself as the finalizer thread
7672 and the shutdown sequence will wait on it forever.
7674 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
7676 * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
7679 2009-01-08 Miguel de Icaza <miguel@novell.com>
7681 * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
7682 Robert Jordan for pointing this out.
7684 2009-01-08 Christian Prochnow <cproch@seculogix.de>
7687 * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
7688 ves_icall_System_IO_DriveInfo_GetDriveType.
7690 2009-01-07 Miguel de Icaza <miguel@novell.com>
7692 * icall.c: Wrap calls to mono_strtod in CriticalSection
7693 invocations when using eglib, to work around #464316.
7695 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
7697 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
7698 return value of GetCurrentDirectory to never access unitialized memory.
7700 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
7702 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
7703 return value of GetCurrentDirectory and expand the buffer if needed.
7707 2009-10-07 Tom Hindle <tom_hindle@sil.org>
7709 * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) :
7710 Adding a call to mono_init_com_types.
7712 Code is contributed under MIT/X11 license.
7714 2009-01-07 Geoff Norton <gnorton@novell.com>
7716 * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on
7717 darwin. Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
7718 ai_canonname can be null in some cases on darwin, where the runtime assumes it will
7719 be the value of the ip buffer.
7721 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
7723 * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
7724 interfaces_packed here.
7726 Fixes part of #463294.
7728 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
7730 * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
7732 Fixes part of #463294.
7734 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
7736 * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
7737 is a boxed complex as well.
7739 Fixes part of #463294.
7741 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
7743 * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
7744 control if a methodspec should be created for the generic method definition from external assemblies.
7745 Caching of methodspec is done using the handleref hash table.
7749 2009-01-05 Rodrigo Kumpera <rkumpera@novell.com>
7751 * loader.c (find_method): When searching the interfaces of a class
7752 check the transitive closure of implemented interfaces.
7756 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
7758 * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
7760 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
7762 * class.c (get_implicit_generic_array_interfaces): Extract valuetype
7763 interfaces calculation to fill_valuetype_array_derived_types.
7765 * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
7766 ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
7769 * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
7770 interfaces for valuetypes if needed.
7772 * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
7773 for their basetype as well. Types are array expanded if rank is > 0.
7777 2008-12-30 Bill Holmes <billholmes54@gmail.com>
7779 * socket-io.h : Changing the signature of
7780 ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
7783 * icall-def.h : Changing the signature of
7784 System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
7786 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
7787 For Windows only. Avoid blocking when calling accept by
7788 querying for a connection via select. The loop also queries
7789 the thread state every 1000 micro seconds for the thread
7790 stop state. This will avoid the process hanging on shutdown
7791 when using a TcpChannel that is never connected to.
7793 Code is contributed under MIT/X11 license.
7795 2008-12-30 Marek Safar <marek.safar@gmail.com>
7797 * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
7799 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
7801 * class.c (get_implicit_generic_array_interfaces): Extract common
7802 code to a helper function making it a lot easier on the eyes.
7804 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
7806 * class.c (get_implicit_generic_array_interfaces): If the internal
7807 enumerator is an interface inflate System.Object instead of itself.
7811 2008-12-24 Rodrigo Kumpera <rkumpera@novell.com>
7813 * object.c (mono_runtime_invoke_array): Don't assert with
7814 byref nullable types.
7816 * marshal.c (mono_marshal_get_runtime_invoke): To handle
7817 byref nullables we unbox the object and store it on the
7819 We can't use the boxed object since it is the T of Nullable<T>
7820 and the boxed representation of a nullable it's underlying type
7822 We could cheat and create a boxed nullable and use the same
7823 machinery of other byref VTs but this feels like a hack and
7824 using the stack has the bonus of reducing heap pressure.
7828 2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
7830 * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
7835 2008-12-19 Bill Holmes <billholmes54@gmail.com>
7837 * icall-def.h : Adding an internal call definition for
7838 System.Environment.internalBroadcastSettingChange.
7840 * icall.c : Adding a Windows only implementation to broadcast a
7841 WM_SETTINGCHANGE when an environment variable has changed.
7843 Code is contributed under MIT/X11 license.
7845 2008-12-19 Mark Probst <mark.probst@gmail.com>
7847 * class.c, class-internals.h: Made
7848 mono_class_has_parent_and_ignore_generics() non-static.
7850 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
7852 * image.c: deal with the mmap failing when loading an image.
7854 2008-12-17 Geoff Norton <gnorton@novell.com>
7856 * threadpool.c: Ensure that the io_queue_lock is initialized
7857 in all circumstances, as we always attempt to cleanup against it.
7859 2008-12-17 Miguel de Icaza <miguel@novell.com>
7861 * icall.c (ves_icall_System_Environment_get_Platform): For
7862 compatibility reasons for existing client code we will keep
7863 returning 4 for a while.
7865 For how long will depend on the documentation being updated, and
7866 for us to give client code a chance to be updated.
7868 This reverts the original decison on #433108 since we did not
7869 catch roughly 33 instances of the broken code in our own source
7870 code base, we did not catch failures on the buildbots, and QA did
7871 not bring this as a problem.
7873 Only today I found some customer's code breaking due to our own
7874 class libraries not being fully updated and tracked it down to
7875 this change. I am reverting it because if we could not even get
7876 our story straight in our own code base, how can we hope that our
7877 end user code be fixed?
7879 As of this morning, our Wiki page that documents how to detect
7880 Unix had not been fixed.
7882 2008-12-16 Zoltan Varga <vargaz@gmail.com>
7884 * metadata.c (inflated_method_in_image): Add a workaround for #458168.
7886 * class.c (mono_class_get_fields): Handle loading errors.
7888 2008-12-12 Mark Mason <mmason@upwardaccess.com>
7890 * metadata.c (mono_type_stack_size_internal): If SIZEOF_REGISTER > SIZEOF_VOID_P then use SIZEOF_REGISTER as the size and alignment of the stack slots.
7892 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
7894 * mono-perfcounters.c: avoid warning.
7896 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
7898 * reflection.c (ensure_runtime_vtable): Work on generic instances and
7899 make sure all interfaces have MonoClass::interface_id set.
7901 * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
7902 method table is property set.
7904 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
7906 * class.c: New function mono_class_setup_interface_id that setup
7907 MonoClass::interface_id if needed.
7909 * class-internals.h: Export new function.
7911 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
7913 * class.c: Add code to sanity check the vtable after setup_vtable_general
7916 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
7918 * icall.c: make Assembly.GetExecutingAssembly work properly when
7919 reflection is used to invoke the method.
7922 2008-12-11 Mark Probst <mark.probst@gmail.com>
7924 * metadata/generic-sharing.c: Look for constraints in all type
7925 arguments, not just the first one.
7927 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
7929 * appdomain.c: return the correct CodeBase for an Assembly instance
7930 that was loaded from the shadow-copy directories.
7933 2008-12-10 Zoltan Varga <vargaz@gmail.com>
7935 * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
7937 * sgen-gc.c (check_object): New debugging helper function.
7939 * object.c: Fix calls to mono_value_copy_array ().
7941 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
7943 * class.c (mono_class_setup_fields): If working on an inflated class
7944 first check if the generic definition did init with success.
7948 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
7950 pedump.c (main): Fix a warning.
7952 2008-12-10 Bill Holmes <billholmes54@gmail.com>
7954 * object-internals.h : Adding a definition for
7955 MonoReflectionComVisibleAttribute.
7957 * marshal.c (cominterop_com_visible) : Method added to check the
7958 ComVisible attribute of a class.
7960 * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :
7961 cominterop_raise_hr_exception added to consolidate common code
7962 to raise hr exceptions.
7964 * marshal.c (cominterop_can_support_dispatch) : Method added to determine
7965 if a managed class should support IDispatch.
7968 (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :
7969 Added additional checks for managed object when getting
7970 an IDispatch interface.
7972 Code is contributed under MIT/X11 license.
7974 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
7976 pedump.c (main): Handle mono_get_method () returning NULL.
7978 2008-12-09 Zoltan Varga <vargaz@gmail.com>
7980 * marshal.h: Fix a warning.
7982 2008-12-09 Bill Holmes <billholmes54@gmail.com>
7984 * marshal.c : Adding cominterop_release_all_rcws to release all
7985 runtime callable wrappers held by the runtime.
7987 * marshal.h : Adding declaration for cominterop_release_all_rcws.
7989 Code is contributed under MIT/X11 license.
7991 2008-12-09 Zoltan Varga <vargaz@gmail.com>
7993 * metadata.c (mono_image_alloc_lock): New helper function.
7994 (mono_image_alloc0_lock): Ditto.
7996 * metadata.c: Use the alloc_lock () helper functions for allocating
7997 memory from the image mempool.
7999 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
8001 * class.c (mono_class_from_generic_parameter): Document it's
8002 locking behavior. Fix double checked locking here, we stored in
8003 param->pklass a partially initialized MonoClass and no membar was used.
8005 2008-12-05 Marek Habersack <mhabersack@novell.com>
8007 * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
8008 (3) functions are present in the C library use them to do the
8009 job. If they are absent, make sure that the sum of int_part and
8010 dec_part is rounded before returning. This is necessary due to the
8011 division of dec_part by the power of 10 before the final addition
8012 is performed - if the result is not rounded in some cases it will
8013 yield invalid results.
8015 2008-12-04 Zoltan Varga <vargaz@gmail.com>
8017 * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
8018 wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR
8019 instruction instead of a pointer constant.
8021 2008-12-03 Zoltan Varga <vargaz@gmail.com>
8023 * loader.c (mono_method_get_header): Do most of the work outside the
8024 loader lock, to avoid assembly load hook deadlocks.
8026 * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
8027 (mono_metadata_parse_type_full): Ditto.
8029 2008-12-02 Rodrigo Kumpera <rkumpera@novell.com>
8031 * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
8032 Make the stack depth fixed. Ensure proper argument passing to the backtrace
8033 funtions. Finally, use a lock to produce well ordered output.
8035 The lock looks silly, as all calls to the corlib mempool should be guarded
8036 with the loader lock, but for some reason this fact doesn't help.
8038 * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
8040 2008-12-02 Mark Probst <mark.probst@gmail.com>
8042 * socket-io.c: 64 bit big-endian fixes.
8044 2008-12-01 Rodrigo Kumpera <rkumpera@novell.com>
8046 * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
8047 targets that require strict compatibility between the types.
8049 * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
8050 to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
8051 Kill the strict argument and create a new one valuetype_must_be_boxed.
8053 * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
8054 state that all valuetypes must be boxed.
8058 2008-11-29 Kornél Pál <kornelpal@gmail.com>
8060 * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
8061 IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
8063 Contributed under MIT/X11 license.
8065 2008-11-28 Rodrigo Kumpera <rkumpera@novell.com>
8067 * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
8068 the inflate_generic_type machinery should handle it.
8070 This avoids a crash when the field's flags is zero and it's type is
8072 What happens is that mono_metadata_parse_type_full will see that opt_attrs
8073 is zero and will return one of the cached built-in primitive types. Since
8074 those types live in read-only memory, the code that copies it crashes.
8076 2008-11-28 Mark Probst <mark.probst@gmail.com>
8078 * object.c: Don't put function descriptors into generalized IMT
8081 2008-11-28 Mark Probst <mark.probst@gmail.com>
8083 * class.c: Enable generic code sharing on PPC64.
8085 2008-11-27 Mark Probst <mark.probst@gmail.com>
8087 * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
8090 * generic-sharing.c: Allocate the method template slists from the
8091 image mempool so it doesn't leak.
8093 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
8095 * class.c (generic_array_methods): Release the linked list.
8097 2008-11-27 Mark Probst <mark.probst@gmail.com>
8099 * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
8100 invocation to g_utf16_to_utf8().
8102 2008-11-26 Mark Probst <mark.probst@gmail.com>
8104 * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
8105 arguments on big endian archs.
8107 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
8109 * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
8110 the type name (test added in corlib).
8112 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
8114 * pedump.c: initialize perf. counters. Fixes a segv.
8116 2008-11-25 Martin Baulig <martin@ximian.com>
8118 * mono-debug-debugger.c
8119 (mono_debugger_runtime_invoke): Return the exception object if an
8120 exception was thrown. Visual Studio displays the exception object
8121 in the locals window.
8123 2008-11-24 Mark Probst <mark.probst@gmail.com>
8125 * mini-trampolines.c (mono_delegate_trampoline): Don't return a
8128 2008-11-24 Mark Probst <mark.probst@gmail.com>
8130 * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
8131 MONO_TYPE_U are sizeof (gpointer), too.
8133 2008-11-24 Mark Probst <mark.probst@gmail.com>
8135 * marshal.c (mono_type_native_stack_size): Fixed size and
8136 alignment for reference types.
8138 2008-11-23 Mark Probst <mark.probst@gmail.com>
8140 * class.c (mono_class_generic_sharing_enabled): Disable generic
8141 code sharing for PPC64.
8143 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
8145 * icall.c (mono_method_get_equivalent_method): Make sure
8146 method->klass->methods is inited before looping over it.
8148 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
8150 * object.c: when calling ExecuteAssembly in a newly created domain,
8151 the configuration file and application base are already set up.
8152 Bug #446353 take 2 fixed.
8154 2008-11-20 Zoltan Varga <vargaz@gmail.com>
8156 * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
8157 Fixes #444715. Fix a warning.
8159 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
8161 * appdomain.c: write the full path of the assembly to the .ini file
8162 created when "shadow-copying"
8165 2008-11-18 Zoltan Varga <vargaz@gmail.com>
8167 * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
8168 if signature==FALSE.
8170 2008-11-17 Bill Holmes <billholmes54@gmail.com>
8172 * marshal.h : Fix the cygwin build.
8173 marshal.c:12442: undefined reference to `_IID_IMarshal'
8175 Code is contributed under MIT/X11 license.
8177 2008-11-17 Bill Holmes <billholmes54@gmail.com>
8179 * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
8180 free threaded marshaler when QueryInterface is called on a COM callable
8181 wrapper requesting the IMarshal interface.
8183 Code is contributed under MIT/X11 license.
8185 2008-11-14 Zoltan Varga <vargaz@gmail.com>
8187 * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
8189 * reflection.c (mono_type_get_object): Special case the very common
8192 * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
8195 2008-11-13 Bill Holmes <billholmes54@gmail.com>
8197 * process.h : Adding method declaration for
8198 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
8200 * process.c : Adding implementation for
8201 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
8203 * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
8204 to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
8206 Code is contributed under MIT/X11 license.
8208 2008-11-10 Rodrigo Kumpera <rkumpera@novell.com>
8210 * appdomain.c (unload_thread_main): Clean up threadpool by
8211 calling mono_thread_pool_remove_domain_jobs.
8213 * domain-internals.h (struct _MonoDomain): Add new fields to
8214 help coordinate the cleanup of the threadpool.
8216 * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
8217 that cleans up the threadpool of all jobs associated with an appdomain.
8218 It does that by cleaning up the queues and making sure all active
8219 threads are accounted.
8221 * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
8222 unloaded or in the process of. Take this is such way that there is
8223 no race condition between another thread starting the unload and the
8224 current thread acknowledging it.
8226 * threadpool.c (async_invoke_thread): Same.
8228 * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
8229 firing the new thread.
8231 * threadpool.c (start_tpthread): Same.
8233 * theadpool.c (append_job): Increment threadpool_jobs before queueing.
8235 * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
8237 2008-11-06 Jonathan Chambers <joncham@gmail.com>
8239 * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle):
8240 Add support for DuplicateHandle.
8242 * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
8243 Add support for DuplicateHandle.
8245 * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
8246 Add support for DuplicateHandle.
8248 Code is contributed under MIT/X11 license.
8250 2008-11-06 Mark Probst <mark.probst@gmail.com>
8252 * class-internals.h: Make min_align into a whole byte.
8254 * class.c: Set min_align for SIMD types to 16.
8256 2008-11-05 Geoff Norton <gnorton@novell.com>
8258 * attach.c: Default the attacher to enabled for all cases including
8261 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
8263 * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
8266 2008-11-04 Mark Probst <mark.probst@gmail.com>
8268 * monitor.c, monitor.h: New function for querying offsets of
8269 members of MonoThreadsSync.
8271 2008-11-04 Zoltan Varga <vargaz@gmail.com>
8273 * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
8274 to speed up this function and to avoid the boundless memory growth caused by
8275 the signature_dup () calls.
8277 2008-11-02 Zoltan Varga <vargaz@gmail.com>
8279 * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
8282 * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
8285 * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
8287 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
8290 * domain-internals.h: made mono_set_private_bin_path_from_config()
8292 * object.c: call the above function after setting the configuration
8293 file path for the root domain.
8296 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
8298 * assembly.c: when the assembly is loaded from an absolute path, end
8299 basedir with a directory separator.
8302 2008-10-30 Mark Probst <mark.probst@gmail.com>
8304 * monitor.c (mono_monitor_get_fast_enter_method): If
8305 CompareExchange is not available, don't create the fastpath
8306 instead of asserting. (The method is missing in the 1.1 profile.)
8308 2008-10-30 Mark Probst <mark.probst@gmail.com>
8310 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
8312 * monitor.c, monitor.h: Code for generating Monitor.Enter and
8313 Monitor.Exit IL fastpaths.
8315 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
8317 * class.c (mono_class_create_from_typedef): Added Vector2ul.
8319 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
8321 * class.c (mono_class_create_from_typedef): Added Vector2l.
8323 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
8325 * class.c (mono_class_create_from_typedef): Added Vector2d.
8327 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
8329 * appdomain.c: translate \ into / for cache_path.
8330 * domain-internals.h: new mono_is_shadow_copy_enabled().
8331 * icall.c: (fill_reflection_assembly_name) do the same path
8332 manipulations that get_code_base does.
8333 (get_code_base) use mono_is_shadow_copy_enabled.
8335 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
8337 * appdomain.c: shadow-copied assemblies go to CachePath +
8338 ApplicationName when both are set. DynamicBase has nothing to do with
8342 2008-10-26 Zoltan Varga <vargaz@gmail.com>
8344 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
8345 STANDALONESIG table.
8347 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
8348 standalone signatures.
8350 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
8351 comparison code: instead of comparing the signatures using a custom
8352 equals function, transform them to a common signature and compare that. This
8353 works better with AOT.
8355 2008-10-25 Zoltan Varga <vargaz@gmail.com>
8357 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
8359 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
8360 call for generic instances.
8361 (mono_class_setup_properties): Call setup_properties () before accessing
8364 * class.c (mono_class_get_virtual_methods): New helper function to iterate
8365 over the virtual methods of a class using metadata if possible, avoiding the
8366 creation of MonoMethod's for non-virtual methods.
8368 * class.c (mono_class_setup_vtable_general): Rewrite this to use
8369 get_virtual_methods () to iterate over the virtual methods of classes.
8371 2008-10-25 Martin Baulig <martin@ximian.com>
8373 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
8375 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
8377 * class.c (mono_class_create_from_typedef): Added Vector4i.
8379 2008-10-24 Mark Probst <mark.probst@gmail.com>
8381 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
8382 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
8383 special-casing applies to eliminate the call completely.
8385 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
8387 * class.c (mono_class_create_from_typedef): Added Vector8s.
8389 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
8391 * class.c (mono_class_create_from_typedef): Added Vector16sb.
8393 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
8395 * icall.c: get rid of annoying warning.
8397 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
8399 * threadpool.c: in 1.x, if you change the background status of the
8400 threadpool thread, it's not reset.
8401 Remove unnecessary calls to SetState.
8403 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
8405 * threadpool.c: asynchronously create a set of idle threads upon first
8406 use of the threadpool. SetMinThreads will now start the appropriate
8407 number of idle threads if they are not already running. The default is
8408 1 threadpool thread per CPU. Increased the maximum number of threads
8411 2008-10-22 Martin Baulig <martin@ximian.com>
8413 Revert r116521 from Zoltan, it breaks the debugger:
8415 * class.c (mono_class_get_virtual_methods): New helper function to iterate
8416 over the virtual methods of a class using metadata if possible, avoiding the
8417 creation of MonoMethod's for non-virtual methods.
8419 * class.c (mono_class_setup_vtable_general): Rewrite this to use
8420 get_virtual_methods () to iterate over the virtual methods of classes.
8422 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
8424 * threads.c: when creating a threadpool thread, set its state to
8426 * threadpool.c: reset the background state of a threadpool thread
8427 after finishing each work item
8430 2008-10-22 Zoltan Varga <vargaz@gmail.com>
8432 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
8434 * class.c (mono_class_setup_vtable_general): Add an optimized version for
8435 generic instances which works by inflating the methods in the container
8438 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
8439 variant which doesn't make a copy if no inflation was done.
8440 (mono_class_setup_fields): Use it.
8442 * metadata.c (mono_metadata_get_shared_type): New helper function to
8443 return a shared instance of a given MonoType.
8445 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
8446 a copy of most non-generic types.
8448 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
8450 * threadpool.c: remove one more GetSystemInfo () call.
8452 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
8454 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
8455 use the code in mono-proclib.h to get processor information.
8457 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
8459 * appdomain.c: fixed the logic that determines whether assemblies in a
8460 directory are "shadow-copied" or not. Bug #433483 fixed.
8462 2008-10-22 Zoltan Varga <vargaz@gmail.com>
8464 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
8467 2008-10-21 Zoltan Varga <vargaz@gmail.com>
8469 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
8472 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
8473 reflection.c: Use mono_field_get_name () for accessing a field's name.
8475 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
8478 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
8481 * loader.c (find_method_in_class): Reenable the metadata optimization by
8482 not using it for generic instances.
8484 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
8485 data/def_type fields from MonoClassField into a separate structure.
8486 (struct MonoClassField): Remove data/def_type fields.
8487 (struct _MonoClass): Add a 'field_def_values' array to store the default
8488 values/RVA for fields.
8490 * class.c reflection.c: Update after the changes.
8492 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
8493 for accessing field->data.
8495 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
8497 * loader.c (find_method_in_class): Revert the last change for now as
8498 it breaks Mono.C5 unit tests.
8500 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
8501 'field_generic_types' and 'field_objects' which contain the information
8502 previously stored in MonoInflatedField.
8503 (MonoInflatedField): Delete.
8504 (struct _MonoClassField): Delete 'generic_info' field.
8506 * reflection.c: Store the information which was previously in
8507 field->generic_info in MonoDynamicGenericClass instead.
8509 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
8510 MonoClassField changes.
8512 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
8514 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
8515 store the value inside the data array of the MonoMethodWrapper.
8516 This saves memory, is faster and fixes the lifetime issues (methods
8517 were never removed from the hash previously). May also fix bug#436996.
8519 2008-10-21 Zoltan Varga <vargaz@gmail.com>
8521 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
8522 generic instances, compute the type from the generic definition instead of
8523 looking in field->generic_info.
8525 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
8526 for inflated fields, the only user was get_fieldref_token () which no
8529 * class.c (mono_class_init): Revert the last change as it seems to cause
8532 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
8533 bytes on 64 bit platforms.
8535 * object.c (mono_class_create_runtime_vtable): Fix a warning.
8537 * object.c (mono_class_create_runtime_vtable): Don't initalize
8538 field->data/field->def_type here, it is done lazily by
8539 mono_class_get_field_default_value ().
8541 * icall.c (ves_icall_get_enum_info): Call
8542 mono_class_get_field_default_value () instead of directly accessing
8543 field->data and field->def_type.
8545 * object.c (get_default_field_value): Ditto.
8547 * class.c (mono_field_get_data): Ditto.
8549 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
8550 call for generic instances.
8552 * loader.c (find_method_in_class): If klass != from_class, then inflate
8553 the method with the context of from_class, since the caller assumes this.
8555 2008-10-20 Zoltan Varga <vargaz@gmail.com>
8557 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
8558 for accessing method->slot.
8560 2008-10-20 Cedric Vivier <cedricv@neonux.com>
8562 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
8564 2008-10-19 Zoltan Varga <vargaz@gmail.com>
8566 * class.c (mono_method_get_vtable_index): Use
8567 mono_method_get_vtable_slot () for accessing method->slot.
8569 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
8570 accessing klass->methods.
8572 * class.c (mono_method_get_vtable_slot): New helper function.
8573 (mono_class_get_vtable_entry): Ditto.
8574 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
8575 accessing method->slot.
8577 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
8578 method to get_inflated_method ().
8580 * class.c (mono_class_get_inflated_method): New helper method to obtain
8581 a method of an inflated class without calling setup_methods ().
8582 (mono_class_get_cctor): Use get_inflated_method.
8584 * generic-sharing.c (mono_class_get_method_generic): Ditto.
8586 * marshal.c image.c: Lazily create all the marshal caches.
8588 * image.c (mono_image_init): Move initialization of runtime_invoke
8589 caches to marshal.c.
8591 * marshal.c (get_cache): New helper function to lazily initialize a
8593 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
8595 * debug-helpers.c (mono_method_full_name): Include generic arguments.
8597 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
8599 * loader.c: fixed check for interface type.
8601 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
8603 * appdomain.c: check for NULL setup before it's referenced.
8606 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
8608 * class.c: remove the unused old vtable setup code.
8610 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
8612 * class.c: don't depend on interface order in
8613 setup_interface_offsets (bug #435777).
8614 * reflection.c: sort the InterfaceImpl table (patch from
8615 Jb Evain <jbevain@novell.com>).
8617 2008-10-13 Zoltan Varga <vargaz@gmail.com>
8619 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
8620 the low level assemblies lock.
8622 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
8624 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
8625 object.c, reflection.c, socket-io.c, threads.c: introduced
8626 mono_framework_version () to return the major framewrok version,
8627 changed the code that was using more complex patterns to use it.
8628 Return the correct value for PlatformID for OSX.
8630 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
8632 * icall-def.h, process.h, process.c: added an icall to get info about
8633 processes using mono-proclib.
8635 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
8637 * mono-perfcounters.c: use the mono-proclib functions to
8638 access process information.
8640 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
8642 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
8643 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
8644 reflection.c: remove rawbuffer usage: mmap support is more sanely
8645 provided by utils/mono-mmap.
8647 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
8649 * gc.c: use posix semaphores when possible so that
8650 mono_gc_finalize_notify() is signal safe.
8652 2008-10-11 Zoltan Varga <vargaz@gmail.com>
8654 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
8655 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
8656 be #ifdef-ed out, the linker will remove the rest.
8658 * marshal.c: Implement DISABLE_COM.
8660 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
8662 2008-10-11 Miguel de Icaza <miguel@novell.com>
8664 * locales.c (string_invariant_compare_char): Optimization: do not
8665 call g_unichar_type unless we actually need the information.
8667 2008-10-10 Mark Probst <mark.probst@gmail.com>
8669 * object.c, class-internals.h: Also create remoting trampolines
8670 for generic methods. Pass the domain to the remoting trampoline
8671 creation function, too.
8673 2008-10-10 Zoltan Varga <vargaz@gmail.com>
8675 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
8677 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
8679 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
8682 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
8685 * locales.c: remove the use of g_strdown. Fixes bug #322313.
8687 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
8689 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
8690 for the least possible amount of time (extending the fix in r113458).
8692 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
8694 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
8696 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
8698 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
8699 as possible simd intrinsic types.
8700 Optimized the test to check for the common prefix first.
8702 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
8704 * class.c: back out part of a broken optimization committed on
8705 May 23th (bug #433908).
8707 2008-10-09 Mark Probst <mark.probst@gmail.com>
8709 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
8710 Win32. Should fix #432388 for most cases until we have the new
8713 2008-10-08 Zoltan Varga <vargaz@gmail.com>
8715 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
8716 instead of using inst->id so the hash is stable for AOT.
8718 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
8721 * icall.c: create a .ini file for shadow-copied assemblies that
8722 contains the location of the original assembly. Use this to return the
8723 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
8724 Also fix the number of '/' for windows when returning the CodeBase.
8727 2008-10-07 Bill Holmes <billholmes54@gmail.com>
8729 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
8731 Code is contributed under MIT/X11 license.
8733 2008-10-07 Bill Holmes <billholmes54@gmail.com>
8735 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
8736 if if the class vtable needs initialized.
8738 Code is contributed under MIT/X11 license.
8740 2008-10-07 Bill Holmes <billholmes54@gmail.com>
8742 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
8743 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
8744 STRING->BSTR, and CLASS->INTERFACE.
8746 Code is contributed under MIT/X11 license.
8748 2008-10-07 Marek Habersack <mhabersack@novell.com>
8750 * sysmath.h: changed the declaration of the
8751 ves_icall_System_Math_Round2 icall by adding an extra
8752 away_from_zero parameter.
8754 * sysmath.c (ves_icall_System_Math_Round2): added support for
8755 away from zero rounding. The icall now takes an extra boolean
8756 parameter to signal that away from zero operation is requested.
8758 2008-10-06 Zoltan Varga <vargaz@gmail.com>
8760 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
8761 the delegate klass so it can work with full-aot.
8762 (mono_marshal_get_delegate_end_invoke): Ditto.
8763 (mono_marshal_get_delegate_invoke): Ditto.
8765 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
8767 * gc.c, attach.h, attach.c: remove a bad pattern:
8768 add_finalizer_callback () is not implemented correctly, it can't
8769 without adding more overhead to the finalizer loop and it's not
8770 even needed, since we know exactly what we need to call, so there is
8771 no need to do so through an expensive function pointer.
8773 2008-10-04 Zoltan Varga <vargaz@gmail.com>
8775 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
8777 * attach.c (mono_attach_init): Remove the #ifdef.
8779 2008-10-04 Andreas Färber <andreas.faerber@web.de>
8781 * attach.c (mono_attach_init): Don't use
8782 mono_gc_add_finalizer_thread_callback when compiling without GC.
8785 Code is contributed under MIT/X11 license.
8787 2008-10-03 Zoltan Varga <vargaz@gmail.com>
8789 * class.c (mono_class_create_from_typedef): Remove the
8790 #ifndef DISABLE_SIMD stuff.
8792 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
8794 * class-internals.h (MonoClass): Added simd_type bit field.
8796 * class.c (mono_class_create_from_typedef): Check if type is a simd
8799 2008-10-03 Mark Probst <mark.probst@gmail.com>
8801 * object.c (mono_method_add_generic_virtual_invocation): Only add
8802 instantiations to the thunk whose count is at least as large as
8805 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
8807 * icall.c: changed the Type of the exception thrown when trying to
8808 invoke a constructor on an abstract class. Part of the fix for bug
8811 2008-10-02 Mark Probst <mark.probst@gmail.com>
8813 * class.c, class-internals.h (mono_method_get_vtable_index): New
8814 function which returns the index into the vtable and properly
8815 handles inflated virtual generic methods.
8817 2008-10-01 Mark Probst <mark.probst@gmail.com>
8819 * object.c, domain.c, object-internals.h, domain-internals.h:
8820 Generalize IMT thunk machinery to also handle thunks for virtual
8821 generic method invokes. When a virtual generic method is invoked
8822 more than a number of times we insert it into the thunk so that it
8823 can be called without lookup in unmanaged code.
8825 * generic-sharing.c, class-internals.h: Fetching a
8826 MonoGenericInst* for a method from an (M)RGCTX.
8828 2008-10-01 Zoltan Varga <vargaz@gmail.com>
8830 * marshal.c (emit_marshal_string): Applied a variant of a patch by
8831 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
8832 marshalling. Fixes #431304.
8834 2008-10-01 Bill Holmes <billholmes54@gmail.com>
8836 * marshal.c (emit_marshal_variant) : Change the attribute checks to
8837 handle when ref is specified without In or Out.
8839 Code is contributed under MIT/X11 license.
8841 2008-09-30 Mark Probst <mark.probst@gmail.com>
8843 * loader.c (mono_get_method_constrained): Don't expand method with
8844 the class's context, because it's already a method of that class.
8846 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
8848 * attach.c : should be correct build fix.
8850 2008-09-29 Zoltan Varga <vargaz@gmail.com>
8852 * attach.c: Fix the previous change.
8854 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
8856 * attach.c : quick w32 build fix.
8858 2008-09-27 Miguel de Icaza <miguel@novell.com>
8860 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
8861 crashes MonoDevelop: #430455.
8863 2008-09-27 Zoltan Varga <vargaz@gmail.com>
8865 * domain-internals.h (struct _MonoDomain): Move most fields used only by
8866 the JIT do MonoJitDomainInfo in ../mini/mini.h.
8868 * domain.c: Remove initialization/cleanup of the removed fields.
8870 2008-09-27 Mark Probst <mark.probst@gmail.com>
8872 * class.c (mono_class_generic_sharing_enabled): Enable generic
8873 code sharing for PPC.
8875 2008-09-26 Bill Holmes <billholmes54@gmail.com>
8877 * attach.c : Fixing the Windows builds.
8879 Code is contributed under MIT/X11 license.
8881 2008-09-25 Zoltan Varga <vargaz@gmail.com>
8883 * class.c (mono_class_generic_sharing_enabled): Experimentally change
8884 the default generic sharing mode to 'all'.
8886 2008-09-25 Mark Probst <mark.probst@gmail.com>
8888 * generic-sharing.c, class-internals.h: New function for checking
8889 whether a method needs a static RGCTX invoke wrapper. A few
8890 funtions moved from mini/generic-sharing.c.
8892 * icall.c: New function used.
8894 2008-09-25 Mark Probst <mark.probst@gmail.com>
8896 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
8897 Static RGCTX invoke wrapping applies to value type methods, too.
8899 * class.c (mono_class_setup_vtable_general): In generic-shared
8900 value types, wrap methods with a static RGCTX invoke wrapper.
8902 2008-09-25 Zoltan Varga <vargaz@gmail.com>
8904 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
8907 2008-09-24 Zoltan Varga <vargaz@gmail.com>
8909 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
8910 register a callback which is called when the finalizer thread is woken
8912 (finalizer_thread): Call the callback if it exists.
8914 * attach.h attach.c: New files, implementing the attach mechanism.
8916 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
8918 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
8919 by the previous change.
8921 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
8923 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
8924 loader.c, marshal.c, metadata-internals.h, metadata.c,
8925 method-builder.c, object.c, reflection.c: introduced specific functions
8926 to allocate from the domain and image mempools and cleaned up most of
8927 the code to use them (still missing a few in reflection.c).
8928 Keep the loader bytes counter updated.
8930 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
8932 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
8933 loader-related counters.
8935 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
8937 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
8938 added more MS-compatible counters.
8940 2008-09-22 Zoltan Varga <vargaz@gmail.com>
8942 * class.c (mono_class_setup_fields): Call setup_fields before accessing
8943 class->blittable. Fixes #428217.
8945 2008-09-21 Zoltan Varga <vargaz@gmail.com>
8947 * reflection.c (mono_image_get_field_on_inst_token): Call
8948 field_encode_signature () since that handles custom modifiers too.
8951 2008-09-20 Zoltan Varga <vargaz@gmail.com>
8953 * reflection.c (add_custom_modifiers): New helper function to merge custom
8954 modifiers stored in objects to a MonoType.
8955 (fieldref_encode_signature): Encode custom modifiers.
8956 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
8957 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
8959 2008-09-19 Kornél Pál <kornelpal@gmail.com>
8961 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
8962 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
8963 64-bit IL only images because imports are not resolved for IL only images.
8964 Special thanks to Bill Holmes for finding this bug and testing the patch.
8965 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
8967 Contributed under MIT/X11 license.
8969 2008-09-19 Miguel de Icaza <miguel@novell.com>
8971 * mono-config.c (dllmap_start): Add support for the bits keyword
8972 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
8974 2008-09-19 Mark Probst <mark.probst@gmail.com>
8976 * reflection.c (inflate_mono_method): When the class the method is
8977 to be inflated for is itself not inflated, just return the method.
8979 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
8981 * mono-perfcounters.c: use more user friendly process instance names.
8983 2008-09-18 Bill Holmes <billholmes54@gmail.com>
8985 * marshal.c (emit_marshal_variant) : Change the attribute checks to
8986 handle "[in] ref" and "[in][out] ref" cases.
8988 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
8989 to mono_mb_create_method. This was causing problems calling native to
8990 managed passing Variants by value.
8992 Code is contributed under MIT/X11 license.
8994 2008-09-18 Zoltan Varga <vargaz@gmail.com>
8996 * class.c (can_access_internals): Call mono_assembly_load_friends ()
8997 before accessing the friend_assembly_names field.
8999 * assembly.c (mono_assembly_load_friends): Make this callable multiple
9001 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
9002 called lazily when it is needed.
9004 * metadata-internals.h (struct _MonoAssembly): Add
9005 'friend_assembly_names_inited' flag.
9007 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
9009 * mono-perfcounters-def.h: fix the types of a few counters.
9010 * mono-perfcounters.c: implemented the instance names getter
9013 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
9015 * culture-info-table.h : regenerated.
9017 2008-09-17 Robert Jordan <robertj@gmx.net>
9019 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
9020 context bound objects. Fixes #415577.
9022 Code is contributed under MIT/X11 license.
9024 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
9026 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
9027 implementation (bug #423582).
9029 2008-09-16 Zoltan Varga <vargaz@gmail.com>
9031 * object.c (mono_object_get_virtual_method): Handle the case method->slot
9032 is not set. Fixes #426309.
9034 2008-09-16 Jb Evain <jbevain@novell.com>
9036 * class.c (mono_class_from_name): fix the exported type look up
9037 when the type is defined in a referenced assembly.
9039 2008-09-16 Jb Evain <jbevain@novell.com>
9041 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
9042 increment the next index counter on each iteration to make that work
9043 for more than one type forwarder. Unmanaged part to fix #422929.
9045 2008-09-15 Mark Probst <mark.probst@gmail.com>
9047 * object-internals.h: enum ComInterfaceType in
9048 MonoInterfaceTypeAttribute is guint32, not guint16.
9050 2008-09-12 Mark Probst <mark.probst@gmail.com>
9052 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
9055 2008-09-11 Mark Probst <mark.probst@gmail.com>
9057 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
9060 2008-09-11 Mark Probst <mark.probst@gmail.com>
9062 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
9063 Endianness fixes for MonoSymbolFileOffsetTable.
9065 2008-09-10 Bill Holmes <billholmes54@gmail.com>
9067 * process.c (complete_path) : Removing quotes from the
9068 input path. The glib file routines do not handle file paths
9069 that have quotes around them.
9071 Code is contributed under MIT/X11 license.
9073 2008-09-10 Bill Holmes <billholmes54@gmail.com>
9075 * socket-io.h : Adding a comment to provide locations where
9076 changes to MonoSocketAsyncResult need to be synced.
9078 Code is contributed under MIT/X11 license.
9080 2008-09-10 Zoltan Varga <vargaz@gmail.com>
9082 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
9083 parameters as well. Fixes #425001.
9085 2008-09-08 Miguel de Icaza <miguel@novell.com>
9087 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
9090 2008-09-07 Miguel de Icaza <miguel@novell.com>
9092 * console-io.c: Add support for tracking the window size if it
9095 The setup is very simple: the TtySetup function will now return a
9096 pointer to a location in memory that tracks the current console
9097 size. The managed code checks its current value every time its
9098 queried against the last value set, and updates accordingly.
9100 With this setup we can work with multiple consoles, and we do not
9101 require to poke into managed code from a signal handler.
9103 Additionally, the environment for COLUMNS and LINES is now handled
9106 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
9108 2008-09-07 Mark Probst <mark.probst@gmail.com>
9110 * marshal.c (mono_type_native_stack_size): Treat
9111 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
9113 2008-09-04 Jb Evain <jbevain@novell.com>
9115 * class.c (mono_class_is_assignable_from): fix assignability of nullables
9118 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
9120 * verify.c (verify_type_compatibility_full): Revert change
9121 to allow converting a native int to unmanaged pointer be verifiable
9122 under non-strict mode.
9123 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
9125 * verify.c: Added some TODOs.
9127 2008-09-02 Bill Holmes <billholmes54@gmail.com>
9129 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
9130 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
9131 Changed to use GlobalAlloc for the memory returned on Windows platforms.
9133 Code is contributed under MIT/X11 license.
9135 2008-09-02 Jb Evain <jbevain@novell.com>
9137 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
9139 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
9141 reflection.c (typebuilder_setup_fields): Handle classes with
9144 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
9146 class.c (mono_class_setup_events): Add memory barrier due to
9147 double checked locking.
9149 class.c (mono_class_setup_properties): Same.
9151 2008-08-31 Zoltan Varga <vargaz@gmail.com>
9153 * class.c (mono_class_is_assignable_from): Fix the build.
9155 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
9156 before accessing klass->interface_bitmap. Fixes #421744.
9158 2008-08-28 Zoltan Varga <vargaz@gmail.com>
9160 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
9161 the runtime into no-exec mode, useful when running the AOT compiler.
9163 * appdomain.c gc.c object.c: Avoid executing managed code when running
9166 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
9168 * reflection.c (_mono_reflection_get_type_from_info): Handle the
9169 special case when the mono_assembly_loaded () returns NULL because the
9170 search hook is not installed.
9172 2008-08-25 Zoltan Varga <vargaz@gmail.com>
9174 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
9175 crashes in bstr marshalling on linux.
9177 2008-08-24 Zoltan Varga <vargaz@gmail.com>
9179 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
9180 with more than one parameter.
9182 2008-08-24 Miguel de Icaza <miguel@novell.com>
9184 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
9185 start/stop flow control as well when turning off ICANON (allows
9186 C-s and C-q to be read by Console.ReadKey).
9188 2008-08-24 Zoltan Varga <vargaz@gmail.com>
9190 * class.c (mono_class_init): Move the initialization of nested classes
9191 into mono_class_get_nested_types (). Fixes #418433.
9193 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
9196 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
9197 iterating tough the nested classes of a class.
9199 2008-08-23 Zoltan Varga <vargaz@gmail.com>
9201 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
9204 2008-08-22 Miguel de Icaza <miguel@novell.com>
9206 * console-io.c (sigcont_handler): Support signal chaining for
9209 (console_set_signal_handlers): Use best practices with sigaction,
9210 clear the structure before using it.
9212 2008-08-22 Robert Jordan <robertj@gmx.net>
9214 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
9215 Fix the Windows build.
9217 2008-08-22 Zoltan Varga <vargaz@gmail.com>
9219 * class.c (mono_class_generic_sharing_enabled): Make the default
9220 sharing mode 'corlib'.
9222 2008-08-21 Zoltan Varga <vargaz@gmail.com>
9224 * console-io.c (console_set_signal_handlers): Fix a warning.
9226 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
9227 method normally, the JIT will take care of avoiding recursion.
9229 2008-08-20 Bill Holmes <billholmes54@gmail.com>
9231 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
9233 Code is contributed under MIT/X11 license.
9235 2008-08-20 Miguel de Icaza <miguel@novell.com>
9237 * console-io.c (sigcont_handler): We need to restore the entire
9238 termios state, not only the original settings, as things like echo
9239 can be controlled after this (Booish exposes this issue with its
9240 own ReadLine implementation).
9242 Additionally, we need to set the terminal back into keypad_xmit
9245 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
9246 string as a paramter as well. Otherwise we get different
9249 2008-08-20 Zoltan Varga <vargaz@gmail.com>
9251 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
9252 delegates with byref out parameter passing. Fixes #351520.
9254 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
9256 (mono_type_get_desc): Add the type arguments for GENERICINST.
9257 (mono_method_full_name): Stringify the class name using mono_type_full_name
9258 so it picks up generic arguments.
9260 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
9262 * console-io.c: Removed debug output.
9264 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
9266 reflection.c (mono_reflection_create_runtime_class): Alloc
9267 the nested classes linked list using the dynamic image mempool.
9268 Fixes leak in corlib compilation.
9270 2008-08-19 Miguel de Icaza <miguel@novell.com>
9272 * console-io.c: Fix incredibly annoying behavior on the console
9273 after resuming execution after control-z. This affected every
9274 console application.
9276 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
9278 * mempool-internals.h: Header for mono private mempool functions. The first
9279 two function are for allocating glib linked lists using pools.
9281 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
9283 * Makefile.am: Added mempool-internals.h.
9285 2008-08-16 Zoltan Varga <vargaz@gmail.com>
9287 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
9288 (mono_domain_free): Ditto.
9290 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
9291 be used by the JIT to store its domain-specific information, instead of putting
9292 it directly into MonoDomain.
9294 * domain.c (mono_install_create_domain_hook): New helper function to install
9295 a hook which initializes domain->runtime_info.
9297 * domain.c (mono_install_free_domain_hook): Ditto.
9299 2008-08-15 Zoltan Varga <vargaz@gmail.com>
9301 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
9302 asserting if the ares parameter is null.
9304 * mono-perfcounters.c: Fix warnings.
9306 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
9307 is not needed, don't check for interruptions either.
9308 (mono_marshal_get_delegate_end_invoke): Ditto.
9310 2008-08-15 Marek Habersack <mhabersack@novell.com>
9312 * mono-perfcounters.c (predef_readonly_counter): added support for
9313 reading the ASP.NET Requests Queued counter from another process.
9315 2008-08-12 Zoltan Varga <vargaz@gmail.com>
9317 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
9318 MonoImage to simplify the AOT code.
9320 2008-08-10 Zoltan Varga <vargaz@gmail.com>
9322 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
9323 marshalling. Fixes #416078.
9325 2008-08-08 Zoltan Varga <vargaz@gmail.com>
9327 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
9328 it is set, looking up the icall address is deferred to the JIT, since
9329 in embedded scenarios, the icall might not be registered in the runtime
9330 doing the AOT compilation. Backported from the 2.0 branch.
9332 2008-08-08 Zoltan Varga <vargaz@gmail.com>
9334 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
9337 2008-08-05 Marek Habersack <mhabersack@novell.com>
9339 * Makefile.am: added support for cross-compilation.
9341 2008-08-04 Zoltan Varga <vargaz@gmail.com>
9343 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
9345 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
9347 * mono-perfcounters.c: jitted methods and jitted bytes counters.
9349 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
9351 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
9352 mono-perfcounters.c: performance counters implementation.
9354 2008-07-31 Zoltan Varga <vargaz@gmail.com>
9356 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
9357 to gpointer, letting the AOT code decide what to store in it.
9359 2008-07-31 Bill Holmes <billholmes54@gmail.com>
9361 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
9362 mono_class_setup_methods if the methods are not initialized.
9364 Code is contributed under MIT/X11 license.
9366 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
9368 * verify.c: Remove some debug code I commited by accident.
9370 * verify.c (mono_method_is_valid_in_context): Change the return value
9371 to make possible to distinguish between invalid and unverifiable.
9373 * verify.c (verifier_load_method): Don't return NULL for unverifiable
9376 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
9378 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
9379 constraints. Fixes regression in gtest-253.
9381 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
9383 * verify.c (mono_verifier_verify_class): Don't allow generic types
9384 with explicit layout.
9386 * verify.c (mono_method_verify): Check locals and argument types.
9388 2008-07-29 Zoltan Varga <vargaz@gmail.com>
9390 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
9391 wait if the thread is in StopRequested state.
9393 * class.c (mono_class_from_name): Refactor the module searching code into
9394 a separate function so it can be reused in the AOT case too.
9396 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
9398 * verify.c (mono_type_is_valid_in_context): Improve the error message.
9399 Check both the type and it's generic type definition for loader errors.
9401 * verify.c (mono_method_is_valid_in_context): Don't generate another
9402 error when a type errors occur, this leads to the wrong exception been
9405 2008-07-28 Dick Porter <dick@ximian.com>
9409 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
9410 New internal calls to duplicate and close a process handle.
9412 2008-07-27 Andreas Färber <andreas.faerber@web.de>
9414 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
9416 2008-07-27 Zoltan Varga <vargaz@gmail.com>
9418 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
9420 2008-07-27 Robert Jordan <robertj@gmx.net>
9422 * class.c (mono_class_init): Don't compute class.has_finalize for
9423 valuetypes. Fixes #412477.
9425 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
9427 * verify.c: Implement constraint equivalence checking.
9428 This is required when a generic parameter is used as
9429 argument to a constrained one.
9433 2008-07-24 Zoltan Varga <vargaz@gmail.com>
9435 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9437 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
9439 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
9440 synch with managed object layout.
9442 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
9444 * verify.c (do_branch_op): Handle valuetypes and generic
9447 * verify.c (do_cmp_op): Same.
9451 2008-07-24 Mark Probst <mark.probst@gmail.com>
9453 * generic-sharing.c: Fix memory leaks.
9455 * class.c, class-internals.h: Make
9456 mono_class_inflate_generic_type_with_mempool() non-static.
9458 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
9460 * pedump.c (dump_verify_info): Dump full class name.
9462 2008-07-24 Mark Probst <mark.probst@gmail.com>
9464 * generic-sharing.c: Removed some old code that didn't do anything.
9466 2008-07-24 Massimiliano Mantione <massi@ximian.com>
9467 * profiler.c: Added runtime_initialized_event,
9468 mono_profiler_install_runtime_initialized and
9469 mono_profiler_runtime_initialized. This new hook tells the profiler
9470 when the runtime is sufficiently initialized to be able to call
9471 mono_thread_attach on the root appdomain.
9472 * profiler.h, profiler-private.h: Likewise.
9474 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
9476 * verify.c (do_cast): Do boxing for generic arguments as well.
9478 * class.c (is_nesting_type): Drop generic instantiations before
9479 checking for nesting.
9481 * class.c (can_access_instantiation): Allow access to generic
9484 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
9486 * verify.c (verify_class_for_overlapping_reference_fields):
9487 On some cases, the field size might be zero, guard against that.
9488 Fix the explicit layout check to work as expected.
9490 2008-07-23 Zoltan Varga <vargaz@gmail.com>
9492 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
9493 mono_thread_resume () during shutdown, since the thread we want to abort
9496 2008-07-22 Zoltan Varga <vargaz@gmail.com>
9498 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
9501 * debug-mono-symfile.c: Fix a warning.
9503 * mono-perfcounters.c (get_cpu_times): Fix a warning.
9505 * object.c (mono_class_vtable): Check if exception_type is set, and return
9506 NULL as defined by the function comments.
9508 2008-07-22 Mark Probst <mark.probst@gmail.com>
9510 * mempool.c: Use malloc for every single mempool allocation if the
9511 configure option is set. This makes it easier to track mempool
9512 allocations with tools like Valgrind.
9514 2008-07-22 Jb Evain <jbevain@novell.com>
9516 * reflection.c (create_dynamic_mono_image): emit the same
9517 metadata version that SL2 does when creating a SL2 image.
9519 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
9522 * icall.c: New icall System.Enum:get_hashcode. This function
9523 avoids the overhead of boxing the enum to the underlying type.
9525 2008-07-21 Mark Probst <mark.probst@gmail.com>
9527 * reflection.c (mono_method_get_object): Don't let static RGCTX
9528 invoke wrappers get into MonoReflectionMethods.
9530 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
9532 * object-internals.h:
9533 * object.c: New mono_runtime_class_init_full function
9534 that makes throwing the exception optinal.
9536 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
9537 for the case where the exception object is supplied.
9539 2008-07-16 Kornél Pál <kornelpal@gmail.com>
9541 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
9544 Contributed under MIT/X11 license.
9546 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
9548 * string-icalls.c (ves_icall_System_String_InternalSplit):
9549 Optimize array allocation by caching the MonoClass of the
9552 * icall.c (ves_icall_Type_GetMethodsByName): Same.
9554 * reflection.c (mono_param_get_objects): Same.
9556 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
9559 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
9560 It inflates the given type using the class context.
9562 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
9564 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
9565 the vtable if it already exists.
9567 * object-internals.h: Add mono_class_try_get_vtable as part of the
9570 * reflection.c (mono_type_get_object): Use the MonoObject from the
9571 vtable when possible. Reduces locking contention on reflection heavy
9574 2008-07-15 Zoltan Varga <vargaz@gmail.com>
9576 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
9577 g_bit_nth_msf () since that macro is not implemented in eglib.
9579 2008-07-13 Zoltan Varga <vargaz@gmail.com>
9581 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
9582 on platforms which do not support it.
9584 2008-07-12 Zoltan Varga <vargaz@gmail.com>
9586 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
9588 2008-07-11 Martin Baulig <martin@ximian.com>
9590 * mono-debug-debugger.h
9591 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
9593 * mono-debug-debugger.c
9594 (_mono_debugger_interruption_request): New global volatile variable.
9595 (mono_debugger_check_interruption): New public function.
9598 (mono_thread_current_check_pending_interrupt): Call
9599 mono_debugger_check_interruption().
9600 (mono_thread_interruption_checkpoint_request): Likewise.
9602 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9604 * verify.c: Add more type checks for loaded types. Verify the result
9605 handle from ldtoken.
9607 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9609 * loader.c (field_from_memberref): Don't crash if the field
9612 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9614 * verify.c: Verify if type and method instantiations
9615 don't have invalid VAR or MVAR arguments.
9617 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9619 * verify.c: Fix double free of function pointer list.
9621 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9623 * object.c (mono_string_to_utf8): Comment the new code as it
9626 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
9628 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
9630 2008-07-07 Bill Holmes <billholmes54@gmail.com>
9632 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
9633 is not throw too many times.
9635 Code is contributed under MIT/X11 license.
9637 2008-07-07 Zoltan Varga <vargaz@gmail.com>
9639 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
9640 debugging is turned off.
9642 2008-07-06 Zoltan Varga <vargaz@gmail.com>
9644 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
9646 2008-07-04 Mark Probst <mark.probst@gmail.com>
9648 * class-internals.h, class.c: Added new generic sharing option:
9649 Share only stuff in System.Collections.Generic, which is now the
9652 2008-07-04 Mark Probst <mark.probst@gmail.com>
9654 * generic-sharing.c, class-internals.h: New function for getting a
9655 generic method in a generic class given the corresponding method
9656 for a different instantiation of the class. Partly refactored
9657 from mini-trampolines.c.
9659 * class.c: Make sure generic methods have a class_inst if they are
9660 part of a generic class.
9662 * metadata.c (mono_type_stack_size_internal): Handle type
9665 2008-07-04 Mark Probst <mark.probst@gmail.com>
9667 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
9668 Signifies whether information on the this/vtable/mrgctx variable
9671 2008-07-04 Mark Probst <mark.probst@gmail.com>
9673 * object.c, object-internals.h, icall.c: New function
9674 mono_delegate_ctor_with_method(), which does the same as
9675 mono_delegate_ctor(), but takes an explicit method argument
9676 instead of taking the method from the jit info.
9678 * marshal.c: When creating a delegate with an inflated method take
9679 the "this" argument as the target class for the castclass.
9681 2008-07-03 Mark Probst <mark.probst@gmail.com>
9683 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
9684 mono_jit_info_table_find() to perform very badly in some cases.
9686 2008-07-02 Zoltan Varga <vargaz@gmail.com>
9688 * icall.c (type_from_typename): Handle 'string'.
9690 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
9691 wrappers into the wrapper_hash, since the key is not a MonoMethod.
9693 2008-07-01 Zoltan Varga <vargaz@gmail.com>
9695 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
9697 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
9698 number of available managed allocator types.
9700 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
9701 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
9703 2008-06-30 Zoltan Varga <vargaz@gmail.com>
9705 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
9706 which is a low level lock protecting just the 'jit_code_hash' hash table.
9708 * domain.c: Initialize+cleanup jit_code_hash_lock.
9710 2008-06-30 Kornél Pál <kornelpal@gmail.com>
9712 * coree.c (mono_load_coree): Set coree_module_handle global variable only
9713 after initialization.
9715 * coree.h: Make MonoFixupExe internal.
9717 Contributed under MIT/X11 license.
9719 2008-06-30 Kornél Pál <kornelpal@gmail.com>
9721 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
9722 because that is platform independent. Check NumberOfRvaAndSizes in PE32
9724 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
9725 image being loaded is a CLI image and _CorValidateImage gets called.
9727 * coree.h: Add MonoLoadImage.
9729 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
9730 instead of LoadLibrary.
9732 Contributed under MIT/X11 license.
9734 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
9736 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
9737 for any primitive type.
9739 2008-06-29 Zoltan Varga <vargaz@gmail.com>
9741 * object.c (mono_array_new_specific): Optimize this and the other allocation
9744 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
9745 domains too if mono_dont_free_domains is set.
9747 * domain-internals.h (mono_dont_free_domains): New internal option controlling
9748 whenever to free appdomain data after it has been unloaded.
9750 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
9752 2008-06-28 Zoltan Varga <vargaz@gmail.com>
9754 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
9755 (mono_method_get_equivalent_method): Fix a warning.
9757 * object.c (mono_message_init): Avoid looking up array types for each call.
9759 2008-06-27 Zoltan Varga <vargaz@gmail.com>
9761 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
9764 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
9767 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
9770 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
9773 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
9775 * object.c (mono_value_box): Fix boxing of nullables.
9777 2008-06-26 Kornél Pál <kornelpal@gmail.com>
9779 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
9780 mono_module_handle that is defined by the linker; no initialization required.
9781 * coree.h: Remove mono_module_handle, add __ImageBase, update
9782 mono_image_open_from_module_handle.
9783 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
9784 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
9785 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
9786 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
9787 to 4 GB away from image base address. IA64 version is not tested but was very
9788 easy to implement and should work if we ever need it.
9789 * domain.c (mono_init_internal): Avoid system error message boxes.
9790 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
9791 with has_entry_point. Handle do_mono_image_load fauilre correctly.
9792 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
9793 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
9794 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
9796 Contributed under MIT/X11 license.
9798 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
9800 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
9801 as part of the private mono API.
9803 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
9804 Do proper argument checking for methods that belong to generic classes.
9805 Do proper type resolution for GMFH/2.
9808 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
9810 * verify.c (do_switch): Fix a memory corruption bug with
9811 the jump index is out of bound.
9813 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
9815 * verify.c: Disable debug code.
9817 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
9819 * reflection.c (mono_image_get_methodbuilder_token): Use
9820 mono_image_get_methodspec_token_for_generic_method_definition
9821 instead of mono_image_get_memberref_token. We cache more memberef
9824 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
9826 * verify.c: Inflate exception clause types.
9829 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
9831 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
9834 * reflection.c (mono_image_get_ctorbuilder_token): Same.
9836 * reflection.c (mono_image_create_method_token): Same.
9838 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
9840 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
9841 It does the same as mono_image_get_methodref_token but works on
9844 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
9845 and always generate a methodspec. This follows the old behavior and fixes
9846 the regressions in System.Core.
9848 2008-06-24 Zoltan Varga <vargaz@gmail.com>
9850 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
9851 don't event mono_class_get () succeeds. Fixes #402182.
9853 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
9855 * metadata-internals.h: Added MonoDynamicImage::methodspec
9856 hashtable to store methodspec tokens created for MethodBuilders.
9858 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
9859 MethodBuilders as open instantiations if a methodspec was requested.
9861 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
9863 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
9865 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
9869 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
9871 * loader.c (method_from_methodspec): Avoid crashing if the
9872 method lookup fails.
9874 2008-06-20 Dick Porter <dick@ximian.com>
9876 * socket-io.c (get_socket_assembly): Cope with Moonlight network
9877 classes being in a different assembly. Fixes bug 399184.
9879 2008-06-20 Zoltan Varga <vargaz@gmail.com>
9881 * loader.c (mono_loader_init): Make this callable multiple times.
9882 (mono_dllmap_insert): Call mono_loader_init () so this works even before
9883 the runtime is initialized. Fixes #401755.
9885 2008-06-19 Dick Porter <dick@ximian.com>
9887 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
9890 2008-06-19 Dick Porter <dick@ximian.com>
9893 * icall-def.h: Implement Socket generic Send() and Receive()
9894 methods. Fixes bug 395168.
9896 2008-06-19 Kornél Pál <kornelpal@gmail.com>
9898 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
9900 Contributed under MIT/X11 license.
9902 2008-06-18 Martin Baulig <martin@ximian.com>
9904 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
9905 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
9906 set to 80.0. The debugger <-> runtime interface is now frozen as
9910 (mono_debug_debugger_version): Bump to 4.
9912 2008-06-18 Martin Baulig <martin@ximian.com>
9914 * debug-mono-symfile.c
9915 (load_symfile): Don't check the minor version.
9917 * debug-mono-symfile.h: Bump the version number to 50.0.
9919 2008-06-18 Martin Baulig <martin@ximian.com>
9921 * debug-mono-symfile.c
9922 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
9923 minimum required version.
9925 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
9927 * reflection.c (mono_custom_attrs_from_property): Fix support for
9928 retriveving cattrs of dynamic inflated generic types.
9930 * reflection.c (mono_custom_attrs_from_event): Same.
9932 * reflection.c (mono_custom_attrs_from_field): Same;
9934 * reflection.c (typebuilder_setup_events): Same cattrs of events.
9936 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
9937 Moved to metadata.c.
9939 * metadata.c: New functions to retrive the equivalent field, event
9940 of property from the generic type definition.
9942 * metadata-internals.h: Added new functions from metadata.c.
9944 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
9946 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
9947 to cached in a mempool is used.
9949 * metadata.c (free_generic_class): In some situations field generic_info type
9950 is not properly dup'ed and leads to double free'ing.
9954 2008-06-17 Mark Probst <mark.probst@gmail.com>
9956 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
9957 this arguments (will be needed later for generic methods).
9960 2008-06-17 Mark Probst <mark.probst@gmail.com>
9962 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
9963 Create a static RGCTX invoke wrapper for methods which require it.
9965 2008-06-17 Mark Probst <mark.probst@gmail.com>
9967 * object.c, class-internals.h: New function for checking whether
9968 an individual field is special static.
9970 2008-06-15 Zoltan Varga <vargaz@gmail.com>
9972 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
9973 linear search since the table is sorted.
9975 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
9978 2008-06-14 Zoltan Varga <vargaz@gmail.com>
9980 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
9981 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
9983 * gc.c (mono_domain_finalize): Allow an infinite timeout.
9985 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
9987 * threads.c (mono_thread_request_interruption): Get rid of locking, use
9988 InterlockedCompareExchange to query and modify
9989 thread->interruption_requested.
9991 * object-internals.h (struct _MonoThread): Change interruption_requested
9992 to a gint32 so it can be modified by atomic operations. Add
9993 'critical_region_level' from the managed side, change small_id to a guint32,
9994 add new set of 'unused' fields.
9996 * appdomain.c: Bump corlib version.
9998 2008-06-13 Zoltan Varga <vargaz@gmail.com>
10000 * class.c (mono_class_from_name): Search modules as well. Fixes
10003 2008-06-13 Mark Probst <mark.probst@gmail.com>
10005 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
10006 templates. Templates are generalized with an additional type_argc
10007 argument. RGCTX templates have type_argc==0, MRGCTX templates
10010 * domain-internals.h, domain.c: New hash table for looking up
10013 * metadata.c, metadata-internals.h: Rename hash and equal
10014 functions for MonoGenericInst's and make them public.
10016 * class-internals.h: New data structures for the MRGCTX. Macros
10017 for distinguishing slots in the RGCTX and the MRGCTX.
10019 2008-06-13 Mark Probst <mark.probst@gmail.com>
10021 * object.c (mono_method_get_imt_slot): Put the same methods of
10022 different instantiations of the same generic interface in the same
10023 IMT slots, to make generic sharing simpler.
10025 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
10027 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
10029 * metadata.c (mono_metadata_field_info_with_mempool): Added.
10030 This function works just like mono_metadata_field_info, but
10031 accept a mempool as argument to be used allocating memory.
10033 * marshal.c (mono_marshal_load_type_info): Use new function
10034 to load marshal data into image mempool.
10036 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
10038 * class.c (mono_class_inflate_generic_type_with_mempool):
10039 This function allows to inflate a generic type using
10042 * class.c (inflate_generic_type): Take a mempool as argument
10043 and use it to do type dup'ing.
10045 * class.c (mono_class_setup_fields): Field type for generic
10046 generic classes are allocated from the image mempool.
10048 * metadata.c (free_generic_class): Inflated field type is
10049 now allocated in the image mempool.
10051 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
10053 * threads.c (thread_cleanup): Free MonoThread::name.
10055 2008-06-12 Marek Habersack <mhabersack@novell.com>
10057 * appdomain.c (ensure_directory_exists): avoid unnecessary
10058 mkdir(2) calls when the shadow directory already exists.
10059 (mono_make_shadow_copy): copy also satellite assemblies from the
10060 private bin directories.
10062 2008-06-11 Zoltan Varga <vargaz@gmail.com>
10064 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
10066 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
10067 a page boundary. Fixes #396219.
10069 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10071 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
10072 due to double-checked locking.
10074 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10076 * assembly.c (build_assembly_name): Release memory on failure.
10078 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
10080 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10082 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
10085 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10087 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
10090 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10092 * loader.c (field_from_memberref): Check if field signature type is equal
10093 to the non-inflated type of the field. Fixes #398980.
10095 2008-06-11 Zoltan Varga <vargaz@gmail.com>
10097 * assembly.c (mono_assembly_load_from_full): Call
10098 mono_assembly_load_friends () outside the assemblies lock, since it can
10099 acquire the loader lock. Fixes #323696.
10101 * reflection.c (resolve_object): Inflate the inst with the context for
10102 FieldOnTypeBuilderInst. Fixes #399010.
10104 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10106 * reflection.c (mono_image_get_field_on_inst_token): Don't
10107 inflate the field to encode it's signature. If it's a
10108 VAR or MVAR it should stay that way in the signature.
10111 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10113 * reflection.c (resolve_object): Release memory of inflated types.
10115 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10117 * loader.c (mono_method_get_signature_full): Remove assert about
10118 loading a methodspec to a generic method. We have such methods, such as
10119 System.Threading.Interlocked::CompareExchange<T>.
10120 This assert was removed since it crashes the verifier when it checks
10121 methods calling CompareExchange<T>.
10123 2008-06-10 Marek Safar <marek.safar@gmail.com>
10125 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
10126 of Type array and not MonoType.
10128 2008-06-10 Marek Habersack <mhabersack@novell.com>
10130 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
10133 2008-06-10 Martin Baulig <martin@ximian.com>
10135 * debug-mono-symfile.h
10136 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
10137 changes to the file format, but we were generating incorrect
10138 source file indices in the line number table due to a bug, which
10139 made backtraces report an incorrect source file.
10141 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10143 * mono-debug.c: Moved mono_debug_free_method_jit_info from
10144 mini/debug-mini.c to here.
10146 * mono-debug.c (il_offset_from_address): Free memory from find_method.
10148 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
10149 use it to release structs returned by mono_debug_find_method.
10151 2008-06-10 Zoltan Varga <vargaz@gmail.com>
10153 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
10154 since it needs to set method->slot for all interface methods.
10156 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
10158 * class-internals.h: Forgot to add.
10160 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
10162 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
10164 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
10165 Lookup the custom attributes from property_hash.
10167 * reflection.c (mono_save_custom_attrs): Save the custom attributes
10168 in property_hash. Allocate all data using the image mempool.
10170 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
10171 for dynamic_custom_attrs to checks if the image is dynamic.
10173 2008-06-09 Zoltan Varga <vargaz@gmail.com>
10175 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
10178 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
10179 runtime functions while holding the domain assemblies lock.
10181 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
10183 * verify.c: Reapplied the last bit of the reverted changes.
10185 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
10187 * verify.c: Reapplied more of the reverted changes.
10189 2008-06-09 Martin Baulig <martin@ximian.com>
10191 * debug-mono-symfile.c (load_symfile): Check the major version
10192 first; if it's wrong, don't print the minor version in the error message.
10194 2008-06-09 Zoltan Varga <vargaz@gmail.com>
10196 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
10197 lock instead of the domain lock to avoid deadlocks, since the thread might
10198 already hold the loader lock.
10200 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
10201 (mono_thread_attach): Ditto.
10203 * monitor.c: Use a TLS variable for holding the current thread id instead
10204 of calling pthread_self ().
10205 (mono_monitor_init_tls): New internal function to initialize the TLS
10207 (mono_monitor_try_enter_internal): Put the owner == id check after the
10210 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
10211 missed optimizations when using gcc-4.3.
10213 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
10215 * reflection.c (mono_dynamic_image_free): Free the memory
10216 used by MonoGenericParam in MonoDynamicImage::gen_param.
10218 * reflection.c (mono_reflection_setup_generic_class): Allocate
10219 container from mempool.
10221 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
10222 container from mempool.
10224 2008-06-07 Zoltan Varga <vargaz@gmail.com>
10226 * threads.c (mono_set_pending_exception): New internal function to set the
10227 pending exception of the current thread.
10228 (mono_thread_get_and_clear_pending_exception): Check for
10229 thread->pending_exception as well.
10231 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
10233 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
10234 it can trigger a collection.
10236 2008-06-06 Martin Baulig <martin@ximian.com>
10238 Merged the `debugger-kahalo' branch.
10241 (MONO_DEBUGGER_VERSION): Bumped to 72.
10243 * debug-mono-symfile.h
10244 (MonoSymbolFileMethodIndexEntry): Removed.
10245 (MonoSymbolFileMethodEntry): New public typedef.
10246 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
10247 (MonoSymbolFileSourceEntry): Remove everything except `index' and
10249 (MonoSymbolFileMethodEntry): Removed.
10250 (MonoSymbolFileLexicalBlockEntry): Removed.
10251 (MonoSymbolFileLineNumberEntry): Removed.
10252 (MonoDebugLexicalBlockEntry): Removed.
10253 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
10254 removed `num_il_offsets' and `il_offsets'.
10255 (MonoSymbolFile): Replace `version' with `major_version' and
10257 (MONO_SYMBOL_FILE_VERSION): Replace with
10258 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
10259 `MONO_SYMBOL_FILE_MINOR_VERSION'.
10261 * debug-mono-symfile.c
10262 (mono_debug_symfile_lookup_location): Add support for the new line
10263 number table format.
10265 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
10267 * metadata.c (free_generic_class): Release the inflated
10268 MonoClass of dynamic generic classes if it's not a generic
10271 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
10273 * verify.c: Reapplied more of the reverted changes.
10275 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
10277 * reflection.c (lookup_custom_attr): Clean the cached flag or
10278 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
10281 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
10283 * verify.c: Reapplied a small part of the reverted changes.
10285 2008-06-07 Zoltan Varga <vargaz@gmail.com>
10287 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10289 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
10290 previously in managed code.
10291 (mono_monitor_exit): Ditto.
10292 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
10294 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
10295 the managed definition.
10297 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
10299 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
10301 2008-06-06 Zoltan Varga <vargaz@gmail.com>
10303 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
10305 * monitor.c: Add some micro optimizations.
10307 * icall.c (type_from_typename): Handle 'bool'.
10309 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
10311 * verify.c: Implement constructor verification per P III 1.8.1.4.
10314 2008-06-06 Zoltan Varga <vargaz@gmail.com>
10316 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
10317 holding the assemblies lock here too.
10319 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
10321 * verify.c: Kill stack_top function.
10323 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
10325 * verify.c: Kill stack_get function.
10327 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
10329 * verify.c (mono_method_verify): Last change broke the build. Fixed.
10331 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
10333 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
10336 * verify.c (mono_method_verify): Inflate params and locals to avoid
10337 mismatch when checking for compatibility.
10339 2008-06-05 Jonathan Chambers <joncham@gmail.com>
10341 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
10342 Length prefix should be size in bytes. Fix bug #339530.
10344 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
10345 Length prefix should be size in bytes. Fix bug #339530.
10347 Code is contributed under MIT/X11 license.
10349 2008-06-05 Bill Holmes <billholmes54@gmail.com>
10351 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
10353 Contributed under MIT/X11 license.
10355 2008-06-05 Martin Baulig <martin@ximian.com>
10357 * mono-debug-debugger.c
10358 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
10360 2008-06-05 Zoltan Varga <vargaz@gmail.com>
10362 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
10363 while holding the assemblies lock to prevent deadlocks. Handle the case
10364 where the search hook returns NULL but the assembly was still loaded.
10367 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
10368 modify domain state.
10370 2008-06-05 Andreas Färber <andreas.faerber@web.de>
10372 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
10373 * Makefile.am (pedump_LDADD): Post-process object files and
10374 add dtrace-generated object file, if necessary.
10376 Code is contributed under MIT/X11 license.
10378 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
10380 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
10382 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
10384 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
10386 2008-06-04 Mark Probst <mark.probst@gmail.com>
10388 * threads.c: Try to free everything from the delayed free table
10389 when shutting down threads, and set the variable to NULL after the
10390 table is freed so that calling
10391 mono_thread_hazardous_try_free_all() when shutting down the root
10392 domain doesn't crash.
10394 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
10396 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
10397 the caller if resulting type was inflated.
10399 * class.c (mono_class_create_from_typespec): Free the MonoType if it
10402 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
10405 2008-06-04 Zoltan Varga <vargaz@gmail.com>
10407 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
10408 class library tests.
10410 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
10411 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
10414 2008-06-04 Mark Probst <mark.probst@gmail.com>
10416 * domain.c, domain-internals.h: The JIT infos are now freed by the
10417 JIT info table code. They are freed immediately if there only a
10418 single JIT info table in circulation. If there is more, the free
10419 is delayed via a queue.
10421 * threads.c, threads-types.h: New hazard pointer function for
10422 freeing all freeable delayed items in one sitting.
10424 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10426 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
10428 * reflection.c (typebuilder_setup_properties): Same.
10430 * reflection.c (typebuilder_setup_events): Same.
10432 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10434 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
10435 and use it for allocating memory.
10437 * reflection.c (mono_marshal_spec_from_builder): Same.
10439 * reflection.c: Change code to use new signatures.
10441 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
10443 2008-06-03 Zoltan Varga <vargaz@gmail.com>
10445 * decimal.c (rescale128): Put back one line which was accidently commented
10448 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
10451 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10453 * reflection.c (mono_reflection_generic_class_initialize): Name must
10454 be always malloc'ed so we can free it later on. Do this for field, property
10457 * metadata.c (free_generic_class): Free field, property and event names.
10459 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10461 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
10462 instead of g_memdup.
10464 * reflection.c (typebuilder_setup_fields): Same.
10466 2008-06-03 Zoltan Varga <vargaz@gmail.com>
10468 * decimal.c (rescale128): Optimize this function a bit more.
10470 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10472 * metadata.c (free_generic_class): Release some memory from
10473 SRE generic classes.
10475 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10477 * reflection.c (mono_image_get_generic_field_token): No reference
10478 to name is kept, free it.
10480 * reflection.c (mono_reflection_generic_class_initialize): Free
10481 more memory of the inflated field.
10483 2008-06-03 Zoltan Varga <vargaz@gmail.com>
10485 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
10488 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
10490 * reflection.c (mono_dynamic_image_free): Release memory used by
10491 MonoDynamicImage::array_methods elements.
10493 * reflection.c (assembly_add_win32_resources): Release memory after
10496 2008-06-02 Zoltan Varga <vargaz@gmail.com>
10498 * decimal.c (log2_32): Use an optimized version for this function too.
10500 * decimal.c (log2_64): Fix this on 32 bit machines.
10502 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
10504 * class.c (mono_dup_array_type): Implement allocation using a mempool.
10506 * class.c (mono_metadata_signature_deep_dup): Same.
10508 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
10511 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
10513 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
10515 * metadata-internals.h: Added mono_metadata_signature_dup_full.
10517 * class-internals.h: Update signatures to take a MonoMemPool.
10519 2008-06-02 Dick Porter <dick@ximian.com>
10521 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
10523 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
10524 FormatMessage API to get the error text. Fixes bug 321827.
10526 2008-06-02 Zoltan Varga <vargaz@gmail.com>
10528 * decimal.c: Add some micro optimizations to make decimal operations faster.
10530 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
10532 * reflection.c (method_encode_clauses): Take a mempool
10533 as parameter and use it to allocate the clause array.
10535 * reflection.c (mono_image_get_field_on_inst_token): Free
10536 the inflated type after encoding it.
10538 * reflection.c (mono_dynamic_image_free): Free each element
10539 of MonoDynamicImage::gen_params.
10541 * reflection.c (reflection_methodbuilder_to_mono_method):
10542 Allocate the generic param array from the mempool.
10543 Allocate signature params from the mempool.
10545 * reflection.c (mono_reflection_generic_class_initialize):
10546 Free inflated fields after been used.
10548 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
10550 * icall.c: Reapply the memory leak fixes as they no
10551 longer make mono crash.
10553 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
10555 * reflection.c (mono_type_get_object): Don't store the suplied
10556 MonoType with type_hash. A caller which pass a type that
10557 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
10558 might end with a pointer to freed memory.
10559 The solution is to use byval_arg or this_arg from the associated
10560 MonoClass of the supplied type.
10562 2008-05-29 Zoltan Varga <vargaz@gmail.com>
10564 * icall.c: Revert the rest of the last change as it breaks the build too.
10566 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
10568 * icall.c: Revert a leak fix as it's breaking the build.
10570 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
10572 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
10574 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
10576 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
10578 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
10580 * icall.c: Fix some memory leaks.
10582 2008-05-29 Dick Porter <dick@ximian.com>
10584 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
10585 async socket operations from the pending list when a socket
10586 closes. Leaving it until the threadpool services the event
10587 exposes a race condition when a socket descriptor is reused.
10590 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10592 * object.c: Fix negative index check for array alocation.
10594 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10596 * icall.c, marshal.c: Delegate wrappers should skip visibility.
10597 This check is performed by the verifier for IL created delegates
10598 and by Delegate::CreateDelegate for programatically created ones.
10601 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10603 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
10604 Fix code to use mono_array_size_t instead of int.
10606 Based on patch by Luis F. Ortiz.
10607 Contributed under X11 license.
10608 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10610 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10612 * icall.c: Added ves_icall_System_Array_GetLongLength and
10613 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
10616 * icall.h: Export both new functions.
10618 Based on patch by Luis F. Ortiz.
10619 Contributed under X11 license.
10620 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10622 2008-05-28 Martin Baulig <martin@ximian.com>
10624 The debugger now requires exactly r103463.
10626 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
10627 This version is not supported by the debugger, wait for 72.
10629 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10631 * object.h: Changed array related functions to use
10632 mono_array_size_t instead of guint32. Forgot to commit this file.
10634 Patch by Luis F. Ortiz.
10635 Contributed under X11 license.
10636 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10639 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10641 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
10642 don't define it. Use the number literal instead.
10644 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
10646 * icall.c: Changed array related functions to use
10647 mono_array_size_t instead of guint32.
10649 * icall.c (ves_icall_System_Array_GetLength): Check for length
10650 overflow under MONO_BIG_ARRAYS.
10652 Based on patch by Luis F. Ortiz.
10653 Contributed under X11 license.
10654 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10656 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
10658 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
10660 Based on patch by Luis F. Ortiz.
10661 Contributed under X11 license.
10662 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10664 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
10666 * object.c, object.h: Changed array related functions to use
10667 mono_array_size_t instead of guint32.
10669 Patch by Luis F. Ortiz.
10670 Contributed under X11 license.
10671 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10673 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
10675 * object.h: Introduced mono_array_size_t typedef. This must be used
10676 in all places an array length is expected. This is 64bits wide if
10677 MONO_BIG_ARRAYS is enabled.
10679 Patch by Luis F. Ortiz.
10680 Contributed under X11 license.
10681 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10683 2008-05-27 Zoltan Varga <vargaz@gmail.com>
10685 * security-manager.c class.c: Set the class exception info by calling
10686 mono_class_set_failure ().
10688 * class.c (mono_class_get_exception_data): New accessor function.
10689 (mono_class_set_failure): Store exception_data in the property hash.
10691 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
10692 the struct as a property.
10694 * loader.c (mono_get_method_full): Store the lookup result for method
10695 tokens in method_cache, the others in methodref_cache to decrease the memory
10696 usage of hash tables.
10698 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
10699 (mono_image_init): method_cache is lazy inited now.
10701 * metadata-internals.h (struct _MonoImage): Change method_cache to
10702 a MonoValueHashTable, add a separate methodref_cache.
10704 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
10706 * number-formatter.h: Fix tables to avoid arithemtic overflow in
10707 Double.ToString as exposed by Bug #383531.
10709 2008-05-26 Zoltan Varga <vargaz@gmail.com>
10711 * number-formatter.h: Make some tables static.
10713 * class.c (mono_method_set_generic_container): New accessor function.
10714 (mono_method_get_generic_container): Ditto.
10716 * class-internals.h (struct _MonoMethod): Remove rarely used
10717 'generic_container' field, store it in the property hash instead. Add
10718 'is_generic' boolean field instead.
10720 * image.c (mono_image_init): Initialize property_hash.
10721 (mono_image_close): Destroy property_hash.
10723 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
10724 hold rarely used fields of runtime structures belonging to this image.
10726 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
10727 to get/set method->generic_container.
10729 * loader.c (mono_get_method_from_token): Avoid loading the method header for
10732 2008-05-25 Zoltan Varga <vargaz@gmail.com>
10734 * class.c (mono_class_inflate_generic_method_full): Don't increase
10735 mono_stats.inflated_method_count for methods found in the cache.
10737 * threads.c (mono_thread_request_interruption): Add a comment about
10740 2008-05-24 Zoltan Varga <vargaz@gmail.com>
10742 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
10743 interface_offsets_packed table.
10745 * class.c (mono_class_init): Remove some dead code.
10747 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
10748 mono_class_setup_vtable () when CAS is active to detect security problems.
10750 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
10752 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
10754 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
10755 parameters as it's irrelevant for delegate checking.
10757 2008-05-23 Zoltan Varga <vargaz@gmail.com>
10759 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
10761 * class.c (mono_class_init): Control the creation of a generic vtable using
10762 a global which is true by default, but set to false by the runtime startup code.
10764 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
10765 Disabled for now since it breaks the embedding API.
10766 Move the setup of class->methods for arrays to mono_class_setup_methods ().
10767 (mono_class_setup_methods): Add a memory barrier.
10769 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
10770 when mono_class_init () doesn't compute the generic vtable.
10772 2008-05-23 Massimiliano Mantione <massi@ximian.com>
10773 * profiler.c: Added mono_profiler_install_statistical_call_chain,
10774 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
10775 to support call chains (backtrace) in the stat profiler.
10776 * profiler.c, profiler-private.h: Likewise.
10778 2008-05-22 Mark Probst <mark.probst@gmail.com>
10780 * generic-sharing.c: Init generic class when a method of it is
10781 requested via a runtime generic context.
10783 2008-05-22 Zoltan Varga <vargaz@gmail.com>
10785 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
10787 * reflection.c (mono_type_get_object): Add a FIXME.
10789 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
10791 * class.c (mono_class_get_method_by_index): New helper function, returning an
10792 entry in the class->methods array.
10794 2008-05-21 Zoltan Varga <vargaz@gmail.com>
10796 * class.c (mono_class_init): Only do the array optimization for szarrays.
10797 Avoid creating a generic vtable for generic instances as well.
10798 (mono_class_get_method_from_name_flags): Don't search in the metadata for
10801 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
10803 * loader.c (mono_get_method_constrained): Inflate the signature
10804 with class context. Fix #325283.
10806 2008-05-21 Zoltan Varga <vargaz@gmail.com>
10808 * object.c (mono_class_create_runtime_vtable): Add a comment.
10810 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
10812 (setup_interface_offsets): Handle the case when this is called twice for arrays.
10813 (mono_class_setup_vtable_general): Add an assert.
10814 (mono_class_init): Avoid creating a generic vtable for arrays.
10816 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
10817 here, let mono_class_init () do that.
10819 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
10820 interfaces in mscorlib.
10822 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
10823 interfaces. Add some comments.
10824 (mono_class_init): Call mono_class_setup_methods () here since it is no
10825 longer called by mono_class_setup_vtable ().
10827 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
10828 not set in class->vtable.
10829 (mono_class_create_runtime_vtable): Reenable the disabled code.
10831 * object.c (mono_class_create_runtime_vtable): Disable the last change for
10832 now as it causes some test failures.
10834 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
10835 if using the vtable trampoline. Also remove some strange code which put the
10836 generic methods themselves into the vtable slots. Remove the AOT init_vtable
10837 stuff as it is no longer needed.
10839 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
10841 * pedump.c: Give make --verify all option check code as well.
10842 Using --verify code won't check for metadata now.
10844 2008-05-19 Martin Baulig <martin@ximian.com>
10846 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
10849 (_mono_debug_using_mono_debugger): New global variable; it's set
10850 directly by the debugger, so mono_debug_using_mono_debugger() also
10851 works after attaching.
10853 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
10855 * object.c (mono_class_create_runtime_vtable): Use memory barriers
10856 as we do double checked locking on MonoClass::runtime_info and
10857 MonoClassRuntimeInfo::domain_vtables.
10859 2008-05-18 Zoltan Varga <vargaz@gmail.com>
10861 * debug-helpers.c (print_field_value): Fix a warning.
10863 2008-05-16 Zoltan Varga <vargaz@gmail.com>
10865 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
10866 set in the AOT case.
10868 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
10870 * class.c (mono_class_setup_vtable_general): Use memory barriers
10871 as we do double checked locking on MonoClass::vtable.
10873 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
10875 * reflection.c (resolve_object): Inflate only if the generic context
10876 is not null. Fixes #389886.
10878 2008-05-15 Jonathan Chambers <joncham@gmail.com>
10880 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
10883 Code is contributed under MIT/X11 license.
10885 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
10887 * class.c: Revert unrelated change.
10889 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
10891 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
10892 a generic instantiation, use mono_class_from_mono_type instead of playing
10893 with MonoType directly.
10895 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
10897 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
10898 checks must ignore generic instantiations, so mono_class_has_parent is not
10899 suitable. Fixes #390128.
10901 2008-05-14 Zoltan Varga <vargaz@gmail.com>
10903 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
10904 it to avoid registering tokens during metadata generation. Fixes #390023.
10906 2008-05-14 Kornél Pál <kornelpal@gmail.com>
10908 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
10911 Contributed under MIT/X11 license.
10913 2008-05-14 Kornél Pál <kornelpal@gmail.com>
10915 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
10916 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
10917 to fixup the EXE image.
10918 (mono_cleanup): Use mono_close_exe_image.
10919 (mono_close_exe_image): New function.
10920 * image.c: Include "marshal.h".
10921 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
10922 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
10923 counting when the image is loaded outside of mono_image_open_full. Set status
10924 based on GetLastError.
10925 * coree.c: Include required headers. Add init_from_coree.
10926 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
10927 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
10928 (_CorExeMain): Set init_from_coree.
10929 (CorExitProcess): Only call ExitProcess for now.
10930 (CorBindToRuntimeEx): New stub implementation.
10931 (CorBindToRuntime): New function.
10932 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
10933 (MonoFixupExe): ILONLY executables require no fixups.
10934 (mono_set_act_ctx): New function to set activation context.
10935 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
10936 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
10937 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
10938 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
10940 * domain-internals.h: Add mono_close_exe_image.
10942 Contributed under MIT/X11 license.
10944 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
10946 * metadata.c (mono_metadata_compute_size): Correctly calculate field
10947 size for generic param and event tables. Fixes #388977.
10949 2008-05-13 Zoltan Varga <vargaz@gmail.com>
10951 * loader.c (mono_method_signature): Use memory barriers because of the double
10952 checked locking pattern.
10954 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
10955 aborting or aborted as well. Fixes #376391.
10957 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
10958 existing runtime state in the Suspend handler during shutdown.
10960 2008-05-12 Zoltan Varga <vargaz@gmail.com>
10962 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
10964 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
10965 which are starting up or shutting down.
10967 * threads.c (mono_threads_set_shutting_down): Don't return a value since
10968 this function never returns if the runtime is already shutting down.
10970 * icall.c (ves_icall_System_Environment_Exit): Update after
10971 mono_threads_set_shutting_down () signature change.
10973 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
10975 * class.c: Added can_access_instantiation to verify if the instantiation
10976 is visible. Fix access check for nested types as they returned TRUE
10977 before doing type and generic instantiation visibility checks.
10979 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
10981 * reflection.c (mono_reflection_create_generic_class): The created type
10982 must have a different container from its TypeBuilder. Otherwise they
10983 will end sharing generic arguments, which is wrong.
10985 Due to the sharing, making a generic instance of the created type using
10986 the TypeBuider generic arguments resulted in the generic type definition
10987 been returned, which is wrong as well.
10989 As a bonus the code was leaking the type_params array. This memory should
10990 be allocated from the image mempool.
10992 This fixes bug #354047.
10994 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
10996 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
10997 to here as they are now used in assembly.c new code.
10998 Added a skipverification flag to MonoAssembly.
10999 New internal function mono_assembly_has_skip_verification.
11001 * assembly.c: New function mono_assembly_has_skip_verification. It checks
11002 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
11005 2008-05-07 Zoltan Varga <vargaz@gmail.com>
11007 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
11008 needed. Fixes #387034.
11010 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
11012 2008-05-06 Miguel de Icaza <miguel@novell.com>
11014 * assembly.c (mono_assembly_load_reference): Prevent crash while
11015 disassembling Silverlight 2.0 executables while we still do not
11016 have GACed libraries.
11018 2008-05-07 Zoltan Varga <vargaz@gmail.com>
11020 * reflection.c: Special case generic type definitions as well. Fixes #383444.
11022 2008-05-06 Zoltan Varga <vargaz@gmail.com>
11024 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
11025 of the dynamic case. Fixes #387404.
11027 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
11029 *verify.c (mono_verifier_is_class_full_trust): If under
11030 verify_all and the verifier mode was not set, only
11031 gac and corlib types are fulltrust. This makes --verify-all
11032 usable to detect unverifiable code, which is the expected
11035 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
11037 * verify.h: Ops, commited the header with debug
11040 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
11042 * verify.c (merge_stack): Use the new value on unverifiable
11045 * verify.c (verify_type_compatibility_full): Comparison
11046 of nullable types can't use mono_class_is_assignable_from.
11048 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
11049 that makes all verification errors be reported.
11051 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
11052 mono_method_verify.
11054 2008-05-05 Robert Jordan <robertj@gmx.net>
11056 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
11057 support for value types. See #386415.
11059 * object.c: comments.
11061 Code is contributed under MIT/X11 license.
11063 2008-05-05 Martin Baulig <martin@ximian.com>
11065 * debug-mono-symfile.h
11066 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
11067 for old pre-terrania symbol files.
11069 2008-05-05 Andreas Färber <andreas.faerber@web.de>
11071 * mono-config.c: Add ppc64 architecture.
11073 Code is contributed under MIT/X11 license.
11075 2008-05-05 Andreas Färber <andreas.faerber@web.de>
11077 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
11078 PPC64 uses function descriptors as well.
11080 Code is contributed under MIT/X11 license.
11082 2008-05-04 Zoltan Varga <vargaz@gmail.com>
11084 * object.c (compute_class_bitmap): Ignore literal static fields.
11086 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
11087 var has an invalid format.
11088 (describe_ptr): Add some sanity checks for the vtable.
11089 (add_nursery_frag): Clear unused nursery fragments.
11090 (major_collection): Clear all remaining nursery fragments.
11092 2008-05-03 Robert Jordan <robertj@gmx.net>
11094 * image.c, metadata-internals.h: add thunk_invoke_cache.
11096 * marshal.c, marshal.h: implement
11097 mono_marshal_get_thunk_invoke_wrapper ().
11099 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
11101 Code is contributed under MIT/X11 license.
11103 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
11105 * verify.c (do_leave): Empty the stack.
11107 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
11109 * class.c (mono_class_is_assignable_from): Variance
11110 doesn't work between reference and value types. For example,
11111 given type C<T+>, C<int32> is not assignable to C<object>.
11112 Break the argument checking loop on first error.
11114 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
11116 * icall.c : base64_to_byte_array() needs some more strict
11117 check for sequence of '=' characters. Patch by Santa
11118 Marta (http://deee.g.hatena.ne.jp/santamarta).
11120 Contributed under MIT/X11 license.
11121 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
11123 2008-05-02 Jonathan Chambers <joncham@gmail.com>
11125 * domain.c: Disable LoadLibrary support to fix Win32 build.
11127 Code is contributed under MIT/X11 license.
11129 2008-05-02 Zoltan Varga <vargaz@gmail.com>
11131 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
11132 to help with cache behaviour.
11134 2008-05-01 Miguel de Icaza <miguel@novell.com>
11136 * appdomain.c (mono_domain_from_appdomain): Add new accessor
11139 2008-05-01 Zoltan Varga <vargaz@gmail.com>
11141 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
11143 2008-05-01 Dick Porter <dick@ximian.com>
11145 * process.c (process_get_fileversion): Only pass 16 bits of
11146 language ID to VerLanguageName. Fixes bug 381204.
11148 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
11150 * verify.c (mono_method_verify): Fix the comparison
11151 operator for code bounds check.
11153 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
11155 * verify.c (mono_method_verify): Check the bounds of
11156 all access of the code array.
11158 2008-04-29 Kornél Pál <kornelpal@gmail.com>
11160 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
11162 2008-04-28 Zoltan Varga <vargaz@gmail.com>
11164 * image.c (mono_image_strong_name_position): Fix return value when the rva is
11167 2008-04-28 Kornél Pál <kornelpal@gmail.com>
11169 * loader.c (mono_get_method_from_token, mono_method_signature): Add
11170 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
11171 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
11172 fixup main EXE images when using mono.exe for mixed-mode assembly support.
11173 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
11175 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
11176 runtime initialization from metadata.
11177 * assembly.c: Remove obsolete ceGetModuleFileNameA.
11178 (mono_set_rootdir): Use mono_get_module_file_name.
11179 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
11181 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
11182 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
11183 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
11184 MonoCLIImageInfo. Add support for module handles.
11185 (load_cli_header): Update mono_cli_rva_image_map signature.
11186 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
11187 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
11188 (mono_image_rva_map): Add support for module handles.
11189 (mono_image_ensure_section_idx): Add support for module handles.
11190 (mono_image_close): Add support for module handles.
11191 (do_load_header): Add support for module handles.
11192 (mono_image_open_from_module_handle): New function for internal use.
11193 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
11194 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
11195 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
11197 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
11198 * image.h: Add mono_image_fixup_vtable.
11199 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
11201 * coree.h: New file.
11202 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
11203 unsupported native code.
11204 (mono_marshal_set_callconv_from_modopt): New function splitted from
11205 mono_marshal_get_managed_wrapper.
11206 (mono_marshal_get_managed_wrapper): Use
11207 mono_marshal_set_callconv_from_modopt.
11208 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
11209 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
11210 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
11211 that results in a deadlock when the runtime is loaded in _CorDllMain.
11212 * Makefile.am: Add coree.c and coree.h.
11214 Contributed under MIT/X11 license.
11216 2008-04-28 Mark Probst <mark.probst@gmail.com>
11218 * generic-sharing.c: Search for type arguments in array element
11221 2008-04-28 Mark Probst <mark.probst@gmail.com>
11223 * class-internals.h, generic-sharing.c: New, small runtime generic context.
11225 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
11227 * object.c: Don't setup the RGCTX when the vtable is created,
11228 because we're setting it up lazily now.
11230 2008-04-26 Zoltan Varga <vargaz@gmail.com>
11232 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
11235 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
11237 * verify.c (verify_class_for_overlapping_reference_fields):
11238 If class is under fulltrust allow reference types to overllap
11239 if they have the same RVA.
11241 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
11243 * pedump.c: Added new flag valid-only, that makes the verifier
11244 behaves just like --security=validil. It won't fail type load
11245 due to unverifiable restrictions.
11247 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
11249 * class-internals.h (struct MonoMethod): Added a verification_success
11250 field to cache verifier executions. Reduced MonoMethod:slot size by
11253 2008-04-23 Zoltan Varga <vargaz@gmail.com>
11255 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
11256 instead of a 'vt' argument to save an indirection and to allow these to be used
11258 (scan_vtype): New helper function to scan an area using a gc descriptor.
11259 (mono_gc_wbarrier_value_copy): Implement this.
11260 (handle_remset): Add support for REMSET_VTYPE.
11261 (find_in_remset_loc): Ditto.
11262 (mono_gc_base_init): Allow some debugging options to be controlled through the
11263 use of the MONO_GC_DEBUG env variable.
11264 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
11265 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
11267 2008-04-23 Martin Baulig <martin@ximian.com>
11269 * domain.c (mono_domain_create): Move the call to
11270 mono_debug_domain_create() down, after allocating the domain id.
11272 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
11274 verify.c (verify_class_for_overlapping_reference_fields): Skip
11275 static fields while verifying for overlapping fields as they
11276 don't matter at all.
11278 2008-04-23 Marek Habersack <mhabersack@novell.com>
11280 * domain-internals.h: added a declaration of
11281 mono_make_shadow_copy.
11283 * assembly.c (mono_assembly_open_full): shadow copying of
11284 assemblies moved to here, so that all the assemblies within the
11285 application domain's private binary directories can be
11286 processed. Fixes bug #380546
11288 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
11289 mono_make_shadow_copy and made non-static. The decision whether
11290 to shadow-copy an assembly is made based on its location - it's
11291 copied if it's in one of the private application domain binary
11292 directories and its different to the target file in the shadow
11293 directory. Fixes bug #380546
11295 2008-04-22 Zoltan Varga <vargaz@gmail.com>
11297 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
11299 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
11302 * reflection.c (mono_image_create_token): Handle
11303 Method/ConstructorOnTypeBuilderInst.
11304 (resolve_object): Ditto.
11305 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
11306 so it can be called from resolve_object. Also handle the case when the inflated
11307 class already has its methods setup.
11309 2008-04-21 Martin Baulig <martin@ximian.com>
11311 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
11313 2008-04-20 Geoff Norton <gnorton@novell.com>
11315 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
11316 pointer dereference.
11318 2008-04-15 Marek Habersack <mhabersack@novell.com>
11320 * appdomain.c (try_load_from): if IOMAP is in effect, call the
11321 portability API to look up the assembly file. Fixes behavior in
11322 situations when the application has a bin/ directory, but the
11323 assembly search patch refers to Bin/ (and thus the requested file
11324 name is Bin/SomeLibrary.dll). Fixes bug #379888
11326 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
11328 verify.c (mono_type_is_generic_argument): Extracted this check
11329 from a dozen places to here.
11331 verify.c: Fixed all issues related to boxing generic arguments
11332 and their constraints.
11334 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
11336 verify.c (mono_class_interface_implements_interface): Fix win32 build.
11338 2008-04-14 Zoltan Varga <vargaz@gmail.com>
11340 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
11341 isn't finished yet. Fixes #363447.
11343 2008-04-13 Zoltan Varga <vargaz@gmail.com>
11345 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
11348 2008-04-13 Jb Evain <jbevain@novell.com>
11350 * domain.c: update the 2.1 profile versions.
11351 Merged from the Moonlight 2 branch.
11353 2008-04-12 Zoltan Varga <vargaz@gmail.com>
11355 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
11356 mscorlibs for the non-refonly case as well.
11358 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
11359 in mono_assembly_load_from_full (). Fixes #378924.
11361 2008-04-11 Geoff Norton <gnorton@novell.com>
11363 * icall.c: The global extern environ doesn't exist on Mac. We
11364 need to call NSGetEnviron instead.
11366 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11368 verify.c: Add generic method constraint verification.
11370 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11372 class.c (mono_class_inflate_generic_method_full): Add a long
11373 explanation to the is_mb_open hack. Remove the FIXME.
11375 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11377 * verify.c (mono_method_verify): Mark all unknown opcodes
11378 as invalid. Mark jmp as unverifiable.
11380 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11382 * verify.c: Add code to do type constraint verification on class instances.
11384 * verify.c (mono_verifier_verify_class): Use the type constraint
11387 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11389 * class.c (mono_class_get_field_default_value): Don't pass cindex
11390 as hint to mono_metadata_get_constant_index. The local is not initialized
11391 and should contain garbage most of the time. This could only work
11392 with a lot of luck.
11394 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
11396 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
11398 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
11400 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
11402 * class.c (mono_class_from_generic_parameter): Save the token of the
11403 generic param in MonoClass::sizes.generic_param_token.
11405 * reflection.c (mono_custom_attrs_from_class): If the class type is
11406 VAR or MVAR retrieve the attributes of the generic param.
11408 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
11410 * class.c (mono_class_init): Do class verification if the verifier
11413 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
11415 * verify-internal.h: Added mono_verifier_verify_class.
11417 * verify.c: Added mono_verifier_verify_class. It checks for
11418 classes with explicit layout that have overlapping reference fields.
11420 * pedump.c: Init the verifier state prior to verification. Fixed
11421 command line arguments.
11423 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
11425 * Makefile.am: Added verify-internals.h, hopefully fix the build.
11427 2008-04-08 Zoltan Varga <vargaz@gmail.com>
11429 * verify-internals.h: Fix a warning.
11431 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
11433 * verify-internals.h: New header with the verifier configuration
11434 extracted from mini.c.
11436 * verify.c: Implemented the new functions exported by verify-internals.h.
11438 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
11440 * verify.c: Add proper verification of ckfinite.
11442 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
11444 * verify.c (do_conversion): Improved error message to something
11447 * verify.c (check_is_valid_type_for_field_ops): Fix to work
11448 with primitive types.
11450 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
11452 * verify.c: Added tail prefix checking. Marked icall
11455 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
11457 * verify.c: Fix the detection of branches to the middle
11460 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
11462 * verify.c: Implemented verification of volatile. and
11463 unaligned. prefix. Check if a type is valid after retrieving it.
11465 2008-04-01 Dick Porter <dick@ximian.com>
11467 * process.c (process_get_fileversion): If there's no string block,
11468 set the file language to en_US. Fixes the other new part of bug
11471 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
11473 * class.c: New functions mono_method_can_access_field_full and
11474 mono_method_can_access_method_full. They perform type visibility
11475 and type site check.
11477 * class-internal.h: Added exported functions.
11479 * verify.c: Use new functions to implement proper visibility checks.
11481 2008-03-29 Zoltan Varga <vargaz@gmail.com>
11483 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
11485 2008-03-28 Dick Porter <dick@ximian.com>
11487 * process.c (process_get_fileversion): Use the first language ID
11488 we see, rather than insisting on an invariant language. Fixes bug
11491 2008-03-28 Zoltan Varga <vargaz@gmail.com>
11493 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
11494 the streams to fix reading of invalid memory later.
11496 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
11499 2008-03-26 Zoltan Varga <vargaz@gmail.com>
11501 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
11502 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
11504 2008-03-26 Massimiliano Mantione <massi@ximian.com>
11505 * threads.h: Added MonoThreadManageCallback type and
11506 mono_thread_set_manage_callback prototype
11507 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
11508 (used to store the mono_thread_manage callback).
11509 * threads.c: Added mono_thread_set_manage_callback, and handle
11510 "MonoThread->manage_callback" in build_wait_tids.
11512 2008-03-26 Dick Porter <dick@ximian.com>
11514 * process.c (process_get_fileversion): Set FileVersionInfo strings
11515 to Empty when the resource doesn't have the particular info.
11518 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
11520 * verify.c (mono_method_verify): Proper prefix validation.
11522 2008-03-25 Zoltan Varga <vargaz@gmail.com>
11524 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
11525 itself in a separate argument instead of throwing them. Fixes #373448.
11527 * appdomain.c: Bump corlib version.
11529 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
11531 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
11533 2008-03-20 Kornél Pál <kornelpal@gmail.com>
11535 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
11538 2008-03-20 Mark Probst <mark.probst@gmail.com>
11540 * generic-sharing.c, class-internals.h: Code for putting
11541 reflection types into the runtime generic context.
11543 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
11545 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
11549 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
11551 * verify.c (VerifyContext): Added instruction prefix data to the struct.
11553 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
11555 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
11557 * verify.c (do_cast): Let the result value keep the boxed status.
11559 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
11561 2008-03-17 Jb Evain <jbevain@novell.com>
11563 * reflection.c: when running on a 2.0 runtime, emit
11564 unconditionally the #~ header version as 2.0, and the
11565 CLI header version as 2.5, for symmetry's sake with csc.
11567 2008-03-16 Zoltan Varga <vargaz@gmail.com>
11569 * class.c: Remove the unused cache_interface_offsets stuff.
11571 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
11572 profiler.c: Fix warnings.
11574 2008-03-16 Mark Probst <mark.probst@gmail.com>
11576 * generic-sharing.c, class-internals.h: Support for putting
11577 methods into the runtime generic context.
11579 2008-03-16 Zoltan Varga <vargaz@gmail.com>
11581 * class.c (mono_class_setup_fields): Ignore calls made to this function for
11582 classes which are generic instances of not-yet finished typebuilders. Fixes
11585 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
11587 2008-03-15 Zoltan Varga <vargaz@gmail.com>
11589 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
11591 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
11592 field, replace it with a hash table in MonoDynamicImage.
11594 * reflection.c (inflate_mono_method): Access the generic definition object from
11595 image->generic_def_objects instead of imethod->reflection_info.
11597 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
11599 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
11601 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
11602 function in reflection.c so it is easier to keep in sync with the dynamic image
11605 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
11606 mono_image_close ().
11608 2008-03-15 Mark Probst <mark.probst@gmail.com>
11610 * class.c (mono_class_generic_sharing_enabled): Disable generic
11611 sharing for all architectures except AMD64 and x86 to fix build.
11613 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
11615 * verify.c: Use the generic definition MonoGenericContext when available.
11616 Remove code for checking generics instance compatibility in favor of
11617 mono_class_is_assignable_from.
11619 2008-03-14 Mark Probst <mark.probst@gmail.com>
11621 * marshal.c, marshal.h, metadata-internals.h, image.c,
11622 wrapper-types.h: New wrapper for invoking a shared static method
11623 without having to pass the runtime generic context argument.
11625 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
11627 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
11629 2008-03-14 Zoltan Varga <vargaz@gmail.com>
11631 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
11633 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
11634 create a token from a FieldOnTypeBuilderInst.
11635 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
11636 (resolve_object): Ditto.
11638 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
11639 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
11641 2008-03-14 Martin Baulig <martin@ximian.com>
11643 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
11645 * debug-mono-symfile.h
11646 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
11647 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
11649 2008-03-10 Martin Baulig <martin@ximian.com>
11651 * debug-mono-symfile.h
11652 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
11653 `lexical_block_table_offset'.
11654 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
11656 (MonoSymbolFile): Added `version'.
11659 (MonoDebugLexicalBlockEntry): Removed.
11660 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
11663 * mono-debug.c (mono_debug_add_method): Don't compute lexical
11664 blocks here; the debugger now does this internally.
11666 2008-02-27 Martin Baulig <martin@ximian.com>
11668 * object.c (mono_runtime_exec_main): Call
11669 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
11670 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
11672 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
11674 * verify.c (verify_type_compatibility_full): Allow native int to be converted
11675 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
11677 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
11679 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
11680 ldftn with a virtual method.
11682 2008-03-13 Geoff Norton <gnorton@novell.com>
11684 * decimal.c: Only include memory.h if the platform has it.
11686 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
11688 * assembly.c, class.c, metadata-internals.h: make sure public key
11689 tokesns are compared in a case-insensitive way. Also, all
11690 the lookups in the GAC use a lowercase public key token
11691 (gaacutil already does the lowercasing on install). Fixes
11694 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
11696 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
11699 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
11701 * image.c: when someone loads a mscorlib from a file, return the
11702 currently loaded mscorlib (fixes bug #369253).
11704 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
11706 * class.c: handle types with no parents by forcing them to have
11707 System.Object as a parent and marking them as broken (this currently
11708 allows the first part of bug #369173 to work as well, likely because
11709 we don't check for typeload exceptions everywhere yet).
11711 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
11713 * class.c: more complete check that types belong to corlib
11714 (fixes second part of bug #369173).
11716 2007-03-10 Bill Holmes <billholmes54@gmail.com>
11718 * generic-sharing.c: Including glib.h for the MSVC builds to define
11719 "inline" to "__inline" before including mono-membar.h.
11721 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
11722 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
11725 Contributed under MIT/X11 license.
11727 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
11729 * verify.c (do_invoke_method): Remove return type validation.
11731 * verify.c (do_ret): Do return type validation at return site instead of
11734 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
11736 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
11738 * verify.c: Some todos cleaned and improved a few error messages.
11740 2008-03-08 Zoltan Varga <vargaz@gmail.com>
11742 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
11744 2008-03-07 Zoltan Varga <vargaz@gmail.com>
11746 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
11747 system types correctly.
11749 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
11752 2008-03-06 Zoltan Varga <vargaz@gmail.com>
11754 * assembly.c (build_assembly_name): Fix a warning.
11756 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
11758 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
11759 the called function takes an object type argument. Fixes storing or
11760 valuetypes across remoting as well as reducing memory usage.
11761 * image.c, metadata-internals.h: remove now unused ldfld_remote and
11762 stfld_remote wrapper caches.
11764 2008-03-06 Zoltan Varga <vargaz@gmail.com>
11766 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
11769 * reflection.c (mono_image_register_token): New helper function to save
11770 a token->object mapping.
11772 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
11775 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
11776 one dimension arrays. Fixes #367670.
11777 (mono_reflection_get_type_internal): Ditto.
11779 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
11781 * marshal.c: mono_load_remote_field_new() always returns object.
11782 so use the proper signature (fixes bug #366445).
11784 2008-03-04 Zoltan Varga <vargaz@gmail.com>
11786 * class-internals.h (MonoMethod): Remove unused uses_this flag,
11787 add an 'inline_failure' flag instead.
11789 2008-03-04 Mark Probst <mark.probst@gmail.com>
11791 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
11792 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
11793 contains the location of "this", used for exception handling.
11795 2008-03-04 Zoltan Varga <vargaz@gmail.com>
11797 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
11798 their size on all platforms for perf reasons.
11800 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11802 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
11805 * object-internal.h: Same.
11807 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11809 * reflection.h: Fix the build I just broke.
11811 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11813 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
11814 Test if a token is valid, this remove explicit usage of
11815 MonoDynamicImage::tokens from the verifier code.
11817 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
11819 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
11820 instead of direct access to MonoDynamicImage::tokens.
11822 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11824 * verify.c (token_bounds_check): Fix the build I just broke.
11826 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11828 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
11830 * verify.c (verifier_load_method): Fixed the errors message.
11832 * verify.c (mono_method_verify): Fixed a debug message.
11834 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
11836 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
11837 mono-perfcounters.h, class-internals.h: support for predefined
11838 writable counters, query of categories and counters, bugfixes.
11840 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
11842 * verify.c (do_refanytype): Verify the refanytype opcode.
11844 * verify.c (mono_method_verify): Use do_refanytype.
11846 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
11848 * verify.c (do_mkrefany): Verify the mkrefany opcode.
11850 * verify.c (mono_method_verify): Use do_mkrefany.
11852 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
11854 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
11855 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
11858 2008-02-27 Zoltan Varga <vargaz@gmail.com>
11860 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
11861 the type load exception.
11863 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
11865 * verify.c: Added a few FIXME for method signatures
11867 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
11868 of mono_method_get_signature and get vararg call working. Removed unused
11869 checks for return value.
11871 * verify.c (do_refanyval): Verify the refanyval opcode.
11873 * verify.c (mono_method_verify): Implemented verification of arglist and
11876 2008-02-27 Zoltan Varga <vargaz@gmail.com>
11878 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
11879 vtypes to marshal.c.
11881 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
11882 it works for AOT as well.
11884 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
11886 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
11887 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
11888 the system time is adjusted.
11890 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
11892 * icall.c, icall-def.h: use the new time functions (fixes the
11893 non-monotonic behaviour of TickCount).
11895 2008-02-26 Zoltan Varga <vargaz@gmail.com>
11897 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
11898 it breaks the build.
11900 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
11901 cattr is not finished yet.
11903 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
11905 * verify.c: Proper token validation for field, method and type.
11907 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
11909 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
11911 * loader.c (method_from_memberref): Generate type load error instead of method missing
11912 if the type is not found.
11914 2008-02-23 Zoltan Varga <vargaz@gmail.com>
11916 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
11917 some of the conversions caused the generation of a marshal directive exception.
11919 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
11921 verify.c: Report which exception should be thrown by the JIT.
11922 Added a lot of FIXME notes.
11924 2008-02-22 Mark Probst <mark.probst@gmail.com>
11926 * generic-sharing.c: Runtime generic context slots are not
11927 instantiated on init anymore. Instead, provide function to do the
11928 instantiating on demand.
11930 * class-internals.h: Added vtable to runtime generic context.
11931 Macros for encoding direct and indirect slot offsets in one
11934 2008-02-21 Mark Probst <mark.probst@gmail.com>
11936 * object.c, generic-sharing.c: Moved some generic sharing code
11937 from object.c to generic-sharing.c.
11939 * generic-sharing.c: Added support for extensible runtime generic
11942 * metadata-internals.h: Two new hash tables in MonoImage for
11943 extensible runtime generic context support.
11945 * domain.c: Unregister generic vtables upon domain unloading.
11947 * image.c: Destroy new hash tables upon image unloading.
11949 * metadata.c: Unregister generic subclasses upon image unloading.
11951 * class-internals.h: New data structure for runtime generic
11952 context template. New fields in the runtime generic context for
11955 * Makefile.am: Added generic-sharing.c.
11957 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
11959 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
11960 there is a pending loader exception, raise it.
11962 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
11965 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
11970 2008-02-20 Zoltan Varga <vargaz@gmail.com>
11972 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
11974 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
11976 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
11977 ref-only requests for compatibility with MS.
11979 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
11981 * reflection.c (mono_custom_attrs_from_method): Don't silently
11982 return an empty list for generic method instances.
11983 (mono_custom_attrs_from_param): Likewise.
11985 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
11986 Raja R Harinath <harinath@hurrynot.org>
11989 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
11990 * class.c (mono_class_inflate_generic_method_full): Initialize it
11991 when a fully-open method is instantiated.
11992 * metadata.c (inflated_method_equal, inflated_method_hash): Update
11994 * reflection.c (inflate_mono_method): Don't create a temporary context.
11996 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
11998 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
11999 Compute correct value, to prepare for imethod->reflection_info going away.
12001 2008-02-19 Zoltan Varga <vargaz@gmail.com>
12003 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
12005 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
12007 * verify.c: Implement skip visibility flag.
12009 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
12011 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
12012 which contains an extra field to tell the kind of exception that should be thrown.
12014 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
12016 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
12018 * loader.c (mono_method_get_param_names): Initialize 'klass' after
12019 'method' is updated.
12021 2008-02-11 Zoltan Varga <vargaz@gmail.com>
12023 * class.c (mono_class_layout_fields): Set class->min_align for classes using
12024 explicit layout as well. Fixes #360375.
12026 2008-02-11 Geoff Norton <gnorton@novell.com>
12028 * loader.c: Guard and dereference against inflated generic methods
12030 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
12032 * class.c: Include Retargetable spec in assembly name.
12033 * assembly.c: Always include PublicKeyToken spec in assembly name
12034 (with value "null" if assembly is not signed), and include
12036 * icall-def.h: Added icall for Assembly.get_fullname.
12037 * icall.c: Added icall returning the fullname of an assembly.
12039 2008-02-09 Zoltan Varga <vargaz@gmail.com>
12041 * class.c (mono_class_setup_vtable_general): Add a missing call to
12042 mono_class_setup_methods () which is needed in the AOT case.
12044 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
12046 * verify.c (mono_type_get_stack_name): Added. Return the name for the
12047 stack type of the given MonoType.
12049 * verify.c (verify_type_compatibility_full): Handle the void type.
12051 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
12052 way stack merging works.
12054 * verify.c (store_local): Improved verification message.
12056 * verify.c (do_branch_op): If the merging is invalid, the method
12057 is unverifiable and not invalid. Improved error message.
12059 * verify.c (merge_stacks): Properly merge a boxed valuetype and
12060 a reference type diferent than System.Object. Improved error
12063 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
12065 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
12067 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
12068 type of an enum even if the argument is byref.
12070 * verify.c: Replace all explicit uses of enumtype and enum_basetype
12071 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
12073 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
12075 *verify.c (verify_type_compatibility_full): Make enum types
12076 compatible with their base types.
12078 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
12079 types are compatible for the special case of a boxed valuetype and
12082 * verify.c (verify_stack_type_compatibility): The function
12083 is_compatible_boxed_valuetype was extracted from here.
12085 * verify.c (push_arg): Only set ctx->has_this_store if the method
12088 * verify.c (do_ldelem): Fixed a typo in an error message and added
12089 strict check for mixing int32 and native int as the array type
12092 * verify.c (merge_stacks): Consider boxed valuetypes in the
12093 compatibility checks.
12095 2008-02-07 Massimiliano Mantione <massi@ximian.com>
12096 * profiler.h: (MonoGCEvent): Added start-stop the world events.
12098 2008-02-06 Massimiliano Mantione <massi@ximian.com>
12099 *class.c: use_new_interface_vtable_code: renamed the env var to have
12100 a "MONO_" prefix, and fix the logic to enable it by default.
12102 2008-02-06 Massimiliano Mantione <massi@ximian.com>
12104 mono_class_setup_vtable_general: rewrote the way in which interface
12105 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
12106 makes the code more maintainable.
12107 For now the old code is still there, and can be activated setting
12108 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
12110 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
12112 * verify.c: guarded some debug functions around and #ifdef.
12114 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
12116 2008-02-06 Zoltan Varga <vargaz@gmail.com>
12118 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
12119 changes for now since they seem to break too many things.
12121 2008-02-05 Mark Probst <mark.probst@gmail.com>
12123 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
12124 mono_marshal_find_nonzero_bit_offset): Added macro and function
12125 for finding the byte- and bit-offset of a bitfield within a
12128 2008-02-05 Zoltan Varga <vargaz@gmail.com>
12130 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
12131 (mono_marshal_get_struct_to_ptr): Ditto.
12133 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
12136 2008-02-03 Zoltan Varga <vargaz@gmail.com>
12138 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
12139 between methods for non-corlib types.
12141 2008-02-02 Geoff Norton <gnorton@novell.com>
12143 * loader.c (mono_method_get_param_names): Populate the parameter name for
12144 generic parameters as well. (Fixes #342536)
12146 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
12148 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
12150 * verify.c (do_invoke_method): Fix for calling with byref structs.
12152 * verify.c (do_cast): push a boxed value type based on the type token and not
12155 2008-01-31 William Holmes <billholmes54@gmail.com>
12157 * process.c (process_module_string_read): Check the size returned form
12158 VerQueryValue to avoid out of memory exception.
12160 2008-01-30 Zoltan Varga <vargaz@gmail.com>
12162 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12163 Handle properly modules which are not in the moduleref table. Fixes
12166 2008-01-29 Zoltan Varga <vargaz@gmail.com>
12168 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
12169 the dynamic case which is now in managed code.
12170 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
12172 * marshal.c (mono_string_to_bstr): Fix a warning.
12173 (init_com_provider_ms): Ditto.
12175 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
12177 * exception.c (mono_get_exception_out_of_memory): New helper function.
12179 2008-01-28 Jonathan Chambers <joncham@gmail.com>
12181 * marshal.c: Add support for BSTR marshalling
12182 using other COM systems.
12184 Code is contributed under MIT/X11 license.
12186 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
12188 * object.c (mono_runtime_invoke_array): reverted previous
12189 commit as it breaks the build.
12191 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
12193 * object.c (mono_runtime_invoke_array): Verify arguments for
12194 invalid types. Fixes #348522.
12196 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
12198 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
12199 non-final virtual calls using call.
12201 * verify.c (do_invoke): fixed some TODOs.
12203 * verify.c (push_arg): set has_this_store for "ldarga 0".
12205 2008-01-27 Zoltan Varga <vargaz@gmail.com>
12207 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
12208 which belong to an inflated class. Fixes #356531.
12210 2008-01-26 Robert Jordan <robertj@gmx.net>
12212 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
12213 which resort to FindFirstFile when a certain error condition
12214 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
12215 Code is contributed under MIT/X11 license.
12217 2008-01-24 Jonathan Chambers <joncham@gmail.com>
12219 * marshal.c (emit_marshal_string): Fix out string marshalling
12220 to use specified encoding. Fixes #323900.
12222 Code is contributed under MIT/X11 license.
12224 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
12226 * class.c (mono_class_inflate_generic_method_full): Don't modify
12227 iresult->context after cache check.
12229 2008-01-23 Zoltan Varga <vargaz@gmail.com>
12231 * class.c (mono_class_inflate_generic_method_full): Change the
12232 struct assignments to memcpy for better visibility and add some comments.
12234 2008-01-23 Dick Porter <dick@ximian.com>
12236 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
12237 procedure, and make it work on windows.
12239 2008-01-22 Zoltan Varga <vargaz@gmail.com>
12241 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
12242 a MonoReflectionTypeBuilder since it is always of that type.
12244 * reflection.c (mono_type_get_object): Remove an unneccesary check.
12246 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
12248 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
12250 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
12252 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
12254 * reflection.c (mono_reflection_create_runtime_class): Remove already created
12255 instantiations from the type cache.
12257 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
12259 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
12261 * verify.c (do_unbox_value): push a controled mutability managed pointer.
12263 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
12265 * verify.c (do_ldstr): added, verifies if the #US token is valid.
12267 * verify.c (mono_method_verify): removed old TODO
12269 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
12271 * verify.c (do_newobj): add visibility check.
12273 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
12275 * verify.c (do_load_function_ptr): add visibility check.
12277 2008-01-21 Massimiliano Mantione <massi@ximian.com>
12279 mono_generic_class_get_class: hook profiler events.
12280 mono_field_get_offset: added to support heap-shot in the new profiler.
12281 *class.h: exported mono_field_get_offset.
12283 mono_reflection_setup_internal_class: hook profiler events.
12285 2008-01-20 Zoltan Varga <vargaz@gmail.com>
12287 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
12288 argument here too and use it to avoid checking for pending exceptions if
12291 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
12293 * assembly.c (build_assembly_name): add arg for passing the assembly
12294 flags. Do not consider a PublicKey with value "null" valid.
12295 (mono_assembly_name_parse_full): added boolean argument that will be
12296 set if the assembly name contains a PublicKeyToken spec. Added support
12297 for the Retargetable spec for which only Yes or No are allowed as valid
12298 value. Consider assembly name invalid if Retargetable spec is set, but
12299 either version, culture or public key (token) are not specified.
12300 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
12301 with implementation in assembly.c.
12302 * icall.c (fill_reflection_assembly_name): also copy assembly flags
12303 from MonoAssemblyName.
12304 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
12305 introduced argument for mono_assembly_name_parse_full to know if the
12306 assembly name has a PublicKeyToken spec, and if it has instruct
12307 fill_reflection_assembly_name to use default value for keyToken (if
12308 PublicKeyToken is null).
12310 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
12312 * verify.c (mono_method_verify): fixed ovf ops with
12313 float values. They are unverifiable now.
12315 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
12317 * class.c (set_failure_from_loader_error): add BadImageException to the
12318 list of exceptions that can cause a type to fail to load.
12320 * class.c (mono_class_get_exception_for_failure): same.
12322 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
12324 * verify.c (in_any_exception_block): added, check if offset
12325 is part of any exception handling clause.
12327 * verify.c (get_stack_type): added VAR and MVAR types.
12329 * verify.c (do_stobj): better error messages.
12331 * verify.c (do_cpobj): added, check cpobj.
12333 * verify.c (do_initobj): added, check initobj.
12335 * verify.c (do_sizeof): added, check sizeof.
12337 * verify.c (do_localloc): added, check localloc.
12339 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
12341 2008-01-17 Zoltan Varga <vargaz@gmail.com>
12343 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
12344 save_lmf/restore_lmf opcodes.
12346 * threads.c (mono_threads_install_notify_pending_exc): New function to
12347 install a callback notifying the JIT there is a pending exception on a thread.
12348 (mono_thread_request_interruption): Call the new callback.
12349 (mono_thread_get_and_clear_pending_exception): New function to return the
12350 exception pending on a thread.
12352 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
12353 to turn off checking for pending exceptions.
12354 (mono_marshal_get_native_wrapper): Ditto.
12356 2008-01-16 Zoltan Varga <vargaz@gmail.com>
12358 * threads-types.h: Get rid of the unnecessary extern declarations.
12360 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
12362 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
12363 return field from parent class if not private.
12364 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
12365 returns fields from parent class if they are not private.
12366 (method_nonpublic): added function to determine if a given method
12367 should be considered non-public. Returns false for private methods
12368 on parent class, and internal methods from parent on the 1.0 profile.
12369 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
12370 use method_nonpublic function to determine whether method should be
12372 (property_accessor_public): use newly introduced method_nonpublic
12373 function to determine whether accessor is non-public.
12374 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
12375 event from parent class if not private. Only return static event if
12376 Static flag is set, and only return static event from parent class if
12377 FlattenHierarchy flag is set.
12378 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
12379 include non-private events from parent class.
12381 2008-01-16 Zoltan Varga <vargaz@gmail.com>
12383 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
12386 2008-01-16 Wade Berrier <wberrier@novell.com>
12388 * security.c: Add assembly.h header to appease some warnings
12390 2008-01-16 Dick Porter <dick@ximian.com>
12392 * process.c (process_module_string_read): Remove trailing null
12393 when saving string.
12395 2008-01-16 Mark Probst <mark.probst@gmail.com>
12397 * class-internals.h: A new data structure describing the layout of
12398 a runtime generic context (MonoRuntimeGenericContextTemplate).
12400 * metadata-internals.h: Added a hash table to MonoDomain that maps
12401 from open generic classes to their runtime generic context
12404 * object.c: Building of the runtime generic context, including
12405 proper handling of generic type arguments of superclasses.
12406 Building of the runtime generic context according to the template.
12408 2008-01-15 Zoltan Varga <vargaz@gmail.com>
12410 * class.c (mono_class_setup_fields): Set field.count for generic instances.
12413 * image.c (do_mono_image_open): Pass TRUE as last_exists to
12414 mono_portability_find_file (). Fixes #325466.
12415 (mono_image_get_public_key): Fix a warning.
12417 2008-01-14 Zoltan Varga <vargaz@gmail.com>
12419 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
12421 (mono_class_from_name_case): Ditto.
12423 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
12425 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
12426 common storage for the tables used in the System/NumberFormatter class.
12428 2008-01-13 Zoltan Varga <vargaz@gmail.com>
12430 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
12432 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
12434 * verify.c (get_boxable_mono_type): check if the token is valid.
12436 * verify.c (set_stack_value): changed to add an error if an
12437 invalid type is set on stack. Changed all callers due to signature change.
12439 * verify.c (do_stobj): implement stobj validation.
12441 2008-01-11 Zoltan Varga <vargaz@gmail.com>
12443 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
12444 set container->is_method, it was set earlier.
12446 * metadata.c (type_in_image): Handle MVARs which belong to not finished
12449 * reflection.c (mono_reflection_initialize_generic_parameter): Set
12450 is_method of the generic container to TRUE for methods.
12452 2008-01-10 Zoltan Varga <vargaz@gmail.com>
12454 * metadata.c (type_in_image): Handle type parameters properly.
12456 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
12457 memory ownership of this structure.
12459 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
12461 * verify.c (get_boxable_mono_type): make typedref types been just
12462 unverifiable. check for void type.
12464 * verify.c (do_unbox_any): added, verify opcode unbox.any.
12466 * verify.c (do_load_function_ptr): accept method spec tokens.
12468 2008-01-10 Zoltan Varga <vargaz@gmail.com>
12470 * marshal.c (mono_class_native_size): Always set *align even if this is called
12473 2008-01-09 Zoltan Varga <vargaz@gmail.com>
12475 * verify.c (mono_verify_corlib): Remove this as it was not used and was
12478 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
12480 * verify.c: removed some old unused tables. A huge bunch of small fixes
12481 to things found while testing the verifier with mono basic.
12483 * verify.c (dump_stack_value): dump null literal flag to.
12485 * verify.c (verify_type_compatibility_full): fix comparison
12486 for types that have a generic super type.
12488 * verify.c (verify_stack_type_compatibility): fix compatibility
12489 between null literals and reference types. fix compatibility between
12490 boxed valuetypes and object. fix corner case test for enums.
12492 * verify.c (do_cmp_op): proper verification of cgt.un in case
12493 of reference types.
12495 * verify.c (do_invoke_method): fix error message.
12497 * verify.c (do_store_indirect
12499 * verify.c (check_is_valid_type_for_field_ops): proper verification
12500 of managed pointers to valuetypes and boxed valuetypes. proper verification
12503 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
12504 allow token to be a reference type.
12506 * verify.c (do_cast): proper handling of boxes valuetypes.
12508 * verify.c (do_stelem): proper handling of storing a boxed valuetype
12511 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
12512 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
12513 fixed the decoding of unbox_any
12515 2008-01-08 Zoltan Varga <vargaz@gmail.com>
12517 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
12519 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
12521 * verify.c (do_newobj): do delegate verification.
12523 * verify.c (verify_delegate_compatibility): perform delegate
12526 * verify.c (verify_ldftn_delegate): perform tests related to
12529 * verify.c (mono_delegate_signature_equal): perform the
12530 slightly diferent signature comparison required by delegates.
12532 * metadata.c (mono_metadata_type_equal_full): added and exported
12533 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
12534 allows signature only comparison.
12536 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
12539 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
12541 * verify.c: added a bunch of stack_slot_* functions to
12542 make access to stack slot type easier. This is required to
12543 allow optional flags, like null literal, boxed value and
12545 All access paths to IlStackDesc::stype have been changed
12546 to use these new funcions.
12547 Removed a bunch of unused functions and cleared all warnings.
12548 This patch introduces the usage of the this pointer and
12551 2008-01-07 Zoltan Varga <vargaz@gmail.com>
12553 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
12555 2008-01-06 Zoltan Varga <vargaz@gmail.com>
12557 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
12558 match managed version.
12560 * appdomain.c: Bump corlib version.
12562 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
12565 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
12567 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
12568 Set public key token to zero-length byte array if assembly is not
12571 2008-01-05 Zoltan Varga <vargaz@gmail.com>
12573 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
12574 writing a vtype array elem.
12576 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
12578 * assembly.c (build_assembly_name): return FALSE if length of token is
12579 not 16 (if not "null").
12580 (mono_assembly_name_parse_full): return FALSE if value of version,
12581 culture, token or key is 0.
12582 * icall.c (fill_reflection_assembly_name): add boolean arguments to
12583 specify whether public key and public key token must be set to default
12584 value (zero-length byte array) if not available. Set versioncompat to
12585 SameMachine. If public key is available or the default is set, then
12586 set PublicKey flag.
12587 (ves_icall_System_Reflection_Assembly_FillName): if no public key
12588 is available, use empty byte array as default value. On the 2.0
12589 profile, use default value for public key token if not set.
12590 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
12591 profile, use default value for public key if not set. On the 2.0
12592 profile, use default value for public key token if not set.
12593 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
12594 default values for public key and public key token.
12596 2008-01-05 Zoltan Varga <vargaz@gmail.com>
12598 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
12599 field to keep it in synch with the managed object.
12601 * marshal.c (emit_marshal_object): Add support for byref marshalling of
12602 delegates. Fixes #351520.
12604 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
12605 contains defined memory.
12607 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
12609 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
12611 * sgen-gc.c (check_consistency): New helper function to do a consistency check
12612 of the GC data structures.
12614 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
12616 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
12618 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
12620 (mono_array_clone_in_domain): Ditto.
12621 (mono_array_clone_in_domain): Ditto.
12623 * threads.c (start_wrapper): Register the thread start argument as a GC root.
12624 (cache_culture): Use a write barrier.
12626 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
12627 (ves_icall_get_property_info): Ditto.
12629 * object.h (MONO_STRUCT_SETREF): New macro.
12631 * class-internals.h (MonoStats): Add some GC statistics.
12633 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
12635 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
12637 * exception.c (mono_exception_from_name_two_strings):
12638 Break from loop after method is found.
12640 2008-01-04 Dick Porter <dick@ximian.com>
12642 * process.c (process_module_string_read): Rename variable to
12643 reflect correct usage, after fixing bug 345972.
12645 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
12647 * verify.c (mono_type_create_fnptr_from_mono_method):
12648 created a MonoType function pointer instance to be used during
12649 verification. The verifier releases this memory at end.
12651 * verify.c (mono_method_is_constructor): extracted repeated
12652 checks for constructor into a single class.
12654 * verify.c (do_push_field): use new extracted method
12655 for constructor check.
12657 * verify.c (do_newobj): same.
12659 * verify.c (do_ldftn): renamed to do_load_function_ptr
12660 and make it verify ldvirtftn too.
12662 * verify.c (mono_method_verify: proper verification
12663 of ldvirtftn. release created MonoMethod instances.
12665 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
12667 * verify.c (token_bounds_check): added.
12669 * verify.c (do_ldftn): added.
12671 * verify.c (mono_method_verify): proper verificartion of ldftn.
12673 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
12675 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
12676 than the table row count. It's the resposibility of the caller to
12677 make the bounds check and raise the correct error.
12679 * metadata.c (mono_metadata_decode_row_col): Same.
12681 * loader.c (mono_get_method_from_token): perform bounds check
12682 on token for methoddef table.
12684 2007-12-29 Miguel de Icaza <miguel@novell.com>
12687 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
12688 assert into a negative result, the managed code already coped with
12691 Some folks on Windows reported this error.
12693 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
12695 * appdomain.c: Bump corlib version.
12697 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
12698 CultureInfo.CreateCulture to create CultureInfo for name.
12699 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
12700 create CultureInfo for name. Fixes bug #347174.
12702 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
12704 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
12707 * verify.c (is_valid_branch_instruction): allow branching to the
12708 first instruction of the protected block.
12710 * verify.c (is_valid_cmp_branch_instruction): same.
12712 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
12713 avoid double initialization.
12715 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
12716 detect which cases the eval stack should just be copied.
12718 * verify.c (mono_method_verify): check if the eval stack
12719 is empty when entering a protected block.
12721 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
12723 * verify.c: added is_clause_in_range, is_clause_inside_range,
12724 is_clause_nested and verify_clause_relationship. They perform
12725 the verifications stated in P1 12.4.2.7.
12727 * verify.c (mono_method_verify): remove some unused variables,
12728 add the new exception clause checks, add instruction border
12729 checks for protected block start/end, improved some error
12730 messages and fixed a bug in the way invalid instruction access
12733 2007-12-26 Zoltan Varga <vargaz@gmail.com>
12735 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
12736 from GC 7.0 if available.
12738 * object.c: Remove an unused define.
12740 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
12742 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
12744 * null-gc.c (mono_gc_make_descr_for_array): Implement.
12746 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
12748 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
12749 to take the same arguments as the other make_descr functions.
12751 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
12753 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
12756 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
12759 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
12760 call to boehm-gc.c.
12762 * boehm-gc.c (mono_gc_register_root): Fix a warning.
12764 * null-gc.c (mono_gc_register_root): Fix a warning.
12766 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
12768 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
12769 (mono_gc_base_init): Call GC_init ().
12771 * null-gc.c: Define mono_gc_register_root () as a no-op.
12773 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
12775 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
12777 * verify.c: add prototype for merge_stacks at top
12779 * verify.c (do_switch): added.
12781 * verify.c (merge_stacks): on some cases the stack merging
12782 was not happening properly. Unequal stack sizes at merge
12783 points should be invalid.
12785 * verify.c (mono_method_verify): added more debug info on stack state.
12786 verify switch properly.
12788 2007-12-24 Zoltan Varga <vargaz@gmail.com>
12790 * method-builder.h: New file, moved the mono_mb_ declarations here from
12793 * boehm-gc.c marshal.c: Include method-builder.h.
12795 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
12797 * marshal.c: Remove some code which is now in method-builder.c.
12799 2007-12-23 Zoltan Varga <vargaz@gmail.com>
12801 * method-builder.c: New file, extraction of the method builder functionality
12804 * marshal.c: Move the mb functions into method-builder.c.
12806 * marshal.h marshal.c: Export some mono_mb_... functions.
12808 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
12810 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
12813 * class.c (mono_class_get_full): Check the token type in the dynamic case.
12815 * loader.c (mono_field_from_token): Ditto.
12817 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
12820 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
12823 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
12824 a helper function for setting it.
12826 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
12829 * assembly.c: Significally simplify code now that referenced assemblies are
12830 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
12832 * threads.h: Don't include the internal threads-types.h header file. Fixes
12835 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
12837 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
12838 instructions that were target of branches or are at protected block boundaries.
12840 * verify.c (in_same_block): handle filter clauses.
12842 * verify.c (is_valid_branch_instruction): added. checks the target of
12843 instructions br or brtrue/false.
12845 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
12846 binary branch instructions such as beq and bge.
12848 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
12849 and made it pin the instruction as been part of the exception block.
12851 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
12854 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
12857 * verify.c (do_ret): ret from a protected block is unverifiable and
12860 * verify.c (do_static_branch): verify br and br.s instructions.
12862 * verify.c (merge_stacks): add extra param to support detection
12863 of branches in the middle of instructions.
12865 * verify.c (mono_method_verify): verify branches and exception blocks
12866 that target the middle of instructions. Proper verification of br and br.s.
12868 2007-12-21 Zoltan Varga <vargaz@gmail.com>
12870 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
12871 skip_visibility field.
12872 (reflection_methodbuilder_from_dynamic_method): Ditto.
12874 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
12875 registrations. Fixes #348193.
12877 * threads.h: Move the internal mono_thread_get_pending_exception () to
12878 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
12880 2007-12-20 Zoltan Varga <vargaz@gmail.com>
12882 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
12883 icall registration. Fixes #348193.
12885 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
12886 for corlib classes into object. Fixes #349621.
12888 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
12890 * icall.c (property_accessor_nonpublic): new function to determine
12891 whether an accessor allows a property to be considered non-public.
12892 Returns false for private accessor(s) from parent class, and internal
12893 accessor(s) from parent on 2.0 profile (and higher).
12894 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
12895 to determine whether property should be included if NonPublic flag
12896 is set. Fixes bug #349078.
12898 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
12900 * verify.c (init_stack_with_value): added.
12902 * verify.c (mono_method_verify): extracted common
12903 code for exception initialization into init_stack_with_value.
12905 * verify.c (mono_method_verify): initialize the exception
12906 for handler clauses as well.
12908 * verify.c (mono_method_verify): fix the exception clause
12909 ordering rules, it should use handler end offset and not
12912 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
12914 * rawbuffer.c: remove useless warning.
12916 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
12918 * threads.h, threads-types.h: move functions to the correct header
12919 (fixes bug#349952).
12921 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
12923 * verify.c (mono_method_verify): proper verification
12924 of exception handling clauses ranges and fallthru in
12925 and out of protected blocks.
12927 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
12929 * verify.c (mono_method_verify): fixed compilation issue.
12931 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
12933 * verify.c (mono_method_verify): a printf slipped in, changed
12934 to use verifier debug macro.
12936 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
12938 * verify.c (is_correct_leave): check for filter clauses.
12940 * verify.c (do_filter): added.
12942 * verify.c (mono_method_verify): property verification of leave.
12945 2007-12-18 Mark Probst <mark.probst@gmail.com>
12947 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
12948 Win32 build, until we figure out how to do the proper thing on
12951 2007-12-17 Zoltan Varga <vargaz@gmail.com>
12953 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
12954 by the previous patch.
12956 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
12957 the assembly resolve handler for refonly assemblies.
12959 2007-12-17 Mark Probst <mark.probst@gmail.com>
12961 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
12962 Make sure only one thread is allowed to commence shutdown, and
12963 don't allow new threads to be started once shutdown is in
12966 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
12968 * verify.c (is_correct_endfilter): added.
12970 * verify.c (is_unverifiable_endfilter): added.
12972 * verify.c (do_endfilter): added.
12974 * verify.c (mono_method_verify): property verification of endfilter
12975 and fixed a corner case or endfinally.
12977 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
12979 * verify.h: new flags to support fail fast of unverifiable code and
12980 do non-strict verification. Non-strict verification is required to
12981 have MS runtime compatibility. There are a huge amount of unverifiable
12982 code that it accepts as verifiable. The strict mode verifies the code
12984 Non-strict mode will be required in cases where code needs to be
12985 accepted as verifiable but fails under strict mode.
12987 * pedump.c: added support to fail fast and non-strict verification.
12989 * verify.c: added support for both fail fast and non-strict verification.
12991 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
12993 * verify.c (is_correct_endfinally): added.
12995 * verify.c (mono_method_verify): property verification of endfinally.
12997 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
12999 * verify.c (in_any_block): check for filter clauses.
13001 * verify.c (is_correct_rethrow): added.
13003 * verify.c (mono_method_verify): property verification of rethrow.
13005 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
13007 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
13009 * verify.c (do_throw): added.
13011 * verify.c (mono_method_verify): property verification of throw
13013 2007-12-11 Zoltan Varga <vargaz@gmail.com>
13015 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
13016 assemblies. Fixes #346425.
13018 2007-12-10 Zoltan Varga <vargaz@gmail.com>
13020 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
13023 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
13025 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
13026 prevent asserts when this is called with a token which might not be valid.
13028 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
13029 lookup_dynamic_token_class with valid_token == FALSE.
13031 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
13033 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
13035 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
13037 2007-12-10 Mark Probst <mark.probst@gmail.com>
13039 * gc.c: Don't delay threadpool thread finalization unless Mono is
13042 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13044 * threads.c: turn an assert into a non-fatal warning.
13046 2007-12-09 Robert Jordan <robertj@gmx.net>
13048 * icall.c (GetVirtualMethod): Add missing argument validation.
13050 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
13052 * verify.c (do_cast): added.
13054 * verify.c (mono_method_verify): property verification of castclass and isinst.
13057 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
13059 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
13061 * verify.c (do_stelem): added.
13063 * verify.c (mono_method_verify): property verification of stelem.X.
13065 2007-12-07 Mark Probst <mark.probst@gmail.com>
13067 * class.c, class-internals.h: Introduce an environment variable
13068 (MONO_GENERIC_SHARING) through which the extent of generic code
13069 sharing can be controlled (share all classes, share only corlib
13070 classes, or share nothing).
13072 * object.c: Only create runtime generic context for classes for
13073 which sharing is enabled.
13075 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
13077 * verify.c (do_ldelem): refactor it to work with ldelem.any.
13079 * verify.c (mono_method_verify): property verification of ldelem.any.
13081 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
13083 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
13084 added ldelem.X opcodes.
13086 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
13088 * verify.c: proper verification of ldelem.X
13090 2007-12-06 Zoltan Varga <vargaz@gmail.com>
13092 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
13094 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
13096 * verify.c (mono_method_verify): null literal requires special handling,
13097 the value pushed on stack need to be flagged as so.
13099 * verify.c (do_ldelema): Verify ldelema properly.
13101 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
13103 * verify.c: Verify ldlen properly.
13105 2007-12-05 Zoltan Varga <vargaz@gmail.com>
13107 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
13108 to the target object's type. Fixes #346160.
13110 2007-12-05 Dick Porter <dick@ximian.com>
13112 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
13113 Solaris needs the same workaround as BSD-derived systems. Fixes
13114 bug 323524, patch by Burkhard Linke
13115 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
13117 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
13119 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
13120 handle to use when error dialog is shown; otherwise, update mask
13121 to show no error dialog when an error occurs.
13123 2007-12-03 Zoltan Varga <vargaz@gmail.com>
13125 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
13127 * class.c (mono_class_get_field_default_value): New helper function to initialize
13128 field->def_type and field->data.
13130 2007-11-30 Zoltan Varga <vargaz@gmail.com>
13132 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
13135 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
13137 * marshal.c: Avoid depending on delegate->method_info being set.
13139 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
13141 * object.c (mono_delegate_ctor): Set delegate->method.
13143 * object-internals.h (struct _MonoDelegate): Add 'method' field.
13145 * appdomain.c: Bump corlib version.
13147 2007-11-27 Raja R Harinath <harinath@gmail.com>
13149 * metadata.c (mono_generic_inst_equal_full): Short-circuit
13150 equality check if we're comparing canonicalized MonoGenericInsts.
13152 2007-11-23 Zoltan Varga <vargaz@gmail.com>
13154 * class.c (generic_array_methods): Call mono_class_setup_methods () before
13155 accessing class->methods.
13157 2007-11-22 Dick Porter <dick@ximian.com>
13159 * threads.c: Ensure that the synch_cs is set before trying to use
13162 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
13164 * profiler.c: r89126 broke the statistial profiler, unbreak.
13166 2007-11-22 Martin Baulig <martin@ximian.com>
13168 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
13171 (mono_debug_debugger_version): Bump to 3.
13172 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
13173 -> mono_debugger_class_initialized().
13175 * mono-debug-debugger.c
13176 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
13179 (mono_debugger_start_class_init_func): Removed.
13180 (mono_debugger_class_loaded_methods_func): Added.
13181 (mono_class_setup_methods): Call it here.
13183 2007-11-22 Martin Baulig <martin@ximian.com>
13186 (mono_debug_add_delegate_trampoline): New public method.
13187 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
13190 (MonoSymbolTable): Added `global_data_table'.
13191 (MonoDebuggerTypeKind): Removed.
13193 2007-11-21 Zoltan Varga <vargaz@gmail.com>
13195 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
13198 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13200 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
13202 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
13204 2007-11-20 Martin Baulig <martin@ximian.com>
13206 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
13208 * mono-debug-debugger.c
13209 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
13210 (mono_debugger_remove_breakpoint): Likewise.
13211 (mono_debugger_check_breakpoints): Likewise.
13212 (mono_debugger_register_class_init_callback): New public method.
13213 (mono_debugger_remove_class_init_callback): Likewise.
13214 (mono_debugger_add_type): Likewise.
13216 * mono-debug-debugger.h
13217 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
13219 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
13221 * class.c: more interface implementations needed for the
13222 array enumerator (fixes bug #341112).
13224 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
13226 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
13227 fix ParamName of ArgumentNullExceptions.
13229 2007-11-17 Miguel de Icaza <miguel@novell.com>
13231 * reflection.c (mono_reflection_encode_sighelper): Generate the
13232 modopts and modreqs. I have a useless test that crashes monodis,
13233 but that shows the code working.
13235 2007-11-17 Zoltan Varga <vargaz@gmail.com>
13237 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
13238 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
13240 2007-11-15 Dick Porter <dick@ximian.com>
13242 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
13243 When joining a thread, it's the thread that's calling Join that
13244 gets WaitSleepJoin state not the target. Fixes the standalone
13245 test case in bug 334740, and hopefully the whole bug too.
13247 2007-11-15 Dick Porter <dick@ximian.com>
13249 * process.c: Read file version info from the files pointed at by
13250 process modules, not the current process. Fixes bug 315969.
13252 Use windows typedef names in some places to fix warnings on the
13255 2007-11-15 Mark Probst <mark.probst@gmail.com>
13257 * image.c, metadata-internals.h: Added a generic_class_cache hash
13258 to MonoImage for looking up generic classes when sharing generics.
13260 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13262 * sgen-gc.c: warning cleanups.
13264 2007-11-15 Zoltan Varga <vargaz@gmail.com>
13266 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
13267 inherited properties.
13269 2007-11-14 Mark Probst <mark.probst@gmail.com>
13271 * object.c, class-internals.h: Added more information to the
13272 runtime generic context.
13274 2007-11-13 Zoltan Varga <vargaz@gmail.com>
13276 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
13277 instead of just the target method. Generalize the abstract method handling to
13278 handle any non-static method.
13280 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
13281 mono_marshal_get_delegate_invoke () signature change.
13283 2007-11-13 Mark Probst <mark.probst@gmail.com>
13285 * class.c, class-internals.h: Made
13286 mono_type_get_basic_type_from_generic () public. Fixed member
13287 access check for shared generics.
13289 * loader.c: Don't insert field into field cache if it's part of a
13290 non-inflated generic class.
13292 * domain.c, domain-internals.h: The generic sharing context is now
13293 part of the jit info data structure. Added two accessor
13296 2007-11-12 Zoltan Varga <vargaz@gmail.com>
13298 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
13299 the array Get/Set/Address methods, since the JIT inlines them.
13301 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
13303 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
13304 (mono_image_init): Initialize runtime_invoke_direct_cache.
13306 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
13307 mono_marshal_get_delegate_invoke signature change.
13309 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
13310 an additional argument. Add support for invoking abstract methods.
13312 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
13314 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
13316 2007-11-09 Mark Probst <mark.probst@gmail.com>
13318 * class.c: Do field layout for open generic classes as well.
13320 2007-11-09 Mark Probst <mark.probst@gmail.com>
13322 * gc.c, gc-internal.h: Don't finalize threadpool threads with
13323 other objects, because the threadpool is still around. Put them
13324 in a list instead and after finalizing all other objects in the
13325 root domain shut down the thread pool and then finalize the
13326 threads. Fixes bug #337383.
13328 * threads.c, thread-types.h: New mono_thread_create_internal()
13329 function for marking a thread with the threadpool flag before it
13330 started. Set synch_cs to NULL after freeing it.
13332 * threadpool.c: Mark threadpool threads before they start.
13334 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
13336 * reflection.h, reflection.c: don't export random functions
13337 and lazy load dbnull and missing objects.
13339 2007-11-07 Jonathan Chambers <joncham@gmail.com>
13341 * class.c: Initialize COM types if COM interfaces
13342 are present (not just COM classes).
13344 Code is contributed under MIT/X11 license.
13346 2007-11-07 Massimiliano Mantione <massi@ximian.com>
13348 create_dynamic_mono_image: hook module profiler events (dynamic case).
13349 mono_image_basic_init: hook assembly profiler events (dynamic case).
13351 2007-11-07 Massimiliano Mantione <massi@ximian.com>
13353 simple_appdomain_unload: completely terminate the profiler
13354 instead of only processing the statistical samples.
13355 simple_shutdown: make sure this is really called exactly once,
13356 even in multithreaded applications, and always listen to
13358 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
13359 here, the "[un]load" functions will do it.
13360 Fixes bugs #333791 and #325261.
13362 2007-11-07 Geoff Norton <gnorton@novell.com>
13364 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
13365 rather than depend on __APPLE__.
13367 2007-11-07 Mark Probst <mark.probst@gmail.com>
13369 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
13371 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
13373 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
13374 UTF16 MonoString. Fix the crash from bug #335488
13376 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
13378 * marshal.c: Correct (for non-Win32 OS) length != size in
13379 mono_string_from_bstr. Fix #339530.
13381 2007-11-06 Geoff Norton <gnorton@novell.com>
13383 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
13386 2007-11-05 Kornél Pál <kornelpal@gmail.com>
13388 * process.c: Added run-time GetProcessId API detection for Windows.
13390 2007-11-04 Miguel de Icaza <miguel@novell.com>
13392 * reflection.c (mono_param_get_objects): If a parameter has the
13393 attribute [System.Runtime.InteropServices.Optional] we should
13394 set the DefaultValue of the ParameterInfo to be
13395 System.Reflection.Missing instead of DBNull.
13399 (mono_get_reflection_missing_object): New method,
13400 returns the System.Reflection.Missing.Value singleton instance.
13402 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
13404 * culture-info-table.h : regenerated.
13406 2007-11-02 Jonathan Chambers <joncham@gmail.com>
13408 * icall.c: Use GetEnvironmentStrings on windows
13409 so we are using the same environment block as
13410 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
13413 Code is contributed under MIT/X11 license.
13415 2007-10-31 Martin Baulig <martin@ximian.com>
13417 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
13419 * mono-debug-debugger.h
13420 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
13422 2007-10-30 Zoltan Varga <vargaz@gmail.com>
13424 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
13427 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
13429 * culture-info-table.h : regenerated.
13431 2007-10-30 Robert Jordan <robertj@gmx.net>
13433 * icall-def.h, icall.c:
13434 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
13436 Code is contributed under MIT/X11 license.
13438 2007-10-29 Zoltan Varga <vargaz@gmail.com>
13440 * class.c (mono_class_setup_vtable): Find the inflated methods in the
13441 inflated class instead of inflating them again.
13443 * class.c (mono_class_setup_vtable): Inflate the override methods in the
13446 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
13447 Call setup_supertypes () after klass->parent is set.
13448 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
13450 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
13451 for inflated instances of not yet created dynamic generic classes.
13452 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
13453 times from inflated_method.
13454 (methodbuilder_to_mono_method): Ditto.
13456 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
13458 * gc.c: code cleanup and removed old untested option of not creating the
13461 2007-10-29 Zoltan Varga <vargaz@gmail.com>
13463 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
13464 creating a jump trampoline for dynamic methods.
13466 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
13468 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
13469 generic TypeBuilders when called from another method of the same type (bug #335131).
13472 2007-10-27 Zoltan Varga <vargaz@gmail.com>
13474 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
13475 doesn't seem to work perfectly.
13477 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
13478 called multiple times.
13479 (methodbuilder_to_mono_method): Ditto.
13480 (resolve_object): Inflate FieldBuilder's.
13482 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
13484 * string-icalls.c, string-icalls.h, appdomain.c: patch from
13485 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
13486 RemoveEmptyEntries in the string.Split implementation (bug #322375).
13488 2007-10-26 Dick Porter <dick@ximian.com>
13490 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
13491 Thread initialisation changes
13493 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
13495 * verify.c: fix compatibility check between arrays and System.Array
13497 2007-10-26 Zoltan Varga <vargaz@gmail.com>
13499 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
13500 too. Fixes #336999.
13502 2007-10-25 Zoltan Varga <vargaz@gmail.com>
13504 * object.c (mono_value_box): Use typed allocation here.
13506 2007-10-23 Zoltan Varga <vargaz@gmail.com>
13508 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
13509 trampoline instead of compiling the method right away.
13511 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
13513 2007-10-21 Zoltan Varga <vargaz@gmail.com>
13515 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
13516 related fields for dynamic classes. Fixes #334493.
13518 2007-10-20 Zoltan Varga <vargaz@gmail.com>
13520 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
13522 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
13524 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
13525 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
13527 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
13529 * reflection.c (create_generic_typespec): Initialize klass->generic_container
13531 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
13533 2007-10-18 Jonathan Chambers <joncham@gmail.com>
13535 * marshal.c: Use correct key when removing item
13538 Code is contributed under MIT/X11 license.
13540 2007-10-17 William Holmes <billholmes54@gmail.com>
13542 *marshal.c: Adding a case to marshal booleans to U1
13544 Code is contributed under MIT/X11 license.
13546 2007-10-18 Zoltan Varga <vargaz@gmail.com>
13548 * class.c (mono_class_from_name): Search the modules compromising dynamic
13549 assemblies. Fixes #331601.
13551 2007-10-16 Zoltan Varga <vargaz@gmail.com>
13553 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
13554 exception if the type name contains an assembly component. Fixes #334203.
13556 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
13557 modules inside dynamic assemblies. Fixes #334200.
13559 * reflection.c: Set image->public_key and image->public_key_length;
13561 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
13564 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
13566 2007-10-16 Mark Probst <mark.probst@gmail.com>
13568 * metadata.c: Implemented correct comparing of generic classes.
13569 An inflated generic class can be equal to a non-inflated one if it
13570 is inflated with generic type variables as type arguments. Fixes
13573 2007-10-15 Dick Porter <dick@ximian.com>
13575 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
13576 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
13579 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
13580 instead of a monitor lock. This means that monitor_try_enter and
13581 co can set the thread state safely.
13582 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
13583 thread_interrupt_requested, so interrupt actually works.
13585 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
13586 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
13587 state accessor function
13589 2007-10-15 Martin Baulig <martin@ximian.com>
13592 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
13593 the debugger with the current runtime.
13595 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
13597 * object.c, object-internals.h: added the ability to set a single
13598 trampoline for all the slots in a vtable.
13600 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13602 * marshal.c: deal with a possible race condition during multicast
13603 delegate invocation.
13605 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13607 * class.c: ensure value type methods don't have the synchronized
13610 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
13612 * string-icalls.c, string-icalls.h: reverted unapproved patch that
13615 2007-10-11 Joel Reed <joelwreed@comcast.com>
13617 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
13618 to take an options parameter so that empty entries can be removed during
13619 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
13621 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
13623 * marshal.c: make sure we don't store the signature from a dynamic
13624 method into the runtime invoke cache (bug #327189).
13626 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
13628 * marshal.c: make sure the wrapper methods are properly initialized.
13630 2007-10-11 Mark Probst <mark.probst@gmail.com>
13632 * metadata.c, metadata-internals.h: Generalized
13633 mono_type_stack_size() to mono_type_stack_size_internal() which
13634 takes an additional argument specifying whether it allows open
13637 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
13639 * verify.c (do_invoke_method): handle typedbyref params
13640 correctly and check for unverifiable return values.
13642 * verify.c (do_newobj): fix a warning.
13644 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
13646 * verify.c: don't tread typedbyref as allways unverifable,
13647 so uses, like (ld/st)loc.0 are valid. verify for the cases
13648 that it matters, like boxing related operations.
13650 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
13652 * verify.c: add verification of the newobj opcode. verification
13653 of delegate instantation still missing due ldftn and virldftn not
13654 pushing the function type on stack
13656 2007-10-08 Mark Probst <mark.probst@gmail.com>
13658 * class-internals.h: Runtime generic context data structure
13661 * object.c: Initialization of runtime generic context at runtime
13662 vtable creation time.
13664 2007-10-08 Massimiliano Mantione <massi@ximian.com>
13665 * class.c (mono_class_create_from_typedef,
13666 mono_class_from_generic_parameter, mono_ptr_class_get,
13667 mono_fnptr_class_get, mono_bounded_array_class_get)
13668 * domain.c (mono_domain_create, mono_domain_free)
13669 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
13670 * image.c (do_mono_image_load, mono_image_close):
13671 Hooked up load-unload profiler events.
13673 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
13675 * domain.c: track statistics about the actual amount of native code
13678 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
13680 * class.c: the valuetype enumerators don't have the additional
13681 supertypes interfaces.
13683 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
13685 * class.c: need more interfaces setup for the IEnumerator<T>
13686 object created for arrays (tests/ienumerator-interfaces.2.cs).
13688 2007-10-05 Zoltan Varga <vargaz@gmail.com>
13690 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
13692 2007-10-05 Alp Toker <alp@atoker.com>
13694 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
13695 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
13698 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
13700 * verify.c (verify_type_compatibility_full): verification of
13701 compatibility improved, validates correctly non-strict checks between
13702 native int and I4 types different than (unsigned)int32.
13704 * verify.c (do_store_indirect): added, do all verification of
13707 * verify.c (get_load_indirect_mono_type): renamed to
13708 get_indirect_op_mono_type, as it now returns the MonoType for
13709 ldind.X and stind.X opcodes.
13711 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
13713 * reflection.c: Fix the encoding of generic type definition for
13716 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
13717 mono_image_typedef_or_ref but allows to specify if typespec lookups should
13718 be made. Typespec check is done prior to typeref cache lookup.
13720 * reflection.c (mono_image_typedef_or_ref): now just delegate to
13721 mono_image_typedef_or_ref_full.
13723 * reflection.c (encode_generic_class): encode the generic class
13724 directly instead of calling encode_type.
13726 * reflection.c (encode_type): encode the generic type definition
13727 MonoClass as a generic instantiation.
13729 * reflection.c (create_typespec): cache typespec tokens in
13730 the assembly->typespec cache. Don't create typespec for a generic
13731 instance MonoClass. Create typespec for the generic type defintion.
13733 * reflection.c (create_generic_typespec): encode the generic
13734 class directly instead of calling encode_type.
13736 * reflection.c (mono_image_create_token): encode the generic
13737 type definition not using a typespec for MonoType instances.
13740 2007-10-04 Raja R Harinath <rharinath@novell.com>
13743 * class.c (mono_image_init_name_cache): Don't return nested
13744 'protected internal' classes.
13745 (mono_class_from_name_case): Likewise.
13747 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
13749 * icall-def.h, icall.c : get_bundled_machine_config() is now the
13750 common function used by both DefaultConfig in System.dll and
13751 InternalConfigurationHost in System.Configuration.dll.
13753 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
13755 * class.c: automatically add to vectors only a few essential explicit
13756 generic interfaces. The rest of the interfaces that arrays should
13757 provide are currently implicitly added (but still not lazily, see the
13758 design in the discussion of bug#325495 for the details of what is
13759 needed for that). Additionally, implicit interfaces are assigned the
13760 same vtable slot as the explicit interfaces (as they are compatible):
13761 this enables huge memory savings since we don't need to instantiate
13762 as many memthods and as large vtables anymore. Also, Since
13763 GetEnumerator<T> returns an instance of a type that is required to
13764 support a similarly large set of interfaces as arrays, we add
13765 implicit interfaces and interface offset sharing support to those
13766 types, too. This change adds all the required interfaces so that
13767 the anonarray.cs test case in the bug report works (we don't add
13768 all the interfaces to arrays of arrays 3-level deep and more because
13769 of the memory requirements explained in the bug and since they are much
13770 less common: the lazy-loading support will enabled them to work, too).
13772 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
13774 * verify.c (merge_stacks): major clean up, all type compatibility
13775 checks are done by verify_type_compatibility. This fix my earlier lack
13776 of understanding of the CLR type system and merge_stacks no longer looks
13779 * verify.c: fixed some bad spelling.
13781 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
13783 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
13784 a given stack slock.
13786 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
13787 verify_type_compatibility_full. This removed a near indentical function and fixed
13788 handling of Int32 and IntPtr across all opcodes.
13790 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
13792 * class.c: only vectors have the additional generic interfaces.
13794 2007-10-01 Jonathan Chambers <joncham@gmail.com>
13796 * mono-config.c: Use g_strcasecmp instead of
13797 strcasecmp like everywhere else to fix
13798 compilation with MSVC.
13800 Code is contributed under MIT/X11 license.
13802 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13804 * object.c, object-internals.h: refactored the IMT code to enable
13805 building a single slot at a time and lazily creating the IMT trampolines
13808 2007-09-29 Zoltan Varga <vargaz@gmail.com>
13810 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
13812 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
13815 2007-09-29 Raja R Harinath <harinath@gmail.com>
13817 * loader.c (method_from_methodspec): Rearrange to avoid
13818 un-necessary exposition. Don't assert out if the method's
13819 declaring type is a generic type definition.
13821 2007-09-28 Martin Baulig <martin@ximian.com>
13823 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
13825 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
13827 * class-internals.h: optimize field layout of MonoClass to
13828 requires less cachelines at runtime and save a few bytes on 64 bit
13831 2007-09-28 Jb Evain <jbevain@novell.com>
13833 * reflection.c: when encoding type names in custom attributes,
13834 if the type is a closed generic type, its generic arguments
13835 have to be serialized as AssemblyQualifiedName, so that when
13836 they are deserialized, it's possible to re-create them properly.
13840 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
13842 * object.c, class-internals.h: added delegate-creation counter.
13844 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
13846 * class.c: cleanup of the code that synthetizes interfaces for
13847 arrays in 2.0: saves quit a bit of corlib mempool memory.
13848 Code to fix bug #325495 ifdeffed out for now until the issues
13849 with memory usage and O(n^2) behaviour are fixed.
13851 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
13853 * marshal.c: when possible, do not duplicate the name of the methods
13854 in the method builder and in the generated MonoMethod.
13856 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
13857 * verify.c: added support for type checking ldind_* opcodes.
13859 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
13861 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
13862 which is used to distinguish the fully open instantiation of a TypeBuilder
13863 with the rest. This temporary hack is required to restore the property that
13864 the fully open instantiation is the same type of the generic type definition.
13866 * class-internals.h (mono_generic_class_is_generic_type_definition):
13867 new function as part of the internal API.
13869 * class.c (inflate_generic_type): return NULL when the generic inst is
13870 fully open. The fully open generic type is now the same as the generic type
13871 definition for non TypeBuilder types.
13873 * class.c (mono_generic_class_get_class): removed assert since it is
13874 no longer valid, gklass->cached_class can point to the generic type definition.
13876 * class.c (mono_generic_class_is_generic_type_definition): new.
13878 * metadata.c (mono_generic_class_hash): added is_tb_open field
13879 to the hash calculation.
13881 * metadata.c (free_generic_class): if the generic class is associated
13882 with the generic type definition, its field will come from the mempool and
13885 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
13886 new, this function identifies the corner case of a TypeBuilder fully open
13889 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
13890 for lookup. Set gclass->cached_class to be the container class in case of
13891 the fully open instantiation of non TypeBuilder types.
13893 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
13894 to compare generic classes.
13896 * reflection.c (method_encode_methodspec): remove assert that
13897 no longer is valid.
13899 * reflection.c (mono_reflection_generic_class_initialize): add
13900 an aditional assert to ensure the proper type is used.
13902 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
13904 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
13907 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
13909 * verify.c (push_arg): Fixed support for ldarga
13910 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
13911 MonoType used as first arg in case of instance calls.
13913 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
13915 * verify.c: Support for verifying VAR and MVAR types,
13917 2007-09-25 Zoltan Varga <vargaz@gmail.com>
13919 * icall.c (ves_icall_get_property_info): Set the reflected type of the
13920 accessors correctly.
13922 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
13924 * threads.c: support OSX and other systems in
13925 mono_thread_get_stack_bounds (bug #328026).
13927 2007-09-25 Martin Baulig <martin@ximian.com>
13930 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
13932 2007-09-24 Martin Baulig <martin@ximian.com>
13935 (MonoDebugClassEntry): Moved the definition of this struct into
13936 mono-debug.c to make it private.
13939 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
13940 type table per symbol file, we don't need to store the symfile id
13943 2007-09-24 Martin Baulig <martin@ximian.com>
13945 Create one type table per symbol file, since a `MonoClass *' gets
13946 invalid when its image is unloaded.
13948 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
13949 (MonoDebugHandle): Added `type_table'.
13951 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
13953 * mempool.c, mempool.h: added mono_mempool_new_size () API
13954 to be able to specify a smaller initial size for the pool.
13955 Adjusted the code to slowly increase pool size before using
13956 the previous default size.
13957 * image.c: use a small initial size for image mempools.
13959 2007-09-23 Zoltan Varga <vargaz@gmail.com>
13961 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
13964 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
13965 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
13967 2007-09-22 Zoltan Varga <vargaz@gmail.com>
13969 * metadata.c (mono_type_create_from_typespec): Remove an invalid
13970 free. Fixes #327438.
13972 2007-09-21 Raja R Harinath <harinath@gmail.com>
13974 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
13975 generic instantiations, etc.
13976 <MONO_TYPE_ARRAY>: Likewise.
13978 2007-09-21 Martin Baulig <martin@ximian.com>
13980 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
13981 these structs were never defined.
13982 (MonoDebugHandle): Removed the `_priv' field, it was never used.
13984 2007-09-21 Martin Baulig <martin@ximian.com>
13986 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
13988 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
13990 * image.c: removed the guid hash tables: we can get the same info
13991 without the additional memory usage hit (partially fixes also bug #327052).
13993 2007-09-10 Massimiliano Mantione <massi@ximian.com>
13995 * profiler.h, profiler-private.h, profiler.c: add a new profiler
13996 event to handle unloading methods. After the event is called, the
13997 corresponding MonoMethod* must be considered invalid.
13998 * loader.c (mono_free_method): call the new mono_profiler_method_free
14001 2007-09-20 Mark Probst <mark.probst@gmail.com>
14003 * domain-internals.h: New flag in MonoJitInfo which marks shared
14004 generic methods. New hash table (shared_generics_hash) in
14005 MonoDomain to keep track of shared generic methods. Prototypes
14006 for functions to register and lookup shared generic methods.
14008 * domain.c: Support for registering and looking up shared generic
14009 methods via a hash table (shared_generics_hash) in MonoDomain.
14011 * class-internals.h: New exception to signal failure of shared
14012 compilation of a generic method. New counters for generics
14013 sharing in MonoStats.
14015 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
14017 * image.c, metadata-internals.h: don't keep a file descriptor open
14018 for loaded assemblies (bug#325988).
14020 2007-09-19 Raja R Harinath <rharinath@novell.com>
14022 * metadata.c (signature_in_image): New. Carve out of type_in_image.
14023 (ginst_in_image, gclass_in_image): Simplify. Change signature to
14024 use the corresponding datatypes.
14025 (type_in_image): Update to changes.
14026 (CleanForImageUserData): Simplify.
14027 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
14028 Avoid quadratic behaviour in handling the "stolen" list by
14029 separating the filter predicate out, and by prepending the stolen
14030 items rather than appending them.
14031 (steal_ginst_in_image): Likewise.
14032 (mono_metadata_clean_for_image): Update to changes.
14034 2007-09-19 Martin Baulig <martin@ximian.com>
14036 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
14038 2007-09-19 Martin Baulig <martin@ximian.com>
14040 * mono-debug.c (mono_debug_cleanup): Don't call
14041 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
14043 2007-09-19 Raja R Harinath <harinath@gmail.com>
14045 Fix crash on 'make run-test' in mcs/errors
14046 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
14047 Avoid more potential allocations in mono_class_from_mono_type.
14048 (ginst_in_image): Update to changes.
14049 (gclass_in_image): Rearrange slightly.
14051 2007-09-18 Zoltan Varga <vargaz@gmail.com>
14053 * class.c (mono_class_init): Move the code that sets up class->methods to
14054 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
14056 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
14057 canonical instance of an inflated generic signature.
14058 (mono_type_create_from_typespec): Remove an invalid free.
14060 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
14062 2007-09-18 Marek Habersack <mhabersack@novell.com>
14064 * domain-internals.h: added a declaration of the
14065 mono_assembly_load_full_nosearch internal function.
14067 * assembly.c (mono_assembly_load_with_partial_name): use
14068 mono_try_assembly_resolve return value properly.
14069 (mono_assembly_load_full_nosearch): copied the function body from
14070 mono_assembly_load_full, without the code to invoke assembly
14072 (mono_assembly_load_full): calls the above new function and if the
14073 assembly is not resolved, invokes the search hooks.
14075 * appdomain.c (mono_runtime_init): restore the global postload
14076 assembly search handlers.
14078 2007-09-18 Zoltan Varga <vargaz@gmail.com>
14080 * class.c (mono_class_init): Make sure class->methods and class->properties
14081 are never NULL in the generics case.
14083 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
14085 2007-09-17 Zoltan Varga <vargaz@gmail.com>
14087 * metadata.c (free_generic_class): Disable some code to fix the build.
14089 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
14091 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
14092 from the image mempool.
14094 * metadata.c (free_generic_class): Free more data from the inflated class.
14096 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
14098 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
14100 (mono_type_create_from_typespec): Ditto.
14102 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
14103 MonoImage to the caller.
14104 (mono_init_internal): Save the opened image in a global variable.
14105 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
14107 * reflection.c (resolve_object): Fix a leak.
14109 * metadata.c: Fix the freeing of data in the generics caches.
14111 * metadata.c (free_generic_inst): Comment this out to fix the build.
14112 (free_generic_class): Ditto.
14114 * metadata.c: Free cached generic methods, instantinations and classes when
14115 they are removed from the caches.
14116 (mono_metadata_free_type): Free the type itself.
14118 * class.c: Free the result of mono_class_inflate_generic_type () in a few
14121 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
14123 * boehm-gc.c: restrict managed allocs to __thread supporting
14126 2007-09-16 Zoltan Varga <vargaz@gmail.com>
14128 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
14129 (mono_generic_class_get_class): Fix a leak.
14131 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
14132 mono_metadata_free_type ().
14133 (mono_metadata_inflate_generic_inst): Fix a leak.
14135 2007-09-14 Zoltan Varga <vargaz@gmail.com>
14137 * mono-debug.c (free_header_data): Fix a leak missed earlier.
14139 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
14142 * mono-debug.c (mono_debug_close_image): Fix call to
14143 g_hash_table_remove ().
14145 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
14147 * icall-def.h: redirect all the string ctor to the managed
14148 CreateString () methods.
14149 * string-icalls.c, string-icalls.h: removed dead code for string
14152 2007-09-14 Zoltan Varga <vargaz@gmail.com>
14154 * mono-debug.c: Fix memory leaks.
14156 2007-09-14 Jonathan Chambers <joncham@gmail.com>
14158 * threads-types.h: Implement mono_hazard_pointer_set and
14159 mono_hazard_pointer_clear macros using do/while(0) to fix
14160 compilation with MSVC.
14162 Code is contributed under MIT/X11 license.
14164 2007-09-14 Zoltan Varga <vargaz@gmail.com>
14166 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
14167 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
14169 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
14171 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
14174 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
14176 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
14177 managed-code allocated as well.
14179 2007-09-13 Zoltan Varga <vargaz@gmail.com>
14181 * class.c (mono_class_is_assignable_from): Add support for generic variance.
14183 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
14185 * boehm-gc.c: fixed the build after the AOT changes.
14187 2007-09-13 Zoltan Varga <vargaz@gmail.com>
14189 * wrapper-types.h: Add an ALLOC wrapper type.
14191 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
14192 reference managed allocator methods.
14194 2007-09-12 Marek Safar <marek.safar@gmail.com>
14196 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
14197 of Type array and not MonoType, a fix suggested by Hari.
14199 2007-09-12 Jonathan Chambers <joncham@gmail.com>
14201 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
14202 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
14204 Code is contributed under MIT/X11 license.
14206 2007-09-10 Massimiliano Mantione <massi@ximian.com>
14208 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
14210 2007-09-12 Marek Habersack <mhabersack@novell.com>
14212 * image.c (do_mono_image_open): if assembly file fails to open and
14213 MONO_IOMAP is in effect, try to find the path in a
14214 case-insensitive way.
14216 * appdomain.c (mono_runtime_init): do not install postload hooks -
14217 tests show that MS.NET doesn't use anything of that sort to
14218 trigger the AppDomain.AssemblyResolve event.
14219 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
14221 (mono_runtime_init): init portability helpers here.
14223 * assembly.c (mono_assembly_load_with_partial_name): if other
14224 attempts fail, trigger the AppDomain.AssemblyResolve event handler
14225 to resolve the assembly.
14227 * domain-internals.h: added mono_try_assembly_resolve and marked
14230 2007-09-11 Jb Evain <jbevain@novell.com>
14232 * object-internals.h (MonoReflectionDynamicMethod): add
14233 a `MonoReflectionType *owner` field. The owner is used
14235 (mono_reflection_create_dynamic_method): use the owner of the dynamic
14236 method as the class declaring the dynamic method.
14237 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
14238 dynamic method to the declaring type of the methodbuilder.
14240 2007-09-11 Mark Probst <mark.probst@gmail.com>
14242 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
14243 rules for calling methods via reflection.
14245 2007-09-11 Zoltan Varga <vargaz@gmail.com>
14247 * reflection.c (resolve_object): Add support for MonoGenericClass.
14248 Inflate MonoType's.
14250 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
14252 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
14253 provide a managed method that does fast allocations without needing
14254 a managed->unmanaged transition. Boehm GC implementation currently
14255 enabled for ptrfree objects on sane architectures.
14257 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
14259 * marshal.c, marshal.h: exported a couple of useful functions and
14260 added mono_mb_get_label () to easily handle backward branches.
14262 2007-09-10 Zoltan Varga <vargaz@gmail.com>
14264 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
14266 2007-09-10 Massimiliano Mantione <massi@ximian.com>
14268 * loader.c (find_method): Fixed the regression introduced while
14271 2007-09-09 Zoltan Varga <vargaz@gmail.com>
14273 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
14276 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
14277 icall.c reflection.c: Pass a MonoGenericContext argument to
14278 mono_lookup_dynamic_token ().
14280 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
14283 2007-09-09 Robert Jordan <robertj@gmx.net>
14285 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
14286 for generic methods.
14288 * object.c (mono_object_get_virtual_method): Handle generic methods.
14291 Code is contributed under MIT/X11 license.
14293 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
14295 * image.c: fix locking in mono_image_load_file_for_image ().
14297 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
14299 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
14300 used only as a cache: added an icall to fill it.
14302 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
14304 * reflection.h: exposed mono_reflection_free_type_info
14305 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
14306 since mono_reflection_bind_generic_parameters makes a copy of it.
14307 * reflection.c (free_type_info): subinfos should be freed.
14308 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
14310 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
14311 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
14312 this fixes #82695 and #81726.
14315 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
14317 * process.h, process.c: added support for user profile/info in
14318 ProcessStartInfo. For now only Windows works.
14320 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
14322 * metadata.c: consider the generic arguments when comparing
14323 signatures (bug #82614).
14325 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14327 * cil-coff.h, image.c: updated assembly loader to cope with the
14328 PE32+ 64 bit file format.
14330 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14332 * assembly.c, class.c, domain.c, loader.c: remove useless
14333 inclusion of cil-coff.h.
14335 2007-08-29 Jonathan Chambers <joncham@gmail.com>
14337 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
14338 if interface is marked with CoClassAttribute.
14340 Code is contributed under MIT/X11 license.
14342 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
14344 * sgen-gc.c: ensure no object from the to space is copied again or finalized
14345 if it's seen twice in major collections.
14347 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
14349 * sgen-gc.c: big objects are not copied to the gray area, but they
14350 need to be considered for scanning, too, if they are brought alive
14351 by an object ready for finalizations or a survived one.
14353 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
14355 * sgen-gc.c: properly account the number of disappearing links when
14356 they are nullified.
14358 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
14360 * sgen-gc.c: share the code to scan the registered roots between the
14361 different types of collections.
14363 2007-08-28 Zoltan Varga <vargaz@gmail.com>
14365 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
14367 2007-08-28 Zoltan Varga <vargaz@gmail.com>
14369 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
14370 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
14372 2007-08-28 Mark Probst <mark.probst@gmail.com>
14374 * security-manager.c (mono_security_manager_get_methods):
14375 LinkDemandSecurityException now has 2 arguments instead of 3.
14377 2007-08-27 Zoltan Varga <vargaz@gmail.com>
14379 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
14380 platforms which need it.
14382 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14384 * sgen-gc.c: unregister thread data structures with a pthread_key_t
14387 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
14389 * threads.c: free the thread static data on thread exit.
14391 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
14393 * class.c: walk the hierarchy to find the generic definition for
14394 a class (fixes runtime part of bug #82498).
14396 2007-08-24 Zoltan Varga <vargaz@gmail.com>
14398 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
14401 * image.c (mono_image_close): Here. Hopefully fixes #82510.
14403 2007-08-24 Mark Probst <mark.probst@gmail.com>
14405 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
14407 2007-08-24 Robert Jordan <robertj@gmx.net>
14409 * appdomain.c: don't perform the ':'->';' substitution on Win32.
14411 2007-08-24 Jb Evain <jbevain@novell.com>
14413 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
14416 2007-08-24 Mark Probst <mark.probst@gmail.com>
14418 * threads.c: Make sure a thread gets cleaned up only once. Fixes
14421 2007-08-24 Zoltan Varga <vargaz@gmail.com>
14423 * assembly.c: Fix a warning.
14425 2007-08-23 Marek Habersack <mhabersack@novell.com>
14427 * appdomain.c: parse the <runtime> section looking for the probing
14428 element with the 'privatePath' attribute, which sets additional
14429 directories in which the runtime should look for assemblies.
14431 2007-08-23 Robert Jordan <robertj@gmx.net>
14433 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
14436 2007-08-23 Martin Baulig <martin@ximian.com>
14438 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
14439 _mono_debug_init_corlib() and remove it from the header file.
14441 2007-08-23 Martin Baulig <martin@ximian.com>
14443 * mono-debug-debugger.c
14444 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
14445 don't notify the debugger about it.
14447 * mono-debug-debugger.h
14448 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
14450 2007-08-23 Robert Jordan <robertj@gmx.net>
14452 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
14453 Code is contributed under MIT/X11 license.
14455 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14457 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
14459 2007-08-22 Martin Baulig <martin@ximian.com>
14461 * mono-debug.c: Store debugging info on a per-domain basis and
14462 free it on domain unload. Add support for unloading symbol files.
14465 (MonoDebugList): New typedef.
14467 - add `data_tables and `type_table'.
14468 - replace 'symbol_files' and `num_symbol_files' with a
14470 (mono_debug_data_table): Removed.
14471 (mono_debug_list_add): New public function.
14472 (mono_debug_list_remove): New public function.
14473 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
14474 (mono_debug_init_2_memory): Renamed into
14475 mono_debug_open_image_from_memory().
14476 (mono_debug_close_image): New public function.
14477 (mono_debug_domain_create): Likewise.
14478 (mono_debug_domain_unload): Likewise.
14479 (MONO_DEBUGGER_VERSION): Bump to 60.
14481 * mono-debug-debugger.h
14482 (MonoDebuggerEvent):
14483 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
14484 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
14485 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
14486 - rename `THREAD_CREATED' and `THREAD_EXITED' into
14487 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
14488 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
14490 (mono_debugger_add_symbol_file): Removed.
14491 (mono_debugger_add_type): Removed.
14492 (mono_debugger_lookup_type): Removed.
14493 (mono_debugger_lookup_assembly): Removed.
14496 (mono_domain_create): Call mono_debug_domain_create().
14497 (mono_init_internal): Call mono_debug_init_corlib().
14500 (mono_assembly_close): Call mono_debug_close_image().
14502 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
14504 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
14507 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
14509 * sgen-gc.c: ensure section->pin_queue_end is initialized
14510 correctly when non pinning objects in the section have been found.
14512 2007-08-22 Marek Habersack <mhabersack@novell.com>
14514 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
14515 containing a list of directories separated by ':'. MSDN docs say
14516 the directories should be separated with ';'. Part of a bugfix for
14519 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
14521 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
14522 it should MonoType and not MonoClass.
14524 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
14526 * culture-info-table.h : regenerated.
14528 2007-08-20 William Holmes <billholmes54@gmail.com>
14530 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
14531 to call ReplaceFile Kernel32 on windows or in io-layer.
14532 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
14533 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
14534 as an internal call.
14536 Code is contributed under MIT/X11 license.
14538 2007-08-20 Jb Evain <jbevain@novell.com>
14540 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
14541 and MONO_EXCEPTION_FIELD_ACCESS.
14543 * debug-helpers.[c|h]: new mono_field_full_name function.
14545 2007-08-20 Mark Probst <mark.probst@gmail.com>
14547 * class.c: Removed class_security_level() and moved it to
14548 security-core-clr.c.
14550 * security-core-clr.c, security-core-clr.h: class_security_level()
14551 is now public and renamed to mono_security_core_clr_class_level().
14552 It also looks for security attributes in the classes a class is
14555 2007-08-20 Mark Probst <mark.probst@gmail.com>
14557 * security-core-clr.c, security-core-clr.h: CoreCLR security
14560 * Makefile.am: Added security-core-clr.[ch].
14562 * security-manager.c, security-manager.h: Functions and enum for
14563 setting and getting the security mode.
14565 * class.c: CoreCLR security checks.
14567 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
14569 * icall-def.h, process.c, process.h: implemented icall to get
14570 user/system processor times.
14572 2007-08-17 Mark Probst <mark.probst@gmail.com>
14574 * domain.c, threads.c, class-internals.h, domain-internals.h: New
14575 reader-lock-free jit_info_table.
14577 2007-08-17 Zoltan Varga <vargaz@gmail.com>
14579 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
14581 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
14583 * object-internals.h (MonoException): Add missing _data member.
14585 2007-08-08 Massimiliano Mantione <massi@ximian.com>
14587 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
14588 checking that only methods with matching qname or fqname are picked
14589 from implemented interfaces.
14591 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
14593 * verify.c (do_newarr):added, do type verification of
14594 newarr ops, push the right value on the eval stack.
14595 * verify.c (mono_method_verify): use do_newarr
14598 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
14600 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
14601 factored the common code into get_boxable_mono_type, which
14602 is now using mono_type_get_full, this fixed byref related tests.
14604 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
14606 * class.c: added mono_type_get_full, this function has the same
14607 behavior of mono_class_get_full but the returned MonoType has
14608 all metadata of the associated token in case of a typespec token.
14609 * class.c: added mono_type_retrieve_from_typespec, used by
14610 mono_type_get_full to retrieve the token type.
14611 * class.c (mono_class_create_from_typespec): changed to use
14612 mono_type_retrieve_from_typespec.
14613 * class.c (mono_ldtoken): changed to use mono_type_get_full
14614 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
14615 * class-internals.h: exported mono_type_get_full for internal use.
14617 2007-08-16 Jb Evain <jbevain@novell.com>
14619 * domain.c (supported_runtimes): add entry for
14620 the 'moonlight' runtime version.
14622 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
14624 * verify.c (mono_method_verify): small typo sliped in.
14626 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
14628 * verify.c (do_unbox_value): added, do type verification of
14630 * verify.c (mono_method_verify): use do_unbox_value
14633 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
14635 * verify.c (dump_stack_value): fixed typo, was printing string
14636 instead of object on stack.
14637 * verify.c (do_box_value): moved the byref check up as it leads
14638 to invalid code and should be done earlier.
14639 * verify.c: improved error messages for and ldobj
14641 2007-08-15 William Holmes <billholmes54@gmail.com>
14643 * marshal.c (emit_marshal_custom): Omit the call to
14644 marshal_native_to_managed when calling native to managed
14645 and the argument is specified as an out argument.
14647 Code is contributed under MIT/X11 license.
14649 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
14651 * verify.c: fixed the type checks for generics, function pointers and vectors.
14652 Added type verification for ldobj and ldtoken. The verifier
14653 would segfault if header or signature of a method contained references
14654 to non-existant types.
14656 2007-08-15 Jonathan Chambers <joncham@gmail.com>
14658 * marshal.c (cominterop_get_ccw): Patch from
14659 Bill Holmes to no walk up interface hierarchy.
14660 All parent methods should be present in the interface for COM.
14662 Code is contributed under MIT/X11 license.
14664 2007-08-15 Jonathan Chambers <joncham@gmail.com>
14666 * marshal.c (emit_marshal_com_interface): Patch from
14667 Bill Holmes to handle COM Interfaces as return values
14668 for native->managed calls.
14670 Code is contributed under MIT/X11 license.
14672 2007-08-14 Jonathan Chambers <joncham@gmail.com>
14674 * marshal.c (cominterop_get_idispatch_for_object): Implement
14675 for runtime callable wrappers.
14677 Code is contributed under MIT/X11 license.
14679 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
14681 * pedump.c (main): changed from mono_init to mono_init_from_assembly
14682 so 2.0 types are accessible
14685 2007-08-13 Miguel de Icaza <miguel@novell.com>
14687 * domain.c (mono_init_internal): Call mono_assembly_load_friends
14688 once we load mscorlib. Due to the order in which we initialize,
14689 the mono_assembly_load_full routine that loads mscorlib did not
14690 load friends. We now load it once we load the
14691 mono_defaults.internals_visible_class class.
14693 * assembly.c: Expose the mono_load_friend_assemblies method.
14695 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
14697 * verify.c: improved the handling of boxing, better
14698 type checking for unary ops and conversion. Fix bug
14699 regarding managed pointer compatibility checking
14701 2007-08-11 Zoltan Varga <vargaz@gmail.com>
14703 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
14705 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
14707 2007-08-09 Raja R Harinath <rharinath@novell.com>
14709 * reflection.c (dup_type): Remove.
14710 * class.c (dup_type): Remove.
14711 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
14712 instead of the dodgy 'dup_type'.
14713 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
14714 handle the case where 'dup_type' needed the second argument.
14716 2007-08-08 Zoltan Varga <vargaz@gmail.com>
14718 * domain.c: Fix a warning.
14720 2007-08-08 Massimiliano Mantione <massi@ximian.com>
14722 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
14723 checking that methods with the same fqname are not overridden
14724 with a method from an ancestor.
14726 2007-08-07 Zoltan Varga <vargaz@gmail.com>
14728 * threads.c (free_thread_static_data_helper): Avoid a crash if
14729 thread->static_data is not yet set.
14731 2007-08-07 Jonathan Chambers <joncham@gmail.com>
14733 * marshal.c: Use correct image when emitting
14734 native wrapper for COM calls.
14736 Code is contributed under MIT/X11 license.
14738 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
14740 * icall-def.h, security.c, security.h :
14741 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
14743 2007-08-07 Martin Baulig <martin@ximian.com>
14745 * mono-debug-debugger.h
14746 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
14748 * domain.c (mono_domain_free): Call
14749 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
14751 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
14753 * verify.c (check_underflow, check_overflow): error message now returns IL offset
14754 * verify.c (in_same_block): code should test if either offset is inside the clauses
14755 * verify.c (mono_method_verify): push the exception into the eval stack of exception
14758 2007-08-03 Zoltan Varga <vargaz@gmail.com>
14760 * image.c (mono_image_close): Fix a leak.
14762 * object.c (mono_runtime_invoke_array): Avoid using alloca.
14764 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
14766 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
14768 * domain.c, threads.c, threads-types.h: fix memory retention issue
14769 with thread static variables not being cleared on domain unload.
14770 Reuse thread static slots after domain unload.
14772 2007-08-03 Zoltan Varga <vargaz@gmail.com>
14774 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
14777 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
14778 now done in mono_runtime_invoke_array.
14780 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
14781 receiver is a nullable type.
14783 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
14786 2007-08-03 Jonathan Chambers <joncham@gmail.com>
14788 * marshal.c: Implement COM Objects as return type for
14789 managed->unmanaged calls. Added Release calls for COM Object
14790 out/return values in managed->unmanaged calls.
14792 Code is contributed under MIT/X11 license.
14794 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
14796 * threads.h, threads-type.h: move the hazard pointer declarations
14797 to the private header.
14799 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
14801 * file-io.c, appdomain.c: memory leak fixes.
14803 2007-08-02 Dick Porter <dick@ximian.com>
14806 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
14807 SO_REUSEADDR setting into io-layer/sockets.c.
14809 2007-08-01 Zoltan Varga <vargaz@gmail.com>
14811 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
14812 from Object when called on a generic parameter. Fixes #82211.
14814 2007-08-01 Dick Porter <dick@ximian.com>
14816 * file-io.c (convert_share): Test FileShare values bit-by-bit.
14817 Fixes bug 79250 yet again.
14819 2007-07-30 Martin Baulig <martin@ximian.com>
14821 Merged the `debugger-dublin' branch.
14824 (MonoDebugDataTable): New typedef.
14825 (MonoDebugMethodAddressList): New typedef.
14826 (MonoDebugWrapperData): Removed.
14827 (MonoDebugSymbolTable): Removed `current_data_table',
14828 `current_data_table_size', `current_data_table_offset'.
14829 (MonoDebugDataItemType): Moved into mono-debug.c.
14830 (MonoDebugMethodJitInfo): Remove `address'.
14831 (mono_debug_data_table): New global variable.
14832 (mono_debug_lookup_method_addresses): New public function.
14833 (mono_debug_find_method): Take a `MonoMethod *', not a
14834 `MonoDebugMethodInfo *'.
14836 * mono-debug.c: Drop support for the old symbol tables.
14838 2007-06-28 Martin Baulig <martin@ximian.com>
14840 * mono-debug.c (mono_debug_debugger_version): New public variable.
14842 2007-07-31 William Holmes <billholmes54@gmail.com>
14844 * metadata.c Changed mono_type_create_from_typespec to not insert
14845 the type into the hash map until after
14846 do_mono_metadata_parse_type has completed.
14848 Code is contributed under MIT/X11 license.
14850 2007-07-31 Zoltan Varga <vargaz@gmail.com>
14852 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
14853 generic parameter. Fixes #82211.
14855 2007-07-27 Jb Evain <jbevain@novell.com>
14857 * pedump.c (dump_metadata, dump_metadata_header): dump
14858 versions contained in the metadata header.
14860 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
14862 * threads.c: register small_id_table with the GC.
14864 2007-07-27 Mark Probst <mark.probst@gmail.com>
14866 * threads.c, threads.h, class-internals.h, object-internals.h:
14867 Hazard pointers, to be used by lock-free parallel algorithms.
14869 2007-07-26 Dick Porter <dick@ximian.com>
14871 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
14872 routine on non-windows platforms, as I've not managed to think of
14873 a non-kludgy way of doing this. Finishes off bug 78739.
14875 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
14877 * object.c: properly setup interface_bitmap in proxy vtables.
14879 2007-07-25 Marek Habersack <mhabersack@novell.com>
14881 * appdomain.c (get_shadow_assembly_location): do not use TickCount
14882 to create unique shadow copy target directories, use the domain's
14883 serial number instead. Each domain gets a unique target directory
14886 * domain.c (mono_domain_create): added code to increment domain
14887 shadow copy serial number and cache the value in the current
14890 * domain-internals.h (struct _MonoDomain): added a new field -
14891 shadow_serial to hold the serial number used in generation of
14892 shadow-copy directories. This is to make sure that the directory
14893 name is unique for each and every domain created. We avoid a race
14894 condition with overriding assemblies already in use by other app
14897 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
14899 * class.c (mono_bounded_array_class_get): fixed memory leak when
14900 binding generic parameters.
14902 2007-07-24 Raja R Harinath <rharinath@novell.com>
14904 * metadata.c (do_mono_metadata_parse_generic_class): Use
14905 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
14908 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
14910 * loader.c, class-internals.h, reflection.c: removed the per-method
14911 generics hashtable: we use the global one through the call of
14912 mono_class_inflate_generic_method ().
14914 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
14916 * class.c, metadata.c, class-internals.h: introduce yet another
14917 generics global cache for inflated methods (fixes 98% of the perf
14918 issue in bug #81806).
14920 2007-07-23 Raja R Harinath <rharinath@novell.com>
14922 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
14923 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
14924 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
14925 return a MonoGenericInst containing (a copy) of those types.
14926 (mono_metadata_inflate_generic_inst): Update to changes.
14927 (mono_metadata_parse_generic_inst): Likewise.
14928 (mono_get_shared_generic_inst): Likewise.
14929 * reflection.c (mono_class_bind_generic_parameters): Likewise.
14930 (mono_reflection_bind_generic_method_parameters): Likewise.
14931 * metadata-internals.h: Likewise.
14932 * icall.c (free_generic_context): Kill.
14933 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
14935 * reflection.c (reflection_methodbuilder_to_mono_method): Use
14936 mono_metadata_type_dup.
14937 * marshal.c (mono_mb_create_method): Likewise.
14939 * metadata.c (mono_metadata_type_dup): Rename from
14940 mono_metadata_type_dup_mp. Take an optional mempool instead of a
14941 MonoImage. Handle a few more cases, esp. when no mempool is given.
14942 * marshal.c, metadata-internals.h: Update to changes.
14944 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
14946 * class.c: fixed a small leak for array classes and removed warning.
14948 2007-07-22 Zoltan Varga <vargaz@gmail.com>
14950 * loader.c (mono_method_get_param_token): Make this work on generic methods.
14951 Return 0x8000000 for return parameters. Fixes #82161.
14953 2007-07-21 Marek Habersack <grendello@gmail.com>
14955 * appdomain.c (get_shadow_assembly_location): append the current
14956 ticks value to the path. Avoids overwriting the same assemblies by
14957 several threads at the same time.
14959 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
14960 and Raja R Harinath <rharinath@novell.com>
14962 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
14964 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
14965 property for testing if a method is a generic method definition.
14967 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
14969 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
14971 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14973 * verify.c: used function from private branch, reverted to the one in class.h
14975 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14977 * verify.c: a typo slipped in and the code wont compile
14979 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14981 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
14982 disabled box instruction as it is doing the wrong thing
14983 improved stack dump messages, now it is easier to debug type related issues
14986 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
14988 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
14990 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14992 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
14993 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
14994 grouped with class and valuetype. This change will simply
14995 the code as it should be handled just like unmanaged pointers.
14997 2007-07-19 Mark Probst <mark.probst@gmail.com>
14999 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
15001 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
15003 * verify.c: several stack merge issues fixed, reference comparisons now
15004 check the type size. strict type check now works correctly.
15005 added more uses of IS_MANAGED_POINTER macro.
15006 fixed issues pointed by running the test suite against .net.
15009 2007-07-19 Mark Probst <mark.probst@gmail.com>
15011 * class.c, loader.c, class-internals.h: Removed the
15012 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
15015 * icall.c: Better error checking in some internal reflection
15018 2007-07-18 William Holmes <billholmes54@gmail.com>
15020 * filewatcher.c : removed unused variable 'filename' in
15021 ves_icall_System_IO_FSW_SupportsFSW
15023 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
15025 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
15028 2007-07-15 Zoltan Varga <vargaz@gmail.com>
15030 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
15032 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
15034 2007-07-14 Zoltan Varga <vargaz@gmail.com>
15036 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
15037 Implement generics support.
15038 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
15040 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
15041 type_args and method_args arguments.
15042 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
15043 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
15044 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
15046 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
15048 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
15049 It adds a rootimage parameter to mono_reflection_get_type_internal,
15050 adds new function mono_reflection_get_type_with_rootimage and use
15051 the rootimage to resolve the types instead of the current image
15053 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
15055 * culture-info-table.h: Forgot to update after r78304.
15057 2007-07-13 Raja R Harinath <rharinath@novell.com>
15059 * class.c (mono_class_is_open_constructed_type)
15060 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
15062 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
15064 * class.c (mono_bounded_array_class_get): method fails if used with
15065 an incomplete TypeBuilder enum (no basetype field), fixed it by
15066 avoiding calculating the size for such array as it cannot be instantiated.
15069 2007-07-12 Raja R Harinath <rharinath@novell.com>
15071 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
15073 * metadata.c, reflection.c: Update to changes.
15075 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
15077 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
15078 mono_class_is_valid_enum, they are used to valide a enum when loading.
15079 * reflection.c: used new functions to throw TypeLoadException when and
15080 invalid enum is build with TypeBuilder. Fixes #82018
15082 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
15084 * object.c: forgot commit of mono_class_setup_methods () to access
15086 * object-internals.h: added a few more handy fields to
15089 2007-07-11 Zoltan Varga <vargaz@gmail.com>
15091 * object.c (build_imt): Call mono_class_setup_methods () before accessing
15094 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
15096 * class-internals.h, object-internals.h, object.c: IMT-based
15097 interface invocation core from Massimiliano Mantione
15098 (massi@ximian.com) with a reworked arch-specific interface,
15099 bsearch implementation and a few bugfixes and memory savings by me.
15101 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
15103 * class.c (mono_class_create_from_typedef): mono would segfault if
15104 an enum did not have a __value field. It now throws a TypeLoadException
15105 for such cases. Fix bug #82022
15107 2007-07-10 Zoltan Varga <vargaz@gmail.com>
15109 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
15111 2007-07-09 Mark Probst <mark.probst@gmail.com>
15113 * class.c (mono_class_init): If a class is already inited but has
15114 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
15116 2007-07-09 Mark Probst <mark.probst@gmail.com>
15118 * class.c: Properly handle the case of an unimplemented interface
15119 method. Fixes: 81673.
15121 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
15123 * class-internals.h, object.c: cleanup patch from massi: use
15124 MonoVTable->interface_bitmap since the vtable interfaces offset array
15127 2007-07-10 Zoltan Varga <vargaz@gmail.com>
15129 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
15130 GetMDStreamVersion icall instead.
15132 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
15134 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
15135 not use mono_dl_build_path() with a full library name: makes
15136 fallbacks to libgaim and libfam work.
15138 2007-07-06 William Holmes <billholmes54@gmail.com>
15140 * assembly.c: Added a continue statement in probe_for_partial_name when
15141 parse_assembly_directory_name fails. Fixes : 82002
15143 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
15145 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
15146 and added a verification for TYPEDBYREF.
15147 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
15148 make native int interchangeable with int32 and some small cleanup and formating.
15149 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
15150 handle byref of byref.
15151 * verify.c (push_local): handle byref of byref.
15152 * verify.c (do_binop): invalid mix of values is unverifiable
15153 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
15154 added visibility checks
15155 * verify.c (field related method): added visibility checks
15156 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
15158 2007-07-06 Zoltan Varga <vargaz@gmail.com>
15160 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
15163 2007-07-05 Zoltan Varga <vargaz@gmail.com>
15165 * profiler.c (mono_profiler_load): Fix an off-by-one error.
15167 * marshal.c (emit_marshal_string): When returning a string from managed code,
15168 allways make a copy even for unicode strings. Fixes #81990.
15170 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
15172 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
15173 of byref generic inst types (bug #81997).
15175 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
15177 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
15178 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
15180 2007-07-02 Zoltan Varga <vargaz@gmail.com>
15182 * marshal.c (emit_marshal_string): Add support for unicode strings in
15183 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
15185 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
15187 * verify.c: field load/store are now verified, missing only access checks now
15189 2007-06-28 Martin Baulig <martin@ximian.com>
15191 * mono-debug.c (mono_debug_debugger_version): New public variable.
15193 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
15195 * locales.c: When constructing DateTimeFormat or NumberFormat for
15196 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
15197 MonoCultureInfo contructed from the current locale is always
15198 read-only and has UseUserOverride set to true. All MonoCultureInfo
15199 instances returned for GetCultures have both IsReadOnly and
15200 UseUserOverride set to true. Fixes part of bug #81930.
15202 2007-06-22 Jonathan Chambers <joncham@gmail.com>
15204 * icall-def.h: Update System.__ComObject icalls
15205 * marshal.c: Avoid managed transition (and object creation)
15206 when looking up COM interface in RCW.
15207 * marshal.h: Ditto.
15209 Code is contributed under MIT/X11 license.
15211 2007-06-22 Zoltan Varga <vargaz@gmail.com>
15213 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
15214 to avoid crashes during assembly unloading.
15216 2007-06-22 Raja R Harinath <rharinath@novell.com>
15218 Fix MethodInfo.IsGenericMethodDefinition
15219 * reflection.c (mono_reflection_bind_generic_method_parameters):
15220 Rearrange code to ensure we always uses a generic method definition.
15221 * class.c (mono_class_inflate_generic_method_full): Set
15222 'generic_container' field only for generic method definitions.
15223 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
15224 Use presense of 'generic_container' field as indication of being a
15225 generic method definition.
15227 2007-06-21 Zoltan Varga <vargaz@gmail.com>
15229 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15231 * object-internals.h: Reflect changes in the layout of the managed Delegate
15234 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
15235 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
15236 runtime memory used by the dynamic method. Fixes #77146.
15238 2007-06-21 Dick Porter <dick@ximian.com>
15241 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
15242 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
15245 2007-06-21 Raja R Harinath <rharinath@novell.com>
15247 * reflection.c (method_encode_methodspec): Add a tripwire.
15248 * class.c (inflate_generic_type): The fully open generic type is
15249 not the same as the generic type definition.
15251 2007-06-21 Martin Baulig <martin@ximian.com>
15253 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
15255 * mono-debug-debugger.h
15256 (MonoDebuggerBreakpointInfo): Removed.
15257 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
15258 (mono_debugger_remove_breakpoint): Likewise.
15259 (mono_debugger_breakpoint_callback): Likewise.
15260 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
15262 2007-06-21 Raja R Harinath <rharinath@novell.com>
15264 * metadata.c (mono_metadata_lookup_generic_class): The fully open
15265 generic type is not the same as the generic type definition.
15266 * class.c (mono_generic_class_get_class): Likewise.
15268 2007-06-20 Geoff Norton <gnorton@customerdna.com>
15270 * icall.c: The second argument to
15271 System.Reflection.MethodBase.GetMethodFromHandleInternalType
15272 is a MonoType not a MonoClass.
15274 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
15276 * verify.c: support for function pointers in the verifier
15278 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
15280 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
15282 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
15284 * assembly.c: removed Mono.Data.SqliteClient from the list of
15285 forward-compatible assemblies as it breaks the ABI (bug #81899).
15287 2007-06-19 Raja R Harinath <rharinath@novell.com>
15289 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
15290 lookup/update with the loader lock.
15291 * reflection.c (mono_class_bind_generic_parameters): No need to
15292 protect mono_metadata_lookup_* with the loader lock.
15293 * class.c (inflate_generic_type): Likewise.
15295 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
15296 on a generic instantiated type.
15298 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
15300 *verify.c: produce meanfull error messages on verification error
15301 *verify.c: fixed some cases of verification errors reported as validation errors
15302 *pedump.c: fixed the error name array, now it shows validation errors properly
15303 *verify.h: fixed the contant that should be used for verification errors
15305 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
15307 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
15308 for bug #77596, 81858 and 80743 (generics data structures on domain
15311 2007-06-15 Raja R Harinath <rharinath@novell.com>
15313 Avoid allocating 'MonoGenericContext' on the heap.
15314 * class-internals (_MonoMethodInflated::context): Make field
15315 inline, not a pointer.
15316 * loader.c (method_from_methodspec): Allocate 'new_context' on the
15317 stack. Use the context embedded within the inflated method as the
15318 hash key, rather than 'new_context'.
15319 * class.c (inflate_generic_context): Simplify. Return a struct
15320 rather than allocating on the heap.
15321 (mono_class_inflate_generic_method_full): Update to changes. Now,
15322 doesn't salt away a copy of the context -- simplifying the
15323 lifetime rules of a 'MonoGenericContext *'.
15324 (mono_method_get_context): Return pointer to embedded context.
15325 (setup_generic_array_ifaces): Allocate temporary context on stack.
15326 * reflection.c (inflate_mono_method): Likewise.
15327 (mono_reflection_bind_generic_method_parameters): Likewise.
15328 Use the context embedded within the inflated method as the hash key.
15330 Avoid a source of allocation of 'MonoGenericContext'.
15331 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
15332 and 'cached_context' fields into embedded 'MonoGenericContext' field.
15333 * class.c: Update to changes.
15334 (mono_generic_class_get_context): Simplify drastically. Now just
15335 returns a pointer to the field.
15336 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
15337 argument as a const pointer.
15338 (mono_metadata_generic_context_equal): Likewise.
15339 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
15342 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
15344 * verify.c improved the handling of brtrue/brfalse, factored out common code
15346 2007-06-14 Raja R Harinath <rharinath@novell.com>
15348 Kill MonoGenericMethod.
15349 * class-internals.h (MonoGenericContext::method_inst): Rename from
15350 'gmethod' and convert to a MonoGenericInst.
15351 (MonoGenericMethod): Remove.
15352 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
15353 * loader.c (method_from_methodspec): Update to changes. Use a
15354 MonoGenericContext as the key to the hashtable.
15355 * metadata.c (mono_metadata_generic_context_equal): Rename from
15356 'mono_metadata_generic_method_equal' and take MonoGenericContext.
15357 (mono_metadata_generic_context_hash): Likewise from
15358 'mono_metadata_generic_method_hash'. Change hash function.
15359 (mono_metadata_load_generic_params): Update to changes.
15360 (mono_get_shared_generic_method): Remove.
15361 * metadata-internals.h (mono_get_shared_generic_method): Remove.
15362 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
15363 (inflate_generic_context): Likewise.
15364 (mono_class_inflate_generic_method_full): Likewise.
15365 (setup_generic_array_ifaces): Likewise.
15366 (mono_class_create_from_typespec): Likewise.
15367 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
15368 (method_encode_methodspec): Update callsite.
15369 (reflection_methodbuilder_to_mono_method): Update to changes.
15370 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
15371 MonoGenericContext as the key to the hashtable.
15372 (inflate_mono_method): Update to changes.
15374 * class-internals.h (MonoGenericMethod::container): Remove.
15375 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
15377 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
15379 * profiler-private.h, profiler.c, profiler.h: added API to profile
15382 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
15384 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
15386 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
15388 * verify.c: method invocation is now validated, now we verify parameter types on stack.
15389 Fixed overflow and underflow not aborting the verification process.
15391 2007-06-13 Mark Probst <mark.probst@gmail.com>
15393 * class-internals.h (MonoStats): Added stats entries for dynamic
15396 2007-06-12 Zoltan Varga <vargaz@gmail.com>
15398 * loader.c (mono_free_method): Free header->locals and header->clauses.
15400 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
15403 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
15405 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
15407 2007-06-12 Raja R Harinath <rharinath@novell.com>
15409 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
15412 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
15414 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
15416 2007-06-11 Raja R Harinath <harinath@gmail.com>
15418 MonoGenericMethod on a diet
15419 * class-internals.h (_MonoMethodInflated::reflection_info): Move
15421 (_MonoGenericMethod::reflection_info): ... from here.
15422 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
15424 * reflection.c (inflate_mono_method): Likewise.
15425 (mono_reflection_bind_generic_method_parameters): Likewise.
15427 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
15429 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
15430 *verify.c: factored long ldarg forms to share code with short forms
15432 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
15434 *verify.c: fixed code formating factored some duplicate code
15435 into a new function
15437 *verify.h: fixed binary incompatibility introduced earlier
15439 *pedump.c: fixed formating
15441 2007-06-11 Raja R Harinath <harinath@gmail.com>
15443 Fix assertion when disassembling Mono.C5.dll
15444 * loader.c (method_from_methodspec): Avoid inflating a method
15445 twice with the same context. If the methodref is inflated, use
15446 the declaring method instead.
15448 * class.c (mono_class_from_generic_parameter): Fix case similar to
15449 bug #81830 handled below, but for method containers.
15451 2007-06-10 Raja R Harinath <harinath@gmail.com>
15453 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
15454 get_shared_generic_class. Directly inflate the instance.
15455 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
15456 (inflate_generic_class): Delete.
15457 (get_shared_generic_class): Delete. Move setting of
15458 'cached_class' and 'cached_context' ...
15459 * metadata.c (mono_metadata_lookup_generic_class): ... here.
15461 * metadata.c (mono_metadata_lookup_generic_class): Change
15462 signature to take the components of a MonoGenericClass rather than
15463 an allocated MonoGenericClass. Change semantics to be intern-like.
15464 * reflection.c (mono_class_bind_generic_parameters): Update to
15465 changes. Make locking region tighter.
15466 * class.c (inflate_generic_class): Update to changes.
15467 (get_shared_generic_class): Likewise.
15468 * metadata-internals.h: Likewise.
15470 * reflection.c (mono_class_bind_generic_parameters): Take and
15471 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
15472 (mono_reflection_bind_generic_parameters): Use
15473 'mono_class_bind_generic_parameters' rather than duplicate the code.
15474 * class.c (mono_bounded_array_class_get): Update to changes.
15475 * object-internals.h: Likewise.
15477 * reflection.c (mono_class_bind_generic_parameters): Only support
15478 parameterizing generic type definitions. Remove support for other
15481 2007-06-08 Zoltan Varga <vargaz@gmail.com>
15483 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
15485 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
15486 in the dynamic case.
15488 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
15490 * threads.c: When cleaning up thread, reset the Background bit.
15493 2007-06-08 Jonathan Chambers <joncham@gmail.com>
15495 * metadata.c: Move variable declarations to top of scope.
15496 * verify.c: Move variable declarations to top of scope.
15498 Code is contributed under MIT/X11 license.
15500 2007-06-08 Raja R Harinath <rharinath@novell.com>
15502 * reflection.c (mono_class_bind_generic_parameters): Replace
15503 open-coded loop with mono_metadata_inflate_generic_inst.
15505 * class.c (get_shared_generic_class): Don't call
15506 mono_get_shared_generic_inst. Use the container's own
15509 * metadata.c (mono_metadata_load_generic_params): Move
15510 initialization of 'context' field here from ...
15511 * class.c (mono_class_create_from_typedef): ... here, and ...
15512 * loader.c (mono_get_method_from_token): ... here.
15514 * class.c (get_shared_generic_class): Rename from
15515 mono_get_shared_generic_class and make static.
15516 (mono_get_shared_generic_inst): Move to metadata.c.
15517 * loader.c (mono_get_shared_generic_method): Likewise.
15518 * class-internals.h, metadata-internals.h: Update to changes.
15521 * class.c (mono_class_from_generic_parameter): Don't assume a
15522 generic container owner exists. Generic containers from monodis
15525 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
15527 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
15528 * verify.h: new typedefs to returns the non-verifiable status
15529 * verify.c: initial implementation of generics, stack merging and object compatibility check
15531 2007-06-06 Mark Probst <mark.probst@gmail.com>
15533 * class.c, image.c, class-internals.h (MonoImage): class_cache is
15534 a MonoInternalHashTable again (fixed bug in internal hash table
15537 2007-06-06 Mark Probst <mark.probst@gmail.com>
15539 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
15540 MonoInternalHashTable again (fixed bug in internal hash table
15543 2007-06-06 Mark Probst <mark.probst@gmail.com>
15545 * class.c, image.c, class-internals.h, domain.c,
15546 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
15547 changes. Have to figure out what makes them break the SWF
15550 2007-06-04 Mark Probst <mark.probst@gmail.com>
15552 * class.c, image.c, class-internals.h (MonoImage): class_cache is
15553 a MonoInternalHashTable now.
15555 2007-06-04 Mark Probst <mark.probst@gmail.com>
15557 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
15558 MonoInternalHashTable now.
15560 2007-05-31 Zoltan Varga <vargaz@gmail.com>
15562 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
15565 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
15567 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
15568 dependent trampoline.
15570 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15572 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
15574 2007-05-29 Robert Jordan <robertj@gmx.net>
15576 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
15578 2007-05-28 Zoltan Varga <vargaz@gmail.com>
15580 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
15582 2007-05-25 Jonathan Chambers <joncham@gmail.com>
15584 * marshal.c: Fix interface lookup loops for
15585 cominterop_get_com_slot_for_method and
15586 cominterop_get_method_interface. Only need to lookup
15587 if type is a class, else use interface type method is on.
15589 Code is contributed under MIT/X11 license.
15591 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
15593 * reflection.c: HasSecurity can be present even if no specially
15594 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
15595 SecurityAttribute). Fix CAS regression tests on buildbot.
15597 2007-05-24 Jonathan Chambers <joncham@gmail.com>
15599 * appdomain.c: Add configure checks for header files.
15600 * image.c: Add configure checks for header files.
15601 * file-io.c: Add configure checks for header files.
15602 * debug-mono-symfile.c: Add configure checks for header files.
15603 * threadpool.c: Add configure checks for header files.
15604 * console-io.c: Add configure checks for header files.
15605 * profiler.c: Add configure checks for header files.
15606 * rawbuffer.c: Add configure checks for header files.
15607 * icall.c: Add configure checks for header files.
15608 * rand.c: Add configure checks for header files.
15609 * socket-io.c: Add configure checks for header files.
15611 Code is contributed under MIT/X11 license.
15613 2007-05-24 Zoltan Varga <vargaz@gmail.com>
15615 * reflection.c (mono_custom_attrs_from_builders): Remove the
15616 assertion as it breaks the build.
15618 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
15620 * reflection.c (lookup_custom_attr): Make a copy here too.
15622 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
15625 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
15628 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
15631 2007-05-22 Zoltan Varga <vargaz@gmail.com>
15633 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
15634 (load_cattr_value): Ditto.
15636 2007-05-20 Zoltan Varga <vargaz@gmail.com>
15638 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
15640 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
15642 * threads.c: In "start_wrapper", set apartment_state to MTA if
15643 apartment_state is Unknown and we're running on 2.0 profile or
15645 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
15646 to main method, then set apartment_state to Unknown on 1.0 profile,
15647 and MTA on 2.0 profile.
15649 2007-05-16 Jb Evain <jb@nurv.fr>
15651 * class-internals.h (MonoDefaults): Add an attribute_class and
15652 customattribute_data_class.
15653 * domain.c (mono_init_internal): Populate them.
15654 * reflection.c: Use them to remove duplicates. Make a vew
15655 MonoClass variables `static'.
15657 2007-05-15 Massimiliano Mantione <massi@ximian.com>
15659 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
15660 step in implementing IMT, so that all isinst checks now can go
15661 through the bitmap.
15662 This was needed because vtables for TransparentProxy need to look
15663 like the vtable of the "target" class, so they need to point to
15664 its interface bitmap directly.
15666 * object.c: inside "mono_class_create_runtime_vtable" and
15667 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
15669 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
15671 * object-internals.h
15672 culture-info.h : added territory field in MonoCulture and
15673 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
15674 * locales.c : fill territory field above too.
15675 * culture-info-table.h : regenerated.
15677 2007-05-12 Zoltan Varga <vargaz@gmail.com>
15679 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
15682 2007-05-11 Jonathan Chambers <joncham@gmail.com>
15684 * object.c: Always initialize apartment, even if
15685 there is no custom attributes on entry point.
15687 Code is contributed under MIT/X11 license.
15689 2007-05-10 Jonathan Chambers <joncham@gmail.com>
15691 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
15692 * metadata.c: If no encoding is set, check for unicode
15695 Code is contributed under MIT/X11 license.
15697 2007-05-09 Jonathan Chambers <joncham@gmail.com>
15699 * threads.c: Handle if mono_thread_current returns NULL
15701 Code is contributed under MIT/X11 license.
15703 2007-05-09 Jonathan Chambers <joncham@gmail.com>
15705 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
15706 in start_wrapper. Added mono_thread_init_apartment_state and
15707 mono_thread_cleanup_apartment_state.
15708 * object.c: Initialize thread apartment state on main thread
15709 by checking for STAThreadAttribute on entry point.
15710 * object-internals.h: Add apartment_state field to MonoThread.
15711 * threads-types.h: Add unmanaged definition of
15712 System.Threading.ApartmentState, MonoThreadApartmentState.
15714 Code is contributed under MIT/X11 license.
15716 2007-05-08 Jonathan Chambers <joncham@gmail.com>
15718 * class.c: Fix windows build.
15719 * class-internals.h: Fix windows build.
15721 Code is contributed under MIT/X11 license.
15723 2007-05-08 Robert Jordan <robertj@gmx.net>
15725 * process.c (CreateProcess_internal):
15726 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
15727 .CreateNoWindow was specified. Fixes #81496.
15729 2007-05-08 Massimiliano Mantione <massi@ximian.com>
15731 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
15732 step in implementing IMT, replaced it with two compact arrays
15733 (interfaces_packed and interface_offsets_packed) and a bitmap that
15734 is used for isinst checks (interface_bitmap).
15736 * class.c: (compare_interface_ids): compare function to pass to
15737 bsearch when looking for an interface with a given id.
15738 (mono_class_interface_offset): reimplemented using bsearch on
15739 interfaces_packed, getting the offset from interface_offsets_packed.
15740 (print_implemented_interfaces): utility debugging function.
15741 (setup_interface_offsets): reworked to initialize interfaces_packed,
15742 interface_offsets_packed and interface_bitmap.
15744 * object.c: replaced all accesses to "MonoClass.interface_offsets"
15745 with uses of interfaces_packed and interface_offsets_packed.
15747 2007-05-08 Massimiliano Mantione <massi@ximian.com>
15749 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
15750 mono_class_interface_offset prototype to wrap all accesses to
15751 "MonoClass.interface_offsets".
15753 * class.c: Implemented mono_class_interface_offset, and wrapped all
15754 accesses to "MonoClass.interface_offsets".
15756 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
15757 "MonoClass.interface_offsets".
15759 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
15761 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
15762 GetMethodFromHandle overloads (bug #78637).
15764 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
15766 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
15767 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
15769 2007-05-01 Zoltan Varga <vargaz@gmail.com>
15771 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
15774 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
15776 (mono_custom_attrs_from_index): Ditto.
15778 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
15781 2007-04-30 Zoltan Varga <vargaz@gmail.com>
15783 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
15784 is now allocated from a mempool.
15786 2007-04-28 Zoltan Varga <vargaz@gmail.com>
15788 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
15789 caller holds threads_lock, leading to deadlocks. Fixes #81476.
15791 2007-04-26 Zoltan Varga <vargaz@gmail.com>
15793 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
15794 mono_loader_clear_error () too late. Fixes #81463.
15796 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
15798 * culture-info-table.h : regenerated.
15800 2007-04-25 Zoltan Varga <vargaz@gmail.com>
15802 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
15805 2007-04-25 Dick Porter <dick@ximian.com>
15807 * Makefile.am: Put the mingw enforced-optimisation back into the
15808 PLATFORM_WIN32 section.
15810 2007-04-24 Zoltan Varga <vargaz@gmail.com>
15812 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
15815 * image.c (mono_image_load_module): New API function to load a module reference.
15817 * image.c (load_modules): Load modules lazily. Fixes #80812.
15819 * class.c (mono_class_from_typeref): Use mono_image_load_module.
15821 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
15823 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
15824 to mono_image_load_module_dynamic.
15826 2007-04-23 Jonathan Chambers <joncham@gmail.com>
15828 * marshal.c: Fix calling convention for CCW on non-windows
15829 platforms. STDCALL on windows, CDECL everywhere else to work
15830 with XPCOM and MainWin COM.
15832 Code is contributed under MIT/X11 license.
15834 2007-04-23 Martin Baulig <martin@ximian.com>
15839 (method_from_memberref): Added `gboolean *used_context' argument.
15840 (mono_get_method_from_token): Likewise.
15841 (mono_get_method_full): Don't insert the method in the cache when
15842 `used_context' is true.
15844 2007-04-23 Raja R Harinath <rharinath@novell.com>
15846 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
15848 * reflection.c (mono_reflection_bind_generic_parameters): Don't
15849 create new MonoTypes for returned types.
15850 * class.c (mono_generic_class_get_class): Export mono-internal.
15851 * class-internals.h: Update to changes.
15853 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
15855 * threadpool.c, threadpool.h, icall-def.h: patch from
15856 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
15858 2007-04-18 Zoltan Varga <vargaz@gmail.com>
15860 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
15862 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
15864 * threads.c (mono_thread_get_stack_bounds): New helper function.
15866 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
15867 Correctly compute stack bounds when attaching. Fixes #81394.
15869 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
15871 * reflection.c: fix handling of doubles in custom attributes
15872 for the arm-fpa format (bug #81368).
15874 2007-04-18 Raja R Harinath <rharinath@novell.com>
15876 * reflection.c (assembly_add_win32_resources): Mildly relax an
15877 bounds check to let the end pointer point just past the end of the
15878 allocated buffer. (may fix #81384)
15880 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
15882 * culture-info-table.h : regenerated.
15884 2007-04-07 Zoltan Varga <vargaz@gmail.com>
15886 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
15887 the thread is aborted early.
15889 2007-04-05 Dick Porter <dick@ximian.com>
15891 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
15892 FindFirstFile()/FindNextFile() to find entries. This lets the
15893 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
15896 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
15898 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
15900 2007-04-04 Martin Baulig <martin@ximian.com>
15903 (mono_method_desc_full_match): Add support for nested classes.
15905 2007-04-02 Zoltan Varga <vargaz@gmail.com>
15907 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
15909 2007-04-01 Zoltan Varga <vargaz@gmail.com>
15911 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
15912 waiting for too many threads.
15914 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
15916 * environment.c: Fix return value check on uname so we can get the
15917 executing version on Solaris operating systems.
15919 2007-03-28 Jb Evain <jbevain@gmail.com>
15921 * class.c (mono_type_get_name_recurse): Complete the
15922 fix for the creation of assembly qualified names for
15923 pointer types. Fixes #81208.
15925 2007-03-27 Dick Porter <dick@ximian.com>
15927 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
15928 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
15932 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
15933 the value of ReleaseMutex().
15935 2007-03-27 Dick Porter <dick@ximian.com>
15937 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
15938 in little-endian order, not network endian, so must be converted
15939 to host endian here. Fixes bug 80593.
15941 2007-03-22 Jb Evain <jbevain@gmail.com>
15943 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
15944 qualified names for pointer types. Fixes #81208.
15946 2007-03-21 Jonathan Chambers <joncham@gmail.com>
15948 * marshal.c: Add support for PreserveSigAttribute.
15950 Code is contributed under MIT/X11 license.
15952 2007-03-14 Zoltan Varga <vargaz@gmail.com>
15954 * process.c: Fix endianness issues. Fixes #81126.
15956 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
15957 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
15959 * image.c (mono_image_lookup_resource): Make this work on big-endian
15960 machines.Change API contract so the caller needs to free the return value.
15962 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
15965 2007-03-14 Martin Baulig <martin@ximian.com>
15967 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
15968 mono_type_get_desc() as well.
15970 2007-03-13 Jonathan Chambers <joncham@gmail.com>
15972 * icall.c: Fix environ access in VS.
15974 2007-03-13 Alp Toker <alp@atoker.com>
15976 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
15977 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
15980 2007-03-12 Zoltan Varga <vargaz@gmail.com>
15982 * reflection.c (mono_reflection_create_dynamic_method): Add support for
15983 circular references among dynamic methods. Fixes #81091.
15985 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
15987 2007-03-09 Martin Baulig <martin@ximian.com>
15989 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
15991 2007-03-09 Jonathan Chambers <joncham@gmail.com>
15993 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
15994 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
15996 Code is contributed under MIT/X11 license.
15998 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
16000 * loader.c: Reapply patch for bug #79424.
16002 2007-03-06 Zoltan Varga <vargaz@gmail.com>
16004 * metadata.c (mono_type_to_unmanaged): Only convert object to
16005 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
16007 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
16009 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
16010 (and incorrectly set) is_reference field from MonoGenericInst.
16012 2007-03-06 Zoltan Varga <vargaz@gmail.com>
16014 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
16017 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
16019 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
16021 2007-03-05 Miguel de Icaza <miguel@novell.com>
16023 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
16024 FileOptions.1 value to mean "temporary", map that to
16025 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
16029 2007-03-03 Marek Habersack <mhabersack@novell.com>
16031 * appdomain.c: implement MS .Net style shadow copying. Copies of
16032 the assemblies are made in a subdirectory of the dynamic base
16033 directory, the assembly names are preserved.
16034 Copy .mdb and .config files along with the assemblies being shadowed.
16036 2007-02-28 Zoltan Varga <vargaz@gmail.com>
16038 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
16039 (emit_marshal_handleref): Ditto.
16041 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
16042 on Visual C++. Fixes #80671.
16044 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
16046 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
16047 for clone operations.
16049 2007-02-28 Zoltan Varga <vargaz@gmail.com>
16051 * marshal.c: Fix warnings.
16053 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
16055 * loader.c: allow case-insensitive matching of the dll name
16056 in dllmap handling when prefixed with "i:".
16058 2007-02-20 Jonathan Chambers <joncham@gmail.com>
16060 * threads.c: Fix #ifdef for dummy_apc function for VS.
16062 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
16064 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
16066 2007-02-19 Massimiliano Mantione <massi@ximian.com>
16067 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
16068 giving precedence to the methods with a fully qualified name
16069 (InterfaceName.MethodName) when building the interface sections
16072 2007-02-16 Dick Porter <dick@ximian.com>
16074 * threadpool.c (append_job): Fix fast-path array handling, so it's
16075 less likely the array will grow exponentially when the load is
16078 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
16080 * metadata-internals.h, loader.c: fix dllmap lookup order
16081 for non-function maps, too, and prepare for fallback code.
16083 2007-02-12 Robert Jordan <robertj@gmx.net>
16085 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
16086 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
16087 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
16088 GlobalFree. Fixes a part of bug #77075.
16090 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
16092 * loader.c: implemented typedef parent in field memberref.
16094 2007-02-11 Jonathan Chambers <joncham@gmail.com>
16096 * marshal.c: Fix warnings and remember to call Release on
16099 Code is contributed under MIT/X11 license.
16101 2007-02-10 Miguel de Icaza <miguel@novell.com>
16103 * class-internals.h: Add MonoHandleRef definition, and
16104 handleref_class to mono_defaults.
16106 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
16107 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
16109 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
16110 (do nothing on this stage)
16111 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
16112 (emit_marshal_handleref): New method, used for argument handling
16115 2007-02-08 Jonathan Chambers <joncham@gmail.com>
16117 * class.c (mono_class_setup_parent): Lazily init com types.
16118 * domain.c (mono_init_internal, mono_init_com_types): Lazily
16120 * object.c (mono_remote_class_vtable): Lazily init com types.
16121 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
16122 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
16123 * domain-internals.h: Expose mono_init_com_types.
16124 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
16125 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
16126 Add support for COM Callable Wrapper marshalling.
16127 * marshal.h: Add icall definitions.
16128 * gc.c: Handle freeing of CCWs in finalizer code.
16130 Code is contributed under MIT/X11 license.
16132 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
16134 * reflection.c: changed all the signature encoding code to use
16135 a variable-sized buffer.
16137 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
16139 * marshal.c: locking fixes: never take the loader lock
16140 or other runtime locks when holding the marshal lock
16143 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
16145 * marshal.c: make the delegate function pointer mapping
16146 work for the moving GC.
16148 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
16150 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
16153 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
16155 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
16158 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
16160 * threadpool.c: made the code moving-GC safe.
16162 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
16164 * assembly.c, boehm-gc.c, class-internals.h, class.c,
16165 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
16166 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
16168 * reflection.c: warning cleanup, some threading and moving GC fixes.
16170 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
16172 * class.c, loader.c: create the needed Set/Get/Address array methods
16173 as well as the .ctors in mono_class_init (), fixes bug #80567.
16175 2007-01-24 Zoltan Varga <vargaz@gmail.com>
16177 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
16178 we doesn't decrease its alignment. Should fix the sparc build.
16180 2007-01-24 Dick Porter <dick@ximian.com>
16183 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
16184 Create the returned object if we need to ignore an unsupported
16185 socket option. Fixes a segfault reported by Atsushi.
16187 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
16189 * class.c, object.c: restrict GC-tracked fields to
16190 UIntPtr fields used inside corlib, so we provide better
16191 type info to the GC and also allow broken packing as in
16194 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
16196 * sgen-gc.c: removed duplicated function.
16198 2007-01-19 Miguel de Icaza <miguel@novell.com>
16200 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
16201 value that means that the value is not supported, but that we
16202 should not return a failure, but instead report this as a
16203 successful operation.
16205 2007-01-19 Raja R Harinath <rharinath@novell.com>
16207 Fix tests/bug79956.2.il
16208 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
16209 (mono_generic_class_get_class): If the generic definition in an
16210 enum, copy over other fields related to it.
16212 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
16214 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
16215 genericinst enums (bug #79215).
16217 2007-01-17 Massimiliano Mantione <massi@ximian.com>
16218 * class.c: Fix bug 80307.
16220 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
16222 * image.c: if the file table is not present, try to load
16223 all the modules, since we don't have info about them
16224 having or not metadata (bug #80517).
16225 * assembly.c: allow mono_assembly_load_references () to
16226 work for netmodules.
16228 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
16230 * image.c, metadata-internals.h, object.c: execute module
16231 cctors when running on the 2 runtime if present (bug #80487).
16233 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
16235 * icall.c: optimized InitializeArray() on bigendian.
16237 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
16239 * icall.c: fix for the broken ARM FPA double format.
16241 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
16243 * icall.c: handle endian issues for r4 and r8 types, too, in
16244 the InitializeArray() icall.
16246 2007-01-15 Miguel de Icaza <miguel@novell.com>
16248 * loader.c (mono_loader_error_prepare_exception): Clear the error
16249 once we have extracted the information from it, do this before we
16250 call into the JIT's class loading mechanisms.
16252 * object.c (mono_class_create_runtime_vtable): Do not clear the
16253 loader error before calling mono_class_get_exception_for_failure
16254 as the loader error is needed inside
16255 mono_class_get_exception_for_failure to throw the error (thinko).
16259 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
16261 * reflection.c: align fields rva data so it's faster to load at
16264 2007-01-12 Raja R Harinath <rharinath@novell.com>
16266 Prepare to simplify GenericMethod handling.
16267 * class-internals.h (mono_method_get_context): New accessor function.
16268 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
16269 rather than directly accessing '->context' field.
16271 * class-internals.h (_MonoGenericParam.method): Move ...
16272 (_MonoGenericContainer): ... here. Add into union with klass field.
16273 * class.c, icall.c, loader.c, metadata.c, reflection.c:
16276 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
16278 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
16279 the wrapper type enum and reduce relocations.
16281 2007-01-12 Raja R Harinath <rharinath@novell.com>
16283 * reflection.c (inflate_mono_method): Reuse method instantiation
16284 from the generic method, if available.
16286 2007-01-11 Jonathan Chambers <joncham@gmail.com>
16288 * marshal.c (emit_marshal_variant): Fix conv_arg
16289 type in last commit, based on whether parameter is byref.
16291 2007-01-11 Jonathan Chambers <joncham@gmail.com>
16293 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
16295 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
16296 MONO_TYPE_OBJECT back for VARIANT support.
16298 2007-01-11 Jonathan Chambers <joncham@gmail.com>
16300 * marshal.c, marshal.h, icall-def.h: Implement
16301 Marshal.ReAllocCoTaskMem.
16303 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
16305 * marshal.c: memory retention fixes: use the proper
16306 image cache for runtime_invoke method lookups.
16308 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
16310 * mempool.c: added code to help debug mempool allocations.
16312 2007-01-11 Dick Porter <dick@ximian.com>
16314 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
16315 support (experimenting with faking it with IP_MTU_DISCOVER for
16316 systems that don't have IP_DONTFRAGMENT.)
16317 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
16320 * icall-def.h: new System.Net.Sockets.Disconnect icall.
16322 * socket-io.h: Add new fields to MonoSocketAsyncResult
16323 corresponding to the new ones in Socket.cs.
16325 2007-01-11 Raja R Harinath <rharinath@novell.com>
16327 Fix IronPython regression mentioned in #80249
16328 * metadata.c (do_mono_metadata_parse_generic_class): Clear
16329 'cached_context' field, since it may have been initialized as a
16330 side-effect of metadata parsing.
16332 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
16333 (_MonoGenericClass.cached_class): Move here and rename from lone
16334 remaining field of ...
16335 (_MonoInflatedGenericClass): ... this. Remove.
16336 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
16339 Fix mcs/tests/test-128.cs regression.
16340 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
16341 2007-01-10 change below.
16342 [MONO_TYPE_OBJECT]: Recurse into array case.
16344 2007-01-11 Raja R Harinath <harinath@gmail.com>
16346 * class-internals.h (mono_get_inflated_generic_class): Remove.
16347 * class.c (mono_get_inflated_generic_class): Remove.
16348 (mono_generic_class_get_class): Rename from
16349 mono_class_create_generic.
16350 (mono_class_from_mono_type) [GENERICINST]: Use it.
16351 * reflection.c, metadata.c: Update to changes. Use
16352 'mono_class_from_mono_type'.
16354 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
16356 * reflection.c: use passed type when encoding an array element
16357 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
16359 2007-01-09 Robert Jordan <robertj@gmx.net>
16361 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
16362 result arguments (someDelegate.EndInvoke (unrelatedAres)).
16365 2007-01-09 Raja R Harinath <rharinath@novell.com>
16367 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
16369 * object.c (set_value): Avoid aliasing between type->data.klass
16370 and type->data.generic_class.
16372 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
16374 2007-01-08 Raja R Harinath <rharinath@novell.com>
16376 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
16377 between type->data.klass and type->data.generic_class.
16379 2007-01-08 Lluis Sanchez <lluis@ximian.com>
16381 * marshal.c: In MS.NET, StringBuilder objects are not copied by
16382 value in out parameters.
16384 2007-01-08 Raja R Harinath <rharinath@novell.com>
16386 Simplify invariant for MonoGenericClass::klass field.
16387 * class.c (mono_class_create_generic): Verify 'klass' is null.
16388 * metadata.c (do_mono_metadata_parse_generic_class): Don't
16389 initialize 'klass' field.
16391 2007-01-05 Raja R Harinath <rharinath@novell.com>
16393 Ongoing work to avoid redundant data and simplify invariants.
16394 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
16395 'generic_class', and change type to a GenericInst.
16396 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
16397 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
16399 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
16401 * class.c : skip io-layer under PLATFORM_WIN32.
16403 2007-01-03 Tor Lillqvist <tml@novell.com>
16405 Fix #80305: In a bundled executable, look in the bundled exe
16406 assembly to determine the runtime version. Add the possibility to
16407 bundle also the machine.config file.
16409 * assembly.c (mono_assembly_open_from_bundle): Make
16410 non-static. Allow being called even if we have no bundled
16411 assemblies, and return NULL right away in that case.
16413 * domain-internals.h: Declare mono_assembly_open_from_bundle()
16416 * domain.c (app_config_parse): Take an assembly exe file name as
16417 parameter instead of a config file name. Check for a bundled
16418 config file for that assembly by calling
16419 mono_config_string_for_assembly_file() (see below) before looking
16420 for one in the file system.
16421 (get_runtimes_from_exe): Corrsponding change to call of
16422 app_config_parse().
16423 (get_runtimes_from_exe): Check for bundled assembly exe file first
16424 by calling mono_assembly_open_from_bundle(). If no bundled
16425 assembly exe file is found, call mono_image_open() as before to
16426 look it up in the file system.
16428 * mono-config.c: Add variable bundled_machinec_onfig.
16429 (mono_config_string_for_assembly_file): New function.
16430 (mono_config_for_assembly): Move code snippet that looks for a
16431 bundled assembly .config file into the above new function. Call
16433 (mono_register_machine_config, mono_get_machine_config): New
16434 functions to set and retrieve
16436 * assembly.h: Declare mono_register_machine_config().
16438 * mono-config.h: Declare mono_get_machine_config() and
16439 mono_config_string_for_assembly_file().
16441 * icall.c: No declaration of environ necessary on Win32. It is
16442 declared (as a macro expanding to a function call) in stdlib.h.
16443 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
16444 New internal mono function. Returns the value of
16445 mono_get_machine_config() as a Mono string.
16447 * icall-def.h: Add get_bundled_machine_config().
16449 2007-01-04 Raja R Harinath <rharinath@novell.com>
16451 Remove redundant field
16452 * class-internals.h (_MonoGenericContext.container): Remove field.
16453 * loader.c (mono_method_get_signature_full): Don't parse a
16454 "container" for a signature parse when the signature is inflated
16456 (method_from_methodspec): Likewise, for a generic_inst.
16457 * class.c, metadata.c, reflection.c: Update to changes.
16459 2006-01-04 Raja R Harinath <rharinath@novell.com>
16461 * class-internals.h (_MonoGenericClass): Rename 'context' field to
16462 'cached_context', and change semantics -- it starts off NULL, and
16463 is initialized on demand.
16464 * class.c (mono_generic_class_get_context): New accessor to
16465 replace 'context' field accesses.
16466 (mono_class_get_context): New helper.
16467 (*): Update to changes.
16468 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
16470 2007-01-03 Miguel de Icaza <miguel@novell.com>
16472 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
16473 before the memcpy. Fixes Marshal2 regression.
16475 2007-01-02 Jb Evain <jbevain@gmail.com>
16477 * blob.h: add a MONO_TYPE_ENUM definition
16478 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
16479 fix the encoding of arrays of enums in custom attributes.
16483 2007-01-01 Miguel de Icaza <miguel@novell.com>
16485 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
16486 string is null terminated, but only cut the string short if it
16487 overflows the buffer.
16489 (mono_string_to_byvalstr): Also fix this routine. The code here
16490 was not properly terminating a string (it was only terminated
16491 because of the previous catch-all memset).
16493 I left the memset, because I do not know if applications expect
16494 the runtime to clear this region.
16498 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
16499 Clear the error before returning to unmanaged code to prevent the
16500 runtime from being confused later on (fixes 80420).
16501 (ves_icall_type_from_name): Always call mono_loader_clear_error
16502 after parsing a type that could have failed.
16503 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
16505 * loader.c (mono_loader_clear_error): Fix indentation.
16507 2006-12-28 Martin Baulig <martin@ximian.com>
16509 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
16511 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
16513 * reflection.c: patch from Rolf Bjarne Kvinge to fix
16514 getting a token for an EnumBuilder.
16516 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
16518 * reflection.c: be more careful in case resource generation
16519 fails to create the data array.
16521 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
16523 * sgen-gc.c: write barrier for clone and fix unregister handles.
16525 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
16527 * reflection.c: some fixes needed in the generics code for the moving GC.
16529 2006-12-22 Robert Jordan <robertj@gmx.net>
16531 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
16532 account. Fixes bug #80299.
16534 2006-12-21 Raja R Harinath <rharinath@novell.com>
16536 Fix WaitHandle usage in delegates.
16537 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
16538 * object.c (mono_wait_handle_new): Use the property set method to
16539 initialize the handle.
16540 (mono_wait_handle_get_handle): New.
16541 * threadpool.c (mono_async_invoke): Use it.
16542 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
16544 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
16546 2006-12-21 Jonathan Chambers <joncham@gmail.com>
16548 * marshal.c (emit_marshal): Call emit_marshal_variant and
16549 emit_marshal_com_interface when applicable.
16550 (emit_marshal_variant, emit_marshal_com_interface): Add
16551 methods for this case and remove if's from emit_marshal_object.
16553 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
16555 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
16557 2006-12-19 Jonathan Chambers <joncham@gmail.com>
16559 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
16560 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
16561 and GlobalFree on Windows. Remove FIXME.
16563 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
16565 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
16566 implementation for managed objects.
16568 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
16570 * object.c: implemented code to be used for checking
16571 that no reference field overlaps with non-references.
16573 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16575 * threadpool.c: fix queue code to be compatible with the
16578 2006-12-18 Miguel de Icaza <miguel@novell.com>
16580 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
16581 in structures by throwing ArgumentNullException.
16583 (emit_marshal_safehandle): Also when they are null parameters.
16585 (emit_marshal_safehandle): Add support for ref
16586 SafeHandles parameters
16588 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16590 * profiler.c: updated to use the mono-dl API instead of
16593 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16595 * profiler.c: updated to use the mono-dl dynamic loading
16596 API instead of gmodule.
16598 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
16600 * profiler.c: use readlink, older versions of glib don't have
16601 g_file_read_link ().
16603 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16605 * profiler.c: try to detect the path to mono if libc fails to provide
16606 a useful name (bug #80286).
16608 2006-12-16 Raja R Harinath <rharinath@novell.com>
16611 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
16612 instance, use the generic type definition instead.
16613 (ves_icall_Type_GetNestedTypes): Likewise.
16614 * class.c (mono_class_create_generic): Always set the
16615 nested_classes of a generic instance to NULL, even if the generic
16616 type definition has nested types.
16618 2006-12-15 Jonathan Chambers <joncham@gmail.com>
16620 * marshal.c (mono_string_from_bstr): Revert previous Windows change
16623 2006-12-15 Miguel de Icaza <miguel@novell.com>
16625 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
16626 my arguments were in the wrong order. I also fixed the Windows
16627 version which seems to have had the same issue.
16629 (mono_free_bstr): On Unix, this is g_free.
16630 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
16631 conversions (for the tests in corlib to pass).
16633 2006-12-14 Miguel de Icaza <miguel@novell.com>
16635 * marshal.c (emit_ptr_to_object_conv): For now, ignore
16636 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
16637 exception if a ref SafeHandle in a struct has changed).
16639 (emit_struct_conv): Do not perform layout checks for classes
16640 derived from SafeHandle, as those are specially handled.
16642 (emit_object_to_ptr_conv): Add support for
16643 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
16645 (emit_marshal_safehandle): Implement conversion of return values
16646 of safehandles (MARSHAL_ACTION_CONV_RESULT).
16648 * threads.c: WaitHandle now is compiled with two different handles
16649 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
16652 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
16653 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
16654 these routines to cope with both kinds of fields.
16656 2006-12-12 Miguel de Icaza <miguel@novell.com>
16658 * metadata.c (mono_type_to_unmanaged): Handle the case where
16659 type->data.klass is a SafeHandle, and in that case, return the
16660 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
16661 MONO_MARSHAL_CONV_SAFEHANDLE.
16663 2006-12-11 Miguel de Icaza <miguel@novell.com>
16665 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
16666 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
16667 calling emit_marshal_object.
16669 (emit_marshal_safehandle): Implement marshalling of
16670 SafeHandle parameters (no ref support yet).
16672 (MarshalAction): Document the defines as I implement
16673 them for SafeHandle.
16675 (emit_marshal_object): indentation police.
16677 * class-internals.h: Define MonoSafeHandle.
16678 Add safehandle_class to MonoDefaults type.
16680 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
16681 list of classes to check for fields.
16683 * domain.c (mono_init_internal): Add SafeHandle to the list of
16684 mono_defaults loaded.
16686 2006-12-15 Raja R Harinath <rharinath@novell.com>
16689 * reflection.c (mono_reflection_bind_generic_parameters): If the
16690 generic type definition is a type builder, ensure that it is fully
16691 initialized before instantiating it. Kill some dead code.
16693 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
16695 * object.c: clear the loader_error () before loading
16696 more metadata stuff (bug #80258).
16698 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
16700 * icall.c, icall-defs.h: type modifiers icalls for
16701 parameters and properties.
16703 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
16705 * object.c, icall.c: fixed warnings.
16707 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
16709 * marshal.c: fixed a couple of leaks and coding style in a few places.
16711 2006-12-08 Dick Porter <dick@ximian.com>
16713 * process.c: Cope with NULL ProcessStartInfo arguments on windows
16714 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
16717 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
16719 * process.c: ProcessStartInfo may have only filename set and
16720 arguments can be NULL.
16722 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16724 * icall.c: fix leak found by Robert Jordan.
16726 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
16728 * marshal.c, marshal.h: generate managed method to access an element
16729 of a multi-dimensional array.
16731 2006-11-30 Paolo Molaro (lupus@ximian.com)
16733 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
16735 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16737 * icall.c: back out GetFields () fix until the serialization code is
16738 fixed to not depend on the incorrect behaviour.
16740 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
16742 * profiler.c: provide defaults if none are set.
16744 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
16746 * Makefile.am, attrdefs.h: new public header file with
16747 constants for attributes for use by embedders.
16749 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
16751 * icall.c: GetFields () fix for bug #80064.
16753 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
16755 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
16756 removed long unused icalls.
16758 2006-11-27 Jonathan Chambers <joncham@gmail.com>
16761 (mono_marshal_emit_managed_wrapper): Level of indirection for
16762 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
16763 can be generated without a delegate class.
16764 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
16766 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
16768 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16770 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
16773 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16775 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
16776 icall-def.h: added icalls needed by System.GC.
16778 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
16780 * loader.c: ensure the class in catch clauses is handled
16781 correctly for generics methods (fixes bug#79980).
16783 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
16785 * monitor.h, monitor.c: added mono_locks_dump () function
16786 to help debug deadlocks involving managed locks.
16788 2006-11-13 Dick Porter <dick@ximian.com>
16790 * file-io.c (get_file_attributes): If the file is a symlink try
16791 and get the stat data for the target, but also add the
16792 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
16793 the specs for the windows symlink support, but will probably have
16794 to be reworked when I have test data from a vista machine. Fixes
16797 2006-11-13 Dick Porter <dick@ximian.com>
16799 * gc.c (mono_domain_finalize):
16800 * marshal.c (mono_delegate_begin_invoke):
16801 * threadpool.c (socket_io_init, mono_thread_pool_init)
16802 (mono_thread_pool_finish):
16803 * monitor.c (mono_monitor_try_enter_internal):
16804 * threads.c (mono_thread_resume, mono_thread_init)
16805 (mono_thread_suspend_all_other_threads)
16806 (mono_thread_execute_interruption):
16807 * appdomain.c (mono_domain_unload): Check for NULL error returns
16808 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
16811 2006-11-11 Miguel de Icaza <miguel@novell.com>
16814 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
16815 Only close the handle if the value of the handle is not
16816 INVALID_HANDLE_VALUE. This just makes the process a bit more
16819 Improvement for #75733, so that we do not run into this problem.
16822 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
16823 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
16824 internal variables. Fixes #79462
16827 2006-11-09 Dick Porter <dick@ximian.com>
16829 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
16830 Use poll() not select(). Fixes bug 79397.
16832 2006-11-09 Raja R Harinath <rharinath@novell.com>
16835 * assembly.c (mono_assembly_load_from_full): Check that the given
16836 image has an assembly manifest.
16838 2006-11-09 Ankit Jain <jankit@novell.com>
16840 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
16841 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
16842 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
16844 2006-11-07 Dick Porter <dick@ximian.com>
16846 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
16847 Put the old resolver behaviour back for pre-2.0 profiles.
16849 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
16851 * threadpool.c: precise GC and locking fixes.
16853 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
16855 * class.c: don't load types that have an explicit unaligned
16856 managed reference. Provide better info in the TypeLoad exception.
16857 Part of the fix for bug #79744.
16858 * object.c: use the correct check for class type load issues.
16860 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
16862 * class.c: enforce alignment of fields with managed references
16863 even when Pack=1 is forced by the user (bug #77788).
16865 2006-11-03 Dick Porter <dick@ximian.com>
16867 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
16868 If the address reverse lookup fails, return it as the hostname
16869 anyway. Fixes bug 79721.
16871 2006-11-03 Dick Porter <dick@ximian.com>
16873 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
16874 Fix build on Windows.
16876 2006-11-02 Dick Porter <dick@ximian.com>
16879 * object-internals.h:
16880 * exception.c (mono_get_exception_thread_interrupted):
16881 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
16884 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
16885 Check for pending Thread.Interrupt.
16887 2006-10-27 Massimiliano Mantione <massi@ximian.com>
16888 * loader.c: Fixed bug 79684.
16890 2006-10-27 Dick Porter <dick@ximian.com>
16892 * file-io.c (get_file_attributes): Force symlinks to directories
16893 to be returned as a regular file. Fixes bug 79733.
16894 2006-10-26 Dick Porter <dick@ximian.com>
16896 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
16897 CreateFile to open a directory then we need to set the
16898 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
16900 2006-10-23 Zoltan Varga <vargaz@gmail.com>
16902 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
16905 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
16907 * sgengc.c: small cleanup of timer code.
16909 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
16911 * sgen-gc.c: fix some warnings and start adding support for
16912 complete object removal on domain unload.
16914 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
16916 * assembly.c: build_assembly_name should not consider a version
16917 number without build or revision number invalid. Fixes bug #79715.
16919 2006-10-18 Jonathan Chambers <joncham@gmail.com>
16921 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
16922 call kernel32 function OutputDebugString directly.
16924 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
16926 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
16928 * reflection.c: small cleanup, using a function to insert a MonoString
16929 in the string heap.
16931 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
16933 * reflection.c: moving GC fixes.
16935 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
16937 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
16938 all the objects with finalizers belonging to an unloading appdomain.
16940 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
16942 * sgen-gc.c: added ability to allocate even when the nursery is fully
16943 pinned and fixed a couple of bugs.
16945 2006-10-15 Zoltan Varga <vargaz@gmail.com>
16947 * threads.h: Revert the last change for now.
16949 * threads.h (mono_thread_get_pending_exception): Rename this to
16950 mono_thread_get_undeniable_exception ().
16952 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
16954 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
16955 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
16956 when fname does not refer to valid assembly. This result in a more
16957 meaningful error message.
16958 * exception.c: added mono_get_exception_bad_image_format2 which
16959 constructs a BadImageFormatException using the ctor taking a custom
16960 message and the file name. Passing in a NULL msg results in a default
16962 * exception.h: define mono_get_exception_bad_image_format2 function.
16963 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
16964 when file name pointed to an invalid IL image. Use
16965 mono_get_exception_file_not_found2 to construct FileNotFoundException,
16966 as this results in a more meaningful error message.
16968 2006-10-15 Zoltan Varga <vargaz@gmail.com>
16970 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
16973 2006-10-12 Zoltan Varga <vargaz@gmail.com>
16975 * metadata.c (mono_type_size): Change the align parameter to guint32 for
16976 consistency with the other _size functions.
16977 (mono_type_stack_size): Ditto.
16979 * class.c object.c icall.c: Fix warnings caused by the above change.
16981 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
16983 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
16985 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
16987 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
16989 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
16990 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
16991 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
16992 threadpool.h, threads-types.h: mark more internal functions.
16994 2006-10-11 Dick Porter <dick@ximian.com>
16996 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
16997 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
16998 reproduce the bug even before applying the fix.)
17000 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
17002 * reflection.c: allow retrieving attributes for arguments in generic
17003 methods (bug #79241).
17005 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
17007 * debug-mono-symfile.c: properly check fopen () result (found by
17010 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
17012 * reflection.c: make error message clearer and fixed two
17013 issuelets found by Coverity.
17015 2006-10-10 Zoltan Varga <vargaz@gmail.com>
17017 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
17019 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
17021 * object-internals.h, gc-internal.h, profiler-private.h:
17022 mark internal functions.
17024 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
17026 * reflection.c: put data in the text section.
17027 * icall.c: recognize more types in type_from_typename ().
17028 * process.c, marshal.c: added some GC FIXMEs.
17030 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
17032 * loader.c: check for NULL before initializing.
17034 2006-10-09 Zoltan Varga <vargaz@gmail.com>
17036 * gc.c (finalizer_thread): Use a non-alertable wait here.
17038 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
17039 until the correct solution is found.
17041 2006-10-06 Zoltan Varga <vargaz@gmail.com>
17043 * reflection.c (mono_module_get_object): Avoid an assert when operating on
17044 modules with no metadata. Fixes #79596.
17046 * image.c (load_metadata_ptrs): Put back the error message when
17047 the #- heap is encountered since the support is not complete yet.
17049 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
17051 * gc.c: do not allow the user to SuppressFinalize () a
17052 delegate because it would leak the trampoline if present.
17054 2006-10-06 Zoltan Varga <vargaz@gmail.com>
17056 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
17059 2006-10-05 Zoltan Varga <vargaz@gmail.com>
17061 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
17063 * metadata.c (mono_metadata_get_param_attrs): Ditto.
17065 * row-indexes.h: Add definitions for *Ptr tables.
17067 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
17069 * metadata.c (mono_metadata_translate_token_index): New helper function to
17070 translate table indexes used in uncompressed metadata.
17071 (mono_metadata_decode_table_row): Ditto.
17072 (mono_metadata_decode_table_row_col): Ditto.
17074 * metadata.c: Add table schema for *Ptr tables.
17076 * class.c loader.c: Use the new helper function to access the affected metadata
17079 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
17082 2006-10-04 Zoltan Varga <vargaz@gmail.com>
17084 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
17085 sequences which can be unbounded in size. Fixes #79583.
17087 2006-10-02 Zoltan Varga <vargaz@gmail.com>
17089 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
17090 static initialization.
17092 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
17094 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
17096 * domain.c (mono_domain_free): Free up type_init_exception_hash.
17098 * object.c (mono_runtime_class_init): Implement correct semantics when a static
17099 ctor fails, i.e. throw the same exception on subsequent accesses.
17101 2006-09-0 Jonathan Chambers <joncham@gmail.com>
17103 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
17104 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
17105 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
17106 Handle marshalling of interfaces and VARIANTs contained in structs.
17108 Code is contributed under MIT/X11 license.
17110 2006-09-30 Zoltan Varga <vargaz@gmail.com>
17112 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
17114 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
17117 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17119 * console-io.c: ignore previous SIGINT handler.
17121 2006-09-27 Zoltan Varga <vargaz@gmail.com>
17123 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
17124 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
17125 #79460, #79461, #79485.
17127 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
17129 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
17132 2006-09-26 Zoltan Varga <vargaz@gmail.com>
17134 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
17135 could be generated from it.
17137 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
17139 * rand.c: fix read loop to correctly handle EINTR.
17141 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
17143 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
17144 internal calls are defined to keep methods closer to the declaring
17145 type and allow a significant reduction in runtime relocations and
17148 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
17150 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
17151 exception message to have FileNotFoundException use the default
17152 assembly load error message. Fixes bug #79426.
17153 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
17155 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17157 * threadpool.c: (start_thread_or_queue) use the root domain when
17158 creating the thread instead of the async object one.
17160 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
17162 * class.c, object.c, class-internals.h, reflection.c:
17163 for arrays, store element_size inside MonoClass (speedup
17164 for array object creation).
17166 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
17168 * icall.c: fixed CodeBase to use the file name and not the module
17171 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
17173 * mono-debug.c, mono-debug.h: export find_method as
17174 mono_debug_find_method ().
17176 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
17178 * debug-helpers.c, class-internals.h: added a few functions useful
17179 when debugging under gdb.
17181 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17183 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
17184 characters that need special handling.
17186 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
17188 * mono-config.c: make the os/cpu specification more flexible,
17189 allowing lists and negation.
17191 2006-09-18 Jonathan Chambers <joncham@gmail.com>
17193 * marshal.c: COM Interop fixes. Handle case where method->klass.
17194 is interface. Handle BSTR/MonoString when null. Use CDECL as
17195 calling convention on non-windows platforms. This is for
17196 compatibility with XPCOM and MainWin COM.
17198 Code is contributed under MIT/X11 license.
17201 2006-09-18 Zoltan Varga <vargaz@gmail.com>
17203 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
17204 correctly. Fixes #79217.
17206 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
17208 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
17210 * mono-config.c: allow both an os and cpu attribute for dllmap
17211 and dllentry elemnets to enable a single config file to be used
17212 for multiple architectures.
17214 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
17216 * loader.c: MonoLoaderError was cleared too soon on load failure.
17219 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
17221 * icall.c: use the defining class vtable when accessing a
17222 static field, not a pobblibly derived class.
17224 2006-09-17 Zoltan Varga <vargaz@gmail.com>
17226 * icall.c string-icalls.c: Remove references to unicode.h.
17228 * unicode.h unicode.c Makefile.am: Remove these unused source files.
17230 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
17232 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
17233 indicating the image where custom marshaller types should be looked up.
17234 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
17235 custom marshallers, instead of corlib. Fixes #79425.
17237 2006-09-14 Zoltan Varga <vargaz@gmail.com>
17239 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
17241 2006-09-14 Jonathan Chambers <joncham@gmail.com>
17243 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
17244 Implement Environment.ProcessorCount.
17246 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
17247 Implement Environment.ProcessorCount.
17250 Add Environment.ProcessorCount icall.
17252 Patch by Jason McFall.
17254 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17256 * assembly.c: don't append .exe/.dll when the filename already contains
17257 one of those extensions.
17259 2006-09-12 Martin Baulig <martin@ximian.com>
17261 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
17262 to array interfaces.
17264 2006-09-11 Martin Baulig <martin@ximian.com>
17266 * reflection.c (mono_image_build_metadata): Create the
17267 MethodImpl's after emitting all types and methods, so we don't
17268 need another fixup pass for them.
17270 2006-09-11 Zoltan Varga <vargaz@gmail.com>
17272 * class.c (mono_class_from_name_case): Fix regression introduced by the last
17275 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
17277 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
17280 2006-09-10 Zoltan Varga <vargaz@gmail.com>
17282 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
17283 args is not set. Fixes #78926.
17285 2006-09-08 Zoltan Varga <vargaz@gmail.com>
17287 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
17289 * image.c (load_class_names): Move this to class.c, and rename it to
17290 'mono_image_init_name_cache'.
17291 (load_modules): Fix a warning.
17293 * class.c icall.c image.c: Initialize image->name_cache lazily.
17295 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
17296 on its name using information in the AOT file.
17298 * class.c (mono_class_from_name): Use the new hook function.
17300 2006-09-06 Zoltan Varga <vargaz@gmail.com>
17302 * reflection.c (mono_param_get_objects): Handle enum default parameter values
17305 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
17308 2006-09-06 Martin Baulig <martin@ximian.com>
17310 * icall.c (mono_lookup_internal_call): Small fix.
17312 2006-09-05 Raja R Harinath <rharinath@novell.com>
17314 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
17317 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
17319 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
17320 when --debug is specified.
17322 2006-09-04 Zoltan Varga <vargaz@gmail.com>
17324 * class.c (setup_generic_array_ifaces): Fix a warning.
17326 2006-09-04 Miguel de Icaza <miguel@novell.com>
17328 * Temporarily remove the patch to assemly.c that checks the
17329 assembly versions as it breaks our gacutil.
17331 2006-09-03 Zoltan Varga <vargaz@gmail.com>
17333 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
17335 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
17338 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
17339 created using the default ctor. Fixes #79152.
17340 (mono_string_builder_to_utf16): Ditto.
17342 2006-09-01 Martin Baulig <martin@ximian.com>
17344 Fix handling of the generic array interfaces.
17346 * class-internals.h
17347 (MonoDefaults): Removed `generic_array_class' and added
17348 `generic_ilist' class.
17351 (mono_bounded_array_class_get): Add the new generic array interfaces.
17352 (setup_generic_array_ifaces): New static method; create vtable
17353 entries for each method in the generic array interfaces.
17356 (select_container): Allow "parent-less" generic methods.
17359 (mono_marshal_get_generic_array_helper): New public method.
17362 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
17363 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
17364 moved the interncall into System.Array.
17366 2006-09-01 Raja R Harinath <rharinath@novell.com>
17368 A few more cases of avoiding work on types with ->byref set.
17369 Has the real fix for #79238
17370 * icall.c (is_generic_parameter): New helper.
17371 (ves_icall_Type_GetGenericParameterPosition): Use it.
17372 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
17373 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
17374 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
17375 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
17377 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
17379 (ves_icall_Type_get_IsGenericInstance): Likewise.
17380 (ves_icall_Type_get_IsGenericType): Likewise.
17382 2006-09-01 Zoltan Varga <vargaz@gmail.com>
17384 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
17387 * mempool.h (mono_mempool_get_allocated): New helper function.
17389 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
17392 * mempool.c: Fix warnings and the calculation of stats.
17394 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
17396 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
17398 * loader.c (mono_get_method_from_token): Update method_count stat.
17400 * class-internals.h (MonoStats): Add some stats.
17402 2006-08-31 Robert Jordan <robertj@gmx.net>
17404 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
17405 with managed variants.
17406 All code is contributed under the MIT/X11 license.
17408 2006-08-31 Zoltan Varga <vargaz@gmail.com>
17410 * reflection.c (reflection_methodbuilder_to_mono_method): Set
17411 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
17413 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
17415 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
17416 with cycles in classes.
17418 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
17420 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
17421 missing a [MarshalAs] directive. Fixes #79203.
17423 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
17424 klass->marshal_info. Fixes #79217.
17426 2006-08-30 Martin Baulig <martin@ximian.com>
17428 Committing a patch from Joachim Ante <joe@otee.dk>:
17429 Add support for binary data symbol stores.
17431 * debug-mono-symfile.c
17432 (mono_debug_open_mono_symbol_file): Renamed into
17433 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
17437 (mono_debug_open_image): Added `raw_contents' and `size' args.
17438 (mono_debug_init_2_memory): New public function.
17440 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
17442 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
17444 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17446 * appdomain.c: implement support for ShadowCopyFiles.
17448 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
17450 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
17451 when value is NULL (and should remove CID #51).
17453 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17455 * image.c: moved 2 functions to ../utils.
17457 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
17459 * gc.c: cope with the target object of a GC handle being NULL
17462 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
17464 * class.c: recursively check parent's explicit implementations
17465 of interface methods (fixes bug #79125).
17467 2006-08-19 Miguel de Icaza <miguel@novell.com>
17469 * filewatcher.c: Avoid warnings when building, do not redefine
17470 constants that are defined.
17474 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17476 * image.c: don't fail when the link points to an absolute path.
17478 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
17480 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
17483 2006-08-17 Miguel de Icaza <miguel@novell.com>
17485 * image.c (full_path): A new method used to obtain the actual path
17486 of an assembly even in the presence of symbolic links.
17488 This is necessary for the case where we are running a binary that
17489 has been GACed, but we are using the "published" path name
17490 ($prefix/mono/1.0/blah.exe) which happens to point to the real
17493 This was the source of the failure for the `xsp' command with the
17494 recent AppDomain changes, as far as the runtime was concerned,
17495 there were two different assemblies: $prefix/mono/1.0/blah.exe and
17496 $prefix/mono/gac/blah/version/blah.exe.
17498 (do_mono_image_open): use full path
17500 2006-08-17 Zoltan Varga <vargaz@gmail.com>
17502 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
17504 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
17506 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
17507 domain_id is supplied. Fix CID #241 and corlib's unit tests.
17509 2006-08-17 Zoltan Varga <vargaz@gmail.com>
17511 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
17512 small structures. Fixes #78990.
17514 2006-08-17 Zoltan Varga <vargaz@gmail.com>
17516 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
17518 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
17520 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17523 * marshal.c: don't load all the assemblies from a domain into newly
17524 created ones. The new domains might have different rules and load
17525 assemblies from different locations. Fixes bug #76757.
17527 Patch by Lluis. Conflicts resolved by Brian Crowell.
17529 2006-08-16 Alp Toker <alp@atoker.com>
17531 * socket-io.c: First half of the fix for #79084.
17532 Set sa_size to the length of the content, not that of the struct.
17533 Don't add NULL suffix to the content, this should be done in
17534 managed code if needed.
17536 2006-08-14 Raja R Harinath <rharinath@novell.com>
17539 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
17540 mono_metadata_parse_type returns NULL.
17542 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
17544 * normalization-tables.h : new file for string normalization data.
17545 * locales.c, locales.h, icall.c :
17546 added load_normalization_resource() for string normalization,
17548 * Makefile.am : added normalization-tables.h to the sources.
17550 2006-08-13 Zoltan Varga <vargaz@gmail.com>
17552 * marshal.c: Add more helper functions to reduce code duplication and use them
17555 2006-08-12 Zoltan Varga <vargaz@gmail.com>
17557 * marshal.c: Fix non-x86 stdcall warnings.
17559 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
17562 2006-08-11 Jonathan Chambers <joncham@gmail.com>
17564 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
17565 type check on multi-dimensional arrays. Fixes #79000.
17567 2006-08-10 Jonathan Chambers <joncham@gmail.com>
17569 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
17570 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
17571 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
17572 * class-internals.h: add is_com_object to class structure.
17573 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
17574 null checks to COM object marshalling. Fix .ctor call on RCW.
17575 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
17577 All code is contributed under the MIT/X11 license.
17579 2006-08-09 Dick Porter <dick@ximian.com>
17581 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
17582 racing mono_monitor_allocator_lock() somewhere, so don't delete
17583 the critical section for now. Found by running and exiting
17586 2006-08-10 Zoltan Varga <vargaz@gmail.com>
17588 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
17589 (ves_icall_System_ComObject_FindInterface): Ditto.
17590 (ves_icall_System_ComObject_CacheInterface): Ditto.
17592 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
17593 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
17595 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17597 * threadpool.c: treat pipes from process asynchronous reads as sockets
17598 when reading from them, so we get select/poll or epoll to wait for
17601 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
17603 * loader.c: Fix a typo (CID #233) in the null check.
17605 2006-08-07 Zoltan Varga <vargaz@gmail.com>
17607 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
17608 Hopefully fixes #78949.
17610 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
17611 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
17612 bytes. Fixes #78972.
17614 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17616 * filewatcher.c: we need to set errno here.
17618 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17620 * filewatcher.c: let Win32Exception get the error value.
17622 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17624 * filewatcher.c: translate errno into win32 errors for Win32Exception
17625 to know what happened.
17627 2006-08-01 Zoltan Varga <vargaz@gmail.com>
17629 * threadpool.c: Fix more warnings.
17631 * assembly.c (search_loaded): Fix warnings.
17633 * threadpool.c (mono_thread_pool_finish): Fix warnings.
17634 (mono_async_invoke): Ditto.
17636 2006-07-28 Jonathan Chambers <joncham@gmail.com>
17638 * object.c (mono_remote_class_vtable): Need to create proxy vtable
17639 entries for __ComObject type in addition to ComImport types.
17640 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
17643 All code is contributed under the MIT/X11 license.
17645 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
17647 * image.c: avoid tentative loading of modulerefs that contain
17648 no metadata (P/Invoke library names).
17650 2006-07-28 Dick Porter <dick@ximian.com>
17652 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
17653 mono_loader_lock() somewhere, so don't delete the critical section
17654 for now. Found by running and exiting monodevelop.
17656 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17658 * filewatcher.c: define the inotify syscalls when we're building on
17659 linux and have sys/syscall.h. The build system might not have support
17660 for inotify but the target system might have it.
17662 2006-07-26 Miguel de Icaza <miguel@novell.com>
17664 * domain.c: Documentation updates.
17666 * loader.c (mono_free_method): Do not release the method
17667 information if we are being profiled, as profilers will use this
17668 information at shut down to present some data to the user.
17670 This is needed so that the profiler does not crash, as the
17671 profiler tends to keep MonoMethods around, and they might become
17672 invalid if we free these.
17674 (mono_get_method_constrained): Return the original CIL stream
17675 method as well, so verification can be performed against it.
17677 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17679 * filewatcher.[ch]: support for inotify file system watcher.
17680 * icall.c: add new internal calls for the inotify file system watcher.
17682 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17684 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
17687 2006-07-20 Dick Porter <dick@ximian.com>
17689 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
17692 2006-07-20 Dick Porter <dick@ximian.com>
17694 * threads.c (start_wrapper): Do the thread cleanup while we still
17695 hold a reference to its object. Fixes bug 78123.
17697 2006-07-18 Kornél Pál <kornelpal@gmail.com>
17699 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
17700 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
17701 "managed-to-managed".
17702 * icall.c: Redirect string constructors that take sbyte* to
17703 ves_icall_System_String_ctor_RedirectToCreateString.
17704 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
17705 to CreateString () methods with matching signature.
17706 * reflection.c: Use original security informations for
17707 MONO_WRAPPER_MANAGED_TO_MANAGED.
17708 * security-manager.c: Use original security informations for
17709 MONO_WRAPPER_MANAGED_TO_MANAGED.
17710 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
17711 that is a placeholder and only its address should be used.
17712 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
17713 that is a placeholder and only its address should be used.
17715 2006-07-15 Jonathan Chambers <joncham@gmail.com>
17717 Begin implementing COM Interop.
17718 * appdomain.c: Increment corlib version.
17719 * class.c: Set ComImport classes' parent to __ComObject.
17720 * loader.c: Mark cominterop methods as such.
17721 * domain.c: Add __ComObject class to MonoDefaults structure.
17722 * image.c: Add 2 hashtables to the image for COM Interop related methods
17723 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
17724 using the mempool allocator
17726 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
17727 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
17728 declaration for mono_metadata_type_dup_mp.
17730 * debug-helpers.c: Added strings for two additional wrapper types
17731 * object.c: Create proxy objects for ComImport classes
17732 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
17733 and added __ComObject class to MonoDefaults structure.
17735 * object-internals.h: Finish MonoRealProxy definition, and add definition of
17736 MonoComInteropProxy and MonoComObject.
17738 * marshal.c: Added support for COM Interop
17739 (signature_cominterop): Converts managed signature to corresponding
17740 unmanaged COM signature.
17741 (cominterop_get_function_pointer): gets unmanaged function pointer via
17743 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
17744 (cominterop_get_method_interface): returns interface type that method is defined on
17745 (mono_mb_emit_cominterop_call): emits native call to function pointer
17747 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
17748 that matches signature of unmanaged function.
17749 (cominterop_get_native_wrapper): wrapper around adjusted method call.
17750 (cominterop_get_invoke): forwards call from proxy to __ComObject
17751 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
17752 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
17753 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
17755 * marshal.h: Added Marshal icall declarations.
17756 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
17757 so we can access them in finalizer
17759 2006-07-14 Dick Porter <dick@ximian.com>
17761 * object.c (mono_type_initialization_cleanup): Fix a race
17762 condition by temporarily commenting out the critical section
17765 2006-07-14 Zoltan Varga <vargaz@gmail.com>
17767 * reflection.c (create_custom_attr): Fix some warnings.
17768 (create_custom_attr_data): Ditto.
17769 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
17770 types. Fixes #78855.
17772 2006-07-11 Zoltan Varga <vargaz@gmail.com>
17774 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
17776 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
17778 2006-07-08 Zoltan Varga <vargaz@gmail.com>
17780 * reflection.c (resolve_object): Add support for DynamicMethod.
17782 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
17783 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
17785 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
17787 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
17788 don't leak GPtrArray's pdata has we have no use (nor free) for it.
17790 2006-07-01 Zoltan Varga <vargaz@gmail.com>
17792 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
17795 2006-06-30 Raja R Harinath <rharinath@novell.com>
17797 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
17798 slightly: remove a shadow local variable.
17800 2006-06-29 Raja R Harinath <rharinath@novell.com>
17802 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
17803 definition that introduces the virtual function slot.
17804 Also fix Coverity #105.
17806 2006-06-29 Zoltan Varga <vargaz@gmail.com>
17808 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
17809 for dynamic assemblies. Fixes #78724.
17811 2006-06-28 Zoltan Varga <vargaz@gmail.com>
17813 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
17816 2006-06-21 Martin Baulig <martin@ximian.com>
17819 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
17822 2006-06-21 Zoltan Varga <vargaz@gmail.com>
17824 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
17826 2006-06-20 Raja R Harinath <rharinath@novell.com>
17828 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
17830 * class.c (mono_class_create_from_typespec): Add 'context' argument.
17831 Inflate result if necessary.
17832 (mono_class_get_full): Remove old version. Rename from
17833 'mono_class_get' and add 'context' argument. Pass it to
17834 ..._create_from_typespec.
17835 (mono_class_get): New. Simple wrapper to mono_class_get_full.
17836 (mono_ldtoken): Revert change below.
17838 2006-06-20 Martin Baulig <martin@ximian.com>
17840 * class.c (mono_ldtoken): Don't pass the generic context to
17841 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
17843 2006-06-15 Zoltan Varga <vargaz@gmail.com>
17845 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
17846 and later freeing it. Fixes #78638.
17848 2006-06-15 Miguel de Icaza <miguel@novell.com>
17850 * icall.c (mono_class_get_throw): Revert over-zealous error
17851 throwing, the caller for mono_class_get_throw will cope with
17852 errors when classes are not properly initialized already.
17854 The code still copes with loader exceptions though.
17856 Fixes the regression in reftype1 and reftype3 from the CAS tests.
17858 2006-06-14 Miguel de Icaza <miguel@novell.com>
17860 Fixes the `make run1' version of RuntimeAbort (to be commited,
17861 source is in Bugzilla).
17863 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
17864 FALSE on class loading failure instead of returning true.
17866 * class.c (mono_class_create_from_typedef): It is possible for
17867 mono_metadata_interfaces_from_typedef_full to fail if a class is
17868 not found, cope with this.
17871 2006-06-14 Dick Porter <dick@ximian.com>
17874 * process.c: Fix a bunch of signed/unsigned warnings from gcc
17877 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
17879 * culture-info-table.h : oops, forgot to make it nsync with r61548.
17881 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
17883 * icall.c: Another fix for building mono in Visual Studio.
17885 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
17887 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
17889 2006-06-09 Martin Baulig <martin@ximian.com>
17891 * debug-mono-symfile.c: Put this back and really fix it this
17892 time. Sorry for all the trouble.
17894 2006-06-08 Zoltan Varga <vargaz@gmail.com>
17896 * icall.c (mono_class_get_throw): Fix a warning.
17897 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
17898 ReflectionTypeLoadException if needed. Fixes #78606.
17900 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
17901 (mono_class_init): Ditto.
17903 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
17904 ref_only exceptions.
17905 (mono_loader_clear_error): Make this work even if there is no error.
17907 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
17909 * object-internals.h marshal.c marshal.h icall.c: Implement method
17910 Marshal.GetComSlotForMethodInfo using internal call.
17912 2006-06-07 Zoltan Varga <vargaz@gmail.com>
17914 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
17915 a function for signalling it.
17917 * class.c (mono_class_from_typeref): Use the new kind of loader error when
17918 a referenced assembly is not found.
17920 * loader.c (mono_loader_error_prepare_exception): Add support for
17921 LOADER_ERROR_ASSEMBLY. Fix formatting.
17923 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
17925 * domain.c appdomain.c class-internals.h marshal.c: Add support
17926 for VARIANT marshalling on windows and increment corlib version
17927 since Variant struct was added.
17929 2006-06-03 Miguel de Icaza <miguel@novell.com>
17931 * debug-mono-symfile.c: Revert Martin's previous patch which broke
17932 stack trace line information:
17934 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
17935 (Martin) when looking up B which is between A and C, return A not C.
17939 Thanks to Alexander Olk for tracking this down.
17941 2006-06-02 Zoltan Varga <vargaz@gmail.com>
17943 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
17945 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
17946 avoid clobbering its value.
17947 (mono_string_to_lpstr): Fix a warning on windows.
17949 2006-05-31 Zoltan Varga <vargaz@gmail.com>
17951 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
17953 * reflection.c loader.c: Removed references to 'dummy' flag.
17955 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
17957 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
17958 it gets GC tracking.
17960 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
17963 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
17965 * marshal.c threadpool.c: Update callers of mono_async_result_new.
17967 * appdomain.c: Bump corlib version.
17969 2006-05-30 Zoltan Varga <vargaz@gmail.com>
17971 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
17972 CEE_STIND_REF when working with object references.
17974 2006-05-31 Zoltan Varga <vargaz@gmail.com>
17976 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
17979 2006-05-30 Miguel de Icaza <miguel@novell.com>
17981 * loader.c (method_from_memberref): Fix argument value for
17982 mono_loader_set_error_method_load (I was passing the MonoClass
17983 instead of the class name char *).
17985 2006-05-30 Zoltan Varga <vargaz@gmail.com>
17987 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
17988 CEE_STIND_REF when working with object references.
17990 2006-05-30 Martin Baulig <martin@ximian.com>
17992 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
17993 mono_method_full_name() change and replace the ':' with a '.'
17996 2006-05-30 Martin Baulig <martin@ximian.com>
17998 * debug-mono-symfile.c
17999 (mono_debug_symfile_lookup_location): Fix the algorithm:
18000 when looking up B which is between A and C, return A not C.
18002 2006-05-29 Martin Baulig <martin@ximian.com>
18005 (MonoDebugMethodInfo): Make the typedef public.
18006 (MonoDebugSourceLocation): New public struct.
18009 (mono_debug_source_location_from_address): Removed.
18010 (mono_debug_source_location_from_il_offset): Removed.
18011 (mono_debug_il_offset_from_address): Removed.
18012 (mono_debug_address_from_il_offset): Removed.
18013 (mono_debug_lookup_method): New public function.
18014 (mono_debug_lookup_source_location): New public function; replaces
18015 the old mono_debug_source_location_from_*() functions; see the
18016 inline documentation.
18017 (mono_debug_free_source_location): New public function.
18018 (mono_debug_print_stack_frame): New public function; see the
18019 inline documentation.
18021 * debug-mono-symfile.c
18022 (mono_debug_find_source_location): Renamed into
18023 mono_debug_symfile_lookup_location(); only take a
18024 `MonoDebugMethodInfo *' and an `offset' argument; added inline
18026 (mono_debug_find_method): Renamed into
18027 mono_debug_symfile_lookup_method().
18029 2006-05-27 Zoltan Varga <vargaz@gmail.com>
18031 * assembly.c (mono_assembly_open_full): Dont overwrite the status
18032 returned by mono_image_open_full ().
18034 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
18035 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
18038 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
18041 2006-05-27 Miguel de Icaza <miguel@novell.com>
18043 * class.c (mono_class_from_typeref): handle missing images
18044 earlier, deals with bug #78418. Refactor code;
18046 Fix a warning introduced in my previous commit (some stale code
18047 from before I revisited my patch).
18049 * class.c (mono_class_create_from_typedef): On failure, remove the
18050 class from the MonoImage->class_cache as the class is not
18051 initialized; Fixes the leak pointed out by Paolo.
18053 2006-05-25 Dick Porter <dick@ximian.com>
18055 * threads.c (mono_thread_cleanup): Build fix. Comment out the
18056 DeleteCriticalSections until I figure out which one may still be
18057 sometimes locked when mono_thread_cleanup is called.
18059 2006-05-24 Dick Porter <dick@ximian.com>
18061 * threads.c (mono_thread_cleanup): Move the threading cleanup out
18062 of mono_thread_manage and back into its own function, so it can be
18063 called after the finalizer thread has finished.
18065 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
18067 2006-05-24 Zoltan Varga <vargaz@gmail.com>
18069 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
18072 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
18073 with non-blittable elements.
18074 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
18076 2006-05-24 Martin Baulig <martin@ximian.com>
18078 * mono-debug-debugger.h (MonoDebuggerEvent): Added
18079 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
18081 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
18082 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
18083 `mono_debugger_event_handler' to NULL.
18085 2006-05-24 Martin Baulig <martin@ximian.com>
18087 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
18089 2006-05-24 Martin Baulig <martin@ximian.com>
18091 * mono-debug-debugger.h
18092 (mono_debugger_create_notification_function): Added
18093 `MonoCodeManager *' argument.
18095 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
18097 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
18099 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
18101 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
18102 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
18105 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
18107 * icall.c: precise GC support: objects can't be stored in unmanaged
18108 memory anymore, even if they are kept alive by other references: since
18109 they can move the GC needs to be able to always find them.
18111 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
18113 * object.c: precise GC support for static fields. Support
18114 for moving GCs: write barriers and pinned allocation for interned
18117 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
18119 * domain.c, domain-internals.h: precise GC support for the MonoDomain
18122 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
18124 * class.c, gc.c: sgen and precise GC updates.
18126 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
18128 * marshal.h, marshal.c: added write barrier wrapper and precise type
18131 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
18133 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
18136 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
18138 * reflection.c: precise and sgen GC updates.
18140 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
18142 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
18144 2006-05-22 Zoltan Varga <vargaz@gmail.com>
18146 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
18148 2006-05-20 Zoltan Varga <vargaz@gmail.com>
18150 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
18151 MONO_TYPE_OBJECT. Fixes #78462.
18153 2006-05-18 Zoltan Varga <vargaz@gmail.com>
18155 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
18156 and blittable types.
18158 2006-05-17 Miguel de Icaza <miguel@novell.com>
18160 * class.c (mono_class_get_exception_for_failure): Implement parts
18161 of a TODO: if the loader error is set (instead of the class
18162 error), we return a Loader exception that can be properly thrown
18165 This was exposed by some Winforms 2.0 code that I tried to run
18166 (Atsushi pointed me to it).
18168 2006-05-17 Zoltan Varga <vargaz@gmail.com>
18170 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
18171 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
18173 * marshal.c (emit_marshal_vtype): Add limited support for
18174 UnmanagedType.LPStruct. Fixes #78427.
18176 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
18177 Applied a patch from kangaroo to fix #77523.
18179 2006-05-17 Martin Baulig <martin@ximian.com>
18182 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
18183 (debugger_thread_created): Removed.
18184 (debugger_thread_exited): Removed.
18186 2006-05-15 Zoltan Varga <vargaz@gmail.com>
18188 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18190 * object-internals.h (MonoReflectionResource): Sync with managed version.
18192 2006-05-12 Wade Berrier <wberrier@novell.com>
18194 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
18196 2006-05-12 Zoltan Varga <vargaz@gmail.com>
18198 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
18199 functions try to allocate from the image mempool.
18201 2006-05-12 Dick Porter <dick@ximian.com>
18203 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
18205 2006-05-12 Lluis Sanchez <lluis@ximian.com>
18207 * object.c: The FieldGetter and FieldSetter methods require the full
18208 name of the class, not only the name. Fixes bug #78277.
18210 2006-05-11 Miguel de Icaza <miguel@novell.com>
18212 * loader.c (method_from_memberref): Do not pass the NULL klass to
18213 mono_loader_set_error_() methods. Pass the non-NULL value
18216 2006-05-11 Zoltan Varga <vargaz@gmail.com>
18218 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
18219 (mono_assembly_close): Null out assembly->image->references after freeing it.
18221 * image.c (mono_image_close): Free image->references.
18223 * reflection.c (mono_image_basic_init): Fix a small memory leak.
18225 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
18227 * marshal.c: In function mono_mb_add_local don't use the mb pointer
18228 before checking if it's NULL (g_assert).
18230 2006-05-10 Martin Baulig <martin@ximian.com>
18232 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
18233 I thought I already killed that two months ago, but now it somehow reappeared.
18235 2006-05-10 Martin Baulig <martin@ximian.com>
18237 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
18239 2006-05-10 Zoltan Varga <vargaz@gmail.com>
18241 * reflection.c: Allocate memory for dynamically created methods in the image
18244 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
18246 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
18247 don't use the ad pointer before checking if it's NULL (g_assert).
18249 2006-05-09 Zoltan Varga <vargaz@gmail.com>
18251 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
18252 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
18254 * marshal.c: Allocate all signatures from mempools.
18256 * marshal.c: Allocate some more signatures from mempools.
18258 2006-05-09 Miguel de Icaza <miguel@novell.com>
18260 * object.c (mono_load_remote_field): The code used to provide a
18261 temporary variable for returning results if the user did not
18262 provide a result pointer. But our temporary variable was allocted
18265 Fix calling code to always pass a result area. Coverity ID 103.
18267 2006-05-06 Zoltan Varga <vargaz@gmail.com>
18269 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
18270 value, not the old. Fixes #78312.
18271 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
18273 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
18274 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
18277 * assembly.c (mono_assembly_close): Free image->references.
18279 * assembly.c (mono_assembly_names_equal): Fix a warning.
18280 (mono_assemblies_cleanup): Cleanup more global data.
18282 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
18284 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
18285 ptr_cache and image->modules.
18287 * image.c (mono_image_init): Allocate array_cache lazily.
18289 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18291 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
18292 behavior was changed recently and has bad side effects.
18294 2006-05-05 Zoltan Varga <vargaz@gmail.com>
18296 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
18298 * assembly.c (mono_assembly_close): Remove a debug printf.
18300 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
18302 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
18303 to also allow for temporary references between mono_image_open ()/close ().
18305 * domain.c (get_runtimes_from_exe): Add a FIXME.
18307 2006-05-04 Zoltan Varga <vargaz@gmail.com>
18309 * marshal.c: Fix support for dynamic methods.
18311 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
18313 * marshal.c (mono_marshal_cleanup): New cleanup function.
18315 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
18318 * class.c (mono_class_init): Fix leaking class->nested_classes.
18320 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
18322 * image.c (mono_image_init): Initialize the new cashes.
18324 * image.c (mono_image_close): Destroy the new cashes.
18326 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
18328 * mempool.c (mono_mempool_strdup): New helper function.
18330 * class-internals.h: Add prototype for mono_loader_unlock ().
18332 * domain.c (mono_jit_info_table_find): Fix a warning.
18333 (mono_debugger_check_runtime_version): Ditto.
18335 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
18336 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
18337 functions to these modules.
18339 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
18342 * marshal.c (mono_free_bstr): Fix a warning.
18344 * assembly.c (mono_assembly_open_full): Fix another small leak.
18346 * object.c: Fix some unload leaks in the remoting code.
18348 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
18351 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
18353 * reflection.c: Fix some unload leaks in dynamic assemblies.
18355 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
18357 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
18358 * marshal.h: Add BSTR support on Win32
18359 * icall.c: Add BSTR icalls
18360 * metadata.h: Add BSTR enums
18362 2006-04-28 Miguel de Icaza <miguel@novell.com>
18364 Work to catch the crash from #76795 and turn it into an
18365 exception. As I stubbed out pieces of the VisualBasic support,
18366 I found a number of places where the code was failing and I added
18367 checks to those places.
18369 * metadata.c (do_mono_metadata_parse_generic_class): Make this
18370 function return a status code. If we fail to parse the signature
18371 from mono_metadata_parse_generic_inst, return FALSE.
18373 * loader.c (mono_get_method_from_token): If we fail to load the
18374 method (mono_class_get) return NULL.
18376 * (method_from_memberref): Return NULL if we are unable to parse
18377 the method signature
18379 (mono_loader_error_prepare_exception): Since we now use the
18380 loader_error flag internally to stop processing, and obtaining
18381 exceptions that might be thrown will walk this code path the
18382 proper way of going from a MonoLoaderError into a
18383 MonoException was convoluted. This new routine encapsulates the
18384 process of turning the error into an exception and *clearing* the
18387 2006-04-27 Miguel de Icaza <miguel@novell.com>
18389 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
18390 with missing assemblies), and to cope with:
18392 * Missing fieldref from a non-existing assembly.
18393 * Missing methodref from a non-existing assembly.
18395 The first batch of work to address *some* of the issues from 76661.
18397 * object.c (mono_class_create_runtime_vtable): If we fail to
18398 initialize the class raise the exception here.
18400 * metadata.c (mono_class_get_overrides_full): If any methods fail
18401 to load return the failure to the caller.
18403 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
18404 flagging assemblies that failed to load.
18406 Do not crash if we are unable to load the assembly.
18408 (mono_assembly_close): Do nothing with REFERENCE_MISSING
18411 * loader.c (mono_loader_set_error_type_load): Change the
18412 convention to always pass unallocated strings, so we make our own
18413 copies (I know our own code had duplicated strings before, but
18414 this keeps the normal conventions).
18415 (method_from_memberref): Call mono_loader_set_error_method_load
18416 for all possible failures of loading the class.
18417 Remove assert, turn into a loader error.
18419 (mono_loader_error_to_exception): Move this routine from mini
18420 (mini_loader_error_to_exception) there was no need to have that in
18423 * class.c (mono_class_from_typeref): If we were not able to load
18424 the assembly with mono_assembly_load_reference, call the
18425 mono_loader_set_error_type_load to register the problem.
18427 (mono_class_setup_fields): If we fail to load the type from
18428 mono_metadata_parse_type_full, call mono_class_set_failure and
18429 break from the loop.
18431 If class->exception_type is set, we do not layout the fields as
18432 that might crash the runtime, and instead return (from breaking
18433 from the previous loop).
18435 (mono_class_setup_vtable): This now returns a boolean indicating
18436 whether the table was properly setup. The decision is driven by
18437 mono_class_get_overrides_full which might run into non-existing
18440 (mono_class_init): Returns TRUE on success or FALSE if there was a
18441 problem in loading the type (incorrect assemblies, missing
18442 assemblies, methods, etc).
18444 When we call mono_class_setup_fields we also check for a potential
18445 error inside this call (either a class exception or a general
18448 (mono_class_create_from_typedef): If the parent fails to load
18449 (calling mono_class_get_full) return NULL.
18453 calls to mono_metadata_parse_type_full should be checked
18454 everywhere and set the mono_class_set_failure
18455 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
18457 The current patch checks the places where my manually constructed
18458 tests show the errors are showing up, but we should do it
18463 mono_class_init return values should be tested everywhere, like
18464 the previous case this is something that we should audit
18465 everywhere and not only on the cases exposed by the tests I
18468 2006-04-26 Miguel de Icaza <miguel@novell.com>
18470 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
18471 boolean parameter and instead pass the information on `options'
18472 parameter (FileOptions).
18474 * icall.c: Register the new signature for MonoIO.Open.
18476 * debug-helpers.c (dis_one): Trying to understand how coverity
18477 works. Fix Run 5, item 78.
18479 2006-04-26 Dick Porter <dick@ximian.com>
18481 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
18484 2006-04-25 Martin Baulig <martin@ximian.com>
18486 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
18488 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
18489 debugger_thread_created().
18490 (debugger_gc_push_all_stacks): Don't handle the main thread in any
18492 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
18493 (mono_debugger_finalize_threads): New function; undo the effects
18494 of mono_debugger_init_threads().
18495 (mono_debugger_create_all_threads): Removed.
18497 2006-04-24 Zoltan Varga <vargaz@gmail.com>
18499 * image.c (mono_image_close): Tidy up trace messages.
18501 * assembly.c (mono_assembly_close): Ditto.
18503 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
18504 no longer references an already freed assembly. Fixes #78168.
18506 2006-04-21 Dick Porter <dick@ximian.com>
18508 * threads.c (mono_thread_detach): Fix reference counting when
18511 2006-04-21 Zoltan Varga <vargaz@gmail.com>
18513 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
18516 2006-04-19 Zoltan Varga <vargaz@gmail.com>
18518 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
18519 (mono_type_to_stind): Ditto.
18521 * marshal.c: Use the new helper functions to simplify code.
18523 * image.c (mono_image_close): Add some code for help debug assembly unloading
18526 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
18529 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
18530 assembly was already loaded in another appdomain. Fixes #78083.
18532 2006-04-13 Zoltan Varga <vargaz@gmail.com>
18534 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
18535 referenced assemblies.
18536 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
18538 * domain.c (mono_domain_free): Add a trace message.
18540 * appdomain.c (add_assemblies_to_domain): Ditto.
18542 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
18545 2006-04-12 Zoltan Varga <vargaz@gmail.com>
18547 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
18549 2006-04-12 Martin Baulig <martin@ximian.com>
18551 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
18552 `USE_INCLUDED_LIBGC'.
18554 2006-04-12 Zoltan Varga <vargaz@gmail.com>
18556 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
18557 the patch contains ../ and a small directory name later. Hopefully fixes
18560 2006-04-10 Martin Baulig <martin@ximian.com>
18562 Clean up the debugger's thread-handling code.
18564 The debugger's thread-handling code has been moved from
18565 ../mini/debug-debugger.c to threads.c. We now iterate directly
18566 over the `threads' hash, keep track of exiting threads and also
18567 use proper locking.
18569 We can now debug XSP and XSP based applications with the debugger.
18571 * object-internals.h (MonoThread): Added `gpointer end_stack'.
18574 (MonoThreadCallbacks): Removed; this was only used by the debugger.
18575 (mono_install_thread_callbacks): Likewise.
18577 * threads.c (mono_thread_callbacks): Removed.
18578 (debugger_thread_created, debugger_thread_exited): New static functions.
18579 (start_wrapper): Call debugger_thread_created().
18580 (thread_cleanup): Call debugger_thread_exited().
18581 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
18582 (mono_debugger_init_threads): New public function.
18583 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
18584 iterate directly over the `threads' hash and also use proper locking.
18586 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
18588 * mono-debug-debugger.h
18589 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
18591 2006-04-10 Zoltan Varga <vargaz@gmail.com>
18593 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
18594 argument type=array. Fixes #78057.
18596 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
18598 * culture-info-table.h : regenerated. Fixed bug #69652.
18600 2006-04-07 Zoltan Varga <vargaz@gmail.com>
18602 * loader.c metadata.c: Reapply a variant r59116.
18604 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
18606 * class.c (mono_class_setup_interface_offsets): New internal function.
18608 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
18609 interfaces too. Fixes #77398.
18611 * reflection.c (encode_cattr_value): Add support for
18612 parameter type=object, argument type=array.
18613 (load_cattr_value): Ditto. Fixes #77916.
18615 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
18616 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
18618 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
18619 a byval char array and CharSet is Ansi.
18621 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
18623 2006-04-06 Zoltan Varga <vargaz@gmail.com>
18625 * metadata.c: Add some locking comments.
18627 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
18629 (mono_metadata_free_method_signature): Don't free the signature itself.
18631 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
18633 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
18634 reference the same MonoImage.
18635 (mono_assembly_load_from_full): Add an assert.
18637 2006-04-05 Zoltan Varga <vargaz@gmail.com>
18639 * image.c (mono_image_close): Don't put the image we are about to free into the
18640 loaded_images_guid_hash.
18642 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
18643 to reduce code duplication.
18645 * marshal.c: Register the native functions called by this module as icalls, to
18646 somewhat centralize the creation of MonoMethodSignature's.
18648 * loader.c (mono_method_signature): Add a cache for method signatures.
18650 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
18651 the parameter attributes of a method.
18652 (mono_metadata_parse_method_signature_full): Refactored the computation of
18653 parameter attributes into a separate function. Also avoid one allocation in
18656 * assembly.c (mono_assembly_close): Ditto.
18658 * image.c (mono_image_close): Log trace messages with INFO level.
18660 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
18662 * image.c reflection.c: Correct reference counting of image modules.
18664 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
18665 of this function from the image mempool.
18667 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
18668 to allow more cached types to be used.
18670 * mono-debug.c (mono_debug_add_method): Appled patch from
18671 David S. Miller <davem@sunset.davemloft.net>: Access
18672 minfo->lexical_blocks[] entry elements using read32().
18674 2006-04-04 Zoltan Varga <vargaz@gmail.com>
18676 * loader.c (mono_free_method): No longer free the method header for non-dynamic
18677 methods as it is allocated from the mempool.
18679 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
18682 * metadata-internals.h: Add comments describing the reference counting scheme
18683 used for MonoImage and MonoAssembly.
18685 * image.c assembly.c reflection.c: Rework reference counting of images and
18686 assemblies so they are freed when the runtime is shut down. Free some
18687 additional memory structures when an image is unloaded.
18689 2006-04-03 Zoltan Varga <vargaz@gmail.com>
18691 * class.c loader.c reflection.c: Allocate more data structures in
18694 2006-03-31 Miguel de Icaza <miguel@novell.com>
18697 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
18698 build on pre glib 2.4 systems.
18700 2006-03-31 Zoltan Varga <vargaz@gmail.com>
18702 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
18704 * icall.c: Fix some warnings.
18706 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
18708 * culture-info-table.h : regenerated.
18710 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
18712 * threads.c, object-internals.h, verify.c: changed the culture caching
18713 code to use a normal MonoArray for storage so the GC can keep track of
18714 them easily. Fixed bits of the cache logic, too and simplified the
18717 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
18719 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
18720 thread for non-Boehm GCs.
18722 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
18724 * domain.c, object.c, domain-internals.h: reduce the amount of memory
18725 needed to keep track of the data for static fields.
18727 2006-03-29 Raja R Harinath <rharinath@novell.com>
18730 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
18731 for interface classes. Use 'num_methods' instead.
18732 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
18733 before using '->vtable_size' field.
18735 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
18737 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
18738 doesn't contain managed pointers, so use a normal hashtable.
18740 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
18742 * reflection.c, class-internals.h, domain.c: fixed handling of types
18743 used as values for objects in custom attributes (bug #77915):
18745 2006-03-24 Martin Baulig <martin@ximian.com>
18747 * class.c (mono_class_setup_fields): Added support for generic
18748 instances; fixes #77580.
18750 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18752 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
18754 2006-03-24 Dick Porter <dick@ximian.com>
18756 * file-io.c (get_file_attributes): More stat macro breakage.
18759 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
18761 * profiler.c: added the file=filename option in the default profiler
18762 to output the profile data to filename.
18764 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18766 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
18769 2006-03-22 Martin Baulig <martin@ximian.com>
18771 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
18772 allocated `MonoClassField *' in `fb->handle'.
18774 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
18776 * class.c, image.c, metadata-internals.h: implemented new mechanism to
18777 allocate interface ID to save memory and allow better ID reuse on
18778 appdomain unload. setup_generic_vtable () removal from Martin.
18780 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
18782 * object.h, appdomain.c, domain.c, exception.c, icall.c,
18783 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
18784 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
18785 write barriers for reference stores with managed objects accessed with
18786 C structures in the runtime and in embedding programs.
18788 2006-03-20 Raja R Harinath <rharinath@novell.com>
18790 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
18791 'interface_id' and 'max_interface_id' fields of MonoClasses
18792 representing open generic types.
18794 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
18796 * object.h, object.c, icall.c: added functions to deal with
18797 storing valuetypes that contain references in managed objects.
18798 * reflection.c, string-icalls.c, threads.c, marshal.c: small
18799 fixes and comments around uses of mono_array_addr ().
18801 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
18803 * object.h, icall.c, monitor.c: object.GetHashCode ()
18804 implementation that supports the moving garbage collector.
18806 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
18808 * icall.c, threads-types.h, threads.c: implemented finalizer for
18809 LocalDataStoreSlot.
18811 2006-03-15 Zoltan Varga <vargaz@gmail.com>
18813 * metadata.c (mono_type_size): Add a fixme.
18814 (mono_type_stack_size): Ditto.
18816 * object-internals.h (MonoReflectionAssemblyBuilder): Added
18817 'type_forwarders' field.
18819 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
18820 attribute from net 2.0.
18822 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
18825 * class.c (mono_class_setup_fields): Fix a warning.
18827 * class.c (mono_class_from_name): Add support for assemblyref entries
18828 in the EXPORTEDTYPE table.
18830 * reflection.c: Add support for handling type forwarders under net 2.0.
18832 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18834 2006-03-14 Zoltan Varga <vargaz@gmail.com>
18836 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
18837 overwriting entries in ModuleBuild->types, also clean up the code
18838 a little. Fixes #77774.
18840 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
18842 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
18843 load friend assembly info when present.
18845 2006-03-14 Raja R Harinath <rharinath@novell.com>
18847 Fix crasher on gtest-158.cs.
18848 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
18849 the return value if the MonoClass we want is yet in an
18850 inconsistent state.
18851 * class.c (mono_class_create_from_typedef): Add an comment
18852 explaining an order dependency between mono_class_setup_parent and
18853 mono_class_setup_mono_type.
18855 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
18857 * class.c: documentation updates and events bug fix.
18859 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
18861 * class.c: some cleanup, locking fixes.
18863 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
18865 * class.c: fix the generics code to setup nested
18866 type info to the instantiated type (bug #77770).
18868 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
18870 * marshal.c: fixed a few type correctness issues.
18872 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
18874 * loader.c: the Set/Get/Addrtess array methods should be public.
18876 2006-03-11 Zoltan Varga <vargaz@gmail.com>
18878 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
18880 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
18883 2006-03-10 Zoltan Varga <vargaz@gmail.com>
18885 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
18887 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
18889 * mempool.c (mono_mempool_alloc): Speed this up a bit.
18890 (mono_mempool_alloc0): Ditto.
18892 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18895 (create_object_from_sockaddr): it was allocating 4 extra bytes
18896 for the AF_UNIX data. Fixes bug #77747.
18898 2006-03-09 Zoltan Varga <vargaz@gmail.com>
18900 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
18902 2006-03-09 Dick Porter <dick@ximian.com>
18904 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
18905 Fixes bug 76966 again.
18907 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
18909 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
18911 * appdomain.c: Bumped corlib version to 48 (due to r57532)
18913 2006-03-07 Martin Baulig <martin@ximian.com>
18916 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
18918 2006-03-07 Martin Baulig <martin@ximian.com>
18921 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
18922 regression introduced in r56970; see gtest-252.cs.
18924 * loader.c (mono_get_method_constrained): Correctly handle generic
18925 methods; see gtest-253.cs.
18927 2006-03-04 Zoltan Varga <vargaz@gmail.com>
18929 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
18931 2006-03-04 Martin Baulig <martin@ximian.com>
18933 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
18934 compute the parent type at runtime, just like we're already doing
18938 (mono_reflection_bind_generic_parameters): Don't compute the
18939 parent type anymore.
18941 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
18943 2006-03-04 Martin Baulig <martin@ximian.com>
18945 * mono-debug-debugger.h
18946 (mono_debugger_create_notification_function): Allocate memory at
18947 runtime and return a pointer to it.
18949 2006-03-03 Zoltan Varga <vargaz@gmail.com>
18951 * assembly.c: Fix windows build.
18953 * assembly.c: Fix build.
18955 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
18957 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
18959 2006-03-03 Dick Porter <dick@ximian.com>
18962 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
18963 Check parameters before dereferencing them. Fixes Aaron's part of
18966 2006-03-03 Raja R Harinath <rharinath@novell.com>
18968 Fix performance regression.
18969 * loader.c (find_method_in_class): Add 'from_class' argument.
18970 Rename 'klass' argument to 'in_class'. The signature is compared
18971 against the method in 'in_class', and the corresponding method is
18972 returned from 'from_class'.
18973 (find_method): Walk both 'in_class' and 'from_class' in parallel.
18974 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
18975 type definition and generic instantiation in parallel.
18976 (mono_get_method_constrained): Update to changes.
18978 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
18980 * threads.c: make sure the domain is correct, too when doing
18981 mono_thread_attach ().
18983 2006-03-01 Zoltan Varga <vargaz@gmail.com>
18985 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
18986 windows. Fixes #77683.
18988 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
18990 * object.h, *: introduced specific way to set elements of an array
18991 of references to be used as write barrier. Still need to audit the
18992 uses of mono_array_addr.
18994 2006-03-01 Miguel de Icaza <miguel@novell.com>
18996 * object-internals.h: New field to cache the assmebly name, patch
18997 from Tambet Ingo (tambet@ximian.com)
18999 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
19001 * decimal.h, class-internals.h, metadata-internals.h,
19002 file-io.h: mark a few function declarations as internal, to
19003 reduce the number of PLT entries.
19005 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19007 * file-io.c: fix typo in warning message.
19009 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
19011 * loader.c: on unix, lookup the "*A" version of a function
19012 if charset is auto as a second option before failing.
19014 2006-02-28 Raja R Harinath <rharinath@novell.com>
19016 * class.h (mono_class_inflate_generic_method): Revert to two
19018 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
19019 (mono_class_inflate_generic_method_full): Add.
19020 * class.c (mono_class_inflate_generic_method_full): Rename from
19021 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
19022 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
19023 * loader.c, reflection.c: Update to changes.
19025 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
19027 * icall.c: const fixes and small improvements.
19029 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19031 * threadpool.c: for asynchronous connect(), enable the same workaround
19032 for BSD 6 as for the Mac. Fixes bug #77637.
19034 2006-02-24 Zoltan Varga <vargaz@gmail.com>
19036 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
19037 formatted classes. Fixes #77524.
19039 2006-02-24 Raja R Harinath <rharinath@novell.com>
19041 * class.c (inflate_generic_type): Add a couple more
19042 micro-optimizations.
19043 (inflate_generic_context): Don't use the 'gmethod' from
19045 (mono_class_inflate_generic_method): If the method has generic
19046 parameters, but the passed-in context doesn't have a 'gmethod',
19047 create one. Use the possibly simplified generic instantiation
19048 from the declaring class instead of the one passed in.
19050 2006-02-24 Raja R Harinath <harinath@gmail.com>
19052 Make generic method signature and method header handling lazy.
19053 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
19054 (inflate_generic_header): Likewise.
19055 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
19056 parameter to avoid inflating types.
19057 (mono_get_inflated_method): Empty out.
19058 * class.h (mono_class_inflate_generic_method): Update to changes.
19059 * loader.c (mono_get_method_from_token): Don't parse signature for
19060 generic methods, nor methods of generic classes.
19061 (mono_method_signature): Rename from 'mono_method_signature'.
19062 Inflate signature on demand.
19063 (mono_method_get_header): Inflate method header on demand.
19064 * reflection.c: Update to changes.
19066 2006-02-23 Raja R Harinath <rharinath@novell.com>
19068 * metadata.c (mono_metadata_inflate_generic_inst): If the
19069 instantiation is closed, don't bother expanding it in the new
19071 * class.c (inflate_generic_class): If the generic instantiation
19072 doesn't change after inflation, return the argument itself.
19073 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
19075 (inflate_generic_context): If neither the generic class nor the
19076 generic method instantiations change, return the original context.
19077 * reflection.c (mono_method_get_object): Do
19078 'mono_get_inflated_method' before accessing the ->klass field.
19079 (inflate_mono_method): Don't create a MonoGenericMethod unless
19081 (inflate_method): Don't pass a constructed type as the declaring
19082 type of a methodbuilder.
19084 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
19086 * object.c: fix memory overwrite.
19088 2006-02-22 Dick Porter <dick@ximian.com>
19090 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
19091 it doesn't work any more.
19092 (mono_threads_request_thread_dump): Fix unused variable warnings.
19094 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
19096 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
19097 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
19098 the public header file.
19100 2006-02-21 Zoltan Varga <vargaz@gmail.com>
19102 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
19104 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
19106 * class-internals.h, object.c: reduce the size of MonoVTable
19107 and store the interface_offsets array at negative offsets.
19109 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
19111 * metadata.c: tweak table descriptors data structures to reduce
19112 size and runtime relocations.
19114 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
19116 * marshal.c: fix some types and opcodes to be type-safe
19117 in marshaling wrappers.
19119 2006-02-21 Ankit Jain <jankit@novell.com>
19121 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
19123 2006-02-21 Raja R Harinath <rharinath@novell.com>
19125 * metadata.c (get_constraints): Relax debugging checks for monodis.
19127 2006-02-21 Ankit Jain <jankit@novell.com>
19129 * metadata.c (mono_metadata_load_generic_params): Move the code
19130 checking for ambiguous generic params from here to mono/dis/get.c
19131 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
19133 2006-02-21 Raja R Harinath <harinath@gmail.com>
19135 Fix assertion triggered when compiling nemerle.
19136 * class.c (mono_get_shared_generic_inst): Rename from
19137 get_shared_inst and make non-static.
19138 * loader.c (mono_get_shared_generic_method): New. Used to create
19139 the MonoGenericContext-equivalent of a MonoGenericContainer.
19140 (mono_get_method_from_token): Initialize the 'context' field of
19141 the created MonoGenericContainer.
19142 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
19143 * metadata.c (get_constraints): Add sanity check.
19144 * class-internals.h: Add new internal methods.
19146 * reflection.c (verify_safe_for_managed_space): New sanity check.
19147 Currently checks that owner-less generic parameters aren't allowed
19149 (mono_type_get_object): Use it.
19150 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
19151 that are now in mono_type_get_object.
19152 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
19154 2006-02-19 Raja R Harinath <harinath@gmail.com>
19156 * metadata.c (mono_type_create_from_typespec): Rename from
19157 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
19158 argument and caching of types in the generic container.
19159 (unwrap_arrays, find_generic_param): Remove.
19160 * metadata-internals.h: Update.
19161 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
19163 2006-02-18 Zoltan Varga <vargaz@gmail.com>
19165 * class.c (mono_class_get_exception_for_failure): Fix a warning.
19167 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
19168 return values. Fixes #77581.
19170 * class.c (mono_fnptr_class_get): Switch name and name_space.
19172 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
19173 classes and add support for [In, Out] attributes.
19174 (mono_marshal_free_asany): Ditto. Fixes #77524.
19176 2006-02-18 Raja R Harinath <harinath@gmail.com>
19178 * class.c (mono_class_from_generic_parameter): Make more robust to
19179 incomplete MonoGenericContainers from monodis.
19181 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
19183 * class-internals.h: added some more exception types.
19184 * class.c, metadata.c: added a few checks to handle missing
19187 2006-02-17 Raja R Harinath <rharinath@novell.com>
19189 Use owner-less generic-params some more.
19190 * class.c (my_mono_class_from_generic_parameter): Remove.
19191 (mono_class_from_generic_parameter): Handle null image,
19192 param->name and param->owner.
19193 (mono_class_from_mono_type): Update.
19194 (mono_class_create_from_typespec): Remove 'container' parameter.
19195 If that parameter is non-null, the result is always inflated by
19196 'mono_class_get_full' anyway.
19197 (mono_class_get): Rename from _mono_class_get. Remove 'container'
19199 (mono_class_get_full): Update.
19201 * class.c (inflate_generic_type) [GENERICINST]: If the generic
19202 instance is not open, don't bother inflating.
19203 (mono_class_setup_fields): Hoist some loop-invariants. Don't
19204 parse metadata for inflated classes.
19205 (_mono_class_get): Change GenericContext* parameter to
19207 (mono_class_create_from_typespec): Likewise. Simplify, and
19208 implement trivially. All the cases are handled in
19209 mono_class_from_mono_type. Don't inflate returned class.
19210 (mono_class_get_full): Delegate GENERICINST optimization to
19211 inflate_generic_type.
19212 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
19214 2006-02-16 Dick Porter <dick@ximian.com>
19216 * socket-io.c (create_object_from_sockaddr): Fix typo.
19217 (create_sockaddr_from_object): Check array lengths before
19218 potentially accessing items off the end.
19219 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
19220 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
19221 (ves_icall_System_Net_Sockets_Socket_Send_internal)
19222 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
19223 length checks to avoid wraparound overflows.
19224 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
19225 contents of the array of sockets
19226 (hostent_to_IPHostEntry2)
19227 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
19228 Check return value of inet_ntop ().
19229 (addrinfo_to_IPHostEntry): Fix typo
19231 2006-02-16 Raja R Harinath <rharinath@novell.com>
19233 Type metadata parsing doesn't use generic-instantiation information.
19234 * metadata.c (mono_metadata_parse_array_full): Change
19235 MonoGenericContext* parameter to MonoGenericContainer*.
19236 (mono_metadata_parse_type_full): Likewise.
19237 (mono_type_create_from_typespec_full): Likewise.
19238 (mono_metadata_parse_mh_full): Likewise.
19239 (mono_metadata_parse_generic_inst): Likewise.
19240 (do_mono_metadata_parse_generic_class): Likewise.
19241 (do_mono_metadata_parse_type): Likewise.
19242 * metadata-internals.h: Update to changes.
19243 * class.c (mono_class_find_enum_basetype): Likewise.
19244 (mono_class_setup_fields): Likewise.
19245 (mono_class_create_from_typespec): Likewise.
19246 * loader.c (method_from_methodspec): Likewise.
19247 (mono_get_method_from_token): Likewise.
19248 (mono_method_get_header): Likewise.
19250 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
19252 * marshal.c: handle additional GENERICINST case (patch from
19253 Thong Nguyen <tum@veridicus.com>).
19254 Fix a few cases where LDIND_I/STIND_I was used for references.
19256 2006-02-16 Raja R Harinath <rharinath@novell.com>
19258 * reflection.c (mono_reflection_get_token): Remove unused variable.
19260 2006-02-16 Martin Baulig <martin@ximian.com>
19262 * reflection.c (mono_reflection_get_token): Add support for fields
19263 in instantiated generic types.
19266 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
19268 2006-02-15 Martin Baulig <martin@ximian.com>
19271 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
19272 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
19273 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
19274 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
19276 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
19278 * class.c, metadata.c, metadata.h, object.c, icall.c,
19279 marshal.c: changed mono_type_get_underlying_type () to do
19280 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
19281 Fixed handling of instantiated generic valuetypes (bug #75479).
19283 2006-02-15 Raja R Harinath <rharinath@novell.com>
19285 * metadata.c (mono_metadata_decode_signed_value): Simplify.
19286 Delegate to mono_metadata_decode_value, and work on the returned value.
19288 * icall.c (ves_icall_MonoType_GetGenericArguments):
19289 Add consistency check here too.
19291 2006-02-15 Ankit Jain <jankit@novell.com>
19293 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
19296 2006-02-15 Ankit Jain <jankit@novell.com>
19298 * metadata.c (mono_metadata_decode_signed_value): New function to decode
19299 signed values, used only for representing lower bounds of arrays.
19300 (mono_metadata_parse_array_full): Use new
19301 mono_metadata_decode_signed_value to decode lower bounds.
19303 2006-02-14 Martin Baulig <martin@ximian.com>
19306 (mono_reflection_get_token): Support "MonoGenericMethod" and
19307 "MonoGenericCMethod" and allow generic instances / methods.
19309 2006-02-11 Zoltan Varga <vargaz@gmail.com>
19311 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
19312 to obtain the terminal size using an ioctl.
19314 * object.c (mono_nullable_init): Revert this as nullable reference
19315 types are not valid.
19316 (mono_nullable_box): Ditto.
19318 2006-02-09 Dick Porter <dick@ximian.com>
19320 * threads.c (mono_thread_detach): Drop a reference to the thread
19323 2006-02-09 Zoltan Varga <vargaz@gmail.com>
19325 * object.c (mono_nullable_init): Handle nullable reference types.
19326 (mono_nullable_box): Ditto. Fixes #77446.
19328 2006-02-07 Martin Baulig <martin@ximian.com>
19330 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
19332 2006-02-07 Ankit Jain <jankit@novell.com>
19334 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
19335 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
19336 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
19337 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
19338 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
19339 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
19341 2006-02-02 Zoltan Varga <vargaz@gmail.com>
19343 * class.c (mono_class_create_generic): Set type_token as well.
19345 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
19346 compatible with MS.
19348 2006-02-02 Martin Baulig <martin@ximian.com>
19350 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
19351 has never been used so far.
19353 2006-02-02 Martin Baulig <martin@ximian.com>
19355 * mono-debug-debugger.h: Changed comment at the top of this file;
19356 the header is not installed, but it's safe to #include it from
19359 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
19360 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
19362 2006-02-02 Martin Baulig <martin@ximian.com>
19365 (MonoSymbolTable): Removed the `metadata_info' field.
19368 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
19370 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
19371 (mono_debugger_add_builtin_types): Removed.
19372 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
19373 (mono_debugger_create_notification_function): We now operate on a
19374 pre-allocated area; take a `gpointer' and return `void'.
19376 * mono-debug-debugger.c
19377 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
19378 (mono_debugger_add_builtin_types): Removed.
19380 2006-02-02 Martin Baulig <martin@ximian.com>
19382 * threads.c (mono_debugger_create_all_threads): New public method.
19384 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
19386 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
19387 breaks on several platforms.
19389 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
19391 * assembly.c: the VS.NET build doesn't supply default values for
19392 MONO_ASSEMBLIES and MONO_CFG_DIR.
19394 2006-02-01 Zoltan Varga <vargaz@gmail.com>
19396 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
19399 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
19401 * loader.c (method_from_memberref): Fix a warning.
19403 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
19405 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
19406 with explicit layout. Fixes #77433.
19408 2006-01-31 Zoltan Varga <vargaz@gmail.com>
19410 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
19411 max_interface_id is initialized before using it. Fixes #77398.
19412 (ves_icall_Type_GetInterfaces): Ditto.
19414 2006-01-30 Raja R Harinath <rharinath@novell.com>
19416 * metadata.c (mono_metadata_parse_method_signature_full): Don't
19417 allocate memory for parameter attributes when parsing memberref
19419 * loader.c (mono_loader_set_error_method_load): Don't warn.
19420 (method_from_memberref): Ensure MissingMethodException gets thrown
19421 if method is not found. Make warning more informative.
19423 2006-01-29 Raja R Harinath <harinath@gmail.com>
19426 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
19427 return true if is byref.
19428 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
19429 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
19430 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
19432 2006-01-27 Raja R Harinath <rharinath@novell.com>
19434 Fix tests/find-method.2.il
19435 * loader.c (find_method, find_method_in_class): Remove is_inflated
19436 argument. Revert 2006-01-18 change.
19437 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
19438 is generic, search for method in its generic definition.
19439 * class.c (mono_class_setup_vtable_general): Print generic
19440 arguments of generic types in debugging printf.
19442 2006-01-26 Zoltan Varga <vargaz@gmail.com>
19444 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
19446 * threads.c (mono_threads_request_thread_dump): New helper function.
19448 2006-01-25 Raja R Harinath <rharinath@novell.com>
19450 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
19452 2006-01-25 Ankit Jain <jankit@novell.com>
19454 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
19455 move definition to ..
19456 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
19458 2006-01-25 Ankit Jain <jankit@novell.com>
19459 Raja R Harinath <rharinath@novell.com>
19461 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
19462 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
19465 2006-01-25 Martin Baulig <martin@ximian.com>
19467 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
19468 `MonoDebuggerThread' into debug-debugger.c.
19470 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
19472 * profiler.c: fix printing of data.
19474 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
19476 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
19477 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
19479 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
19481 * object.c: fix deadlock related to string interning.
19483 2006-01-23 Martin Baulig <martin@ximian.com>
19485 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
19487 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
19489 2006-01-23 Martin Baulig <martin@ximian.com>
19491 * mono-debug.h: Moved the prototypes of some functions which are
19492 used by the JIT here from mono-debug-debugger.h.
19494 2006-01-21 Martin Baulig <martin@ximian.com>
19496 * Makefile.am: Don't install mono-debug-debugger.h.
19498 2006-01-21 Martin Baulig <martin@ximian.com>
19500 * mono-debug-debugger.h: Enforce the private status of this header
19501 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
19502 Moved some stuff from mono-debugger-jit-wrapper.h here.
19504 2006-01-20 Raja R Harinath <rharinath@novell.com>
19506 * class.c (mono_class_from_typeref): Add a sanity test to help
19507 catch lack of assembly load/search hooks.
19509 2006-01-19 Zoltan Varga <vargaz@gmail.com>
19511 * marshal.c (emit_struct_conv): Relax the fields with same offset
19512 check even more. Fixes #77230.
19514 2006-01-18 Martin Baulig <martin@ximian.com>
19516 * loader.c (find_method_in_class): Added `gboolean is_inflated'
19517 argument; if false, we compare the uninstantiated signatures.
19518 (method_from_memberref): Compare the uninstantiated signatures;
19521 2006-01-18 Robert Jordan <robertj@gmx.net>
19523 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
19524 Clear the weak link. Fixes bug #77170.
19526 * gc.c (mono_gchandle_free):
19527 Reflect *-gc.c changes (tiny optimization).
19529 2006-01-18 Zoltan Varga <vargaz@gmail.com>
19531 * metadata.c (mono_metadata_signature_dup): Applied patch from
19532 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
19535 2006-01-17 Zoltan Varga <vargaz@gmail.com>
19537 * marshal.c (emit_struct_conv): Allow fields with the same offset when
19538 marshalling from native to managed code. Fixes #77230.
19540 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19542 * threadpool.c: fix problem (Mac only) when more than one asynchronous
19543 connect. Fixes bug #77020.
19545 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
19547 * class.c: fixed id assignement for nested interfaces (bug #77275).
19548 Added also better info for --print-vtable debugging.
19550 2006-01-12 Martin Baulig <martin@ximian.com>
19552 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
19553 interfaces on-the-fly; fixes #76625.
19555 * class-internals.h
19556 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
19557 don't need that anymore.
19559 2006-01-12 Miguel de Icaza <miguel@novell.com>
19562 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
19563 To avoid initing the nested_classes when not needed I turned the
19564 PeerCredData as a toplevel internal class, as it has to be shared
19567 Fixes the CASA issue.
19569 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
19571 * domain.c: Accessors for MonoJitInfo
19573 * profiler-private.h: Add jitinfo to the end jit hook
19575 * profiler.[ch]: Define new hooks, called after jitting which give
19576 the MonoJitInfo that was compiled
19578 2006-01-10 Martin Baulig <martin@ximian.com>
19580 * class.c (mono_class_setup_events): Add support for generic
19581 classes; fixes #76440.
19583 2006-01-06 Raja R Harinath <rharinath@novell.com>
19586 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
19587 on passed-in method.
19589 2006-01-03 Zoltan Varga <vargaz@gmail.com>
19591 * object.c (mono_runtime_invoke_array): Add Nullable support.
19593 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
19595 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
19597 * file-io.c: Don't consider sockets as directory and avoid an endless
19598 loop. Fix bug #76966.
19600 2006-01-03 Zoltan Varga <vargaz@gmail.com>
19602 * object.c (mono_nullable_init): New helper function.
19603 (mono_nullable_box): Ditto.
19605 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
19607 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
19609 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
19611 2006-01-02 Zoltan Varga <vargaz@gmail.com>
19613 * class.c (mono_class_is_assignable_from): Make T assignable to
19616 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
19618 * appdomain.c: Bump corlib version to 46.
19619 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
19620 serialization purpose) and changed ves_icall_System_Reflection_
19621 Assembly_get_code_base signature to accept a boolean (to escape, or
19622 not, the assembly code base).
19624 2005-12-23 Dick Porter <dick@ximian.com>
19628 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
19629 CreateEvent icall now returns "created" boolean parameter.
19631 2005-12-22 Zoltan Varga <vargaz@gmail.com>
19633 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
19636 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
19637 when attr_klass is an interface. Fixes #77045.
19639 2005-12-20 Zoltan Varga <vargaz@gmail.com>
19641 * marshal.c (emit_struct_conv): Fix previous patch.
19643 * marshal.c (emit_struct_conv): Add a check for fields with the same
19646 2005-12-20 Raja R Harinath <rharinath@novell.com>
19648 Fix regression in Mono.C5.
19649 * class.c (mono_class_create_generic): If 'klass' is an interface
19650 set up the interface offsets.
19651 (mono_class_is_assignable_from): Don't throw away generic arguments.
19653 2005-12-19 Raja R Harinath <rharinath@novell.com>
19655 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
19658 2005-12-15 Raja R Harinath <rharinath@novell.com>
19660 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
19662 (do_mono_metadata_parse_generic_class): Don't pass the current
19663 generic context when parsing the type being instantiated: it
19664 cannot use it, anyway.
19666 * loader.c (method_from_memberref): Don't inflate a signature if
19667 it doesn't contain any type parameters.
19669 2005-12-15 Zoltan Varga <vargaz@gmail.com>
19671 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
19673 2005-12-14 Martin Baulig <martin@ximian.com>
19676 (mono_type_get_name_recurse): Don't return null for type
19677 parameters and open generic classes.
19678 (mono_class_setup_methods): Don't exclude generic instances.
19679 (mono_get_unique_iid): Use different IDs for different
19680 instantiations of the same generic type.
19681 (mono_class_setup_vtable): Only use setup_generic_vtable() for
19682 open generic instances; create a normal vtable for closed generic
19684 (mono_class_setup_vtable_general): We're now also called for
19685 closed generic instances.
19688 (mono_reflection_bind_generic_parameters): Correctly use
19689 mono_metadata_lookup_generic_inst() everywhere.
19691 2005-12-14 Zoltan Varga <vargaz@gmail.com>
19693 * object.c (mono_class_create_runtime_vtable): Call
19694 mono_class_setup_vtable ().
19696 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
19698 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
19701 * loader.c (mono_loader_set_error_type_load): Print the type load
19702 warnings to the console so they are more visible to the user.
19703 (mono_loader_set_error_method_load): Ditto.
19705 * reflection.c (ensure_runtime_vtable): Revert the last change as it
19708 * reflection.c (ensure_runtime_vtable): Fix build.
19710 * reflection.c (ensure_runtime_vtable): Disable an optimization which
19711 doesn't work in all cases.
19713 2005-12-13 Zoltan Varga <vargaz@gmail.com>
19715 * object.c (mono_array_new_full): Treat a single dimensional array
19716 with 0 lower bounds as an szarray. Fixes #76973.
19718 * reflection.c (custom_attr_visible): Really fix this.
19720 2005-12-12 Zoltan Varga <vargaz@gmail.com>
19722 * reflection.c (custom_attr_visible): Allow nested public attributes
19725 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
19728 2005-12-12 Raja R Harinath <harinath@gmail.com>
19730 * class.c (set_generic_param_owner): Delete.
19731 (mono_class_create_from_typedef): Don't set ->owner field of
19732 generic parameters to "param containers" of enclosing classes.
19733 * reflection.c (mono_reflection_initialize_generic_parameter):
19736 2005-12-11 Zoltan Varga <vargaz@gmail.com>
19738 * reflection.c (custom_attr_visible): Fix build.
19740 2005-12-10 Zoltan Varga <vargaz@gmail.com>
19742 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
19743 private attributes.
19745 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
19746 handling of null parameter defaults.
19748 2005-12-09 Raja R Harinath <rharinath@novell.com>
19750 * class.c (mono_class_from_generic_parameter): Don't set
19751 klass->generic_container.
19752 (my_mono_class_from_generic_parameter): Likewise.
19754 2005-12-07 Zoltan Varga <vargaz@gmail.com>
19756 * reflection.c (load_public_key): Fix a warning.
19757 (method_encode_code): Fix unaligned accesses.
19759 2005-12-07 Martin Baulig <martin@ximian.com>
19761 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
19764 (write_generic_param_entry): Encode our custom attrs.
19766 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
19768 2005-12-07 Martin Baulig <martin@ximian.com>
19770 * reflection.c (encode_new_constraint): Removed; we don't use the
19771 `NewConstraintAttribute' anymore.
19773 2005-12-06 Zoltan Varga <vargaz@gmail.com>
19775 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
19776 not fire a TypeResolve event when Assembly.GetType () is called.
19778 2005-12-05 Ben Maurer <bmaurer@ximian.com>
19780 Beginning of support for nullable types in the runtime. Parts of
19781 this patch are from Martin.
19783 * appdomain.c (MONO_CORLIB_VERSION): Bump
19785 * domain.c (mono_init_internal): get the nullable type
19787 * class.c (mono_class_is_nullable): New method
19788 (mono_class_get_nullable_param): New mehod
19789 (mono_class_create_generic): In types T? set cast_class to T
19791 * class-internals.h (MonoDefaults): new nullable default class
19792 (mono_class_get_nullable_param, mono_class_get_nullable_param):
19795 2005-12-05 Raja R Harinath <rharinath@novell.com>
19797 * metadata.c (select_container): New. Refactor code to select the
19798 appropriate GenericContainer given the type of generic parameter
19799 we are looking for.
19800 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
19801 not a MonoGenericContext. Use select_container. Update parameters.
19802 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
19803 and MONO_TYPE_MVAR.
19804 (unwrap_arrays): Remove duplicate tests.
19805 (find_generic_param): Rename from 'has_same_context'. Now walks a
19806 generic instantiated class to find any arguments that are generic
19808 (mono_type_create_from_typespec_full): Use find_generic_param to
19809 avoid evicting some generic instantiations from the typespec
19812 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
19814 * reflection.c: fixed writing of doubles on ARM FPA.
19816 2005-12-02 Robert Jordan <robertj@gmx.net>
19818 * icall.c: Fixed EventInfo.ReflectedType (#76829).
19820 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19822 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
19823 least on SUSE 10 they are not the same (on debian, they are just the
19826 2005-12-01 Raja R Harinath <rharinath@novell.com>
19828 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
19829 DeclaringType for VARs and MVARs.
19830 * class.c (set_generic_param_owner): Fix initialization of owner
19833 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
19835 * icall.c: fixed Enum.ToObject() to correctly convert the values.
19837 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19839 * threadpool.c: workaround for a bug that shows up on the Mac:
19840 select()+connect() on a blocking socket is not like it should
19841 be, so we proceed to connect() in that case, wasting the I/O
19842 threadpool thread until connect succeedes. Fixes bug #75436.
19844 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19846 * threadpool.c: fix typo when setting file descriptor states.
19848 2005-11-28 Raja R Harinath <rharinath@novell.com>
19850 * class-internals.h (MonoGenericContainer.is_signature): Remove.
19851 * metadata.c (mono_metadata_parse_method_signature_full): Don't
19852 create a temporary signature container.
19853 (mono_metadata_parse_generic_param): Update to changes.
19854 (mono_type_create_from_typespec_full): Update to changes.
19855 * loader.c (method_from_memberref): Don't use a
19856 MonoGenericContainer while parsing a memberref signature.
19857 (method_from_methodspec): Remove dead-store of the 'container'
19858 variable. It's overwritten before use.
19860 * metadata.c (mono_type_create_from_typespec_full): Make debugging
19862 (mono_metadata_parse_generic_param): Likewise.
19863 * loader.c (find_method_in_class): Does not need a
19864 MonoGenericContainer. Use 'mono_method_signature' rather than
19865 'mono_method_signature_full'.
19866 (find_method, mono_get_method_constrained, method_from_memberref):
19869 * metadata.c (mono_type_create_from_typespec_full): Ensure that
19870 owner-less generic-parameters are never evicted from the typespec
19873 * loader.c (method_from_memberref): Don't use the current context
19874 when parsing signatures.
19875 (method_from_methodspec, mono_get_method_from_token): Update to changes.
19877 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
19878 side-effects in g_assert.
19879 * loader.c (mono_get_method_from_token): Resolve klass earlier so
19880 that we don't potentially lose information.
19882 2005-11-26 Dick Porter <dick@ximian.com>
19885 * threads.c: icalls to implement basic (ie, not named)
19886 System.Threading.Semaphore.
19888 2005-11-24 Dick Porter <dick@ximian.com>
19891 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
19892 Use GetProcessId() if it's available.
19894 2005-11-23 Zoltan Varga <vargaz@gmail.com>
19896 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
19898 2005-11-23 Raja R Harinath <rharinath@novell.com>
19899 Ankit Jain <jankit@novell.com>
19901 * loader.c (mono_get_method_from_token): Initialize 'method' field
19902 of all generic parameters before parsing the signature. Remove
19903 code that "fixed"-up MVAR references.
19905 2005-11-23 Ankit Jain <jankit@novell.com>
19907 * metadata.c (mono_metadata_has_generic_params):
19908 (mono_metadata_load_generic_param_constraints):
19909 (mono_metadata_load_generic_params): Move duplicate code ...
19910 (mono_metadata_get_generic_param_row): ... here. Returns the
19911 first row-id in GenericParam table for a given owner (token).
19912 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
19915 2005-11-23 Raja R Harinath <rharinath@novell.com>
19916 Ankit Jain <jankit@novell.com>
19918 * metadata.c (mono_metadata_class_equal): Pass signature_only when
19919 comparing VARs too.
19920 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
19921 type->data.generic_param only if the type is an MVAR.
19922 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
19923 leak owner-less VARs and MVARs into managed space.
19925 2005-11-21 Martin Baulig <martin@ximian.com>
19927 * class-internals.h
19928 (MonoMethod): Moved the `generic_container' here from
19929 `MonoMethodNormal' since we now also need it for
19930 `MonoMethodPInvoke';
19931 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
19932 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
19933 an union containing both `MonoMethodNormal' and
19934 `MonoMethodPInvoke'.
19937 (mono_get_method_from_token): Allow implementing generic methods
19941 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
19944 2005-11-17 Dick Porter <dick@ximian.com>
19948 * process.c: Split the Process Start_internal icall into
19949 ShellExecuteEx_internal and CreateProcess_internal, which are
19950 called depending on whether UseShellExecute is true. Fixes bug
19953 * appdomain.c (MONO_CORLIB_VERSION): Incremented
19955 2005-11-17 Zoltan Varga <vargaz@gmail.com>
19957 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
19958 'msize' parameters, use the information in 'mspec' instead.
19959 (emit_object_to_ptr_conv): Ditto.
19961 * marshal.c (emit_struct_conv): Handle explicit layout structs with
19962 fields out of order. Fixes #76733.
19964 2005-11-17 Ankit Jain <jankit@novell.com>
19966 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
19968 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
19970 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
19973 2005-11-16 Zoltan Varga <vargaz@gmail.com>
19975 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
19976 for types with non-auto layout. Fixes #76717.
19978 2005-11-16 Ankit Jain <jankit@novell.com>
19980 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
19981 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
19982 if generic_context is null.
19983 (mono_metadata_generic_param_equal): param->owner can be null.
19984 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
19987 2005-11-16 Zoltan Varga <vargaz@gmail.com>
19989 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
19992 2005-11-15 Martin Baulig <martin@ximian.com>
19994 * object.c (set_value): Use mono_class_from_mono_type() instead of
19995 the hack for generic instances; fixes #76136.
19997 2005-11-15 Zoltan Varga <vargaz@gmail.com>
19999 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
20002 * image.c (load_metadata_ptrs): Initialize the new fields.
20004 * reflection.c (create_dynamic_mono_image): Ditto.
20006 * reflection.c (build_compressed_metadata): Use the new fields.
20008 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
20011 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
20014 2005-11-15 Ankit Jain <jankit@novell.com>
20015 Raja R Harinath <harinath@gmail.com>
20017 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
20018 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
20019 new per-generic_container cache if the cached MonoType's context matches
20020 the current context.
20021 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
20022 to the expected context.
20023 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
20025 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20027 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
20028 we changed the signature of an icall.
20029 * icall.c: Modify to mono_double_ParseImpl return true/false
20030 depending on the success, instead of throwing the exception. This will
20031 help us in Double.TryParse methods.
20033 2005-11-14 Zoltan Varga <vargaz@gmail.com>
20035 * marshal.c (emit_marshal_object): Throw an exception when
20036 marshalling 'object' instead of crashing. Fixes #76696.
20038 2005-11-11 Zoltan Varga <vargaz@gmail.com>
20040 * class-internals.h: Add prototype for mono_type_get_full_name ().
20042 2005-11-11 Dick Porter <dick@ximian.com>
20044 * threads.c (mono_thread_manage): Make sure the main thread has
20045 abandoned all its mutexes when cleaning up. Fixes bug 74680.
20047 2005-11-11 Zoltan Varga <vargaz@gmail.com>
20049 * loader.c (mono_loader_set_error_type_load): Log a warning to the
20050 console about the missing type.
20051 (mono_loader_set_error_method_load): Ditto.
20053 2005-11-09 Miguel de Icaza <miguel@novell.com>
20055 * mono-config.c (mono_get_config_dir): Set the system defaults if
20058 * assembly.c (mono_set_dirs): New API entry point to set the
20059 assembly and the config directory in one call
20061 2005-11-09 Zoltan Varga <vargaz@gmail.com>
20063 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
20064 the ftnptr was created from a delegate in a domain other than the
20065 current domain. Fixes #75377.
20067 * exception.h exception.c: Add mono_get_exception_not_supported ().
20069 2005-11-08 Martin Baulig <martin@ximian.com>
20071 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
20073 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
20075 * security-manager.h: Added definitions to deal with strongname key
20076 pairs bigger (and smaller) than 1024 bits.
20077 * reflection.c: Remove hardcoded strongname size (128 bytes) and
20078 adjust wrt the public key length being used.
20080 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
20082 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
20083 Windows build (r51396-51397).
20085 2005-11-03 Martin Baulig <martin@ximian.com>
20087 * class.c (mono_class_setup_vtable_general): Also add generic
20088 methods to the vtable; fixes #76581.
20090 2005-11-01 Miguel de Icaza <miguel@novell.com>
20092 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
20093 sure that we lookup GetString method from the System.Text.Encoding
20094 class, not the derived class or we get an empty method.
20096 Fixed class #76612.
20098 2005-10-25 Miguel de Icaza <miguel@novell.com>
20100 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
20101 if it has been previously set (embedders).
20103 Make mono_set_rootdir available also on Unix.
20105 005-10-24 Robert Jordan <robertj@gmx.net>
20107 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
20109 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
20111 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
20112 only calls which are made to native code use this flag.
20114 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
20116 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
20118 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
20119 Add support for FieldBuilders.
20121 2005-10-29 Martin Baulig <martin@ximian.com>
20124 (mono_debug_using_mono_debugger): New public method; returns
20125 whether we're running inside the debugger.
20127 2005-10-27 Zoltan Varga <vargaz@gmail.com>
20129 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
20130 for Method/Constructor/FieldBuilders.
20132 2005-10-26 Zoltan Varga <vargaz@gmail.com>
20134 * reflection.c (module_add_cattrs): Save custom attributes for global methods
20135 and fields as well.
20137 2005-10-26 Martin Baulig <martin@ximian.com>
20139 * mono-debug-debugger.c
20140 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
20142 2005-10-24 Raja R Harinath <harinath@gmail.com>
20144 * icall.c (base64_to_byte_array): Don't pass an out-of-range
20145 integer to isspace.
20147 2005-10-21 Zoltan Varga <vargaz@gmail.com>
20149 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
20150 when passing valuetypes byref. Fixes #76502.
20152 2005-10-19 Jackson Harper <jackson@ximian.com>
20154 * profiler.c: Don't put a . in front of types that are not in a
20157 2005-10-18 Zoltan Varga <vargaz@gmail.com>
20159 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
20161 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
20163 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
20165 (mono_marshal_get_ldflda_wrapper): Fix a warning.
20167 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20169 * assembly.c metadata-internals.h icall.c: Define an additional
20170 parameter for mono_assembly_name_parse_full, so we can avoid creating
20171 S.R.AssemblyName.Version when no version info wasn't passed.
20173 2005-10-09 Miguel de Icaza <miguel@novell.com>
20175 * class.c (mono_type_get_full_name): Reimplement method that was
20178 * image.c: Some docs
20180 2005-10-10 Zoltan Varga <vargaz@gmail.com>
20182 * profiler.c (output_newobj_profile): Fix printing of Total memory
20185 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
20187 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
20189 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
20191 * threads.c: remove debug output.
20193 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
20195 * threads.c (mono_thread_manage): Fix crashes if more than 64
20196 threads need to be aborted. Hopefully fixes #75899.
20198 * assembly.c (mono_stringify_assembly_name): New helper function.
20200 * class.c: Use mono_stringify_assembly_name instead of the similar
20203 * assembly.h assembly.c: Add support for calling a postload search
20204 hook if an assembly cannot be loaded.
20206 * appdomain.c: Register new search hooks which call the AssemblyResolve
20207 events in AppDomain. Fixes #75231
20209 2005-10-07 Martin Baulig <martin@ximian.com>
20211 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
20212 methods without debug info.
20214 2005-10-07 Zoltan Varga <vargaz@gmail.com>
20216 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
20219 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20221 * file-io.c: now that we return symlinks, use lstat and, when the file
20222 is a symbolic link, stat, to get the file attributes. Also avoid the
20223 conversion to/from utf16/external.
20225 2005-10-06 Zoltan Varga <vargaz@gmail.com>
20227 * class.c (mono_class_layout_fields): Compute klass->has_references
20228 correctly if an embedded valuetype is not yet initialized. Fixes
20231 2005-10-04 Martin Baulig <martin@ximian.com>
20234 (mono_metadata_load_generic_param_constraints): New public
20235 function; splitted the constraints loading out from
20236 mono_metadata_load_generic_params().
20238 * class.c (mono_class_create_from_typedef): Call
20239 mono_metadata_load_generic_param_constraints() after setting up
20240 the type and creating our parent; fixes #75329.
20242 2005-10-04 Martin Baulig <martin@ximian.com>
20244 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
20245 non-dynamic parent classes.
20247 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
20249 * file-io.c : win32 build fix (ETXTBSY seems not found).
20251 2005-10-04 Martin Baulig <martin@ximian.com>
20254 (mono_image_get_methodspec_token): Make the cache actually work;
20257 2005-10-04 Martin Baulig <martin@ximian.com>
20259 * class.c (mono_class_name_from_token): Removed the unneccessary
20260 `MonoGenericContext *' argument.
20262 2005-10-04 Martin Baulig <martin@ximian.com>
20265 (method_from_methodspec): Make the caching work again; fixes the
20266 performance regression from #76262.
20268 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20272 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
20273 GetFileSystemEntries that performs the same work but without going
20274 into io-layer, locking, etc.
20276 2005-09-30 Zoltan Varga <vargaz@gmail.com>
20278 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
20279 ThreadState_Stopped as well. Fixes #76047.
20281 2005-09-29 Martin Baulig <martin@ximian.com>
20284 (inflate_generic_context): If the new context has a `gmethod', set
20285 its `container' that that gmethod's `container'.
20288 (mono_metadata_parse_generic_param): Simplify things;
20289 `generic_container = generic_context->container;' is just fine.
20291 * loader.c (method_from_methodspec): Code cleanups.
20293 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
20295 * decimal.c: fix warning (and let gcc generate correct
20296 code on ARM with optimizations).
20298 2005-09-28 Martin Baulig <martin@ximian.com>
20301 (method_from_memberref): Added `MonoGenericContext *class_context'
20302 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
20303 (method_from_methodspec): If we're a memberref, use the enclosing
20304 context when parsing its parent. Fixes #76262; see gtest-206.cs.
20306 2005-09-28 Martin Baulig <martin@ximian.com>
20308 * object.c (mono_runtime_invoke_array): Added support for
20309 MONO_TYPE_GENERICINST; fixes #75917.
20311 2005-09-27 Martin Baulig <martin@ximian.com>
20313 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
20314 `k->byval_arg.type' to determine the actual type.
20316 * loader.c (method_from_methodspec): Removed some hacks.
20318 2005-09-27 Ben Maurer <bmaurer@ximian.com>
20320 * class-internals.h (mono_field_is_deleted): Do the test for
20321 rtspecialname before we check the actual name of the field. This
20322 prevents us from dereferencing a pointer into the string table,
20323 saving us from accessing a few pages
20325 * *.c: Replace the use of {Enter,Leave}CriticalSection with
20326 macros. This will allow a deadlock debugger to easily be plugged
20329 2005-09-27 Martin Baulig <martin@ximian.com>
20331 * loader.c (method_from_methodspec): Create a "signature"
20332 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
20334 2005-09-27 Martin Baulig <martin@ximian.com>
20337 (inflate_generic_class): Correctly set the new context's
20341 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
20342 instead of a `MonoGenericContext *'.
20343 (mono_method_signature_full): Take a `MonoGenericContainer *'
20344 instead of a `MonoGenericContext *'.
20347 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
20348 instead of a `MonoGenericContext *'.
20349 (mono_metadata_parse_method_signature_full): Likewise.
20351 2005-09-26 Martin Baulig <martin@ximian.com>
20354 (mono_class_from_generic_parameter): Set `klass->generic_container'
20355 (mono_class_from_generic_parameter): Likewise.
20356 (mono_bounded_array_class_get): We inherit the generic container
20357 from the element class.
20360 (find_method, find_method_in_class): Take a `MonoGenericContext *'
20361 argument rather than computing it here.
20362 (method_from_memberref): Correctly set the generic context before
20363 parsing the signature. Fixes #75681.
20365 2005-09-26 Zoltan Varga <vargaz@gmail.com>
20367 * object.c (mono_class_has_special_static_fields): Fix warnings.
20369 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20371 * assembly.c: Add parse_public_key function, to
20372 par the public keys. Also added mono_assembly_name_parse_full,
20373 to define it the parsed key should be freed or not.
20374 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
20375 to parse a long format assembly name.
20376 * metadata-internals.h: Keep mono_assembly_name_parse_full as
20377 private, since calling it to preserve the key requires
20378 freeing it manually.
20380 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
20382 * locales.c : removed HAVE_ICU part.
20384 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
20386 * object.c (mono_class_create_runtime_vtable): Avoid calling
20387 field_is_special_static if the klass has no special static fields.
20389 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
20390 (MonoCachedClassInfo): Likewise.
20392 * object.c (mono_class_has_special_static_fields): New helper function.
20394 2005-09-23 Zoltan Varga <vargaz@gmail.com>
20396 * class.c (mono_class_create_from_typedef): Don't call
20397 interfaces_from_typedef_full for enums.
20398 (mono_class_create_from_typedef): Compute the base types of enums directly
20399 without calling mono_class_setup_fields ().
20400 (mono_class_find_enum_basetype): New helper function.
20402 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
20403 one place inside the string heap.
20405 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
20407 * class.c: locking fixes, code cleanups, some docs added.
20408 Allocate some data structures in the image mempool.
20410 2005-09-23 Zoltan Varga <vargaz@gmail.com>
20412 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
20415 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
20417 * class-internals.h, class.c, reflection.c: reduce memory taken by
20420 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
20422 * metadata.c, metadata.h, loader.h: documentation updates, code and
20425 2005-09-23 Zoltan Varga <vargaz@gmail.com>
20427 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
20430 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
20431 page faults caused by the runtime while reading metadata.
20433 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20435 * socket-io.c: the field names were changed 3 months ago and no one
20436 realized until bug #76077 got filed!
20438 2005-09-20 Martin Baulig <martin@ximian.com>
20440 * icall.c (assembly_icalls): Removed some unused debugger icalls.
20442 2005-09-20 Martin Baulig <martin@ximian.com>
20444 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
20445 write the rank into the class entry.
20447 2005-09-20 Martin Baulig <martin@ximian.com>
20449 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
20451 2005-09-19 Zoltan Varga <vargaz@gmail.com>
20453 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20455 * icall.c (custom_attrs_defined_internal): New icall.
20457 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
20459 (mono_custom_attrs_construct_by_type): New helper function.
20461 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
20463 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
20464 terminate the resulting string. Fixes #76123.
20466 2005-09-16 Martin Baulig <martin@ximian.com>
20469 (mono_debug_add_method): Ignore inflated methods for the moment.
20471 2005-09-14 Martin Baulig <martin@ximian.com>
20473 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
20475 2005-09-13 Zoltan Varga <vargaz@gmail.com>
20477 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
20478 return a success/failure indication.
20479 (mono_metadata_interfaces_from_typedef_full): Ditto.
20480 (get_constraints): Ditto.
20482 2005-09-12 Zoltan Varga <vargaz@gmail.com>
20484 * marshal.c (emit_marshal_array): Fix handling of null arrays.
20486 * marshal.c (emit_marshal_array): Add support for returning string
20487 arrays from delegates. Fixes #76063.
20489 * marshal.c: Use the emit_ldloc/stloc macros where possible.
20491 2005-09-11 Zoltan Varga <vargaz@gmail.com>
20493 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
20496 2005-09-09 Zoltan Varga <vargaz@gmail.com>
20498 * reflection.c icall.c: Fix after mono_get_exception_type_load
20501 * assembly.c (mono_assembly_get_assemblyref): New helper function.
20502 (mono_assembly_load_reference): Use the new helper.
20504 * class-internals.h (MonoLoaderError): New structure containing
20505 information about type loading errors.
20507 * class-internals.h loader.c: Add APIs to store per-thread loader
20510 * loader.c class.c: Set the loader error if needed.
20512 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
20514 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
20516 * decimal.c: fixed to handle the broken ARM fp format.
20518 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
20520 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
20523 2005-09-06 Martin Baulig <martin@ximian.com>
20525 * domain.c (supported_runtimes): Added v2.0.50727.
20527 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
20529 * culture-info.h: reduce the size of some structures.
20531 2005-09-05 Martin Baulig <martin@ximian.com>
20533 Reflect latest API changes in the August CTP.
20536 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
20537 ("MonoType.HasGenericArguments"): Removed.
20538 ("MonoMethod.BindGenericParameters"): Renamed to
20539 "MakeGenericMethod".
20540 ("MethodBuilder.BindGenericParameters"): Renamed to
20541 "MakeGenericMethod".
20543 2005-09-05 Martin Baulig <martin@ximian.com>
20545 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
20547 2005-09-05 Martin Baulig <martin@ximian.com>
20549 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20551 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
20552 generic_container is non-NULL.
20554 2005-09-05 Martin Baulig <martin@ximian.com>
20556 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20558 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
20560 2005-08-29 Michal Moskal <malekith@nemerle.org>
20562 * reflection.c (encode_locals,
20563 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
20564 for large generic types.
20566 2005-09-05 Martin Baulig <martin@ximian.com>
20568 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20570 * class.c (mono_dup_array_type): New public method.
20571 (mono_metadata_signature_deep_dup): New public method.
20572 (dup_type): Correctly duplicate array and function types.
20574 2005-09-05 Martin Baulig <martin@ximian.com>
20576 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20578 * reflection.c (get_default_param_value_blobs): Handle generic types
20579 and generic methods.
20581 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
20583 * class.c: Fixed error reporting (method/class were inversed) for
20584 inheritance demands.
20585 * security-manager.c|h: Added the AppDomain when calling the managed
20586 System.Security.SecurityManager.InheritanceDemand method.
20588 2005-09-01 Raja R Harinath <rharinath@novell.com>
20590 * reflection.c (encode_marshal_blob): 'marshaltype' and
20591 'marshaltyperef' are alternate sources for the custom marshaler
20594 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
20596 * class.c: fix creation of array classes with rank == 1
20597 (patch by Ankit Jain <jankit@novell.com>).
20599 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
20601 * object.c: fix check for creating the bound data for arrays vs
20604 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20606 * object.c: configuration file name is now based on the executable name,
20607 not the image name. Fixes bug #75931.
20609 2005-08-29 Zoltan Varga <vargaz@gmail.com>
20611 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
20612 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
20614 2005-08-25 Zoltan Varga <vargaz@gmail.com>
20616 * rand.c: Use wincrypt.h instead of WinCrypt.h.
20618 2005-08-24 Ankit Jain <jankit@novell.com>
20619 Raja R Harinath <rharinath@novell.com>
20621 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
20622 called by it recursively.
20623 (mono_class_init): Remove special case in pending_init handling, since it's
20624 superseded by the fix to mono_class_from_typeref.
20626 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
20628 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
20629 BROKEN_THREAD_START stuff.
20631 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
20633 * class-internals.h object.c: Add a new kind of trampoline called a delegate
20636 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
20638 * object.c (mono_delegate_ctor): Replace the original function address with
20639 a delegate trampoline.
20641 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
20643 * icall.c: add boolean argument to base64_to_byte_array and
20644 InternalFromBase64String to control whether a whitespace-only string
20645 is allowed (or should casue a FormatException to be thrown). We need
20646 this as the behavior has changed between MS.NET 1.x and 2.0, and we
20647 to match the MS behaviour in both profiles.
20648 * appdomain.c: Bump corlib version.
20650 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20652 This patch implements a big portion of publisher policy
20653 support, used to bind assembly versions and redirect
20654 one assembly from version A to version B.
20657 New GSList loaded_assembly_bindings, for storing the cached
20659 (assembly_binding_maps_name): New static function for checking if a
20660 assembly binding information maps an assembly name.
20661 (mono_assembly_binding_info_free): New function for freeing
20662 assembly binding information resources.
20663 (get_publisher_policy_info): New static function for retrieving
20664 assembly binding information from a MonoImage.
20665 (compare_versions): New static function for comparing an assembly
20666 binding information data and the version of an assembly name.
20667 (check_policy_versions): New static function for checking if an
20668 assembly binding info mapping an assembly name is valid for it.
20669 (mono_assembly_load_publisher_policy): New static function for
20670 loading the 'policy.major.minor.MyAssembly' image for an assembly
20671 with an assembly name 'aname'.
20672 (mono_assembly_bind_version): New static function for updating
20673 assembly redirection.
20674 (mono_assembly_apply_binding): New static function for applying
20676 (search_binding_loaded): New static function for searching
20677 loaded assembly binding infos in the cache domain.
20678 (mono_assembly_load_full): Don't apply assembly binding for
20679 reflection only assemblies.
20681 * metadata-internals.h: Add MonoAssemblyBindingInfo,
20682 which contains information about assembly binding. Also
20683 declare signature for mono_config_parse_publisher_policy ()
20684 function, used to retrieve pub policy info.
20687 (publisher_policy_start): New static function used to parse publisher
20688 policy config files.
20689 (publisher_policy_parser): New static MonoParseHandler containing
20690 the functions used when parsing config files.
20691 (mono_config_parse_publisher_policy): New function for parsing
20692 publisher policy files.
20694 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
20696 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
20698 * marshal.c (mono_delegate_free_ftnptr): Ditto.
20700 * object.c (mono_get_addr_from_ftnptr): New helper function.
20702 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
20704 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20706 2005-08-19 Dick Porter <dick@ximian.com>
20708 * threads.c, threads.h, appdomain.c, appdomain.h,
20709 profiler-private.h, monitor.c, object.c, object-internals.h,
20710 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
20711 store the thread ID, so it can hold a 64 bit value if needed.
20713 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
20715 * reflection.c (mono_reflection_create_dynamic_method): Store the
20716 handle class into the method references as well so ldtoken works in
20719 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
20722 2005-08-19 Ankit Jain <jankit@novell.com>
20725 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
20726 here rather than using the method signature of a arbitrary function
20727 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
20729 Hack done with Harinath.
20731 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20733 * threadpool.c: disable printing stack traces when we get a exception
20734 in a threadpool thread. I need to do more testing to figure out which
20735 cases actually print this. Fixes bug #75828.
20737 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20739 * icall.c: there might be ignored whitespace after the last '='. This
20740 fixes length computation and bug #75840.
20742 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
20744 * assembly.c (mono_assembly_load_full): Consider .exe extension as
20745 well. Fixes #75809.
20747 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
20750 * reflection.c (create_custom_attr_data): Ditto.
20752 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
20754 * locales.c, culture-info.h : removed RegionLCIDMap.
20755 * culture-info-tables.h : regenerated.
20757 2005-08-16 Martin Baulig <martin@ximian.com>
20759 * class.c (mono_type_get_name_recurse): Small fix.
20761 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
20763 * locales.c : indentation fixie.
20765 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
20767 * object-internals.h,
20771 icall.c : added RegionInfo table support.
20772 * culture-info-table.h : regenerated for region support.
20774 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
20776 * reflection.c (resolve_object): handle all kinds of MonoMethod
20777 including generic ones
20779 2005-08-12 Ankit Jain <jankit@novell.com>
20781 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
20782 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
20784 2005-09-12 Lluis Sanchez <lluis@ximian.com>
20786 * process.c: Don't close a thread handle when it's NULL. This is a
20787 workaround for bug #75733.
20789 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
20791 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
20793 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
20795 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
20797 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20799 * threadpool.c: if a work item in the thread pool has a callback that
20800 catches a exception, don't propagate it after invoking the callback.
20803 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
20805 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
20807 * class-internals.h (MonoCachedClassInfo): Add some new fields.
20809 * class.c (mono_class_init): Load field info lazily in the AOT case.
20811 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
20813 2005-08-03 Ankit Jain <jankit@novell.com>
20816 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
20817 PInvoke calling convention is 0.
20819 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
20821 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
20822 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
20824 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
20826 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
20827 to handle threads not started by the GC (patch by Michael Meeks
20828 <michael.meeks@novell.com>).
20830 2005-07-31 Kamil Skalski <nazgul@omega.pl>
20832 * reflection.c: Make buffer used in emitting types larger for some
20833 big generic types (patch by Michal Moskal).
20835 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
20837 * mono-debug.c: Fix some (not all) alignment problems.
20839 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20841 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
20842 Invoke mono_image_load_from_data_full passing the refonly
20846 (mono_assembly_open_from_bundle): Add the refonly argument,
20847 in order to pass it to other methods it calls to.
20848 (do_mono_assembly_open): Add the refonly argument, in order
20849 to pass it to other methods it calls to.
20850 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
20851 the refonly parameter to it.
20853 * image.c: Add loaded_images_refonly_hash and
20854 loaded_images_refonly_guid_hash to cache the reflection
20855 only loaded images.
20856 (mono_images_init): Initialize the hash tables used for
20857 caching the reflection only images.
20858 (load_modules): Invoke mono_image_open_full passing the refonly
20859 parameter to load the modules the correct way.
20860 (build_guid_table): Add the refonly argument, to re-build the
20861 correct hash table.
20862 (do_mono_image_open): Added the refonly argument, in order to
20863 define it for the loaded image.
20864 (mono_image_loaded_full): New function, which receives an
20865 additional parameter to look for the image in the refonly or
20866 non-refonly section.
20867 (mono_image_loaded): Updated, using mono_image_loaded_full.
20868 (mono_image_loaded_by_guid_full): The same case that happens
20869 with mono_image_loaded_full.
20870 (mono_image_loaded_by_guid): Likewise.
20871 (register_image): Use the ref_only variable inside MonoImage
20872 to decide in which hash table store the current image.
20873 (mono_image_open_from_data_full): Rename
20874 mono_image_open_from_data to mono_image_open_from_data_full,
20875 adding the refonly argument, to define the ref_only variable
20877 (mono_image_open_from_data): Return
20878 mono_image_open_from_data_full.
20879 (mono_image_open_full): Rename mono_image_open to
20880 mono_image_open_full, receiving the new refonly argument,
20881 to pass it to inner methods.
20882 (mono_pe_file_open): Update this function, to open
20883 a MonoImage as a non-refonly image.
20884 (mono_image_close): Use the refonly variable inside
20885 MonoImage to remove the image from the correct caches.
20887 * image.h: Add the signatures of mono_image_open_full,
20888 mono_image_open_from_data_full, mono_image_loaded_full,
20889 mono_image_loaded_by_guid_full.
20891 * metadata-internals.h: Add the ref_only field to
20894 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20896 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
20897 Fix the last behavior, which used to load the assemblies and
20898 extract MonoReflectionAssemblyName information, instead of
20899 extract it from the metadata tables. Needed for Reflection
20902 2005-07-29 Martin Baulig <martin@ximian.com>
20904 * mono-debug-debugger.c
20905 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
20909 (mono_debug_address_from_il_offset): Check whether we have
20910 debugging support before attempting to take the lock.
20911 (mono_debug_source_location_from_address): Likewise.
20912 (mono_debug_source_location_from_il_offset): Likewise.
20913 (mono_debug_il_offset_from_address): Likewise.
20914 (mono_debug_address_from_il_offset): Likewise.
20916 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
20918 * class.c (mono_class_from_name_case): Add support for dynamic images.
20921 * object.c (mono_class_compute_gc_descriptor): Add a workaround
20924 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
20926 * reflection.c (mono_method_get_object): Fix warning.
20928 2005-07-28 Martin Baulig <martin@ximian.com>
20931 (mono_debug_add_wrapper): Also write the wrapper type.
20933 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
20935 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
20937 * class.c (mono_class_init): Avoid reading nested classes if the AOT
20938 data indicates the class has none.
20940 2005-07-26 Ben Maurer <bmaurer@ximian.com>
20942 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
20943 loader lock with the debugger lock. Prevents deadlocks for beagle.
20945 Beagle can now run on an smp box for a weekend without any
20948 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
20950 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
20951 in a module. Fixes #75629.
20953 2005-07-26 Martin Baulig <martin@ximian.com>
20955 * mono-debug.c (mono_debug_add_wrapper): New static method.
20956 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
20957 interncall or a wrapper.
20959 * mono-debug.h (MonoDebugWrapperData): New public typedef.
20960 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
20961 (MONO_DEBUGGER_VERSION): Bump to 51.
20963 * mono-debug-debugger.c
20964 (mono_debugger_add_type): Removed this empty function.
20965 (mono_debugger_add_method): Likewise.
20967 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
20969 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
20970 before accessing method->slot.
20972 2005-07-21 Jb Evain <jbevain@gmail.com>
20974 * reflection.c (method_encode_clauses/class): Handle filters clauses.
20977 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
20979 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
20982 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
20984 * image.h image.c: Add mono_image_get_guid () API function.
20986 2005-07-19 Ben Maurer <bmaurer@ximian.com>
20988 There were issues when multiple threads tried to load
20989 assemblies. A deadlock was created between assemblies_mutex and
20990 mono_domain_assemblies_lock. This fixes the issue by making the
20991 assembly ref counting be lock free. See bug 75586.
20993 * image.c (mono_image_close): The add ref function here was using
20994 Interlocked operations while the unref was using a mutex and a
20995 --. I don't think this was ever a bug that would be exposed in a
20996 non-pendantic way (ie, by an embedder doing a ref on one thread
20997 and an unref on another), but for the sake of correctness, this is
21000 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
21001 (mono_assembly_load_reference): Call mono_assembly_addref rather
21002 than touching the refcount ourselves.
21003 (mono_assembly_close): Use InterlockedDecrement to unref the
21004 assembly. Don't acquire the lock unless it is actually needed.
21006 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
21008 * class.c (mono_class_layout_fields): Fix calculation of has_references
21011 2005-07-12 Martin Baulig <martin@ximian.com>
21013 Applying a patch from Michal Moskal <malekith@nemerle.org>.
21016 (mono_type_hash): Provide better hashing for generic instances.
21017 (mono_generic_inst_hash): Improve hashing.
21018 (mono_generic_class_hash): Likewise.
21020 * reflection.c (mymono_metadata_type_hash): Improve hashing for
21023 2005-07-12 Martin Baulig <martin@ximian.com>
21025 * reflection.c (mono_reflection_create_runtime_class): Remove the
21026 hack for generic type definitions and non-`Run' assemblies.
21027 (mono_reflection_bind_generic_parameters): Also use
21028 `klass->wastypebuilder' to check for TypeBuilders.
21030 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
21032 * class.c (mono_class_layout_fields): Fix calculation of has_references
21035 * class.c (inflate_generic_class): Fix a leak.
21036 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
21039 2005-07-11 Martin Baulig <martin@ximian.com>
21041 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
21044 2005-07-11 Martin Baulig <martin@ximian.com>
21046 * loader.c (find_method): Also lookup in
21047 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
21049 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
21051 * appdomain.c (mono_domain_unload): Don't free the error message
21052 before passing it to mono_get_exception_...
21054 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
21056 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
21058 * threads.c: try to better guess an available RT signal (bug #75387).
21060 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
21062 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
21065 2005-07-07 Martin Baulig <martin@ximian.com>
21067 * class.c (mono_type_get_name_full): Return NULL for
21068 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
21071 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
21073 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
21074 exit the appdomain as well being aborted.
21076 * threadpool.c: Create all threadpool threads inside the root appdomain, and
21077 change back to the root domain after calling managed code. This enables
21078 appdomains using threadpools to be unloaded.
21080 2005-07-07 Martin Baulig <martin@ximian.com>
21082 * class-internals.h
21083 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
21084 into `MonoDynamicGenericClass' since we only need it for dynamic
21087 * reflection.c (mono_class_bind_generic_parameters): We don't need
21088 to compute the `parent' here.
21090 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
21092 * culture-info-table.h : regenerated.
21094 2005-07-06 Martin Baulig <martin@ximian.com>
21097 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
21099 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
21101 2005-07-06 Martin Baulig <martin@ximian.com>
21103 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
21104 we're doing a signature-only comparision; fixes #74945.
21106 2005-07-06 Martin Baulig <martin@ximian.com>
21108 * class-internals.h (MonoGenericClass): Moved some things out into
21109 a new `MonoInflatedGenericClass' type.
21110 (MonoInflatedGenericClass): New type; the `klass' of a
21111 `MonoGenericClass' is now computed lazyly in
21112 mono_get_inflated_generic_class().
21114 * class.c (mono_get_inflated_generic_class): New public function.
21115 (mono_class_inflate_generic_method): Removed the unused
21116 `MonoClass *' argument.
21117 (setup_generic_vtable): Don't call mono_get_inflated_method() on
21119 (mono_class_create_generic): Make this static and merge it with
21120 mono_class_create_generic_2(); we're now called automatically from
21121 mono_get_inflated_generic_class().
21123 * loader.c (mono_method_signature): Call
21124 mono_get_inflated_method() here.
21126 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
21128 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
21129 type of fields with RVA.
21131 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
21132 for this pseudo class.
21133 (my_mono_class_from_generic_parameter): Likewise.
21134 (mono_class_init): Allow interfaces to have cctors.
21136 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
21138 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
21139 lazily for AOT methods.
21141 2005-07-05 Martin Baulig <martin@ximian.com>
21143 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
21144 returns FALSE for a successful match, not TRUE.
21146 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
21148 * loader.c (mono_method_get_index): Optimize this a bit.
21150 2005-07-04 Martin Baulig <martin@ximian.com>
21153 (class_compute_field_layout): Move the check for generic type
21154 definitions into mono_class_layout_fields(). Fixes #74684.
21155 (mono_class_from_generic_parameter): Correctly compute
21156 `klass->parent'; fixes #75457.
21158 * reflection.c (register_assembly, register_module): Make sure
21159 `domain->rejobject_hash' is already created.
21161 2005-07-02 Martin Baulig <martin@ximian.com>
21163 * class-internals.h
21164 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
21165 `MonoDynamicGenericClass'.
21167 2005-07-01 Lluis Sanchez <lluis@ximian.com>
21169 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
21170 returned by a field getter is null, since null is a valid value.
21172 2005-07-01 Martin Baulig <martin@ximian.com>
21174 * reflection.c (mono_reflection_generic_class_initialize): Update
21175 the `dgclass->fields [i].parent' to the correct class.
21176 (mono_image_get_fieldref_token): Use the declaring type, not the
21179 2005-07-01 Martin Baulig <martin@ximian.com>
21181 * loader.c (find_method): Also look in the interfaces; fixes #75429.
21183 2005-06-30 Ben Maurer <bmaurer@ximian.com>
21185 * threads.c (thread_cleanup): assert that thread != NULL
21186 (wait_for_tids_or_state_change): We were using the wrong variable
21187 when accessing wait->threads. `i' was always out of the bounds of
21190 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21192 * loader.c: map user32 and kernel32 to libMonoSupportW
21194 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
21196 * appdomain.c (unload_thread_main): Mark this as WINAPI.
21198 2005-06-28 Martin Baulig <martin@ximian.com>
21200 * loader.c (method_from_methodspec): Fix #75334.
21202 2005-06-28 Martin Baulig <martin@ximian.com>
21204 Fix #74953 - Arrays now implement the generic IList<T> interface
21205 on the 2.0 platform.
21207 * class-internals.h (MonoDefaults): Added `generic_array_class'.
21209 * reflection.c (mono_class_bind_generic_parameters): New public
21210 function; similar to mono_reflection_bind_generic_parameters(),
21211 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
21213 * domain.c (mono_init_internal): Try to initialize.
21214 `mono_defaults.generic_array_class' here; this'll only succeed if
21215 we're using the 2.0 corlib.
21218 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
21219 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
21220 (mono_lookup_internal_call): Added support for nested classes.
21223 (mono_get_method_from_token): Set `result->signature->pinvoke' if
21224 we're an interncall and have generic arguments.
21227 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
21228 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
21229 instance of System.Array.InternalArray<T> for arrays, so they
21230 implement the generic IList<T> interface.
21232 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
21234 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
21235 (chastamar@yahoo.com). Fixes #75374.
21237 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
21239 * culture-info-table.h: regenerated.
21241 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21243 * icall.c: handle spaces correctly for base64 strings.
21245 2005-06-26 Ben Maurer <bmaurer@ximian.com>
21247 * *.c: Kill some warnings.
21249 2005-06-23 Duncan Mak <duncan@novell.com>
21251 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
21252 that this builds on Solaris 10 (x86).
21254 2005-06-23 Martin Baulig <martin@ximian.com>
21257 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
21258 generic type definitions.
21260 2005-06-23 Martin Baulig <martin@ximian.com>
21264 * metadata.c (mono_class_get_overrides): Renamed to
21265 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
21266 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
21267 pass it to mono_get_method_full().
21269 2005-06-22 Ben Maurer <bmaurer@ximian.com>
21271 * reflection.c (mono_reflection_create_runtime_class): take the
21272 mono_domain_lock in this method. Prevents deadlocks
21274 2005-06-22 Martin Baulig <martin@ximian.com>
21276 * loader.c (method_from_methodspec): Fix #75330.
21278 2005-06-22 Martin Baulig <martin@ximian.com>
21280 * reflection.c (type_get_qualified_name): Use
21281 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
21282 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
21283 argument; use it if we don't have an assembly name.
21285 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
21287 * object.c: In mono_message_init, set "copy out" flag for in
21288 parameters with the [Out] flag.
21290 2005-06-21 Martin Baulig <martin@ximian.com>
21293 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
21296 2005-06-21 Martin Baulig <martin@ximian.com>
21298 * class.c (mono_class_init): Don't initialize `class->fields' for
21299 generic instances since they're initialized again in
21300 compute_field_layout().
21301 (compute_field_layout): Set the field's `generic_info' here; fix
21304 2005-06-21 Martin Baulig <martin@ximian.com>
21306 * class-internals.h
21307 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
21309 * metadata.c (mono_metadata_generic_method_equal): Also
21310 distinguish the `generic_class'; fixes #75334.
21312 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21316 * domain-internals.h:
21317 * reflection.c: 'domain_assemblies' field is now protected by its own
21318 lock. Don't call into managed code to run the AssemblyLoad event if we
21319 now there are no registered delegates for it.
21321 2005-06-20 Martin Baulig <martin@ximian.com>
21323 * class.c (mono_class_is_assignable_from): Use a custom version of
21324 mono_class_has_parent() to make things work for generic instances;
21327 2005-06-20 Martin Baulig <martin@ximian.com>
21329 * loader.c (method_from_methodspec): Apply a patch from
21330 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
21332 2005-06-20 Martin Baulig <martin@ximian.com>
21334 * class.c (mono_class_init): Reverted Zoltan's last change; it
21337 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
21339 * threads.c (wait_for_tids_or_state_change): Add missing locking.
21341 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21343 * socket-io.c: fix the index in the socket array for writable/error
21344 sockets. Fixes bug #75306.
21346 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
21348 * class.c (mono_class_init): Allow interfaces to have static ctors.
21350 2005-06-17 Martin Baulig <martin@ximian.com>
21352 * loader.c (method_from_methodspec): Use `context->container' when
21353 parsing the `gmethod->inst'.
21355 2005-06-17 Martin Baulig <martin@ximian.com>
21357 * class.c (mono_type_get_name_recurse): Don't add the assembly
21358 name for type arguments.
21360 2005-06-15 Martin Baulig <martin@ximian.com>
21362 * reflection.c (mono_image_get_inflated_method_token): Encode
21363 correct klass; fixes #75260.
21365 2005-06-13 Michal Moskal <malekith@nemerle.org>
21367 * icall.c: Make GetCorrespondingMethod/Constructor take
21368 MonoReflectionMethod method not MonoMethod. Removed
21369 MonoType.GetCorrespondingField, and make
21370 MonoGenericType.GetCorrespondingField take name not
21373 2005-06-13 Michal Moskal <malekith@nemerle.org>
21375 * reflection.c (field_encode_signature, encode_locals):
21376 Make sizes of buffers for types larger (for big generic types).
21377 (create_generic_typespec,
21378 mono_reflection_sighelper_get_signature_local,
21379 mono_reflection_sighelper_get_signature_field):
21380 Add asserts for too small buffers.
21382 2005-06-15 Martin Baulig <martin@ximian.com>
21384 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
21385 if our parent is not a dynamic type.
21387 2005-06-15 Martin Baulig <martin@ximian.com>
21389 * class-internals.h (MonoTypeNameFormat): New enum.
21392 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
21393 (mono_type_get_full_name): Removed.
21394 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
21395 argument instead of the boolean's.
21397 * icall.c (ves_icall_System_MonoType_getFullName):
21398 Added `gboolean assembly_qualified'.
21401 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
21403 * reflection.c (mono_reflection_parse_type): Parse the new type
21406 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21408 * icall.c: no need to convert from utf16 to utf8 and then back again
21409 after the call to GetLogicalDrives.
21411 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21413 * icall.c: frombase64. Fix problems exposed by new tests.
21415 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21417 * icall.c: added internal calls for converting char [] and strings in
21418 base64 into byte [].
21420 2005-06-10 Martin Baulig <martin@ximian.com>
21422 * class.c (mono_class_create_generic_2): Read the nested classes
21423 from the metadata rather than from `gklass->nested_classes' since
21424 `gklass' might not be initialized yet.
21426 2005-06-09 Duncan Mak <duncan@novell.com>
21428 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
21429 all public headers. Fixes #74919.
21431 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
21433 * domain.c: The key for proxy_vtable_hash is now a pointer
21434 array. Added new GHashFunc and GCompareFunc functions for this.
21436 * class.h: The list of interfaces in MonoRemoteClass is known in
21437 advance and can't grow (we create a new MonoRemoteClass if needed),
21438 so now the interface array can be allocated together with
21441 * object.c: Added a new method create_remote_class_key.
21442 Fixed mono_remote_class so it does not depend on
21443 mono_upgrade_remote_class.
21444 Removed extend_interface_array.
21445 Added new method clone_remote_class(), which makes a copy of a remote
21446 class and adds a new interface or class to it.
21447 mono_upgrade_remote_class() now creates a new remote class (or gets
21448 it from the cache) if an vtable upgrade is needed. In this way
21449 we make sure that other objects sharing the same remote class
21450 don't get the new vtable with unwanted interfaces.
21452 * object-internals.h:
21453 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
21455 * marshal.c: Track changes in mono_upgrade_remote_class().
21457 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
21458 * icall.c: Add runtime methods for obtaining members of inflated
21459 class, which were created from supplied non-inflated members. It
21460 is used in internal Get{Method,Constructor,Field} methods in
21463 2005-06-09 Martin Baulig <martin@ximian.com>
21466 (mono_reflection_bind_generic_method_parameters): Fix #75169.
21468 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
21469 * reflection.c (mono_image_basic_init): Define
21470 Version in MonoDynamicAssembly.
21472 2005-06-08 Martin Baulig <martin@ximian.com>
21477 (mono_method_signature_full): New public method; takes a
21478 `MonoGenericContext *'.
21479 (find_method): Use mono_method_signature_full() and pass the
21480 klass'es context to it.
21482 * class.c (mono_class_is_inflated_method): Use
21483 mono_method_signature_full() and pass the context to it.
21485 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
21487 * object.c: add proper locking in mono_remote_class_vtable(),
21488 fixes possible memory corruption.
21490 2005-06-08 Michael Meeks <michael.meeks@novell.com>
21492 * marshal.c (mono_remoting_marshal_init): set
21493 initialized after initialization.
21495 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
21497 * locales.c : hush.
21499 2005-06-06 Michael Meeks <michael.meeks@novell.com>
21501 * object.c (extend_interface_array): fix really silly
21502 memory corrupting / comparison bug.
21504 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
21506 * reflection.c: Functions added to support the creation
21507 of CustomAttributeData, which includes Attribute data
21508 used by ReflectionOnly methods.
21510 * reflection.h: mono_reflection_get_custom_attrs_data and
21511 mono_custom_attrs_data_construct added (functions exposed).
21513 * icall.c: Added mono_reflection_get_custom_attrs_data
21516 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
21518 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
21521 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
21523 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
21525 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
21526 dynamic DllImportAttribute.
21528 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
21529 dynamic DllImportAttribute.
21531 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
21534 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21536 * threads.c: avoid segfault when an unstarted thread is aborted.
21538 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
21540 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
21541 Returns the name and version of the runtime for reporting.
21543 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21545 * appdomain.c: bump corlib version.
21546 * object-internals.h: new field in MonoReflectionAssembly.
21548 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21550 * object-internals.h: Carlos forgot to add this field.
21552 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
21554 * icall.c: Added create_version to create instances
21555 of Version of MonoReflectionAssemblyName. This change helps
21556 the AssemblyName tests to keep running fine.
21558 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
21560 * object.c (mono_method_return_message_restore): A somehow less
21561 intrusive fix for #75138.
21563 2005-06-03 Raja R Harinath <rharinath@novell.com>
21565 * object.c (mono_method_return_message_restore): Fix computation
21566 of expected number of out args.
21568 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
21570 * reflection.c (mono_image_get_method_info): Fix the case when the
21573 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
21575 * object.c: Added missing null check in
21576 mono_method_return_message_restore.
21578 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
21580 * reflection.c (mono_image_get_method_info): Handle the case when
21583 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
21585 * object.c: When creating the vtable for a proxy, take into account
21586 all inherited interfaces, not only the ones registered in
21587 iclass->interfaces. This fixs bug #74996.
21588 Also, in mono_method_return_message_restore, verify that the array
21589 of out args has the expected lengh.
21591 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21593 * socket-io.c: update the timeout in Poll when the call is interrupte.
21595 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21597 * socket-io.c: support abort/suspend in Select_internal after last
21600 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21602 * threadpool.c: remove warning.
21604 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21607 * socket-io.[ch]: Select_internal uses poll() now when available, thus
21608 removing the 1024 limit from select(). Runtime part of the fix for
21611 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21613 * socket-io.c: when resolving the addresses for the same
21614 host returned by gethostname(), get the local IPs from the interface
21615 list. Loopback addresses are discarded if the are interfaces up with
21616 non-loopback ones. Fixes bug #63265.
21618 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
21620 * appdomain.c, verify.c, object-internals.h, reflection.c:
21621 bumped corlib number to 36, and added new extra_flags field
21622 to ReflectionMethodBuilder and friends. Fixes #75060.
21624 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
21626 * gc.c: register a new weak link only if the object is non-null
21629 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
21631 * culture-info.h : short time pattern too.
21633 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
21635 * culture-info.h : expand long time pattern string length.
21637 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
21639 * culture-info-table.h : update (more French date format; #72788).
21641 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
21643 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
21644 the method is static. Fixes #75029.
21646 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
21648 * reflection.c: Update the table_idx field of method builders after
21649 saving the module, since it can change. This is a workaround for
21652 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
21654 * culture-info-table.h : update (additional French date format).
21656 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
21658 * icall.c (ves_icall_type_Equals): Revert last change.
21660 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
21662 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
21664 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
21666 * class-internals.h: Added executioncontext_class field to
21667 MonoDefaults structure.
21668 * domain.c: Cache System.Threading.ExecutionContext class in
21670 * object.c: Capture the ExecutionContext for asynchroneous calls in
21671 mono_async_result_new.
21672 * object-internals.h: Added execution_context and original_context
21673 fields to MonoAsyncResult. Added execution_context to MonoThread.
21674 * security-manager.c|.h: Added mono_get_context_capture_method to
21675 return the capture method (if required by the security manager or by
21676 the framework version used).
21677 * threadpool.c: Apply capture (if present) ExecutionContext in
21678 mono_async_invoke and revert to original context after it completes.
21680 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
21682 * culture-info-table.h : updated (real hacky solution for zh-CHT).
21684 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
21686 * culture-info-table.h : zh-CHT related workaround.
21688 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
21690 * marshal.c (emit_marshal_custom): Add some error checking and call the
21691 methods in the ICustomMarshaler interface. Fixes #74875.
21693 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
21694 native->managed wrappers.
21696 2005-05-12 Martin Baulig <martin@ximian.com>
21698 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
21699 here and use the loader lock.
21701 * mono-debug.c: Properly lock when the debugger is not attached.
21702 (mono_debug_init): Release the initial lock if we're not running
21705 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
21707 * marshal.c (emit_marshal_custom): Pass through NULL values without
21708 calling the custom marshalling routines.
21710 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
21711 conversion in structures. Fixes #74882.
21713 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
21715 * culture-info-table.h : zh-* cultures were missing.
21717 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
21719 * threads.c: Added a new event background_change_event which is signaled
21720 when a thread changes its background mode.
21721 Moved here several checks previously done in managed code. The checks
21722 require the thread lock, and using the thread lock in managed code
21723 can result in deadlocks.
21724 Merged Start_internal and Thread_internal into a single method. Now
21725 Thread_internal does all work of creating and starting a thread.
21726 Added icalls for setting and getting the state of the object. Moved from
21727 managed code to avoid locking there.
21728 Added wait_for_tids_or_state_change() which is called instad of
21729 wait_for_tids when waiting for non-backround threads to end. This method
21730 will return if one of the threads ends or the background_change_event
21732 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
21733 the background mode. This method signals the background_change_event
21736 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
21737 removed Start_internal.
21739 2005-05-11 Martin Baulig <martin@ximian.com>
21741 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
21742 to order of some fields to get proper alignment on 64-bit machines.
21744 2005-05-11 Martin Baulig <martin@ximian.com>
21746 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
21747 changes as they're broken and completely fuck up the debugger.
21749 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
21751 2005-05-10 Martin Baulig <martin@ximian.com>
21753 * reflection.c (mono_reflection_generic_class_initialize): Don't
21754 call mono_class_setup_parent() here.
21756 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21758 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
21759 send/receive timeout use an integer in milliseconds. We were using a
21762 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21765 (internal_get_cultures): reserve the first slot of the array for the
21766 InvariantCulture, which will be filled in managed code.
21768 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
21770 * reflection.c (mono_image_fill_module_table): Initialize the
21771 GENERATION field as well.
21773 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21775 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
21776 Monitor.Enter on the object.
21778 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
21780 * threads.c: Enable the wait for running threads when exiting.
21781 * icall.c: Suspend all threads before exiting.
21783 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
21785 * assembly.c (mono_assembly_load_reference): Fix warning.
21787 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21789 * threadpool.c: changed the default number of threads per cpu. From now
21790 on, the default will be 20 + (5 * number of cpus) instead of 50.
21792 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
21794 * loader.c (mono_method_get_signature_full): Add locking here.
21796 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
21798 * appdomain.c: Moved methods for parsing and freeing assembly
21799 names to assembly.c.
21800 * assembly.c, domain-internals.h: Created public methods for parsing
21801 assembly names. Fixed mono_assembly_load_with_partial_name:
21802 it now finds the best match, taking into account the version,
21803 token and culture specified in the partial name. Also return
21804 the latest version if no version information is specified.
21806 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
21808 * threadpool.c: replace check for SocketAsyncCall class.
21810 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21812 * threadpool-internals.h:
21813 * Makefile.am: added threadpool-internals.h
21815 * threadpool.c: call mono_unhandled_exception on exceptions not handled
21816 that happen in threadpool threads (tested on MS).
21817 (mono_thread_pool_remove_socket): new function that dispatch any pending
21818 AIO call on a socket that is closing. By now only epoll really needs it,
21819 as select/poll wake up when the socket closes.
21822 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
21824 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
21826 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
21828 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
21830 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
21832 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
21834 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
21835 has an abort request, convert it into a suspend request.
21837 2005-04-30 Ben Maurer <bmaurer@ximian.com>
21839 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
21840 warning for the usage of `UnmanagedFunctionPointerAttribute' which
21841 is not supported yet.
21843 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21845 * image.c: register assemblies loaded from data (bundles) in the loaded
21846 assemblies hash. Fixes bug #74772.
21848 2005-04-29 Martin Baulig <martin@ximian.com>
21850 * class.c (mono_type_get_name_recurse): Update to the new naming
21851 schema from the latest .NET 2.x beta2.
21852 (mono_class_setup_vtable_general): If we're a generic instance,
21853 copy the vtable from our generic type definition and inflate all
21856 * loader.c (find_method): Update to the new naming schema from the
21857 latest .NET 2.x beta2.
21859 2005-04-29 Raja R Harinath <harinath@gmail.com>
21861 * class.c (mono_class_init): Add a mono_loader_unlock to the
21864 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
21866 * icall.c (ves_icall_System_Environment_Exit): Remove the
21867 suspend_all_other_threads () call for the time being, since it can hang.
21869 * threads.c (mono_thread_manage): Similarly, disable the waiting for
21870 the background threads to exit, since it can also hang.
21872 * class.c (mono_class_init): Applied patch from Ankit Jain
21873 (radical@gmail.com). Avoid pending init errors when a field refers
21874 to a nested class using a typeref. Fixes #74734.
21876 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
21877 this for dynamic modules.
21879 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21881 * threads.c: don't wait for threads that are in the process of aborting
21882 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
21883 and waiting for background threads to finish. This makes xsp and
21884 mod-mono-server exit without random length delays and/or hangs.
21886 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21888 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
21890 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
21892 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
21893 dynamic types to prevent infinite loops. Fixes #74727.
21895 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
21896 ..._is_assignable_to.
21898 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
21900 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
21902 2005-04-25 Martin Baulig <martin@ximian.com>
21904 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
21907 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
21909 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
21911 * reflection.c (build_compressed_metadata): Set metadata header
21914 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
21916 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
21917 number into an integral and a decimal part. Fixes #70473.
21919 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
21921 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
21923 * culture-info-table.h : reflected the latest locale-builder output.
21925 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21927 * threadpool.c: check for SuspendRequested too when deciding if
21928 mono_thread_interruption_checkpoint should be called.
21930 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21932 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
21933 * threads.c: remove interruption_mutex and use Interlocked instead. When
21934 suspending all the threads, wait for all the suspended events at once.
21935 If we're shutting down and get an APC that is going to be queued,
21936 call mono_thread_execute_interruption immediately, as the thread might
21937 be sleeping on a pthread condition or mutex.
21939 * icall.c: call mono_runtime_set_shutting_down before suspending the
21942 Fixes bug #74693. And now xsp is happier when exiting.
21944 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
21946 * loader.c (mono_stack_walk): Fix #74690.
21948 2005-04-22 Martin Baulig <martin@ximian.com>
21950 * mono-debug.h (MonoDebugMethodJitInfo): Added
21951 `MonoDebugMethodJitInfo *jit'.
21953 * mono-debug.c (mono_debug_read_method): Cache the
21954 MonoDebugMethodJitInfo in `address->jit'.
21955 (mono_debug_free_method_jit_info): New public method.
21957 2005-04-22 Martin Baulig <martin@ximian.com>
21959 * class.c (mono_class_is_assignable_from): Disallow
21960 type parameter -> interface.
21962 2005-04-21 Dick Porter <dick@ximian.com>
21964 * threads.c (mono_thread_create): Turn an assertion into an error.
21966 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
21968 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
21970 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
21971 Fix some gcc 4.0 warnings.
21973 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
21975 * file-io.c: fix alt dir separator char on unix systems
21976 and cleanup (fixes bug #71214).
21978 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
21980 * marshal.c: Use CALLVIRT instead of CALL when dispatching
21981 a call to a remote domain, since the method may be an
21982 interface method in the client domain. This fixes bug #74192.
21984 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21986 * threadpool.c: recv/send are now performed before going back to managed
21987 code to save one transition.
21989 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21991 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
21993 * metadata/threadpool.c: removed hack to workaround the bug above.
21997 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
21999 * reflection.c reflection.h: Fix handling of parameter defaults in
22000 dynamic methods. Also fixes handling of parameter attributes.
22003 * mono-debug.c (mono_debug_close_image): Fix warning.
22005 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22007 * socket-io.h: replaced old unused field with new 'blocking'.
22008 * threadpool.c: restore socket blocking state on windows(tm).
22010 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
22012 * icall.c: don't return the codebase in the AssemblyName[] returned by
22013 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
22014 * object-internals.h: Removed FIXME (fields were presents) and fixed
22015 versioncompat declaration.
22017 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22019 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
22020 not closed, so don't cleanup when it happens.
22022 2005-04-13 Chris Toshok <toshok@ximian.com>
22024 * mono-debug-debugger.h: change prototype for
22025 mono_debugger_lookup_type.
22027 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
22028 this function, although it should probably be named
22029 mono_debugger_init_type.
22031 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22033 * threadpool.c: fix non-AIO case.
22035 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
22037 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
22038 the built-in profiler to measure just JIT compilation times.
22040 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22042 * threadpool.c: the epollfd might be closed by another thread at
22043 any time, so ignore EBADF at treat it as a "we're closing" sign.
22045 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22047 * threadpool.c: release the semaphores with a count equals to the number
22048 of working threads in both IO and regular pools. Fixed typo that messed
22049 up the count of IO pool threads. Don't initialize the pipe handles if
22052 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22054 * threadpool.c: some systems don't like a NULL when deleting the socket
22057 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22059 * threadpool.c: fix semaphore allocation.
22061 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22063 * threadpool.c: added epoll() based implementation for asynchronous IO
22064 that is used instead of the default poll() when available.
22065 It can be disabled by setting MONO_DISABLE_AIO.
22067 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22069 * threadpool.c: windows needs 'closesocket' and instead of returning
22070 0 when the stream is closed while in select, it returns -1. Fixes bug
22073 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
22075 * class.c (class_compute_field_layout): Fix the regression caused by
22078 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22080 * threadpool.c: separate pool for socket async. IO.
22081 * threadpool.h: mono_max_worker_threads is not a global any more.
22083 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
22085 * class.c (class_compute_field_layout): Fix #74549.
22087 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22089 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
22090 use 2 connected sockets instead.
22092 2005-04-08 Miguel de Icaza <miguel@novell.com>
22094 * mono-config.c: Add new entry point for mkbundle
22095 mono_config_parse_memory.
22097 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22099 * threadpool.c: removed another unused function.
22101 2005-04-08 Ankit Jain <radical@corewars.org>
22103 * reflection.c (get_default_param_value_blobs): Add 'types'
22104 parameter to get the types encoded in the constant table.
22105 (mono_param_get_objects): Use the type from the constant table,
22106 not the type of the parameter, when creating default values.
22107 Handle null default values correctly.
22109 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22116 * socket-io.c: removed dead code for async IO.
22118 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22120 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
22122 * threadpool.c: intercept socket async. calls and pass them to a thread
22123 that is polling and dispatching the job items to the threadpool as
22124 socket become ready. Fixes bugs #71217, #71933.
22126 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
22127 between char and short/ushort arrays.
22129 * socket-io.c: remove dead code.
22131 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
22134 icall.c : removed InternalToUpper_Comp() and
22135 InternalToLower_Comp().
22137 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
22139 * char-conversions.h : The tables were incorrectly generated. Should
22140 be generated against invariant culture.
22142 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
22144 * object.c (mono_runtime_invoke_array): Fix return value when
22145 passing pre-created valuetype objects to ctors.
22147 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
22148 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
22151 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
22153 * domain.c: removed g_assert for runtimesecurityframe_class. This is
22154 only used with --security and hides the wrong corlib version error.
22156 2005-03-30 Joshua Tauberer <tauberer@for.net>
22158 * class.c: Changed mono_class_name_from_token so that types
22159 outside of a namespace don't have an initial period. Improved
22160 the g_warning message used in _mono_class_get when loading
22162 * assembly.c: In mono_assembly_load_reference, when an assembly
22163 can't be found, "No such file or directory" is misleading and
22164 unhelpful because a few paths were checked for the presence of
22165 the assembly. When that happens (ENOENT), display a nicer
22166 message indicating the directories that were searched. In all
22167 cases, the warning is made easier to read for non-hackers.
22169 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
22171 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
22173 * appdomain.h|domain.c: Removed inline from functions.
22174 * appdomain.c: Reduced warnings when compiling on windows.
22175 * icall.c: Fixed output_debug declaration to gunichar2*.
22176 * mono-config.c: Reduced warnings when compiling on windows.
22177 * rand.c: Added missing "windows.h". Added missing return value.
22178 * rawbuffer.c: Added missing winsock2.h for windows.
22179 * sysmath.h: Added mono-compiler.h header to allow/ease
22180 compilation with non-GCC compilers.
22181 * threads.c: Fixed declarations to compile with VS.NET C compiler.
22182 Removed cast warnings.
22184 Adapted from the work of J Lothian (for VC6).
22186 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
22188 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
22191 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
22193 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
22196 2005-03-27 Raja R Harinath <harinath@gmail.com>
22198 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
22199 has to be in $(exec_prefix). $(prefix) is for arch-independent
22200 stuff, and it would probably use $(prefix)/share rather than
22203 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22205 * console-io.c: added 2 includes that might be missing.
22207 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
22209 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
22212 * reflection.c (create_custom_attr): Allocate the params array using
22213 alloca so it gets GC tracking.
22215 2005-03-23 Chris Toshok <toshok@ximian.com>
22217 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
22220 2005-03-24 Raja R Harinath <rharinath@novell.com>
22222 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
22223 changes to pick up any changes in prefix, etc.
22225 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
22227 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
22229 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
22230 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
22232 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
22234 * class-internals.h object-internals.h class.c reflection.c: Extend the
22235 mono_lookup_dynamic_token () function to return the class of the
22238 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
22239 well. Fixes #73848.
22241 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
22243 * security-manager.c: Skip inheritance checks for intra-corlib
22244 class inheritance and method overrides. This skips a lot of checks
22245 and (anyway) permissions cannot work until corlib is loaded.
22247 2005-03-23 Martin Baulig <martin@ximian.com>
22249 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
22250 MONO_TYPE_GENERICINST.
22252 2005-03-23 Martin Baulig <martin@ximian.com>
22254 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
22256 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
22258 * class.c: added locking comments to some functions.
22259 Cache the interface offsets arrays (saves about 20 KB
22260 of runtime memory in a typical app).
22261 Reduce the time overhead in mono_class_setup_supertypes ().
22263 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
22265 * icall.c: speedup and fix leaks in GetMethodsByName and
22266 GetPropertiesByName.
22268 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
22270 * reflection.c: some locking fixes.
22272 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
22274 * metadata.c: added missing break in case statement.
22276 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
22278 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
22279 typedbyref return values. Fixes #73941.
22281 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
22283 * security-manager.c|h: Added demandunmanaged method and
22284 suppressunmanagedcodesecurity class to MonoSecurityManager.
22285 Renamed aptc class to allowpartiallytrustedcallers.
22287 2005-03-17 Martin Baulig <martin@ximian.com>
22289 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
22291 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22293 * file-io.c: disabled file async. IO using aio_*. It uses the
22294 threadpool now. Workaround for bug #73718.
22296 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
22298 * assembly.h, mono-config.c: added code to deal with bundled configs
22299 for bundled assemblies.
22301 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
22303 * *.c, private.h: cleanup, removing old private.h header file.
22305 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
22307 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
22308 and throw_on_unmappable_char attributes.
22310 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
22312 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
22313 _ProcessName_internal.
22315 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
22317 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
22320 * icall.c threads.c threads-types.h: Remove slothash icalls as they
22321 are no longer used.
22323 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
22325 * object.c (compute_class_bitmap): Add support for generics. Fixes
22328 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
22330 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
22332 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22334 * filewatcher.c: commented out the code for windows watcher, as we don't
22335 use it (we use the managed implementation instead).
22337 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
22339 * object-internals.h (MonoThread): Remove 'unused1' field.
22341 * appdomain.c: Bump corlib version.
22343 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
22345 * reflection.c (mono_reflection_create_runtime_class): Remove the
22346 AssemblyBuilder.Save optimization since it causes too many problems.
22348 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
22350 * exception.c|h: Added mono_get_exception_reflection_type_load to
22351 create a ReflectionTypeLoadException object.
22352 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
22353 to return NULL is a InheritanceDemand fails during reflection. Updated
22354 ves_icall_System_Reflection_Assembly_GetTypes to throw a
22355 ReflectionTypeLoadException if an InheritanceDemand fails during
22356 reflection. Added icall mapping for GetLinkDemandSecurity.
22357 * security-manager.c|h: Added ves_icall_System_Security_
22358 SecurityManager_GetLinkDemandSecurity internal call to return the
22359 class and methods permissions set for a LinkDemand. Removed unused
22360 fields in MonoSecurityManager.
22362 2005-03-10 Martin Baulig <martin@ximian.com>
22364 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
22365 it's a generic instance.
22367 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
22369 * reflection.c (mono_get_object_from_blob): Applied patch from
22370 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
22372 * class.c (mono_class_is_assignable_from): Another try at fixing
22373 #73469 without breaking anything.
22375 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
22377 * class.c: (mono_class_is_assignable_from): Revert the last changes
22378 since they don't work with generics.
22380 * class.c (mono_class_is_assignable_from): Fix build bustage.
22382 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
22383 the managed IsAssignableFrom method. Fixes #73469.
22385 * reflection.c (mono_reflection_call_is_assignable_from): New helper
22388 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
22390 * object.c (mono_load_remote_field_new): Fix returning uninitialized
22391 memory when the remoting callback does not sets the out arguments.
22394 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
22397 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
22399 * object-internals.h (MonoStackFrame): Sync with managed object layout.
22401 * appdomain.c: Bump corlib version.
22403 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
22405 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
22408 * threads.c (mono_thread_attach): Detect threads which are not started
22409 by the GC pthread wrappers.
22411 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
22413 * icall.c: Added new icall for RNG.
22414 * rand.c|h: Added new icall to open the RNG. This allows to share a
22415 single handle on Linux to access /dev/urandom and fix #73183.
22417 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
22419 * object.c: setting the new vtable in a transparent proxy object must
22420 not change the GC descriptor.
22422 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
22424 * object.c: fixed compilation without GCJ support.
22425 * reflection.c: for runtime-created types ensure klass->has_references
22426 is correct (bug #73215).
22428 2005-03-02 Martin Baulig <martin@ximian.com>
22430 * class.c (mono_class_is_assignable_from): Make this work if
22431 `oklass' is a generic instance; fixes #72831.
22433 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
22435 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
22438 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
22440 * marshal.c: Reorganize native->managed marshalling code to also use
22441 the emit_marshal_... functions.
22443 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
22445 * object.c: typed allocs have issues with bitmap sizes > 30,
22446 so check for max_set >= 30.
22448 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
22450 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
22451 managed code. Fixes #73012.
22453 * metadata.h (MonoMarshalSpec): Add elem_mult field.
22455 * metadata.c reflection.c: Load/Emit elem_mult as well.
22457 * metadata.h (MonoMarshalSpec): Add comment.
22459 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
22461 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
22462 num_elem to -1 if not given.
22464 * object-internals.h (MonoReflectionMarshal): Add has_size field.
22466 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
22469 2005-03-01 Marek Safar <marek.safar@seznam.cz>
22471 * null-gc.c (mono_gc_free_fixed): Was not compilable.
22473 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
22475 * reflection.c (encode_marshal_blob): Encode param_num field as well.
22477 * object-internals.h (MonoReflectionMarshal): Add param_num field.
22479 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
22481 * object.c: generalized the reference bitmap creation
22482 and added hooks for the new GC.
22483 * class-internals.c: removed the gc_bitmap field from MonoClass.
22485 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
22487 * domain.c: help the compiler to produce better code
22488 in mono_jit_info_table_find ().
22490 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
22492 * object.c: make all allocations look typed.
22494 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
22496 * socket-io.c: load Mono.Posix if it's not loaded already
22499 2005-02-24 Martin Baulig <martin@ximian.com>
22501 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
22502 * reflection.c (dup_type): Likewise.
22504 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
22506 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
22507 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
22509 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
22511 * domain.c, threads.c, object-internals.h: make the critical thread
22512 local vars use the fast access mode (even when we're compiled in
22513 a lib). Provide accessors to be used by the jit during codegen.
22515 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
22517 * appdomain.c: Changed hook functios behavior to include
22518 support for the reflection only assemblies. Some icalls were changed
22519 to support the mentioned assemblies too. Signatures of static methods
22520 try_assembly_resolve and real_load now have an additional parameter:
22523 * assembly.c: General changes to mono_assembly_ methods to support
22524 reflection only api. Functions mono_assembly_open, mono_assembly_load,
22525 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
22526 suffix, to support an additional gbool parameter to specify whether
22527 the assembli is reflection only or not. Created some new hook functions
22528 to add support for reflection only assemblies. Signatures of static
22529 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
22530 have now an additional parameter: refonly.
22532 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
22533 indicating whether the assembly is reflection only or not.
22535 * exception.c: Add mono_get_exception_invalid_operation.
22537 * icall.c: Throw an InvalidOperationException when trying to invoke
22538 a property/method/event, or trying to set/get the value of a field.
22539 Also add an icall to retrieve the ref_only flag to the
22540 MonoReflectionAssembly.
22542 2005-02-23 Chris Toshok <toshok@ximian.com>
22544 Part of fix for #72827.
22545 * mono-debug.c (mono_debug_add_method): add lexical block data to
22546 the info we write. Kind of a hack at the moment - we copy the
22547 lexical block info from the MonoDebugMethodInfo to the
22548 MonoDebugMethodJitInfo here, before writing it.
22549 (mono_debug_read_method): read the lexical block info.
22551 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
22553 * debug-mono-symfile.h: add lexical block support.
22555 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
22558 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
22560 * loader.c (mono_lookup_pinvoke_call): Fix warning.
22562 * object.c (mono_runtime_free_method): Call mono_free_method () and
22563 put the TODOs there.
22565 * loader.c (mono_free_method): Free up most memory allocated for
22568 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
22570 * reflection.c: properly flag a Type argument to a
22571 named custom attr value (bug #72248).
22573 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
22575 * reflection.c: reduce code duplication in named custom
22576 attribute encoding.
22578 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
22580 * reflection.c: properly encode custom attrs of type object
22583 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
22585 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
22587 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
22589 * socket-io.c: load System.dll if it's not loaded already
22590 (bug #72850 and #70477).
22592 2005-02-21 Martin Baulig <martin@ximian.com>
22594 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
22597 2005-02-21 Martin Baulig <martin@ximian.com>
22599 * reflection.c (mono_image_build_metadata): We also need to
22600 "fixup" the MethodImpl table after we computed the final method
22601 indices. Call fixup_methodimpl() to do that.
22602 (fixup_methodimpl): New private method.
22604 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
22606 * assembly.c: special case mscorlib.dll (bug#72536),
22607 patch from Carlos Alberto Cortez.
22609 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
22611 * threads-types.h threads.c: Fix build bustage.
22613 * threads.c: Use a union for long<->double conversions.
22615 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
22616 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
22618 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
22619 containing the checkpoint call with NOT_TAKEN.
22621 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
22622 checkpoint before pushing the arguments, so they won't have to be
22625 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
22627 * domain.c, assembly.c, domain-internals.h: make some data
22628 const and relocation-free.
22630 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
22632 * object.c, appdomain.c, class-internals.h: introduce the
22633 MonoClassRuntimeInfo structure to hold the info needed to
22634 use a class at runtime. Made mono_class_vtable() lock-free
22635 for all the appdomains.
22637 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
22639 * metadata-internals.h, image.c: introduce a per-image mempool to
22640 be used for memory that has the same lifetime as the image.
22642 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
22644 * domain.c: In mono_init_internal(), instead of selecting the first
22645 runtime version supported by an executable, get a list of all
22646 supported versions and select the one for which an mscorlib exists
22647 (since even if the runtime supports a given version, it doesn't mean
22648 that the framework for that version is installed).
22649 Modified get_runtimes_from_exe to support this behavior.
22650 In supported_runtimes, added information about additional system
22653 * assembly.c: Added support for more than one system assembly version
22654 per runtime version. Updated the assembly list.
22655 In mono_assembly_remap_version, removed the initial version check,
22656 since we don't know to which version we need to compare until we
22657 get the version set on which the assembly is based.
22658 Moved the code for loading corlib into the new method
22659 mono_assembly_load_corlib(), so it can be used by the initialization
22662 * domain-internals.h: Updated data structures and added declaration
22663 for mono_assembly_load_corlib.
22665 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
22667 * reflection.c (resolve_object): Fix the creation of the signature in
22668 the SignatureHelper case.
22670 * assembly.c (mono_assembly_remap_version): Fix binary search.
22672 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
22674 * class.c: Added inheritance check when a method is overloaded (from a
22675 virtual method or when implementing an interface) and when a class is
22676 inherited. Added functions to set a failure for a class and to
22677 retreive the exception from a failure.
22678 * class-internals.h: Added fields to MonoClass to keep the exception
22679 information status for inheritance (or other exceptions) to be thrown
22680 later (i.e. not at load time).
22681 * object.c: Throw the inheritance SecurityException when a type is to
22682 be created with either class or method inheritance violations.
22683 * reflection.c|h: Fix when getting declsec from a class. Removed
22684 unrequired code for class. Improved sanity in parameter naming.
22685 * security-manager.c|h: Added functions to check for class and method
22688 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
22690 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
22691 and has_finalize in dynamic types as well.
22693 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
22695 * culture-info-table.h : fixed currency format for en-GB (and so on).
22697 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
22699 * gc.c: ensure the GC handles never have 0 as a value.
22701 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
22703 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
22704 a pointer to a struct to unmanaged code. Fixes #72625.
22706 2005-02-16 Martin Baulig <martin@ximian.com>
22708 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
22710 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
22712 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
22714 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
22716 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
22718 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
22719 UnmanagedFunctionPointerAttribute, use it for determining calling convention
22722 * reflection.c (mono_custom_attrs_get_attr): New helper function.
22724 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
22726 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
22728 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
22729 changes to make the current context a field in MonoThread.
22731 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
22733 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
22736 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
22737 extracted from mono_marshal_get_native_wrapper.
22739 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
22740 to create wrappers around native functions.
22742 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
22743 delegates for arbitrary function pointers. Fixes #71472.
22745 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
22747 * threads.c: cleaned up the code a little.
22749 2005-02-15 Martin Baulig <martin@ximian.com>
22751 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
22754 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
22755 allocate larger chunks if needed.
22757 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
22759 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
22762 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
22764 * domain.c: keep the domains in an array and ensure the domain ids
22765 are kept small, so they can be used as indexes to domain-specific data
22766 with a small memory overhead.
22768 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
22770 * icall.c: Handle byref types in Type icalls. Fixes #72544.
22772 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
22774 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
22776 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
22778 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
22780 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
22783 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
22785 2005-02-12 Ben Maurer <bmaurer@ximian.com>
22787 * domain-internals.h: add the hashtable here.
22789 * class-internals.h: Remove `info' from MonoMethod
22791 * domain.c: Add a new hashtable, jit_trampoline_hash
22793 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
22795 * object.c: don't set the value of static fields
22798 2005-02-11 Martin Baulig <martin@ximian.com>
22800 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
22801 (mono_debug_add_method): Silently ignore the method if it's too big.
22802 (mono_debug_add_type): Likewise.
22804 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
22806 * threads.c, appdomain.c: remove #ifdefs from the code.
22808 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
22810 * metadata-internals.h: Added flags to MonoAssembly to cache the most
22811 common security informations. This allows us to stay in unmanaged code
22812 when doing LinkDemand and it's special cases (except for the first
22813 time for initialization). The flags a very much used with --security.
22814 * reflection.c|h: Added code to get declarative security attributes
22815 for LinkDemand and InheritanceDemand. This required to refactor the
22816 existing code for Demand.
22817 * security-manager.c|h: Added new method fields for the special cases
22820 2005-02-10 Martin Baulig <martin@ximian.com>
22822 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
22823 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
22825 2005-02-10 Martin Baulig <martin@ximian.com>
22827 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
22828 debugging code; this is almost a complete rewrite.
22830 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
22832 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
22834 * domain.c, object.h: expose mono_string_equal () and
22835 mono_string_hash ().
22836 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
22837 it's implemented in managed code.
22839 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
22841 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
22842 lo leak objects between appdomains.
22844 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
22846 * assembly.c: old compilers compilation fix from
22847 robertj@gmx.net (Robert Jordan).
22849 2005-02-09 Ben Maurer <bmaurer@ximian.com>
22851 * class-internals.h: Little reminder for the future.
22853 * debug-helpers.c: Fix up wrapper_type_names
22855 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
22857 * image.c, metadata-internals.h: when loading an image from a file,
22858 mmap all of it and use the same codepaths as when using a
22859 in-memory image: the code is simpler and we use less memory
22860 (both writable and readonly).
22862 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
22864 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
22865 API to alloc runtime data structures that need to be tracked by the
22866 GC and contain pointers.
22867 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
22868 make the code more readable and eventually use a different GC.
22870 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
22872 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
22875 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
22877 * object.c: In release_type_locks(), don't release the cctor lock
22878 if it has already been released. This fixes a crash in the
22881 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
22883 * gc.c, marshal.c, icall.c: register a delegate for finalization
22884 only when the native function pointer has been allocated for it.
22886 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
22888 * object.c: cleaned up some code, allocate objects that are
22889 pointer free with the atomic malloc variant. Allocate memory
22890 for static data from the mempool if it's pointer-free.
22891 Allocate the bounds array at the end of the array data, when needed.
22892 * object-internals.h, object.h: move a private function in a private
22894 * class.c: handle missing case in tracking references in fields.
22896 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
22898 * class.c, class-internals.h: keep track if a type has
22899 reference fields in either the instance or static fields.
22901 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
22903 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
22904 and renamed to MonoRuntimeInfo. Added fields to store the expected
22905 framework assembly version. Changed mono_get_framework_version and
22906 mono_get_runtime_version for a single mono_get_runtime_info method.
22908 * assembly.c: Added method to remap system assembly versions to the
22909 current executing runtime version. Removed old mapping code.
22910 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
22912 * icall.c, reflection.c: Track api changes.
22914 2005-02-06 Miguel de Icaza <miguel@novell.com>
22916 * loader.c (method_from_memberref): Improve error reporting,
22917 produce the class name instead of the typeref/typedef index.
22919 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
22921 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
22923 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
22925 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
22926 stdcall and charset name mangling. Reorganize the code and add
22927 some tracing stuff.
22929 2005-02-05 Ben Maurer <bmaurer@ximian.com>
22931 * monodiet.c: More iters!
22933 * marshal.c: Iter usage.
22935 * icall.c: Iter usage.
22937 * object.c: Use iters.
22939 * debug-helpers.c: More iters
22941 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
22943 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
22946 2005-02-05 Ben Maurer <bmaurer@ximian.com>
22948 * mono-debug-debugger.c: use iters
22950 * class.c, class-internals.h: mono_class_setup_events is static
22953 * All callers: use iters
22955 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
22957 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
22958 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
22960 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
22962 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
22964 * marshal.h: Add prototypes for ldfld/stfld_remote.
22966 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
22967 this is called during startup.
22969 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
22971 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
22972 MonoThreadsSync struct private in monitor.c. Changed the way
22973 MonoThreadsSync is allocated so it's faster and there is no
22974 need to keep track of it with a finalizer and it uses less memory.
22975 This also finally allows us to allocate mono objects as ptrfree when
22976 there are no reference fields.
22978 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
22980 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
22981 disappearing link to the GC interface and use them to simplify
22982 the gchandles code.
22984 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
22986 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
22987 stfld_remote which call mono_load/store_field_new. This allows methods
22988 calling ldfld/stfld wrappers to be AOTed.
22990 * console-io.c: Include sys/filio.h under solaris.
22992 * console-io.c: Include curses.h if needed correctly.
22994 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
22996 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
22997 method->klass as well.
22999 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
23001 * class.c (mono_class_init): Switch on lazy initialization of
23004 * class.c (mono_class_get_finalizer): Handle the case when the
23005 finalizer is inherited.
23007 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23009 * console-io.c: <curses.h> is needed by term.h on solaris.
23011 2005-02-03 Ben Maurer <bmaurer@ximian.com>
23013 * icall.c, class-internals.h, monodiet.c, class.c: Remove
23014 mono_class_setup_properties where possible. Remove this ftn from
23015 the header file, and make it static.
23017 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
23019 * loader.c: Add missing setup_... call.
23021 * class.c: Add missing setup_... calls.
23023 * class.c (mono_class_init): Switch on lazy initialization of
23024 the generic vtable.
23026 * class.c (mono_class_init): Fix generics broken by the recent changes.
23028 * monodiet.c (handle_type): Add missing setup_... calls.
23030 * class.c: Back out garbage in previous patch.
23032 * class.c: Add missing setup_... calls.
23034 * class.c (mono_class_get_method_from_name_flags): Avoid calling
23035 mono_class_setup_methods () if possible.
23037 * class-internals.h (MonoClass): Add 'has_cctor' flag.
23039 * class-internals.h (MonoCachedClassInfo): New structure.
23041 * class.c: Initialize properties and events fields of MonoClass lazily.
23043 * class.c: Add infrastructure for lazily initializing the methods and
23044 vtable fields of MonoClass. Not yet used.
23046 * class.c (mono_class_get_finalizer): New helper function.
23048 * class.c: Add infrastructure for loading some class related data from
23051 * object.c: Add infrastructure for initializing the vtable from data
23054 * gc.c (run_finalize): Use mono_class_get_finalizer ().
23056 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
23057 appropriate initialization function before accessing parts of the
23058 MonoClass structure.
23060 * marshal.c: Fix warnings.
23062 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
23064 * mono-debug-debugger.c (get_exception_message): Use
23065 mono_class_get_method_from_name_flags ().
23067 2005-02-02 Ben Maurer <bmaurer@ximian.com>
23069 * reflection.c, appdomain.c: Replace a few manual searches that
23070 Zoltan missed. (Paolo approved this part of my initial patch).
23072 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
23074 * profiler.c: disable recording statistical events at report time.
23076 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
23078 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
23079 to byteswap arrays of enum values, too (bug #72080).
23081 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
23083 * appdomain.c (set_domain_search_path): Allow this to be called if
23084 domain->setup is not yet set.
23086 * loader.c (mono_method_get_index): New helper function.
23088 * loader.c reflection.c: Use mono_method_get_index ().
23090 * class.c (mono_class_get_method_from_name_flags): New helper method.
23092 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
23095 * class.c (mono_class_get_cctor): New helper method.
23097 * string-icalls.c object.c class.c marshal.c reflection.c: Use
23098 mono_class_get_method () to look up methods.
23100 2005-02-01 Miguel de Icaza <miguel@novell.com>
23102 * console-io.c: Fix the build, this should work on Windows.
23104 2005-01-31 Ben Maurer <bmaurer@ximian.com>
23106 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
23107 be set to null to keep things valid
23109 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23111 * icall.c: added Console 2.0 icalls.
23112 * Makefile.am: added console-io.[ch]
23113 * console-io.[ch]: internal calls for Console 2.0 API.
23115 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
23117 * class.c: make sure we consider all the interfaces
23118 when calculating max_interface_id (bug found by
23119 Jeroen Frijters running ikvm).
23121 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
23123 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
23124 valuetype fields to null.
23126 * object.c (set_value): Ditto. Fixes #71669.
23128 2005-01-31 Martin Baulig <martin@ximian.com>
23130 * metadata.c (mono_metadata_has_generic_params): New public
23131 function; checks whether something is a generic method.
23133 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
23135 * appdomain.c: fix infinite recursion when adding assemblies.
23137 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
23139 * object.c: Fix small typo to return all items for Environment.
23140 GetCommandLineArgs.
23142 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
23144 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
23145 reflection.c: more domain and assembly-unload related fixes
23146 and memory leaks plugs.
23148 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
23150 * 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.
23152 2005-01-29 Ben Maurer <bmaurer@ximian.com>
23154 * loader.c (mono_method_signature): Make this method lazy
23155 (mono_get_method_from_token): Don't computate the signature here.
23157 Doing this saves quite a bit of memory. I got 90 kb on starting up
23158 monodoc. It should also save some disk reads on startup.
23160 * *: MonoMethod->signature might be NULL now. You *MUST* use
23161 mono_method_signature.
23163 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
23165 * object.c (mono_runtime_get_main_args): Return an array from the
23166 current domain here. Fixes #71938.
23168 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
23170 * monitor.c: formatting changes to comply with the
23171 mono coding style and remove #ifdefs from the code.
23173 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
23175 * metadata.c, private.h: remove some unneeded data
23176 and use a more compact representation for table schemas.
23178 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
23180 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
23181 to get a better distribution in hash tables.
23182 * *.c: use mono_aligned_addr_hash() where appropriate.
23183 * assembly.c: make var static.
23185 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
23187 * domain-internals.h: Put MonoJitInfo on a diet.
23189 * domain.c: Fix a warning.
23191 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
23193 * gc.c: rework the gc handles code to reuse handles
23196 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
23198 * domain.c: fixed long standing bug in mono_string_equal() which
23199 was brought to light with the ldstr changes.
23201 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
23203 * reflection.c: Remove warning by adding missing include for marshal.h
23205 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
23207 * domain.c, object.c: change the ldstr_table to hold
23208 MonoString* as keys: makes the runtime isinterned lookup
23209 faster and simplifies memory management.
23211 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
23213 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
23214 possible to add imperative security checks before calling the icall.
23215 * reflection.c: Return security attributes on the original MonoMethod
23216 (and not the wrapped one). This fix permissions on icalls.
23218 2005-01-25 Dick Porter <dick@ximian.com>
23220 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
23221 the check for mktime() support actually test the mktime() return
23222 value. "Fixes" bug 71682, though the output is still different to
23225 2005-01-25 Martin Baulig <martin@ximian.com>
23227 * class.c (mono_class_is_assignable_from): Make this work for
23230 2005-01-24 Ben Maurer <bmaurer@ximian.com>
23232 * marshal.c (mono_string_utf8_to_builder)
23233 (mono_string_builder_to_utf16): We might not have ownership of the
23234 string. In thise case, we need to create a new buffer.
23236 * object-internals.h (mono_stringbuilder_capacity): sb->str might
23237 be null, in which case, use the default capacity.
23239 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
23241 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
23242 GC events to the profiler.
23244 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
23246 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
23247 if you don't want the GC to run.
23249 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
23251 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
23252 start providing a GC API and keeping different implementations in
23254 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
23256 2005-01-22 Ben Maurer <bmaurer@ximian.com>
23258 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
23259 mmap rather than allocating a huge buffer.
23260 (mono_debug_close_mono_symbol_file): Free the buffer allocated
23263 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
23265 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
23266 and CheckExecutionRights.
23267 * reflection.c|h: Keep the index of the declarative security to be
23268 used, instead of the pointer, when AOT compiler is used. Also add
23269 class initialization when requesting demands.
23270 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
23271 CheckExecutionRights. Both properties are now FALSE by default, and
23272 unmodifiable, unless the --security option is used.
23274 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
23276 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
23277 reflection.c: properly refcount images and assemblies, many leaks fixed.
23279 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23281 * threadpool.c: increase the timeout for threads in the thread pool to
23282 10s. Fixes bug #67159.
23284 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
23286 * class-internals.h: Sun's compiler insists on explicit
23287 signed on bit fields to handle then correctly.
23289 2005-01-19 Miguel de Icaza <miguel@ximian.com>
23291 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
23292 Make the size of the array fit only the number of invalid path
23293 chars that we have.
23295 * class.c (_mono_class_get): Improve the error reporting when a
23296 class referenced is not found, to assist debugging.
23298 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
23300 * threads.c: fix off-by-one error.
23301 * domain.c: free data allocated in the domain.
23303 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
23305 * reflection.c (mono_method_body_get_object): Fill out exception info
23308 * object-internals.h: Add MonoReflectionExceptionHandlingClause
23311 2005-01-19 Martin Baulig <martin@ximian.com>
23313 * loader.c (mono_get_method_constrained): Make this work again.
23315 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
23317 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
23318 guint16 to match the managed side.
23320 * reflection.c (mono_reflection_body_get_object): Fill out local
23323 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
23326 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
23327 'local_var_sig_token'.
23329 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
23331 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
23334 * reflection.c (mono_method_body_get_object): Handle abstract and
23337 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
23339 * marshal.c, loader.c, class-internals.h, reflection.c:
23340 store the emthod data for a wrapper in an array instead of a list.
23342 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
23344 * marshal.c: change the code to allocate memory more
23345 conservatively for method wrappers.
23347 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
23349 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
23350 fields from MonoClass to the marshal info structure where they belong.
23352 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
23354 * class.c, object.c, class-internals.h, marshal.c: rearrange
23355 some fields and tweak some types to lower memory usage.
23357 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
23359 * threads.c (signal_thread_state_change): Handle the case when the
23360 target thread is the current thread.
23362 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
23364 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
23365 emit_ptr_to_object_conv.
23367 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
23368 marshalling. Fixes #71352.
23370 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
23372 * metadata.h, blob.h: move table enum to blob.h so it can be included
23374 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
23375 cut the size of MonoImage/MonoDynamicImage.
23377 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
23379 * profiler.c (mono_profiler_install_simple): Fix default arguments.
23381 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
23383 * reflection.c, reflection.h, icall.c: add a function to check
23384 if an attribute type is defined for a metadata object.
23386 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
23388 * object-internals.h: Added some needed fields from StringBuilder class.
23389 * marshal.c: Set the maxCapacity when creating a StringBuilder.
23391 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
23393 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
23394 threads before shutting down the runtime.
23396 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
23398 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
23400 * object-internal.h, threads.c: implement stacksize and
23401 parameterized thread start functionality (requires
23402 matching corlib). Marked broken code for later removal.
23404 2005-01-12 Martin Baulig <martin@ximian.com>
23406 * class-internals.h (MonoGenericClass): Moved the `initialized'
23407 flag to MonoDynamicGenericClass, removed `init_pending'.
23408 (MonoGenericInst): Added `is_reference' flag.
23410 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
23412 * reflection.c (mono_image_create_pefile): Only set the pe_offset
23413 inside the MSDOS header. Fixes #71201.
23415 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
23417 (mono_domain_finalize): Ditto.
23419 2005-01-12 Martin Baulig <martin@ximian.com>
23421 * class.c (mono_get_shared_generic_class): Use the cache for
23422 non-dynamic generic classes.
23424 * class-internals.h (mono_class_create_generic_2): Removed
23425 function prototype, this function is now static inside class.c.
23427 * class.c (mono_class_create_generic_2): Made this static, only
23428 call it from mono_class_init() and mono_class_setup_parent().
23429 (collect_implemented_interfaces_aux): Call mono_class_init() on
23430 the interfaces we collect.
23431 (mono_class_setup_vtable): Call mono_class_init (class->parent).
23433 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
23435 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
23436 it a real thread handle.
23438 * domain-internals.h: Move exvar_offset from MonoJitInfo to
23439 MonoJitExceptionInfo, since each catch clause needs its own variable.
23441 2005-01-11 Dick Porter <dick@ximian.com>
23443 * image.c (mono_pe_file_open): New variant on mono_image_open()
23444 that does not set up the CLI metadata; used for FileVersionInfo so
23445 it can get the data for windows binaries too.
23447 * process.c (process_read_string_block): Don't read off the end of
23448 the StringTable block.
23450 These both fix bug 70766.
23452 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
23454 * gc.c: set some fields to NULL at GC cleanup time.
23455 * threads.c: if we quit the main thread, call exit ().
23457 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
23459 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
23461 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
23463 * threads.h, threads.c, object.c: added accessor and settor for
23464 main_thread. Handle it specially when exiting from it: wait
23465 for other foreground threads to exit.
23467 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
23469 * process.c, verify.c: remove some bloat.
23471 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
23473 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
23474 the calling convention to cdecl under win32.
23476 2005-01-08 Ben Maurer <bmaurer@ximian.com>
23478 * object.c (mono_object_get_size): New function to get the size of
23479 an object instance.
23481 * profiler.c (simple_allocation): Use above.
23483 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
23485 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
23486 ves_icall_System_AppDomain_getRootDomain (as it's not required to
23487 get an appdomain by it's id and we can't assume the root's id is 0).
23488 * domain-internals.h: Change the function prototype to match.
23489 * icall.c: Change the icall table for AppDomain.
23491 2005-01-08 Miguel de Icaza <miguel@ximian.com>
23493 * locales.c (string_invariant_compare_char): Only compute
23494 GUnicodeTypes in the case where we need them. Test for ordinality
23495 first and return if so.
23500 * FIXME: here we must use the information from c1type and c2type
23501 * to find out the proper collation, even on the InvariantCulture, the
23502 * sorting is not done by computing the unicode values, but their
23503 * actual sort order.
23506 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
23508 * loader.c: for P/Invoke methods, allow the "Internal" shared
23509 library name to refer to the calling process symbol namespace.
23511 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
23513 * Makefile.am: Add the security manager to the build.
23514 * security-manager.c|h: New. Initialization of the security manager.
23516 2005-01-07 Dick Porter <dick@ximian.com>
23519 * monitor.c: Update thread state during Monitor and WaitHandle
23520 waits. Fixes bug 71031.
23522 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
23524 * reflection.c (property_encode_signature): Correctly handle when the
23525 property has no methods.
23527 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
23529 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
23531 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
23532 fields from mb, not rmb. Fixes #71017.
23534 * marshal.c (emit_ptr_to_str_conv): Add support for
23535 ByValTStr -> string conversion. Fixes #71015.
23537 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
23539 * mempool.c (mono_mempool_contains_addr): New helper function.
23541 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
23543 * metadata.c (mono_metadata_compute_size): Fix size calculation of
23544 HasSematics encoded fields.
23546 * metadata.c (mono_type_to_unmanaged): Improve error message for
23547 invalid string marshalling.
23549 * metadata.c: Fix warnings.
23551 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
23553 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
23556 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
23558 * domain.c object.c domain-internals.h: Revert part of r38077 since the
23559 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
23562 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
23564 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
23565 so methods containing these can be AOTed.
23567 2005-01-03 Martin Baulig <martin@ximian.com>
23569 * loader.c (find_method): Removed the hack for generic instances.
23570 (method_from_memberref): If our parent is a generic instance, pass
23571 its generic type definition to find_method() and then inflate the
23573 (mono_get_method_constrained): Pass the generic type definition to
23574 find_method() and inflate the method later.
23576 * class-internals.h (MonoStats): Added `generic_class_count'.
23578 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
23579 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
23581 * reflection.c (mono_custom_attrs_from_params): Don't ignore
23582 generic type definitions.
23584 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
23586 * loader.c icall.c: Fix warnings.
23588 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
23590 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
23591 blittable types. Fixes #70864.
23593 2004-12-29 Martin Baulig <martin@ximian.com>
23596 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
23598 * reflection.c (mono_method_get_object): Create a
23599 "System.Reflection.MonoGenericMethod" for inflated methods; don't
23600 call mono_get_inflated_method().
23602 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
23604 2004-12-27 Martin Baulig <martin@ximian.com>
23606 * class-internals.h (MonoMethod): Added `is_inflated' flag.
23607 (MonoMethodInflated): Added `inflated' field.
23609 * class.c (mono_class_inflate_generic_method): Don't really
23610 inflate the method here; just set the `is_inflated' flag in the
23612 (mono_class_get_inflated_method): Actually inflate the method here
23613 if it's not already inflated; we use the MonoMethodInflated's new
23614 `inflated' field as a cache.
23616 2004-12-26 Martin Baulig <martin@ximian.com>
23619 (inflate_generic_class): Moved some code out of inflate_generic_type().
23620 (mono_class_inflate_generic_method): If we're already inflated,
23621 inflate the context and use the declaring method; ie. make sure
23622 the declaring method of an inflated method is always the generic
23624 (mono_class_create_from_typedef): Create
23625 `class->generic_container->context->gclass'.
23627 2004-12-24 Ben Maurer <bmaurer@ximian.com>
23629 * metadata-internals.h, marshal.c, reflection.c: More
23630 MonoGHashTable->GHashTable.
23632 * domain-internals.h, class.c: Change MonoGHashTable's into
23633 GHashTables for some cases where no gc stuff is used
23635 All users: update apis
23637 2004-12-23 Ben Maurer <bmaurer@ximian.com>
23639 * metadata.c (builtin_types): Make this `const'. Makes this get
23640 put into the shareable section.
23641 (mono_metadata_init): Casts to make gcc happy.
23643 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
23645 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
23647 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
23649 * icall.c: Added an internal call to retrieve the position and length
23650 of assembly-level declarative security attributes (RequestMinimum,
23651 RequestOptional and RequestRefuse). This is used by the Assembly class
23652 to re-create the corresponding permission sets.
23654 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
23656 * marshal.c: fix the stelemref wrapper to be type correct
23659 2004-12-20 Ben Maurer <bmaurer@ximian.com>
23661 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
23662 to do key & 0x7fffffff. Hashtable already does this. It just
23663 results in longer code.
23665 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
23667 * appdomain.c: Bump corlib version.
23668 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
23669 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
23670 * reflection.c|h: Add functions to get declarative security infos
23671 (blob position and length) for assemblies, classes and methods.
23673 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
23675 * reflection.c: sort the constant table (bug #70693).
23677 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
23679 * object-internals.h, threads.c, domain.c: add accessors for
23680 the MonoThread and MonoDomain tls keys.
23682 2004-12-18 Martin Baulig <martin@ximian.com>
23684 * class.c (inflate_generic_type): If we're inflating a generic
23685 instance, set `ngclass->context->container = context->container';
23686 ie. the container we inflated into.
23688 * metadata.c (mono_metadata_parse_generic_param): Reflect above
23689 inflate_generic_type() changes.
23691 2004-12-17 Martin Baulig <martin@ximian.com>
23693 * class-internals.h
23694 (MonoGenericClass): Replaced `MonoType *generic_type' with
23695 `MonoClass *generic_class'. Removed `dynamic_info'; if
23696 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
23697 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
23699 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
23701 * exception.c (mono_exception_from_token): New helper function.
23703 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
23705 * assembly.c (mono_assembly_load_with_partial_name): Call
23706 mono_assembly_loaded before invoking the preload hooks. Fixes
23709 * object-internals.h (MonoThread): Change culture_info and
23710 ui_culture_info into an array.
23712 * threads.c: Cache culture info objects from more than one appdomain.
23714 * threads.c threads-types.h icall.c: Add icalls for manipulating the
23715 current UI culture.
23717 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
23719 * threads.h threads.c appdomain.c: Clear the culture_info field of
23720 all threads during unloading if they point to an object in the dying
23723 2004-12-13 Ben Maurer <bmaurer@ximian.com>
23725 * culture-info.h (TextInfoEntry): New struct
23726 * object-internals.h: sync with managed
23727 * locales.c: fill the `text_info_data' field
23728 * culture-info-tables.h: update
23730 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
23732 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
23735 2004-12-12 Ben Maurer <bmaurer@ximian.com>
23737 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
23738 (ves_icall_ModuleBuilder_getMethodToken): Ditto
23740 2004-12-12 Martin Baulig <martin@ximian.com>
23742 * mono-debug-debugger.c (write_type): If we're an enum and the
23743 builtin types have already been initialized, call mono_class_init().
23745 2004-12-11 Martin Baulig <martin@ximian.com>
23747 * metadata.c (mono_metadata_load_generic_params): Added
23748 `MonoGenericContainer *parent_container' argument; automatically
23749 compute `container->is_method'; pass the correct owner to
23752 * reflection.c (compare_genericparam): Sort the GenericParam table
23753 according to increasing owners.
23755 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
23757 * profiler.c: allow disabling the default profiler.
23759 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
23761 * decimal.c, icall.c: allow disabling System.Decimal support.
23763 2004-12-09 Marek Safar <marek.safar@seznam.cz>
23765 * reflection.c: Add support for null attribute arguments.
23767 2004-12-09 Martin Baulig <martin@ximian.com>
23769 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
23770 names to get rid of compiler warnings.
23772 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
23774 * marshal.c (mono_marshal_get_struct_to_ptr): Call
23775 mono_marshal_load_type_info (). Fixes #69625.
23776 (mono_marshal_get_ptr_to_struct): Likewise.
23778 2004-12-08 Martin Baulig <martin@ximian.com>
23780 * mono-debug.h: Bumped version number to 47.
23782 * mono-debug-debugger.c
23783 (mono_debugger_event_handler, mono_debugger_event): Take two
23784 guint64 arguments insteed of a gpointer and a guint32.
23786 2004-12-08 Martin Baulig <martin@ximian.com>
23788 * debug-mono-symfile.h
23789 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
23790 `address' to `native_offset'.
23792 2004-12-08 Martin Baulig <martin@ximian.com>
23794 * class.c (mono_class_create_from_typespec): Only inflate if we
23795 either have `context->gclass' or `context->gmethod'.
23797 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
23799 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
23801 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
23803 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
23805 * reflection.c (mono_assembly_get_object): Remove the workaround put
23806 in for the release.
23808 * appdomain.c: Use the corlib_internal field from MonoAssembly.
23810 * appdomain.c: Bump corlib version.
23812 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
23813 be visible in other appdomains.
23815 2004-12-07 Ben Maurer <bmaurer@ximian.com>
23817 * threads.c: Interlocked inc and dec for longs were messed up,
23818 use a KISS based impl for this. Fixes 70234
23820 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
23822 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
23824 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
23826 * icall.c: fix to follow policy not to allow struct
23827 arguments in icalls.
23829 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23831 * process.c: make the patch that handles spaces in file paths work
23832 on mono/windows too.
23834 2004-12-06 Martin Baulig <martin@ximian.com>
23836 * class.c (mono_class_create_generic): Call
23837 mono_class_setup_supertypes() if we're dynamic.
23838 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
23840 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
23842 * object-internals.h: Add new fields to MonoThread.
23844 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
23846 * icall.c threads-types.h threads.c: Add new icalls.
23848 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
23850 * object-internals.h (MonoReflectionAssembly): Sync object layout with
23853 * appdomain.c: Bump corlib version.
23855 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
23856 internal assemblies. Fixes #69181.
23858 2004-12-05 Martin Baulig <martin@ximian.com>
23860 * class.c (mono_class_inflate_generic_signature): Make this a
23861 no-op if `context' is NULL or we don't have any type parameters;
23862 also copy `sentinelpos'.
23864 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
23866 * image.c: Add unbox_wrapper_cache.
23868 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
23870 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
23871 function generator.
23873 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
23876 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
23878 2004-12-04 Martin Baulig <martin@ximian.com>
23880 * loader.c (mono_method_get_signature_full): New public function;
23881 like mono_method_get_signature(), but with an additional
23882 `MonoGenericContext *' argument.
23884 * class.c (mono_class_inflate_generic_signature): Formerly known
23885 as inflate_generic_signature(); make this public.
23887 2004-12-04 Martin Baulig <martin@ximian.com>
23890 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
23891 instead of a `MonoGenericContainer *'.
23892 (mono_metadata_parse_array_full): Likewise.
23893 (mono_metadata_parse_signature_full): Likewise.
23894 (mono_metadata_parse_method_signature_full): Likewise.
23895 (mono_metadata_parse_generic_inst): Likewise.
23896 (mono_metadata_parse_generic_param): Likewise.
23897 (mono_metadata_parse_mh_full): Likewise.
23898 (mono_type_create_from_typespec_full): Likewise.
23900 2004-12-03 Martin Baulig <martin@ximian.com>
23902 * class-internals.h (MonoGenericContainer): Replaced the
23903 `MonoGenericContext * pointer with a `MonoGenericContext'
23904 structure and made it the first element.
23906 2004-12-03 Martin Baulig <martin@ximian.com>
23909 (inflate_generic_type): Set the `context->container' when creating
23910 a new MonoGenericContext.
23911 (mono_class_inflate_generic_method): Likewise.
23912 (mono_class_create_from_typespec): Just use `context->container'
23913 to get the container.
23915 * loader.c (method_from_methodspec): Set `context->parent' from
23916 `context->container' - and if that's a method container, use its
23917 parent. Also set the `context->container' when creating a new
23918 MonoGenericContext.
23919 (mono_get_method_from_token): Use just `context->container' to get
23922 * metadata.c (do_mono_metadata_parse_generic_class): Also set
23923 `gclass->context->container'.
23925 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
23926 the `context->container' when creating a new MonoGenericContext.
23928 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
23930 * reflection.c (compare_genericparam): Sort params with identical
23931 owner by their number. Fixes gen-111 on sparc.
23933 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
23935 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
23936 around the domain changes.
23938 * appdomain.c (mono_domain_unload): Handle the case when the thread
23939 calling Unload is itself being aborted during unloading. Fixes #70022.
23941 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
23943 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
23944 checkpoint_func as an icall so it gets a wrapper.
23945 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
23946 in the cross-appdomain wrappers too.
23948 * threads.c (mono_thread_has_appdomain_ref): Make this public.
23950 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
23952 * reflection.c: Fix some memory leaks.
23954 2004-12-02 Martin Baulig <martin@ximian.com>
23956 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
23958 * metadata.c (generic_class_cache): New static hashtable.
23959 (mono_metadata_lookup_generic_class): New public method.
23961 2004-12-02 Martin Baulig <martin@ximian.com>
23963 * class.c (mono_class_create_from_typedef): Call
23964 mono_class_setup_parent() and mono_class_create_mono_type() before
23965 parsing the interfaces.
23967 2004-12-02 Martin Baulig <martin@ximian.com>
23969 * metadata.c (generic_inst_cache): New static hashtable.
23970 (mono_metadata_lookup_generic_inst): New public function.
23971 (mono_metadata_inflate_generic_inst): New public function.
23972 (mono_metadata_parse_generic_inst): New public function.
23973 (do_mono_metadata_parse_generic_class): Use the new
23974 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
23975 since this'll also use the cache.
23977 * reflection.c (mono_reflection_bind_generic_method_parameters):
23978 Use mono_metadata_lookup_generic_inst() to use the new cache.
23980 * class.c (inflate_mono_type): Use
23981 mono_metadata_inflate_generic_inst() to inflate a generic
23982 instance; this'll also use the new cache.
23984 * loader.c (method_from_methodspec): Use
23985 mono_metadata_parse_generic_inst() and
23986 mono_metadata_inflate_generic_inst() rather than parsing it
23987 manually, so we can use the new cache.
23989 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
23991 * threads.c (wait_for_tids): Do not incorrectly free threads when
23992 the wait times out.
23994 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
23996 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
23997 iter->args based on whether parameters are passed in registers (i.e.
23998 MONO_ARCH_REGPARMS is defined)
24000 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
24002 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
24003 the exception message. Fixes #70070.
24004 (method_from_methodspec): Fix warnings.
24006 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24008 * process.c: (complete_path) return the path quoted
24010 2004-12-01 Martin Baulig <martin@ximian.com>
24012 * class-internals.h (MonoGenericInst): New structure.
24013 (MonoGenericClass): Replaced `type_argc', `type_argv' and
24014 `is_open' with `MonoGenericInst *inst'.
24015 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
24016 `is_open' with `MonoGenericInst *inst'.
24018 2004-11-30 Martin Baulig <martin@ximian.com>
24020 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
24022 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
24023 to `generic_class_cache'.
24026 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
24027 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
24028 (mono_generic_inst_is_valuetype): Renamed to
24029 mono_generic_class_is_valuetype().
24031 * class-internals.h
24032 (MonoGenericInst): Renamed to MonoGenericClass.
24033 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
24034 (MonoClass): Renamed `generic_inst' to `generic_class'.
24035 (MonoGenericContext): Renamed `ginst' to `gclass'.
24037 * object-internals.h
24038 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
24040 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
24041 mono_reflection_generic_class_initialize().
24043 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
24044 now known as "System.Reflection.MonoGenericClass".
24045 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
24047 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
24049 * class-internals.h: Added a flag field to MonoClass to cache the
24050 declarative security attributes actions associated with the class.
24051 * domain-internals.h: Added booleans to MonoJitInfo to cache the
24052 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
24053 applicable to the JITted method.
24054 * reflection.c|h: Added functions to extract (as flags) which security
24055 actions are available (declaratively) for a method, class or assembly.
24056 * metadata.c|h: Added functions to search the declarative security
24057 table in the metadata.
24059 2004-11-29 Ben Maurer <bmaurer@ximian.com>
24061 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
24062 EXPORTEDTYPES are already in the class name cache, so there is no
24063 need to add extra code here to look at them. Just removes a bit of
24066 (ves_icall_System_Environment_get_TickCount): No need for #if
24067 WINDOWS. We already have the code in io-layer.
24069 2004-11-28 Martin Baulig <martin@ximian.com>
24072 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
24075 2004-11-27 Miguel de Icaza <miguel@ximian.com>
24077 * assembly.c (do_mono_assembly_open): Instead of having a
24078 conditional WITH_BUNDLE, incorporate support for bundles here, by
24079 having a global `bundles' variable holding a pointer to the actual
24082 (mono_register_bundled_assemblies): New API call used by the
24085 See mkbundle.1 for details.
24087 2004-11-27 Martin Baulig <martin@ximian.com>
24089 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
24090 the vtable for generic methods.
24092 2004-11-26 Martin Baulig <martin@ximian.com>
24095 (mono_metadata_generic_method_hash): New public function.
24096 (mono_metadata_generic_method_equal): Likewise.
24098 * class-internals.h
24099 (MonoGenericContainer): Added `GHashTable *method_hash'.
24101 * reflection.c (ReflectionMethodBuilder): Added
24102 `MonoGenericContainer *generic_container'.
24103 (reflection_methodbuilder_to_mono_method): Don't create a new
24104 MonoGenericContainer each time we're called.
24105 (mono_reflection_bind_generic_method_parameters): Use
24106 `container->method_hash' to cache the results so we don't create a
24107 different method if we're called several times with the same
24110 * loader.c (method_from_methodspec): Use the new
24111 `container->method_hash' here, too.
24113 2004-11-26 Martin Baulig <martin@ximian.com>
24115 * class.c (inflate_generic_signature): Correctly compute
24116 `res->has_type_parameters'.
24117 (mono_class_vtable): Use the `has_type_parameters' flag to
24118 determine whether we're a generic method.
24120 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
24122 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
24124 * object.c (mono_runtime_run_main): Fix a small memory leak.
24126 2004-11-25 Martin Baulig <martin@ximian.com>
24128 * class.c (set_generic_param_owner): Fixed the loop.
24130 2004-11-25 Martin Baulig <martin@ximian.com>
24132 * object.c (mono_class_vtable): Don't create any JIT wrappers for
24135 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
24137 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
24138 names. Fixes #69787.
24140 2004-11-24 Martin Baulig <martin@ximian.com>
24142 * class.c (mono_class_create_generic_2): If we don't have a
24143 `ginst->parent', inflate `gklass->parent' to get our parent.
24145 2004-11-24 Martin Baulig <martin@ximian.com>
24147 * reflection.c (compare_genericparam): Correctly sort the
24148 GenericParam table; fixes #69779.
24150 2004-11-23 Ben Maurer <bmaurer@ximian.com>
24152 * reflection.c: When writing a PE file, don't create a huge
24153 buffer in memory. Just write the arrays we have to the file.
24154 This reduces memory usage.
24156 * metadata-internals.h: MonoDynamicStream pefile is no longer used
24159 2004-11-17 Martin Baulig <martin@ximian.com>
24161 * class.c (mono_class_init): Don't setup `class->parent' for
24162 dynamic instances; moved this to mono_class_generic_2().
24163 (mono_class_create_generic): Also set `klass->inited' for dynamic
24165 (mono_class_create_generic_2): Don't do anything for dynamic
24166 generic instances. Set `klass->parent' here and also call
24167 mono_class_setup_parent() here.
24169 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
24170 `MonoType *parent' argument; set `ginst->parent' before calling
24171 mono_class_create_generic_2(), so we set the correct parent.
24173 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
24175 * reflection.c: allow getting attributes from ModuleBuilder
24178 2004-11-17 Martin Baulig <martin@ximian.com>
24180 * class.c (mono_class_create_from_typedef): If a type parameter is
24181 inherited from an outer class, set its owner to that class.
24183 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
24185 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
24186 for (int*) written size. This fixes bug #69592.
24188 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
24190 * icall.c: Added IsAuthenticodePresnet internal call.
24191 * image.c|h: New function that check a MonoImage for an Authenticode
24192 signature in the certificate PE data directory.
24193 * security.c|h: New internal call to ask the runtime if an
24194 Authenticode signature seems referenced in the PE header.
24196 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
24198 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
24200 * reflection.c (mono_image_create_pefile): Free the assembly streams
24201 after writing out the assembly file.
24203 * object.c (mono_runtime_run_main): Fix small memory leak.
24205 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
24206 property access modifiers. Fixes #69389.
24208 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
24210 * domain.c, object.c, object-internals.h, domain-internals.h,
24211 object.h, marshal.c: keep dynamic code info per domain.
24213 2004-11-15 Martin Baulig <martin@ximian.com>
24215 * class.c (mono_type_get_name_recurse): Put type arguments in
24216 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
24219 2004-11-15 Martin Baulig <martin@ximian.com>
24221 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
24222 (mono_class_setup_vtable): When computing `the_cname' for a
24223 generic instance, don't include the namespace since we'd otherwise
24226 2004-11-15 Martin Baulig <martin@ximian.com>
24228 * class.c (mono_class_create_generic): Changed return type to void.
24229 (mono_class_create_generic_2): New public function; setup
24230 `class->method', `class->field' and `class->interfaces' here
24231 instead of in mono_class_init().
24233 * class.h (mono_class_create_generic): Moved to class-internals.h.
24235 2004-11-14 Ben Maurer <bmaurer@ximian.com>
24237 * reflection.c (mono_image_create_pefile): take a file HANDLE.
24238 rather than writing to memory, write to this file. Right now,
24239 we are just writting into a buffer, and copying that. However
24240 we can avoid the buffer later.
24242 (mono_dynamic_stream_reset): new function
24244 * icall.c, object-internals.h: update for the above.
24246 2004-11-13 Ben Maurer <bmaurer@ximian.com>
24248 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
24249 have been using gc'd memory. First it is slower, unlikely
24250 the comment in the source code said, secondly, it increases
24251 our footprint to do it in the gc.
24253 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
24254 the method so that it does not have to copy to managed code.
24256 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
24258 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
24260 2004-11-12 Martin Baulig <martin@localhost>
24262 * reflection.c (mono_image_create_token): Allow generic method
24263 definitions here, since they may appear in an `.override'; see
24264 gen-98/gen-99 for an example.
24266 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
24268 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
24271 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
24274 2004-11-11 Martin Baulig <martin@ximian.com>
24276 * class.c (mono_class_setup_vtable): In an explicit interface
24277 implementation, the method name now includes the arity.
24279 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
24281 * object.c (mono_array_full_copy): Fix warning.
24283 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
24285 * appdomain.c: Removed look_for_method_by_name(). Use the new method
24286 mono_class_get_method_from_name() instead.
24288 * class-internals.h: Added two new types of wrappers.
24289 Added MonoRemotingTarget enum. Added new trampoline function type, which
24290 takes an additional MonoRemotingTarget value as parameter, so it is
24291 possible to request a trampoline for a specific target.
24293 * class.c: Added new mono_class_get_method_from_name() method.
24295 * class.h: In MonoRemoteClass, we can have now to vtables, one for
24296 general remoting sinks and one specific for cross domain calls.
24298 * debug-helpers.c: Added new wrapper names.
24300 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
24303 * image.c: Porperly delete value objects form the remoting invoke hashtable.
24305 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
24306 with several other methods (mono_marshal_get_xappdomain_dispatch,
24307 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
24308 and others) can generate a fast remoting wrapper for cross domain calls.
24309 More information can be found in docs/remoting.
24310 Other changes: Removed mono_find_method_by_name, and used
24311 mono_class_get_method_from_name instead.
24312 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
24313 is stored in the remoting invoke hashtable.
24315 * marshal.h: published the new method for getting the xdomain wrapper,
24316 and also added a method for getting the adequate wrapper for a given
24319 * object-internals.h, object.c: Added a couple of methods for capying and
24321 Modified mono_install_remoting_trampoline, which takes the new remoting
24322 trampoline that has a remoting target as parameter.
24323 mono_class_proxy_vtable now also takes a remoting target as parameter, and
24324 will return the most suitable vtable for the target.
24325 Added mono_remote_class_vtable, which returns the vtable of a remote class
24326 (which can be the normal remoting vtable or the xdomain vtable).
24328 * threads.c: the xdomain invoke and dispatch wrappers must also be
24329 protected against interruptions.
24331 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24333 * icall.c: use memmove in BlockCopyInternal when the source and
24334 destination arrays are the same.
24336 2004-11-09 Martin Baulig <martin@ximian.com>
24338 * class-internals.h (MonoGenericContainer): Removed `method' and
24339 `signature', replaced them with `is_method' and `is_signature'
24340 flags. Added `context'.
24342 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
24343 instead of a `MonoGenericContainer *'.
24345 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
24346 for dynamic type parameters.
24347 (mono_metadata_load_generic_params): Setup `container->context'.
24349 * reflection.c (mono_reflection_setup_generic_class): Setup
24350 `tb->generic_container->context'.
24351 (do_mono_reflection_bind_generic_parameters): Use
24352 mono_class_inflate_generic_type() to correctly inflate types,
24353 rather than using our own hack just for MONO_TYPE_VAR.
24355 2004-11-09 Martin Baulig <martin@ximian.com>
24357 * class.c (mono_class_inflate_generic_method): Small fix; don't
24361 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
24362 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
24363 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
24364 (ves_icall_Type_BindGenericParameters): Likewise.
24365 (ves_icall_Type_get_IsGenericInstance): Likewise.
24366 (ves_icall_Type_GetGenericParameterPosition): Likewise.
24367 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
24368 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
24369 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
24371 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
24373 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
24374 assembly versions and public key tokens. Fixes #69113.
24376 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
24378 * metadata.c: fix bug introduced with the type cache changes
24381 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
24383 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
24384 the MonoClass pointer instead of the token in exception clauses.
24385 * reflection.c: updates for the above and make the code not depend
24386 on the structure of MonoExceptionClause.
24388 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
24390 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
24391 Add support for dynamic assemblies. Fixes #69114.
24393 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
24395 2004-11-07 Ben Maurer <bmaurer@ximian.com>
24397 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
24398 since most only those methods use it. the code member of
24399 MonoMethodPInvoke was dead, so that can be removed too. Also,
24400 remove inline_count (again, not used), and move slot so that it
24401 can share bits with some other flags. This saves 8 bytes in the
24402 structure and gives us about 50 kb back for mcs helloworld.cs
24404 * *.[ch]: Do naming changes for the above.
24406 * loader.c (mono_method_get_header): Lazily init the header
24408 (mono_get_method_from_token): don't init the header here
24409 (mono_free_method): the header may never be allocated
24411 Overall, this saves 150 kb of unmanaged allocations
24412 for mcs helloworld.cs. That accounts for 10% of the unmanaged
24415 * loader.c, loader.h (mono_method_get_header): new accessor.
24417 * *.[ch]: use the above method. Prepares us to lazily load
24420 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
24421 three warnings, which are actual bugs (see 69206).
24423 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
24424 unused. Saves a cool 4 bytes / method.
24426 2004-11-06 Ben Maurer <bmaurer@ximian.com>
24428 * metadata.c (builtin_types): Add types for System.Object here.
24429 (mono_metadata_parse_type_full): Cache MonoType*'s that are
24430 for a class or valuetype from klass->this_arg or klass->byval_arg.
24432 On mcs for a hello world, this gets us down from 21836 MonoType's
24435 (mono_metadata_free_type): Account for the above change.
24437 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
24439 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
24440 exception instead of asserting if name is null.
24441 (ves_icall_System_AppDomain_GetData): Ditto.
24443 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
24445 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
24448 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
24449 Return NULL when the domain does not have entry_assembly set.
24451 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
24452 Add a 'resource_modules' argument.
24453 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
24455 * reflection.c (mono_reflection_create_runtime_class): Move setting
24456 of wastypebuilder here, so mono_get_type_object () returns a MonoType
24459 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
24460 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
24461 Throw an ArgumentNullException if 'ptr' is null.
24463 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
24464 assemblies here. Fixes #69020.
24466 2004-11-05 Geoff Norton <gnorton@customerdna.com>
24468 * reflection.c (build_compressed_metadata): Fix the previous patch for
24469 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
24472 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
24474 * assembly.c (mono_assembly_names_equal): Allow a match if one of
24475 the cultures is false. Fixes #69090.
24477 * reflection.c (build_compressed_metadata): Fix invalid memory read
24478 detected by valgrind.
24480 * reflection.c (mono_reflection_get_type): Avoid triggering a
24481 TypeResolve multiple times for the same type. Fixes #65577.
24483 2004-11-04 Ben Maurer <bmaurer@ximian.com>
24485 * marshal.c: Avoid using ldftn to call managed functions. It is
24486 much slower than just a call.
24488 * reflection.c (mono_module_get_object): free the basename we
24489 allocate here from glib.
24491 * reflection.c (ensure_runtime_vtable): make sure to free
24492 overrides. Also, we were allocating an array of MonoMethod not an
24493 array of MonoMethod*.
24495 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
24497 * image.c (mono_image_close): free image->guid here.
24499 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
24501 * reflection.c: Fix some spec conformance issues with the PE file
24502 structures so mcs compiled apps run on the Net 2.0 beta.
24504 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
24506 * string-icalls.c (ves_icall_System_String_ctor_encoding):
24507 Implement this. Fixes #67264.
24509 * debug-helpers.h debug-helpers.c marshal.c: Move
24510 mono_find_method_by_name to debug-helpers.c.
24512 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
24514 * object.c (mono_release_type_locks): type_initialization_hash is
24517 * reflection.c object.c object-internals.h: Fix warnings.
24519 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
24520 without accessors. Fixes #61561.
24522 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
24523 application base from the root domain if not set. Fixes #65641.
24524 (mono_runtime_init): Fix warning.
24526 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24528 * appdomain.c: call mono_thread_pool_init.
24529 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
24530 of worker threads based on the number of CPUs and the environment
24531 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
24532 for non-windows (windows) systems.
24534 2004-10-27 Chris Toshok <toshok@ximian.com>
24536 * mono-debug-debugger.c (write_class): don't call mono_class_init
24537 here, as even with the check for (!klass->init_pending), we get
24538 into a situation where we're hitting cycles in class
24539 initialization. Fixes #68816.
24541 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
24543 * image.c: Avoid overwriting values in the loaded_images_hash when an
24544 assembly is loaded multiple times. Fixes #61152.
24546 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
24547 so multiple satellite assemblies for the same name can be loaded.
24550 * mono_domain_assembly_preload: Actually return the loaded assembly,
24553 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
24554 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
24556 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
24557 pending finalizers are not invoked after the appdomain has been
24558 unloaded. Fixes #67862.
24560 2004-10-22 Martin Baulig <martin@ximian.com>
24562 * mono-debug-debugger.c
24563 (mono_debugger_runtime_invoke): Don't box valuetypes.
24565 2004-10-22 Chris Toshok <toshok@ximian.com>
24567 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
24568 don't hide private methods.
24570 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
24572 * icall.c: Allows the runtime to "share" (when known) the public key
24573 token of an assembly. This avoid the need to recalculate the token
24574 (from the public key) in managed code.
24576 2004-10-21 Chris Toshok <toshok@ximian.com>
24578 * debug-helpers.c (append_class_name): argh, revert last patch.
24580 2004-10-21 Chris Toshok <toshok@ximian.com>
24582 * debug-helpers.c (append_class_name): use '+' as the delimiter,
24583 not '/', so that it matches what the debugger uses to look up
24586 2004-10-21 Martin Baulig <martin@ximian.com>
24588 * mono-debug-debugger.c (mono_debugger_throw_exception): New
24589 public method; this is called each time an exception is thrown and
24590 allows the debugger to use exception catch points.
24592 2004-10-21 Martin Baulig <martin@ximian.com>
24594 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
24595 the stack pointer and the exception object in some struct and pass
24596 that to the debugger.
24598 2004-10-21 Chris Toshok <toshok@ximian.com>
24600 * mono-debug-debugger.c (do_write_class): add instance/static
24601 event support. We don't expose "raise" or "other" yet.
24602 (event_is_static): new method.
24604 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
24606 * mono-debug-debugger.c
24607 (mono_debugger_handle_exception): Remove
24608 bogus return value for fussy compilers.
24610 2004-10-20 Martin Baulig <martin@ximian.com>
24612 * mono-debug-debugger.c
24613 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
24614 (mono_debugger_handled_exception): Likewise.
24616 2004-10-20 Martin Baulig <martin@ximian.com>
24618 * mono-debug-debugger.h (MonoDebuggerEvent): Added
24619 MONO_DEBUGGER_EVENT_EXCEPTION.
24621 * mono-debug-debugger.c (mono_debugger_handle_exception): New
24622 public function to send the debugger a notification for an
24623 exception and inform it about a catch/finally clause.
24625 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
24627 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
24628 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
24631 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
24633 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
24635 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
24636 marshalled as [In,Out]. Fixes #58325.
24638 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
24640 * reflection.c (mono_method_body_get_object): Implement some fields.
24642 2004-10-12 Martin Baulig <martin@ximian.com>
24644 * reflection.c (mono_reflection_bind_generic_parameters): Small
24645 fix, correctly retrieve our parent from a generic instance.
24647 2004-10-12 Martin Baulig <martin@ximian.com>
24649 * metadata.c (mono_metadata_generic_param_equal): We always have
24653 (mono_class_from_generic_parameter): We need to have an owner.
24654 (my_mono_class_from_generic_parameter): Likewise.
24656 * reflection.c (mono_reflection_setup_generic_class): Renamed to
24657 mono_reflection_create_generic_class() and added a new
24658 mono_reflection_setup_generic_class().
24659 (mono_reflection_initialize_generic_param): If we're a nested
24660 generic type and inherited from the containing class, set our
24661 owner to the outer class.
24663 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
24665 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
24667 * reflection.c (mono_method_body_get_object): New function to create
24668 a MethodBody object.
24670 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
24672 2004-10-11 Martin Baulig <martin@ximian.com>
24674 * metadata.c (_mono_metadata_type_equal): Renamed to
24675 do_mono_metadata_type_equal() and made static.
24677 2004-10-11 Martin Baulig <martin@ximian.com>
24679 * appdomain.c: Bump corlib version number to 28.
24681 2004-10-10 Martin Baulig <martin@ximian.com>
24683 * class-internals.h
24684 (MonoGenericInst): Added `MonoGenericContainer *container'.
24685 (MonoGenericMethod): Likewise.
24686 (MonoGenericContext): Likewise.
24687 (MonoGenericParam): Added `MonoGenericContainer *owner'.
24690 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
24691 (do_mono_metadata_parse_generic_inst): Likewise.
24692 (mono_metadata_parse_type_full): New public method. This is the actual
24693 mono_metadata_parse_type() implementation - with an additional
24694 `MonoGenericContainer *' argument.
24695 (mono_metadata_parse_array_full): Likewise.
24696 (mono_metadata_parse_signature_full): Likewise.
24697 (mono_metadata_parse_method_signature_full): Likewise.
24698 (mono_metadata_parse_mh_full): Likewise.
24699 (mono_type_create_from_typespec): Likewise.
24700 (mono_metadata_interfaces_from_typedef_full): New public method;
24701 this is similar to the other _full() methods, but we take a
24702 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
24703 (mono_metadata_parse_generic_param): Take an additional
24704 `MonoGenericContainer *' argument and lookup the MonoGenericParam
24705 from that container.
24706 (mono_metadata_generic_param_equal): New static method to compare
24707 two type parameters.
24708 (_mono_metadata_type_equal): New static method; takes an
24709 additional `gboolean signature_only' argument - if true, we don't
24710 compare the owners of generic parameters.
24711 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
24712 with a TRUE argument - do a signature-only comparision.
24714 * loader.c: Use the new _full() methods and pass the
24715 MonoGenericContainer to them.
24717 * object-internals.h (MonoReflectionTypeBuilder): Added
24718 `MonoGenericContainer *generic_container' field.
24719 (MonoReflectionMethodBuilder): Likewise.
24721 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
24723 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
24724 case initial images of dynamic assemblies.
24726 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
24728 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
24730 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
24731 length of event->other array.
24732 (typebuilder_setup_events): Ditto.
24734 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
24735 'assembly_by_name' and add an 'assemblies' list.
24737 * assembly.h assembly.c: Add a new search hook for determining whenever
24738 an assembly is already loaded. Use this instead of searching in the
24739 loaded_assemblies list.
24741 * domain.c appdomain.c: Implement the new search hook so loaded
24742 assemblies are now scoped by appdomain. Fixes #67727.
24744 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
24746 * threads.c (mono_thread_attach): Initialize synch_lock field so
24747 mono_thread_detach works again.
24749 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
24750 'lib' too. Fixes #63130.
24752 2004-10-06 Jackson Harper <jackson@ximian.com>
24754 * culture-info-tables.h: regenerated.
24756 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
24758 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
24759 implemented by other interfaces in the result. Fixes #65764.
24761 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
24762 Handle unloadable modules without crashing.
24764 * image.c (load_modules): Revert the previous patch since modules must
24765 have a fixed index inside the array.
24767 * image.c (load_modules): Don't include native modules in the modules
24770 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
24772 * reflection.h: Add param_defaults field.
24774 * reflection.c: Add support for parameter defaults in dynamic methods.
24777 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
24778 an empty string when a type has no namespace. Fixes #64230.
24780 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
24782 * tabledefs.h: Added "internal" security actions to support non-CAS
24783 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
24784 Note: they do not seems to be used anymore in 2.0 (new metadata format)
24786 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
24788 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
24789 constructor of abstract class. Fixes #61689.
24791 2004-10-04 Martin Baulig <martin@ximian.com>
24793 * class-internals.h (MonoGenericContainer): New type.
24794 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
24795 `MonoGenericContainer *generic_container'.
24796 (MonoClass): Replaced `gen_params' and `num_gen_params' with
24797 `MonoGenericContainer *generic_container'.
24799 * metadata.c (mono_metadata_load_generic_params): Return a
24800 `MonoGenericContainer *' instead of a `MonoGenericParam *';
24801 removed the `num' argument.
24803 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
24805 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
24806 for dynamic images.
24808 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
24811 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
24813 * reflection.c: Save pe_kind and machine values into the generated
24816 * appdomain.c: Bump corlib version number.
24818 * object-internals.h: Reorganize layout of LocalBuilder.
24820 * class-internals.h class.c (mono_class_get_implemented_interfaces):
24821 New helper function.
24823 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
24824 created MonoType for dynamic types. Fixes #66180.
24826 2004-10-02 Ben Maurer <bmaurer@ximian.com>
24828 * threadpool.c: the ares hashtable needs a critical section around it.
24829 this prevents some nasty segfaults
24831 2004-10-02 Massimiliano Mantione <massi@ximian.com>
24833 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
24834 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
24837 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
24839 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
24841 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
24843 * image.c: Always canonicalize image file names, to avoid loading
24844 the same assembly twice when referenced using a relative path.
24846 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
24848 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
24850 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
24852 * marshal.c: Fix warnings.
24854 2004-09-29 Geoff Norton <gnorton@customerdna.com>
24856 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
24857 attempting to marshal the delegate_trampoline as the method_addr.
24858 This patch has a static hashtable of marshalled delegates so that
24859 we can map delegate_trampoline addresses back to delegates. This
24860 allows a delegate passed to managed code to be passed back into native
24863 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
24865 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
24867 * reflection.c (method_encode_code): Align method headers properly.
24870 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
24872 * marshal.c: In the runtime invoke wrapper, reset the abort
24873 exception if it is cached. This avoids the automatic rethrowal of
24874 the exception after the catch of the wrapper. Also check for pending
24875 interruptions before calling the managed method. This is done using
24876 the new method emit_thread_force_interrupt_checkpoint, since the
24877 normal checkpoint method is ignored when running the invoke wrapper.
24878 * object.c: If the abort exception is rethrown, set the abort_exc
24879 field of the thread, so it will be rethrown aftere every catch.
24880 * threadpool.c: Only run an interruption checkpoint if what has been
24881 requested is a stop of the thread (aborts will be ignored).
24882 * threads.c: By default, a thread will now never be interrumped while
24883 running the runtime invoke wrapper (this ensures that runtime_invoke
24884 will always return to the caller if an exception pointer is provided).
24885 There is a new special method mono_thread_force_interruption_checkpoint()
24886 to force an interruption checkpoint even if running a protected
24887 wrapper, which is used by the same runtime invoke wrapper to do a check
24890 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
24892 * object.c, object-internals.h: Implemented mono_release_type_locks,
24893 which releases the cctor locks held by a thread.
24894 * threads.c, threads.h: In thread_cleanup, release cctor locks held
24895 by a thread. Added mono_thread_exit() method to be used to safely stop
24898 2004-09-28 Raja R Harinath <rharinath@novell.com>
24900 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
24901 Move null check before dereference. Avoid indexing beyond the end
24902 of the 'modules' array.
24904 2004-09-28 Raja R Harinath <rharinath@novell.com>
24906 * metadata-internals.h (MonoImage): Add module_count field.
24907 * image.c (load_modules): Set image->module_count.
24908 (mono_image_load_file_for_image): Use image->module_count.
24909 * reflection.c (mono_image_load_module): Append to image->modules array
24910 of dynamic assembly.
24911 (mono_module_get_object): Fix loop to actually increment index.
24912 Use image->module_count.
24913 * assembly.c (mono_assembly_load_references): Use image->module_count.
24914 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
24917 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
24919 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
24920 Avoid assert on generic types.
24922 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
24924 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
24926 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
24928 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
24929 function to convert a MarshalSpec structure to its managed counterpart.
24931 * reflection.c: Fix warnings.
24933 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
24936 * icall.c (mono_create_icall_signature): Fix build.
24938 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
24940 * icall.c: Add MakePointType icall.
24942 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
24945 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24947 * threadpool.c: reuse allocated slots in the queue.
24949 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
24951 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
24953 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
24955 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
24958 * tabledefs.h: Add constants for pinvoke attributes BestFit and
24959 ThrowOnUnmappableChar.
24961 * icall.c (ves_icall_Type_GetPacking): New icall.
24963 2004-09-24 Martin Baulig <martin@ximian.com>
24965 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
24967 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24970 (mono_domain_set): allow setting a domain that is being unloaded.
24971 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
24974 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
24976 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
24977 the GetCustomAttributes icall.
24979 2004-09-23 Martin Baulig <martin@ximian.com>
24981 * object-internals.h (MonoReflectionGenericParam): Replaced
24982 'has_ctor_constraint', `has_reference_type' and `has_value_type'
24983 with `guint32 attrs'.
24985 2004-09-23 Martin Baulig <martin@ximian.com>
24987 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
24989 2004-09-23 Martin Baulig <martin@ximian.com>
24991 * object-internals.h (GenericParameterAttributes): New enum.
24993 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
24995 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
24997 * class.c (init_events): Fill out event->other field.
24999 * class.c: Fix warnings.
25001 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
25003 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
25005 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
25006 walk which doesn't supply the IL offset.
25008 2004-09-22 Martin Baulig <martin@ximian.com>
25010 * reflection.c (mono_reflection_setup_internal_class): If we're
25011 System.ValueType, System.Object or System.Enum, set
25012 `klass->instance_size' and create the vtable.
25013 (mono_reflection_create_internal_class): If we're an enum type,
25014 get the base class from our current corlib.
25016 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
25018 * reflection.h (MonoResolveTokenError): New type.
25020 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
25023 * icall.c: Add an 'error' argument to the ResolveToken icalls.
25025 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
25027 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
25028 Support also calling constructors, but only for already allocated objects.
25030 2004-09-17 Geoff Norton <gnorton@customerdna.com>
25032 * reflection.c (type_get_qualified_name): If the klass is null
25033 return the typename to avoid a NullRefEx.
25034 (encode_cattr_value): Get the qualified name of the boxed type,
25035 not the underlying enumtype. Fixes #62984.
25037 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
25039 * marshal.c: Fix problems with previous checkin.
25041 2004-09-21 <vargaz@freemail.hu>
25043 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
25044 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
25046 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
25048 2004-09-21 Geoff Norton <gnorton@customerdna.com>
25050 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
25051 should only return a type for pointers, arrays, and passbyref types.
25054 2004-09-21 Martin Baulig <martin@ximian.com>
25056 * domain.c (mono_debugger_check_runtime_version): New public
25059 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
25061 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
25063 * reflection.c: Added missing sort to the declarative security
25064 attributes table. MS implementation stops seeing the attributes if the
25065 token number regress in the table (as shown by ildasm and permview).
25067 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
25069 * object-internals.h (MonoReflectionModule): Add 'token' field.
25071 * reflection.c (mono_reflection_get_token): Add support for Module
25073 (mono_module_get_object): Set 'token' field.
25074 (mono_module_file_get_object): Set 'token' field.
25076 * icall.c: Add new Assembly and Module icalls.
25078 * appdomain.c: Bump corlib version.
25080 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
25082 * loader.h loader.c class.h class.c: Add helper functions for obtaining
25083 tokens of metadata objects.
25085 * reflection.h reflection.c (mono_reflection_get_token): New function
25086 to obtain the token of a metadata object.
25088 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
25090 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
25092 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
25094 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
25096 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
25098 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
25099 * object-internals.h: Added 3 MonoArray* members to MonoReflection
25100 AssemblyBuilder to access the permissions set in the class lib.
25101 * reflection.c: Added security attributes encoding step in
25102 mono_image_build_metadata.
25103 * tabledefs.h: Added new security actions defined in 2.0:
25104 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
25106 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
25108 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
25111 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
25113 * locales.c: nullify the ICU_collator member of CompareInfo when it is
25114 finalized. There where random SIGSEVs at program termination, when
25115 an object being finalized was trying to do a string comparison and
25116 the current culture was already finalized.
25118 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25120 * threads.c: call thread_cleanup before finishing the thread if we get
25123 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
25125 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
25126 assemblies from the parent. Fixes #65665.
25128 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
25130 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
25133 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
25135 * reflection.h: add prototype for mono_get_dbnull_object
25136 * reflection.c: add prototypes for get_default_param_value_blobs
25137 and mono_get_object_from_blob for fussier compilers
25139 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
25141 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
25142 false deadlock checks in class initialization.
25144 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
25146 * image.c (mono_image_addref): Fix comment.
25148 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
25151 2004-09-12 Jambunathan K <kjambunathan@novell.com>
25153 * reflection.c (mono_param_get_objects): Modified to return
25154 ParameterInfo.DefaultValue object.
25156 (get_default_param_value_blobs):
25157 (mono_get_object_from_blob):
25158 (mono_get_dbnull_object): New helper routines.
25160 * object.c (mono_get_constant_value_from_blob): New helper routine
25161 carved out from get_default_field_value ()
25163 * object-internals.h (mono_get_constant_value_from_blob): Added
25164 function declaration.
25166 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
25168 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
25169 referenced assemblies. Fixes #62135.
25171 * exception.h exception.c (mono_get_exception_file_not_found2): New
25174 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
25176 * class.h class.c: Add mono_type_get_underlying_type ().
25178 2004-09-09 Geoff Norton <gnorton@customerndna.com>
25180 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
25181 Fix GetTypes() to support dynamically created assemblies.
25183 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
25185 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
25187 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
25190 * reflection.h reflection.c loader.c: Allow dynamic construction of
25191 pinvoke methods. Fixes #65571.
25193 * reflection.c (mono_reflection_get_type): Revert previous change since
25194 it causes regressions.
25196 2004-09-08 Martin Baulig <martin@ximian.com>
25198 * class.c (class_compute_field_layout): Don't call
25199 mono_class_layout_fields() for open generic instances.
25201 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
25202 * threads.c appdomain.c: fix typo in GC macro
25204 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25206 * threads.c: don't call mono_thread_detach() in start_wrapper(),
25207 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
25209 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
25211 * image.c (mono_image_close): Applied patch from
25212 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
25213 assembly is loaded multiple times from data.
25215 * image.c (mono_image_open): Fix warning.
25217 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
25219 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
25220 once. Fixes #58334.
25222 * reflection.c (mono_reflection_create_runtime_class): Initialize
25223 klass->nested_classes. Fixes #61224.
25225 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
25227 * threads.c: sched_yield() on exit, to allow threads to quit.
25229 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
25231 * object.c (mono_unhandled_exception): Remove leftover debug code.
25233 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
25235 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
25237 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
25239 * marshal.c (emit_marshal_array): Really null terminate string arrays.
25241 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
25243 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
25245 * marshal.c (emit_marshal_array): Null terminate string arrays.
25247 * marshal.c (raise_auto_layout_exception): Fix warning.
25249 * reflection.c (mono_param_get_objects): Initialize the default value
25250 with DBNull.Value, not null. Fixes #62123.
25252 2004-09-01 Miguel de Icaza <miguel@ximian.com>
25254 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
25255 throw an exception with a cute explanation.
25257 2004-09-06 Dick Porter <dick@ximian.com>
25259 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
25260 Close the new process's thread handle, as we don't use it. The
25261 handle stays around forever otherwise.
25263 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
25265 * object.c (arith_overflow): Fix warning.
25267 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
25268 calling conventions in method refs. Fixes #65352.
25270 * reflection.c: Fix warnings.
25272 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
25274 * icall.c: Add a new icall for Array.Clear
25276 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
25278 * object.c: When allocating an array, we have to throw
25279 an overflow exception if any of the lengths are < 0.
25281 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
25283 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
25284 properly. Also move implementation of string array marshalling to
25285 managed code. Fixes #42316.
25287 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25289 * assembly.c: provide more information when loading an assembly fails.
25291 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25293 * filewatcher.c: don't expect the development fam package to be
25296 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
25298 * marshal.c: Make a copy of the signature cookie since it will be
25299 freed by the caller.
25301 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
25303 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
25305 * metadata.c (mono_metadata_free_marshal_spec): New function to free
25308 * marshal.c: More refactoring.
25310 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
25313 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
25315 * object.c: In mono_message_invoke, fill the output parameter array after
25316 calling the managed method (it was done before the call). This fixes
25319 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
25321 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
25324 2004-09-02 Martin Baulig <martin@ximian.com>
25326 * class.c (mono_class_instance_size): Don't allow generic type
25327 definitions or open generic instances.
25328 (mono_class_array_element_size): If we're a value type, call
25329 mono_class_instance_size() on the original class.
25331 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
25332 handle generic instances.
25334 * mono-debug-debugger.c (write_type): Handle generic instances
25337 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
25339 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
25340 the allocation request fails. Fixes #65089.
25342 * object.c (mono_runtime_free_method): Do not call mono_free_method.
25344 * object.c (mono_runtime_free_method): New function to free a dynamic
25347 * marshal.c (mono_delegate_free_ftnptr): New function to free the
25348 delegate trampoline.
25350 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
25351 with hasthis as dynamic,
25353 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
25355 * domain.c (mono_jit_info_table_remove): New function to remove an
25356 entry from the jit info table.
25358 * class-internals.h (MonoMethod): Add 'dynamic' field.
25360 * loader.c: Fix warnings.
25362 2004-09-01 Martin Baulig <martin@ximian.com>
25364 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
25365 instead of mono_debugger_lock() because the latter one is a no-op
25366 unless running in the debugger.
25368 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
25370 * class.c (class_compute_field_layout): Classes with auto-layout or
25371 reference fields are not blittable.
25373 2004-09-01 Dick Porter <dick@ximian.com>
25375 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
25376 mono_image_get_filename() to get the assembly location.
25379 * metadata.h: Fix compile warnings
25381 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
25383 * class.c (class_compute_field_layout): System.Object is blittable.
25385 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
25386 as in/out. Fixes #59909.
25388 2004-09-01 Martin Baulig <martin@ximian.com>
25390 * metadata.h (MONO_TYPE_ISREFERENCE): Call
25391 mono_metadata_generic_inst_is_valuetype() if we're a generic
25392 instance to check whether our underlying type is a reference type.
25394 2004-09-01 Martin Baulig <martin@ximian.com>
25396 * metadata.c (mono_type_size): If we're a generic instance, call
25397 mono_class_value_size() for value types.
25399 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
25401 * marshal.c: Implement more custom marshalling functionality. Fixes
25404 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
25406 * mono-debug.c, debug-mono-symfile.c: add some locking love.
25408 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
25410 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
25412 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
25414 * icall.c: Fix some warnings.
25416 * threads.c (abort_appdomain_thread): Fix unref errors.
25417 (mono_thread_current): Fix THREAD_DEBUG define.
25419 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
25421 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
25423 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
25425 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
25427 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
25430 2004-08-28 Martin Baulig <martin@ximian.com>
25433 (mono_metadata_generic_inst_is_valuetype): New public function.
25435 * metadata.h (MONO_TYPE_ISSTRUCT): Call
25436 mono_metadata_generic_inst_is_valuetype() if we're a generic
25437 instance to check whether our underlying type is a valuetype.
25439 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
25441 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
25444 2004-08-25 Martin Baulig <martin@ximian.com>
25446 * loader.c (mono_get_method_from_token): Abstract methods can also
25447 be generic and thus have type parameters.
25449 * metadata-internals.h
25450 (MonoDynamicImage): Added `GPtrArray *gen_params'.
25452 * reflection.c (mono_image_get_generic_param_info): Don't create a
25453 metadata row, just add an entry to the `gen_params' array.
25454 (build_compressed_metadata): Sort the `gen_params' array and then
25455 actually create the metadata.
25457 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25459 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
25461 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
25463 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
25465 2004-08-24 Martin Baulig <martin@ximian.com>
25467 * class.cs (mono_class_is_subclass_of): Like an interface, a
25468 generic instance also derives from System.Object.
25470 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
25472 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
25473 custom modifiers to be in any order. Fixes #61990.
25475 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
25477 * object.c: Register mono_object_new_fast icall.
25479 * object.c (mono_class_get_allocation_ftn): Return to calling
25480 mono_object_new_fast, since it seems faster to compute the object
25481 size in unmanaged code than passing it as a parameter.
25483 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
25485 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
25486 this function with Boehm as the oom handler, so we don't have to check
25487 the result of GC_malloc.
25489 * object.c: Remove checks for oom.
25491 * object.h object.c (mono_class_get_allocation_ftn): New function to
25492 return the icall which can be used to allocate an instance of a given
25495 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
25497 * class-internals.h: Add 'enabled' field.
25499 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
25501 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
25503 2004-08-18 Jambunathan K <kjambunathan@novell.com>
25504 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
25507 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
25509 * appdomain.c: use the Tls function for appdomain too,
25510 at Zoltan's request. Actually return in mono_context_get
25512 * appdomain.c, profiler.c, threads.c: use __thread
25514 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
25516 * appdomain.c threads.c: Call GC_CreateThread on windows.
25518 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
25519 multiple libraries since this don't work on windows.
25521 2004-08-18 Martin Baulig <martin@ximian.com>
25523 * class-internals.h
25524 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
25527 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
25528 MonoMethodNormal since we also need it for abstract and interface
25532 (build_compressed_metadata): Sort the GenericParam table.
25533 (mono_image_create_token): Added `gboolean create_methodspec'
25534 argument; this is false when generating a MethodImpl token.
25535 (reflection_methodbuilder_to_mono_method): Abstract and interface
25536 methods may also have generic parameters.
25538 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
25540 * appdomain.c: thread local alloc
25542 2004-08-17 Martin Baulig <martin@ximian.com>
25544 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
25547 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
25550 * class.c (mono_type_get_full_name): New public function.
25551 (mono_type_get_name): Don't include the type arguments.
25553 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
25555 * Makefile.am: Build static versions of libmetadata and libmonoruntime
25556 for inclusion into the mono executable.
25558 2004-08-16 Martin Baulig <martin@ximian.com>
25560 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
25561 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
25563 2004-08-14 Martin Baulig <martin@ximian.com>
25565 * class.c (dup_type): Also copy the `byref' field.
25567 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
25569 * reflection.c (create_dynamic_mono_image): Revert the last change
25570 since it breaks bootstrap.
25572 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
25574 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
25576 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
25577 not free them with g_free.
25579 2004-08-11 Martin Baulig <martin@ximian.com>
25581 * reflection.c (mono_reflection_setup_internal_class): Also call
25582 mono_class_setup_mono_type() if we already have a `tb->type.type'.
25584 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
25586 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
25587 called during default (first) AppDomain creation. Keep track of
25588 Evidence when loading assemblies.
25590 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
25592 * opcodes.c, opcodes.h: reduce runtime relocations.
25594 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
25596 * culture-info.h, locales.c: fixes and chages to sue the new
25597 optimized format of the locale data.
25598 * culture-info-tables.h: regenerated.
25600 2004-08-06 Geoff Norton <gnorton@customerdna.com>
25602 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
25604 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
25606 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
25607 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
25608 * domain-internals.h: icall declaration.
25609 * icall.c: icall registration.
25610 * object-internals.h: New fields in MonoAssembly for CAS.
25612 2004-08-05 Duncan Mak <duncan@ximian.com>
25614 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
25617 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
25619 * reflection.c: fix to deal with object[] arrays in custom ctors
25622 2004-08-05 Martin Baulig <martin@ximian.com>
25624 * class.c (mono_class_array_element_size): Added support for
25625 generic instances and correctly handle "recursive" types.
25627 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
25629 * assembly.c: Fix warnings.
25631 2004-08-04 Martin Baulig <martin@ximian.com>
25634 (mono_type_get_name_recurse): Added `gboolean include_arity'
25635 argument specifying whether or not we should include the generic
25636 arity in the type name.
25637 (_mono_type_get_name): New static function.
25638 (mono_class_setup_vtable): If we're a generic instance, don't
25639 include the generic arity in the names of explicit method
25642 2004-08-03 Martin Baulig <martin@ximian.com>
25644 * class.c (mono_type_get_name_recurse): Enclose the generic type
25645 arguments in `<', '>'.
25647 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
25649 * gc.c: make GC warning messages use the trace API, they are just
25650 noise to most of the users.
25652 2004-08-03 Martin Baulig <martin@ximian.com>
25654 * debug-mono-symfile.c (read_string): Correctly read the string.
25656 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
25658 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
25660 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
25662 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
25664 2004-07-30 Martin Baulig <martin@ximian.com>
25666 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
25667 Reflect latest symbol writer changes.
25669 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
25671 * object.c: always create an object if null is passed
25672 to Invoke() where a valuetype is expected.
25674 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
25676 * marshal.c (mono_marshal_init): make managed
25677 signatures match native ones better for 64bits.
25679 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25681 * appdomain.c: hack to build correctly the private bin path on windows.
25684 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
25686 * assembly.c: Load mscorlib from the correct framework directory
25687 (mono/<version>/mscorlib.dll).
25688 * appdomain.h: Added prototypes for new functions.
25689 * internals.h: Added some prototypes.
25690 * domain.c: When initializing the runtime, get from the executable and
25691 the configuration files the runtime version that the app supports.
25692 Added support methods for reading app.exe.config. Added list of versions
25693 supported by the JIT. Added two new methods: mono_init_from_assembly,
25694 which initializes the runtime and determines the required version from
25695 the provided exe file, and mono_init_version, which initializes
25696 the runtime using the provided version.
25697 * icall.c: Get machine.config from version-specific directory.
25698 * reflection.c: When generating an image, embed the version number
25699 of the current runtime.
25701 2004-07-28 Dick Porter <dick@ximian.com>
25704 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
25705 returned sockaddr size before creating the remote address object.
25706 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
25709 2004-07-28 Dick Porter <dick@ximian.com>
25711 * locales.c (string_invariant_compare_char): Fix invariant char
25712 compares between upper and lower cases. Fixes bug 61458.
25714 2004-07-27 Ben Maurer <bmaurer@ximain.com>
25716 * marshal.c: actually cache stelem.ref wrappers.
25718 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
25720 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
25721 sections and remove the mono_cli_rva_map () function.
25723 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
25725 * debug-mono-symfile.c: fix one more endianess issue, from a patch
25726 by Geoff Norton (<gnorton@customerdna.com>).
25728 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
25730 * class.c: fix class loads for pointer types (typeof(int) !=
25733 2004-07-27 Martin Baulig <martin@ximian.com>
25735 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
25736 reading the debugging information from an external ".mdb" file.
25738 2004-07-24 Martin Baulig <martin@ximian.com>
25740 * reflection.c (mono_image_get_type_info): Only write a class
25741 layout entry if we actually have a size or a packing size.
25743 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
25745 * reflection.c (type_get_fully_qualified_name):
25746 insert cast to get type checking of ?: with non-gcc compilers
25748 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
25750 * rand.c: use g_getenv for both lookups of
25753 2004-07-17 Martin Baulig <martin@ximian.com>
25755 * reflection.c (mono_reflection_bind_generic_method_parameters):
25756 Set `gmethod->reflection_info'.
25758 2004-07-17 Martin Baulig <martin@ximian.com>
25760 * class.c (mono_class_create_from_typedef): Insert the newly
25761 created class into the hash table before computing the interfaces
25762 since we could be called recursively.
25764 2004-07-16 Ben Maurer <bmaurer@ximain.com>
25766 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
25767 function to implement stelem.ref in managed code
25768 * class-internals.h, debug-helpers.c: a new wrapper type
25771 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
25773 * gc.c: allow GC handles to work even when no GC is compiled in.
25774 Fix part of bug #61134 (GetAddrOfPinnedObject).
25776 2004-07-13 Peter Williams <peter@newton.cx>
25778 * process.c (complete_path): Make sure we don't attempt to execute
25781 2004-07-12 Geoff Norton <gnorton@customerdna.com>
25783 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
25784 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
25785 and will add/subtract the hour if needed
25787 2004-07-12 Martin Baulig <martin@ximian.com>
25789 * reflection.c (mono_field_get_object): If we have
25790 `field->generic_info', take the attributes from
25791 `field->generic_info->generic_type'.
25793 2004-07-12 Martin Baulig <martin@ximian.com>
25795 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
25796 This function must be called before initializing the runtime.
25797 (mono_debug_init_1): New function; call this after initializing
25798 the runtime, but before loading the assembly. It tells the
25799 debugger to load corlib and the builtin types.
25801 * mono-debug-debugger.c: Did some larger changes in the debugging
25802 code; support recursive class declarations, make sure we actually
25805 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25807 * debug-helpers.c: undo my previous patch and fixed the real issue in
25808 ../mini/exceptions-x86.c
25810 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25812 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
25813 when no HOME env. variable was set and a NullRef was thrown in a .cctor
25814 called from other .cctors.
25816 2004-07-09 Miguel de Icaza <miguel@ximian.com>
25818 * loader.c: Removed the mono_loader_wine_init hack now that we are
25819 doing a managed version of Windows.Forms.
25821 2004-07-09 Ben Maurer <bmaurer@ximian.com>
25823 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
25824 threadpool.c, threads.c: remove static data from rootset.
25826 2004-07-09 Dick Porter <dick@ximian.com>
25828 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
25829 Don't do any more processing if the matched length was 0. It was
25830 increasing the size of the string before. Fixes bug 61167.
25832 2004-07-09 Dick Porter <dick@ximian.com>
25836 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
25837 Add support for SO_PEERCRED if its available.
25839 2004-07-09 Peter Bartok <pbartok@novell.com>
25840 * loader.c: winelib.exe.so error message is now only displayed if
25841 MONO_DEBUG is set. To help us avoid questions when people are trying
25842 out the new Managed.Windows.Forms.
25844 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
25846 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
25847 for isinst and castclass wrappers.
25849 * class-internals.h icall.c: Move registration and lookup of JIT icalls
25850 to libmetadata from the JIT, so they could be used by the marshalling
25851 code and the interpreter.
25853 * marshal.c: Register marshalling related JIT icalls here instead of
25854 in mini.c. Use CEE_MONO_ICALL instead of the family of
25855 CEE_MONO_PROC<x> opcodes to call marshalling functions.
25857 * metadata.h: Remove unneeded marshalling conversions.
25859 * opcodes.c: Update for new opcodes.
25861 2004-07-08 Martin Baulig <martin@ximian.com>
25863 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
25864 (mono_debug_get_domain_data): Make this function static.
25866 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
25868 * gc.c, object.h: add nice GC handle API for embedders.
25870 2004-07-06 Ben Maurer <bmaurer@ximian.com>
25872 * reflection.c: more changes for the new api
25874 * object.c: When we reflect on a field w/ a constant value, it
25875 will not have a memory location, so we must access metadata. Also,
25876 allow easier reading of strings so that we can read them from
25879 * class.c (mono_class_layout_fields): no need for literal fields here.
25881 * class-internals.h: api changes for const fields
25883 * icall.c (ves_icall_get_enum_info): use new apis for const fields
25885 2004-07-06 Martin Baulig <martin@ximian.com>
25887 * mono-debug.h: Increment version number to 44.
25889 * mono-debug.c (mono_debug_add_wrapper): The second argument is
25890 now a gpointer, rewrote this whole method.
25892 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
25893 function. Add information about the wrapper in a new "misc table".
25895 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
25896 for the new misc table.
25898 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
25900 * metadata-internals.h image.c: Add a cache for helper signatures.
25902 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
25904 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
25906 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
25907 delegates from a delegate. Fixes #61033.
25909 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
25910 marshalling of stringbuilder arrays. Fixes #59900.
25912 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
25914 * icall.c: Add EnumBuilder:setup_enum_type icall.
25916 2004-06-30 Ben Maurer <bmaurer@ximian.com>
25918 * icall.c: Added a new icall for the property version of
25919 OffsetOfStringData.
25921 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
25923 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
25924 it has a constant size across platforms.
25926 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
25929 2004-06-29 Martin Baulig <martin@ximian.com>
25931 * mono-debug.c (mono_debug_add_method): Protect the whole function
25932 in mono_debugger_lock(), not just parts of it.
25934 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
25936 * reflection.c: make sure padding bytes in heaps are zeroed.
25938 2004-06-24 David Waite <mass@akuma.org>
25940 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
25941 image.c, loader.c, locales.c, marshal.c, metadata.c,
25942 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
25943 string-icalls.c, threads.c: change to C90-style comments from C99 /
25946 2004-06-24 Dick Porter <dick@ximian.com>
25949 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
25950 return createdNew. Fixes bug 60412.
25953 * icall.c: Add createdNew parameter to CreateMutex icall
25955 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
25957 * reflection.c, object-internals.h: save default value in params.
25959 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25961 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
25962 no need to build a new path combining that with the application base.
25965 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
25967 * reflection.c: fixed minor standard compliance issues.
25969 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
25971 * reflection.c: fixed issue with encoding some custom attributes
25972 (arrays in properties and fields, bug #60411).
25974 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25976 * reflection.c: fix start address when copying the public key token.
25978 2004-06-23 Martin Baulig <martin@ximian.com>
25980 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
25981 the `exc' object in a static object to put it into the GC's root set.
25983 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
25985 * reflection.c: make mono_reflection_setup_internal_class ()
25986 callable a second time to setup a new parent class.
25988 2004-06-23 Dick Porter <dick@ximian.com>
25990 * threads.c: Check for WAIT_IO_COMPLETION return values.
25992 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
25994 * appdomain.c: Removed the g_free on the public key token. Now copy
25995 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
25996 * assembly.c: Added public key token string value when loading
25997 assemblies. Fix bug #60439.
25998 * icall.c: Added missing informations (like public key) in
25999 GetReferencedAssemblies. Fix #60519.
26000 * image.h: Changed definition for public key token from const char*
26001 public_tok_value to guchar public_key_token [17];
26002 * reflection.c: Updated for changes to public key token.
26004 2004-06-22 Lluis Sanchez Gual
26006 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
26007 for the field in base classes.
26009 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
26011 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
26012 mark headers as not supported, they are installed only for use by the
26015 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
26017 * *.c, *.h: avoid namespace pollution in public headers.
26019 2004-06-21 Martin Baulig <martin@ximian.com>
26021 * exception.c (mono_get_exception_security): It's in
26022 "System.Security", not in "System".
26024 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
26025 the exception classes.
26027 2004-06-21 Martin Baulig <martin@ximian.com>
26029 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
26030 Protect the exception object from being finalized.
26032 2004-06-21 Martin Baulig <martin@ximian.com>
26034 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
26037 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
26039 * reflection.c: Load the assembly in mono_reflection_type_from_name,
26040 if it was not loaded before. Fix parts of #60439.
26042 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
26044 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
26045 code that was broken since Ben's change: wrappers are now
26046 dependent on the method signature only again.
26048 2004-06-21 Martin Baulig <martin@ximian.com>
26050 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
26051 added interface support.
26053 2004-06-21 Martin Baulig <martin@ximian.com>
26055 * class.c (mono_vtable_get_static_field_data): New public method.
26057 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
26059 * filewatcher.c : Windows build fix to be compliant with API changes.
26061 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
26063 * class.h, class.c: more accessors.
26064 * metadata.h, metadata.c: prepare for hiding MonoType and
26065 MonoMethodSignature: people should use the accessors from now on
26066 outside of the tree.
26068 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
26070 * *.c, *.h: more API cleanups.
26072 2004-06-18 Jackson Harper <jackson@ximian.com>
26074 * assembly.c: Trace loading assemblies.
26075 * loader.c: Trace loading native libraries.
26076 * mono-config.c: Trace loading config files.
26078 2004-06-18 Dick Porter <dick@ximian.com>
26080 * locales.c: Tell ICU the lengths of strings, it can cope with
26081 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
26083 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
26085 * image.c: swapped name/filename;
26087 2004-06-18 Martin Baulig <martin@ximian.com>
26089 * mono-debug-debugger.c (write_class): Write the parent class at
26090 the end of the header.
26092 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
26094 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
26096 2004-06-17 Raja R Harinath <rharinath@novell.com>
26098 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
26099 (bundle_obj): New conditional define.
26100 (BUILT_SOURCES): Remove.
26101 ($(bundle_srcs)): Make parallel-make safe.
26102 (libmonoruntime_la_LIBADD): Make unconditional.
26103 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
26104 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
26106 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
26108 * culture-info-tables.h: It was inconsistent with the latest
26111 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
26113 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
26116 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
26119 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
26121 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
26122 cleaned up public header threads.h.
26124 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
26126 * Makefile.am, *.c, *.h: more API cleanups.
26128 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
26130 * Makefile.am: removed monosn from compilation.
26131 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
26132 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
26133 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
26134 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
26135 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
26136 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
26138 2004-06-15 Jackson Harper <jackson@ximian.com>
26140 * assembly.c: Make locales lower case when searching the GAC for
26141 assemblies. gacutil will always make locales lowercase when
26142 installing so this effectively makes them case insensitive.
26144 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
26146 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
26147 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
26148 parameter which allows to choose whether the wait can be interrupted or
26149 not. Also added the method mono_monitor_enter(), which locks the monitor
26150 using an infinite wait and without allowing interruption.
26151 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
26153 * object.h: Added new fields in MonoThread. suspend_event holds the event
26154 used to susped/resume the thread. synch_lock is the lock object to use for
26155 modifying the thread state.
26156 * threads.c: Use the new synch_lock object for locking, instead of "this",
26157 which can generate deadlocks.
26158 Moved thread state change in Thread.Sleep and Thread.Join from managed
26159 to unmanaged code. This avoids a deadlock when the thread was suspended
26160 just after acquiring the thread lock.
26161 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
26162 Implemented Thread.Suspend using an event instead of ThreadSuspend,
26163 which is not fully implemented in the io-layer.
26164 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
26166 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
26168 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
26169 threads-types.h: more API cleanups.
26171 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
26173 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
26174 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
26175 threadpool.c, threads.c: first pass at the exported API cleanup.
26177 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
26179 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
26181 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26183 * icall.c: added internalGetHome.
26185 2004-06-14 Dick Porter <dick@ximian.com>
26187 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
26188 possible to return successfully when '.' or '..' were the only
26189 entries in a directory, but were skipped. The MonoIOStat was not
26190 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
26193 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
26195 * reflection.c: make binaries run on .Net 1.1 by default.
26197 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
26199 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
26201 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
26203 * marshal.c: keep track of struct size with explicit layout
26206 2004-06-12 Martin Baulig <martin@ximian.com>
26208 * mono-debug-debugger.c: Comment out a debugging g_message().
26210 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
26212 * reflection.c, reflection.h: do not free custom attrs that are cached.
26213 * icall.c: use braces to make code clearer.
26215 2004-06-11 Martin Baulig <martin@ximian.com>
26217 * class.h (MonoInflatedField): New type.
26218 (MonoClassField): Replaced `MonoType *generic_type' with
26219 `MonoInflatedField *generic_info'.
26222 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
26224 2004-06-11 Martin Baulig <martin@ximian.com>
26226 * reflection.c (mono_image_create_method_token): Correctly encode
26229 2004-06-11 Martin Baulig <martin@ximian.com>
26231 * metadata.c (mono_metadata_parse_method_signature): When parsing
26232 a MethodDef which has VarArgs, also set sentinelpos if we don't
26233 have any parameters.
26235 2004-06-11 Martin Baulig <martin@ximian.com>
26237 * verify.c (mono_method_verify): In CEE_CALL, use
26238 mono_method_get_signature() to get the method's signature, unless
26239 we're a PInvoke method.
26241 2004-06-10 Jackson Harper <jackson@ximian.com>
26243 * assembly.c: Use <path>/lib/mono/gac for the extra paths
26244 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
26245 logical name as the supplied path is just a prefix to the gac not
26246 the direct path to it.
26248 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
26250 * reflection.c: make the token for a created method match
26251 the token of the MethodBuilder it was created from
26252 (IKVM requires this behaviour now).
26254 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
26256 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
26257 reflection.c, socket-io.c: leak fixes.
26259 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
26261 * icall.c: handle sentinel pos in vararg methods in position different
26264 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26266 * culture-info-tables.h: freshly generated.
26268 2004-06-09 Martin Baulig <martin@ximian.com>
26270 * loader.c (mono_get_method_constrained): Call `mono_class_init
26271 (constrained_class)'.
26273 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
26275 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
26276 any methods. Fixes #59629.
26278 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
26280 * culture-info-tables.h: reflecting locale-builder updates.
26282 2004-06-08 Dick Porter <dick@ximian.com>
26285 * locales.c: Fixed compile warnings, including a real bug in
26286 CompareInfo_internal_compare.
26288 2004-06-08 Dick Porter <dick@ximian.com>
26291 (ves_icall_System_Globalization_CompareInfo_internal_index):
26292 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
26293 Double-check the resuls of usearches, because ICU currently
26294 ignores most of the collator settings here. Fixes bug 59720.
26296 2004-06-08 Dick Porter <dick@ximian.com>
26299 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
26300 Fix memory leak and segfault-causing typo. No idea how this one
26301 lasted so long without being noticed.
26303 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
26305 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
26306 any methods. Fixes #59629.
26308 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26311 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
26312 own the critical section before). Removed dead code (that's done
26313 in the preload hook).
26315 (mono_assembly_load_with_partial_name): call the preload hook.
26317 2004-06-08 Martin Baulig <martin@ximian.com>
26319 * metadata.c (mono_metadata_signature_alloc): Default
26320 `sentinelpos' to -1.
26322 * reflection.c (mono_image_get_array_token): Likewise.
26324 2004-06-08 Martin Baulig <martin@ximian.com>
26326 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
26328 * metadata.c (mono_metadata_parse_method_signature): When parsing
26329 a MethodDef which has VarArgs, set sentinelpos.
26331 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
26332 `gint16' since we're using -1 for non-varargs methods.
26335 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
26336 (method_encode_signature): Added varargs support.
26337 (method_builder_encode_signature): Likewise.
26338 (mono_image_get_varargs_method_token): New static method.
26339 (mono_image_create_method_token): New public method; this is
26340 called via an icall instead of mono_image_create_token() when
26341 calling a varargs method.
26343 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
26345 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
26347 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
26349 * culture-info-tables.h : Reflecting the latest locale-builder that
26350 fixed empty array representation ({} to {0}).
26352 2004-06-07 Jackson Harper <jackson@ximian.com>
26354 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
26355 looking up extra gac paths. This allows MONO_GAC_PATH to act
26356 exactly like a prefix.
26358 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
26360 * reflection.c (mono_reflection_type_from_name): Make a copy of the
26361 type name before modifying it. Fixes #59405.
26363 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
26365 * culture-info.h: added fields for "all datetime patterns".
26366 * locales.c: ( ves_icall_System_Globalization_CultureInfo
26367 _construct_datetime_format ()): fill xxx_patterns fields.
26368 * object.h: added fields for "all datetime patterns" to
26369 MonoDateTimeFormatInfo.
26370 * culture-info-tables.h: reflecting locale-builder updates.
26372 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
26374 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
26375 the event has no add and remove methods. Fixes #59629.
26377 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
26379 * object.c: Fixed possible integer overflow when allocating large
26382 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
26384 * culture-info-tables.h: reflecting locale-builder updates.
26386 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
26388 * culture-info-tables.h: reflecting locale-builder updates.
26390 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
26392 * culture-info-tables.h: reflecting locale-builder updates.
26394 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
26396 * threads.c: Made Thread.Sleep abortable.
26398 2004-06-02 Martin Baulig <martin@ximian.com>
26400 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
26402 * debug-mono-symfile.h: Bumped symbol file version number to 37.
26404 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
26406 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
26408 2004-05-30 Jackson Harper <jackson@ximian.com>
26410 * reflection.c: Do not hardcode assembly versions or public key
26411 tokens anymore. All of this except the corlib section was dead
26414 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
26416 * object.c (mono_runtime_invoke_array): Automatically create boxed
26417 objects for byref valuetypes if needed. Fixes #59300.
26419 * object.c (mono_method_return_message_restore): Handle
26420 MONO_TYPE_OBJECT as well.
26422 2004-05-28 Jackson Harper <jackson@ximian.com>
26424 * reflection.c: The modified type encoding was causing build
26425 problems. Reverted for now.
26427 2004-05-28 Jackson Harper <jackson@ximian.com>
26429 * reflection.c/h: Take an assembly ref so that we dont create
26430 fully qualified names when encoding types in the same assembly as
26431 the custom attribute being emitted.
26432 * appdomain.c: Increment version number.
26434 2004-05-26 Duncan Mak <duncan@ximian.com>
26437 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
26438 Set the full version number (major, minor, build, revision).
26440 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
26442 * marshal.c (emit_struct_conv): increment src/dst after blit
26443 (mono_marshal_get_managed_wrapper,
26444 mono_marshal_get_native_wrapper): make sure we have marshalling
26445 info before marshalling params (info computation affects
26448 * class.c (class_compute_field_layout): correctly deal with
26450 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
26451 value types (as per what windows dows by default)
26452 (mono_class_setup_mono_type): System.ValueType is blittable
26453 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
26456 * marshal.c (mono_marshal_load_type_info): flag types as
26457 non-blittable if the native layout doesn't match the managed
26460 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26462 * appdomain.c: don't add stuff in the private search path that is
26463 above the application base. If application base is not set, there's
26464 no private search path.
26466 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
26468 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
26469 byref struct arguments in native->managed marshalling.
26471 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
26473 * marshal.c (mono_marshal_get_runtime_invoke): correctly
26474 cache methods using signature (special case for methods
26475 that are value type or string class)
26477 * image.c (mono_image_close): clean up allocated GSList's
26478 in runtime_invoke_cache.
26480 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26482 * mono-config.c: set the correct path for mono_cfg_dir on windows when
26483 there's no MONO_CFG_DIR environment variable defined.
26485 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26487 * threads.c: windows version must be >= 0x0500 to include OpenThread.
26489 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
26491 * threadpool.c: Really wait for 500ms after the async call, even if the wait
26493 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
26494 before waiting for it, and call CloseHandle after the wait to unref it.
26495 This will make sure that handles are not disposed too early.
26497 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26502 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
26505 * object.c: se the application_base only for the domain that runs
26506 Main. Fixes bug #59216,
26508 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26511 * object.c: only the domain in which Main is run have
26512 SetupInformation.ConfigurationFile set, so moved a few lines from
26513 appdomain.c to object.c.
26515 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26517 * appdomain.c: we tried to load [name].(dll|exe), but according
26518 to bug #57710, we must also try [culture]/[name].(dll|exe) and
26519 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
26520 There's a test case attached to bug #58922.
26522 2004-05-27 Dick Porter <dick@ximian.com>
26525 * file-io.c: Implemented icalls for locking and unlocking regions
26527 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
26528 FALSE on error (fixes both compiler warning and real bug.)
26530 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
26532 * culture-info-tables.h: reflecting locale-builder updates.
26534 (Added missing ChangeLog entry for 05/26)
26536 2004-05-27 Jackson Harper <jackson@ximian.com>
26538 * locales.c: Fix some cut and paste errors.
26540 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26542 * mono-config.c: set the correct path for config. directory on windows.
26544 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
26546 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
26549 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
26551 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
26552 from pinvoke functions.
26554 * marshal.c (mono_ftnptr_to_delegate): Implement this.
26556 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
26558 * culture-info-tables.h: reflecting locale-builder updates.
26560 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
26562 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
26565 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
26567 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
26568 * icall.c: Modified icalls for RNG.
26569 * rand.c|h: Changed RNG interface to allow thread-safe usage under
26570 Windows (CryptoAPI).
26572 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
26574 * locales.c: Fix build.
26576 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
26578 * culture-info-tables.h: reflecting locale-builder updates.
26580 2004-05-25 Jackson Harper <jackson@ximian.com>
26582 * locales.c: When creating the current culture use the $LANGs
26583 specific culture. So DateTimeFormat and NumberFormat entries are created.
26585 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
26587 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
26588 a char array as parameter.
26590 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
26592 * image.c: In mono_image_open(), always use an absolute path name to
26593 look for already loaded images.
26595 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
26597 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
26598 missing in the windows build (like older cygwin include files).
26600 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
26602 * icall.c: Fixed check for possible integer overflow in Buffer_
26603 BlockCopy icall. Replaced comments style // by /* */.
26605 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
26607 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
26609 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
26610 check after MONO_VTADDR. Fixes pinvoke2.exe.
26612 * marshal.h marshal.c metadata.h: Add beginnings of support for
26613 ftnptr -> delegate marshalling.
26615 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
26617 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
26618 * threads.c: Fix warnings.
26620 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
26622 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
26623 * icall.c: Registered icalls for Suspend and Resume.
26624 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
26626 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
26627 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
26628 * process.c: Use WaitForSingleObjectEx.
26629 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
26631 * threads.c, threads.h: Make use of new Ex wait methods. Improved
26632 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
26633 for Suspend and Resume. Added new mono_thread_stop, used for stoping
26634 background threads. Added basic support for Abort in Windows.
26635 Start new threads using a managed delegate invoke wrapper. This wrapper
26636 has an interruption checkpoint that is needed since an interruption
26637 can be requested before the thread leaves the unmanaged code that starts
26639 * marshal.c: Added interruption checkpoint after every native call, and
26640 also before managed calls for wrappers called from unmanaged code to
26641 go into managed code.
26642 * object.h: Added new field in MonoThread to keep track of interruption
26645 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
26647 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
26650 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26657 * rand.c: getenv -> g_getenv (windows!)
26659 * process.c: complete_path is also used on non-windows platforms.
26661 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26663 * icall.c: new signature for Process_Start.
26665 * process.[ch]: new signature for Process_Start. If we're on windows
26666 and UseShellExecute is false, we have to search for the program by
26667 ourselves if we don't get a full path.
26669 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
26671 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
26672 marshalling and call CleanUpNativeData if needed. Fixes #58646.
26674 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26676 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
26679 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26681 * process.c: use double quotes to quote program name and arguments on
26682 windows. Fixes bug #58575.
26684 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26686 * file-io.c: don't return "." and ".." when using windows Find*File.
26688 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
26690 * marshal.c: Don't pass wrappers to message init because method
26691 addressed used to lookup metadata. part of remoting[2|3] fix.
26693 2004-05-15 Jackson Harper <jackson@ximian.com>
26695 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
26696 path is essentially the same as MONO_PATH except that it points to
26697 GACs instead of lib directories.
26698 * loader.h: The user gac is gone so we dont need function to
26700 * mono-config.c: user gac option is now gone.
26702 2004-05-15 Jackson Harper <jackson@ximian.com>
26704 * culture-info.h: Make defines more consistent, add calendar data
26705 to the culture info table.
26706 * culture-info-tables.h: Add basic calendar data. Basically
26707 everyone gets default gregorian until all the data is
26709 * locales.c: Use the new consistent defines. Set calendar data for
26710 culture info objects.
26711 * object.h: add a field for calendar data to CultureInfo
26713 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
26715 * image.c: image->runtime_invoke_cache is keyed on signatures now.
26716 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
26718 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
26719 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
26720 an extra param that is the pointer of the method to invoke. The IL for
26721 the invoke method is no longer specific to the method, but to the
26722 signature of the method. Thus, we can share the same code for multiple
26723 methods. This reduces the number of methods that have to be compiled.
26725 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
26727 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
26729 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
26731 * icall.c: Optimize Buffer.BlockCopy.
26733 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26735 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
26736 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
26737 quote). Changed them to "MMMM yyyy".
26739 2004-05-12 Miguel de Icaza <miguel@ximian.com>
26742 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
26744 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
26746 * reflection.h: Updated after changes to managed structures.
26748 * appdomain.c: Bump corlib version.
26750 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26752 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
26755 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26757 * Makefile.am: link to ../os/libmonoos.la on windows.
26760 -If MONO_DEBUG, warn about non-existing directories in
26762 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
26763 compile time variable.
26764 -Removed init_default_path and call mono_set_rootdir from
26765 libmonoos.a instead (windows only).
26767 * assembly.h: declare mono_assembly_getrootdir().
26770 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
26772 * loader.c: s/getenv/g_getenv/
26774 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
26776 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
26778 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
26780 * metadata.h: Add new marshalling conversions.
26782 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
26785 * reflection.c (mono_reflection_get_type): Lookup the type in all
26786 modules of a multi-module assembly. Fixes #58291.
26788 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
26790 * threads.c: Before aborting a background, set the StopRequested
26791 state. This avoids throwing the Abort exception.
26792 In mono_thread_manage, don't continue with the shutdown until all
26793 aborted threads have actually stopped.
26795 2004-05-10 Jackson Harper <jackson@ximian.com>
26797 * locales.c: Remove the modifier from culture names.
26799 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26801 * Makefile.am: monosn is not installed any more. It has been deprecated
26804 2004-05-07 Jackson Harper <jackson@ximian.com>
26807 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
26808 Fix array construction, add bailout if the length is 0.
26810 2004-05-07 Dick Porter <dick@ximian.com>
26812 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
26813 machine doesn't have a DNS entry. Patch by Urs Muff
26814 (umuff@quark.com), fixes bug 57928.
26816 2004-05-06 Jackson Harper <jackson@ximian.com>
26818 * reflection.c: Handle null PublicTokens properly. alloc mem for
26819 assembly names culture so we dont crash when freeing it.
26821 2004-05-06 Jackson Harper <jackson@ximian.com>
26823 * assembly.c: Check the usergac when loading with partial names.
26825 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
26827 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
26828 does nothing for now (not required for Linux/Windows) but the class
26829 library can call it (and a newer or modified runtime could need it).
26830 * icall.c: Registred icall.
26832 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26834 * loader.c: prints a message on module loading error we set MONO_DEBUG
26835 environment variable.
26837 2004-05-05 Jackson Harper <jackson@ximian.com>
26839 * appdomain.c: Handle PublicKeyToken=null properly.
26841 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
26843 * environment.c|h: Added icall ves_icall_System_Environment_
26844 GetOSVersionString to get the current OS version as a string.
26845 * icall.c: Registred icall.
26847 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
26849 * object.c: in mono_object_get_virtual_method(), take into account that
26850 non-virtual methods don't have a slot in the vtable. Check needed when
26851 the object is a proxy.
26853 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
26855 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
26856 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
26858 * object.c (mono_class_compute_gc_descriptor): Fix warning.
26860 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
26861 passed when a valuetype is expected.
26863 * object.c (mono_unhandled_exception): Only set the exit code if the
26864 exception happens in the main thread. Fixes thread5.exe.
26866 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
26867 invalid names. Fixes #58047.
26869 2004-05-03 Jackson Harper <jackson@ximian.com>
26871 * assembly.c: This line was committed accidently and is unneeded.
26873 2004-05-03 Jackson Harper <jackson@ximian.com>
26875 * icall.c: Add new icall for Assembly::LoadWithPartialName
26876 * assembly.c/.h: new function that probes the GAC to load partial
26877 assembly names by Paolo Molaro.
26879 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26881 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
26882 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
26883 (type_get_fully_qualified_name): Added PublicKeyToken when building a
26886 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26888 * appdomain.c: fixed check for 'neutral' culture and removed warning.
26889 * reflection.c: fix bug when parsing a full type name and Version is not
26890 the last thing in the string.
26892 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
26894 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
26895 crashes when it is freed.
26897 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26899 * assembly.c: print the compat warning to stderr.
26901 2004-05-01 Miguel de Icaza <miguel@ximian.com>
26903 * assembly.c (mono_assembly_load_references): Add a compatibility
26904 hack to run old applications that might be still referencing the
26905 3300-based assemblies, only do this for System.xxx.
26907 2004-05-01 Jackson Harper <jackson@ximian.com>
26909 * appdomain.c: If the culture is neutral we set it to "".
26911 2004-04-29 Jackson Harper <jackson@ximian.com>
26913 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
26915 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
26917 * string-icalls.c: added low overhead function for copying chars
26918 * icall.c: added needed icall for the above function
26920 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26922 * icall.c: fix return value of get_global_assembly_cache. Implemented
26923 Environment.GetLogicalDrives.
26925 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
26927 * rand.c: try and talk to egd or prngd
26928 for random bytes if opening devices fail.
26930 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
26932 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
26933 alignment for the type using the native alignment of its members
26934 instead of using klass->min_align.
26936 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
26938 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26941 * socket-io.c: added check for sys/aio.h.
26943 2004-04-28 Dick Porter <dick@ximian.com>
26945 * threads.c: Don't abort a thread thats already aborting, when
26946 terminating everything.
26948 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26950 * icall.c: added 2 new async calls for Socket.
26952 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
26953 IO on *nix systems.
26955 * threadpool.c: removed unused variable.
26957 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
26959 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
26961 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
26963 * locales.c: put back string_invariant_tolower () and
26964 string_invariant_toupper ().
26966 2004-04-26 David Waite <mass@akuma.org>
26971 * unicode.h: remove comma from end of enumeration declarations
26973 2004-04-26 David Waite <mass@akuma.org>
26975 * debug-mono-symfile.h:
26978 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
26981 2004-04-26 Jackson Harper <jackson@ximian.com>
26983 * appdomain.c: Increment version number.
26985 2004-04-26 Jackson Harper <jackson@ximian.com>
26987 * appdomain.c: Set assembly references public token value when
26988 PublicKeyToken is specified, not the hash_value. Free public token
26989 values when free assembly name data. Previously the public key
26990 token was hex decoded, however we are using hex encoded public key
26991 tokens, so this is not neccasary.
26992 * assembly.c: Lookup assemblies in the gac if their public token
26993 value is set. Add function to allow enabling user gac
26994 lookups. Specify whether or not the assembly was loaded from the
26995 GAC. Compare full assembly names when checking the cache for
26996 assemblies (Temporarily disabled see comment in code). Remove
26997 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
26998 specifies trace-loader they get extra info to stdout on the
26999 loading of assemblies.
27000 * image.h: Add a field for an assembly references public token
27001 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
27002 whether an assembly has been loaded from the GAC.
27003 * image.c: Remove a corlib -> mscorlib name mapping.
27004 * loader.h: Add function to enable/disable the user gac.
27005 * mono-config.c: Check if the usergac is enabled in the config
27007 * icall.c: New icall to determine whether or not an assembly has
27008 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
27009 * tabldefs.h: Add constant for assemblyref flag that specifies a
27010 full public key is used instead of a public token.
27011 * reflection.c: Remove mscorlib -> corlib mappings. Set
27012 PublicTokenValue instead of hash value. This value is a hex
27013 string so it does not need to be expanded.
27015 2004-04-26 Martin Baulig <martin@ximian.com>
27017 * mono-debug-debugger.c (mono_debugger_initialize): Set
27018 `mono_debugger_initialized' before calling mono_debug_lock().
27020 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
27022 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
27023 InternalToUpper/InternalToLower.
27024 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
27025 removed invariant culture shortcut. This is now done in managed code.
27026 * locales.c: (string_invariant_toupper/tolower) removed.
27028 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27030 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
27031 Added Poll internal call.
27033 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
27034 call for Poll. Select was too heavy for polling a single socket.
27036 * threadpool.[ch]: added mono_threadpool_cleanup.
27037 * threads.c: use it. Don't use Thread_Abort on windows.
27039 2004-04-23 Martin Baulig <martin@ximian.com>
27041 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
27043 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
27045 * icall.c: Registred new icalls for key pair protection and added an
27046 icall for Environment.GetFolderPath on Windows.
27047 * security.c|h: Added new icalls for key pair protection.
27049 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27051 * socket-io.c: don't display the non-supported family warning for known
27052 families. Now this is not displayed on windows when checking support
27055 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27057 * class.c: don't display the layout warning for static fields.
27059 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
27061 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
27062 * locales.c, locales.h: Added new icalls for culture-specific
27063 Char.ToLower and Char.ToUpper.
27065 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27067 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
27070 2004-04-20 Martin Baulig <martin@ximian.com>
27072 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
27073 of the type name before passing it to mono_reflection_type_from_name().
27075 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
27077 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
27078 encodings here. Fixes #56965.
27080 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
27082 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
27083 fix test on strstr result not that I can see anything that
27084 relies on the result.
27086 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
27088 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
27091 * marshal.c (mono_marshal_get_string_encoding): New helper function.
27093 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
27094 function to determine which marshalling to use for strings. Fixes
27097 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
27099 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
27101 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
27103 * icall.c: #include mono-config.h
27105 2004-04-15 Jackson Harper <jackson@ximian.com>
27107 * culture-info-tables.h: Fix date formats for en-US culture.
27109 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
27111 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
27112 ThreadPool.SetMinThreads.
27113 * threadpool.c: Implemented ThreadPool.GetMinThreads and
27114 ThreadPool.SetMinThreads.
27116 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
27118 * mono-config.c: also load the .config file in the directory
27119 where the assembly was found.
27121 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
27123 * assembly.c: load per-assembly config files.
27124 * icall.c: decrapified code to get the config dir and moved to
27126 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
27127 per-assembly config files. When doing a dll map lookup give precedence
27128 to the per-assembly data.
27130 2004-04-14 Martin Baulig <martin@ximian.com>
27132 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
27133 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
27134 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
27136 * mono-debugger-debugger.c: While the debugger is locked, remember
27137 whether the symbol tables have changes and send one single
27138 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
27140 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
27142 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
27144 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
27147 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
27148 account when marshalling string arrays. Fixes #56965.
27150 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
27152 * icall.c: Add new icalls mapping for security.
27153 * security.c|h: Add internal calls for WindowsIdentity,
27154 WindowsImpersonationContext and WindowsPrincipal.
27156 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
27158 * class.c: Added comment to ensure the System.MonoDummy class
27159 is removed when no longer necessary
27161 2004-04-13 Miguel de Icaza <miguel@ximian.com>
27163 * appdomain.c: Pass arguments to the bootstraping exceptions to
27164 minimize JITed methods at boot
27166 * metadata.c (mono_exception_from_name_two_strings): Allow for the
27167 second string to be null.
27169 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
27170 Change the protocol to minimize the JIT methods at startup. Now
27171 it Returns the internal codepage, if the value of "int_code_page"
27172 is 1 at entry, and we can not compute a suitable code page
27173 number, returns the code page as a string.
27175 2004-04-13 Jackson Harper <jackson@ximian.com>
27177 * culture-info-tables.h: Fix number of decimal digits for all
27180 2004-04-13 Jackson Harper <jackson@ximian.com>
27182 * icall.c: Clairfy out of sync error message. It is not always
27183 your corlib that is out of sync.
27185 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
27187 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
27188 properties when only the set accessor is overriden. Fixes #55874.
27190 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
27192 * assembly.c (mono_assembly_load_references): Make this thread safe.
27195 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
27197 * monosn.c: Add missing initialization calls.
27199 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
27202 ves_icall_System_Globalization_CultureInfo_construct_number_format
27203 Fix g_assert so it compiles on fussier compilers re int/ptr
27206 2004-04-08 Dick Porter <dick@ximian.com>
27209 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
27210 53992. Also rearrange the code so that the internal calls return
27211 an error value and exceptions are thrown from managed code.
27213 * icall.c: Add type info to the socket icalls.
27215 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27217 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
27220 2004-04-07 Martin Baulig <martin@ximian.com>
27222 * class.c (mono_class_from_generic_parameter): Don't default
27223 `klass->parent' to `mono_defaults.object_type'.
27225 2004-04-07 Martin Baulig <martin@ximian.com>
27227 * reflection.c (mono_reflection_initialize_generic_parameter): Set
27228 `param->pklass->reflection_info'.
27230 2004-04-07 Jackson Harper <jackson@ximian.com>
27232 * culture-info-tables.h: Fix date separator symbol.
27234 2004-04-07 Martin Baulig <martin@ximian.com>
27236 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
27237 from System.Type to System.MonoType.
27239 2004-04-07 Martin Baulig <martin@ximian.com>
27242 (MonoReflectionGenericParam): Added `has_reference_type' and
27243 `has_value_type' fields.
27245 * reflection.c (mono_image_get_generic_param_info): Encode the
27246 correct flags if we have the `class' or `struct' constraint.
27248 2004-04-07 Martin Baulig <martin@ximian.com>
27251 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
27253 2004-04-07 Jackson Harper <jackson@ximian.com>
27255 * appdomain.c: Revert extra patches, just wanted to bump the
27258 2004-04-07 Jackson Harper <jackson@ximian.com>
27260 * Makefile.am: Add culture-info private headers.
27261 * icall.c: Add new icalls for contructing locales.
27262 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
27263 * locales.h: Declare new culture info construction methods.
27264 * object.h: Add new fields used to avoid the CultureMap to
27266 * culture-info.h: Definition of structs used in the culture info
27268 * culture-info-tables.h: Autogenerated tables that contain culture
27269 info data. This file was generated with the locale-builder tool.
27270 * appdomain.c: Incement corlib version number.
27272 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
27274 * appdomain.c: (mono_runtime_init) move mono_thread_init
27275 to before mono_object_new calls so critical sections
27276 are initialized before use.
27278 2004-04-07 Martin Baulig <martin@ximian.com>
27281 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
27282 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
27283 (ves_icall_MonoGenericParam_initialize): Removed.
27284 (monogenericparam_icalls): Removed.
27285 (generictypeparambuilder_icalls): Added new table for
27286 System.Reflection.Emit.GenericTypeParameterBuilder.
27289 (mono_reflection_define_generic_parameter): Removed.
27290 (mono_reflection_initialize_generic_parameter): This is now called
27291 from GenericTypeParameterBuilder's .ctor.
27293 2004-04-06 Martin Baulig <martin@ximian.com>
27295 * class.c (mono_class_init): Don't inflate nested classes in a
27297 (mono_type_get_name_recurse): Include the generic arguments for
27298 generic instances and generic type declarations.
27299 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
27300 (_mono_class_get_instantiation_name): Removed.
27301 (mono_class_create_generic): Always use `gklass->name' as our name.
27303 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
27305 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
27306 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
27307 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
27308 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
27309 closed generic methods here.
27312 (mono_reflection_generic_inst_get_nested_types): Removed.
27313 (inflate_mono_method): Copy the generic parameters from the
27314 MonoMethodHeader into out MonoGenericMethod.
27316 2004-04-06 Martin Baulig <martin@ximian.com>
27319 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
27321 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
27323 * reflection.c (build_compressed_metadata): If we have any entries
27324 in the GenericParam, MethodSpec or GenericParamConstraint tables,
27325 set the header version to 1.1.
27327 2004-04-06 Martin Baulig <martin@ximian.com>
27329 * class.c (mono_class_init): If we're a generic instance,
27330 initialize our nested classes, too.
27331 (_mono_class_get_instantiation_name): Deal with the new `!%d'
27334 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27336 * process.c: quote the argument passed to the shell on windows.
27338 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
27340 * threads.c (mono_alloc_special_static_data): Allow this to be
27341 called during startup.
27343 2004-04-02 Martin Baulig <martin@ximian.com>
27346 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
27348 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
27350 * icall.c: Fix build.
27352 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
27354 * Makefile.am: Added security.c|h.
27355 * icall.c: Added icall for get_UserName;
27356 * security.c: New file for security related icalls. Added function
27357 get_UserName for System.Environment (fix #56144).
27358 * security.h: New. Header file for security.c
27360 2004-04-02 Dick Porter <dick@ximian.com>
27362 * icall.c: Deleted the icalls that were obsoleted some time ago
27363 by the ICU string code, and which were mixed into the icall
27364 rearranging. Fixes bug 55969.
27367 * string-icalls.c: Deleted the code that those icalls reference.
27369 2004-04-01 Martin Baulig <martin@ximian.com>
27371 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
27373 * class.c (mono_class_from_generic_parameter): Don't set
27374 TYPE_ATTRIBUTE_INTERFACE.
27375 (my_mono_class_from_generic_parameter): Likewise.
27377 2004-04-01 Martin Baulig <martin@ximian.com>
27379 * loader.c (find_method): Added an optional `MonoClass *ic'
27380 argument to search in a specific interface.
27381 (mono_get_method_constrained): New public function.
27383 2004-04-01 Martin Baulig <martin@ximian.com>
27385 * reflection.c (mono_image_get_generic_field_token): Use the
27386 `handleref' cache here.
27388 2004-04-01 Martin Baulig <martin@ximian.com>
27390 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
27392 * reflection.c (create_generic_typespec): Use the `typespec' hash
27393 here, not the `typeref' one.
27395 2004-04-01 Martin Baulig <martin@ximian.com>
27397 * class.c (mono_class_inflate_generic_type): Moved the
27398 functionality into a new static inflate_generic_type() which
27399 returns NULL if it didn't do anything. Only increment the
27400 `mono_stats.inflated_type_count' if we actually inflated
27402 (mono_class_get_full): Check the classes type to see whether we
27403 need to inflate it; also inflate MONO_TYPE_(M)VAR.
27405 2004-04-01 Jackson Harper <jackson@ximian.com>
27407 * reflection.c: Set culture for assembly references.
27409 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
27411 * reflection.[ch], icall.[ch], Fix support for pinning variables.
27413 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27416 (do_mono_assembly_open): the critical section also covers
27417 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
27419 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27422 (mono_manage_threads): abort the background threads when finishing.
27425 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27427 * gc.c: only close the done_event handle if there was no timeout.
27430 2004-03-30 Martin Baulig <martin@ximian.com>
27432 * icall.c (icall_entries): It's called "System.Activator", not
27433 "System.Activation".
27435 2004-03-30 Martin Baulig <martin@ximian.com>
27437 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
27438 (mono_class_create_from_typespec): Likewise.
27440 2004-03-30 Martin Baulig <martin@ximian.com>
27442 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
27443 `has_ctor_constraint' and `initialized'.
27445 2004-03-30 Martin Baulig <martin@ximian.com>
27447 * reflection.c (encode_new_constraint): New static function to add
27448 the constructor constraint attribute to a type parameter.
27449 (encode_constraints): Call encode_new_constraint() if necessary.
27452 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
27454 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
27456 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
27458 * reflection.c, icall.c: add support for pinning variables.
27460 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
27462 * marshal.c (mono_marshal_get_managed_wrapper):
27463 init bool local with zero rather than null.
27465 2004-03-29 Martin Baulig <martin@ximian.com>
27467 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
27468 the "official" behavior here.
27469 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
27471 2004-03-29 Martin Baulig <martin@ximian.com>
27473 * icall.c: Reflect latest API changes.
27475 2004-03-29 Martin Baulig <martin@ximian.com>
27477 * loader.c (mono_get_method_from_token): Also call
27478 mono_metadata_load_generic_params () for abstract and interface
27479 methods; replace the type arguments in the method signature with
27480 the ones which are loaded from the metadata.
27482 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
27484 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
27485 of the lock is not the current thread. MS.NET don't do it, in spite of
27486 what the documentation says. See bug #56157.
27488 2004-03-28 Martin Baulig <martin@ximian.com>
27490 * class.c (mono_class_init): Don't call init_properties() and
27491 init_events() for generic instances; set `prop->parent' when
27492 inflating properties.
27494 * reflection.c (mono_generic_inst_get_object): Call
27495 `mono_class_init (ginst->klass)'.
27496 (mono_type_get_object): Only create a MonoGenericInst if your
27497 generic type is a TypeBuilder.
27498 (do_mono_reflection_bind_generic_parameters): Only set
27499 `ginst->is_dynamic' if our generic type is a TypeBuilder.
27501 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
27503 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
27506 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27508 * icall.c: added Kill_internal icall.
27509 * process.[ch]: added Kill_internal icall.
27511 2004-03-25 Martin Baulig <martin@ximian.com>
27513 * class.h (MonoStats): Added `generic_instance_count',
27514 `inflated_method_count', `inflated_type_count' and
27515 `generics_metadata_size'.
27517 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27519 * reflection.c: no warnings now.
27521 2004-03-25 Martin Baulig <martin@ximian.com>
27523 * class.c (mono_class_get_full): New public function; does a
27524 mono_class_get(), but also takes a `MonoGenericContext *'.
27526 * loader.c (mono_field_from_memberref): Renamed to
27527 `field_from_memberref', made static and added `MonoGenericContext *'
27529 (mono_field_from_token): Added `MonoGenericInst *' argument.
27530 (method_from_memberef): Likewise.
27531 (mono_get_method_from_token): Likewise.
27532 (mono_get_method_full): New public function; does a
27533 mono_get_method(), but also takes a `MonoGenericContext *'.
27535 * verify.c (mono_method_verify): Get the method's generic context
27536 and pass it to mono_field_from_token(), mono_get_method_full() and
27537 mono_class_get_full().
27539 2004-03-25 Martin Baulig <martin@ximian.com>
27541 * class.c (mono_class_inflate_generic_type): Take a
27542 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
27543 `MonoGenericMethod *'.
27545 2004-03-25 Martin Baulig <martin@ximian.com>
27547 * loader.h (MonoMethodInflated): Store the MonoGenericContext
27548 instead of the MonoGenericMethod here.
27550 2004-03-25 Martin Baulig <martin@ximian.com>
27552 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
27553 each time we create a new MonoGenericInst, we also create a new
27554 context which points back to us.
27556 * class.c (inflate_method): Use `ginst->context' instead of
27557 creating a new context.
27559 * loader.c (method_from_memberref): Use
27560 `klass->generic_inst->context' instead of creating a new context.
27562 2004-03-25 Martin Baulig <martin@ximian.com>
27564 * class.h (MonoGenericContext): New struct.
27565 (MonoGenericMethod): Removed `generic_inst'.
27567 * class.c (mono_class_inflate_generic_method): Take a
27568 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
27570 2004-03-25 Martin Baulig <martin@ximian.com>
27572 * loader.h (MonoMethodInflated): New typedef.
27574 * metadata.h (MonoMethodSignature): Removed `gen_method', make
27575 `generic_param_count' consume just 30 bits, added `is_inflated'
27576 and `has_type_parameters' flags (one bit each).
27578 * class.c (mono_class_inflate_generic_method): Create a
27579 MonoMethodInflated instead of a MonoMethodNormal and set
27580 `is_inflated' in the method signature.
27582 * class.h (MonoGenericMethod): Removed `generic_method'.
27584 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
27586 * image.c: Make sure the name of a MonoImage is always an absolute path.
27587 This fixes bug #54415.
27589 2004-03-24 Martin Baulig <martin@ximian.com>
27591 * class.c (mono_class_setup_vtable): If we're a generic instance,
27592 use our generic type's vtable size.
27594 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
27596 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
27597 MONO_NO_UNLOAD env var as a temporary workaround for unloading
27600 2004-03-23 Martin Baulig <martin@ximian.com>
27602 * class.h (MonoDynamicGenericInst): Added `int count_events' and
27603 `MonoEvent *events'.
27605 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
27606 (typebuilder_icalls): Added "get_event_info"; calls
27607 mono_reflection_event_builder_get_event_info().
27609 * reflection.c (mono_reflection_generic_inst_initialize): Added
27610 `MonoArray *events'.
27611 (mono_reflection_event_builder_get_event_info): New function.
27613 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
27615 * object.h: add mono_type_initialization_init
27617 * object.c (mono_runtime_class_init):
27618 implement class constructor synchronization rules
27619 to cope with threading issues.
27620 add mono_type_initialization_init
27622 * appdomain.c (mono_runtime_init): call
27623 mono_type_initialization_init
27625 * class.h: removing initializing field from MonoVTable
27627 2004-03-23 Martin Baulig <martin@ximian.com>
27629 * class.c (my_mono_class_from_generic_parameter): Use
27630 `param->name' if it's not NULL.
27632 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
27634 * class.c: do not insert non-virtual methods in the vtable.
27635 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
27636 that means the method is non-virtual. This never would have
27639 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
27641 * profiler.c: Added lock for accessing coverage_hash.
27643 2004-03-22 Martin Baulig <martin@ximian.com>
27645 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
27646 `method->method->signature->generic_param_count != 0' to make it
27647 work for interface methods.
27649 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27651 * process.c: quote the string passed to the shell using g_shell_quote.
27653 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27656 (mono_threads_manage): don't remove the finalizer thread and self
27657 from the threads hash table so that mono_thread_manage can be called
27660 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27662 * process.c: quote the arguments when UseShellExecute is true. Fixes
27665 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27667 * threads.c: set mono_thread_detach as a cleanup routine for every
27668 thread. This way it's always executed upon thread termination, either
27669 aborted or finished normally. No more xsp hangs!
27671 2004-03-17 Martin Baulig <martin@ximian.com>
27673 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
27674 `int count_nested' and a `MonoType **nested'.
27676 * reflection.c (mono_reflection_bind_generic_parameters): Moved
27677 most of the functionality into a new static
27678 do_mono_reflection_bind_generic_parameters() and don't take a
27679 `MonoType *nested_in' argument any more. Don't compute nested
27681 (mono_reflection_generic_inst_get_nested_types): New public method
27682 to get nested types.
27684 * class.c (mono_class_create_generic): Set `klass->nested_in' if
27685 we're a nested class.
27687 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
27688 mono_reflection_generic_inst_get_nested_types() to compute the
27691 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
27693 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
27694 descriptive error message under windows.
27696 2004-03-17 Martin Baulig <martin@ximian.com>
27698 * class.c (dup_type): Added `const MonoType *original' argument;
27699 copy the attrs from the original type.
27701 2004-03-17 Martin Baulig <martin@ximian.com>
27703 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
27704 `m->generic_inst_cache' here.
27706 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
27708 * exception.h exception.c: Add stack_overflow_exception.
27710 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27713 (overlapped_callback): call SetEvent *after* invoking the callback.
27714 No need to call CloseHandle.
27716 2004-03-16 Martin Baulig <martin@ximian.com>
27718 * reflection.c (mono_image_get_fieldref_token): Take a
27719 `MonoReflectionField *' instead of a `MonoClassField *' and a
27720 `MonoClass *'; store the `MonoReflectionField *' in the hash.
27722 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27724 * appdomain.c: don't add the culture to the filename we're looking for
27725 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
27727 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27729 * locales.c: don't ignore symbols when doing case insensitive compares.
27730 Thanks Dick! Fixes bug #54046.
27732 * threads.c: surround 'threads' usage with enter/leave in
27733 mono_thread_manage.
27735 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
27737 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
27738 implicitly marshalled as [Out]. Fixes #55450.
27740 (mono_marshal_get_runtime_invoke): Zero out the result if there is
27743 2004-03-16 Martin Baulig <martin@ximian.com>
27745 * class.c (mono_class_from_generic_parameter): Use the actual
27748 2004-03-16 Martin Baulig <martin@ximian.com>
27750 * reflection.c (type_get_signature_size): New static function.
27751 Compues the size of the type in a method signature.
27752 (method_get_signature_size): New static function; calls
27753 type_get_signature_size() to compute the actual size of the
27754 method's signature.
27755 (method_encode_signature): Use method_get_signature_size() to get
27756 the signature's size rather than using `nparams * 10'.
27758 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27760 * file-io.h: define here WapiOverlapped on windows. I don't want the
27761 regular OVERLAPPED one.
27764 * threadpool.c: somehow, BindIoCompletionCallback is not found.
27765 Disabling AIO on windows.
27767 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27769 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
27772 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27774 * appdomain.c: upgraded corlib version.
27776 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
27777 and BeginWrite. Allow opening files for asynchrnous operations.
27779 * file-io.h: new struct that maps FileStreamAsyncResult.
27780 * icall.c: added new icalls.
27781 * process.[ch]: support setting child process environment variables
27782 and use the SHELL or COMSPEC when UseShellExecute is true.
27784 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
27785 callback for async. IO is here and also BindHandle.
27787 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
27790 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
27792 * reflection.c (create_custom_attr): Allow len == 0.
27794 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
27795 computation on big-endian machines.
27797 2004-03-13 Martin Baulig <martin@ximian.com>
27799 * class.h (MonoGenericInst): Added `int count_ifaces'.
27801 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
27802 `ginst->count_ifaces' instead `klass->interface_count' since we
27803 may get called before the vtable is created.
27805 * loader.c (mono_method_get_param_names): If we're a generic
27806 instance, return and don't initialize the class.
27808 * reflection.c (mono_reflection_setup_generic_class): Don't call
27809 ensure_runtime_vtable().
27810 (mono_reflection_bind_generic_parameters): Set
27811 `ginst->count_ifaces'.
27813 2004-03-11 Jackson Harper <jackson@ximian.com>
27817 * unicode.h: Remove unused System.Char icalls.
27819 2004-03-11 Miguel de Icaza <miguel@ximian.com>
27821 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
27822 code when we P/Invoke the first library in Windows.Forms, instead
27823 of when we first open the assembly.
27825 * assembly.c: Drop the lookup from here.
27827 2004-03-10 Martin Baulig <martin@ximian.com>
27829 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
27830 class for properties, fields and events. Finally fixes #54945.
27832 2004-03-10 Martin Baulig <martin@ximian.com>
27834 * metadata.c (mono_metadata_class_equal): New static function;
27835 checks whether two generic instances or two generic parameters are
27837 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
27840 2004-03-10 Martin Baulig <martin@ximian.com>
27842 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
27844 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
27845 argument and write it into the `reflection_info' field.
27848 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
27849 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
27851 2004-03-09 Jackson Harper <jackson@ximian.com>
27853 * char-conversions.h: use 8 bits for numeric data its all we need
27854 * icall.c: numeric data is only 8 bits now.
27856 2004-03-09 Martin Baulig <martin@ximian.com>
27858 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
27860 * class.c (init_properties, init_events): Initialize the new
27863 * reflection.c (typebuilder_setup_properties): Likewise.
27864 (typebuilder_setup_events): Likewise.
27866 * reflection.h (MonoEventInfo): Replaced `parent with
27867 `declaring_type' and `reflected_type'.
27869 * icall.c (ves_icall_get_property_info): Distinguish between
27870 declaring and reflected type.
27871 (ves_icall_get_event_info): Likewise.
27873 2004-03-09 Martin Baulig <martin@ximian.com>
27875 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
27876 (ves_icall_Type_GetField): Correctly set field->klass.
27878 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
27880 * loader.h: Fix warning.
27882 2004-03-08 Miguel de Icaza <miguel@ximian.com>
27884 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
27885 library routine if present. Notice that it will still continue
27886 executing even if its missing, for those working on the Gtk#
27887 edition of Windows.Forms.
27889 * assembly.c (do_mono_assembly_open): If loading the
27890 System.Windows.Forms call mono_loader_wini_init.
27892 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
27894 * class.h: Added MonoRemoteClass struct.
27895 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
27896 function for MonoStrings.
27897 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
27898 Added internal call for getting the proxy type.
27899 * marshal.c: Get the type of transparent proxies from its remote_class.
27900 Added methods that generate the IL for type checks and casts:
27901 mono_marshal_get_isinst, mono_marshal_get_castclass,
27902 mono_marshal_get_proxy_cancast.
27903 * marshal.h: Declaration of the previous new methods.
27904 * object.c: Added new moethods for creating and updating MonoRemoteClass
27905 instances: mono_remote_class, mono_upgrade_remote_class,
27906 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
27907 * verify.c: FIx transparent_proxy_fields layout.
27908 * appdomain.c: Bump corlib version.
27910 2004-03-04 Jackson Harper <jackson@ximian.com>
27912 * icall.c: Add icall to access char conversion tables.
27913 * char-conversions.h: Character conversion tables.
27914 * Makefile.am: Add char-conversions.h private header file.
27916 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
27918 * appdomain.c (unload_thread_main): Increase unloading timeout to
27919 10 sec as a temporary workaround for Nant problems.
27921 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
27923 * gc.c: Add checks for GC_enable and GC_disable.
27925 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
27926 (jaak@zd.com.pl). Fix memory corruption in String.Replace
27929 2004-02-27 Martin Baulig <martin@ximian.com>
27931 * reflection.c (mono_reflection_bind_generic_parameters): Take a
27932 `MonoReflectionType *' instead of a `MonoType *'.
27934 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
27936 * gc.c (run_finalize): Avoid finalizing the object representing the
27938 (finalizer_thread): Fix warning.
27940 2004-02-25 Martin Baulig <martin@ximian.com>
27942 * class.c (_mono_class_get_instantiation_name): Added `int offset'
27943 argument for nested types.
27944 (mono_class_create_generic): Added support for nested generictypes.
27946 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
27949 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
27951 * reflection.c (method_encode_signature): Increase the minimum
27952 value of `size' from 10 to 11.
27953 (mono_reflection_bind_generic_parameters): Take `int type_argc'
27954 and `MonoType **types' arguments instead of the `MonoArray
27955 *types'; added `MonoType *nested_in'. Recursively instantiate
27958 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
27960 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
27961 stack_overflow_ex members which are used by exception handling.
27963 * appdomain.c (mono_runtime_init): Initialize the new members.
27965 * gc.c (mono_gc_enable): New helper function.
27966 * gc.c (mono_gc_disable): New helper function.
27968 2004-02-23 Martin Baulig <martin@ximian.com>
27970 * icall.c: I must have been really stupid - make it actually work
27973 2004-02-23 Martin Baulig <martin@ximian.com>
27975 * loader.c (method_from_memberref): Only inflate the method if
27976 it's in another klass.
27978 2004-02-23 Martin Baulig <martin@ximian.com>
27980 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
27981 (mono_class_init): If we're a generic instance and an interface,
27982 compute `class->interface_id'; also create `class->interfaces'
27983 here and inflate them.
27985 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
27987 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
27989 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
27991 2004-02-15 Miguel de Icaza <miguel@ximian.com>
27993 * reflection.c (method_encode_code): Improved the error message
27994 generated by the exception.
27996 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27998 * icall.c: Martin did not do what he said in the ChangeLog for
27999 2004-02-18, but put back the changes for properties and events.
28000 Commenting those changes out again and adding comment to bug #54518.
28002 * process.c: removed warning.
28004 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
28006 * marshal.c (emit_struct_conv): Print an error message instead of
28007 asserting when a type does not have the StructLayout attribute.
28009 2004-02-20 Martin Baulig <martin@ximian.com>
28011 * reflection.c (mono_type_get_object): Also use the cache for
28013 (mono_reflection_bind_generic_parameters): Always compute
28016 2004-02-20 Martin Baulig <martin@ximian.com>
28018 * class.h (MonoGenericMethod): Removed `klass'.
28020 * class.c (mono_class_inflate_generic_method): Added `MonoClass
28023 2004-02-20 Martin Baulig <martin@ximian.com>
28025 * reflection.c (method_encode_methodspec): Actually use the
28026 uninflated signature for the memberref.
28028 2004-02-20 Martin Baulig <martin@ximian.com>
28030 * class.h (MonoGenericMethod): Removed `declaring'.
28032 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
28033 is NULL, compute it here.
28035 2004-02-20 Martin Baulig <martin@ximian.com>
28037 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
28039 * metadata.c (mono_metadata_generic_inst_hash): New method.
28040 (mono_metadata_generic_inst_equal): New method.
28042 * reflection.c (mono_reflection_bind_generic_parameters): Use the
28043 `klass->image->generic_inst_cache' cache to avoid creating
28044 duplicate MonoGenericInst's.
28046 * class.c (mono_class_inflate_generic_type): Use the cache.
28048 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
28050 * object.c: fixed gc descriptor calculation for embedded valuetypes.
28052 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28054 * icall.c: added Socket.WSAIoctl icall.
28056 * socket-io.[ch]: implemented
28057 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
28059 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
28061 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
28063 2004-02-18 Urs C Muff <umuff@quark.com>
28065 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
28066 this work on PPC and other big-endian architectures.
28068 * debug-mono-symfile.h: Prepended the names of all the `guint32'
28069 fields with an underscore to make sure they're only accessed by
28070 the read32() macro.
28072 2004-02-18 Martin Baulig <martin@ximian.com>
28074 * icall.c: Put the klass->refclass changes back for methods and
28075 fields, but not for properties and events. We're currently not
28076 distinguishing between DeclaringType and ReflectedType for
28077 properties and events, that's what caused the regressions.
28079 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28082 (mono_async_result_new): the handle can be NULL.
28084 * threadpool.c: Use an event instead of a semaphore, don't initialize
28085 it until needed. This saves quite a few semaphores from being created
28086 when using the threadpool.
28088 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
28090 * object.c (mono_string_is_interned_lookup): Fix interning of long
28091 strings. Fixes #54473.
28093 * domain.c (ldstr_equal): Optimize if the two strings are equal.
28095 * icall.c: Revert the klass->refclass changes since they introduce
28096 regressions (bug #54518).
28098 2004-02-18 Martin Baulig <martin@ximian.com>
28100 * class.c (mono_class_init): If we're a generic instance and don't
28101 come from a TypeBuilder, inflate our members here.
28102 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
28103 (mono_class_create_generic): New public method.
28104 (mono_class_initialize_generic): Removed.
28105 (get_instantiation_name): Renamed to
28106 _mono_class_get_instantiation_name() and made it public.
28108 2004-02-18 Martin Baulig <martin@ximian.com>
28110 * class.c (mono_class_inflate_generic_type): Clear the new
28111 instance's `nginst->klass' when inflating a generic instance.
28112 (mono_class_is_subclass_of): Added (basic) support for generic
28115 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
28117 * appdomain.h, domain.c: use a MonoCodeManager instead of a
28118 MonoMempool to hold compiled native code.
28120 2004-02-17 Martin Baulig <martin@ximian.com>
28122 * class.h (MonoDynamicGenericInst): Added `count_properties' and
28125 * reflection.c (mono_reflection_generic_inst_initialize): Added
28126 `MonoArray *properties' argument.
28128 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
28130 2004-02-17 Martin Baulig <martin@ximian.com>
28132 * icall.c (ves_icall_Type_GetFields): Renamed to
28133 ves_icall_Type_GetFields_internal() and added a
28134 `MonoReflectionType *rtype' argument; pass it to
28135 mono_field_get_object() to set the field's "reflected" type.
28136 (ves_icall_Type_GetConstructors): Likewise.
28137 (ves_icall_Type_GetEvents): Likewise.
28138 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
28139 argument; pass it to mono_method_get_object() to set the method's
28142 2004-02-17 Martin Baulig <martin@ximian.com>
28144 * class.h (MonoDynamicGenericInst): New type.
28145 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
28147 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
28148 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
28149 (ves_icall_MonoGenericInst_GetFields): New interncall.
28151 * class.c (mono_class_from_generic): Don't call
28152 mono_class_initialize_generic() if this is a dynamic instance;
28153 ie. it's being created from a TypeBuilder.
28154 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
28155 `class->byval_arg.type'.
28157 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
28158 to `inflate_method' and made static.
28159 (mono_reflection_inflate_field): Removed.
28160 (mono_reflection_generic_inst_initialize): New public method.
28162 * reflection.h (MonoReflectionGenericInst): Removed `methods',
28163 `ctors' and `fields'; added `initialized'.
28165 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
28167 * debug-helpers.c (mono_method_full_name): Fix output for empty
28170 2004-02-12 Martin Baulig <martin@ximian.com>
28172 * class.h (MonoClassField): Added `MonoType *generic_type'.
28174 * reflection.c (mono_image_get_fieldref_token): Added support for
28175 instantiated generic types.
28176 (field_encode_inflated_field): Removed.
28177 (mono_image_get_inflated_field_token): Removed.
28178 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
28180 * reflection.h (MonoReflectionInflatedField): Removed.
28182 2004-02-12 Martin Baulig <martin@ximian.com>
28184 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
28185 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
28187 * reflection.c (mono_image_get_methodspec_token): Take a
28188 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
28189 (mono_image_create_token): Check whether we have a
28190 `method->signature->gen_method' and call
28191 mono_image_get_methodspec_token() if appropriate.
28192 (inflated_method_get_object): Removed.
28193 (mono_reflection_bind_generic_method_parameters): Return a
28194 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
28195 (mono_reflection_inflate_method_or_ctor): Likewise.
28197 * reflection.h (MonoReflectionInflatedMethod): Removed.
28199 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
28201 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
28202 for custom valuetype marshalling.
28204 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
28206 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28208 * icall.c: fixed WSAGetLastError_internal name.
28210 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
28212 * threads.c (mono_thread_attach): Allow this to be called multiple
28213 times for a thread.
28215 * threads.c (build_wait_tids): Do not wait for ourselves.
28217 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
28218 appdomain list is empty.
28220 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
28221 memory returned by mono_string_builder_to_utf16, since it points into
28222 managed memory. Thanks to Bernie Solomon for noticing this.
28224 * icall.c: Add AppDomainSetup icalls.
28226 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
28228 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
28231 * reflection.c (reflection_methodbuilder_to_mono_method): Save
28232 custom attributes to the method_aux struct. Also fix array indexes etc.
28234 * loader.c (mono_method_get_param_names): Make dynamic case work again.
28236 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
28238 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
28239 (both static and runtime) and reduce startup time.
28241 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
28243 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
28244 AsAny marshalling conversion instead of crashing.
28246 * marshal.c: Fix warnings.
28248 2004-02-09 Martin Baulig <martin@ximian.com>
28250 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
28252 * reflection.h (MonoReflectionInflatedMethod): Removed the
28253 `declaring' field, it's now in the unmanaged MonoGenericMethod.
28255 * reflection.c (method_encode_methodspec): Removed the `method'
28256 argument; we get it from `gmethod->declaring'.
28257 (inflated_method_get_object): Removed the `declaring' argument.
28259 2004-02-09 Martin Baulig <martin@ximian.com>
28261 * class.h (MonoGenericMethod): New type.
28262 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
28265 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
28266 a `MonoGenericMethod *gen_method' one.
28268 * class.c (mono_class_inflate_generic_type): Take an additional
28269 `MonoGenericMethod * argument. This is only non-NULL if we're
28270 inflating types for a generic method.
28271 (mono_class_inflate_generic_signature): Renamed to
28272 inflate_generic_signature() and made static; take a
28273 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
28274 (inflate_generic_header): Take a `MonoGenericMethod *' argument
28275 instead of a `MonoGenericInst *' one.
28276 (mono_class_inflate_generic_method): Likewise.
28278 * reflection.c (encode_generic_method_sig): Take a
28279 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
28280 (method_encode_methodspec): Likewise.
28281 (inflated_method_get_object): Likewise.
28283 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
28284 field with a `MonoGenericMethod *gmethod' one.
28286 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
28288 * class.h (mono_class_has_parent): add parens to expansion
28291 2004-02-08 Martin Baulig <martin@ximian.com>
28293 * image.h (MonoImage): Removed `generics_cache'.
28295 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
28296 instead of a `MonoType *' argument; removed the `inflate_methods'
28297 argument. Don't inflate methods here.
28299 * loader.c (find_method): If it's a generic instance, call
28300 mono_class_init() on the `sclass->generic_inst->generic_type'.
28302 * metadata.c (mono_type_size): Make this work on uninitialized
28303 generic instances; call it on the `ginst->generic_type's class.
28305 * reflection.c (mono_reflection_bind_generic_parameters): Call
28306 mono_class_from_generic() to create the `ginst->klass'.
28308 2004-02-08 Martin Baulig <martin@ximian.com>
28310 * class.h (MonoClass): Changed type of `generic_inst' from
28311 `MonoType *' to `MonoGenericInst *'.
28313 2004-02-08 Martin Baulig <martin@ximian.com>
28315 * icall.c (ves_icall_Type_BindGenericParameters): Just call
28316 mono_type_get_object(), this is now creating a `MonoGenericInst'
28317 for MONO_TYPE_GENERICINST.
28318 (ves_icall_MonoGenericInst_GetParentType): Likewise.
28319 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
28321 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
28322 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
28323 (inflated_method_get_object): Added `MonoClass *refclass' argument.
28324 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
28325 and reflected type.
28327 * reflection.h (MonoReflectionInflatedMethod): Removed
28328 `declaring_type' and `reflected_type'.
28330 2004-02-08 Martin Baulig <martin@ximian.com>
28332 * class.h (MonoGenericInst): Added `MonoType *parent' and
28333 `MonoType **ifaces'.
28335 * reflection.h (MonoReflectionGenericInst): Removed `klass',
28336 `parent' and `interfaces'.
28338 * reflection.c (mono_reflection_bind_generic_parameters): Take a
28339 `MonoType *' argument and return a `MonoType *'.
28342 (ves_icall_MonoGenericInst_GetParentType): New interncall.
28343 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
28345 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
28347 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
28348 valuetype marshalling.
28350 2004-02-06 Martin Baulig <martin@ximian.com>
28353 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
28354 (my_mono_class_from_generic_parameter): Likewise.
28356 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
28358 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
28359 contents of the symbol files lazily.
28361 * object.h (MonoThread): Add 'name' and 'name_len' fields.
28363 * threads.h threads.c icall.c: New icalls for getting and setting the
28366 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
28368 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
28369 Raise an exception when the domain is not found.
28371 2004-02-03 Martin Baulig <martin@ximian.com>
28373 * reflection.c (mono_image_get_methodspec_token): Use the
28374 uninflated signature; fixes gen-33.
28376 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
28378 * gc.c threads.c: Make the finalizer thread a normal managed thread so
28379 the finalizer code can use thread functionality.
28381 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
28382 the finalizer thread.
28384 * threads.c: Make some functions more robust.
28386 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
28388 * metadata.h: Add new marshalling conventions.
28390 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
28391 stringbuilder marshalling. Fixes #53700.
28393 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
28395 * reflection.c (mono_image_get_type_info): Save declarative security
28398 * reflection.c (mono_image_get_field_info): Handle uninitialized
28399 unmanaged fields as well.
28401 * appdomain.c: Bump corlib version.
28403 2004-02-01 Martin Baulig <martin@ximian.com>
28405 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
28406 method type arguments.
28408 2004-01-30 Duncan Mak <duncan@ximian.com>
28410 * marshal.h: Add prototype for
28411 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
28413 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
28416 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
28418 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
28419 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
28421 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
28423 * marshal.c (mono_marshal_get_native_wrapper): Add support for
28424 custom marshalling of valuetypes.
28426 * marshal.c: Fix some warnings.
28428 2004-01-29 Martin Baulig <martin@ximian.com>
28430 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
28431 for generic method parameters.
28433 * reflection.c (method_encode_methodspec): Write the uninflated
28434 signature into the methodspec table.
28435 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
28436 is always the uninflated method.
28437 (reflection_methodbuilder_to_mono_method): Copy the generic
28438 parameters from the MethodBuilder into `header->gen_params'.
28440 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
28442 * class.c (mono_class_from_generic_parameter): Fix warning.
28444 2004-01-27 Martin Baulig <martin@ximian.com>
28446 * class.c (mono_class_from_generic_parameter): Don't create
28447 `klass->methods' here.
28449 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
28451 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
28452 extension since it does not work with libraries named lib<FOO>.dll.so.
28454 2004-01-25 Martin Baulig <martin@ximian.com>
28456 * class.c (mono_class_inflate_generic_type): Added support for
28457 MONO_TYPE_GENERICINST.
28459 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
28460 inflate methods on open constructed types.
28462 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28464 * object.c: fire ProcessExit event in the root AppDomain after running
28465 Main. Fixes bug #53299.
28467 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
28469 * socket-io.c: include the new socket-wrappers.h header.
28470 Use the wrappers instead of the unix socket functions to make the code
28473 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
28475 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
28477 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
28480 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
28482 * reflection.c (mono_image_create_pefile): Handle the case when the
28483 entry point is not a MethodBuilder.
28485 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
28486 field to ReflectionMethod since it is not allways a builder.
28488 * reflection.c (type_get_fully_qualified_name): New helper function to
28489 return the fully qualified name of a type.
28491 * reflection.c (encode_marshal_blob): Always emit the fully qualified
28492 type name for custom marshallers.
28494 * reflection.c (mono_marshal_spec_from_builder): Ditto.
28496 * class.c (mono_class_setup_vtable): If a parent class already
28497 implements an interface, use the implementing methods from that class.
28500 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28502 * threadpool.c: just return instead of ExitThread to allow for thread
28505 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
28507 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
28508 when closing resource modules.
28510 * reflection.c (mono_image_create_pefile): Handle the case when the
28511 entry point is not a MethodBuilder.
28513 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
28514 field to ReflectionMethod since it is not allways a builder.
28516 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
28518 * marshal.c (mono_marshal_get_managed_wrapper):
28519 mono_marshal_alloc takes native int so CONV_I
28520 the arg for 64bits.
28522 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
28524 * reflection.c (fixup_cattrs): New function to fixup the methoddef
28525 tokens in the cattr table. Fixes #53108.
28527 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28529 * loader.c: don't trim ".dll" before looking up in the config file.
28530 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
28532 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
28534 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
28535 Return the module which contains the resource as well.
28536 (ves_icall_System_Reflection_Module_Close): New icall.
28538 * appdomain.c: Bump corlib version number.
28540 * image.c (mono_image_addref): New public function.
28542 * assembly.c: Call mono_image_addref.
28544 * reflection.c (mono_module_get_object): Increase reference count of
28547 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
28550 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
28551 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
28552 proper exceptions on DllImport problems.
28554 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
28556 * class.c, metadata.c: eliminate CSIZE macro.
28558 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
28560 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
28561 * object.h: Added async_callback field in MonoAsyncResult.
28562 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
28563 * verify.c: Added async_callback in MonoAsyncResult layout.
28565 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
28567 * reflection.c (mono_reflection_get_custom_attrs): Add support
28570 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
28572 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
28574 (mono_marshal_method_from_wrapper): Add null pointer check.
28576 2004-01-16 Martin Baulig <martin@ximian.com>
28578 * debug-mono-symfile.h: Set version number to 36 and reflect
28579 latest symbol writer changes.
28581 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
28583 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
28584 multi-dimensional arrays.
28585 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
28586 (mono_class_from_mono_type): Use bounded_array_class_get.
28588 * class.c (mono_bounded_array_class_get): New function which takes
28589 a 'bounded' bool argument to distinguish vectors from one dimensional
28592 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
28593 bounded_array_class_get if the array has bounds.
28595 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
28596 Search modules loaded using AssemblyBuilder:AddModule as well.
28598 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28600 * appdomain.c: increased corlib version.
28601 * filewatcher.c: removed g_print.
28603 (get_property_info): only allocate what is actually requested.
28604 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
28606 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28608 * Makefile.am: added filewatcher.[ch]
28609 * filewatcher.[ch]: FileSystemWatcher runtime support.
28610 * icall.c: added new FSW icalls.
28612 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
28614 * string-icalls.c: fix stringbuilder regression as suggested by
28615 Iain McCoy <iain@mccoy.id.au>.
28617 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
28619 * process.c (process_read_stringtable_block): Recognize '007f' as
28620 a language neutral stringtable block.
28622 2004-01-12 Patrik Torstensson
28624 * object.h (MonoStringBuilder) : Changed layout to support our
28625 new stringbuilder class.
28626 * marshal.c: Change marshalling to support the new layout of
28628 * appdomain.c: increased version number because new layout of
28631 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
28633 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
28634 assembly name as an string instead of an AssemblyName, since it is
28635 easier to extract info from it.
28637 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
28638 the culture subdirectories too. Fixes #52231.
28640 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28642 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
28643 It takes 2 new parameters with an optional name for the method to look
28644 for and case ignoring info.
28646 * threadpool.c: removed unused variable.
28648 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28650 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
28651 It takes 2 new parameters with an optional name for the property to look
28652 for and case ignoring info.
28655 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
28657 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
28660 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28663 * assembly.c: escape the uri before passing it to g_filename_from_uri.
28666 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
28668 * reflection.c: Add support for more than one unmanaged resource.
28670 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
28671 in field->def_value, as done in all other cases.
28673 * reflection.c (mono_reflection_get_custom_attrs): Add support for
28676 * reflection.c (mono_reflection_create_runtime_class): Remove
28677 errorneous assignment to klass->element_class, since it is already
28678 done in mono_reflection_setup_internal_class.
28680 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28682 * gc.c: added missing LeaveCriticalSection.
28683 * icall.c: indented a couple of lines.
28684 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
28685 if we call EndInvoke inside a callback. Fixes bug #52601.
28687 2004-01-07 Martin Baulig <martin@ximian.com>
28689 * mono-debug-debugger.h
28690 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
28692 2004-01-06 Miguel de Icaza <miguel@ximian.com>
28694 * appdomain.c: Use messages in NotImplementedException.
28696 * exception.c (mono_get_exception_not_implemented): Now this takes
28697 a message argument.
28699 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
28700 exception instead of g_asserting an aborting when something is not
28703 Add some inline docs.
28705 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
28707 * reflection.h: Update after changes to object layout.
28709 * reflection.c: Implement saving of unmanaged aka win32 resources.
28711 * appdomain.c: Bump version number.
28713 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
28714 Handle missing domains gracefully.
28716 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
28718 * file-io.c : On Windows, there are much more invalid_path_chars.
28720 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
28722 * class.h, object.c: prepare for GetType () speedup.
28724 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
28726 * profiler.c: workaround for --profile null reference exception on
28727 cygwin. Patch by Patrik Torstensson.
28729 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
28731 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
28732 make work for unaligned access.
28734 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
28736 * class.c: small cleanup (class->fields [i] -> field).
28737 * image.c: check address of metadata is valid.
28739 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
28741 * assembly.h assembly.c (mono_assembly_loaded): New public function to
28742 search the list of loaded assemblies.
28744 * reflection.c (mono_reflection_type_from_name): Use
28745 mono_assembly_loaded instead of mono_image_loaded.
28747 * reflection.c: Fix warnings.
28749 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
28751 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
28752 is dynamic. This is needed since an assembly can contain both dynamic and
28753 non-dynamic images.
28755 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
28758 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
28760 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
28761 to store modules loaded using AddModule.
28763 * reflection.c (mono_image_fill_file_table): Generalize this so it works
28766 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
28768 * reflection.c (mono_image_fill_export_table_from_module): New function to
28769 fill out the EXPORTEDTYPES table from a module.
28771 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
28772 into a separate function. Also handle loaded non-dynamic modules.
28774 * reflection.c (mono_image_basic_init): Fix memory allocation.
28776 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
28778 * assembly.c (mono_assembly_load_references): Make this public.
28780 2003-12-19 Martin Baulig <martin@ximian.com>
28782 * class.c (mono_class_initialize_generic): Made this static, take
28783 a `MonoGenericInst *' instead of a `MonoClass *'.
28784 (mono_class_from_generic): Call mono_class_initialize_generic()
28785 unless we're already initialized or being called from
28786 do_mono_metadata_parse_generic_inst().
28788 * class.h (MonoGenericInst): Added `initialized' and
28789 `init_pending' flags.
28791 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
28792 `mono_class_init (gklass)' or mono_class_initialize_generic()
28793 here; set `generic_inst->init_pending' while parsing the
28796 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
28798 * locales.c: include string.h for memxxx prototypes
28800 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
28802 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
28803 constructor when accessing literal fields.
28805 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
28807 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
28809 * reflection.c (assembly_add_resource_manifest): New function to fill
28810 the MANIFESTRESOURCE table.
28812 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
28814 * reflection.h: Update to changes in class layout.
28816 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
28817 Reenable call to mono_runtime_is_shutting_down ().
28819 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
28820 determine if the runtime is shutting down.
28822 2003-12-16 Jackson Harper <jackson@ximian.com>
28824 * icall.c: comment out call to mono_runtime_is_shutting_down to
28827 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
28829 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
28830 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
28832 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
28834 * reflection.c: move definition of swap_with_size
28835 to before its first call
28837 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
28839 * appdomain.c (mono_runtime_is_shutting_down): New public function.
28841 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
28844 * object.c: Fix warnings.
28846 * icall.c (ves_icall_Type_Get...): Only consider inherited static
28847 members if FlattenHierarchy is set.
28849 * reflection.c (mono_image_add_decl_security): New function to emit
28850 declarative security.
28852 * reflection.h reflection.c: Add support for declarative security.
28854 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
28856 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
28858 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
28860 * appdomain.c verify.c: Moved corlib version checking into its own
28861 function in appdomain.c since it needs to create vtables etc.
28863 2003-12-13 Patrik Torstensson <p@rxc.se>
28865 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
28866 instead of unwrapped server.
28868 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
28870 * verify.c (check_corlib): Fix field index.
28872 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
28874 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
28877 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
28879 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
28880 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
28881 cope with sizeof(size_t) != sizeof(guint32).
28883 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28885 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
28886 in case of failure.
28888 2003-12-10 Mark Crichton <crichton@gimp.org>
28890 * icall.c: removed the GetNonZeroBytes. We now handle this case
28893 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
28895 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
28897 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
28900 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
28902 * verify.c (check_corlib): Handle the case when the version field is
28903 initialized by a static constructor.
28905 2003-12-08 Patrik Torstensson <p@rxc.se>
28907 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
28909 2003-12-08 Martin Baulig <martin@ximian.com>
28911 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
28912 a MonoReflectionGenericParameter, also take the parameter index
28913 and name as arguments.
28914 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
28915 (ves_icall_MonoGenericParam_initialize): New interncall.
28916 (ves_icall_Type_make_byref_type): New interncall.
28918 * reflection.h (MonoReflectionGenericParam): Derive from
28919 MonoReflectionType, not just from MonoObject. Added `refobj' and
28922 * reflection.c (mono_reflection_define_generic_parameter): Create
28923 and return a new MonoReflectionGenericParam; don't initialize the
28925 (mono_reflection_initialize_generic_parameter): New public method;
28926 initializes the constraints and creates the `param->pklass'.
28928 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
28930 * reflection.h reflection.c: Use the new fields 'num_types',
28931 'num_fields' and 'num_methods' to track the number of types etc.
28933 * verify.c (check_corlib): Check corlib version number.
28935 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
28937 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
28938 function works on all methods.
28940 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
28942 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
28943 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
28944 the custom_type_info flag of the transparent proxy.
28945 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
28946 objects that supports IRemotingTypeInfo.
28947 * object.h: Added custom_type_info field in transparent proxy.
28949 2003-12-06 Martin Baulig <martin@ximian.com>
28951 * class.c (mono_class_create_from_generic): Removed.
28952 (mono_class_from_generic): Check `ginst->klass' before doing
28953 anything else. This is important to fully support "recursive"
28956 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
28957 empty `generic_inst->klass' before doing anything else.
28959 2003-12-06 Dick Porter <dick@ximian.com>
28964 * locales.c: Use C structs to access class fields. Don't do a
28965 conversion between MonoString and UChar because both are
28966 platform-endian UTF-16. Compare now takes startindex and count
28967 parameters. Add a char overload for IndexOf. Speed up the
28968 invariant string IndexOf.
28970 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
28972 * Makefile.am (monosn_LDADD): Fix parallel build.
28974 2003-12-04 Martin Baulig <martin@ximian.com>
28977 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
28978 (ves_icall_Type_make_array_type): New interncall.
28980 2003-12-04 Martin Baulig <martin@ximian.com>
28982 * locales.c: also change it in the !HAVE_ICU case.
28984 2003-12-04 Dick Porter <dick@ximian.com>
28987 * locales.c: construct_compareinfo is now in CompareInfo, not
28990 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
28992 * image.c (mono_image_load_file_for_image): Cache loaded images in the
28993 image->files array.
28995 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
28998 * assembly.c (mono_assembly_load_references): Only load references
29001 * class.c (mono_class_from_name): Avoid linear search of the
29002 EXPORTEDTYPE table.
29004 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
29006 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
29008 * image.h (MonoImage): Add 'field_cache' field.
29010 * loader.c (mono_field_from_token): Cache field lookups.
29012 * reflection.c (mono_module_get_object): Fix name property.
29014 * icall.c (ves_icall_get_enum_info): Update after changes to
29015 mono_metadata_get_constant_index ().
29017 * icall.c: Get rid of get_type_info icall, use a separate icall for
29018 each type property to avoid needless memory allocations. Fixes #51514.
29020 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
29021 to avoid needless binary searches.
29023 * class.c (class_compute_field_layout): Move the initialization of
29024 field->def_value to mono_class_vtable ().
29026 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
29029 * object.c (mono_object_allocate): Make it inline.
29031 * object.c (mono_object_allocate_spec): Make it inline.
29033 2003-12-02 Dick Porter <dick@ximian.com>
29035 * locales.c (create_NumberFormat): NumberFormatInfo construction.
29036 Patch by Mohammad DAMT (mdamt@cdl2000.com).
29038 2003-12-01 Dick Porter <dick@ximian.com>
29040 * threads.c: Fix signature and call in CreateMutex and
29043 2003-12-01 Dick Porter <dick@ximian.com>
29046 * locales.c: Implement string compares and searching
29048 * object.h: Add extra Thread field
29050 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
29052 * reflection.c (fixup_method): Add support for MonoCMethod.
29054 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
29056 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
29058 * reflection.c (assembly_name_to_aname): Allow extra characters in
29059 assembly names. Fixes #51468.
29061 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
29063 * exception.c (mono_exception_from_name_domain): New helper function.
29065 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
29066 exception object in the correct domain.
29068 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
29069 formatting + make a copy a the input data.
29071 * loader.c (mono_get_method_from_token): Methods which contain
29072 native code do not have entries in the ImplMap.
29074 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
29075 Thanks to Gonzalo for spotting this.
29077 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
29078 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
29080 * assembly.h (mono_assembly_load_from): Split the second part of
29081 assembly loading into a new public function.
29083 * exception.h (mono_get_exception_bad_image_format): New function.
29085 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
29087 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
29088 Enumerate all modules inside a dynamic assembly. Fixes #51293.
29090 * icall.c: Add new icall for creating dynamic methods.
29092 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
29094 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
29096 * reflection.c (mono_reflection_create_dynamic_method): New icall to
29097 create a dynamic method.
29099 * reflection.c (resolve_object): New helper function.
29101 * reflection.c: Generalize ReflectionMethodBuilder and the functions
29102 which manipulate it so they can also work on dynamic methods.
29104 * reflection.c (reflection_method_builder_to_mono_method): Avoid
29105 creating the MonoReflectionMethodAux structure if it is not needed.
29107 * reflection.h verify.c: Update after changes to object layout.
29109 * reflection.c (method_builder_encode_signature): Fix compilation on
29112 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
29114 * appdomain.h: Added support for context static fields. Added static_data
29115 field to MonoAppContext and renamed thread_static_fields to a more
29116 generic special_static_fields in MonoAppDomain, since it can now contain
29117 context static fields.
29118 * domain.c: Updated hashtable name.
29119 * object.c: Replaced field_is_thread_static() for a more generic
29120 field_is_special_static() which also checks for context static attribute.
29121 In mono_class_vtable(), added support for static context fields.
29122 * threads.c: Changed methods that manage thread static fields to more
29123 generic methods so they can be reused both for thread and context static
29125 * threads.h: Declared some new methods.
29127 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
29129 * reflection.h: Update after changes to the managed types.
29131 * reflection.c (encode_custom_modifiers): New helper function.
29133 * reflection.c (method_encode_signature): Emit custom modifiers.
29135 * reflection.c (field_encode_signature): Emit custom modifiers.
29137 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
29139 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
29141 * icall.c (ves_icall_System_ValueType_Equals): New optimized
29144 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
29147 * object.c (mono_field_get_value_object): New function.
29149 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
29152 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
29154 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
29155 return a preallocated out-of-memory exception instance.
29157 * object.c (out_of_memory): Use the new function.
29159 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
29160 flag is before the custom modifiers. Fixes #49802.
29162 2003-11-16 Martin Baulig <martin@ximian.com>
29164 * class.c (mono_class_is_open_constructed_type): Implemented the
29165 MONO_TYPE_GENERICINST case.
29167 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
29169 * assembly.c (mono_assembly_fill_assembly_name): New function to
29170 fill out the MonoAssemblyName structure.
29171 (mono_assembly_open): Use the new function.
29173 * icall.c (fill_reflection_assembly_name): New helper function.
29175 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
29178 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
29180 2003-11-15 Martin Baulig <martin@ximian.com>
29182 * class.c (mono_class_is_open_constructed_type): New public
29183 function; checks whether a type is an open constructed type,
29184 ie. whether it still contains type parameters.
29185 (mono_class_inflate_generic_type): If we're a type parameter and
29186 the inflated type is also a MONO_TYPE_(M)VAR, return the original
29189 * class.h (MonoGenericInst): Added `guint32 is_open'.
29191 * loader.c (method_from_methodspec): Check whether we're an open
29192 or closed constructed type and set `ginst->is_open'.
29194 * reflection.c (mono_reflection_bind_generic_parameters): Check
29195 whether we're an open or closed constructed type and set
29197 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
29198 from open constructed types.
29200 2003-11-15 Martin Baulig <martin@ximian.com>
29202 * reflection.c (mono_reflection_bind_generic_parameters): If we're
29203 a generic instance (instead of a generic type declaration) with
29204 unbound generic parameters, bind them to our actual types.
29206 2003-11-14 Martin Baulig <martin@ximian.com>
29208 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
29210 * reflection.c (mono_reflection_bind_generic_parameters): If we're
29211 an interface type, populate `res->interfaces' with instantiated
29212 versions of all the interfaces we inherit.
29214 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
29216 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
29217 when MONO_PATH is set but doesn't contain the install dir.
29219 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29222 (ves_icall_Type_GetInterfaces): don't return an interface twice when
29223 it's also implemented in base classes. Fixes bug #50927.
29225 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
29227 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
29228 if this method is called from a finalizer. Fixes #50913.
29230 2003-11-12 Miguel de Icaza <miguel@ximian.com>
29232 * threads.c: Implement VolatileRead/VolatileWrite
29234 * icall.c: Add new icalls for VolatileRead/VolatileWrite
29236 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
29238 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
29239 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
29242 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
29243 from Peter Ross (pro@missioncriticalit.com).
29245 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
29247 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
29249 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
29251 * assembly.c (mono_assembly_load_references): Disable check because it
29252 triggers on older corlibs which lots of people have.
29254 2003-11-12 Jackson Harper <jackson@ximian.com>
29256 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
29257 load corlib.dll if mscorlib.dll is not found.
29258 * assembly.h: Remove corlib name define.
29261 * image.c: Change corlib name to mscorlib.
29263 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
29265 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
29267 2003-11-11 Miguel de Icaza <miguel@ximian.com>
29269 * appdomain.h: Added loader_optimization here to sync with the C#
29270 code, and add disallow_binding_redirects field.
29272 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
29274 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
29276 * reflection.c (mono_image_build_metadata): Fix crash on modules
29279 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
29281 * icall.c (ves_icall_get_method_info): Return callingConvention as
29284 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
29285 namespaces from the EXPORTEDTYPE table as well.
29287 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
29288 from all modules inside the assembly.
29290 2003-11-11 Martin Baulig <martin@ximian.com>
29292 * reflection.c (mono_reflection_bind_generic_parameters): Make
29293 this work for interfaces.
29295 2003-11-11 Martin Baulig <martin@ximian.com>
29297 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
29299 2003-11-11 Martin Baulig <martin@ximian.com>
29301 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
29302 "MonoInflatedMethod" and "MonoInflatedCtor".
29304 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
29306 * reflection.c (resolution_scope_from_image): Use the assembly table
29307 from the manifest module, since other modules don't have it.
29309 * debug-helpers.c (mono_type_full_name): New helper function.
29311 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
29313 * image.c (mono_image_load_file_for_image): New public function which
29314 is a replacement for the load_file_for_image in class.c.
29316 * assembly.c (mono_assembly_load_module): A wrapper for the function
29317 above which does assembly association and reference loading too.
29319 * class.c (mono_class_from_name): Call mono_assembly_load_module.
29321 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29323 * appdomain.c: not all of the attributes for the full assembly name
29324 are required and the order doesn't matter. Fixes bug #50787.
29326 2003-11-10 Dick Porter <dick@ximian.com>
29328 * locales.c: Use platform-endian UTF16
29330 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
29332 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
29334 2003-11-10 Martin Baulig <martin@ximian.com>
29337 (mono_metadata_load_generic_params): Make this actually work.
29339 * reflection.c (mono_reflection_bind_generic_parameters): If our
29340 parent is a generic instance, pass all the `types' to it, no
29341 matter whether it has the same number of type parameters or not.
29343 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
29345 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
29347 * assembly.c (mono_assembly_load_references): Move the image<->assembly
29348 assignment code to this function so it gets called recursively for all
29351 * image.c (load_modules): Remove the assembly assignment since it is
29352 now done by mono_assembly_load_references.
29354 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
29355 Add 'module' argument.
29356 (mono_module_get_types): New helper function.
29357 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
29359 2003-11-08 Martin Baulig <martin@ximian.com>
29361 * class.c (mono_class_inflate_generic_method): Interface method
29362 don't have a header.
29364 * reflection.c (mono_image_get_methodspec_token): Take an
29365 additional `MonoGenericInst *' argument instead of reading it from
29366 the header; this is necessary to support interfaces.
29367 (mono_image_create_token): Pass the `MonoGenericInst *' from the
29368 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
29369 (inflated_method_get_object): Take an additional `MonoGenericInst *'
29372 * reflection.h (MonoReflectionInflatedMethod): Added
29373 `MonoGenericInst *ginst'.
29375 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
29377 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
29379 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
29381 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
29383 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
29386 (reflection_methodbuilder_from_method_builder):
29387 (reflection_methodbuilder_from_ctor_builder): New helper functions to
29388 initialize a ReflectionMethodBuilder structure.
29389 (mono_image_get_methodbuilder_token):
29390 (mono_image_get_ctorbuilder_token): New functions to emit memberref
29391 tokens which point to types in another module inside the same assembly.
29393 * reflection.c: Use the new helper functions.
29395 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
29397 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
29398 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
29400 * reflection.c (resolution_scope_from_image): Emit a moduleref if
29403 * reflection.c (mono_image_build_metadata): Emit metadata only for the
29404 current module. Emit the manifest only for the main module.
29406 * reflection.c (mono_image_create_token): Add assertion when a
29407 memberref needs to be created.
29409 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
29411 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
29412 larger buffer for the custom attribute blob. Fixes #50637.
29414 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29416 * threadpool.c: notify listener on async processing handles after
29417 invoking the async callback. Thanks to Zoltan.
29419 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
29421 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
29422 avoid code duplication.
29424 * reflection.h (MonoDynamicImage): New type which is currently unused,
29425 but will be used through the ref.emit code in place of
29426 MonoDynamicAssembly.
29428 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
29431 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
29432 a MonoDynamicImage instead of just a MonoImage.
29434 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
29435 icalls to ModuleBuilder but keep their semantics, so they will work
29436 with moduleb->assemblyb. This will change later.
29438 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
29440 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
29443 * reflection.c (mono_image_build_metadata): Avoid creation of a default
29444 main module, since it is now done by the managed code.
29446 2003-11-03 Martin Baulig <martin@ximian.com>
29448 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
29449 `ginst->klass' here.
29450 (method_encode_methodspec): Don't use the `ginst->generic_method's
29451 klass if it's a generic instance, use `ginst->klass' in this case.
29453 2003-11-03 Martin Baulig <martin@ximian.com>
29455 * reflection.c (mono_image_get_generic_method_param_info):
29456 Removed, use mono_image_get_generic_param_info() instead.
29457 (mono_image_get_type_info): Write the GenericParam table before
29458 the Method table. This is neccessary because in the GenericParam
29459 table, type parameters of the class (ie. '!0' etc.) must come
29460 before the ones from its generic methods (ie. '!!0' etc).
29462 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
29464 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
29466 2003-11-02 Martin Baulig <martin@ximian.com>
29468 * reflection.c (create_generic_typespec): Take a
29469 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
29470 the generic parameters from it.
29472 2003-11-02 Martin Baulig <martin@ximian.com>
29474 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
29475 instead of a `MonoClassField *' since we just need the type.
29476 (create_generic_typespec): New static function. Creates a
29477 TypeSpec token for a generic type declaration.
29478 (mono_image_get_generic_field_token): New static function.
29479 (mono_image_create_token): If we're a FieldBuilder in a generic
29480 type declaration, call mono_image_get_generic_field_token() to get
29483 2003-11-02 Martin Baulig <martin@ximian.com>
29486 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
29487 `MonoReflectionGenericInst *declaring_type' and
29488 `MonoReflectionGenericInst *reflected_type' fields.
29490 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
29491 `MonoReflectionGenericInst *declaring_type' and a
29492 `MonoReflectionGenericInst *reflected_type' argument instead of a
29493 single `MonoReflectionGenericInst *type' one. Set
29494 `res->declaring_type' and `res->reflected_type' from them.
29495 (mono_reflection_inflate_field): Likewise.
29497 2003-11-02 Martin Baulig <martin@ximian.com>
29499 * class.c (mono_class_setup_vtable): Don't store generic methods
29502 2003-11-02 Martin Baulig <martin@ximian.com>
29504 * reflection.h (MonoReflectionGenericInst): Added
29505 `MonoReflectionType *declaring_type'.
29507 * reflection.c (mono_reflection_bind_generic_parameters): Use
29508 `if (tb->parent)' instead of `klass->parent'.
29510 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
29512 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
29513 with an empty ASSEMBLY table.
29515 * reflection.c (mono_image_build_metadata): Avoid using the same loop
29516 variable in the inner and outer loops.
29518 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
29520 * metadata.h (mono_metadata_make_token): Put parentheses around macro
29523 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
29525 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
29526 icalls. Instead, do everything in managed code. This is needed since
29527 it is hard to restore the original domain etc. in unmanaged code in the
29528 presence of undeniable exceptions.
29530 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
29531 New icalls to push and pop appdomain refs.
29533 2003-10-31 Martin Baulig <martin@ximian.com>
29535 * class.c (inflate_generic_type): Renamed to
29536 mono_class_inflate_generic_type() and made it public.
29538 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
29541 * loader.c (mono_field_from_memberref): Also set the retklass for
29544 * fielder.c (mono_image_get_inflated_field_token): New static
29545 method; creates a metadata token for an inflated field.
29546 (mono_image_create_token, fixup_method): Added support for
29547 "MonoInflatedField".
29548 (fieldbuilder_to_mono_class_field): New static function.
29549 (mono_reflection_inflate_field): New public function.
29552 (MonoReflectionGenericInst): Added `MonoArray *fields'.
29553 (MonoReflectionInflatedField): New typedef.
29555 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
29557 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
29558 for Solaris and other platforms without s6_addr16
29560 2003-10-30 Martin Baulig <martin@ximian.com>
29562 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
29563 argument instead of two.
29564 (mono_class_inflate_generic_signature): Likewise.
29565 (inflate_generic_header): Likewise.
29566 (mono_class_inflate_generic_method): Likewise. In addition, if
29567 `ginst->klass' is set, it becomes the new `method->klass'.
29569 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
29572 * reflection.c (encode_generic_method_sig): Write a 0xa as the
29573 first byte. [FIXME]
29574 (method_encode_methodspec): If we have generic parameters, create
29575 a MethodSpec instead of a MethodRef.
29576 (fixup_method): Added support for "MonoInflatedMethod" and
29577 "MonoInflatedCtor".
29578 (mono_image_create_token): Added support for "MonoInflatedMethod"
29579 and "MonoInflatedCtor".
29580 (inflated_method_get_object): New static function; returns a
29581 managed "System.Reflection.MonoInflatedMethod" object.
29582 (mono_reflection_bind_generic_method_parameters): Return a
29583 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
29584 (mono_reflection_inflate_method_or_ctor): Likewise.
29585 (mono_image_get_generic_method_param_info): Initialize unused
29587 (mono_image_get_generic_param_info): Likewise.
29589 * reflection.h (MonoReflectionInflatedMethod): New public
29590 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
29591 "S.R.MonoInflatedCtor" classes.
29593 * loader.c (method_from_memberref): If we're a TypeSpec and it
29594 resolves to a generic instance, inflate the method.
29596 2003-10-28 Dick Porter <dick@ximian.com>
29598 * object.c (mono_runtime_run_main): Convert command-line arguments
29599 into utf8, falling back to the user's locale encoding to do so.
29601 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
29603 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
29606 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
29608 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
29609 up icalls at method definition time. Partially fixes #33569.
29611 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
29613 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
29614 marshalling of arrays. Fixes #50116.
29616 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
29618 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
29619 points to a vtable in the dying appdomain.
29621 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
29622 listeners into unmanaged code inside the lock.
29624 * object.c (mono_class_vtable): Turn off typed allocation in non-root
29625 domains and add some comments.
29627 2003-10-25 Martin Baulig <martin@ximian.com>
29629 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
29631 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
29633 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
29634 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
29635 currently parsing. Create the generic class and store it in
29636 `generic_inst->klass' before parsing the type arguments. This is
29637 required to support "recursive" definitions; see mcs/tests/gen-23.cs
29639 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
29640 to support recursive typespec entries.
29642 * class.c (mono_class_setup_parent): If our parent is a generic
29643 instance, we may get called before it has its name set.
29644 (mono_class_from_generic): Splitted into
29645 mono_class_create_from_generic() and mono_class_initialize_generic().
29647 2003-10-25 Martin Baulig <martin@ximian.com>
29649 * icall.c (ves_icall_Type_BindGenericParameters): Return a
29650 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
29651 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
29652 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
29654 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
29655 (create_typespec): Likewise.
29656 (mono_reflection_bind_generic_parameters): Return a
29657 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
29658 (mono_reflection_inflate_method_or_ctor): New public function.
29660 * reflection.h (MonoReflectionGenericInst): New typedef.
29662 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
29664 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
29665 inside the domain lock. Fixes #49993.
29667 * object.c (mono_class_vtable): When typed allocation is used,
29668 allocate vtables in the GC heap instead of in the mempool, since the
29669 vtables contain GC descriptors which are used by the collector even
29670 after the domain owning the mempool is unloaded.
29672 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
29674 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
29675 reflect what it does. Also invalidate mempools instead of freeing
29676 them if a define is set.
29678 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
29681 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
29682 hold the finalizable objects in this domain.
29684 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
29687 * appdomain.c (mono_domain_set): New function to set the current
29688 appdomain, but only if it is not being unloaded.
29690 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
29691 appdomain which is being unloaded.
29693 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
29694 unloading of the root appdomain.
29696 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
29697 icall to execute a method in another appdomain. Intended as a
29698 replacement for InternalSetDomain, which can confuse the code
29699 generation in the JIT.
29701 * appdomain.c (mono_domain_is_unloading): New function to determine
29702 whenever an appdomain is unloading.
29704 * appdomain.c (mono_domain_unload): New function to correctly unload
29707 * assembly.c (mono_assembly_load_references): Check that an assembly
29708 does not references itself.
29710 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
29711 domain manually, it asks the finalizer thread to do it, then waits for
29712 the result. Also added a timeout.
29714 * icall.c: Register the new icalls.
29716 * threads.h threads.c: Export the mono_gc_stop_world and
29717 mono_gc_start_world functions.
29719 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
29720 function to fill out the mempool with 0x2a.
29722 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
29724 * reflection.h (MonoReflectionMethodAux): New structure to store
29725 information which is rarely used, thus is not in the MonoMethod
29728 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
29729 store the aux info.
29731 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
29732 and marshalling info into the aux structure.
29734 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
29735 from the aux structure.
29737 * loader.c (mono_method_get_param_names): Retrieve the param names from
29740 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
29742 * exception.h exception.c: Add AppDomainUnloadedException && fix
29745 2003-10-21 Dick Porter <dick@ximian.com>
29748 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
29749 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
29751 2003-10-21 Martin Baulig <martin@ximian.com>
29753 * reflection.c (mono_reflection_bind_generic_parameters):
29754 `klass->parent' is NULL for interfaces.
29756 2003-10-21 Martin Baulig <martin@ximian.com>
29758 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
29760 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
29762 * exception.c (mono_exception_from_name_msg): New helper function for
29763 creating exceptions and initializing their message field.
29765 * exception.c: Simplify functions using the new helper.
29767 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
29770 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
29771 mono_raise_exception, since otherwise gcc doesn't generate the function
29772 epilog for raise_exception, confusing the stack unwinding in the JIT.
29775 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
29776 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
29779 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29781 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
29784 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
29786 * icall.c: Removed GetUninitializedObject method because
29787 AllocateUninitializedClassInstance does the same.
29789 2003-10-18 Martin Baulig <martin@ximian.com>
29791 * class.c (inflate_generic_signature): Renamed to
29792 mono_class_inflate_generic_signature() and made it public.
29793 (my_mono_class_from_generic_parameter): New static function; if we
29794 don't already have the generic parameter's MonoClass, create a
29795 very simple one which is just used internally in the runtime and
29796 not passed back to managed code.
29798 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
29800 * metadata.h (MonoMethodSignature): Moved the
29801 `MonoGenericParam *gen_params' to the MonoMethodHeader.
29802 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
29804 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
29805 ves_icall_MonoMethod_GetGenericArguments(); this is now an
29806 interncall on the MonoMethod class, not on MethodInfo.
29807 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
29808 calling mono_reflection_bind_generic_method_parameters() directly.
29810 * loader.c (mono_method_get_signature): If this is a MethodSpec;
29811 return the already computed `method->signature'.
29812 (method_from_methodspec): New static function to load a method
29813 from a MethodSpec entry.
29814 (mono_get_method_from_token): Call the new method_from_methodspec()
29815 for MethodSpec tokens.
29816 (mono_get_method_from_token): If we're a generic method, load the
29819 * reflection.c (mono_image_get_memberref_token): Allow
29820 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
29822 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
29823 (mono_image_create_token): First check whether it's a generic
29824 method (so we'd need to create a MethodSpec), then do the other
29826 (mono_reflection_bind_generic_method_parameters): Return a
29827 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
29828 called directly from the interncall.
29830 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
29832 * reflection.c (load_public_key): Move loading of the public key
29835 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
29837 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
29840 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
29841 culture, hash_alg and public_key. Fixes #49555.
29843 2003-10-17 Martin Baulig <martin@ximian.com>
29845 * class.h (MonoGenericInst): Moved this declaration here and added
29846 `MonoMethod *generic_method'.
29849 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
29850 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
29852 * metadata.c (mono_metadata_type_equal): Two types of
29853 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
29854 index; ie. don't compare the address of the `MonoGenericParam'
29856 (mono_metadata_load_generic_params): Removed the `MonoMethod
29859 * metadata.h (MonoGenericInst): Moved declaration to class.h.
29860 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
29862 * reflection.c (method_encode_signature): Encode the number of
29863 generic parameters.
29864 (encode_generic_method_sig): New static function.
29865 (method_encode_methodspec): New static function; creates an entry
29866 in the MethodSpec table for a generic method.
29867 (mono_image_get_methodspec_token): New static function.
29868 (mono_image_create_token): Call mono_image_get_methodspec_token()
29869 for generic methods.
29870 (mono_reflection_bind_generic_method_parameters): New public
29871 function. Instantiates a generic method.
29873 2003-10-16 Martin Baulig <martin@ximian.com>
29875 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
29876 *gen_params' here from MonoMethodHeader.
29878 * metadata.c (mono_metadata_parse_method_signature): If we have
29879 generic parameters, initialize `method->gen_params' and then set
29880 the correct `type->data.generic_param' in all the parameters.
29882 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
29884 * threads.c (mono_threads_get_default_stacksize): New function to
29885 return the default stacksize.
29887 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
29888 termination of the finalizer thread, since the previous method had
29889 race conditions. Fixes #49628.
29891 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
29892 as for the other managed threads.
29894 2003-10-16 Martin Baulig <martin@ximian.com>
29896 * class.c (inflate_generic_signature): Copy `generic_param_count'
29899 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
29902 * metadata.c (mono_metadata_parse_method_signature): Actually set
29903 the `method->generic_param_count' here.
29904 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
29906 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
29908 * object.h: Add a new field to TypedRef to simplify the implementation
29909 of the REFANY opcodes in the JIT.
29911 * icall.c: Make use of the new field.
29913 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
29916 2003-10-15 Martin Baulig <martin@ximian.com>
29918 * class.c (mono_class_from_gen_param): Renamed to
29919 mono_class_from_generic_parameter() and moved most of the
29920 functionality from mono_reflection_define_generic_parameter()
29921 here; ie. we create a "real" class here.
29922 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
29923 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
29924 previously been called.
29926 * class.h (MonoGenericParam): Moved the declaration of this struct
29927 here from metadata.h and added `MonoMethod *method'.
29929 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
29932 * loader.c (mono_get_method_from_token): If we have any generic
29933 parameters, call mono_metadata_load_generic_params() to read them
29934 from the MONO_TABLE_GENERICPAR.
29936 * metadata.c (mono_metadata_load_generic_params): Added
29937 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
29939 * metadata.h (MonoMethodSignature): Replaced
29940 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
29941 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
29943 * reflection.c (mono_reflection_define_generic_parameter): Moved
29944 most of the functionality into the new
29945 mono_class_from_generic_parameter(); set the `method' field if
29946 we're a method parameter.
29948 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
29950 * marshal.c (emit_struct_conv): if native size is 0
29953 2003-10-14 Martin Baulig <martin@ximian.com>
29955 * icall.c: The generics API has changed in the spec since it was
29956 added to System.Type; these modifications make it match the spec
29958 (ves_icall_Type_GetGenericParameters): Renamed to
29959 `ves_icall_Type_GetGenericArguments'.
29960 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
29961 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
29962 `ves_icall_MonoType_get_HasGenericArguments'.
29963 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
29964 `ves_icall_MonoType_get_IsGenericParameter'.
29965 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
29966 this is no interncall anymore.
29967 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
29968 `ves_icall_TypeBuilder_get_IsGenericParameter'.
29970 2003-10-14 Martin Baulig <martin@ximian.com>
29972 * reflection.c (mono_reflection_bind_generic_parameters): Also
29973 inflate generic methods if we're reading the class from IL.
29975 2003-10-13 Martin Baulig <martin@ximian.com>
29977 * reflection.c (mono_reflection_define_generic_parameter): This
29978 method isn't called directly from the icall anymore; take a
29979 `MonoReflectionAssemblyBuilder *' so we can use this for type and
29980 method generic parameters.
29981 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
29982 (method_builder_encode_signature): Encode generic parameters.
29983 (mono_image_get_method_info): Write generic params to the
29984 MONO_TABLE_GENERICPARAM table.
29986 * reflection.h (MonoReflectionMethodBuilder): Added
29987 `MonoArray *generic_params'.
29989 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
29991 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
29992 wrapper for mono_reflection_define_generic_parameter().
29993 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
29995 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
29997 * marshal.h: Add missing function to fix build.
29999 * marshal.c (mono_marshal_get_native_wrapper): Add support for
30000 the SetLastError pinvoke attribute.
30002 * marshal.c (mono_marshal_set_last_error): New helper function called
30003 by the generated code.
30005 * marshal.c (mono_mb_emit_branch): New helper function.
30007 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
30009 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
30010 classes as parameters and return values of delegates. Fixes #29256.
30012 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
30014 * locales.c: use gint32 in non HAVE_ICU case
30016 2003-10-11 Martin Baulig <martin@ximian.com>
30018 * mono-debug.c (mono_debug_add_method): Added a workaround for
30021 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
30023 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
30024 delegates passed to native code must use the STDCALL calling
30025 convention. Fixes #35987.
30027 2003-10-10 Martin Baulig <martin@ximian.com>
30029 * class.c (inflate_generic_type): If we're inflating for a generic
30030 type instance (and not for a generic method), return
30031 MONO_TYPE_MVAR unchanged.
30033 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30035 * string-icalls.c: Join ignores null strings in the source array.
30036 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
30037 * threads.c: GetAvailableTheads is slightly more accurate.
30039 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
30041 * threads.h threads.c : add mono_threads_set_default_stacksize
30042 and pass default to CreateThread calls.
30044 2003-10-09 Dick Porter <dick@ximian.com>
30048 * locales.c: Internal calls for constructing CultureInfo and
30049 related objects from libicu (if its available.)
30051 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
30053 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
30055 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30057 * threadpool.c: added an argument to async_invoke_thread that is the
30058 item to process, pass the MonoAsyncResult to the thread start function
30059 when creating a new thread. This way we don't need to acquire any lock
30060 when we're creating a new thread. Readded a semaphore for faster
30061 response times (instead of that Sleep i added).
30063 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
30065 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
30066 get daylight change dates better on Windows, fix handling
30067 of platforms without tm_gmtoff.
30069 2003-10-06 Martin Baulig <martin@ximian.com>
30071 * class.c (inflate_generic_method): Renamed to
30072 mono_class_inflate_generic_method() and made public.
30073 (mono_class_init): Don't inflate the generic methods here.
30074 (mono_class_from_generic): Added `gboolean inflate_methods'
30075 argument. Inflate the methods here.
30077 * loader.c (mono_method_get_param_names): Ignore instances of
30078 generic types for the moment.
30080 * reflection.c (fixup_method): Added support for inflated methods.
30081 (mono_image_create_token): Use mono_image_get_methodref_token()
30082 for inflated methods.
30083 (mono_custom_attrs_from_param): Ignore instances of generic types
30085 (mono_reflection_bind_generic_parameters): New public function.
30086 Moved all the functionality from
30087 ves_icall_Type_BindGenericParameters() here and added support for
30089 (mono_reflection_define_generic_parameter): Initialize
30090 `klass->methods' here.
30092 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
30093 functionality into mono_reflection_define_generic_parameter().
30094 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
30095 TypeBuilder, return that TypeBuilder.
30097 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30099 * appdomain.c: removed mono_delegate_semaphore.
30102 (mono_thread_pool_add): moved hash table creation inside and the thread
30103 creation outside of the critical region.
30104 (mono_thread_pool_finish): removed obsolete code.
30105 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
30106 continue or exit the thread depending on the queue.
30108 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
30110 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
30111 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
30112 handle more bool marshalling options
30114 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
30116 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
30117 arrays of structs. Also add a more descriptive error message when
30118 a structure member is marshalled as LPArray.
30120 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
30122 * marshal.c (mono_marshal_get_native_wrapper): Add support for
30123 marshalling arrays of complex types. Fixes #29098. Also remove an
30124 usused and incomplete function.
30126 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
30128 * gc.c: report heap_size - free_bytes as total memory allocated
30131 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
30133 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
30134 fix timezone handling problems on Windows.
30136 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
30137 asserts when the year is outside the range handled by ms the functions.
30139 * class.c (setup_interface_offsets): If the class is an interface,
30140 fill out its interface_offsets slot.
30142 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30144 * threadpool.c: mark threadpool threads as background.
30146 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
30148 * decimal.c - define DECINLINE to nothing if not using GCC
30150 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
30152 * assembly.c: More refcount fixes.
30154 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30156 * string-icalls.c: if we're not trimming, return the same string.
30157 When not splitting, don't create a new string.
30159 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30162 (mono_image_open): increment the ref_count inside the critical section.
30164 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
30166 * image.c (mono_image_open): Fix reference counting bug.
30168 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
30170 * marshal.c (mono_marshal_type_size) struct alignment changed for
30171 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
30172 64bits. Avoid leak in mono_marshal_get_native_wrapper when
30173 mono_lookup_pinvoke_call throws.
30175 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
30177 * reflection.c (mono_reflection_parse_type): Fix #49114.
30179 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
30180 temporary workaround for cygwin header problem.
30182 * object.c (mono_object_isinst): Synchronize this with the code
30183 generated by the JIT for casts.
30185 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
30187 * reflection.c (encode_type): Fix #38332.
30189 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
30191 * marshal.c (mono_marshal_method_from_wrapper): New function to return
30192 the original method from the wrapper method.
30194 2003-09-25 Martin Baulig <martin@ximian.com>
30196 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
30197 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
30198 (ves_icall_Type_get_IsGenericInstance): New interncall.
30200 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
30202 * object.c: fix cast warning in big endian code.
30204 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
30206 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
30208 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30210 * assembly.c: don't call check_env from mono_assembly_load. It's
30211 already done once in mono_assemblies_init and may cause headaches when
30212 multiple threads are loading assemblies.
30214 2003-09-19 Martin Baulig <martin@ximian.com>
30216 * reflection.c (mono_reflection_define_generic_parameter): Don't
30217 allocate `klass->methods', set `klass->flags' to
30218 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
30220 2003-09-18 Martin Baulig <martin@ximian.com>
30222 * class.c (mono_class_init): Don't create `class->methods' if it's
30223 already initialized.
30225 * metadata.c (mono_metadata_load_generic_params): Make this
30228 * reflection.c (mono_reflection_define_generic_parameter): Set
30229 parent class and interfaces from the constraints.
30231 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
30232 to keep this struct in sync with the declaration in TypeBuilder.cs.
30234 2003-09-17 Martin Baulig <martin@ximian.com>
30236 * metadata.h (MonoType): Replaced the data's `int type_param'
30237 field with `MonoGenericParam *generic_param'.
30238 (MonoGenericParam): Added `MonoClass *klass'.
30240 * class.c (mono_class_from_gen_param): Removed the
30241 `MonoImage *image' and `int type_num' arguments.
30243 * metadata.c (mono_metadata_parse_generic_param): New static
30244 method; creates a MonoGenericParam which just contains the index.
30245 (do_mono_metadata_parse_type): Call
30246 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
30249 * reflection.c (mono_image_typedef_or_ref): Generic type
30250 parameters may be in the same assembly, but never use a typedef
30252 (mono_reflection_define_generic_parameter): We're now creating a
30253 "real" class for the type parameter; it's now safe to call
30254 mono_class_from_mono_type() on the class'es type, it'll do the
30257 2003-09-16 Martin Baulig <martin@ximian.com>
30259 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
30260 `symfile->range_entry_size' and `symfile->class_entry_size' here;
30261 the `symfile' data structure must be fully initialized before it
30262 gets added to the table.
30264 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
30266 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
30268 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
30269 class init trampolines.
30271 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
30273 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
30274 to the built-in profiler to turn off time and allocation profiling
30277 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
30279 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
30282 * debug-helpers.c (mono_method_full_name): Print the wrapper type
30283 in human readable form.
30285 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
30287 * reflection.c icall.c: Fixed warnings.
30289 * image.c (load_class_names): Use a temporary hash table to hold the
30290 namespaces in order to avoid doing many string comparisons.
30292 * image.h: Fix typo.
30294 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
30295 Pass NULL instead of g_direct_equal to the GHashTable constructor
30296 since the NULL case is short-circuited inside g_hash_table_lookup,
30297 leading to better performance.
30299 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
30300 obtain the first custom attribute for a given index. Depends on the
30301 CustomAttribute table being sorted by the parent field.
30303 * reflection.c (mono_custom_attrs_from_index): Use the new function
30304 for better performance.
30306 2003-09-07 Martin Baulig <martin@ximian.com>
30308 * class.c (mono_class_init): If we're a generic instance, inflate
30309 all our methods instead of loading them from the image.
30310 (mono_class_from_generic): Set `class->methods = gklass->methods'.
30312 2003-09-07 Martin Baulig <martin@ximian.com>
30314 * mono-debug-debugger.c: Added support for constructors.
30316 2003-09-06 Martin Baulig <martin@ximian.com>
30318 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
30321 * reflection.c (mono_reflection_setup_generic_class): Call
30322 ensure_runtime_vtable() to create the vtable.
30324 2003-09-05 Martin Baulig <martin@ximian.com>
30326 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
30329 2003-09-04 Martin Baulig <martin@ximian.com>
30331 * reflection.c (mono_reflection_define_generic_parameter): Generic
30332 parameters start with zero.
30334 2003-09-04 Martin Baulig <martin@ximian.com>
30336 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
30338 * reflection.h (MonoReflectionGenericParam): New typedef.
30339 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
30340 the generic parameters from the managed TypeBuilder.
30342 * reflection.c (mono_reflection_define_generic_parameter): New function.
30343 (mono_reflection_create_runtime_class): Encode generic parameters.
30344 (mono_reflection_setup_generic_class): New function; this is
30345 called after adding adding all generic params to the TypeBuilder.
30346 (encode_type): Added MONO_TYPE_VAR.
30348 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
30350 * class.h class.c (mono_class_needs_cctor_run): Moved this method
30353 * assembly.h assembly.c: Moved the AOT loading code into an assembly
30356 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
30358 * reflection.h reflection.c class.h class.c: Delete duplicate
30359 definition of mono_type_get_name () from reflection.c and export the
30362 * class.c: Class loading fixes from Bernie Solomon
30363 (bernard@ugsolutions.com).
30365 * reflection.c: Endianness fixes from Bernie Solomon
30366 (bernard@ugsolutions.com).
30368 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
30370 * assembly.h assembly.c: Define a file format version for AOT
30373 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
30375 * appdomain.h (MonoJitInfo): New field to determine whenever the
30376 code is domain neutral.
30378 2003-08-31 Miguel de Icaza <miguel@ximian.com>
30380 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
30382 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
30384 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
30385 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
30386 Avoid caching the result since strings must be domain specific. Fixes
30389 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
30391 * marshal.c (mono_marshal_init): Make this callable multiple times
30392 since it is hard to find a correct place to call it.
30394 * object.c (mono_runtime_class_init): Execute static constructors in
30395 the correct appdomain.
30397 * image.c (build_guid_table): Handle the case when multiple images have
30400 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30402 * icall.c: added a couple of icalls for System.Web.
30404 2003-08-28 Martin Baulig <martin@ximian.com>
30406 * icall.c (ves_icall_Type_BindGenericParameters): Use
30407 `klass->generic_inst' instead of `&klass->byval_arg' in the
30408 mono_type_get_object() call. The returned type must be
30409 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
30411 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
30415 * object.c (mono_class_proxy_vtable): Make it thread safe.
30417 * pedump.c: Fix warning.
30419 * object.c appdomain.h: Get rid of metadata_section.
30420 It is no longer needed and it was causing deadlocks with domain->lock.
30422 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
30424 2003-08-26 Martin Baulig <martin@ximian.com>
30426 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
30428 2003-08-26 Martin Baulig <martin@ximian.com>
30430 * pedump.c (main): Call mono_metadata_init(),
30431 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
30432 and mono_loader_init().
30434 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
30436 * loader.h: Add missing include to fix build.
30438 * image.h: mono_image_load_references is no more.
30440 * assembly.c: Reworked assembly loading to make it really thread safe.
30441 After these changes, the assembly returned by mono_assembly_open is
30442 fully initialized, i.e. all its references assemblies are loaded.
30444 * assembly.c (mono_image_load_references): Renamed to
30445 mono_assembly_load_references, and made private, since clients no
30446 longer need to call it.
30448 * class.c: Removed calls to mono_assembly_load_references, since it was
30449 a source of deadlocks.
30451 * loader.h loader.c class.h class.c: Protect data structures using a
30452 new lock, the loader lock.
30454 * class.c (mono_class_setup_vtable): Create temporary hash tables and
30455 GPtrArrays only when needed.
30457 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
30458 into empty structures by mcs. Fixes pinvoke7.cs.
30460 * domain.c (mono_init): Call a new initialization function.
30462 * appdomain.c (mono_runtime_init): Call the new initializer function
30463 of the marshal module.
30465 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
30466 inserted into empty structures by mcs. Fixes pinvoke7.cs.
30468 * marshal.h marshal.c: Added locks around the wrapper caches to make
30469 this module thread safe.
30471 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
30472 this argument. Fixes pinvoke1.exe.
30474 2003-08-25 Lluis Sanchez <lluis@ximian.com>
30476 * object.h: Added call_type field to MonoMethodMessage and the corresponding
30477 enumeration of values. Removed fields to store remote call output values in
30478 MonoAsyncResult. Not needed any more.
30479 * object.c: Initialize call_type and async_result fields in mono_message_init.
30480 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
30481 dispatching the message.
30482 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
30483 async call to finish. To do it use a message with EndInvoke call type.
30485 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
30487 * loader.h loader.c (mono_method_hash_marhal_info): New function which
30488 determines whenever a method has marshalling info.
30490 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30492 * assembly.c: fix the build on windows.
30494 2003-08-22 Lluis Sanchez <lluis@ximian.com>
30496 * object.cs: Fixed bug #47785.
30498 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
30500 * string-icalls.c (StringReplace): If their are no occurances of
30501 the old string found return a reference to the supplied
30502 string. This saves some memory and matches MS behavoir.
30504 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30506 * socket-io.c: fixed compilation for systems that define AF_INET6
30507 and don't define SOL_IP/SOL_IPV6.
30509 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
30511 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
30512 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
30514 * rawbuffer.c rawbuffer.h: Make this module thread safe.
30516 * domain.c: Make this module thread safe.
30518 * domain.c (mono_init): Call new initialization function.
30520 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
30521 reference types too. Fixes #38812.
30523 * image.c (mono_image_init): Fixed warnings.
30525 * class.c (mono_class_from_typeref): Handle assembly load failure
30528 * appdomain.c (add_assemblies_to_domain): Handle the case when
30529 the references of an assembly are not yet loaded.
30531 * metadata.c image.c assembly.c: Moved initialization of global
30532 variables to a separate function called at startup since lazy
30533 initialization of these variables is not thread safe.
30535 * image.c assembly.c: Made this module thread safe by adding locks in
30536 the appropriate places.
30538 * domain.c (mono_init): Call the new initialization functions of the
30541 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
30543 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
30544 make a direct call. It is proxy's work to make the call asynchronous.
30545 mono_delegate_end_invoke(): If the targe is a proxy, just collect
30547 * object.cs: mono_method_call_message_new(): read AsyncResult and
30548 state object from parameters list, if this info is requested.
30549 * object.h: Added fields to store remote call output values in
30550 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
30552 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
30554 * object.h: add needed fields to MonoThread.
30555 * threads.c, threads.h: allow registering a function to cleanup data
30556 allocated per thread by the JIT.
30558 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
30560 * loader.h: portability fix by Bernie Solomon
30561 * <bernard@ugsolutions.com>.
30563 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
30565 * reflection.h reflection.c (mono_param_get_objects): Changed this to
30566 return a MonoArray. This simplifies the code and also ensures that
30567 the cache allways contains an object reference as a value.
30569 * icall.c (ves_icall_get_parameter_info): Simplified using the new
30572 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30574 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
30575 fixes a problem with byte ordering when getting the address family for
30578 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
30580 * .cvsignore: Added monosn.
30582 * reflection.h reflection.c loader.c: Added support for parameter
30583 marshalling to dynamically created types. Fixes #47295.
30585 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
30587 * rand.c: remove useless warnings.
30589 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
30591 * class.c: implemented ldtoken for methods and fieldrefs.
30593 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30595 * threadpool.c: when mono_async_invoke was called, no one took care of
30596 monitoring the queue. So if the method invoked took some time and we
30597 got new async invoke requests after 500 ms (the thread created waited
30598 that long in WaitForSingleObject), the new async invoke was not called
30599 until the previous one finished.
30601 This is fixed now. Thanks to Totte for helping with it.
30603 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30605 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
30607 2003-08-11 Martin Baulig <martin@ximian.com>
30609 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
30611 2003-08-06 Martin Baulig <martin@ximian.com>
30613 * mono-debug-debugger.c: Added support for static fields,
30614 properties and methods.
30616 2003-08-06 Martin Baulig <martin@ximian.com>
30618 * mono-debug-debugger.c: Don't store the MonoString's vtable to
30619 make this work for applications with multiple application domains.
30621 2003-08-04 Martin Baulig <martin@ximian.com>
30623 * mono-debug-debugger.c: Completely reworked the type support; the
30624 most important thing is that we're now just using one single
30625 `MonoType' instance per type.
30627 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
30629 * mono-endian.h, mono-endian.c, icall.c: Added icall
30630 ves_icall_System_Double_AssertEndianity to assert double word endianity
30631 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
30633 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
30635 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
30636 support, icalls and fixes.
30638 2003-07-31 Miguel de Icaza <miguel@ximian.com>
30640 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
30641 classes that are a punctuation character in .NET is not the same a
30644 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
30646 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
30648 2003-07-29 Miguel de Icaza <miguel@ximian.com>
30650 * icall.c: Add new MemCopy internalcall.
30651 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
30652 Simplified code; It is not necessary to handle all the cases here,
30653 as the C# code takes care of it. Only handle the case of the name
30654 resource embedded into the assembly.
30656 Changed signature to return the data pointer and the size of the
30659 2003-07-26 Miguel de Icaza <miguel@ximian.com>
30661 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
30662 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
30664 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
30666 * socket-io.c: ignore EINTR error in select.
30668 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
30670 * class.h, class.c: removed unused subclasses field in MonoClass.
30672 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
30674 * icall.c: improve fix of get_base_definition(). If the parent class
30675 doesn't have the mehod, look at the parent of the parent.
30676 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
30677 to check if a parameter is an in or out parameter
30678 (PARAM_ATTRIBUTE_IN is not set by default).
30679 mono_method_return_message_restore(): Use mono_class_value_size to
30680 get the size of a value type. mono_type_stack_size (parameterType)
30681 does not return the correct value if parameterType is byRef.
30682 mono_load_remote_field(), mono_load_remote_field_new(),
30683 mono_store_remote_field(), mono_store_remote_field_new():
30684 raise exception if the remote call returns an exception.
30686 2003-07-28 Martin Baulig <martin@ximian.com>
30688 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
30689 method. This is a wrapper around mono_runtime_invoke() which
30690 boxes the instance object if neccessary.
30692 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
30694 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
30695 metadata.h, row-indexes.h, verify.c: first cut of generics support.
30697 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
30699 * icall.c: disable mcs bug workaround.
30701 2003-07-21 Miguel de Icaza <miguel@ximian.com>
30703 * object.c (mono_runtime_class_init): Take the metadata_section
30704 mutex before obtaining the domain mutex.
30706 * appdomain.h: Added definition of metadata_section mutex here.
30708 * object.c: define metadata_mutex here.
30710 2003-07-24 Ravi Pratap <ravi@ximian.com>
30712 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
30715 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
30717 * reflection.c: Fix bug #46669
30719 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30724 * object.h: fill in the type name for TypeLoadException.
30726 2003-07-23 Ravi Pratap <ravi@ximian.com>
30728 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
30729 relationship between TypeBuilders while compiling corlib) and bug
30730 45993 (Array types returned from the runtime while compiling
30731 corlib were from the loaded corlib).
30733 2003-07-22 Martin Baulig <martin@ximian.com>
30735 * mono-debug-debugger.c: Reworked the type support a bit more;
30736 distinguish between types and classes.
30738 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
30740 * icall.c: add IsArrayImpl icall.
30742 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
30744 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
30745 initializing real_size only once. Also fix bug #46602.
30747 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
30749 * object.c: Renamed mono_metadata_section to metadata_section.
30751 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
30753 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
30754 empty array if the type is an array. Fixed.
30755 ves_icall_MonoMethod_get_base_definition: if the base method
30756 is abstract, get the MethodInfo from the list of methods of
30758 * reflection.c: ParameterInfo.PositionImpl should be zero-based
30759 and it was 1-based. Fixed in mono_param_get_objects.
30761 2003-07-20 Martin Baulig <martin@ximian.com>
30763 * mono-debug.h: Set version number to 31.
30764 (mono_debug_init): Added `MonoDomain *' argument.
30766 * mono-debug-debugger.c: Reworked the type support; explicitly
30767 tell the debugger about builtin types; pass the `klass' address to
30770 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
30772 * image.c: Allow new metadata tables to be loaded without a
30773 warning. Also update the warning message to give the new constant value.
30775 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
30777 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
30778 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
30779 array type representation changes.
30781 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
30783 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
30784 on Environment.Exit () call.
30786 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
30788 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
30789 requires a matching corlib.
30791 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
30793 * Changelog: My editor decided to add a CR to each line. Sorry about that.
30794 Committed again without the CRs.
30796 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
30798 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
30799 getting it from the "this" socket instance. Did not work
30800 if the socket is a subclass of Socket.
30801 Also fixed bug #35371.
30803 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
30805 * metadata.c: fixed size for TypedByRef.
30806 * loader.c: when searching for a method, consider the vararg amrker.
30807 * unicode.c, decimal.c: constify some arrays.
30809 2003-07-15 Dick Porter <dick@ximian.com>
30811 * socket-io.c: Fixed compilation for gcc < 3.2.
30813 Fixed compilation for machines that don't have AF_INET6 (thanks to
30814 Bernie Solomon <bernard@ugsolutions.com> for that part.)
30816 Fixed compile warnings.
30818 Fixed formatting and line endings.
30820 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
30823 * socket-io.c: Added IPv6 support.
30825 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
30827 * class.c (mono_class_is_assignable_from): New function to implement
30828 the is_assignable_from logic. Used by mono_object_isinst,
30829 Type::IsAssignableFrom () and the interpreter.
30831 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
30832 Object, even interfaces.
30834 * object.c (mono_object_isinst): Implement in terms of
30835 is_assignable_from.
30837 * icall.c (ves_icall_type_is_assignable_from): New icall.
30839 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
30841 * domain.c (foreach_domain): fix compiler warning.
30843 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
30845 * image.c (load_metadata_ptrs): use g_strndup because strndup is
30846 not available on all plattforms
30848 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
30850 * image.h image.c: Store the metadata version string in MonoImage.
30851 * icall.c: New icall to retrieve the image version.
30852 * reflection.c (create_dynamic_image): Fill in the image version field
30853 * reflection.c (build_compressed_metadata): Use the image version
30854 from the image structure.
30856 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30858 * appdomain.c: modified comment.
30859 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
30860 That will be its last iteration when mono_gc_cleanup is called from
30861 mono_runtime_cleanup and before the domain is unloaded.
30865 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
30867 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
30870 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
30872 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
30873 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
30874 Bernie Solomon <bernard@ugsolutions.com>.
30876 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
30878 * object.c, object.h: provide mono_object_new_fast() for faster
30879 allocation in some special cases.
30881 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
30883 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
30884 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
30886 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
30888 * threadpool.c: fix leaks.
30890 2003-07-01 Dick Porter <dick@ximian.com>
30892 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
30893 using MonoGHashTables. Fixes threadpool bug posted to list.
30895 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
30897 * image.h, image.c: added support to load an assembly from a byte array.
30898 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
30899 assembly bundle support.
30901 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
30903 * threadpool.c (mono_thread_pool_add): keep a reference to the
30904 AsyncResult to prevent GC
30906 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
30908 * class.c: leak fix.
30910 2003-06-25 Dick Porter <dick@ximian.com>
30912 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
30913 for the async object, the WaitHandle object will close the handle.
30916 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
30918 * class.c: in mono_array_class_get (), lookup from the hash with the
30919 same type we insert: this works around a bug in
30920 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
30921 lluis. The real fix will have to wait for after the release.
30923 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
30925 * icall.c: fix memory leak when getting type members.
30927 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
30929 * reflection.c: added more pubtoken special cases.
30931 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
30933 * class.c: handle field offset correctly when class size
30934 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
30936 2003-06-20 Martin Baulig <martin@ximian.com>
30938 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
30941 2003-06-20 Martin Baulig <martin@ximian.com>
30943 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
30945 2003-06-20 Martin Baulig <martin@ximian.com>
30947 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
30948 just distinguish between variables in registers and variables at
30949 an offset relative to a register.
30951 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30953 * icall.c: #ifdef out latest changes until mcs is fixed.
30955 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
30957 * icall.c: return members in metadata order.
30959 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
30961 * icall.c: avoid infinite loop in GetTimeZoneData.
30963 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
30965 * icall.c: added Marshal.Prelink/All icalls.
30967 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
30969 * object.c, object.h: fix warnings and do some overflow checking
30970 when creating arrays.
30972 2003-06-17 Dick Porter <dick@ximian.com>
30975 * file-io.c: File attributes need to be tweaked slightly when
30976 passed from the managed to the w32 world.
30978 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
30979 * profiler.h profiler-private.h profiler.c: Rework last patch
30980 based on suggestion by Paolo.
30982 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
30984 * profiler.h profiler-private.h profiler.c: Added infrastructure for
30985 instruction level coverage data collection.
30986 * profiler.h profiler.c (: Added new callback function which can be
30987 used by the profiler to limit which functions should have coverage
30989 * profiler.c (mono_profiler_load): Call g_module_build_path to
30990 generate the file name of the profiler library.
30992 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
30994 * profiler.c, profiler.h, profiler-private.h: added basic block
30995 coverage profiling API.
30997 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
30999 * reflection.c (mono_reflection_create_runtime_class): Add support
31000 for events in dynamically generated code.
31002 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
31005 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
31007 * icall.c: when getting timezone info, return reasonable values if we
31008 can't get the actual data.
31010 2003-06-14 Dick Porter <dick@ximian.com>
31012 * threads.c (start_wrapper): Remove the reference to the thread
31013 object in the TLS data, so the thread object can be finalized.
31014 This won't be reached if the thread threw an uncaught exception,
31015 so those thread handles will stay referenced :-( (This is due to
31016 missing support for scanning thread-specific data in the Boehm GC
31017 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
31019 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
31021 * reflection.c: ensure streams and tables are first allocated with
31022 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
31024 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
31026 * icall.c: fixed GetElementType for byrefs (bug# 44792).
31028 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
31030 * reflection.c (mono_reflection_create_runtime_class): Add support for
31031 properties to dynamically created classes.
31032 * reflection.c: Fix a few places where non-MonoObjects were inserted
31033 into the tokens hashtable.
31035 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
31037 * object.c: some support to handle out of memory exceptions.
31039 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
31041 * marshal.c (mono_marshal_get_native_wrapper): support reference
31044 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
31046 * object.h, object.c: more portability stuff from Bernie Solomon.
31047 Unexport mono_object_allocate(). Added mono_object_unbox ().
31048 Set exitcode when an unhandled exception is thrown.
31050 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
31052 * marshal.c (mono_marshal_get_native_wrapper): use custom
31053 marshaler for return types.
31055 2003-06-10 Dick Porter <dick@ximian.com>
31057 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
31058 ip_mreq is available
31060 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
31062 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
31063 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
31064 by Bernie Solomon <bernard@ugsolutions.com>.
31066 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
31068 * gc.c (mono_gc_init): Avoid error message on shutdown when
31069 GC_DONT_GC=1 is used.
31071 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
31072 New icall to return the GUID of a module.
31074 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
31076 * class.c: ensure instance size always includes the parent's size
31077 even whem class size is set explicitly (fixes bug#44294).
31079 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
31081 * profiler.h, profiler.c: made the simple profiler thread-safe,
31082 get more accurate timing info. Allow the loading of an
31083 externally-developed profiler module.
31085 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
31087 * marshal.c (mono_marshal_get_native_wrapper): improved
31088 class/byref arguments.
31089 (mono_marshal_get_native_wrapper): better string marshaling support.
31091 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
31093 * class.c: ensure .pack and .size are handled correctly and
31094 simplified layout of static fields.
31096 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
31099 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
31101 * loader.c (mono_lookup_pinvoke_call): look for modules in the
31102 current directory (fix bug 44008)
31104 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
31106 * marshal.c (mono_marshal_get_native_wrapper): started support for
31108 (mono_delegate_to_ftnptr): consider marshalling specifications
31110 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
31112 * reflection.c, reflection.h: emit custom marshal info.
31114 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31116 * object.c: free the GError.
31117 * icall.c: added CloseEvent_internal.
31119 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
31122 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
31124 * loader.c (mono_method_get_signature): Add support for dynamic
31127 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
31129 * reflection.c: fixed bug #43905.
31131 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
31133 * class.c, domain.c, icall.c, metadata.h, object.h: support for
31134 handling TypedReference and ArgIterator.
31135 * loader.c, loader.h: added function to get signature at call site.
31137 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
31139 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
31140 data readonly. Buglets and warning fixes. Some MethodSpec support.
31142 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
31144 * class.h, class.c, object.c: remove relative numbering support.
31146 2003-05-26 Miguel de Icaza <miguel@ximian.com>
31148 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
31149 free the string, until we get a chance to fix Gtk#
31151 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31153 * marshal.c: revert last patch.
31155 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
31157 * icall.c: updates for new mono_class_vtable() not calling
31158 the type constructor anymore.
31160 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
31162 * object.h, object.c: separate vtable creation from type
31163 initialization. Make running the .cctor thread safe.
31165 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
31167 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
31169 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
31171 * loader.c (mono_get_method): consider calling convention
31173 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
31175 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
31176 to return the invisible global type for a module.
31178 * reflection.c (mono_image_build_metadata): Emit global fields too.
31180 2003-05-20 Peter Williams <peterw@ximian.com>
31182 * loader.c (mono_lookup_internal_call): Add a few newlines.
31184 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
31186 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
31189 * appdomain.c (set_domain_search_path): Recalculate search path when
31190 AppDomainSetup.PrivateBinPath changes.
31192 * object.c (mono_class_compute_gc_descriptor): It turns out some
31193 parts of the class libs (like System.Thread) holds pointers to
31194 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
31195 to treat native int a pointer type here.
31197 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
31199 * appdomain.h, domain.c: add hashtable for jump target resolution.
31201 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
31203 * reflection.h reflection.c icall.c: Added new icalls
31204 GetManifestResourceInfoInternal, GetModulesInternal and support
31207 2003-05-16 Dick Porter <dick@ximian.com>
31211 * file-io.c: Implement System.IO.MonoIO::GetTempPath
31213 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
31215 * object.c: mono_store_remote_field: little fix to previous patch.
31217 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
31219 * class.c: add constructors to array classes.
31220 * icall.c: special case array construction for InternalInvoke (),
31222 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
31224 * class.h class.c reflection.c object.c: Added support for field
31225 defaults in dynamically generated classes.
31227 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
31229 * reflection.c: properly encode charset for ddlimport.
31231 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
31233 * threads.c: allow compiling without GC.
31235 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
31237 * appdomain.h, object.c, object.h, threads.c, threads.h: added
31238 handling of thread static data.
31240 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
31242 * reflection.h, reflection.c: added mono_custom_attrs_free ().
31244 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
31246 * class.c (mono_array_class_get): always set the serializable flags
31247 (mono_array_class_get): always set the SEALED attribute for array types
31249 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
31251 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
31252 attributes (fix for bug 42021).
31254 2003-05-12 Dick Porter <dick@ximian.com>
31256 * gc.c: Don't run finalizers when the finalizer thread is
31257 finishing up, because the default domain has already been
31260 2003-05-11 Miguel de Icaza <miguel@ximian.com>
31262 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
31263 value is null, we should throw an exception. This is slightly
31264 different than the other conventions used for the constructor.
31266 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31268 * socket-io.c: fixed windows build.
31270 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31272 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
31274 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
31276 * object.c (mono_string_new_wrapper): Compatibility fix for MS
31279 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
31281 * class.c (mono_class_layout_fields): Add experimental GC aware
31282 auto layout facility. Requires class library changes to work correctly.
31284 (mono_class_setup_vtable): Avoid overriding explicit interface
31285 method implementations. Fixes iface3.exe test.
31287 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
31289 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
31290 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
31292 * metadata.h: Add new type classification macro which determines
31293 whenever the type holds an object reference.
31295 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
31297 * marshal.c (mono_marshal_get_native_wrapper): cleanups
31299 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
31301 * gc.c (finalizer_thread): Work around a GC bug.
31303 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
31305 * marshal.c (emit_struct_conv): allow unions
31307 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
31309 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
31311 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
31313 2003-05-06 Martin Baulig <martin@ximian.com>
31315 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
31317 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31320 (Select_internal): allow NULLs, don't create arrays if not needed.
31321 Coupled with Socket.cs changes.
31324 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
31325 register a finalizer for it that will close the semaphore handle. This
31326 fixes the leak and make Lupus' test run with > 4080 loops.
31328 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
31330 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
31331 Jerome Laban (bug #42287)
31333 2003-05-02 Martin Baulig <martin@ximian.com>
31335 * debug-mono-symfile.h
31336 (MonoSymbolFile): Moved declaration into mono-debug.h.
31337 (MonoDebugMethodJitInfo): Likewise.
31338 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
31340 (_mono_debug_address_from_il_offset): Take a
31341 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
31344 (MonoDebugDomainData): New struct.
31345 (mono_debug_get_domain_data): New function.
31346 (mono_debug_add_method): Take an additional `MonoDomain *'
31348 (mono_debug_source_location_from_address): Likewise.
31349 (mono_debug_il_offset_from_address): Likewise.
31350 (mono_debug_address_from_il_offset): Likewise.
31352 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
31354 * reflection.c: one more check for null type in custom attrs.
31356 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31358 * reflection.c: avoid warning (comparison is always false due to limited
31359 range of data type).
31361 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31363 * icall.c: throw an exception in Type.GetField if the argument 'name'
31366 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
31368 * reflection.c: fixed handling of enums in named arguments to custom
31369 attributes (bug #42123).
31371 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
31373 * reflection.c: use the right array element type and handle
31374 a null for a Type argument, too.
31376 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
31378 * reflection.c: handle arrays as arguments to custom attributes.
31380 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
31382 * reflection.c: handle a string value in a custom attr
31383 ctor that takes an object.
31385 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
31387 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
31390 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
31392 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
31394 2003-04-27 Martin Baulig <martin@ximian.com>
31396 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
31397 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
31398 MONO_DEBUGGER_EVENT_BREAKPOINT.
31399 (mono_breakpoint_trampoline_code): Removed.
31400 (mono_debugger_event_handler): The last argument is now a
31402 (mono_debugger_insert_breakpoint_full): Removed the
31403 `use_trampoline' argument.
31404 (mono_debugger_method_has_breakpoint): Likewise.
31405 (mono_debugger_trampoline_breakpoint_callback): Renamed to
31406 mono_debugger_breakpoint_callback(); take the method and
31407 breakpoint number as arguments.
31409 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
31411 * metadata.c: fix off by one when loading parameters attributes.
31413 2003-04-24 Martin Baulig <martin@ximian.com>
31415 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
31417 2003-04-24 Martin Baulig <martin@ximian.com>
31419 * mono-debug-debugger.c: Moved all code which interacts with the
31420 Mono Debugger here.
31422 * debug-mono-symfile.c: This code now just deals with the symbol
31423 file itself, the debugger code is now in mono-debug-debugger.c.
31425 2003-04-23 Martin Baulig <martin@ximian.com>
31427 * mono-debug.c (mono_debug_source_location_from_il_offset):
31428 New method; like mono_debug_source_location_from_address(), but
31429 takes an IL offset instead of a machine address.
31431 2003-04-23 Martin Baulig <martin@ximian.com>
31433 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
31434 `line' field; this is now computed by the debugger.
31436 2003-04-23 Martin Baulig <martin@ximian.com>
31438 * mono-debug.[ch]: New files. This is the new debugging interface.
31440 * mono-debug-debugger.[ch]: New files. Moved all code which
31441 interacts with the Mono Debugger here.
31443 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
31445 * domain.c (mono_init): initialize mono_defaults.monitor_class
31447 2003-04-21 Miguel de Icaza <miguel@ximian.com>
31449 * reflection.c (method_encode_code): Add a spicy exception to help
31450 future compiler authors.
31452 2003-04-21 Martin Baulig <martin@ximian.com>
31455 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
31456 Make this work with relative pathnames; g_filename_to_uri() needs
31457 an absolute filename.
31459 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
31461 * icall.c: Track name changes in Object and ValueType.
31463 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
31465 * metadata.c (mono_type_stack_size): size should be a multiple of
31468 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31471 (internal_domain_finalize): moved into mono_domain_finalize. No need
31472 to create another thread because the finalizers will be run in the
31475 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
31476 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
31477 to be run (MS does this too).
31479 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
31481 * object.c (mono_class_compute_gc_descriptor): Update comment.
31483 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
31485 * image.h: Add synchronized wrapper cache.
31487 * image.c (do_mono_image_open): Initialize cache.
31489 * reflection.c (create_dynamic_mono_image): Initialize cache.
31491 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31493 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
31494 ves_icall_System_Buffer_ByteLengthInternal.
31496 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
31498 * reflection.c: setup klass->nested_in earlier. Allow
31499 a dash in the assembly name.
31501 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
31503 * metadata.c (mono_type_to_unmanaged): dont access
31504 type->data.klass for MONO_TYPE_OBJECT
31505 (mono_type_to_unmanaged): consider System.Delegate class
31507 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
31509 * class.c: just setup supertypes in the proper place instead of
31510 initializing the full element class for arrays.
31512 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
31514 * class.c: ensure the element class of arrays is initialized.
31515 Setup the supertype info for array classes, too.
31517 2003-04-14 Miguel de Icaza <miguel@ximian.com>
31519 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
31521 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31523 * Makefile.am: re-added -m option when running cygpath. This way,
31524 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
31526 * mono-config.c: same codepath for locating mono config file for WIN32
31528 * assembly.c: if mono_assembly_setrootdir is called, don't override
31531 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31533 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
31534 MONO_ASSEMBLIES variable.
31536 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
31538 * icall.c: added Assembly::GetNamespaces() icall.
31540 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31542 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
31544 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
31546 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
31547 * object.c: fixed bug in the construction of vtable for proxies
31549 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
31551 * object.c (mono_array_new): Mark mono_array_new as an icall.
31553 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31555 * class.c: fixed test for public method when overriding interfaces.
31558 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
31560 * appdomain.h, domain.c: added mono_domain_foreach() to
31561 be able to access the currently loaded appdomains.
31562 * object.c: make string interning work across sppdomains.
31563 Mark some functions for use as icalls.
31565 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
31567 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
31569 * reflection.h reflection.c: Allocate long living data using
31570 GC_MALLOC_ATOMIC so the collector does not need to scan it.
31572 * reflection.c: Double the allocation size in streams instead of
31573 increasing it, to prevent unneccesary copying on large assemblies.
31575 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
31576 creation if the assembly does not have the Run flag set.
31578 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
31580 * class.h: avoid the C++ keywords in header files (Jerome Laban
31581 spotted and fixed this).
31583 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31586 (mono_unhandled_exception): fill in the arguments for the
31587 UnhandledException event. Only trigger that event for the default
31588 domain (as MS does).
31590 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
31592 * object.c: Improve typed allocation stuff based on suggestions from
31593 Paolo. Also turn it on if the GC library supports it.
31595 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
31597 * object.c object.h class.h: Added experimental typed allocation
31598 facility using the interfaces in gc_gcj.h.
31600 * os/gc_wrapper.h: Added new include files.
31602 2003-04-03 Martin Baulig <martin@ximian.com>
31604 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
31605 which is not yet enabled by default.
31607 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
31609 (mono_gc_lock, mono_gc_unlock): New static functions.
31611 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
31612 functions; stop/start the world for the garbage collector. This
31613 is using the windows API; we need to complete the SuspendThread()/
31614 ResumeThread() implementation in the io-layer to make this work on Unix.
31615 (mono_gc_push_all_stacks): New public function; tells the garbage
31616 collector about the stack pointers from all managed threads.
31618 2003-04-03 Martin Baulig <martin@ximian.com>
31620 * object.h (MonoThread): Added `gpointer stack_ptr'.
31622 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
31624 2003-04-03 Martin Baulig <martin@ximian.com>
31626 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
31628 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
31630 * reflection.c (typebuilder_setup_fields): Initialize field.first and
31633 2003-04-02 Miguel de Icaza <miguel@ximian.com>
31635 * loader.c (mono_lookup_internal_call): Report the corlib that is
31638 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
31640 * icall.c (ves_icall_type_GetTypeCode): fixed check for
31641 System.DBNull (it's class not valuetype).
31643 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
31645 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
31646 if the array method was already assigned a token (fixes bug#40646).
31648 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
31650 * reflection.c (mono_reflection_get_type): Attempt type resolve even
31651 if no assembly is given.
31653 2003-04-01 Miguel de Icaza <miguel@ximian.com>
31655 * metadata.h: Added the new tables.
31657 * row-indexes.h: Added definitions for new tables.
31659 * metadata.c: Add schemas for new tables, and add support for
31660 computing the sizes of them.
31662 * class.c: Update for handling the new type cases.
31664 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
31666 * metadata.h (MONO_TYPE_IS_VOID): new macro
31668 2003-03-31 Martin Baulig <martin@ximian.com>
31670 * threads.h (MonoThreadCallbacks): Added `thread_created'.
31672 * threads.c (mono_thread_new_init): Call `thread_created' in the
31673 mono_thread_callbacks.
31675 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
31677 * loader.h: added marshalbyrefobject_class to mono_defaults
31678 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
31679 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
31680 generation of output parameters.
31681 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
31682 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
31683 contextbound and the target object belongs to the context of the caller.
31684 * object.h: added context and unwrapped_server variables in MonoRealProxy.
31685 * object.c: Implemented support for interfaces and abstract classes
31686 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
31687 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
31689 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
31691 * class.h class.c (mono_class_is_subclass_of): New function.
31693 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
31694 routines for most common case (calls from ArrayList::ToArray).
31696 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
31697 routine so programs which call Environment::Exit() can be profiled.
31699 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
31700 Added MONO_ARCH_SAVE_REGS.
31702 * icall.c (ves_icall_type_is_subtype_of): Use new function.
31704 2003-03-29 Miguel de Icaza <miguel@ximian.com>
31706 * blob.h: Add a couple of new MonoType types definitions.
31708 * tabledefs.h: Add a couple of new call convs.
31710 2003-03-27 Zoltan Varga <vargaz@freemail.h>
31712 * reflection.h (MonoReflectionDynamicAssembly): track changes in
31713 the layout of the class.
31715 * reflection.c (alloc_table): double the size on overflow to avoid
31716 unnecessary copying.
31718 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
31719 avoid filling out metadata tables and blobs. Also set mb->ilgen to
31720 null so it can be garbage collected.
31722 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
31724 * reflection.c (mono_reflection_get_type): Return the resolved type
31725 only if it is in the assembly we searched.
31727 * reflection.c (ensure_runtime_vtable): Initialize method slots.
31729 * class.c (mono_class_setup_vtable): Set the slot of the overriding
31732 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31735 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
31736 the right one is 'file:///blah', but MS allows it.
31738 (mono_assembly_open): allow 'file://blah'
31740 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
31742 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
31744 * socket-io.c: fixes bug #40310.
31746 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
31748 * reflection.c (mono_reflection_parse_type): handle deeply nested
31751 * reflection.c (mono_image_create_token): Use unique token values
31752 since they will be put into a hash table.
31754 * class.c (mono_class_setup_vtable): If a method occurs in more than
31755 one place in the vtable, and it gets overriden, then change the
31756 other occurances too.
31758 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
31759 object as return type.
31761 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
31763 * icall.c: Deleted "ToString" implementation for double and float
31764 because they are full implemented in managed code.
31766 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
31768 * reflection.c, reflection.h: implemented and exported functions
31769 to retrieve info about custom attributes.
31771 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31773 * appdomain.c: moved Uri handling to assembly.c
31774 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
31775 work when using a file Uri in *nix and windows.
31777 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
31778 GetReferencedAssemblies.
31780 2003-03-18 Dick Porter <dick@ximian.com>
31782 * icall.c: Rename a couple of internal calls
31784 * threads.c: Set the thread state to Stopped when a thread exits.
31787 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
31789 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
31792 * object.c (mono_class_vtable): fix warning.
31794 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
31796 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
31798 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
31800 (method_encode_clauses): Create exception info structures in the right
31802 (mono_reflection_setup_internal_class): Initialize supertypes field.
31804 * class.c object.c: Handle interfaces which implement other interfaces
31807 * class.h class.c: Move the supertypes array initialization code into
31808 a separate function so it can be used for dynamic types too. Also call
31809 it earlier, in mono_class_init(), since it can be used before the
31810 type is initialized.
31812 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31816 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
31821 * object.c: remove warnings.
31823 2003-03-13 Martin Baulig <martin@ximian.com>
31825 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
31826 (MonoDebugLexicalBlockEntry): New types.
31828 * debug-mono-symfile.c
31829 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
31831 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31833 * process.c: ret can be any non-zero value accroding to MS doc.
31835 2003-03-07 Miguel de Icaza <miguel@ximian.com>
31837 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
31838 fixing a warning for a miss-used prototype, would have cause
31839 random memory corruption.
31841 2003-03-07 Martin Baulig <martin@ximian.com>
31843 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
31844 getting really annoying ....
31846 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
31848 * reflection.c (fixup_method): added support for array methods.
31850 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
31852 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
31853 (pointed out by Michael Adams).
31855 2003-03-04 Dick Porter <dick@ximian.com>
31857 * icall.c: Temporarily reverted the Double and Single ToString()
31858 change, because it broke nunit.
31860 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
31862 * object.h, threads.h: make include files compatible with C++
31863 (patch by Jerome Laban <jlaban@wanadoo.fr>).
31865 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
31867 * icall.c: Erased ToString helper functions for Double and Single.
31868 Now, that implementations ar all in managed code (Double and Single
31871 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
31873 * appdomain.c: Added method for initializing the default context of
31874 a domain. Added internal call for getting the default context.
31875 * appdomain.h: Added context variable in MonoDomain struct.
31876 * domain.c: mono_domain_set also sets the default context of the domain
31877 * icall.c: Mapped internal method InternalGetDefaultContext.
31878 * object.c: mono_object_get_virtual_method returns always a remoting
31879 wrapper if the object is a transparent proxy.
31880 mono_runtime_invoke_array: when creating an object by calling the
31881 constructor, if the created object is a proxy, then the constructor should
31882 be called using the a remoting wrapper.
31884 2003-03-03 Dick Porter <dick@ximian.com>
31886 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
31887 variable so it compiles on solaris. Problem spotted by
31888 Christopher Taylor <ct@cs.clemson.edu>
31890 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31893 (get_info_from_assembly_name): don't leak value.
31896 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
31899 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
31901 * assembly.c: export mono_image_load_references ().
31902 * class.c: handle function pointers. mono_class_from_name() now
31903 supports nested type names directly.
31905 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
31907 * reflection.h reflection.c: Encode already created dynamic methods
31908 and fields correctly as a DEF instead of a REF.
31910 * reflection.c: Get rid of the force_ref argument to
31911 mono_image_typedef_or_ref since it was wrong in the first place.
31913 * string-icalls.c: add error checking to string constructors according
31916 * reflection.c: Emit types in the order their TypeBuilders were
31917 created. Previously, a new table index was assigned to each type before
31918 the tables were emitted. This was wrong because the signature blob
31919 might already refer to a type by its original table index.
31921 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
31923 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
31926 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31928 * Makefile.am: make assemblies dir have \ instead of / on windows.
31930 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
31932 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
31933 iterate over the NESTEDCLASS table using a linear search since the
31934 table is not guaranteed to be sorted by the secondary key.
31936 * class.c (mono_class_create_from_typedef): fixed up call to
31937 mono_metadata_nesting_typedef.
31939 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
31941 * marshal.c (mono_string_to_byvalstr): clear the memory as
31942 suggested by Jerome Laban <jlaban@wanadoo.fr>
31944 2003-02-26 Dick Porter <dick@ximian.com>
31946 * process.c: Cope with padding in .rsrc blocks
31948 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
31950 * metadata.h: reverted the filter_len change, it breaks reflection
31952 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
31954 * metadata.h: added a new field to store the filter_len
31957 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
31959 * reflection.c: handle custom attributes for types and members
31960 created with Reflection.Emit (bug#38422).
31962 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
31964 * reflection.c: define RTSpecialName automatically for constructors for
31965 compatibility with MS.NET.
31967 * reflection.c (mono_reflection_create_runtime_class): initialize
31968 nested_in field of dynamically created classes.
31970 2003-02-22 Martin Baulig <martin@ximian.com>
31972 * debug-mono-symfile.h: Incremented version number.
31974 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
31976 * object.h icall.c process.c: fix warnings.
31978 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
31980 * appdomain.h appdomain.c:
31981 (mono_domain_try_type_resolve): split the
31982 name_or_tb argument into a name and a tb argument.
31983 (mono_domain_has_type_resolve): new function to check whenever the
31984 application has registered a TypeResolve event handler.
31986 * icall.c reflection.h reflection.c: move the type resolve logic into
31987 mono_reflection_get_type () so it will be invoked when
31988 Assembly::GetType () is called.
31991 (mono_reflection_get_type): renamed to get_type_internal.
31992 (mono_reflection_get_type): fixed type name generation so it works
31993 for nested types too.
31994 (mono_reflection_get_type): call has_type_resolve () to avoid the
31995 costly type name generation if there is no resolve event handler.
31997 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
31999 * class.c, image.c: load exported types from file references.
32001 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
32003 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
32004 used to cache the managed methods used to create proxies and make
32005 remote invocation of methods.
32006 * class.h: Added in MonoVTable a flag to indicate that a class needs
32007 to be remotely created.
32008 * object.c: Modified the method mono_class_vtable(). It now initializes
32009 the remote flag of the vtable. Modified mono_object_new_specific(),
32010 so now it checks the remote flag.
32011 * icall.c: Added a couple of internal methods, one for enabling instance
32012 creation interception for a type, and one for creating objects bypassing
32015 2003-02-18 Martin Baulig <martin@ximian.com>
32017 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
32018 New interncall to get a method's metadata token.
32020 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
32021 New interncall for the debugger.
32023 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
32025 * class.c (mono_class_setup_vtable): allocate supertype array
32027 2003-02-18 Martin Baulig <martin@ximian.com>
32029 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
32031 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32034 (assembly_name_to_aname): jump over unknown properties (i've found
32035 something like: 'type, assembly, version=xxx, custom=null, public...',
32036 so now will ignore custom=null and still get the rest of the values).
32038 2003-02-17 Dick Porter <dick@ximian.com>
32040 * threads.c: Have Thread.Start() wait for a semaphore to signal
32041 that the thread has set up all its local data. This fixes bug
32042 34323, where Abort() raced the new thread's TLS data.
32044 Also removes the handle_store() call from start_wrapper, because
32045 threads are now always created suspended and there is no longer a
32046 race between the parent and child threads to store the info.
32048 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
32050 * image.c: explain the #- heap issue in a message, hopefully
32051 avoiding FAQs on mono-list.
32053 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32056 (GetEntryAssembly): if the domain has not invoked
32057 AppDomain.ExecuteAssembly yet, return the assembly of the default
32060 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
32062 * class.c (mono_ldtoken): make it work in dynamic assemblies.
32064 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
32066 * metadata.c, reflection.c: simple speedup to type hash
32069 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
32071 * image.c, image.h, class.c, assembly.c: move module loading
32072 to MonoImage. When loading metadata, consider alignemnet from
32073 the start of metadata, not from the metadata address in memory.
32075 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
32077 * reflection.c (mono_reflection_get_custom_attrs): Added support for
32078 AssemblyBuilder objects. Factored out custom attribute creation into
32079 a separate function.
32080 (create_custom_attr): new function to create custom attributes.
32082 2003-02-12 Miguel de Icaza <miguel@ximian.com>
32084 * Makefile.am: Got tired of typing the full pathname to pedump.
32085 Until there is another option, am installing this.
32087 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
32089 * class.c (class_compute_field_layout): always set field->parent
32090 (mono_ldtoken): use mono_defaults.fieldhandle_class;
32092 2003-02-11 Dick Porter <dick@ximian.com>
32095 * monitor.c: Rewrote Monitor, making lock much faster and
32096 Pulse/Wait work as specified. Also uses much fewer handles, and only
32097 creates them as needed.
32099 * exception.c: Added SynchronizationLockException
32101 * threads.c: Deleted old Monitor implementation. The new one is
32104 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
32106 * class.c: handled TypedReference type code. Set the correct size for
32107 class data. Setup interface_offsets for interface classes, too.
32109 2003-02-09 Martin Baulig <martin@ximian.com>
32111 * debug-mono-symfile.h: Reflect latest symbol writer changes.
32113 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
32115 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
32116 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
32117 * object.c: fixed mono_object_get_virtual_method () for interfaces.
32118 * verify.c: check for code that runs after the end of the method.
32120 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
32122 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
32123 "System.Math::Round2".
32124 * sysmath.h: Added Floor, Round and Round2 definitions.
32125 * sysmath.c: Modified certain functions that were not 100% compliant
32126 with MS.NET (math precision) and added the implementation of Floor,
32129 2003-02-07 Martin Baulig <martin@ximian.com>
32131 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
32133 2003-02-07 Martin Baulig <martin@ximian.com>
32135 * debug-mono-symfile.c: Reflected latest symwriter changes.
32136 (mono_debug_create_mono_symbol_file): Removed.
32137 (mono_debug_open_mono_symbol_file): Take an argument which
32138 specifies whether to create a dynamic symbol file.
32140 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
32142 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
32144 2003-02-05 Martin Baulig <martin@ximian.com>
32146 * reflection.c (mono_image_build_metadata): Make this public,
32147 protect it against being called multiple times, don't create
32148 resources and don't build the compressed metadata here.
32149 (mono_image_create_pefile): Do this here.
32152 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
32154 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32156 * socket-io.c: fixed bug #36322.
32158 2003-02-06 Piers Haken <piersh@friskit.com>
32162 * debug-mono-symfile.c:
32168 * socket-io.c: warning cleanups
32170 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
32172 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
32173 function. works like remoting invoke, but does a check for the Proxy first.
32175 2003-02-05 Miguel de Icaza <miguel@ximian.com>
32177 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
32179 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
32181 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
32183 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
32184 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
32186 * object.c (mono_store_remote_field_new): used by the new jit
32187 instead of mono_store_remote_field
32188 (mono_load_remote_field_new): used by the new jit
32189 instead of mono_load_remote_field
32191 2003-02-05 Patrik Torstensson
32193 * appdomain.c: changed unload to take the domain id instead
32196 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
32199 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32201 * appdomain.c: don't look for assemblies in ApplicationBase if
32202 PrivateBinPathProbe is set.
32204 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32206 * object.c: make the first argument in main_args contain the absolute
32207 path to the assembly. Fixes bug #37511.
32209 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32211 * icall.c: get correct UTC offset for countries not using daylight
32212 time saving. Fixes bug #30030.
32214 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32216 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
32217 and 1 are the family).
32219 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
32221 * icall.c (ves_icall_InternalExecute): removed wrong assertion
32223 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
32225 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
32227 * reflection.c: added support for SignatureHelper tokens, which is
32228 needed by the Calli opcode.
32230 * reflection.h: track changes to SignatureHelper class.
32232 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
32234 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32236 * appdomain.c: fixed loading assemblies from PrivateBinPath.
32238 2003-02-03 Patrik Torstensson
32239 * appdomain.[c|h], domain.c :
32240 - Added support for getting a domain via domain id
32241 - Support for setting and getting domain from System.AppDomain
32242 (used in cross appdomain channel)
32243 - Added support for get/set for a MonoAppContext on a thread
32244 (Context class in System.Runtime.Remoting.Contexts),
32245 - Removed hack in Get/SetData and ExecuteAssembly.
32247 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
32248 the managed world to get control when a proxy is created.
32250 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
32252 2003-02-03 Miguel de Icaza <miguel@ximian.com>
32255 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
32256 Populate the codebase field as well.
32258 2003-02-02 Martin Baulig <martin@ximian.com>
32260 * debug-mono-symfile.c
32261 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
32262 (mono_debug_symfile_add_method): Allow interncalls.
32264 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32266 * icall.c: throw parse exception if strtod fails or the string is empty.
32268 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
32270 * marshal.c: handle object type separately from defined
32273 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
32275 * marshal.c: handle NATIVE_LPSTR for strings when it's
32276 explicitly specified.
32278 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
32280 * reflection.c, reflection.h, icall.c: setup the reflection
32281 handle cache for ModuleBuilders and AssemblyBuilders.
32283 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
32285 * reflection.c (reflection_methodbuilder_to_mono_method): set
32288 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32290 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
32292 2003-01-29 Dick Porter <dick@ximian.com>
32294 * threads.c: No need for the fake_thread kludge now that Thread
32295 doesn't run a class constructor
32297 2003-01-29 Dick Porter <dick@ximian.com>
32299 * threads.c: Use g_direct_hash instead of the rather bogus
32302 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
32304 * marshal.c (mono_marshal_get_native_wrapper): add check for null
32305 (fix pinvoke12.exe)
32306 (mono_marshal_get_struct_to_ptr): generate valid IL code
32307 (mono_marshal_get_ptr_to_struct): generate valid IL code
32308 (*): correctly set sig->pinvoke, we need to memdup the signature
32311 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
32313 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
32314 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
32316 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
32318 * profiler.c: provide more callers information.
32320 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
32322 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
32324 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
32326 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
32328 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32330 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
32331 exception instead of going into an infinite loop on dates which it
32334 * string-icalls.c (ves_icall_System_String_get_Chars): raise
32335 out-of-range exception if needed.
32337 * class.c (mono_class_setup_vtable): allow a virtual method to provide
32338 an implementation for an interface method and to override an inherited
32339 method at the same time.
32340 Imagine a scenario when a virtual method is used to override a
32341 virtual abstract method in a parent class, and this same method
32342 provides an implementation for an method inherited from an interface.
32343 In this case, the interface resolution code will set im->slot, which
32344 means that the virtual method override pass will skip this method
32345 which means a pointer to the abstract method inherited from the parent
32346 will remain in the vtable of this non-abstract class.
32348 * class.c: (mono_class_setup_vtable): continue search for a real
32349 method if only an abstract method is found.
32351 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
32353 * reflection.c: add size to encoding for ByValStr and ByValArray
32354 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
32356 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32358 * class.c (mono_class_setup_vtable): pass the override info as an
32361 * class.c (mono_class_setup_vtable): set the slot of overriding methods
32364 * reflection.c (ensure_runtime_vtable); add support for method
32367 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32369 * reflection.c (resolution_scope_from_image): Hack to work to work with
32370 dynamic assemblies.
32372 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
32373 added a 'force_ref' argument to force this function to allways return
32374 a TypeRef. This is needed by mono_image_get_memberref_token ().
32376 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32378 * reflection.c (mono_image_get_type_info): interfaces really don't have
32381 * reflection.c (mono_image_basic_init): fill out missing fields of
32384 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
32385 dynamic assemblies. This is required so dynamic assemblies show up in
32386 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
32387 Type::GetType() etc. This is consistent with MS behaviour.
32389 * image.c image.h reflection.c: add newly created classes to the name
32390 cache so mono_class_get () will find them.
32392 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32394 First part of changes to get IKVM.NET running under mono.
32396 * appdomain.h, appdomain.c: added new function
32397 mono_domain_try_type_resolve() which will emit TypeResolve events.
32398 This function will call AppDomain::DoTypeResolve to do the actual work.
32400 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
32401 moved existing code dealing with dynamic tokens to a new function
32402 called mono_reflection_lookup_dynamic_token (). This function will
32403 raise TypeResolve events when appropriate. Since reflection.c is not
32404 part of libmetadata, a new hook function called
32405 mono_lookup_dynamic_token() is added to class.c which will call this.
32407 * assembly.h assembly.c: make the invoke_load_hook function public,
32408 so it can be called for dynamic assemblies.
32410 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
32412 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
32415 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
32416 MonoGHashTable, since it contains pointers to objects which the GC
32419 * assembly.c (search_loaded): remove unused variable.
32421 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
32423 * object.c: fixed issue exposed by gcc-generated IL programs
32424 that use RVA data for pointers.
32426 2003-01-25 Martin Baulig <martin@ximian.com>
32428 * threads.c (start_wrapper): Moved the initialization of
32429 `start_func' above the mono_new_thread_init() call to which we
32430 pass it as argument.
32432 2003-01-24 Martin Baulig <martin@ximian.com>
32434 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
32435 the MonoThread pointer.
32437 2003-01-21 Miguel de Icaza <miguel@ximian.com>
32439 * icall.c: Rename `PowImpl' to Pow.
32441 2003-01-23 Dick Porter <dick@ximian.com>
32443 * threads.c (start_wrapper): Create a Thread object if needed, so
32444 the Main() thread can do the class initialisation in a subthread
32445 that has been set up to allow managed code execution.
32447 Pass the thread ID instead of the MonoThread pointer to the thread
32448 start and attach callbacks. This change is required, because the
32449 jit thread start callback must be called _before_ the Thread
32450 object can be created.
32452 (mono_thread_init): Removed much object creation code that is no
32453 longer needed. No managed code is called from here now.
32455 * object.c (mono_runtime_exec_managed_code): Create a subthread
32456 for Main, and call back to the runtime to use it.
32457 Set the exit code when Main exits.
32459 * gc.c: Make sure domain finalisation happens in a subthread.
32460 Re-enable threaded GC, fixing bug 31333 (again).
32462 * environment.c: System.Environment internall calls (so far just
32463 ExitCode is here, the others are still in icall.c)
32465 * appdomain.c (mono_runtime_cleanup): All threads running managed
32466 code should have finished before mono_runtime_cleanup() is
32467 reached, so no need to clean up threads.
32469 2003-01-22 Martin Baulig <martin@ximian.com>
32471 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
32472 `gpointer func' arguments.
32473 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
32474 but added `MonoThread *thread' argument.
32475 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
32477 * threads.c (mono_new_thread_init): Added `gpointer func' argument
32478 and pass it to the mono_thread_start_cb callback.
32479 (mono_install_thread_callbacks): New public function to install a
32480 set of callbacks which are set by the debugger.
32481 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
32483 2003-01-22 Martin Baulig <martin@ximian.com>
32485 * Makefile.am: Install debug-mono-symfile.h.
32487 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
32489 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
32491 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
32493 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
32494 * class.c (mono_ptr_class_get): correctly set access levels of pointers
32495 (mono_array_class_get): correctly set access levels of arrays
32497 2003-01-20 Patrik Torstensson
32498 * image.h (MonoAssemblyName): changed major, minor, build, revision
32499 from signed to unsigned.
32501 2003-01-20 sean kasun <skasun@azstarnet.com>
32503 * reflection.c (load_cattr_value): Now this handles
32504 MONO_TYPE_SZARRAY. Fixes bug #35629
32506 2003-01-20 Miguel de Icaza <miguel@ximian.com>
32508 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
32511 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32513 * decimal.c: fixed bug #26056.
32515 2003-01-17 Martin Baulig <martin@ximian.com>
32517 * gc.c: Raise an ExecutionEngineException instead of using g_error().
32519 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32522 (mono_get_exception_type_initialization): new function.
32524 * object.c: throw a TypeInitializationException when an exception is
32525 thrown invoking the class constructor.
32527 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32529 * reflection.c: fixed attribute reading.
32531 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32534 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
32535 provided, look for the type in the calling assembly and then in
32536 mscorlib; if the assembly name is provided, only try that one.
32538 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
32540 * object.c: register the vtable before there is a chance it's
32541 queried again recursively.
32543 2003-01-13 Duncan Mak <duncan@ximian.com>
32545 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
32548 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
32550 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
32552 2003-01-11 Martin Baulig <martin@ximian.com>
32554 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
32555 this to 20 for the release.
32557 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
32559 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
32561 * loader.c (mono_method_get_marshal_info): bug fix
32563 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
32564 structures with explicit layout
32566 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
32568 * profiler.c: made the output more readable (and sorted).
32569 Added caller information for the allocation profiler.
32571 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
32573 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
32575 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32577 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
32578 to get value types.
32580 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
32582 * object.c, profiler.h, profiler.c, profiler-private.h:
32583 Added object allocation profiler.
32585 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
32587 * reflection.h, reflection.c: handle global methods.
32588 Compress blob entries.
32590 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
32592 * marshal.c: fix compilation.
32594 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
32596 * loader.c (mono_method_get_marshal_info): impl.
32598 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
32600 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32602 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
32603 for reference types.
32605 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
32607 * loader.c: fixed off by one error in loaded parameter names.
32609 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
32611 * marshal.c (mono_marshal_get_icall_wrapper): like
32612 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
32613 instead of a MonoMethod.
32615 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32617 * decimal.c: fixed bug #36537.
32619 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
32621 * marshal.c: throw a missing method exception if a
32622 P/Invoke method is not found.
32624 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
32626 * icall.c: allow a null this for constructors.
32628 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
32630 * icall.c: raise the proper exceptions if the arguments to the
32631 internal Invoke are incorrect.
32633 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
32635 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
32637 2003-01-03 Martin Baulig <martin@ximian.com>
32639 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
32641 2002-12-31 Martin Baulig <martin@ximian.com>
32643 * debug-mono-symfile.c: Completely rewrote the type section.
32644 Instead of using individual malloc()ed fields, we use one big
32645 continuous memory area and offsets into this area.
32646 See the comments in the source code for details.
32648 2002-12-30 Martin Baulig <martin@ximian.com>
32650 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
32652 2002-12-30 Martin Baulig <martin@ximian.com>
32654 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
32655 line number table in this data blob instead of using an external
32658 2002-12-28 Martin Baulig <martin@ximian.com>
32660 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
32662 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
32664 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
32665 as a boxed return type.
32667 2002-12-21 Miguel de Icaza <miguel@ximian.com>
32670 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
32671 g_build_filename to properly get separators on the filename created.
32673 * object.h: Small change, introduce MonoMarshalByRefObject to
32674 track the layout of that structure in the C# universe as we make
32677 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
32679 * object.c: removed assert to allow static fields on interfaces.
32680 * loader.c: a TypeSpec may be used for any type, not just arrays.
32682 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32684 * class.c, class.h: added mono_class_array_element_size ().
32685 Ignore static methods in interfaces.
32687 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32689 * threads.c: fixed the build under cygwin.
32691 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
32693 * reflection.c: handle nullref constants. Allocate keys for
32694 reflection handles with the GC.
32696 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32698 * threads.c, threads.h: added mono_thread_get_abort_signal()
32699 to get a suitable signal for thread abort.
32701 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32703 * metadata.c: fix handling of ExportedType table.
32705 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32707 * icall.c: added WriteWindowsDebugString internal call.
32709 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32711 * reflection.h: added fields to match C# implementation.
32713 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32715 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
32717 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
32719 * gc.h, gc-internal.h: Rename header for GC internal calls to
32720 gc-internal.h from gc.h as to not clash with Boehm GC having its
32721 header installed as <gc.h> in outside include paths.
32722 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
32723 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
32725 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32727 * icall.c: assign minor, build and revision in FillName.
32729 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
32731 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
32732 Added support for running code generated by Reflection.Emit.
32734 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32736 * appdomain.c: check for NULL argument in LoadFrom.
32738 2002-12-10 Dick Porter <dick@ximian.com>
32740 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
32742 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32744 * appdomain.c: fix buglet when building exe file name. Handle full
32745 assembly name (needed after latest changes to AssemblyName).
32747 (mono_image_close): free some hashtables.
32749 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
32751 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
32752 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
32753 on some systems (redhat 7.3)
32755 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
32757 * threads.c: delete the critical section of a sync block,
32758 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
32760 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
32762 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
32764 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32766 * appdomain.[ch]: handle the assembly preload event to try loading the
32767 assemblies using the paths we have in the current domain.
32769 * assembly.[ch]: created an assembly preload hook that is called to try
32770 loading the assembly by other means that the ones provided here.
32772 * domain.c: initialize the domain search path.
32774 From now on, assemblies (TODO: except corlib and System) are loaded
32775 according to these rules when using mono_assembly_load ():
32777 1. It tries to load the assembly from the ApplicationBase
32778 of the current domain appending .dll and .exe (TODO: have to
32779 try loading from name/name.dll and name/name.exe).
32781 2. It tries the search path specified in PrivateBinPath for the
32782 current domain (if any).
32784 3. Previous behavior.
32786 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
32788 * icall.c: implemented GetInterfaceMap() related icall.
32789 * domain.c, loader.h: load MethodInfo in mono_defaults.
32791 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32793 * gc.c: disable the finalizer thread for now, untill all the issues
32794 with it are resolved.
32796 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32798 * string-icalls.c: handle embedded nulls in string ctor when the
32799 length is specified.
32801 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
32803 * class.c: look for explicit interface implementation in parent
32806 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
32808 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
32810 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
32812 * gc.c: protect handles with a critical section.
32814 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32817 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
32818 parameters. If no assembly specified, try getting the type from all
32819 the assemblies in the current domain, else, load the assembly and get
32822 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32824 * marshal.c: applied patch from Aleksey Demakov that fixes
32825 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
32827 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32829 * icall.c: fixed get_location.
32831 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
32833 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
32834 declarations to make it work with older gcc.
32836 * loader.c (mono_get_method): set signature->pinvoke for native calls
32838 2002-11-20 Dick Porter <dick@ximian.com>
32840 * threads.c (mono_thread_init): Set the main thread's handle
32842 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
32844 * gc.c: allow compilation without GC support. Changed to match the
32847 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32849 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
32851 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
32853 * reflection.c: set a public key token on the core assemblies.
32855 2002-11-18 Dick Porter <dick@ximian.com>
32857 * threads.c: Split out some thread initialisation so that other
32858 files can set the start callback function.
32860 * gc.c: Run finalisers in a separate thread, to avoid stack
32861 overflow. Fixes bug 31333.
32863 * appdomain.c: Set up GC finalisation thread.
32867 * domain.c: Use gc.h macros for GC_malloc
32869 2002-11-15 Dick Porter <dick@ximian.com>
32873 * appdomain.c: Removed mono_runtime_init_with_attach(),
32874 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
32875 merging the extra parameter with the existing function. Removed
32876 unneeded code in mono_thread_attach().
32878 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
32880 * image.c (mono_image_loaded_by_guid): a method to get loaded
32882 (load_metadata_ptrs): we store the guid as string.
32884 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
32886 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
32888 * metadata.c (mono_guid_to_string): imported method form Zoltan
32889 Varga (slightly modified)
32891 * assembly.c (mono_assembly_open): load precompiled code
32893 * loader.h (MonoMethod): we store the method token for use in the
32896 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32898 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
32899 the hook function called when an assembly is loaded.
32901 * domain.c: Modified file.
32902 (mono_domain_assembly_load): removed hash table insertion of assemblies.
32906 2002-11-07 Miguel de Icaza <miguel@ximian.com>
32908 * reflection.c: Map PEFileKind to the value expected by the WinNT
32911 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32913 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
32914 Read until the buffer is filled completely.
32916 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32918 * icall.c: implemented MonoType.InternalGetEvent ().
32920 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32922 * appdomain.c: implemented InitAppDomainSetup. Delayed
32923 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
32924 the entry_assembly.
32926 * assembly.c: base_dir is now an absolute path ending with
32929 * icall.c: modified get_location according to the above changes.
32931 * object.c: init AppDomain.SetupInformation for the default domain after
32932 we have the entry assembly.
32934 * domain.c: when unloading a domain, setup = NULL.
32936 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
32938 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
32940 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
32942 * object.h, object.c: introduced mono_object_get_virtual_method ()
32943 to lookup the method invoked on an object when a callvirt is done on
32945 * icall.c: make MethodInfo::Invoke() always do a virtual call.
32947 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32949 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
32950 current domain when loaded an assembly and failed to load it.
32952 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
32954 2002-10-31 Dick Porter <dick@ximian.com>
32958 * file-io.c: Return the error status in a parameter, as the
32959 GetLastError() value has long since been blown away if we try and
32960 look it up in a subsequent internal call invocation. Delete the
32961 GetLastError() internal call, because it's useless.
32963 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
32965 * class.[ch]: added cast_class to fix bug 29517
32967 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
32969 * marshal.c: create valid IL code in the filter clause:
32970 the new JIT is less forgiving:-)
32972 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32974 * icall.c: removed get_property internal call.
32976 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
32978 * appdomain.h domain.c: Added an ID to appdomains.
32980 * threads.c threads.h icall.c: Implement icall
32981 Thread:GetDomainID(), and remove unused icall
32982 CurrentThreadDomain_internal.
32984 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32986 * icall.c: Don't recurse through the base types in GetConstructor.
32989 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
32991 * mempool.h, mempool.c: added mono_mempool_empty() and
32992 mono_mempool_stats().
32994 2002-10-23 Dick Porter <dick@ximian.com>
32998 * icall.c: Added MonoIO.GetFileType internal call
33000 2002-10-17 Dick Porter <dick@ximian.com>
33002 * appdomain.c (mono_runtime_cleanup): Don't signal the async
33003 delegate semaphore before waiting for all threads to finish,
33004 because new threads can also call async delegates. Fixes bug
33007 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
33008 of 3 seconds, in case another async job is queued. (This part is
33009 needed because the bug fix reintroduced the 3s exit lag.) This
33010 makes the mono_runtime_shutdown flag superfluous.
33012 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
33014 * reflection.c: include ehader size in method section headers.
33015 Really check for suplicated modules entries.
33017 2002-10-17 Martin Baulig <martin@gnome.org>
33019 * debug-mono-symfile.c: Added back support for locals.
33021 2002-10-14 Martin Baulig <martin@gnome.org>
33023 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
33026 2002-10-14 Martin Baulig <martin@gnome.org>
33028 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
33029 mono_class_get() instead of looking in the class cache.
33031 2002-10-13 Martin Baulig <martin@gnome.org>
33033 * debug-mono-symfile.c: Set version number to 28, include the
33034 signature in method names.
33036 2002-10-13 Martin Baulig <martin@gnome.org>
33038 * debug-mono-symfile.h: Set version number to 27.
33040 2002-10-11 Martin Baulig <martin@gnome.org>
33042 * gc.c: Don't register/unregister NULL pointers as disappearing links.
33044 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
33046 * metadata.c, metadata.h: added helper function to allocate signatures.
33048 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33050 * icall.c: added internal call to get the location of machine.config.
33052 2002-10-08 Martin Baulig <martin@gnome.org>
33054 * debug-mono-symfile.c: Ignore classes with a pending init for the
33057 2002-10-03 Dick Porter <dick@ximian.com>
33059 * threads.c: Freebsd pthread_t is a pointer
33061 2002-10-03 Dick Porter <dick@ximian.com>
33063 * socket-io.c: Implemented GetHostName_internal
33065 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33068 (mono_config_parse_file): don't leak the text.
33070 2002-10-02 Martin Baulig <martin@gnome.org>
33072 * debug-mono-symfile.c: Added support for methods.
33074 2002-10-01 Martin Baulig <martin@gnome.org>
33076 * debug-mono-symfile.c: Don't emit methods and line numbers for
33077 the dynamic symbol file, just write the type table. We can easily
33078 have an external helper program which creates a symbol file for an
33081 2002-10-01 Dick Porter <dick@ximian.com>
33083 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
33084 Only add the handle to the cleanup array when we're about to
33085 launch the thread. Bug 31425 deadlocked when the test was run on
33088 2002-10-01 Martin Baulig <martin@gnome.org>
33090 * debug-mono-symfile.c: Added support for properties.
33092 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
33094 * reflection.c: unaligned store fix from Mark Crichton
33095 <crichton@gimp.org>.
33097 2002-09-27 Martin Baulig <martin@gnome.org>
33099 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
33102 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
33104 * assembly.h, assembly.c: use a sane API to hook into the assembly
33105 loading process instead of a useless special-purpouse hack
33106 (ngen needs a hook, too, for example).
33108 2002-09-27 Dick Porter <dick@ximian.com>
33110 * threads.c (mono_thread_init): Call GetCurrentProcess() so
33111 io-layer can set up some process handle info. Not needed on w32,
33112 but doesn't hurt either.
33114 * process.c: Pass the program name in the second parameter to
33115 CreateProcess, so the path is searched. Include the working
33116 directory. Implemented process name, process enumeration, and some
33117 process detail internal calls.
33119 * icall.c: Added internal calls for process lookup, and some
33122 2002-09-26 Martin Baulig <martin@gnome.org>
33124 * assembly.c (mono_install_open_assembly_hook): New global
33125 function to install a function to be invoked each time a new
33126 assembly is loaded.
33127 (mono_assembly_open): Run this callback function if set.
33129 * debug-mono-symfile.c: Put back line numbers for the dynamic
33130 symbol file and also record the .il file as source file. This
33131 allows us to install the temporary symbol file as `file.dbg' just
33132 like a compiler-generated one.
33134 2002-09-26 Nick Zigarovich <nick@chemlab.org>
33136 * Corrected typo in gc.c (BOHEM vs BOEHM).
33138 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33140 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
33141 GetProperties. Also avoid calling g_slist_length in GetProperties and
33144 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
33146 * reflection.c: avoid unaligned stores (bug spotted by
33147 Mark Crichton <crichton@gimp.org>).
33149 2002-09-25 Martin Baulig <martin@gnome.org>
33151 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
33152 instead of guint64 for addresses and added prologue/epilogue info.
33154 2002-09-25 Martin Baulig <martin@gnome.org>
33156 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
33157 store line number info. For the dynamic symbol file, we only need
33158 to provide the JIT generated dynamic line number info for the dynamic
33161 2002-09-25 Martin Baulig <martin@gnome.org>
33163 * debug-mono-symfile.h: Incremented version number.
33165 2002-09-24 Martin Baulig <martin@gnome.org>
33167 * class.c (mono_debugger_class_init_func): New global function
33169 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
33172 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
33173 function. This is called via the mono_debugger_class_init_func
33174 hook to add all types to the dynamic type table.
33175 (ves_icall_MonoDebugger_GetType): New interncall to get a class
33176 from its metadata token.
33178 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
33179 New interncall for the debugger.
33181 2002-09-24 Nick Drochak <ndrochak@gol.com>
33183 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
33184 before using it in case it is null.
33186 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
33188 * metadata.c: allow custom modifiers in local var signatures
33189 (bug spotted by Zoltan Varga).
33191 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
33193 * class.c: deal with the <Module> class that may have a NULL vtable.
33194 Eliminate warnings.
33196 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
33198 * image.c, image.h: more strong name helpers.
33199 * monosn.c: more work: convert pem keys to cryptoapi format.
33201 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
33203 * string-icalls.c: speedup IndexOf.
33205 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
33207 * icall.c: updates from Zoltan.2.Varga@nokia.com.
33209 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
33211 * icall.c: cleanup: use mono_object_domain ().
33213 2002-09-23 Martin Baulig <martin@gnome.org>
33215 * debug-mono-symfile.c: Improved type support.
33217 2002-09-22 Martin Baulig <martin@gnome.org>
33219 * debug-mono-symfile.c: Added support for reference types and strings.
33221 2002-09-22 Martin Baulig <martin@gnome.org>
33223 * debug-mono-symfile.c: Started to work on the type table.
33225 2002-09-21 Martin Baulig <martin@gnome.org>
33227 * debug-mono-symfile.c: Largely reworked the symbol table format.
33228 The symbol table is now incrementally updated each time a new
33229 method is added. We're now also using our own magic and version
33230 so that you don't need to recompile all your classes if the
33231 dynamic table changes.
33232 (mono_debug_update_mono_symbol_file): Removed.
33233 (mono_debug_symfile_add_method): New function to add a method.
33235 2002-09-21 Martin Baulig <martin@gnome.org>
33238 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
33241 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
33242 New interncall to get a method from its metadata token.
33244 2002-09-21 Martin Baulig <martin@gnome.org>
33246 * debug-mono-symfile.c: Create type table.
33248 2002-09-20 Martin Baulig <martin@gnome.org>
33250 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
33252 2002-09-20 Martin Baulig <martin@gnome.org>
33254 * debug-mono-symfile.c: Provide information about params and locals.
33256 2002-09-20 Martin Baulig <martin@gnome.org>
33258 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
33261 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
33262 interncall to get a method from its metadata token.
33264 2002-09-20 Martin Baulig <martin@gnome.org>
33266 * debug-mono-symfile.c: Added a few checks for method->header
33267 being non-NULL. This should never happen, but for the moment
33268 let's use a g_warning() rather than a g_assert().
33270 2002-09-19 Mark Crichton <crichton@gimp.org>
33272 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
33273 even if support for it isn't present. Added an #ifdef to fix this.
33275 * socket-io.c: Added checks back for Solaris support.
33277 2002-09-19 Martin Baulig <martin@gnome.org>
33279 * debug-mono-symfile.c (read_string, write_string): Reflect latest
33280 changes in the symbol file format.
33282 2002-09-18 Martin Baulig <martin@gnome.org>
33284 * debug-mono-symfile.c: Set version number to 21.
33286 2002-09-18 Dick Porter <dick@ximian.com>
33288 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
33289 on netbsd. Fixes bug 30051.
33291 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33294 (set_version_from_string): little fix.
33296 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
33298 * monosn.c, Makefile.am: added strong name utility.
33299 * reflection.h, reflection.c: implemented delayed signing,
33300 locale, version and hash id assembly attributes.
33302 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
33304 * loader.c, metadata.c: load param attributes in signatures.
33306 2002-09-16 Martin Baulig <martin@gnome.org>
33308 * debug-mono-symfile.c: Added string table with all method names.
33310 2002-09-14 Martin Baulig <martin@gnome.org>
33312 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
33313 fast method lookup.
33315 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
33317 * reflection.c: record the public key token of referenced assemblies.
33319 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
33321 * image.c, image.h: added functions to get the strong name and the
33322 public key of an assembly.
33323 * pedump.c: use them.
33325 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
33327 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
33329 2002-09-12 Miguel de Icaza <miguel@ximian.com>
33331 * marshal.c (mono_marshal_get_managed_wrapper): Added
33334 2002-09-11 Martin Baulig <martin@gnome.org>
33336 * gc.c: Call GC_unregister_disappearing_link() on all links when
33337 finalizing them, this is necessary to aviod a crash in boehm's
33340 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
33342 * gc.c: handle GetTarget for finalized objects spotted and fixed by
33345 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
33347 * icall.c: implemented MonoType::Module.
33348 * reflection.c, reflection.h: mono_module_get_object () from
33349 Tomi Pakarinen <tomi.pakarinen@welho.com>.
33351 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
33353 * icall.c: ignore overridden methods in GetMethods ().
33354 Fix for FieldInfo::SetValue().
33355 * object.c: handle float/double in runtime invoke.
33357 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
33359 * object.c: allow a constructor to be called again on an object.
33361 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
33363 * class.h, class.c: move field layout code to it's own function and
33364 export it. Get an interface id earlier. Move fields in MonoClass
33365 so they are more cache friendly and align the bitfields.
33366 * loader.c: temporary handle get_param_names() for a runtime method.
33367 * reflection.c, reflection.h: more code to handle runtime creation of
33370 2002-09-09 Martin Baulig <martin@gnome.org>
33372 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
33373 signature with the pinvoke field being set for the actual call.
33375 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
33377 * icall.c: removed some unused icalls. Start of map of glib charsets
33378 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
33380 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
33382 * debug-helpers.c: break infinite loop (found and fixed by
33383 Holger Arnold <harnold@gmx.de>).
33385 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
33387 * icall.c: target may be null in create_delegate.
33389 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
33391 * marshal.c: handle a boolean return type.
33393 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
33395 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
33397 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
33399 * gc.c: fix weakreferences.
33401 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
33403 * icall.c: added icall to get default codepage.
33405 2002-09-03 Dick Porter <dick@ximian.com>
33408 * threads.c: Use MonoThread instead of MonoObject where
33411 Store running thread objects in a hash table, so that we have all
33412 the info to hand when waiting for them to finish
33413 (means we don't need OpenThread() any more, so mingw builds should
33414 be fully functional again.)
33417 * object.h: Added thread ID to MonoThread
33419 2002-09-03 Martin Baulig <martin@gnome.org>
33421 * icall.c (System.Reflection.Assembly::get_location): New interncall.
33423 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33425 * icall.c: fixed leak in get_temp_path. Thanks lupus.
33427 2002-09-03 Martin Baulig <martin@gnome.org>
33429 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
33430 argument to store the end address of the disassembled instruction.
33432 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
33433 here from debug-symfile.h.
33434 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
33435 JIT into this struct.
33436 (MonoSymbolFile): Added `char *image_file' field.
33437 (MonoDebugGetMethodFunc): Removed.
33438 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
33439 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
33440 (mono_debug_find_method): New method.
33442 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
33443 create a full symbol file.
33444 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
33445 and static symbol files.
33446 (mono_debug_find_method): The symbol file keeps an internal method hash,
33447 call this to get a MonoDebugMethodInfo from a MonoMethod.
33449 * debug-symfile.[ch]: Removed.
33451 2002-08-29 Miguel de Icaza <miguel@ximian.com>
33453 * image.c (do_mono_image_open): Remove linker version check.
33455 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
33457 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
33458 wrappers for instance methods.
33460 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33462 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
33464 2002-08-28 Dick Porter <dick@ximian.com>
33466 * Makefile.am: Export HOST_CC for w32 builds
33468 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
33470 * file-io.c process.c: MonoString are null terminated, no
33471 need for mono_string_to_utf16() anymore.
33473 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
33475 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
33477 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
33479 * icall.c, reflection.h: speedup System.MonoType.
33481 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
33483 * reflection.c: allow null as the value of a string argument in
33484 custom attributes constructors.
33486 2002-08-27 Martin Baulig <martin@gnome.org>
33488 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
33489 `trampoline_address' field.
33491 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
33493 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
33494 check (fixes bug #29486)
33496 2002-08-27 Martin Baulig <martin@gnome.org>
33498 * debug-mono-symfile.c: Changed the file format in a way that allows us
33499 open it read-only and to use a specially malloced area for all the
33500 dynamic data. We can now also generate a symbol file on-the-fly if we're
33501 debugging IL code and there is no MCS generated symbol file for it.
33503 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
33505 * object.c: added a define for a good string and array
33506 creation speedup (not enabled by default because we need to deal with
33509 2002-08-26 Martin Baulig <martin@gnome.org>
33511 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
33512 function to create a dynamic symbol file. This is used by the
33513 debugger to create a symbol file for IL code on-the-fly.
33515 2002-08-26 Martin Baulig <martin@gnome.org>
33517 * loader.c (mono_lookup_pinvoke_call): Include the error message
33518 from g_module_error() in the error message.
33520 2002-08-24 Martin Baulig <martin@gnome.org>
33522 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
33523 function to update the symbol file. The symbol file is mmap()ed
33524 writable, but private. This allows us to install the symbol file
33525 together with the assembly.
33527 2002-08-24 Martin Baulig <martin@gnome.org>
33529 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
33530 but they can read the new symbol file format which mcs is now creating.
33532 * debug-symfile.c (mono_debug_find_source_location): Moved to
33533 debug-mono-symfile.c; this is now operating on the new symbol file.
33535 2002-08-23 Martin Baulig <martin@gnome.org>
33537 * debug-helpers.c (mono_method_desc_from_method): New function to get
33538 a MonoMethodDesc from a MonoMethod.
33540 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
33542 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
33543 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
33545 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
33547 * string-icalls.[ch]: make helper methods static.
33549 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33551 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
33552 types to it and to SetValueInternal.
33554 * object.c: Moved handle_enum label to its proper place. This was the
33557 This time i compiled mcs and gtk-sharp and they both work.
33559 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33561 * icall.c: reverted partially my previous patch until
33562 object.c:set_value handles enums correcly.
33564 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33567 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
33568 (ves_icall_System_Environment_get_MachineName): removed warning when
33569 compiling under cygwin.
33571 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
33573 * object.c: fixed field_get_value() for reference types.
33575 2002-08-22 Dick Porter <dick@ximian.com>
33577 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
33578 Don't free a buffer while it's still needed. Patch from Jonathan
33579 Liger <Jonathan.liger@wanadoo.fr>
33581 2002-08-21 Miguel de Icaza <miguel@ximian.com>
33583 * icall.c (ves_icall_System_Environment_get_Platform): Add new
33586 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
33588 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
33589 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
33591 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
33592 we call unmanaged code which throws exceptions.
33594 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
33596 * appdomain.h: added per-domain entry_assembly.
33597 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
33599 * icall.c: Assembly::GetEntryAssembly icall.
33600 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
33601 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
33603 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
33605 * appdomain.h, gc.c: added mono_domain_finalize ().
33607 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33610 (mono_print_unhandled_exception): changed g_warning by g_printerr
33611 because g_log has a 1024 characters limit (yeah, i got a big stack
33612 trace). Don't print exception name, that should be in ToString
33615 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33617 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
33618 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
33620 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33623 (mono_print_unhandled_exception): after previous commit, i realized
33624 that MS calls ToString on the exception. I changed this function to
33625 do that. This way we get stack_trace for free.
33627 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33630 (mono_print_unhandled_exception): invoke Message property instead of
33631 getting 'message' field from Exception. Don't allocate memory for
33632 'trace' and 'message' if not needed.
33634 2002-08-18 Dick Porter <dick@ximian.com>
33636 * unicode.c: Fix asserts to match Encoder.cs checks
33638 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
33640 * marshal.c: fix unaligned store issue and a few wrong
33641 opcode argument types.
33643 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33645 * icall.c: added GetUninitializedObjectInternal internal call.
33647 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
33649 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
33650 to the right domain.
33652 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
33654 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
33656 * class.c (class_compute_field_layout): set blittable to false for Strings
33658 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
33660 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
33662 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
33663 first chunk of code to create types at runtime. Code to
33664 handle ReflectedType/DeclaringType. Make reflection handles
33667 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
33669 * class.c: set correct name in arrays.
33671 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
33673 * appdomain.c (mono_domain_transfer_object): make it work with
33674 valuetypes. bug fixes.
33676 2002-08-12 Dick Porter <dick@ximian.com>
33678 * object.h: Rename some parameters to avoid c++ keywords (Patch
33679 from Joseph Wenninger <kde@jowenn.at>)
33681 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
33683 * icall.c: added icall to implement Assembly.GetFile*.
33685 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
33687 * reflection.h, reflection.c: code to embed managed resources.
33689 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
33691 * class.c: move all the type size stuff into
33692 class_compute_field_layout().
33694 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
33696 * class.c: ensure enums have always the correct instance size.
33697 * unicode.c: remove wrong assert.
33699 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
33701 * assembly.c: fix mem corruption issue.
33702 * image.h, image.c: added mono_image_get_resource () to access
33704 * icall.c: implemented Assembly.EntryPoint property and some
33705 Managed Resources related internalcalls.
33708 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
33710 * image.c, image.h: impemented mono_image_get_entry_point ().
33711 * appdomain.c: use mono_image_get_entry_point.
33713 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
33715 * reflection.c: support the object type argument when loading
33718 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
33720 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
33721 String as return type.
33723 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
33725 * reflection.c: fix encoding of named args for custom attrs to match
33726 the ms implementation. Read them back when instantiating custom
33729 2002-08-02 Radek Doulik <rodo@ximian.com>
33731 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
33732 by Dietmar as quick fix
33733 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
33734 16 as stack size, used on more places as quick fix before Dietmar
33735 will fix it properly
33737 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
33739 * object.h, object.c: added accessors for fields and properties.
33741 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
33743 * class.c, class.h: made mono_class_get_field_from_name ()
33744 loop on parent types.
33745 Added mono_class_get_property_from_name ().
33747 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
33749 * class.c, class.h: move the code to setup the type vtable in its own
33750 function so that it can be reused also for types created at runtime.
33751 Eliminate the "class" identifier from the header file.
33752 * reflection.c: setup the vtable for enums so that we can create
33753 objects for use in SetConstant ().
33755 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
33757 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
33758 instead of the delegate itself as this pointer (bug #28383)
33760 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
33762 * marshal.c (mono_marshal_get_managed_wrapper): added return type
33765 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
33767 * loader.c: don't set the pinvoke bit on icalls.
33769 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
33771 * debug-helpers.c (mono_method_full_name): only print a number to
33772 indicate wrapper type (so that the output is more readable in traces).
33774 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
33776 * class.c (mono_class_init): include method override patch from Paolo
33778 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
33780 * icall.c: fixed GetTypeCode().
33782 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
33784 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
33785 use real delegate invoke function to make it work with multicast
33786 delegates (fix bug# 28291).
33788 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
33790 * object.c: load constant strings.
33792 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
33794 * reflection.c: no magic numbers.
33795 * tabledefs.h: security action enum.
33797 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
33799 * assembly.c: fix possible memory corruption.
33801 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
33803 * reflection.h, reflection.c: added support for linking resources.
33804 * verify.c: check we have an updated corlib.
33806 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
33808 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
33810 (mono_marshal_string_array): null terminate unmanaged string arrays.
33811 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
33813 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
33815 * icall.c: Type.GetType () can now return also types from the
33818 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
33820 * loader.h, loader.c: stack walking support.
33821 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
33822 GetCallingAssembly.
33824 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
33826 * marshal.c: added optimisations for blittable types
33828 * class.c (mono_array_class_get): do not set blittable attribute on arrays
33829 (mono_class_setup_mono_type): set blittable attribute for single
33832 * marshal.c (mono_string_utf8_to_builder): impl.
33833 (mono_string_builder_to_utf8): impl.
33834 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
33836 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
33838 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
33839 (mono_marshal_get_managed_wrapper): impl. byref types
33841 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33844 (search_method): don't display debug message.
33846 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
33848 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
33850 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
33852 * appdomain.c: set the missing filename when throwing exception.
33854 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
33856 * metadata.c (mono_type_size): code cleanup
33857 (mono_type_stack_size): removed some test code
33859 2002-07-21 Miguel de Icaza <miguel@ximian.com>
33861 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
33862 mono_get_exception_file_not_found now.
33864 * exception.c (mono_exception_from_name_two_strings): New version
33865 that will call a constructor with two string arguments.
33866 (mono_get_exception_file_not_found): New helper routine, used to
33867 report file-not-found errors.
33869 2002-07-20 Dick Porter <dick@ximian.com>
33872 * process.c: Pass file handles to CreateProcess
33876 * file-io.c: Implemented CreatePipe
33878 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
33880 * metadata.c (mono_get_param_info): set alignment for value types
33882 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
33884 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
33885 Constify mono_domain_assembly_open().
33886 * loader.c: handle null namespace in icalls.
33888 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
33890 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
33891 (emit_str_to_ptr_conv): marshal object as structs
33893 * metadata.c (mono_type_to_unmanaged): marshal object as structs
33895 * marshal.c (mono_marshal_get_runtime_invoke): support value types
33897 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
33899 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
33900 (mono_marshal_get_native_wrapper): we an now return value types
33902 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
33904 * verify.c: more checks implemented.
33906 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
33908 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
33910 (mono_marshal_get_native_wrapper): allow byref arguments
33911 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
33912 impl. PtrToStringXXX methods
33913 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
33914 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
33915 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
33916 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
33917 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
33919 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
33921 * reflection.c: fix buglet in parsing an assembly name.
33923 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
33925 * marshal.c (emit_ptr_to_str_conv): first impl.
33927 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
33929 * object.c, class.h: cache the vtable in the class as suggested by
33930 vargaz@freemail.hu (Zoltan Varga).
33932 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
33934 * class.h, loader.c: added mono_field_from_token().
33935 * verify.c: first cut of type checking code.
33937 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
33939 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
33941 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
33943 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
33945 (mono_marshal_get_remoting_invoke): impl.
33946 (mono_delegate_begin_invoke): impl.
33947 (mono_mb_emit_save_args): impl.
33948 (mono_delegate_end_invoke): impl.
33949 (mono_marshal_get_delegate_begin_invoke):
33950 (mono_marshal_get_delegate_end_invoke):
33951 (mono_marshal_get_delegate_invoke): generate a special name for
33952 those methods (including the signature) and associate them whith
33953 the delegate class.
33955 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
33958 (mono_reflection_type_from_name): now it has a MonoImage parameter
33959 which is used as the default image to search the type in. If the image
33960 is NULL or getting the type from it fails, it defaults to corlib.
33962 * icall.c: changed 1 call to mono_reflection_type_from_name to match
33965 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
33967 * reflection.c: update the parameter table index.
33969 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
33971 * domain.c: don't include the mark byte in the string hash.
33973 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
33975 * icall.cs: icall for Type.GetTypeCode ().
33976 * verify: a couple of fixes and disabled local initialization checks.
33978 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
33980 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
33982 * debug-helpers.c (mono_method_full_name): print the type of the
33985 * metadata.c (mono_signature_hash): a hash function for signatures
33986 (mono_signature_hash): better hash algorithm
33988 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
33990 * debug-helpers.c (mono_method_full_name): this can now generate
33991 method names with signatures
33993 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
33994 method dont have this pointers.
33996 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
33998 * reflection.c: fixup typebuilder tokens.
33999 * image.c: fix buglet.
34000 * marshal.h: remove whitespace.
34001 * metadata.h, metadata.c: reinstate code that was removed.
34002 * verify.c: handle catch directives and fix another couple of bugs.
34004 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
34006 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
34007 (mono_marshal_get_native_wrapper): make it comp. with the old code
34008 (mono_marshal_get_native_wrapper): support boolean
34009 (mono_marshal_get_managed_wrapper): support more types
34011 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
34013 * class.c (class_compute_field_layout): compute class->blittable attribute.
34015 2002-07-09 Dick Porter <dick@ximian.com>
34017 * threads.c: Make the thread cleaning up cope with threads that
34020 2002-07-08 Radek Doulik <rodo@ximian.com>
34022 * reflection.c (method_encode_code): use non-translated values to
34023 compute finally_start, this fixes exception handling on ppc, yay!
34025 * decimal.h (struct signscale): fix endianess
34027 2002-07-07 Radek Doulik <rodo@ximian.com>
34029 * reflection.c: swap box_val and not val
34031 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
34033 * reflection.c, reflection.h: handle full assembly info in type name.
34034 Handle Type arguments when loading custom attributes.
34035 * icall.c: updated to use new mono_reflection_type_from_name () method.
34037 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34040 (method_from_memberref): also print assembly name when method not found.
34042 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34045 (ves_icall_TypeGetProperties): fixed bug #27473.
34047 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34049 * reflection.c: display image name and token when cannot find the
34050 .ctor for an attribute.
34052 2002-07-05 Martin Baulig <martin@gnome.org>
34054 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
34056 2002-07-04 Dick Porter <dick@ximian.com>
34058 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
34059 compile on mingw. This will cause mingw builds to not wait for
34060 subthreads to terminate after the main thread does. I've lodged a
34061 bug with the mingw developers for them to wrap OpenThread().
34063 2002-07-03 Dick Porter <dick@ximian.com>
34065 * threads.c: Store thread IDs instead of handles, because
34066 GetCurrentThread() returns a pseudohandle and therefore stores
34067 useless values. mono_thread_cleanup() continues checking the
34068 array of threads until it is empty, to cope with subthreads
34069 spawning new threads after the main thread has finished.
34073 * profiler-private.h: Pass the thread ID to thread profiler
34074 functions, instead of a handle
34076 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
34078 * verify.c: fixes to make it more usable.
34079 * pedump.c: added --verify code to verify IL code in an assembly.
34081 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34083 * reflection.c: turn errors into warnings to allow compiling corlib.
34085 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
34087 * reflection.c: add special cases to compile corlib.
34089 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
34091 * reflection.c: handle properties with only a set method.
34093 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
34095 * opcodes.h: add enum with opcodes in opval order.
34097 2002-07-01 Dick Porter <dick@ximian.com>
34100 * object.c (mono_runtime_run_main): Removed unneeded argument
34102 2002-06-28 Martin Baulig <martin@gnome.org>
34104 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
34106 2002-06-27 Dick Porter <dick@ximian.com>
34108 * threads.c: Store the handle in both the parent thread and in the
34109 subthread, to minimise the time between starting a new thread and
34112 2002-06-26 Dick Porter <dick@ximian.com>
34114 * appdomain.c (mono_runtime_cleanup): Close the socket library
34115 after all the threads have finished, not before
34117 2002-06-26 Martin Baulig <martin@gnome.org>
34119 * debug-symfile.c (mono_debug_find_source_location): Added
34120 `guint32 *line_number' argument. If it's not NULL, store the line number
34121 there and return the file name without the line number.
34123 2002-06-25 Dick Porter <dick@ximian.com>
34127 * process.c: Process forking and other support functions
34129 2002-06-25 Dick Porter <dick@ximian.com>
34131 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
34132 things dont happen when the image is closed.
34133 (mono_image_lookup_resource): Walk the resource section looking
34134 for a particular entry
34136 * cil-coff.h: PE resource section decoding
34138 2002-06-25 Dick Porter <dick@ximian.com>
34142 (mono_assembly_foreach): Accessor functions to walk the list of
34144 (mono_assembly_set_main):
34145 (mono_assembly_get_main): Process methods need to know which
34146 assembly is the "main" one
34148 * object.c (mono_runtime_run_main): Record the main assembly
34150 * debug-helpers.c: Fix typo
34152 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
34154 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
34155 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
34157 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
34159 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
34161 2002-06-21 Miguel de Icaza <miguel@ximian.com>
34163 * image.c (do_mono_image_open): Initialize reference count,
34164 otherwise we leak the MonoImage.
34166 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
34168 * reflection.c: small tweak to handle self-hosting.
34170 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
34172 * reflection.c: fix type name parse code.
34174 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
34176 * reflection.c: break out of the loop.
34177 * image.c: special case corlib.
34179 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34181 * reflection.c: add all the custom attrs at the end to ensure the
34182 ctors have been properly initialized when the attributes are defined
34183 in the current assembly.
34185 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
34187 * reflection.c: handle correctly multiple-nested types.
34189 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
34191 * row-indexes.h: fix typos.
34192 * reflection.c: adjust for typos and fix method_def_or_ref
34193 encoding in MethodImpl table.
34195 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34197 * reflection.c: fix entry point patching (thanks Serge!).
34199 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
34201 * verify.c: add check for System.Exception
34203 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
34205 * image.c, class.c: minifix for code just c&p'ed.
34206 * reflection.c: warning fix.
34207 * object.h, loader.h, domain.c: load also StringBuilder.
34209 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
34211 * marshal.h, marshal.c: some support code to handle complex marshaling.
34213 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34215 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
34216 Better signatures with vtable error dump.
34218 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
34220 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
34222 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
34224 * icall.c (ves_icall_Type_GetField): impl.
34226 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34228 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
34229 to retrieve a marshal description blob for a field or param.
34231 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
34233 * reflection.h, reflection.c: change order of nested type emission
34234 to avoid table corruption. The NestedTypes table is sorted.
34235 * icall.c: change order of GetConstructor results to workaround mcs bug.
34237 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34239 * reflection.h, reflection.c: handle field and param marshal
34242 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
34244 * icall.c, marshal.c marshal.h: more Marshal class implementation.
34246 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
34248 * reflection.c: fix call convention.
34250 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
34252 * reflection.h, reflection.c: mono_image_get_memberref_token()
34253 takes a type instead of a class, now. Added
34254 mono_image_get_array_token() to create tokens for the special
34255 multi-dim array methods.
34257 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
34259 * assembly.c: handle modules (no assembly table). Split
34260 loading references in its own function.
34261 * class.c: handle moduleref resolution scope.
34262 * image.c, image.h: cache module name in image.
34264 2002-06-07 Martin Baulig <martin@gnome.org>
34266 * reflection.c (mono_image_get_type_info): Only add a class layout entry
34267 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
34269 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
34271 * icall.c: more signature fixes that used uint instead of int.
34273 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34275 * reflection.c: fixed signature of field refs.
34277 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34279 * class.c, reflection.c: handle typerefs of nested types
34280 (both on read and when writing files).
34282 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
34284 * icall.c: fix method signatures that tried to workaround the previous
34287 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
34289 * debug-helpers.c: fix typo.
34291 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
34293 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
34294 rewrote the PE/COFF writing code (our programs are understood by the
34297 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
34299 * gc.c, gc.h, icall.c: weakreference support.
34301 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
34303 * Makefile.am, mono-config.c: use $(sysconfdir).
34305 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
34307 * icall.c: changed default precision of Double.ToString() to 15.
34308 Fixed memory leak. Unified with Single.ToString.
34310 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
34312 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
34314 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
34316 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
34317 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
34318 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
34321 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34323 * debug-symfile.c, sysmath.c: yet more compilation fixes.
34325 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34327 * reflection.c, socket-io.c: more compilation fixes.
34329 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
34331 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
34332 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
34333 unicode.c: warning and compiler compatibility fixes.
34335 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
34337 * class.h, metadata.c: fixed warnings/compilation errors.
34339 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
34341 * Makefile.am, mono-config.c, mono-config.h: configuration file
34343 * loader.c, loader.h: make Dll mapping configurable at runtime in the
34344 config file. Export methods to insert and lookup mappings.
34346 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
34348 * reflection.c: handle types and boxed objects in custom attr
34351 2002-05-30 Martin Baulig <martin@gnome.org>
34354 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
34356 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
34358 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
34359 to lookup the implmap row for a P/Invoke method.
34360 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
34361 P/Invoke method from the runtime on an as needed basis.
34363 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
34365 * metadata.c (mono_metadata_parse_signature): impl.
34367 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34369 * class.c: handle .pack directive.
34371 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
34373 * object.c: initialize static fields with RVA data.
34375 2002-05-25 Martin Baulig <martin@gnome.org>
34378 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
34380 2002-05-24 Martin Baulig <martin@gnome.org>
34383 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
34384 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
34385 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
34387 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
34389 * object.c: special case string ctros in invoke.
34390 * gc.c: silly whitespace changes.
34392 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
34394 * threadpool.[ch]: impl. a threadpool that can
34395 be used by mint and mono.
34397 2002-05-22 Martin Baulig <martin@gnome.org>
34399 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
34400 The first argument is now a `MonoReflectionModuleBuilder *', the return
34401 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
34402 `methods' field to get the method builder. The `token' argument is the
34405 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
34406 invalid characters instead of g_assert_not_reached()ing. This seems
34407 to be the behaviour of mscorlib.
34409 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
34411 * object.c (mono_runtime_invoke_array): applied patch from Rachel
34412 Hestilow to fix bug #25104
34414 2002-05-21 Martin Baulig <martin@gnome.org>
34416 * debug-symfile.c (mono_debug_find_source_location): New function.
34417 Looks up an IL offset in the line number table and returns the source
34418 location as a string.
34420 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34423 (mono_double_ToStringImpl): changed %f by %g until we have something
34426 2002-05-21 Nick Drochak <ndrochak@gol.com>
34428 * icall.c : Use different name for Math.Pow's icall. Needed to check
34429 parameters first in C#.
34431 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34433 * icall.c, reflection.h: added icall to get info about an event.
34435 2002-05-20 Radek Doulik <rodo@ximian.com>
34437 * object.c (mono_value_box): don't use memcpy for boxing on BIG
34439 (mono_value_box): don't use memcpy for small sizes on
34440 architectures with unaligned access
34442 2002-05-20 Martin Baulig <martin@gnome.org>
34444 * reflection.c (mono_reflection_setup_internal_class): Don't crash
34445 if `tb->parent == NULL'.
34446 (mono_reflection_create_internal_class): New function. This is
34447 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
34450 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
34453 2002-05-19 Martin Baulig <martin@gnome.org>
34455 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
34456 argument to get the length, don't default to the array length.
34458 2002-05-18 Miguel de Icaza <miguel@ximian.com>
34460 * assembly.c (mono_assembly_setrootdir): New function used to
34461 override the MONO_ASSEMBLIES directory.
34463 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
34465 * icall.c: ValueType_GetHashCode() initialize local var.
34467 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
34469 * reflection.c: sort custom attributes table.
34471 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
34473 * reflection.c: support named args in custom attributes (write support).
34475 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
34477 * reflection.c: fix finally position calculation.
34479 2002-05-15 Radek Doulik <rodo@ximian.com>
34481 * reflection.c: fixed endianess at many places
34483 * icall.c (ves_icall_InitializeArray): comment out debug msg
34485 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
34487 * object.c (mono_unhandled_exception): new function to handle
34488 unhandled exceptions.
34489 (mono_unhandled_exception): call the UnhandledException event.
34490 (mono_runtime_delegate_invoke): impl.
34492 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
34494 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
34495 returns the RVA, not the direct pointer to the data. Handle the case
34496 when the class size is fixed.
34498 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
34500 * reflection.c: fix some endianess issues.
34502 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
34504 * object.c (mono_runtime_invoke): is now able to catch exceptions.
34506 * threads.c (mono_thread_init): added a callback which is invoked
34509 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
34511 * icall.c: make GetHashCode return non-negative values.
34513 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
34515 * object.c, icall.c, gc.c: revert to address-based hashcode.
34517 2002-05-13 Miguel de Icaza <miguel@ximian.com>
34519 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
34521 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34523 * icall.c, class.c: special case <Module>.
34525 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
34527 * icall.c: fix bug in GetNow().
34529 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
34531 * object.c (mono_runtime_class_init): make sure that we call all
34532 static class constructors.
34534 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
34536 * reflection.c: sort methodsemantics table.
34538 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
34540 * reflection.h, reflection.c: honour init locals setting.
34542 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
34544 * icall.c: copied Double ToStringImpl for Single ToStringImpl
34546 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
34548 * reflection.c: support ContructorBuilders in attribute blob creation.
34550 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34552 * reflection.c: some changes to build a binary that can be run
34553 directly in windows.
34555 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
34557 * loader.c: print a big message when an icall can't be found.
34559 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34561 * string-icalls.c: fix bug 24248.
34563 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
34565 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
34566 icall.c, reflection.h: separate assembly loading by pathname and by
34567 assembly name. Use the MONO_PATH env var to search for assemblies.
34569 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
34571 * assembly.c, image.h: add some support for assemblies
34572 with multiple modules.
34573 * class.c, class.h: export mono_class_from_typeref().
34574 * loader.c: remove duplicated code and use mono_class_from_typeref(),
34577 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
34579 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
34580 documentation says (the ECMA one is correct).
34582 2002-05-02 Dick Porter <dick@ximian.com>
34584 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
34585 Don't name the synchronisation mutex.
34587 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
34590 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
34591 Make the prototypes match.
34592 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
34596 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
34597 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
34598 all systems have tm.tm_zone, so use strftime() with %Z to print
34599 the timezone abreviation into a temp string.
34601 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
34602 rather than mono_array_addr() on a MonoString on Big Endian
34605 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
34607 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
34610 2002-04-30 Dick Porter <dick@ximian.com>
34612 * socket-io.c: Cope with SOCKET being an integer rather than a
34615 * threads.c: Added Thread_free_internal, to deal with thread
34616 handle cleanup. Moved calls to handle_store() and handle_remove()
34617 to start_wrapper(), so each can only be called once. Allocate
34618 synchronisation blocks with GC_malloc(), and use GC finalisation
34619 to close the handles.
34621 * icall.c: added System.Threading.Thread::Thread_free_internal
34623 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
34625 * icall.c: support Environment.Exit, CommandLineArgs().
34627 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
34629 * object.c, object.h: added mono_runtime_run_main () and
34630 mono_runtime_get_main_args () for use in System.Environment.
34632 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
34634 * gc.c: fix thinko, enable actual finalization since the jit is now
34637 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34639 * gc.c, object.c: take into account that an object may be offset wrt the address
34640 returned by GC_malloc().
34642 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
34644 * image.c: handle files without entries in the assembly table (modules).
34646 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
34648 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
34649 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
34650 allowed to be null when it's System.Object class setup.
34652 2002-04-27 Martin Baulig <martin@gnome.org>
34654 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
34655 if `tb->parent == NULL' rather than crashing.
34657 2002-04-28 Nick Drochak <ndrochak@gol.com>
34659 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
34660 calling acos() where asin() should have been called.
34662 2002-04-26 Martin Baulig <martin@gnome.org>
34664 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
34665 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
34666 there's a subdirectory called `System', but we don't want to read that
34667 subdirectory as an assembly.
34669 2002-04-25 Martin Baulig <martin@gnome.org>
34671 * debug-symfile.c: Reflect latest MonoString changes.
34673 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
34675 * rand.c, rand.h: instance method icalls need to have an explicit
34676 this pointer as first argument in the C implementation.
34678 2002-04-25 Nick Drochak <ndrochak@gol.com>
34680 * icall.c: Fix typo in map for GetNonZeroBytes
34682 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
34684 * string-icalls.c : String does now passes unit tests without any
34685 errors, the following changes has been made:
34687 Implemented replace methods.
34688 Renaming of methods to (try) follow the standard.
34689 Fixed compare ordinal
34690 Made all memory allocated directly to function instead of via icall function.
34691 Small performance fix in is_in_array function
34693 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
34695 c (mono_string_Internal_ctor_charp_int_int):
34696 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
34697 sindex < 0, throw ArgumentOutOfRangeException instead of
34698 ArgumentNullException.
34700 Added new check for length == 0, however
34701 I need to make it return String.Empty from the C code.
34703 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
34704 that calculate the length for us here.
34706 (mono_string_Internal_ctor_sbytep_int_int): Replaced
34707 mono_string_new_utf16 with mono_string_new, since value is utf8.
34709 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34711 * object.c: register the object for finalization if needed.
34712 Allocate one more char in the string for the terminating 0 char.
34714 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
34716 * class.c, class.h, image.c: check if a type implemenst a destructor.
34717 Use the proper key for array class lookups.
34718 * icall.c: register the icalls in the System.GC class.
34719 * gc.c, gc.h: GC-related functions and icalls.
34721 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34725 * unicode.c: free some strings gotten from mono_string_to_utf8 and
34726 changed a couple of free () by g_free ().
34728 * decimal.c: one-liner in the comments for decimal2string ().
34730 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
34732 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
34734 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
34736 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
34737 * object.c (mono_runtime_invoke_array) : handle null in params
34739 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
34741 * string-icalls.c: fixed bug in split (one off bug)
34743 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
34745 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
34746 * icalls.c: added String::Equals as internal method
34748 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
34750 * threads.c: fixed bug in the double interlocked functions
34752 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
34754 * threads.c: implemented all of the new interlocked icalls.
34755 * string-icalls.c: fix a bug in insert.
34756 * icalls.c: added the icalls for interlocked, removed old string functions.
34758 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
34760 * loader.c: fix off-by-one error when reading argument names.
34762 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34764 * profiler.c: win32 counter implementation (untested).
34765 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
34766 (the latter needs testing and more complete impl. from win32 folks).
34768 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
34770 * object.c: mono_array_new_full workaround mono_array_class_get
34773 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
34775 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
34776 * object.h (mono_string_chars): Changed casting type.
34778 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
34780 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
34781 method signatures to use gunichar2 instead of gint16.
34783 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
34785 * object.h, object.c: domain-specific versions of mono_object_new and
34788 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
34790 * object.c: changed String layout
34792 * string-icalls.c (mono_string_Internal_ctor_chara): added
34793 internal string constructors.
34795 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
34797 * threads.c: pass 'this' to the thread start routine.
34799 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34801 * string-icalls.c: fix IndexOf and LastIndexOf. Now
34802 InternalCompareStr don't call twice mono_string_cmp_char for the last
34803 character. Improved performance in mono_string_cmp_char.
34805 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
34807 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
34808 code into its own library: libmonoruntime.
34810 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
34812 * object.h, object.c: changed array format so that szarrays do not
34813 require a bounds structure.
34814 * icall.c, appdomain.c: support for new szarray format.
34816 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
34818 * metadata.c: compare also the retuns type when comparing signatures:
34819 we didn't do this as an optimization since really overloaded methods
34820 must differ also in the arguments, but this doesn't work with
34821 low-level IL code (or when using explicit conversion operators: see
34822 bug#23498 for an example).
34824 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
34826 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
34828 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
34830 * icall.c: make MonoType::GetElementType its own icall.
34832 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34834 * icall.c: remove MonoMethod_get_Name().
34835 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
34838 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
34840 * string-icalls.c: optimized a few methods.
34842 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
34844 * icall.c: added all new string internal calls
34845 * string-icalls.c: added, new string internal call implementation.
34846 * object.c: added mono_string_new_size for allocating a string a size
34848 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
34850 * object.c (mono_object_isinst): use the same code as in the
34851 optimized x86 version.
34853 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34855 * profiler.c: TSC-based timer code (faster and more accurate).
34856 Not hooked up in configure, yet (set USE_X86TSC to 1).
34858 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
34860 * profiler.c, profiler.h: track time spent compiling methods.
34861 * threads.c: track thread creation/destruction.
34863 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
34865 * profiler.c, profiler.h, profiler-private.h: profiling interface
34866 and sample implementation. Moved here so that it can be used also by
34869 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
34871 * reflection.c, reflection.h: keep types and other handles separate in
34872 the hash tables for referred tokens. Add guid for modules.
34874 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
34876 * assembly.c: fix bugs found with valgrind.
34877 * metadata.h, metadata.c: added mono_metadata_guid_heap().
34879 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
34881 * threads: added icall support for getting current domain for
34884 2002-04-13 Martin Baulig <martin@gnome.org>
34886 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
34887 (MonoDebugVarInfo): Added `index' field for register based addresses.
34888 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
34889 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
34890 `MonoDebugVarInfo *params' and `guint32 this_offset' with
34891 `MonoDebugVarInfo *this_var'.
34893 * debug-symfile.c (relocate_variable): New static function to write
34894 a location description for a local variable or method parameter.
34896 2002-04-12 Martin Baulig <martin@gnome.org>
34898 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
34899 stack offset and begin/end scope address of a local variable.
34900 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
34901 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
34902 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
34904 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
34905 Added new relocation types for start/end scope of a local variable.
34907 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34909 * object.h: add mono_object_domain() macro.
34910 * reflection.c: handle typespecs.
34911 * icall.c: MonoMethod::get_Name() implementation.
34913 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34915 * icall.c: String::GetHashCode() icall implementation.
34917 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34919 * icall.c: String::IndexOfAny icall.
34920 * object.c, object.h: make array->max_length more useful.
34921 Intrduced mono_object_class() and mono_string_length() macros.
34923 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34925 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
34926 instead of g_unichar_isdigit.
34928 2002-04-11 Nick Drochak <ndrochak@gol.com>
34930 * icall.c: Implement a simple Double.ToString().
34932 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
34934 * appdomain.h: only io-layer.h is supposed to be included.
34935 * icall.c: explicitly import environ. Fix warning.
34937 2002-04-10 Nick Drochak <ndrochak@gol.com>
34939 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
34940 return true even if it's not Daylight Savings time.
34941 Only return false for the case where the function isn't
34942 implemented for a plaform (read Windows).
34944 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34946 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
34949 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
34951 * mempool.c (mono_mempool_alloc): only use g_malloc when
34952 absolutely necessary.
34954 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
34956 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
34958 * class.c (mono_class_vtable): use domain mempool to allocate vtable
34959 (mono_class_proxy_vtable): use domain mempool
34961 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
34963 * appdomain.h, appdomain.c: split initialization that requires the
34964 execution engine support into mono_runtime_init().
34966 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
34968 * class.c (mono_class_init): don't include vtable inside MonoClass
34969 to save some memory, gather some statistics.
34970 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
34972 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
34974 * icall.c: internalcall implementation for ValueType.Equals().
34976 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
34978 * object.c (mono_message_init): moved
34979 (mono_runtime_exec_main): new arch. independent impl.
34980 (mono_runtime_invoke_array): new method - like
34981 mono_runtime_invoke, but you can pass an array of objects.
34982 (mono_remoting_invoke): new arch. independent impl.
34983 (mono_message_invoke): new arch. independent impl.
34984 (mono_runtime_class_init): new arch. independent impl.
34985 (mono_runtime_object_init): new arch. independent impl.
34987 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34989 * metadata.c, object.c, reflection.c: documented the exported
34992 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
34994 * icall.c: simpler code to pass the assembly builder data to corlib.
34995 Implement GetNestedTypes() internalcall.
34997 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
34999 * class.c: warn if a type can't be loaded.
35001 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
35003 * image.h: typedef MonoImageOpenStatus
35004 * types.h: removed unused file
35006 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
35008 * icall.c: Enum_ToObject accepts enum value arguments.
35010 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
35012 * class.c: move initialization of properties, events and nested
35013 classes, so that they happen for interfaces, too.
35015 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
35017 * icall.c: cleanup some ugly casts in Array_SetValue*.
35019 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
35021 * icall.c: the values array fro enums is of the correct type, now.
35022 Implement (correctly) getFullName instead of assQualifiedName for
35024 * reflection.h, reflection.c: added mono_type_get_name ().
35026 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
35028 * assembly.c, image.h: for each MonoImage, record from wich assembly
35030 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
35031 Make Type.Assembly work.
35033 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
35035 * debug-symfile.h: use char* instead of gpointer to avoid
35038 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
35040 * icall.c (ves_icall_InternalExecute): impl. FielSetter
35041 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
35043 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
35045 * icall.c (mono_message_init): impl. (code cleanup)
35046 (ves_icall_InternalExecute): impl. FieldGetter
35048 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
35049 defined we call all (non-static)methods through the vtable.
35051 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
35053 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
35054 finalizer even though the memory is still referenced (and the chunk of
35055 memory is not freed).
35057 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
35059 * assembly.c: fix brokeness.
35061 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
35063 * class.c: kill some warnings. Check explicit interface method
35064 implementation also without considering the namespace.
35065 Load also literal strings in static class data.
35067 2002-03-29 Miguel de Icaza <miguel@ximian.com>
35069 * assembly.c (default_assembly_name_resolver): Kill memory leak.
35070 (default_assembly_name_resolver): Make the resolver take the
35071 "base" directory where the assembly was originally defined, so we
35072 can load DLLs that are in the same directory as the assembly that
35073 is being referenced.
35075 2002-03-28 Dick Porter <dick@ximian.com>
35081 * unicode.c: Warning cleanups
35083 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
35085 * object.h, reflection.h: use the correct type instead of MonoObject.
35087 2002-03-28 Martin Baulig <martin@gnome.org>
35089 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
35090 (mono_debug_update_symbol_file): Initialize classes if necessary.
35092 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
35094 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
35095 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
35097 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
35099 * assembly.h: fix function prototype.
35100 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
35101 * mono-endian.h: use const cast.
35103 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
35105 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
35107 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
35109 * loader.c: don't assert when a typeref can't be loaded, give
35110 a chance to the runtime to trow an exception instead.
35111 * loader.h: fix warning.
35113 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
35115 * class.c (mono_class_proxy_vtable): added proxy support
35117 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
35119 * icall.c: removed last of PAL calls, added System.Environment
35120 * file-io.h, file-io.c: MonoIO implementation
35121 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
35123 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
35125 * appdomain.c: do not use the byte marker in ldstr table lookup.
35126 * debug-helpers.c: allow two ':' to separate class and method name.
35127 * object.c: allocate arrays bounds with the GC, too.
35128 * verify: add a few more checks.
35130 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
35132 * reflection.c: output also literal strings. Allocate parameter data
35133 with GC_malloc() (thanks, Martin, for catching this!).
35135 2002-03-26 Martin Baulig <martin@gnome.org>
35137 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
35138 include the `this' offset in the `param_offsets'.
35140 2002-03-25 Martin Baulig <martin@gnome.org>
35142 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
35143 mono_debug_get_class() function to get the classes. Added new
35144 relocation types for arrays and strings.
35145 (mono_debug_get_class): New static function to search in all
35146 referenced assemblies for a metadata token.
35148 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
35150 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
35152 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
35153 hold gc-allocated objects. Make the string heap a stream like the
35154 others. Removed duplicated code when writing stream info.
35155 Added asserts to catch possible buffer overflows. Set the sorted map
35156 for tables that need sorting. Added some documentation.
35158 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
35160 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
35161 for interned strings and vtables.
35163 2002-03-24 Martin Baulig <martin@gnome.org>
35165 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
35166 it in the array since it was created with g_slist_prepend().
35168 2002-03-24 Martin Baulig <martin@gnome.org>
35170 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
35171 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
35172 (mono_debug_method_from_token): Renamed to
35173 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
35174 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
35176 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
35179 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
35181 2002-03-24 Martin Baulig <martin@gnome.org>
35183 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
35184 (mono_debug_method_from_token): New func.
35186 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
35187 New interncall, calls mono_debug_local_type_from_signature().
35188 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
35189 calls mono_debug_method_from_token().
35191 2002-03-23 Martin Baulig <martin@gnome.org>
35193 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
35194 specifies the number of bytes to be converted, not the array size.
35195 Return the number of chars, not the number of bytes.
35196 (ves_icall_iconv_get_chars): The `byteCount' argument
35197 specifies the number of bytes to be converted, not the array size.
35199 2002-03-23 Martin Baulig <martin@gnome.org>
35201 * reflection.h (MonoReflectionSigHelper): New type.
35203 * reflection.c (mono_reflection_sighelper_get_signature_local),
35204 (mono_reflection_sighelper_get_signature_local): New functions.
35206 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
35207 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
35210 2002-03-23 Martin Baulig <martin@gnome.org>
35212 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
35213 is_writeable is set.
35214 (mono_raw_buffer_update): New function to write the modified map
35217 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
35219 * debug-symfile.c (mono_debug_update_symbol_file): Call
35220 mono_raw_buffer_update() when done writing.
35222 2002-03-23 Martin Baulig <martin@gnome.org>
35224 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
35226 * debug-symfile.c: Added support for arguments and local variables.
35228 2002-03-23 Dick Porter <dick@ximian.com>
35230 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
35231 protected by ifdefs, hence breaking the w32 build.
35233 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35235 * object.c: implement is_interned() the right way.
35237 2002-03-21 Martin Baulig <martin@gnome.org>
35239 * debug-symfile.[ch]: New files to handle debugging information
35240 files. There's also support to dynamically update these symbol
35241 files to include machine dependent information.
35243 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
35245 * threads.c (mono_thread_create): new function to create thread
35248 2002-03-20 Martin Baulig <martin@gnome.org>
35250 * icall.c (ves_icall_InternalInvoke): Create a new object if the
35251 method is a constructor.
35252 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
35253 points to ves_icall_InternalInvoke().
35255 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
35257 * file-io.c: Flush shouldn't throw exceptions.
35259 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
35261 * file-io.c: FileStream flush support; FileSetLength now
35262 restores file pointer.
35264 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
35266 * class.c: set image for pointer classes.
35268 2002/03/19 Nick Drochak <ndrochak@gol.com>
35270 * sysmath.c: Forgot one.
35272 2002-03-18 Miguel de Icaza <miguel@ximian.com>
35274 * sysmath.c: Avoid redefining existing names.
35276 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
35278 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
35279 handled by runtime as icall rather than dllimport from libm.so
35280 * file-io.c, file-io.h: fixed handle argument type.
35282 2002-03-18 Dick Porter <dick@ximian.com>
35284 * reflection.c (mono_image_get_type_info): rename interface to
35285 iface, because of "#define interface struct" on windows.
35287 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
35289 * class.c, class.h: rename and export mono_ptr_class_get().
35290 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
35291 * reflection.c, reflection.h, icall.c: better/saner type name
35292 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
35295 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
35297 * class.c (mono_class_init): removed hardcoded GHC_SLOT
35299 * icall.c (ves_icall_InternalInvoke): impl.
35301 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
35303 * reflection.c: output the interface map table, too.
35305 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
35307 * class.c (class_compute_field_layout): separate computation of
35308 static field layout
35310 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
35312 * icall.c: added System.Buffer support.
35313 * file-io.c: moved file icalls from PAL to FileStream.
35315 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
35317 * icall.c (ves_icall_System_Object_GetHashCode): impl.
35319 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
35321 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
35323 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
35325 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
35327 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
35329 * debug-helpers.{c,h}: moved here from monograph some useful functions
35330 to locate a method by name/signature in a class or image. Included
35331 also a small and flexible IL disassembler.
35333 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
35335 * reflection.c: fixup tokens in methods with small header size, too.
35337 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
35339 * object.c (mono_string_to_utf8): remove assert(!error), instead
35342 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
35344 * icall.c: update to the new mono_Array_class_get interface.
35346 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
35348 * appdomain.c, object.c: Boehm-GC enable.
35349 * icall.c: make get_data_chunk() support split data requests.
35350 Ensure a class is initialized in more cases. Return only the first
35351 property found in GetProperties() or the compiler gets confused.
35352 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
35353 * reflection.h, reflection.c: add fixup mechanism for field and method
35354 tokens. Initialize assembly->typeref in a single place. Output
35355 properties after events. Support custom attributes for events, too.
35356 Typo fix for paramter custom attrs.
35358 2002-03-07 Martin Baulig <martin@gnome.org>
35360 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
35362 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
35364 * class.c (mono_array_class_get): fix. for multi. dim. arrays
35366 2002-03-06 Martin Baulig <martin@gnome.org>
35368 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
35369 non-zero lower bounds. See testcases #F10-#F13.
35371 2002-03-05 Martin Baulig <martin@gnome.org>
35373 * exception.c (mono_get_exception_argument_out_of_range): New exception.
35375 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
35376 ves_icall_System_Array_GetValue(), only calculate the absolute array position
35378 (ves_icall_System_Array_SetValue): Likewise.
35379 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
35380 as argument and does the actual work. This function is used when copying a
35381 multi-dimensional array.
35382 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
35383 now do all the widening conversions of value types.
35384 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
35386 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35388 * class.c: remove some magic numbers and use the smbolic names,
35389 instead. Added init_events() to load event info at class init time.
35390 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
35391 and mono_metadata_methods_from_event().
35392 * reflection.h, reflection.c: added support for writing out the evnets
35393 related information.
35395 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
35397 * reflection.h, icall.c: use a different method (GetInterfaces)
35398 to gather interface info and add isbyref, isprimitive and
35399 ispointer to the ves_icall_get_type_info() return value.
35401 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
35403 * class.h: stared adding support for events.
35404 * icall.c: split find_members implementation. Added debug icall to get
35405 the address of an object.
35406 * reflection.c: handle TypeBuilders in mono_type_get_object().
35408 2002-03-01 Martin Baulig <martin@gnome.org>
35410 * icall.c (ves_icall_System_Array_GetLength): This must throw an
35411 ArgumentOutOfRangeException(), not an ArgumentException().
35412 (ves_icall_System_Array_GetLowerBound): Likewise.
35413 (ves_icall_System_Array_GetValue): Improved argument checking.
35414 (ves_icall_System_Array_SetValue): Improved argument checking.
35416 2002-03-01 Martin Baulig <martin@gnome.org>
35418 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
35419 called with invalid arguments rather than just dying with g_assert().
35420 (ves_icall_System_Array_SetValue): Likewise.
35421 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
35422 raise a NotImplementedException instead.
35423 (ves_icall_System_Array_GetLength): Added argument checking.
35424 (ves_icall_System_Array_GetLowerBound): Added argument checking.
35426 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
35428 * object.h (mono_assert): new macros mono_assert and
35429 mono_assert_not_reached
35431 2002-02-28 Martin Baulig <martin@gnome.org>
35433 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
35434 and "System::String::IsInterned" to "System::String::_IsInterned".
35436 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
35438 * icall.c: remove hacks for typebuilder. Added icall to create a
35439 modified type from a tybebuilder.
35440 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
35441 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
35442 to create a backing MonoClass for a TypeBuilder.
35444 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
35446 * class.c, class.h: more refactoring of class init.
35447 Export mono_class_setup_mono_type() and mono_class_setup_parent().
35449 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
35451 * marshal.c, marshal.h: start of marshaling interface.
35453 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
35455 * icall.c: fix order in assembly qualified name icall.
35457 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
35459 * class.c: do not free str, since we store it in the hash table.
35460 * reflection.h: add label field to MonoILExceptionInfo.
35461 * reflection.c: handle references to more than one assembly. Handle
35462 case when there isn't a module created in the assembly.
35464 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
35466 * class.c: Fix typo. Start refactoring of class init code.
35468 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
35470 * appdomain.c: exit with 1 on error.
35471 * class.c: we already have the name in MonoClassField.
35472 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
35473 MonoStreamHeader instead of an offset of image->raw_metadata.
35475 2002-02-26 Miguel de Icaza <miguel@ximian.com>
35477 * appdomain.c (mono_init): Be even more descriptive about the error.
35479 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
35481 * appdomain.c: give the user an informative message when corlib can't
35484 2002-02-26 Martin Baulig <martin@gnome.org>
35486 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
35487 New icall to get the time zone data.
35489 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
35491 * reflection.c: set virtual and raw size of section correctly.
35492 * threads.c: transfer domain information to newly created threads.
35494 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
35496 * class.c: when instancing a class in a domain, load the default
35497 vaules for static fields from the constant table. Fix System.Enum to
35499 * icall.c: implement Object::GetType() internalcall. Implemented
35500 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
35501 Fixed checking of binding flags in find_members().
35502 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
35503 * reflection.c: handle enumerations when writing to the constant
35504 table. Use a different object cache for types.
35507 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
35509 * object.c (mono_object_isinst): fix for arrays
35511 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
35513 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
35515 * object.c: don't use mprotect () and fix intern pool hash table
35516 lookup for big endian systems.
35518 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
35520 * icall.c: change type_is_subtype_of () signature.
35522 2002-02-21 Mark Crichton <crichton@gimp.org>
35524 * rand.c, rand.h: Added random number generator for
35525 System.Security.Cryptography classes.
35527 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
35529 * icall.c: Added System.Security.Cryptography calls.
35531 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
35533 * class.c, icall.c, metadata.c: better support for pointer types.
35534 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
35535 * reflection.c: Add support for getting custom attrs for properties
35536 and simplify some code.
35538 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
35540 * icall.c: change getToken () and add custom attribute GetBlob()helper
35542 * reflection.h: add custom attrs array to the reflection builder structures.
35543 * reflection.c: encode and emit custom attributes for all the relevant
35544 reflection objects. Cache fieldref and methodref tokens. Change
35545 mono_image_create_token() interface to take a MonoDynamicAssembly.
35546 More complete custom attributes decoder. Load custom attributes for
35547 Assembly, Field, Method and Constructor objects, too. Make the
35548 returned array an Attribute[] one, not object[]. Added
35549 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
35550 custom attribute constructor.
35552 2002-02-20 Dick Porter <dick@ximian.com>
35556 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
35557 problem code out for now).
35559 2002-02-19 Radek Doulik <rodo@ximian.com>
35561 * object.c (mono_ldstr): use hash table to avoid multiple swapping
35563 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
35565 * icall.c: register the GetCustomAttributes method.
35566 * object.c, object.h: add mono_string_new_len ().
35567 * reflection.h, reflection.c: added mono_runtime_invoke(),
35568 mono_install_runtime_invoke(). Added
35569 mono_reflection_get_custom_attrs () to load custom attributes and
35570 create the attribute objects.
35572 2002-02-19 Dick Porter <dick@ximian.com>
35573 * threads-dummy-types.c:
35574 * threads-dummy-types.h:
35577 * threads-pthread-types.c:
35578 * threads-pthread-types.h:
35579 * threads-pthread.c:
35580 * threads-pthread.h: Deleted obsolete files
35582 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
35584 * class.c (mono_class_vtable): runtime init the class when we
35585 allocate static class data.
35587 * icall.c (ves_icall_System_Array_SetValue): check for null values.
35589 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
35590 and String - but we will need generic marshalling support in the
35592 (mono_init): set the domain name in a ms compatible way
35594 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
35597 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
35599 * object.c (mono_array_clone): use alloca() instead of g_malloc
35602 * appdomain.c (mono_domain_unload): impl.
35604 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
35606 * appdomain.c, object.c: fix intern pool implementation.
35607 * class.c: fix alignment code.
35609 2002-02-16 Radek Doulik <rodo@ximian.com>
35611 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
35612 and s2 > s1, just copy lower bytes to be compatible with little
35613 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
35614 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
35616 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
35617 force big_endian to be 1 for big endian machines
35618 (ves_icall_iconv_new_decoder): ditto
35620 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
35622 * socket-io.c (convert_sockopt_level_and_name): If the system
35623 doesn't define SOL_IP or SOL_TCP, get them by hand using
35624 getprotobyname() and caching the values (because this could be a
35626 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
35627 Use the appropriate struct when the system does support it. Ie,
35628 not all systems have struct ip_mreqn so use struct ip_mreq when
35631 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
35633 * reflection.c: handle finally clauses.
35635 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
35637 * socket-io.c: use g_snprintf() instead of snprintf.
35639 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
35641 * reflection.c (mono_param_get_objects): Cast second argument to
35642 mono_method_get_param_names to a const char** to silence the
35645 * appdomain.c (mono_domain_assembly_open): Put parens around the
35646 truth statement in the for-loop.
35648 * unicode.c (iconv_convert): Got rid of a compiler warning about
35649 int i being unused when the system has a new iconv.
35650 (iconv_get_length): Same.
35652 * image.c (load_class_names): Cast the second argument to
35653 g_hash_table_insert() to char* to hush compiler warnings about the
35655 (mono_image_open): Same here.
35657 * socket-io.c: Don't conditionally include sys/filio.h or
35658 sys/sockio.h here anymore since we now get them from
35659 io-layer/io-layer.h
35660 (inet_pton): If the system doesn't support inet_aton, implement
35661 using inet_addr and also #define INADDR_NONE if it isn't defined
35664 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
35666 * metadata.c, metadata.h: added function to get packing and size info
35668 * reflection.h, reflection.c: handle field RVA data. Save info about
35669 the table layout if needed. Assign typedef indexes to all the types
35670 before dumping the info about them to avoid forward reference problems.
35672 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
35674 * socket-io.c (convert_sockopt_level_and_name): ifdef
35675 SO_ACCEPTCONN because it is not defined on my system (old debian)
35677 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
35679 * opcode.c: use stddef.h to get NULL.
35681 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
35683 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
35684 for FIONBIO, FIONREAD and SIOCATMARK.
35685 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
35686 define INADDR_NONE and besides, inet_addr() is deprecated and
35687 should not be used. Use inet_pton() instead - it also has the
35688 added bonus that it can easily handle IPv6 addresses as well.
35689 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
35691 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
35693 * decimal.c: remove _MSC_VER conditional.
35695 2002-02-13 Dick Porter <dick@ximian.com>
35698 * icall.c: Internal calls for Blocking, Select, Shutdown,
35699 GetSocketOption and SetSocketOption
35701 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35703 * assembly.cs: better resolver: use it instead of some kludgy
35706 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
35708 * reflection.c: the best way to speed-up the compiler is to avoid
35711 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
35713 * class.c (mono_class_vtable): changed the object layout
35714 (obj->vtable->class).
35715 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
35717 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35719 * assembly.c: look for assemblies in the assembly dir, too.
35721 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
35723 * class.c: fix thinko in mono_class_from_type().
35725 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
35727 * exception.h, exception.c: added TypeLoadException.
35728 * object.h, object.c: added mono_array_clone ().
35729 * icall.c: handle throwOnError in AssemblyGetType().
35730 Added Array.Clone().
35731 * opcode.h, opcode.c: use a single value for the opcode val.
35732 Compile fix for non-gcc compilers.
35734 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
35736 * opcodes.c, opcodes.h: export interesting info about opcodes.
35738 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
35740 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
35743 * class.c (class_compute_field_layout): set element_class for enums
35744 (mono_class_create_from_typedef): set element_class for normal classes
35746 * icall.c (ves_icall_System_Enum_get_value): impl.
35748 * class.c (mono_class_create_from_typedef): do not set valuetype
35749 flag for System.ValueType and System.Enum
35751 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
35753 * unicode.c (iconv_convert): fix big endian problem.
35755 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
35757 * class.c: add asserts if we are ever going to scribble over memory.
35758 * socket-io.c: not all systems have AF_IRDA defined.
35760 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
35762 * class.c (class_compute_field_layout): do not consider static
35763 fields to compute alignment
35765 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
35767 * appdomain.c (mono_appdomain_get): impl.
35768 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
35770 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
35772 * icall.c: ignore "file://" prefix when loading an assembly.
35774 2002-01-23 Dick Porter <dick@ximian.com>
35778 * Makefile.am: Added socket support
35780 2002-01-23 Miguel de Icaza <miguel@ximian.com>
35782 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
35783 code back. This should return the assemblies that are loaded by
35784 the runtime on behalf of an application domain.
35786 The current implementation is still broken, it just returns every
35787 assembly loaded, but until we get real applications domain this
35790 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
35792 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
35795 2002-01-23 Miguel de Icaza <miguel@ximian.com>
35797 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
35798 the mono_class_from_name lookup.
35799 (ves_icall_get_parameter_info): ditto.
35800 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
35802 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
35804 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
35806 * class.c: load also nested classes on class init.
35807 System.ValueType instance methods gets passed boxed
35808 values, unless methods in derived classed that get a pointer to the
35810 * icall.c: use better name parsing code in GetType().
35811 * image.c, image.h: add mono_image_loaded ().
35812 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
35813 * reflection.c, reflection.h: added mono_reflection_parse_type().
35815 2002-01-22 Veronica De Santis <veron78@interfree.it>
35817 * icall.c : Added mapping of internal calls for Manual and Auto reset events
35818 * threads.c : Added the implementation of internal calls for events
35819 * threads.h : Added prototypes of internal calls for events
35821 2002-01-21 Radek Doulik <rodo@ximian.com>
35823 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
35825 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
35827 * class.c (mono_class_init): set min_align to 1 (instead of 0)
35828 (mono_class_value_size): use min_align
35830 2002-01-20 Dick Porter <dick@ximian.com>
35833 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
35834 so it compiles on w32.
35836 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
35838 * metadata.c (mono_type_stack_size): impl.
35840 * class.c (mono_class_get_field): impl. memberref token
35842 2002-01-16 Veronica De Santis <veron78@@interfree.it>
35844 * icall.h : Added the internal calls mapping for CreateMutex_internal
35845 and ReleaseMutex_internal.
35846 * threads.h : Added the prototype of mutexes internal calls.
35847 * threads.c : Added the implementations of mutexes internal calls.
35849 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
35851 * metaparse.h: removed unused file.
35852 * reflection.c, reflection.h: added stream_data_align () function
35853 to align data in streams and keep stream aligned. Add support for
35854 exception support in method headers.
35856 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
35858 * unicode.c: make iconv_convert () return the number of bytess written
35859 in the output buffer.
35861 2002-01-15 Dick Porter <dick@ximian.com>
35862 * threads.c: Make the runtime's idea of infinite timeouts coincide
35863 with the class library's
35865 Fix a particularly egregious bug in mono_thread_cleanup(). That
35866 code was so utterly bogus it must have been written on a Monday.
35868 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
35870 * reflection.h: add subtypes field to TypeBuilder.
35871 * reflection.c: encode constants for literal fields.
35872 Handle subtypes. Fix user string token (and add a zero byte)
35875 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
35877 * class.c (mono_class_init): bug fix: assign slot numbers for
35880 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
35882 * reflection.c: don't try to output a code RVA for abstract methods.
35883 Small fixes for method header format. Output parameter info to the
35884 ParamDef table. Save method overriding info to MethodImpl table.
35885 Fix property support. Allow typedef.extends to be a type in the
35887 * verify.c: fix off-by-one error.
35889 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
35891 * class.c: fix mono_class_from_mono_type () for szarray types.
35892 Remove unused cache check in mono_class_from_type_spec().
35893 * icall.c: *type_from_name () functions handle simple arrays and byref.
35894 * reflection.c: handle byref and szarray types. Handle methods without
35895 body (gets P/Invoke compilation working). Handle types and fields in
35897 * reflection.h: add rank to MonoTypeInfo.
35899 2002-01-10 Dick Porter <dick@ximian.com>
35901 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
35904 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
35906 * icall.c: initialize class in type_from_handle ().
35907 Loop also in parent classes for get_method ().
35908 * reflection.c: properly encode class and valuetype types.
35909 Start on encoding TypeBuilder types. Handle fieldrefs.
35910 Use correct length when registering a user string.
35911 Handle ConstructorBuilder and MonoMethod in get_token ().
35912 Make mono_type_get_object () aware of cached types.
35913 * object.c: back out change to mono_string_new ().
35915 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
35916 * object.c: mono_string_new should return a NULL when the string
35917 passed in is NULL -- not try to deference it.
35919 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
35921 * icall.c: hack to make IsSubType work for TypeBuilders.
35922 * reflection.c: emit constructors before methods.
35923 Retrieve param names in mono_param_get_objects().
35925 2002/01/05 Nick Drochak <ndrochak@gol.com>
35927 * Makefile.am: fix list of headers and sources so automake 1.5
35928 doesn't complain. Removed \# at end of list.
35930 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
35932 * reflection.c: get token for a method ref. Set return type of
35933 constructor to void.
35934 * loader.c: debug message.
35935 * class.c: typo fix.
35937 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
35939 * icall.c: fix array init with rank > 1. FindMembers
35940 loops in parent class as well.
35941 * image.c: do not insert nested types in name cache.
35942 * reflection.c: warning fix.
35943 * reflection.h: add override method (for interface impl).
35945 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
35947 * metadata.c: fix customattr decoding.
35949 2001-12-21 Miguel de Icaza <miguel@ximian.com>
35951 * rawbuffer.cs: Added native Win32 implementation, avoids using
35952 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
35954 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
35956 * class.c: make the low-level routines handle the cache.
35958 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
35960 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
35962 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
35964 * class.c: fix mono_array_element_size() for objects.
35965 * class.h, class.c: add properties to MonoClass and load them
35967 * icall.c: check with isinst() when assigning a value to an array
35968 instead of requiring the classes to match exactly.
35969 Implemented icall for System.Type::GetType().
35970 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
35971 enums. Handle bindingflags when looking for methods and fields.
35972 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
35973 and mono_metadata_methods_from_property().
35974 * reflection.h, reflection.c: added structures for propreties,
35975 parameters and enums. Implemented mono_property_get_object() and
35976 mono_param_get_objects().
35978 2001-12-18 Dick Porter <dick@ximian.com>
35980 * file-io.c: Use mono_string_to_utf16() instead of
35981 mono_string_chars()
35983 * object.c: Added mono_string_to_utf16(), which copies the non
35984 NULL-terminated MonoString into a new double-null-terminated
35987 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
35989 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
35991 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
35993 * file-io.c: raise exceptions if handle is invalid.
35995 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
35997 * assembly.c: yet another check for mscorlib.
35998 * class.c, class.h: load nesting info for classes.
35999 * icall.c: many new functions to support the Reflection classes.
36000 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
36001 * reflection.h, reflection.c: mono_image_create_token(),
36002 mono_assembly_get_object(), mono_type_get_object(),
36003 mono_method_get_object(), mono_field_get_object(): methods to return
36004 objects that parallel the C representation of assemblies, types,
36007 2001-12-11 Dick Porter <dick@ximian.com>
36010 * file-io.c: Internal calls for file IO.
36012 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
36014 * tabledefs.h: missing FileAttributes.
36015 * verify.h, verify.c: use is_valid_string () to simplify and check for
36016 valid strings more correctly. Fix warnings and speeling.
36017 Check more tables: Filed, File, ModuleRef, StandAloneSig.
36018 Check code: branches, maxstack, method calls.
36020 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
36022 * object.c (mono_object_allocate): removed static, so that the jit
36023 can allocate value types.
36025 * icall.c (ves_icall_System_DateTime_GetNow): impl.
36027 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
36029 * class.c: init enum types right away and register the
36030 token->MonoClass map in mono_class_create_from_typedef ().
36031 * verify.h, verify.c: first cut of the verifier.
36032 * pedump.c: add --verify switch to verify metadata tables.
36033 * tabledefs.h: add some missing enums.
36035 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
36037 * class.c (mono_install_runtime_class_init): impl.
36038 (mono_class_init): renamed mono_class_metadata_init to
36039 mono_class_init, also removed the metadata_inited flag
36041 * object.c (mono_object_isinst): use faster algorithm
36043 2001-11-30 Radek Doulik <rodo@ximian.com>
36045 * mono-endian.h: reverted last change
36046 added function prototypes
36048 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
36049 add mono-endian.c back
36051 * mono-endian.c: returned back, as Paolo pointed out, it's needed
36052 for unaligned access, I've mistaked it with endianess. I am
36054 (mono_read16): fix reverted endianess
36055 (mono_read64): ditto
36056 (mono_read32): ditto
36058 2001-11-30 Dick Porter <dick@ximian.com>
36060 * exception.c: Implement mono_exception_from_name()
36062 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
36064 * metadata.h, metadata.c: remove params_size and locals_size and their
36065 calculation from the metadata code: they are only usefult to the
36068 2001-11-29 Radek Doulik <rodo@ximian.com>
36070 * object.c (mono_ldstr): swap bytes here, it's probably not the
36071 best place, but works for me now, I'll redo it once I know mono
36072 better, also note that I add PROT_WRITE and don't reset back, also
36073 note that it's only affects big endians, so x86 should be OK
36075 * mono-endian.h (read16): use just glib macros for both endians
36077 * mono-endian.c: removed as glib macros are used in in
36078 mono-endian.h so we don't need to care about endianess for read
36079 macros as glib does that for us already
36081 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
36083 * class.h, class.h: take minimum alignment into consideration so
36084 that the fields of a class remain aligned also when in an array.
36086 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
36088 * loader.h, loader.c: add mono_method_get_param_names().
36089 * class.c: 0-init class fields.
36091 2001-11-26 Dick Porter <dick@ximian.com>
36095 * threads.c: New file that handles System.Threading on all platforms
36098 * object.h: Remove the synchronisation struct from MonoObject,
36099 replace it with a pointer that gets initialised on demand
36101 * Makefile.am: Replace all the system-specific threading code with
36102 a single file that uses the new wrapper library
36104 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
36106 * class.c, class.h: add mono_install_trampoline() so that the runtime
36107 can register a function to create a trampoline: removes the ugly
36108 requirement that a runtime needed to export arch_create_jit_trampoline.
36109 * object.h, object.c: added mono_install_handler() so that the runtime
36110 can install an handler for exceptions generated in C code (with
36111 mono_raise_exception()). Added C struct for System.Delegate.
36112 * pedump.c: removed arch_create_jit_trampoline.
36113 * reflection.c: some cleanups to allow registering user strings and
36114 later getting a token for methodrefs and fieldrefs before the assembly
36116 * row-indexes.h: updates and fixes from the new ECMA specs.
36118 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
36120 * class.h, class.c: add enum_basetype field to MonoClass.
36121 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
36122 to get index in the constant table reated to a field, param or
36124 * reflection.h, reflection.c: handle constructors. Set public-key and
36125 version number of the built assembly to 0.
36126 * row-indexes.h: update from new ECMA spec.
36128 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
36130 * class.h, class.c: add a max_interface_id to MonoClass.
36131 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
36132 since it's used to do that. Added mono_type_type_from_obj().
36133 Make GetType() return NULL instead of segfaulting if the type was not
36134 found. Handle simple arrays in assQualifiedName.
36135 * object.h: add a struct to represent an Exception.
36136 * reflection.c: output call convention in method signature.
36137 Add code to support P/Invoke methods and fixed offsets for fields.
36139 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
36141 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
36143 * icall.c: use mono_array_addr instead of array->vector: fixes the
36144 reflection image writing.
36145 * reflection.c: init call convention byte to 0 in method signature.
36146 Encode the property signature. Don't output property-related methods
36147 twice. Really process the properties for a type (don't cast a field to
36148 a property, my mom always told me that).
36149 Fix 64 bit issues in pointer alignment in a different and more
36152 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
36154 * loader.h: Removed type class from MonoDefaults, added monotype
36156 * loader.c: Loaded MonoType, removed loading of Type
36158 * icall.c (my_mono_new_object): Now returns a System.MonoType,
36159 and fills in System.Type._impl with a RuntimeTypeHandle rather
36160 than the actual MonoClass *
36162 (ves_icall_type_from_handle): change from type_class to
36165 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
36168 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
36171 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
36173 (ves_icall_System_Reflection_Assembly_GetType): implemented
36175 (ves_icall_System_MonoType_assQualifiedName): implemented
36177 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
36179 2001-11-09 Miguel de Icaza <miguel@ximian.com>
36181 * assembly.c (mono_assembly_open): Implement a cache for the
36184 (mono_assembly_close): only destroy the assembly when the last
36187 2001-11-09 Dick Porter <dick@ximian.com>
36189 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
36191 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
36193 * class.c (mono_class_metadata_init): bug fix: compute the right slot
36195 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
36197 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
36198 from Martin Weindel.
36199 * object.h: add mono_string_chars ().
36201 2001-11-07 Miguel de Icaza <miguel@ximian.com>
36203 * reflection.c (build_compressed_metadata): Eliminates warnings
36204 and uses 64-bit clean code.
36206 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
36207 (mono_type_equal): Change signature to eliminate warnings.
36209 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
36211 * icall.c, loader.c: remove the internalcall array constructors.
36212 Changes to match the new MonoArray structure.
36213 * object.h, object.c: an array object doesn't allocate an extra
36214 vector. Add mono_array_new_full () to create jagged arrays easily.
36216 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
36218 * metadata.h, metadata.c: add mono_metadata_field_info () to
36219 retreive all the info about a field from vairous tables.
36220 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
36221 * class.h, class.c: augment MonoClassField with more info.
36222 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
36223 policy and load a field's RVA if needed.
36225 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
36227 * class.c (mono_class_metadata_init): create a trampoline for all
36228 virtual functions instead of actually compiling them.
36230 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
36232 * class.h, class.c: include name in MonoClassField.
36233 * class.c: fix fundamental type of System.Object and System.String.
36234 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
36236 * icall.c: remove internalcalls for the Reflection stuff that is now
36238 * loader.c: mono_field_from_memberref () implementation.
36239 * mono-endian.c: thinko (s/struct/union/g).
36240 * object.c, object.h: make the mono_string_* prototypes actually use
36241 MonoString instead of MonoObject.
36242 * reflection.c, reflection.h: updates for changes in the reflection
36243 code in corlib: we use C structures that map to the actual C# classes.
36244 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
36245 fat method header if needed and use the info from the ILGenerator for
36246 methods. Handle fields in types. Misc fixes.
36248 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
36250 * class.c (mono_class_metadata_init): bug fix: always allocate
36251 space for static class data
36253 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
36255 * class.c (mono_compute_relative_numbering): use relative
36256 numbering to support fast runtime type checks.
36258 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
36260 * class.c (mono_class_create_from_typeref): added debugging output
36261 to print class name when MonoDummy is returned instead of real class
36263 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
36265 * class.c (mono_class_metadata_init): interface offset table now
36266 contains pointers into the vtable - this is more efficient for the jit
36268 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
36270 * class.c (mono_class_metadata_init): use a temporary vtable (the
36271 old algorithm only worked for the interpreter, but not for the jit)
36273 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
36275 * loader.c (method_from_memberref): use mono_class_get to get the
36276 class of an array instead of using System.Array directly.
36277 (mono_get_method): also add MEMBERREF methods to the method cache
36278 which usefull for arrays.
36280 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
36282 * pedump.c (arch_compile_method): added to compute vtable entry
36284 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
36285 number of interfaces.
36287 * class.h: merged MonoArrayClass into MonoClass
36289 * class.c (mono_class_create_from_typedef): compute the vtable size and
36290 allocate space to include the vtable inside MonoClass
36291 (mono_class_metadata_init): initialize the vtable
36293 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
36295 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
36296 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
36297 * image.c: endian fixes by Laurent Rioux.
36298 * object.h, object.c: rename MonoStringObject to MonoString and
36299 MonoArrayObject to MonoArray. Change some function names to conform to
36300 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
36301 guint16* as first argument, so don't use char*.
36302 Provide macros to do the interesting things on arrays in a portable way.
36303 * threads-pthread.c: updates for the API changes and #include <sched.h>
36304 (required for sched_yield()).
36305 * icall.c: updates for the API changes above.
36306 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
36307 platforms that need them.
36309 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
36311 * class.c: set the correct type for all the fundamental
36312 type when loading the class.
36314 2001-10-05 Dick Porter <dick@ximian.com>
36316 * threads-pthread.c (pthread_mutex_timedlock): Simple
36317 compatibility version for C libraries that lack this call.
36319 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
36321 * class.c: MonoTypes stored in MonoClass are stored as
36322 fundamental MonoTypes when the class represents a
36323 fundamental type (System.Int32, ...).
36324 The TypeHandle return by ldtoken is a MonoType*.
36325 * icall.c: ves_icall_get_data_chunk () write out all the
36326 PE/COFF stuff. Implement ves_icall_define_method (),
36327 ves_icall_set_method_body (), ves_icall_type_from_handle ().
36328 * image.c: properly skip unknown streams.
36329 * loader.h, loader.c: add type_class to mono_defaults.
36330 * metadata.c, metadata.h: export compute_size () as
36331 mono_metadata_compute_size () with a better interface.
36332 Typo and C&P fixes.
36333 * pedump.c: don't try to print the entry point RVA if there is no entry point.
36334 * reflection.c, reflection.h: many cleanups, fixes, output method
36335 signatures and headers, typedef and typeref info, compress the metadata
36336 tables, output all the heap streams, cli header etc.
36337 * row-indexes.h: typo fixes.
36339 2001-10-04 Dick Porter <dick@ximian.com>
36341 * object.h: Add a synchronisation mutex struct to MonoObject
36343 * object.c (mono_new_object): Initialise the object
36344 synchronisation mutexes
36346 * icall.c: System.Threading.Monitor internal calls
36348 * threads-pthread.h:
36349 * threads-pthread.c: System.Threading.Monitor internal calls
36351 * threads-types.h: New file, includes the system-specific thread
36354 * threads-pthread-types.h:
36355 * threads-pthread-types.c: New files, handle pthread-specific
36356 synchronisation types
36358 * threads-dummy-types.h:
36359 * threads-dummy-types.c: New files of dummy support for
36360 thread-specific types
36364 * pedump.c: include mono-endian.h not endian.h
36366 * Makefile.am: More threads files.
36367 Name mono-endian.h not endian.h
36369 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
36371 * Makefile.am, reflection.h, reflection.c: move here the reflection related
36372 stuff and implement a few more bits.
36373 * icall.c: a field needs to be dereferenced twice. Do not use the same
36374 name for two variables in the same scope.
36375 * image.c, image.h: cleanups.
36377 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
36379 * class.c (mono_class_metadata_init): bug fix: compute the right size
36381 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
36383 * icall.c: implemented some of the Reflection internalcalls.
36384 * image.c, image.h: start writing out the PE/COFF image.
36385 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
36386 that does the reverse than decode_blob_size ().
36387 * object.c: use mono_metadata_encode_value (). Move here
36388 temporary implementation of mono_string_to_utf8 ().
36389 * rawbuffer.c: make malloc_map static.
36391 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
36393 * metadata.c: fix type comparison for arrays.
36394 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
36395 Added a couple of new classes to monodefaults.
36396 * icall.c: added a couple of Reflection-related internalcalls.
36397 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
36398 Added a byval_arg MonoType to MonoClass.
36400 2001-09-28 Dick Porter <dick@ximian.com>
36403 * threads-pthread.h:
36404 * threads-pthread.c: Implemented internal calls for
36405 LocalDataStoreSlot operations. Applied mutexes around all shared
36406 data. Reworked the thread creation and Start() operations to
36407 avoid a race condition.
36410 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
36412 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
36414 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
36416 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
36418 * class.c, loader.c: warn and return NULL instead of erroring out.
36419 * icall.c: added System.AppDomain::getCurDomain().
36420 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
36422 2001-09-25 Dick Porter <dick@ximian.com>
36424 * threads-pthread.h:
36425 * threads-pthread.c: Implemented timed thread joining and added
36426 System.Threading.Thread::Join_internal internal call
36428 * icall.c: Added System.Threading.Thread::Join_internal internal call
36431 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
36433 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
36435 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
36436 mono_string_intern () to implement the semantics of the ldstr opcode
36437 and the interning of System.Strings.
36438 * icall.c: provide hooks to make String::IsIntern and String::Intern
36441 2001-09-23 Dick Porter <dick@ximian.com>
36444 * threads-dummy.h: New files of dummy threading routines
36446 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
36447 support code based on system specifics
36449 Rename PTHREAD_LIBS to THREAD_LIBS
36451 2001-09-23 Dick Porter <dick@ximian.com>
36453 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
36454 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
36456 (mono_thread_init): Set up a Thread object instance to return when
36457 the main thread calls Thread.CurrentThread
36458 (mono_thread_cleanup): Wait for all subthreads to exit
36460 * icall.c: New internal calls for System.Threading.Thread::Sleep
36461 (including Schedule) and CurrentThread
36463 * threads.h: New file, to insulate thread-specific stuff from the
36466 2001-09-21 Dick Porter <dick@ximian.com>
36468 * threads-pthread.h:
36469 * threads-pthread.c: New file, for handling pthreads-style
36470 threading support. Start() now starts a new thread and executes
36471 the ThreadStart delegate instance.
36473 * icall.c: Added the internalcall for
36474 System.Threading.Thread::Start_internal
36476 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
36478 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
36480 * loader.c: work around the different signatures for delegates
36481 constructors csc generates in compiled code vs the ones compiled in mscorlib.
36483 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
36485 * class.h, class.c: add mono_class_get_field_from_name ().
36486 * *: Fix C comments and other ANSI C issues.
36488 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
36490 * endian.h, assembly.c: fix some endianness issues.
36492 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
36494 * loader.h, load.c: add delegate_class to mono_defaults.
36495 Handle runtime provided methods in mono_get_method ().
36497 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
36499 * loader.c (mono_get_method): use pinvoke for internal call
36501 * icall.c: use pinvoke for internal call
36503 * loader.c (method_from_memberref): set the method name
36505 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
36507 * metadata.c: help the compiler generate better code for
36508 mono_class_from_mono_type ().
36510 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
36512 * class.c (mono_class_metadata_init): delayed computing of the
36513 class size to mono_class_metadata_init ()
36515 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
36517 * class.c, class.h: add an interfaces member to MonoClass.
36518 * image.c, image.h: add assembly_name field to MonoImage
36519 from the assembly table.
36520 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
36522 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
36524 * class.c: Handle Array in mono_class_from_mono_type ().
36525 * metadata.c, pedump.c: some endian fixes.
36527 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
36529 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
36530 * metadata.c: fix small problem introduced with the latest commit.
36532 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
36534 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
36535 We don't need a MonoMetadata pointer anymore to compare signatures in
36536 mono_metadata_signature_equal (), update callers.
36537 Reduced memory usage an number of allocations for MonoMethodHeader and
36538 MonoMethodSignature.
36540 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
36542 * metadata.c: added compare for szarray.
36544 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
36546 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
36547 and add a couple more types to it and mono_defaults. Give an hint on
36548 classes that need implementing in our corlib and are referenced
36551 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
36553 * class.h, class.c: keep track if a class is also an Enum.
36554 * loader.c: Implement a couple more types for use in libffi
36555 marshalling. Gives better diagnostics when failing to dlopen
36556 a library. Set method->klass for P/Invoke methods, too.
36558 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
36560 * class.c, class.h: add a MonoType this_arg to MonoClass that
36561 represents a pointer to an object of the class' type that
36562 can be used by the interpreter and later the type cache.
36563 Add best guess alignment info for valuetype objects.
36565 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
36567 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
36568 into MonoType: one less level of indirection and allocation and
36569 simplifies quite a bit of code. Added cache for MonoTypes that are
36570 used frequently, so that we don't need to allocate them all the time.
36572 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
36574 * class.c (mono_class_create_from_typedef): System.Enum is also a
36575 value type, although it does not derive from System.ValueType
36576 (maybe a bug in the ms compiler?)
36578 * metadata.c (mono_type_size): return the right size for value types
36580 * loader.c (mono_get_method): only initialize method header if not abstract
36582 * class.c (mono_class_from_mono_type): use mono_default values.
36584 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
36586 * *: use MonoClass pointers instead of <type_tokens>
36588 * class.h: new flag: metadata_inited.
36590 * class.c (mono_class_metadata_init): impl.
36591 (mono_class_instance_size): impl.
36592 (mono_class_data_size): impl.
36594 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
36596 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
36597 MonoClass now has the name and name_space fields.
36598 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
36599 mono_get_method () takes and optional MonoClass as argument.
36600 Removed mono_typedef_from_name() and added mono_class_token_from_name()
36601 instead that takes advantage of a map from class names to typedef
36602 tokens in MonoImage.
36604 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
36606 * metadata.c: zero is not a valid alignment boundary.
36607 Merge MONO_TYPE_VOID in default decoding code.
36609 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
36611 * image.h: merged MonoMetadata into MonoImage
36613 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
36614 identify the type of elements.
36616 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
36618 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
36619 * cil-coff.h: split MonoMSDOSHeader and add size info.
36620 * image.c: add some consistency checks.
36621 * metadata.c: fix row size computation: one programmer
36622 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
36623 add explanation for the locator routine.
36624 Fix decoding of size in method header.
36626 2001-08-20 Miguel de Icaza <miguel@ximian.com>
36628 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
36629 (g_concat_dir_and_file): Bring g_concat_dir_and_file
36630 function from gnome-libs. This uses the right path separator
36631 based on the OS, and also works around a bug in some systems where
36632 a double slash is not allowed.
36633 (default_assembly_name_resolver): Use g_concat_dir_and_file
36634 (mono_assembly_open): ditto.
36636 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
36638 * metadata.c (mono_metadata_signature_equal): impl.
36640 * *: void is now a realy MonoType (instead of using NULL)
36642 * metadata.c (do_mono_metadata_parse_type): use
36643 mono_metadata_parse_type to parse void value.
36645 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
36647 * metadata.c, metadata.h: in the signature and method header store
36648 only the space required for holding the loca vars and incoming arguments.
36650 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
36652 * metadata.c (do_mono_metadata_parse_type): treat void like any
36653 other type (instead of assigning NULL);
36655 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
36657 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
36659 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
36661 * image.c (do_mono_image_open): added a cache for arrays.
36663 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
36665 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
36666 decode a single column from a row in a metadata table and changes
36667 to take advantage of it in the typedef locator (gives a nice speed up).
36668 Store offset info for function params.
36670 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
36672 * image.h (MONO_IMAGE_IS_CORLIB): removed
36674 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
36676 * assembly.c: how could mono_assembly_close () had ever worked?
36677 * metadata.c, metadata.h: provide offset info for local vars.
36678 Implement mono_type_size () to take care of alignment as well
36679 as size (it was mono_field_type_size in cli/class.c before).
36681 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
36683 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
36685 * assembly.h (CORLIB_NAME): set to corlib.dll
36687 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
36689 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
36691 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
36692 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
36693 tokentype.h: massive namespace cleanup.
36695 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
36697 * metadata.h, metadata.c: decode exception clauses when parsing method header.
36699 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
36701 * metadata.c (mono_metadata_free_type): added check for type !=
36702 NULL (void) before calling mono_metadata_free_type()
36704 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
36706 * metadata.h, row_indexes.h: added header with enumerations to use
36707 to index in the columns from tables in metadata and to decode coded
36708 tokens: we should start using this instead of embedding magic numbers
36711 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
36713 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
36714 Move metadata_t info from cli_image_info_t to MonoImage, where
36715 it's easily accessible. Changed all the uses accordingly.
36716 Added the method and class caches to MonoImage.
36717 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
36718 and mono_metadata_decode_value () signature to be more consistent
36719 with the other parse functions (and simplify code). Taken advantage
36720 of zero-length array allocation with GCC. Removed reduntant (and
36721 wrong) MonoFieldType struct and use MonoParam instead. Changed
36722 mono_metadata_parse_field_type () to use common code for parsing.
36723 Added mono_metadata_typedef_from_field () and
36724 mono_metadata_typedef_from_method () to lookup a typedef index from a
36725 field or method token.
36726 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
36728 2001-07-23 Miguel de Icaza <miguel@ximian.com>
36730 * metadata.c (mono_metadata_parse_field_type): Implement.
36731 (do_mono_metadata_parse_type): Split engine from
36732 mono_metadata_parse_type, so that we can create smaller structures
36733 for things that just have one pointer to the MonoType (look at
36736 2001-07-20 Miguel de Icaza <miguel@ximian.com>
36738 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
36739 as Jan Gray found out, it is incorrect.
36741 2001-07-18 Miguel de Icaza <miguel@ximian.com>
36743 * assembly.c: Implement asssembly loading. This loads an image
36744 and loads all the referenced assemblies. Come to think of it, we
36745 could always do lazy loading of the assemblies.
36747 * image.c (mono_image_open): Keep loaded images in a hashtable.
36749 * image.h (MonoImage): Add reference count.
36751 2001-07-17 Miguel de Icaza <miguel@ximian.com>
36753 * assembly.c (mono_assembly_open): Keep track of the file name in
36754 case the assembly has no ASSEMBLY table.
36756 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
36759 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
36761 * metadata.c, metadata.h: decode local vars in method header
36762 parse function. Change callers accordingly.
36764 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
36766 * metadata.h, cil-coff.h: protect against multiple inclusion.
36767 Added some new structures to hold information decoded from metadata:
36768 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
36769 and relevant decoding/free functions.
36770 * metadata.c: implement decoding functions. Add warning for out of bounds
36771 index in mono_metadata_locate(). Implement mono_get_method () to retreive
36772 all the info about a method signature and invocation. Remove check on
36773 uninitialized local var in parse_mh() and fix memory leak.
36775 2001-07-12 Miguel de Icaza <miguel@ximian.com>
36777 * metadata.h: More macros.
36779 * tokentype.h: New file.
36781 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
36783 * assembly.c: added a consistency check and initialize
36784 some structures with g_new0().
36785 * metadata.c: fixed a couple more bugs in table size computation
36786 and add other checks for out-of bound access to metadata.
36788 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
36790 * metatada.c: fix bugs computing table sizes. Spew a
36791 warning when index in string heap is out of bounds.
36793 2001-07-04 Miguel de Icaza <miguel@ximian.com>
36795 * metadata.h: Add a couple of macros to manipulate tokens.
36797 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
36799 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
36800 cli_section_tables).
36802 2001-07-01 Miguel de Icaza <miguel@ximian.com>
36804 * metadata.c (mono_metadata_user_string): New function, provides
36805 access to the UserString heap.
36807 2001-06-27 Miguel de Icaza <miguel@ximian.com>
36809 * metadata.c: Add inline documentation.
36811 2001-06-26 Miguel de Icaza <miguel@ximian.com>
36813 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
36816 2001-06-22 Miguel de Icaza <miguel@ximian.com>
36818 * typeattr.h: New file, TypeAttribute flags.
36820 2001-06-21 Miguel de Icaza <miguel@ximian.com>
36822 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
36823 mono_assembly_ensure_section): Section loading code.
36824 (load_section_tables): Load the sections.
36826 * mono/metadata/metadata.c (mono_metadata_locate_token,
36827 mono_metadata_locate): Functions to locate the information
36828 definition given a token or a table and an index.
36829 (mono_metadata_compute_table_bases): New.
36830 (compute_size): New function to compute the sizes of the various
36833 * mono/metadata/metadata.h: Finish listing the different index
36836 * mono/metadata/pedump.c: Improve to dump new information.
36838 2001-06-19 Miguel de Icaza <miguel@ximian.com>
36840 * mono/metadata/metadata.c: Entered all the tables matching
36843 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2