1 2010-04-05 Gonzalo Paniagua Javier <gonzalo@novell.com>
3 * threadpool.c: if there are no waiting threads, try to start a new
4 one. This fixes the not-so-random hangs in System.ServiceModel tests.
5 No need to use InterlockedCompareExchange to read volatile variables.
7 2010-04-05 Rodrigo Kumpera <rkumpera@novell.com>
9 * verify.c (verify_type_compatibility_full): Fail mixed valuetype
10 and reference types that point to the same class.
14 2010-04-05 Rodrigo Kumpera <rkumpera@novell.com>
16 * verify.c (verify_stack_type_compatibility_full): Ignore constraints
17 when verifying compatibility between a generic instance and a generic
20 * verify.c (check_is_valid_type_for_field_ops): Improve error message.
22 * verify.c (stack_slot_stack_type_full_name): Improve verification type
27 2010-04-04 Mark Probst <mark.probst@gmail.com>
29 * sgen-gc.c: Remove superfluous scanning of alloc-pinned objects.
31 2010-04-04 Zoltan Varga <vargaz@gmail.com>
33 * threads.c Applied some openbsd changes from Robert Nagy <robert@openbsd.org>.
35 2010-04-03 Marek Habersack <mhabersack@novell.com>
37 * process.c: when cross-compiling with MinGW, force GetProcessId
38 lookup using GetProcAddress.
40 2010-04-02 Mark Probst <mark.probst@gmail.com>
42 * sgen-gc.c: parse_environment_string_extract_number() must be
45 2010-04-02 Mark Probst <mark.probst@gmail.com>
47 * sgen-gc.c, sgen-gray.c: Macros for gray_object_enqueue() and
48 gray_object_dequeue(), to make sure they're inlined.
50 2010-04-02 Mark Probst <mark.probst@gmail.com>
52 * sgen-gc.c, sgen-gray.c: Fix a few debug levels, put a few
53 asserts in inner loops into DEBUG and lower MAX_DEBUG_LEVEL.
55 2010-04-02 Jb Evain <jbevain@novell.com>
57 * exception.c: remove dead code.
59 2010-04-02 Zoltan Varga <vargaz@gmail.com>
61 * *-gc.c: Fix the signature of mono_gc_get_used/heap_size () to be consistent
64 2010-04-01 Sanjoy Das <sanjoy@playingwithpointers.com>
66 * sgen-gc.c: Make the nursery size adjustable by the
67 MONO_GC_PARAMS environment variable.
69 Code is contributed under MIT/X11 license.
71 2010-04-01 Gonzalo Paniagua Javier <gonzalo@novell.com>
73 * threadpool.c: threadpool threads wait is alertable.
75 Reduced the stack size of the *poll_wait thread.
77 2010-04-01 Sebastien Pouliot <sebastien@ximian.com>
79 * exception.c|metadata-internals.h: Add new mono_get_exception_
80 field_access_msg and mono_get_exception_method_access_msg
81 functions that accept a const char* parameter to provide more
82 details when the exception is thrown.
83 * security-core-clr.c|h: Rework code to allow logging exceptions
84 (export MONO_LOG_MASK="security") and to supply more details in
85 [TypeLoad|MethodAccess|FieldAccess]Exception thrown. Also added
86 mono_security_core_clr_is_field_access_allowed and
87 mono_security_core_clr_is_call_allowed to return an exception,
88 with messages and logging, that can be emitted by method-to-ir.c
90 2010-04-01 Mark Probst <mark.probst@gmail.com>
92 * sgen-gc.c, sgen-pinning-stats.c: In the heap-dump, dump each
95 2010-04-01 Zoltan Varga <vargaz@gmail.com>
97 * appdomain.c (mono_domain_assembly_postload_search): Avoid a crash/assert if
98 the assembly name is not well formed utf8. Fixes #567882.
100 2010-04-01 Zoltan Varga <vargaz@gmail.com>
102 * reflection.c (mono_reflection_create_generic_class): Set the flags field of
103 the generic parameters from the builder. Fixes #473298.
105 2010-03-31 Miguel de Icaza <miguel@novell.com>
107 * object.c (mono_class_proxy_vtable): Eliminate warning.
109 * marshal.c (emit_marshal_boolean): Eliminate possible
110 uninitialized local warning.
112 2010-03-30 Sebastien Pouliot <sebastien@ximian.com>
114 * class.c (mono_class_init): Postpone coreclr inheritance check
115 until the end of the initialization (so we can check up the
116 default ctor manually for the core-clr inheritance rules).
117 * security-core-clr.c: Add the missing (undocumented) checks on
118 default constructors when verifying inheritance rules.
120 2010-03-30 Rodrigo Kumpera <rkumpera@novell.com>
122 * domain-internals.h (MonoJitExceptionInfo): Add new field
123 handler_end to the data union. To be used to point the end
126 2010-03-30 Rodrigo Kumpera <rkumpera@novell.com>
128 * reflection.c: Add support for new v4 type
129 System.Reflection.MonoModule that is the concrete version
130 of Module which is abstract unver v4.
132 2010-03-30 Rodrigo Kumpera <rkumpera@novell.com>
134 * class.c (mono_class_init): Don't set class failure after
135 inited = 1 is set. It must be done before.
137 2010-03-30 Andreas Färber <andreas.faerber@web.de>
139 * mono-config.c: Add support for OS "haiku"
140 * ChangeLog: Fix UTF-8 encoding
142 Code is contributed under MIT/X11 license.
144 Tue Mar 30 15:53:06 CEST 2010 Paolo Molaro <lupus@ximian.com>
146 * console-unix.c: fixed include logic for sys/ioctl.h.
148 2010-03-30 Mark Probst <mark.probst@gmail.com>
150 * threads.c: Fix bitmap generation for TLS marking on 64 bit
153 2010-03-30 Zoltan Varga <vargaz@gmail.com>
155 * icall.c (ves_icall_System_Enum_get_underlying_type): Don't crash on
156 unfinished/broken typebuilders.
158 2010-03-29 Mark Probst <mark.probst@gmail.com>
160 * sgen-gc.c: Use the same heuristic for the LOS target that we use
161 for the minor section allowance.
163 2010-03-29 Raja R Harinath <harinath@hurrynot.org>
165 * metadata-verify.c (INVALID_METHOD_IMPLFLAG_BITS): Allow bit 6
168 2010-03-29 Mark Probst <mark.probst@gmail.com>
170 * sgen-gc.c: Count bytes allocated with heavy statistics.
172 2010-03-29 Mark Probst <mark.probst@gmail.com>
174 * sgen-gc.c: More detailed time statistics.
176 Mon Mar 29 11:52:34 CEST 2010 Paolo Molaro <lupus@ximian.com>
178 * gc-internal.h, sgen-gc.c, threads.c, utils/mono-hash.c:
179 fix the user defined mark interface to pass a pointer
180 to the object location and not the object itself.
182 2010-03-27 Rodrigo Kumpera <rkumpera@novell.com>
184 * reflection.c (mono_method_body_get_object): Release
185 the method header before the call to CACHE_OBJECT since
186 this is a macro that returns.
188 2010-03-26 Rodrigo Kumpera <rkumpera@novell.com>
190 * class.c (inflate_generic_type): mono_metadata_type_dup
191 already dupes array information, the g_memdup was just
194 2010-03-26 Rodrigo Kumpera <rkumpera@novell.com>
196 * verify.c: Add stack_peek function. Fix CEE_DUP
197 to not read from invalid memory if push did expand
200 2010-03-26 Rodrigo Kumpera <rkumpera@novell.com>
202 * verify.c: Remove old table verification code that has
203 been superseeded by the new metadata verifier.
205 * verify.h: Remove mono_image_verify_tables from the public
208 * pedump.c: Fix for removed bits.
210 2010-03-26 Rodrigo Kumpera <rkumpera@novell.com>
212 * verify.c: Allocate stack slows lazily to reduce stack usage
213 in case of methods with huge stacks. Reduces memory consumption
214 for mcs yyparse from 459Mb to 1.8Mb.
216 2010-03-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
218 * threadpool.c: don't try executing items from domains being
219 unloaded. Fixes appdomain-async-invoke test.
221 2010-03-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
223 * threadpool.c: spin while the threadpool initializes.
224 * mono-wsq.c: if the WSQ has not been initialized or has been shut
225 down, don't do anything.
227 2010-03-26 Zoltan Varga <vargaz@gmail.com>
229 * threads.c (mono_thread_create_internal): Set the GC type of the
230 threads_starting_up hash table.
232 2010-03-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
234 * threadpool.c: reset 'state' to avoid returning non-null when the
235 event type is not found.
237 Fri Mar 26 19:03:09 CET 2010 Paolo Molaro <lupus@ximian.com>
239 * sgen-gc.c: make copy_object () take the address of the
240 slot holding the reference. This allows saving memory stores
241 when not needed and it allows keeping track of oldspace->nursery
242 references for the card table code.
244 2010-03-26 Andreas Färber <andreas.faerber@web.de>
246 * null-gc.c (mono_gc_invoke_with_gc_lock): Fix function name.
248 Code is contributed under MIT/X11 license.
250 Fri Mar 26 11:33:17 CET 2010 Paolo Molaro <lupus@ximian.com>
252 * object.c, threads.c, threads-types.h, threads.h: make the
253 managed thread local storage references precisely tracked.
255 2010-03-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
257 * threadpool.[ch]: reworked the threadpool:
258 -Threadpool threads use a work-stealing queue. Adding a work
259 item from a threadpool thread will queue it in the thread
260 local queue without locking (in most cases).
261 -epoll events are coalesced before being added to the IO
263 -Dynamically change the number of active threads
264 -Changed the global queue to be more GC friendly
266 * class-internals.h: add 2 new performance counters for the number of
267 threads in the threadpool and the IO threadpool.
269 * object-internals.h: new field in MonoAsyncResult.
270 * icall-def.h: new internal call for queueing work items.
272 * Makefile.am: add 2 new files.
274 * appdomain.c: bump up corlib version.
276 * mono-wsq.[ch]: an implementation of a work-stealing queue.
278 * mono-perfcounters-def.h:
279 * mono-perfcounters.c: added 2 new performance counters.
281 2010-03-26 Mark Probst <mark.probst@gmail.com>
283 * sgen-gc.c: More FIXME/TODO updates.
285 2010-03-25 Mark Probst <mark.probst@gmail.com>
287 * gc-internal.h, sgen-gc.c, sgen-gc.h, boehm-gc.c, null-gc.c: New
288 function mono_gc_invoke_with_gc_lock() which invokes a function
289 with the guarantee that no collection will occur during its execution.
291 2010-03-25 Mark Probst <mark.probst@gmail.com>
293 * sgen-gc.c: Update a few comments.
295 2010-03-24 Rodrigo Kumpera <rkumpera@novell.com>
297 * reflection.c: Add support for new v4 type
298 System.Reflection.MonoAssembly that is the concrete version
299 of Assembly which is abstract unver v4.
301 2010-03-24 U-anarquia\miguel <miguel@anarquia>
303 * reflection.c (mono_reflection_get_custom_attrs_info): Protect
304 code that uses System.Reflection.Emit in DISABLE_REFLECTION_EMIT.
306 Expose a few macros that are needed for SR but not SRE to the
307 world (previous inside the SRE ifdef)
309 2010-03-24 Mark Probst <mark.probst@gmail.com>
311 * sgen-gc.c (gc_register_current_thread): We need
312 stack_start_limit as well in the non-attribute pthread case.
314 2010-03-23 Rodrigo Kumpera <rkumpera@novell.com>
316 * threads.c: Fix windows build.
318 2010-03-22 Rodrigo Kumpera <rkumpera@novell.com>
320 * thread-types.h: Add mono_thread_resume_interruption.
322 * threads.c: Add mono_thread_resume_interruption, this
323 function should be called after the last protected handler
324 found at interruption time has finished.
326 2010-03-22 Rodrigo Kumpera <rkumpera@novell.com>
328 * threads.c (ves_icall_System_Threading_Thread_ResetAbort):
329 Check MonoInternalThread's ::state instead of ::abort_exc
330 since the later can be lazily created.
332 This is specially problematic when running a finally block
333 under AbortRequested state. ResetAbort must work, but the
334 abort_exc object has not been created because interruption
337 2010-03-22 Geoff Norton <gnorton@novell.com>
339 * locales.c: Its possible for CFStringGetCStringPtr
340 to return null and not convert encodings. Use
341 CFStringGetCString instead.
343 Mon Mar 22 18:06:38 CET 2010 Paolo Molaro <lupus@ximian.com>
345 * class-internals.h, class.c, object.c: introduce compressed
346 interface bitmaps (for now only under small config): this saves
347 about 600 KB of runtime memory on gmcs bootstraps or monodevelop
350 Mon Mar 22 16:03:34 CET 2010 Paolo Molaro <lupus@ximian.com>
352 * mono-debug.c: don't try to get the method header, it causes a
353 deadlock and it is not used for anything anymore.
355 2010-03-22 Zoltan Varga <vargaz@gmail.com>
357 * loader.c (mono_method_get_marshal_info): Fix the handling of dynamic methods
358 broken by the last change.
360 2010-03-21 Andreas Färber <andreas.faerber@web.de>
362 * socket-io.c: Don't depend on AF_SNA, AF_DECnet,
365 Code is contributed under MIT/X11 license.
367 2010-03-20 Sanjoy Das <sanjoy@playingwithpointers.com>
369 * sgen-gc.c (mono_gc_get_write_barrier): Handle non-aligned
372 Code is contributed under MIT/X11 license.
374 2010-03-19 Martin Baulig <martin@ximian.com>
376 * mono-debug.c (MonoDebugWrapperData): Replace `cil_code' with a
377 dummy field, containing an empty string.
378 (mono_debug_add_method): Don't call mono_disasm_code() for wrappers.
381 Fri Mar 19 17:26:43 CET 2010 Paolo Molaro <lupus@ximian.com>
383 * class.c: setup_interface_offsets() refactor to not call
384 mono_class_get_implemented_interfaces () more times than needed and
385 to reduce the runtime memory requirements to be O(num_interfaces)
386 instead of O(max_interface_id).
388 2010-03-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
390 * mono-mlist.[ch]: add mono_mlist_set_next ().
392 2010-03-16 Rodrigo Kumpera <rkumpera@novell.com>
394 * domain-internals.h: Add MonoTryBlockHoleJitInfo struct and
395 associated changes to support holes in the protected range of a
398 * domain.c: Add mono_jit_info_get_try_block_hole_table_info, which
399 retrieves the holes table from a given MonoJitInfo.
401 Tue Mar 16 13:11:15 CET 2010 Paolo Molaro <lupus@ximian.com>
403 * object.h, object-internals.h, object.c, icall.c, gc-internal.h,
404 debug-helpers.c, cominterop.c, process.c, sgen-gc.c, socket-io.c:
405 hide the contents of the MonoString and MonoArray structs from the
406 public API. Change the accessor macros to accessors functions where
407 needed. Adjusted the array API to allow for pointer-sized lengths and
408 starting positions, so 64 bit arrays can be optionally provided in an
409 API compatible way if needed on 64 bit systems.
411 Tue Mar 16 10:18:07 CET 2010 Paolo Molaro <lupus@ximian.com>
413 * class-internals.h, class.c, loader.c, marshal.c, metadata.c,
414 reflection.c: the MonoMethodNormal struct is now unused, so remove it.
416 Mon Mar 15 18:28:00 CET 2010 Paolo Molaro <lupus@ximian.com>
418 * class-internals.h: remove the method header from MonoMethod since
419 from now on it will be transient. We have a header pointer for method
420 wrappers, since in that case we need to keep track of it. For this
421 reason, all the Reflection.Emit generated methods use MonoMethodWrapper
422 structs now. The same happens with MonoMethodInflated.
423 * class.c: reset the sre_method flag for inflated method structures:
424 this makes the code that cares look at the header in the MonoMethodInflated
426 * loader.c: lookup the method header in the appropriate field now that
427 it is removed from MonoMethod.
428 * metadata-internals.h: add a flag to the method header to know if it
429 can be freed inside mono_metadata_free_mh ().
430 * method-builder.c: updates after moving the header field from
431 MonoMethod to MonoMethodWrapper.
432 * reflection.c: MonoMethods generated from Reflection.Emit use
433 MonoMethodWrapper structs if they need a method header now (later take
434 advantage of this and remove all the current unsafe uses of method_aux_hash).
435 * metadata.c: make method header parsing not leak when verification
436 fails. Alloc it with g_malloc() and free it in mono_metadata_free_mh().
437 These changes save a few hundred KB of runtime memory in a mcs
438 bootstrap or a monodevelop startup.
440 2010-03-12 Rodrigo Kumpera <rkumpera@novell.com>
442 * verify.c: Improve error message.
444 2010-03-12 Jb Evain <jbevain@novell.com>
446 * reflection.c (add_exported_type): populate the exported
447 table with the type's nested type.
449 2010-03-10 Mark Probst <mark.probst@gmail.com>
451 * sgen-gc.c (STRING_SIZE): Semi-revert r153342. I'm an idiot who
452 can't read parentheses.
454 2010-03-10 Mark Probst <mark.probst@gmail.com>
456 * threads.c (thread_cleanup): Add a guard to dereferencing
457 "thread" to avoid an unlikely race condition.
459 2010-03-09 Sebastien Pouliot <sebastien@ximian.com>
461 * assembly.c: Fix crash in moon-unit when aname->culture is NULL
462 instead of an empty string.
464 2010-03-09 Zoltan Varga <vargaz@gmail.com>
466 * object-internals.h (_G_BOOLEAN_EXPR): Fix the definition of this to explicitly
467 convert to a boolean, recent gcc versions compile this differently.
469 2010-03-09 Zoltan Varga <vargaz@gmail.com>
471 * sgen-gc.c (safe_object_get_size): Avoid a function call so this can really be
474 2010-03-09 Mark Probst <mark.probst@gmail.com>
476 * sgen-gc.c (STRING_SIZE): Off by one.
478 2010-03-09 Mark Probst <mark.probst@gmail.com>
480 * sgen-archdep.h: Fix the signal context register access for
483 2010-03-09 Zoltan Varga <vargaz@gmail.com>
485 * sgen-gray.c: Get rid of the unused 'start' field in GrayQueueSection.
487 2010-03-08 Rodrigo Kumpera <rkumpera@novell.com>
489 * verify.c: Store the initial basic block returned by mono_basic_block_split
490 so we can release the whole list and not just the first one.
492 Mon Mar 8 17:30:44 CET 2010 Paolo Molaro <lupus@ximian.com>
494 * verify.c, debug-helpers.c, profiler.c, loader.c,
495 mono-basic-block.c, mono-debug.c, reflection.c: prepare to make
496 MonoMethodHeader a transient entity.
498 2010-03-08 Zoltan Varga <vargaz@gmail.com>
500 * sgen-gc.c (scan_needed_big_objects): Call drain_gray_stack () to avoid
501 uncontrolled growth of the gray stack.
503 * sgen-gray.c: Rewrite this so it behaves like a stack, not a queue, so recently
504 added items are removed first, improving cache locality. Avoid freeing queue
505 segments in the fast path, use the list of segments as the free list, truncate
506 it to its max size at the start of collection.
508 Mon Mar 8 10:13:52 CET 2010 Paolo Molaro <lupus@ximian.com>
510 * metadata-internals.h: more memory savings, both with small config and without.
513 Sat Mar 6 19:12:12 CET 2010 Paolo Molaro <lupus@ximian.com>
515 * appdomain.c, domain-internals.h, domain.c, object.c:
516 make class_vtable_hash into an array to reduce memory usage.
518 Sat Mar 6 18:16:35 CET 2010 Paolo Molaro <lupus@ximian.com>
520 * mempool.c, class-internals.h, class.c, icall.c, metadata.c,
521 object-internals.h, object.c, reflection.c, threadpool.c:
522 reduce resource usage when the small config is selected.
523 In particular, up to 64K of methods/fields/properties/events
524 are allowed and "other" methods in events are ignored.
526 Fri Mar 5 19:05:47 CET 2010 Paolo Molaro <lupus@ximian.com>
528 * threads.c: reduce resource usage when compiled for a small config.
530 2010-03-05 Mark Probst <mark.probst@gmail.com>
532 * sgen-gc.c: Also collect number of degraded-alloced objects with
535 2010-03-04 Geoff Norton <gnorton@novell.com>
537 * assembly.c: Only support OSX bundling if the bundle is
540 2010-03-04 Geoff Norton <gnorton@novell.com>
542 * loader.c: The marshal specs are freed at the end of the call
543 but it explicitly frees the strings as well as the container,
544 so we need to dup them too to avoid referencing free'd memory.
546 2010-03-04 Geoff Norton <gnorton@novell.com>
549 * icall.c: Add a new private internal icall to construct
550 an object from its type without running the ctor.
552 Thu Mar 4 15:37:09 CET 2010 Paolo Molaro <lupus@ximian.com>
554 * profiler.c: allow multiple profiler engines to be loaded
557 Wed Mar 3 20:19:45 CET 2010 Paolo Molaro <lupus@ximian.com>
559 * profiler-private.h, profiler.c, profiler.h, sgen-gc.c: introduce
560 profiler event to track object moves.
562 Wed Mar 3 19:20:39 CET 2010 Paolo Molaro <lupus@ximian.com>
564 * object.c, profiler.c, profiler.h, string-icalls.c:
565 remove the reduntant MONO_PROFILE_STRING_ALLOC profiler event.
567 2010-03-03 Miguel de Icaza <miguel@novell.com>
569 * decimal.c (mono_double2decimal): Add support for reducing the
570 scale of a decimal. It turns the 0.6000000000000 into 0.6 as
573 2010-03-03 Rodrigo Kumpera <rkumpera@novell.com>
576 * icall.c: Implement System.MonoType::get_core_clr_security_level icall.
578 2010-03-03 Marek Habersack <mhabersack@novell.com>
580 * mono-config.c (mono_config_parse_assembly_bindings): added -
581 parses assembly binding redirections from appdomain's config
584 * metadata-internals.h: added definition of a new function -
585 mono_config_parse_assembly_bindings - to support parsing assembly
586 binding redirections defined in appdomain's config file.
588 * domain-internals.h: added two new fields to _MonoDomain - a list
589 of assembly bindings and a flag to parse the config file only
592 * assembly.c (assembly_binding_maps_name): empty culture name and
593 NULL culture name are considered equal.
594 (mono_assembly_apply_binding): added support for domain specific
595 assembly binding redirections, read from the appdomain's
596 configuration file. Fixes bug #580185
598 Wed Mar 3 11:46:06 CET 2010 Paolo Molaro <lupus@ximian.com>
600 * appdomain.c, domain.c, icall.c, image.c, marshal.c, object.c,
601 reflection.c, socket-io.c, threadpool.c, threads.c: removed 1.1/1.0
604 2010-03-02 Rodrigo Kumpera <rkumpera@novell.com>
606 * reflection.c (mono_image_get_memberref_token): Extract mono_image_add_memberef_row
607 from this function. The new function receive the parent token instead of a type.
609 * reflection.c (mono_image_get_methodref_token_for_methodbuilder):
610 * reflection.c (mono_image_get_ctorbuilder_token): Use new function to encode
611 typebuilders. This make it possible to properly encode generic type builders since
612 their unmanaged type don't have generics data while unfinished.
616 2010-03-02 Mark Probst <mark.probst@gmail.com>
618 * sgen-gc.c, sgen-protocol.c, sgen-protocol.h: New facility for
619 writing binary log files (can be enabled by #define'ing
620 BINARY_PROTOCOL) for better debugging of timing-dependent bugs or
621 bugs in longer running programs.
623 Mon Mar 1 19:35:32 CET 2010 Paolo Molaro <lupus@ximian.com>
625 * metadata.c: added some API documentation.
627 2010-03-01 Robert Jordan <robertj@gmx.net>
629 * filewatcher.h: Include glib.h to fix the MSVC build.
631 2010-03-01 Zoltan Varga <vargaz@gmail.com>
633 * class-internals.h (MonoClass): Get rid of the reflection_info field, add
634 a GC handle instead. This is a bit slower to access, but avoids burdening the
635 GC with 100s of individual roots.
637 * reflection.c (mono_class_get_ref_info):
638 (mono_class_set_ref_info):
639 (mono_class_free_ref_info): New internal helper fuctions.
641 * reflection.c appdomain.c icall.c class.c: Use the new helper functions instead
642 of accessing klass->reflection_info directly.
644 * sgen-gc.c (alloc_complex_descriptor): Fix the computation of the number of
647 * gc.c (alloc_handle): Create a GC descriptor for the 'entries' array, free
650 2010-02-28 Zoltan Varga <vargaz@gmail.com>
652 * marshal.c (get_runtime_invoke_type): Avoid sharing byref with I, as the latter
653 needs an indirection.
655 2010-02-26 Zoltan Varga <vargaz@gmail.com>
657 * generic-sharing.c: Removed, moved its contents to mini/mini-generic-sharing.c,
658 so all generic sharing code is in one place.
660 * class.c (get_implicit_generic_array_interfaces): Fix the last change so
661 we don't call setup_interface_offsets () for unfinished types.
663 2010-02-26 Zoltan Varga <vargaz@gmail.com>
665 * class.c (mono_class_generic_sharing_enabled): Move this to
668 * image.c: Add an unload hook which is called before an image is unloaded.
670 * generic-sharing.c: Use the unload hook to unregister per-image data, to avoid
671 metadata.c having to depend on generic sharing.
673 Fri Feb 26 19:23:18 CET 2010 Paolo Molaro <lupus@ximian.com>
675 * class.c: reduce size of ridiculously large cache.
677 2010-02-26 Martin Baulig <martin@ximian.com>
680 (MONO_DEBUGGER_MINOR_VERSION): Bump to 5.
682 * threads.c (mono_thread_internal_reset_abort): New method; resets
683 the abort, but doesn't throw any exception if no abort was requested.
685 2010-02-26 Zoltan Varga <vargaz@gmail.com>
687 * class.c (get_implicit_generic_array_interfaces): Call
688 mono_class_setup_interface_offsets () before accessing
689 eclass->interface_offsets_count. This only shows up on platforms without IMT for
692 Thu Feb 25 12:12:44 CET 2010 Paolo Molaro <lupus@ximian.com>
694 * environment.c, environment.h, icall.c: make the GetOSVersionString()
697 Thu Feb 25 11:37:50 CET 2010 Paolo Molaro <lupus@ximian.com>
699 * metadata.c, metadata.h: make MONO_TYPE_IS* functional without
700 direct access to the MonoType fields.
702 2010-02-25 Zoltan Varga <vargaz@gmail.com>
704 * threads.h: Move some internal functions which were added to this header by
705 mistake to threads-types.h.
707 * class.c (mono_class_init): Get rid of mono_setup_vtable_in_class_init.
709 Wed Feb 24 17:45:27 CET 2010 Paolo Molaro <lupus@ximian.com>
711 * class-internals.h, class.h, object.h: make MonoRemoteClass
712 and mono_remote_class() internal.
714 Wed Feb 24 17:05:18 CET 2010 Paolo Molaro <lupus@ximian.com>
716 * metadata-internals.h, class-internals.h, metadata.h: make the
717 MonoType guts internal as well.
719 Wed Feb 24 16:02:42 CET 2010 Paolo Molaro <lupus@ximian.com>
721 * reflection.h: the MonoTypeNameParse guts are internal now.
722 * assembly.c, assembly.h, image.h: the MonoAssemblyName guts
723 are internal now, provide accessors as needed.
724 * metadata.h, metadata-internals.h: the MonoMethodSignature
725 guts are internal now.
726 * Makefile.am: mempool.h is an internal header now.
727 * *.h, *.c: remove glib.h usage from the public headers.
729 2010-02-24 Atsushi Enomoto <atsushi@ximian.com>
731 * culture-info-table.h : regenerated.
733 2010-02-22 Rodrigo Kumpera <rkumpera@novell.com>
735 * metadata.c: Add mono_method_get_header_summary which returns minimal
736 information about the header of a method. This is the information used
737 by the inline oracle to reject methods.
739 This method doesn't decode local variables and doesn't cache it's result,
740 so it should cause a minimal reduction in memory usage.
742 * metadata-internals.h: Add MonoMethodHeaderSummary structure and
743 mono_method_get_header_summary.
745 2010-02-22 Jeffrey Stedfast <fejj@novell.com>
747 * threads.c (mono_thread_exit): Make sure that the main thread is
748 non-null before dereferencing it.
750 2010-02-21 Geoff Norton <gnorton@novell.com>
752 * Makefile.am: Add CoreFoundation linkage on darwin to properly get the current
754 * locaes.c: When running on darwin, try to get the local from CoreFoundation
755 before falling back to the posix lookup.
757 2010-02-19 Zoltan Varga <vargaz@gmail.com>
759 * threads.c (mono_thread_suspend_all_other_threads): Ignore threads which have
760 the DONT_MANAGE flag set.
762 2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
764 * domain.c: Remove old v1 version strings. Let the runtime
765 default to 2.0 instead of failing because it can't find a
766 working 1.0 instalation.
768 2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
770 * domain.c: Add v4 RC version string.
772 2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
774 * mono-basic-block.c (mono_opcode_value_and_size): Use pointer variant
775 of overflow checking function.
777 2010-02-18 Rodrigo Kumpera <rkumpera@novell.com>
779 * reflection.c (mono_reflection_method_on_tb_inst_get_handle): Handle non
782 * reflection.c (mono_reflection_get_custom_attrs_info): Handle compiler context
783 cases for ParameterInfo.
787 2010-02-18 Zoltan Varga <vargaz@gmail.com>
789 * class.c (mono_class_get_cctor): Fix support for dynamic classes, which doesn't
790 have has_cctor set. Fixes #575946.
792 2010-02-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
794 * appdomain.c: display a warning if the parsing the config file
796 Skip the BOM in UTF-8 files.
797 Copy the AppDomainSetup before setting the privateBinPath so that the
798 correct configuration file is read.
800 2010-02-15 Zoltan Varga <vargaz@gmail.com>
802 * object.c: Instead of using one vtable trampoline, allow the JIT to use one
803 vtable trampoline per vtable slot index. Not used yet.
805 2010-02-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
808 * icall.c: add internal call that returns the system page size.
810 2010-02-13 Zoltan Varga <vargaz@gmail.com>
812 * debug-helpers.c (mono_method_desc_search_in_image): Handle short names like
813 'int' for system classes.
815 Fri Feb 12 18:36:02 CET 2010 Paolo Molaro <lupus@ximian.com>
817 * icall.c, icall-def.h: new icall to check for sufficient
820 2010-02-12 Mark Probst <mark.probst@gmail.com>
822 * reflection.c (ensure_complete_type): Check that reflection_info
823 is set, too. Fixes crash of corlib testsuite with -O=-all.
825 2010-02-11 Rodrigo Kumpera <rkumpera@novell.com>
828 * tabledefs.h: Add NoOptimization flag.
830 2010-02-10 Mark Probst <mark.probst@gmail.com>
832 * sgen-gc.c: Don't consider it a missing remset if the target
833 object is pinned - we might have done the store but not added the
836 2010-02-10 Mark Probst <mark.probst@gmail.com>
838 * sgen-gc.c: When checking for missing remsets, don't assert on
839 the first one, but print them all and then assert.
841 2010-02-10 Mark Probst <mark.probst@gmail.com>
843 * sgen-gc.c (find_in_remset_loc): Handle the small bitmap case.
845 2010-02-09 Miguel de Icaza <miguel@novell.com>
847 * console-unix.c: On OSX Control-Y is assigned to
848 VDSUSP (non-Posix), the
849 suspend-program-next-time-it-tries-to-read-input command (this is
850 different than C-z, which suspends immediately).
852 Do the same thing that bash does and ignore this setting,
853 making our repl/getline support pasting.
855 2010-02-10 Mark Probst <mark.probst@gmail.com>
857 * sgen-gc.c: Simple plausibility check for scan_starts.
859 2010-02-10 Mark Probst <mark.probst@gmail.com>
861 * sgen-gc.c: Round up when calculating the number of scan starts.
863 2010-02-10 Rodrigo Kumpera <rkumpera@novell.com>
865 * reflection.c: Export mono_get_object_from_blob.
867 * object-internals.h: Ditto.
869 * icall.c: New icall property_info_get_default_value to get the default
870 value of a property. Since using this is not common, no caching is done.
872 * icall-def.h: Add new icall.
874 2010-02-10 Rodrigo Kumpera <rkumpera@novell.com>
876 * class.c: Add mono_class_get_property_default_value.
878 * class-internal.h: Export mono_class_get_property_default_value.
880 2010-02-10 Rodrigo Kumpera <rkumpera@novell.com>
882 * reflection.c (mono_image_get_property_info): Encode the default value of a property.
884 Wed Feb 10 14:48:45 CET 2010 Paolo Molaro <lupus@ximian.com>
886 * sgen-gc.c: introduced critical regions to allow some lockless
887 operations and increase scalability.
889 2010-02-10 Geoff Norton <gnorton@novell.com>
891 * reflection.c: Support building with DISABLE_REFLECTION
893 2010-02-09 Gonzalo Paniagua Javier <gonzalo@novell.com>
895 * threadpool.c: Fixes for SetMinThreads and SetMaxThreads.
898 * exception.c: fix typo in comment.
900 2010-02-09 Rodrigo Kumpera <rkumpera@novell.com>
902 * icall.c (param_info_get_type_modifiers): Handle the case when the member object is a
903 property. This happens which instances returned by PropertyInfo::GetIndexParameters ().
905 * reflection.c (mono_reflection_get_custom_attrs_info): Ditto.
907 * object-internals.h: Export mono_class_is_reflection_method_or_constructor as part of
912 2010-02-09 Mark Probst <mark.probst@gmail.com>
914 * threads.c: Removed two assertions that were too strict. Added a
915 clarifying comment. Fixes #577090.
917 2010-02-08 Zoltan Varga <vargaz@gmail.com>
919 * domain.c (mono_jit_info_table_find): Avoid looking in the root domain, since
920 the caller has no way of knowing the domain which owns the returned MonoJitInfo.
922 * appdomain.c (create_exceptions): Call mono_thread_push/popappdomain_ref ().
924 * verify.c (mono_type_get_stack_name): Fix a warning.
926 2010-02-07 Zoltan Varga <vargaz@gmail.com>
928 * marshal.c (mono_marshal_get_wrapper_info): Rename from
929 mono_marshal_wrapper_info_from_wrapper.
931 * marshal.c (mono_marshal_set_wrapper_info): Rename from
932 mono_marshal_method_set_wrapper_data, and export.
934 * boehm-gc.c sgen-gc.c null-gc.c: Get rid of mono_gc_get_allocator_type, store
935 the allocator type in a AllocatorWrapperInfo structure instead, which is accesible
936 by calling mono_marshal_get_wrapper_info ().
938 * sgen-gc.c (mono_gc_get_managed_allocator): Add a specialized allocator for
939 small objects which does no size checks.
941 2010-02-05 Rodrigo Kumpera <rkumpera@novell.com>
943 * icall-def.h: Rename get_MetadataToken to GetMetadataToken.
945 2010-02-04 Rodrigo Kumpera <rkumpera@novell.com>
947 * verify.c (mono_method_verify): Use the new basic block formation pass
948 to avoid verifying dead basic blocks. This is the same behavior as the
951 2010-02-04 Rodrigo Kumpera <rkumpera@novell.com>
953 * mono-basic-block.c:
954 * mono-basic-block.h: New implementation of a basic block formation pass.
955 The formation pass does static liveness analysis as well to detect dead
958 2010-02-04 Zoltan Varga <vargaz@gmail.com>
960 * marshal.c (mono_marshal_get_native_wrapper): Emit a null check for the
961 'this' argument in icalls.
963 2010-02-02 Zoltan Varga <vargaz@gmail.com>
965 * reflection.c (resolve_object): Handle MonoArrayMethod. Fixes #575955.
967 2010-02-01 Mark Probst <mark.probst@gmail.com>
969 * object.c, domain.c: When using SGen, we must register
970 vtable->type as a root if it's not a MonoType, because then it
973 2010-02-01 Mark Probst <mark.probst@gmail.com>
975 * sgen-gc.c: Reset to_space_bumper to to_space_section->next_data
976 at the start of nursery collections, because we might have had
977 degraded allocations which changed next_data.
979 2010-01-30 Zoltan Varga <vargaz@gmail.com>
981 * marshal.c (mono_marshal_get_managed_wrapper): Avoid constructing the
982 custom attr so this function works in cross-compiling mode.
984 2010-01-29 Zoltan Varga <vargaz@gmail.com>
986 * class.c (make_generic_param_class): Initialize interface offsets since we
987 set klass->inited. Fixes #574819.
989 2010-01-28 Zoltan Varga <vargaz@gmail.com>
991 * domain.c (mono_domain_free): Send the END_UNLOAD profiler event before
992 calling the JIT domain cleanup hook.
994 2010-01-28 Rodrigo Kumpera <rkumpera@novell.com>
996 * pedump.c (main): Properly set the verifier mode when running the metadata
999 2010-01-28 Rodrigo Kumpera <rkumpera@novell.com>
1001 * verify.c (verify_class_for_overlapping_reference_fields): Properly verify
1002 overlapping fields now that we're called before has_references is set.
1004 * pedump.c (dump_verify_info): Clear any loader error before verifying another
1005 method. Otherwise all sort of weird stuff happens.
1007 2010-01-27 Zoltan Varga <vargaz@gmail.com>
1009 * object.c (mono_field_get_value_object): Handle nullable types correctly.
1012 2010-01-25 Zoltan Varga <vargaz@gmail.com>
1014 * icall.c (ves_icall_System_Array_SetValueImpl): Handle nullable types correctly.
1017 2010-01-23 Mark Probst <mark.probst@gmail.com>
1019 * sgen-pinning.c (evacuate_pin_staging_area): Don't assume
1020 pin_staging_area_index is greater than 0.
1022 2010-01-22 Miguel de Icaza (miguel@novell.com)
1024 * loader.c: Since we do nothing with the error returned, pass NULL
1025 to ignore the error.
1027 2010-01-21 Rodrigo Kumpera <rkumpera@novell.com>
1029 * reflection.c (typebuilder_setup_fields): Pretend field setup already
1030 happened before starting to encode the actual fields. This avoid ciclic
1031 dependencies and eventual crashes.
1035 2010-01-21 Mark Probst <mark.probst@gmail.com>
1037 * sgen-gc.c, gc-internal.h, object.c: Make string allocation
1038 atomic and remove the half-constructed hack in SGen.
1040 2010-01-21 Rodrigo Kumpera <rkumpera@novell.com>
1042 * metadata-verify.c (parse_generic_inst): Fail a type signature if it
1043 has a recursive reference to itself.
1047 2010-01-21 Rodrigo Kumpera <rkumpera@novell.com>
1049 * loader.c (mono_method_signature): Fix error message.
1051 2010-01-21 Mark Probst <mark.probst@gmail.com>
1053 * sgen-gc.c: Reuse to-space sections between nursery collections.
1055 2010-01-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
1057 * icall.c: don't raise AppDomain.TypeResolve when the type is loaded
1058 from the current assembly or mscorlib. Fixes bug #322957.
1060 2010-01-20 Zoltan Varga <vargaz@gmail.com>
1062 * marshal.c: Calculate the target class of the delegete invoke wrappers using
1063 get_wrapper_target_class.
1065 2010-01-19 Mark Probst <mark.probst@gmail.com>
1067 * sgen-gc.c: Fix warnings.
1069 2010-01-19 Rodrigo Kumpera <rkumpera@novell.com>
1071 * verify.c (store_local): Better error message.
1073 2010-01-19 Rodrigo Kumpera <rkumpera@novell.com>
1075 * object.c (mono_object_get_virtual_method): Handle generic interfaces with variant
1078 2010-01-19 Rodrigo Kumpera <rkumpera@novell.com>
1080 * icall.c (ves_icall_Remoting_RemotingServices_GetVirtualMethod): This
1081 function is generics variance aware.
1083 2010-01-19 Sebastien Pouliot <sebastien@ximian.com>
1085 * security-core-clr.c (mono_security_core_clr_can_access_internals):
1086 Handle the case where 'basedir' can be NULL (e.g. SRE assemblies)
1088 2010-01-19 Sylvain Dupont <duposyl@gmail.com>
1090 * cominterop.c marshal.c: Added support for marshalling in, in/byref,
1091 in/out, in/out/byref parameters of type SAFEARRAY[VARIANT].
1093 Code is contributed under MIT/X11 license.
1095 2010-01-19 Rodrigo Kumpera <rkumpera@novell.com>
1097 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Handle inflated generic methods
1100 2010-01-19 Zoltan Varga <vargaz@gmail.com>
1102 * marshal.c (mono_marshal_wrapper_info_from_wrapper): New helper function to
1103 return a point to a wrapper specific info structure describing the wrapper.
1104 (mono_marshal_get_array_address): Store the rank+elem_size in the wrapper info.
1106 2010-01-18 Mark Probst <mark.probst@gmail.com>
1108 * sgen-gc.c: Make minor collection section allowance adaptive,
1109 depending on the amount of memory reclaimed in the last major
1110 collection. If more memory was reclaimed (i.e. more garbage
1111 produced), do the next collection earlier.
1113 2010-01-18 Rodrigo Kumpera <rkumpera@novell.com>
1115 * metadata-verify.c (parse_type): Fail a type signature if it has a recursive reference
1118 * metadata-verify.c (mono_verifier_verify_typespec_signature): Change signature to take
1119 the token as parameter.
1121 * verify-internals.h: Ditto.
1123 * metadata.c (mono_type_create_from_typespec): Pass token to verifier.
1127 2010-01-18 Mark Probst <mark.probst@gmail.com>
1129 * sgen-gc.c: Make store_remset_buffer_index long.
1131 2010-01-18 Rodrigo Kumpera <rkumpera@novell.com>
1133 * class.c (mono_class_from_typeref): Fail loading of self-referencing typeref tokens.
1137 2010-01-18 Zoltan Varga <vargaz@gmail.com>
1139 * sgen-gc.c (mono_gc_base_init): Add 'conservative_stack_mark' option to turn
1140 off precise marking if it is available.
1141 (mono_gc_get_bitmap_for_descr): Fix the handling of run length descriptors.
1143 2010-01-17 Zoltan Varga <vargaz@gmail.com>
1145 * sgen-gc.c (mono_gc_conservatively_scan_area): Resurrect this.
1147 * sgen-pinning.c (evacuate_pin_staging_area): Don't assert if there are no
1150 * sgen-gc.c (create_allocator): Add the missing n > MONO_ARRAY_MAX_INDEX check
1151 to the array allocator.
1153 2010-01-16 Zoltan Varga <vargaz@gmail.com>
1155 * generic-sharing.c (instantiate_other_info): Don't create ftnptr's from the
1156 result of mono_compile_method (), it already includes an ftnptr.
1158 2010-01-16 Zoltan Varga <vargaz@gmail.com>
1160 * metadata.c (get_image_set): Remove an assert which can happen in normal use.
1162 2010-01-15 Zoltan Varga <vargaz@gmail.com>
1164 * metadata.c (mono_metadata_str_hash): New helper function to compute a stable
1165 hash value which doesn't depend on glib/eglib versions.
1166 (mono_metadata_type_hash): Use it.
1168 * object.c (mono_method_get_imt_slot): Ditto.
1170 2010-01-14 Rodrigo Kumpera <rkumpera@novell.com>
1172 * class.c (mono_type_has_exceptions): Check the generic instance. It can fail
1173 independently of the GTD.
1175 * class.c (mono_class_setup_fields): Fail if field has negative offset.
1177 * class.c (mono_class_setup_fields): Fail if valuetype has zero size. Add sizeof(MonoObject)
1178 to the upper limit since instance_size includes this amount.
1180 * class.c (mono_class_layout_fields): Check if the types of the static fields have failed.
1184 2010-01-14 Zoltan Varga <vargaz@gmail.com>
1186 * object.c (build_imt_slots): Compute the vtable slot correctly for interfaces
1187 with static methods.
1189 * object.c (build_imt_slots): Avoid asserting when static methods are
1190 encountered in an interface.
1192 2010-01-13 Mark Probst <mark.probst@gmail.com>
1194 * sgen-gc.c (to_space_expand): Fix assertion.
1196 Wed Jan 13 15:42:28 CET 2010 Paolo Molaro <lupus@ximian.com>
1198 * string-icalls.c: missing declaration fixes.
1199 * sgen-gc.c: portability fixes.
1201 2010-01-12 Rodrigo Kumpera <rkumpera@novell.com>
1203 * class.c (mono_class_get_implemented_interfaces): Now take a MonoError argument.
1209 * class-internals.h: Adjust for new signature of mono_class_get_implemented_interfaces.
1211 2010-01-12 Rodrigo Kumpera <rkumpera@novell.com>
1213 * class.c (mono_class_setup_interfaces): Now take a MonoError argument and
1214 it can fail loading the type.
1216 * class.c: Add mono_class_inflate_generic_class_checked.
1220 * class-internals.h: Adjust for new signature of mono_class_setup_interfaces.
1222 2010-01-11 Zoltan Varga <vargaz@gmail.com>
1224 * loader.c (mono_method_signature_checked): New internal function taking an
1227 * socket-io.c (AI_ADDRCONFIG): Applied patch from John Lightsey (jd@cpanel.net).
1228 Fixes build on rh 7.3.
1230 2010-01-10 Aaron Bockover <abockover@novell.com>
1232 * assembly.c (mono_set_rootdir): Support finding the mono paths on OS X
1233 at runtime in the same way as on Windows, which yields a relocatable
1234 Mono. Uses dyld's _NSGetExecutablePath and realpath to resolve the path
1235 of the running mono process.
1237 On TARGET_ARM, fallback () will always be executed.
1239 2010-01-08 Rodrigo Kumpera <rkumpera@novell.com>
1241 * icall.c (ves_icall_Type_GetInterfaceMapData): This function is generics variance aware.
1243 2010-01-08 Rodrigo Kumpera <rkumpera@novell.com>
1245 * class.c (mono_class_is_assignable_from_slow): Support variant
1248 * class.c (mono_class_implement_interface_slow): Support types with
1249 variant generic arguments.
1251 2010-01-08 Rodrigo Kumpera <rkumpera@novell.com>
1253 * verify.c: Remove some code duplication.
1255 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1257 * object.c: Update docs.
1259 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1261 * object.c (add_imt_builder_entry): Improve DEBUG_IMT spew.
1263 * object.c (build_imt_slots): Interfaces with variant generic arguments use the
1264 fallback trampoline as well.
1266 * class.c (mono_class_interface_offset_with_variance): Add new non_exact_match
1267 out argument that is set to TRUE if the match was direct.
1269 * class.c (mono_class_is_assignable_from): Delegates require variance testing as well.
1271 * class-internal.h: Update prototype of mono_class_interface_offset_with_variance.
1273 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1275 * class.c: Add mono_class_interface_offset_with_variance function that does same
1276 as mono_class_interface_offset but takes variance into account.
1278 * class-internal.h: Export mono_class_interface_offset_with_variance.
1280 * object.c: Fix and improve DEBUG_IMT. Added an assert for IMT thunk building.
1282 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1286 * class.c: Add some FIXME for due to variant generic arguments.
1288 object.c (mono_object_isinst_mbyref): Interfaces with variant generic arguments
1289 can't use the simple bitfield check, so call mono_class_is_assignable_from if
1290 the bitfield check fails.
1292 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1294 * class.c (mono_class_is_assignable_from): Rework the generics variance code
1295 to be easier to read and fix bugs in the case a non generic type implements a variant
1298 * class.c (mono_class_has_variant_generic_params): Make non static.
1300 * class-internals.h: Export mono_class_has_variant_generic_params as part of
1303 2010-01-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
1305 * assembly.c: fix MONO_PATH debug output.
1307 2010-01-06 Atsushi Enomoto <atsushi@ximian.com>
1309 * culture-info-table.h : regenerated.
1311 2010-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1313 * verify.c (mono_verifier_verify_class): Properly check for broken parent. Ignore
1314 types that are meant to not have a parent.
1316 2010-01-04 Zoltan Varga <vargaz@gmail.com>
1318 * marshal.c (mono_marshal_get_runtime_invoke): Make a copy of the signature
1319 from the image mempool, so it is not leaked.
1321 2010-01-04 Zoltan Varga <vargaz@gmail.com>
1323 * metadata-internals.h (_MonoImage): Remove unused generic_class_cache field.
1325 2010-01-04 Sebastien Pouliot <sebastien@ximian.com>
1327 * verify.c (verify_valuetype_layout_with_target): Fix case
1328 that can lead to infinite recursion. Fix bug #567861
1330 2010-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1332 * pedump.c: Run code verifier even if image verification fails
1333 due to a failed type we. This allows more errors to be shown.
1335 2010-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1337 * class.c (count_virtual_methods): Remove the assert and now
1340 * class.c (setup_interface_offsets): This can fail now.
1342 * class.c (mono_class_setup_vtable_general): Check for parent vtable
1343 errors. Check setup_interface_offsets errors.
1345 * class.c (setup_interface_offsets): Simplify the return error logic
1346 and remove class_init_ok.
1350 2010-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1352 * class.c (mono_class_init): Do class verification at the beginning. Add
1353 some asserts to avoid tripping into invalid memory.
1355 * object.c (compute_class_bitmap): Replace a g_assert_not_reached with a
1356 g_error and a decent message.
1358 * verify.c (mono_verifier_verify_class): Verify for invalid super type.
1362 2010-01-03 Zoltan Varga <vargaz@gmail.com>
1364 * mempool-internals.h (g_list_prepend_mempool): Define this and related functions
1365 as inline functions instead of defining them in mempool.c.
1367 * metadata-internals.h (MonoImageSet): New structure representing a set of
1368 MonoImages, which own a collection of generic instances.
1370 * metadata.c: Get rid of the global generic caches, instead assign each generic
1371 instance to the image set which consists of all the images referenced by the
1372 instance. This greatly speeds up mono_metadata_clean_for_image (), and allows
1373 the memory used by generic instances to be allocated from a per image-set mempool
1376 2010-01-03 Zoltan Varga <vargaz@gmail.com>
1378 * marshal.c (mono_marshal_get_runtime_invoke): Fix a memory leak.
1380 2010-01-03 Zoltan Varga <vargaz@gmail.com>
1382 * appdomain.c (zero_static_data): Fix a warning.
1384 * locales.c (construct_culture_from_specific_name): Applied patch from
1385 José Antonio Sánchez Lázaro <jasl@darcysoft.es>. Fix a crash if a culture was
1386 not found. Fixes #567900.
1388 2009-12-31 Sebastien Pouliot <sebastien@ximian.com>
1390 * loader.c (mono_method_get_signature_full): Remove two asserts.
1391 Return NULL instead so that the verifier can handle both cases
1394 2009-12-30 Rodrigo Kumpera <rkumpera@novell.com>
1396 * class.c (mono_class_setup_methods): Use checked version of mono_class_inflate_generic_method_full
1397 so we can properly fail types instead of crashing.
1401 2009-12-30 Rodrigo Kumpera <rkumpera@novell.com>
1403 * reflection.c (reflection_methodbuilder_to_mono_method): Assert in case of a broken
1406 2009-12-30 Rodrigo Kumpera <rkumpera@novell.com>
1408 * marshal.c (mono_mb_emit_restore_result): Properly handle generic enums.
1410 2009-12-26 Zoltan Varga <vargaz@gmail.com>
1412 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait): Don't close the
1413 wait handle if the wait is interrupted, since it is still in mon->wait_list, and
1414 we can't remove it from it since we don't hold the lock.
1415 (mon_new): Free the orphaned events here when a mon structure is added to the
1416 freelist. Fixes #561239. Thanks to Mike Rieker <wmrieker@nii.net> for tracking
1419 2009-12-26 Rodrigo Kumpera <rkumpera@novell.com>
1421 * verify.c (init_stack_with_value_at_exception_boundary): Do stack overflow checking here
1422 as max stack might be zero.
1426 2009-12-26 Rodrigo Kumpera <rkumpera@novell.com>
1428 Rework all uses of mono_class_setup_methods to accept that it can fail now.
1430 * class.c (mono_class_setup_methods): This function now can fail the class. Do so for generic
1431 instances if the GTD did.
1433 * class.c (mono_class_setup_properties): Ditto.
1435 * class.c (mono_class_setup_events): Ditto.
1437 * class.c (mono_class_setup_vtable): Fail early if the type is already broken.
1439 * class.c (mono_class_setup_vtable_general): Add a few more missing broken type checks. Sanitize
1442 * class.c (mono_class_init): Fail if GTD did.
1445 * generic-sharing.c:
1449 * verify.c: Properly handle failure of mono_class_setup_methods.
1451 2009-12-26 Rodrigo Kumpera <rkumpera@novell.com>
1453 * class-internals.c: Add mono_class_inflate_generic_method_full_checked and make
1454 mono_class_inflate_generic_method_full internal.
1456 * class.c (inflate_generic_context): Now takes a MonoError argument.
1458 * class.c (mono_class_inflate_generic_method_full): Now calls the _checked and abort on
1461 2009-12-26 Zoltan Varga <vargaz@gmail.com>
1463 * generic-sharing.c (instantiate_other_info): Avoid creating jump trampolines since
1464 they cannot be patched. Partly fixes #564408.
1466 2009-12-24 Mark Probst <mark.probst@gmail.com>
1468 * metadata-internals.h, reflection.c: Use the
1469 MonoDynamicImage.handleref hash table only with unmanaged keys,
1470 and add a managed hash table handleref_managed for managed keys.
1472 2009-12-24 Mark Probst <mark.probst@gmail.com>
1474 * sgen-gc.c: Unset to-space bumper between collections. It might
1475 become invalid due to degraded allocations.
1477 2009-12-21 Rodrigo Kumpera <rkumpera@novell.com>
1479 * loader.c (mono_method_get_signature_full): Check if the returned signature is compatible
1480 with the one from the original method.
1482 * metadata-verify.c (mono_verifier_is_sig_compatible): New function to verify signature
1485 * verify-internals.h: Add new function to the internal API.
1487 2009-12-18 Dimitar Dobrev <dpldobrev@yahoo.com>
1489 * culture-info-tables.h: regenerated it to include the Georgian culture.
1491 2009-12-18 Zoltan Varga <vargaz@gmail.com>
1493 * sgen-gc.c: Include mono/utils/memcheck.h.
1495 * reflection.c (mono_reflection_get_type_internal_dynamic): Use assembly->domain
1496 instead of the current domain, since the two might not match if this is called
1499 * metadata-internals.h (MonoDynamicAssembly): Add a 'domain' field to specify the
1500 domain which created this assembly.
1502 2009-12-18 Zoltan Varga <vargaz@gmail.com>
1504 * debug-helpers.c (dis_one): Avoid a glib assert on empty strings.
1506 2009-12-17 Mark Probst <mark.probst@gmail.com>
1508 * sgen-gc.c: Managed implementation of the specialized generic
1509 store write barrier.
1511 2009-12-17 Rodrigo Kumpera <rkumpera@novell.com>
1513 * icall.c (ves_icall_Type_GetMethodsByName): Don't pin virtual methods if they are newslot.
1514 A private virtual newslot method is used to implement an interface method without exposing
1515 it to users. When querying for public instance methods, such method would hide a public one
1520 2009-12-17 Zoltan Varga <vargaz@gmail.com>
1522 * reflection.c (resolve_object): Fix the encoding of unmanaged calling
1525 2009-12-16 Rodrigo Kumpera <rkumpera@novell.com>
1527 * reflection.c (mono_type_get_object): Guard against NULL generic param owner.
1529 2009-12-16 Rodrigo Kumpera <rkumpera@novell.com>
1531 * class-internals.h (MonoDynamicGenericClass): Kill property and event related fields
1532 as they are no longer used.
1534 * metadata.c (free_generic_class_dependents): Remove reference to previous fields
1536 * reflection.c (mono_reflection_generic_class_initialize): Ditto.
1538 2009-12-16 Rodrigo Kumpera <rkumpera@novell.com>
1540 * reflection.c (mono_type_get_object): If the type is VAR or MVAR check
1541 if the owner class has not been finished before returning reflection_info.
1545 2009-12-16 Zoltan Varga <vargaz@gmail.com>
1547 * reflection.c (mono_custom_attrs_from_param): Avoid a crash if a dynamic
1548 param doesn't have custom attributes. Fixes #565117.
1550 * class.c (mono_bounded_array_class_get): Make these classes PUBLIC. Fixes
1553 2009-12-15 Rodrigo Kumpera <rkumpera@novell.com>
1555 * class.c (mono_class_setup_fields): Fail valuetypes that are bigger than 1Mb.
1557 2009-12-15 Rodrigo Kumpera <rkumpera@novell.com>
1559 * pedump.c: Add partial-md mode that doesn't perform full metadata verification. It does the
1560 same amount done by a core-clr enabled runtime.
1562 2009-12-15 Marek Habersack <mhabersack@novell.com>
1564 * appdomain.c (mono_make_shadow_copy): make sure access mode of
1565 the target files is reset to writable by owner and readable by
1566 everyone else to prevent problems when updating shadow copies of
1567 files whose source is read-only. Fixes bug #556884
1569 2009-12-15 Mark Probst <mark.probst@gmail.com>
1571 * class.c (mono_generic_class_get_class): Allocate the generic
1572 class via malloc again, so that it can be freed when any one of
1573 the images of its constituent types is closed.
1575 * metadata.c: When closing an image, don't free generic insts and
1576 generic classes right away, but put them into a list for later
1579 * image.c, metadata-internals.h: Store the free list and in the
1580 second pass of closing an image, free it.
1582 2009-12-14 Rodrigo Kumpera <rkumpera@novell.com>
1584 * reflection.c (mono_generic_class_get_object): Assert if this is ever called.
1586 * reflection.c (mono_reflection_register_with_runtime): Only register dynamic
1589 * reflection.c (resolve_object): Call ensure_complete_type on the inflated field.
1591 2009-12-14 Rodrigo Kumpera <rkumpera@novell.com>
1593 * reflection.c (mono_reflection_type_get_handle): Properly fail in case of a broken
1596 * reflection.c (mono_reflection_register_with_runtime): Throws in case a bad user type
1599 2009-12-14 Miguel de Icaza <miguel@novell.com>
1601 * verify.c (mono_method_verify): The Unused opcodes produce an
1602 InvalidProgramException on .NET
1604 2009-12-14 Sebastien Pouliot <sebastien@ximian.com>
1606 * loader.c (mono_method_get_header): Move assert after the verifier
1607 has been called on the method header.
1609 2009-12-12 Rodrigo Kumpera <rkumpera@novell.com>
1611 * object-internals.h: Remove useless field from MonoReflectionGenericClass.
1613 * appdomain.c: Bump corlib version.
1615 2009-12-12 Rodrigo Kumpera <rkumpera@novell.com>
1617 To properly support user types, MonoGenericClass has to be used for regular, non SRE,
1618 types as well since otherwise generic instances would not return UT as arguments but
1619 their undelying system type.
1621 * object-internals.h: Change field types of MonoGenericClass and *OnTypeBuilderInst
1622 to reflect the fact that they can have now multiple different types.
1624 * reflection.c (mono_image_get_field_on_inst_token): Handle MonoField.
1626 * reflection.c (mono_image_get_ctor_on_inst_token): Handle MonoCMethod.
1628 * reflection.c (mono_image_get_method_on_inst_token): Handle MonoMethod.
1630 * reflection.c (mono_reflection_register_with_runtime): Init super types
1631 if the image is not dynamic.
1633 * reflection.c (mono_reflection_bind_generic_parameters): In case of a MonoGenericClass,
1634 check if the generic type definition is a TypeBuilder.
1636 * reflection.c (mono_reflection_generic_class_initialize): If the generic type definition
1637 doesn't belong to a dynamic image, skip initialization.
1639 * reflection.c (resolve_object): Properly handle *OnTypeBuilderInst types where their
1640 base definition is not a dynamic type.
1642 2009-12-11 Marek Habersack <mhabersack@novell.com>
1644 * object.c (mono_ldstr, mono_ldstr_metadata_sig): added calls to
1645 mono_profiler_string_allocation
1647 * string-icalls.c (ves_icall_System_String_InternalAllocateStr):
1648 if string profiling is enabled, call
1649 mono_profiler_string_allocation
1651 * profiler.h: added two MonoProfileFlags -
1652 MONO_PROFILE_IOMAP_EVENTS and MONO_PROFILE_STRING_ALLOC as well as
1653 installation functions for the hooks below.
1655 * profiler-private.h, profiler.c: added two hooks:
1656 mono_profiler_string_allocation called whenever a string is
1657 allocated by InternalAllocateStr and mono_profiler_iomap called
1658 whenever IOMAP code performs an adjustement on a file path.
1660 Fri Dec 11 18:24:04 CET 2009 Paolo Molaro <lupus@ximian.com>
1662 * boehm-gc.c: fixed race condition while getting the target of a
1663 disappearing link (bug #522233).
1665 2009-12-10 Rodrigo Kumpera <rkumpera@novell.com>
1667 * class.c (mono_type_get_full): Produce warning instead of simply swallowing
1670 2009-12-10 Rodrigo Kumpera <rkumpera@novell.com>
1672 * reflection.c: Add mono_reflection_register_with_runtime icall to
1673 allow a MonoGenericClass to register itself as the managed mirror of
1674 a given generic instance.
1675 This is a temporary workaround until all MGC instantiation happens in
1678 * object-internals.h: Ditto.
1680 * icall-def.h: Ditto.
1682 2009-12-10 Mark Probst <mark.probst@gmail.com>
1684 * sgen-gc.c (find_in_remsets): Also search the generic store
1687 2009-12-10 Mark Probst <mark.probst@gmail.com>
1689 * sgen-gc.c: Don't access class names in debugging code when
1690 unloading a domain, because they might not be valid anymore.
1692 2009-12-10 Mark Probst <mark.probst@gmail.com>
1694 * domain.c, domain-internals.h: New function mono_domain_unset().
1696 * appdomain.c (unload_thread_main): Detach the thread again at the
1699 * threads.c: When a thread exists or is detached, unset its domain
1700 so that it's NULL when, for example, a pthread destructor runs.
1702 * sgen-gc.c: Assert that there is no domain set after a thread is
1705 2009-12-10 Mark Probst <mark.probst@gmail.com>
1707 * class.c (mono_generic_class_get_class),
1708 metadata.c (free_generic_class): Allocate generic MonoClass's from
1709 the image mempool, not via malloc. The problem with malloc is
1710 that when unloading a domain those classes are freed before
1711 clearing the heap and SGen needs the classes. Rewriting the
1712 unloading code to do the free later would be more work and there's
1713 no point in using malloc anyway.
1715 2009-12-09 Sebastien Pouliot <sebastien@ximian.com>
1717 * loader.c (mono_method_signature): Always call mono_loader_unlock
1720 2009-12-09 Rodrigo Kumpera <rkumpera@novell.com>
1722 * metadata-verify.c: Add mono_verifier_verify_string_signature to check
1725 * verify-internals.h: Add new function to the internal API.
1727 * verify.c (do_ldstr): Call into mono_verifier_verify_string_signature to
1728 check if it's a valid string.
1730 * object.c (mono_ldstr): Ditto.
1734 2009-12-09 Rodrigo Kumpera <rkumpera@novell.com>
1736 * icall.c (ves_icall_GetCurrentMethod): Drop all generic arguments
1737 from a method before returning it. This is the expected behavior.
1739 2009-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1741 * reflection.c (inflate_method): Handle the case of a regular system type.
1743 2009-12-08 Mark Probst <mark.probst@gmail.com>
1745 * sgen-gc.c, sgen-pinning-stats.c, sgen-gray.c: More statistics
1748 * mempool.c, mempool-internals.h: New function
1749 mono_mempool_get_bytes_allocated().
1751 * Makefile.am: sgen-pinning-stats.c added.
1753 2009-12-08 Mark Probst <mark.probst@gmail.com>
1755 * sgen-gc.c (create_allocator): Only use the fast path if the
1756 object size is within the small object size limit.
1758 2009-12-07 Mark Probst <mark.probst@gmail.com>
1760 * sgen-gc.c: Make sure section->data is aligned to 8 bytes by
1761 possibly adding padding to sizeof (GCMemSection).
1763 2009-12-07 Mark Probst <mark.probst@gmail.com>
1765 * sgen-gc.c (mono_gc_wbarrier_nostore): Skip the remset if the
1766 reference is not in the nursery.
1768 2009-12-07 Rodrigo Kumpera <rkumpera@novell.com>
1770 * class.c (mono_class_from_typeref): Bounds check idx against the
1773 2009-12-07 Mark Probst <mark.probst@gmail.com>
1775 * sgen-gc.c, sgen-pinning.c: When pinning, make only one pass
1776 through the potential roots, then sort the results and find the
1777 pinned objects from there.
1779 * Makefile.am: sgen-pinning.c added.
1781 2009-12-07 Mark Probst <mark.probst@gmail.com>
1783 * sgen-gc.c: Record generic stores in specialized remset buffers.
1785 2009-12-06 Mark Probst <mark.probst@gmail.com>
1787 * sgen-gc.c: Make pinned chunks the same size as major heap
1788 sections, and align them as well, so that we can check whether an
1789 object is in a pinned chunk or a major section in constant time.
1791 2009-12-06 Mark Probst <mark.probst@gmail.com>
1793 * sgen-gc.c (build_nursery_fragments): Don't leak fragments.
1795 2009-12-06 Mark Probst <mark.probst@gmail.com>
1797 * sgen-gc.c: Make all major heap sections the same size (currently
1798 128k) and allocate them on aligned addresses. Small heap sections
1799 give us better granularity with pinned objects - we can free up
1802 2009-12-06 Mark Probst <mark.probst@gmail.com>
1804 * string-icalls.c (ves_icall_System_String_GetLOSLimit): Debug
1807 2009-12-05 Zoltan Varga <vargaz@gmail.com>
1809 Applied patch from Laurent Etiemble (laurent.etiemble@gmail.com).
1811 * mono/metadata/assembly.c: When opening an assembly image, pass the real
1812 names in addition to the runtime generated one.
1814 * mono/metadata/image.h: Add a function to take the real name of the assembly
1817 * mono/metadata/image.c: If a real name has been passed to load an assembly,
1818 use it instead of the runtime generated one.
1820 Code is contributed under MIT/X11 license.
1822 2009-12-05 Zoltan Varga <vargaz@gmail.com>
1824 * marshal.c (emit_marshal_vtype): Do the klass == date_time_class checks
1825 before the other checks to prevent problems if the DateTime class is blittable.
1826 Hopefully fixes #559600.
1828 2009-12-05 Mark Probst <mark.probst@gmail.com>
1830 * string-icalls.c, string-icalls.h, icall-def.h: New icall that
1831 returns the largest string length that will not be put into the
1834 * sgen-gc.c, gc-internal.h: New function that returns the largest
1835 object size that will not be put into the LOS.
1837 * appdomain.c: Bump corlib version.
1839 2009-12-05 Zoltan Varga <vargaz@gmail.com>
1841 * class-internals.h: Add MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
1843 * generic-sharing.c: Handle MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
1845 2009-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1847 * reflection.c (inflate_method): Fix signature.
1849 * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Reflect change
1852 2009-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1854 * reflection.c (inflate_method): Make this method work with TypeBuilder as well.
1856 2009-12-03 Mark Probst <mark.probst@gmail.com>
1858 * sgen-gc.c: Abstract to-space handling.
1860 2009-12-03 Rodrigo Kumpera <rkumpera@novell.com>
1862 * loader.c (find_method_in_class): Ignore methods with broken signatures.
1866 2009-12-03 Mark Probst <mark.probst@gmail.com>
1868 * sgen-gc.c: Only add references from outside the nursery to
1869 within the nursery to the global remset list.
1871 2009-12-03 Mark Probst <mark.probst@gmail.com>
1873 * appdomain.c (create_exceptions): Set the domain temporarily if
1874 necessary to avoid cross-domain references.
1876 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1878 * verify.c (get_stack_type): Return that the type is invalid instead of
1881 * verify.c (mono_method_verify): Verify that all locals and arguments
1882 have valid stack types.
1886 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1888 * verify.c (mono_method_verify): Bounds check the filter offset. Make all
1889 bounds checking overflow aware.
1893 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1895 * verify.c (do_invoke_method): Check for invalid method signatures.
1899 2009-12-02 Jb Evain <jbevain@novell.com>
1901 * appdomain.c (MONO_CORLIB_VERSION): bump.
1902 * icall-def.h (get_base_definition): renamed to get_base_method
1903 and add a boolean argument indicating we want the original
1904 method definition, or the immediate base method.
1905 * icall.c: apply the get_base_definition to get_base_method change.
1907 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1909 * class.c (mono_class_setup_fields): Fail an enum without an instance field.
1913 Wed Dec 2 16:35:49 CET 2009 Paolo Molaro <lupus@ximian.com>
1915 * class.c: remove asserts for invalid type token in
1916 mono_class_name_from_token(), mono_assembly_name_from_token() and
1917 mono_class_create_from_typedef () (fixes bug #553318).
1919 Wed Dec 2 15:48:19 CET 2009 Paolo Molaro <lupus@ximian.com>
1921 * metadata.c, class.c, loader.c: remove assert after bsearch() for
1922 incorrect assemblies (bug #553322).
1924 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1926 * metadata.c (mono_metadata_inflate_generic_inst): Add MonoError parameter.
1928 * metadata-internals.h: Change signature of mono_metadata_inflate_generic_inst.
1930 * class.c (inflate_generic_type): Use new version of mono_metadata_inflate_generic_inst.
1932 * class.c (inflate_generic_context): Ditto.
1934 * loader.c (method_from_methodspec): Ditto.
1938 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1940 * class.c (mono_type_retrieve_from_typespec): Use MonoError machinery to report errors.
1942 * class.c (mono_class_create_from_typespec): Ditto.
1944 * class.c (mono_class_get_full): Fix for change on the above 2 functions.
1946 * class.c (mono_type_get_full): Fix for change on the above 2 functions.
1950 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1952 * verify.c (mono_class_has_default_constructor): Check fror broken signatures.
1954 * verify.c (verify_delegate_compatibility): Ditto.
1956 * verify.c (do_newobj): Ditto.
1960 2009-12-02 Mark Probst <mark.probst@gmail.com>
1962 * sgen-gc.c: Use a gray queue instead of requiring that gray
1963 objects are in a contiguous region.
1965 * sgen-gray.c: The gray queue implementation.
1967 * Makefile.am: sgen-gray.c added.
1969 2009-12-02 Mark Probst <mark.probst@gmail.com>
1971 * appdomain.c: When unloading a domain, zero its static data and
1972 perform a minor collection when using SGen. That will get rid of
1973 all the remsets pointing into that domain's static data.
1975 * sgen-gc.c: Allow remsets into static data. By doing this we
1976 need less checks so we're more efficient.
1978 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
1980 * verify.c (mono_method_verify): Check for catch clauses with broken
1985 2009-12-01 Jb Evain <jbevain@novell.com>
1987 * class.c (make_generic_param_class): set the namespace of
1988 the generic parameter class from its owner, if available.
1990 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
1992 * verify.c (code_bounds_check): Do proper overflow checking.
1994 * verify.c (mono_method_verify): The number of switch entries is
1995 an unsigned int. Properly bounds check it.
1999 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
2001 * metadata.c: Kill mono_metadata_get_param_attrs_checked. Add
2002 mono_metadata_method_has_param_attrs which only checks if a given param
2003 list has a non zero flags entry.
2005 * metadata.c (mono_metadata_get_param_attrs): Add param_count parameter
2006 to inform how many params should we expect to decode.
2008 * loader.c (mono_method_signature): Use mono_metadata_method_has_param_attrs
2009 as it's faster than mono_metadata_get_param_attrs.
2011 * metadata-internals.h: Fix mono_metadata_get_param_attrs signature and
2012 add mono_metadata_method_has_param_attrs.
2014 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
2016 * class.c (mono_class_setup_vtable_general): Check for mono_method_get_vtable_slot
2019 * class.c (mono_method_get_vtable_slot): Don't assert if the computed method slot
2020 is -1 but its class is broken.
2024 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
2026 * metadata.c: Introduce mono_metadata_get_param_attrs_checked which checks
2027 for parameter overflow.
2029 * metadata.c (mono_metadata_parse_method_signature_full): Use checked version
2030 of mono_metadata_get_param_attrs.
2032 * metadata-internals.h: Add mono_metadata_get_param_attrs_checked to the internal
2035 * loader.c (mono_method_signature): Use checked version of mono_metadata_get_param_attrs.
2037 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
2039 * class.c (mono_class_setup_fields): Check for fields with broken types.
2043 2009-11-28 Rodrigo Kumpera <rkumpera@novell.com>
2045 * reflection.c (ensure_generic_class_runtime_vtable): Split this function in 2
2046 so we can avoid calling ensure_runtime_vtable multiple times for the GTD during
2047 its TypeBuilder::CreateType ().
2049 * reflection.c (ensure_generic_class_runtime_vtable): Avoid initializing interfaces
2052 * reflection.c: Every time we change the interface array, set interfaces_packed to NULL
2053 to make setup_interface_offsets happy.
2055 * reflection.c (remove_instantiations_of_and_ensure_contents): Fix instances again as corlib
2056 compilation now works.
2058 2009-11-28 Zoltan Varga <vargaz@gmail.com>
2060 * appdomain.c (create_exceptions): New helper function extracted from
2061 mono_runtime_init () to precreate objects used during exception handling.
2062 (mono_runtime_init): Call it.
2063 (mono_domain_create_appdomain_internal): Ditto. Fixes #555264.
2065 2009-11-27 Rodrigo Kumpera <rkumpera@novell.com>
2067 * reflection.c (remove_instantiations_of_and_ensure_contents): Temp hack to fix corlib
2068 compilation until the proper one is found.
2070 2009-11-27 Zoltan Varga <vargaz@gmail.com>
2072 * class.c (mono_class_setup_vtable_general): Cache the result of
2073 get_virtual_methods () since it can be slow because of the metadata
2076 * metadata-internals.h (_MonoImage): Change 'method_cache' to a GHashTable
2077 from a MonoValueHashTable for now, since the later is based on an earlier
2078 version of hpj's internal probing code and seems to have serious collision
2081 * loader.c (mono_get_method_full): Update after the change above.
2083 2009-11-26 Zoltan Varga <vargaz@gmail.com>
2085 * class-internals.h (MonoCachedClassInfo): Add 'is_generic_container' field.
2087 2009-11-26 Rodrigo Kumpera <rkumpera@novell.com>
2089 * reflection.c (get_field_on_inst_generic_type): Try to fallback using the field from
2090 the GTD instead of the DGC instead of crashing.
2092 * reflection.c (ensure_generic_class_runtime_vtable): Only reinflate stuff that is
2093 required. Inflate fields if needed.
2095 * reflection.c (remove_instantiations_of): Ensure generic instances are properly
2098 2009-11-26 Rodrigo Kumpera <rkumpera@novell.com>
2100 * class.c (check_interface_method_override): Check for NULL signatures and fail
2103 * debug-helpers.c (mono_signature_get_desc): Return a fixed string for NULL signatures.
2107 2009-11-26 Zoltan Varga <vargaz@gmail.com>
2109 * class.c (mono_class_get_virtual_methods): Call decode_row_col to obtain
2110 the MONO_METHOD_FLAGS column instead of decoding the whole row.
2112 2009-11-25 Rodrigo Kumpera <rkumpera@novell.com>
2114 * loader.c (field_from_memberref): Resolve the class first then the field
2115 signature. Remove a lot of duplicated code and make sure we don't pass valid
2116 values to mono_loader_set_error_field_load.
2120 2009-11-25 Rodrigo Kumpera <rkumpera@novell.com>
2122 * class.c (inflate_generic_type): Change code to use new signature of
2123 mono_error_set_bad_image.
2127 2009-11-25 Sebastien Pouliot <sebastien@ximian.com>
2129 * verify.c (mono_method_verify): Don't free ctx.params items if
2130 we aborted while inflating the ctx.locals. Complete previous fix
2132 2009-11-25 Sebastien Pouliot <sebastien@ximian.com>
2134 * verify.c (mono_method_verify): Use the uninflated type name,
2135 when the inflated is null, to report errors. Also take care when
2136 freeing, not to free everything since, in case of an error, some
2137 stuff would be copies (i.e. not allocated by the function itself)
2140 2009-11-24 Rodrigo Kumpera <rkumpera@novell.com>
2142 * verify.c (stack_push, stack_pop, stack_pop_safe): Assert if we underflow
2143 or overflow. The caller must have done this check explicitly. This guard us
2144 from accessing invalid memory.
2146 * verify.c (do_push_static_field): Check for stack overflow.
2150 2009-11-24 Rodrigo Kumpera <rkumpera@novell.com>
2152 * loader.c (find_method_in_class): Don't crash if the signature cannot
2155 * metadata.c (mono_metadata_parse_generic_param): Return NULL instead
2156 of asserting for the case of invalid params.
2160 2009-11-24 Sebastien Pouliot <sebastien@ximian.com>
2162 * image.c (mono_image_load_module): Fix crash when a bad assembly
2163 has no module at all (fix bug #553412) and also replace the
2164 g_assert with a return NULL (documented return value for failure)
2166 2009-11-23 Zoltan Varga <vargaz@gmail.com>
2168 * debug-helpers.c (mono_type_get_desc): Handle typedbyref.
2170 2009-11-23 Miguel de Icaza <miguel@novell.com>
2172 * file-io.c: Change FindFirst/FindNext/FindClose API to return the
2173 file attribute to managed code and avoid doing the mask/attribute
2176 2009-11-22 Miguel de Icaza <miguel@novell.com>
2178 * file-io.c: Surface a smart FindFirst/FindNext/FindClose API to
2181 * icall-def.h: New entry points.
2183 2009-11-19 Mark Probst <mark.probst@gmail.com>
2185 * process.c: Don't put references to managed objects into a
2188 2009-11-18 Sebastien Pouliot <sebastien@ximian.com>
2190 * class.c (can_access_internals): Allow CoreCLR to participate in
2191 allowing (or not) [InternalsVisibleTo] between assemblies.
2192 * security-core-clr.c|h: Make sure that only trusted code (a
2193 superset of platform code) can access the internals of platform
2196 Mon Nov 16 16:28:11 CET 2009 Paolo Molaro <lupus@ximian.com>
2198 * reflection.c: use the correct base class to get the virtual method
2199 "get_UnderlyingSystemType" and speed up the icall. Fixes bug #555013.
2201 2009-11-16 Sebastien Pouliot <sebastien@ximian.com>
2203 * security-core-clr.c (get_caller_no_reflection_related):
2204 [Mono]Type.InvokeMember is outside System.Reflection[.Emit] but
2205 it's still reflection and must be filtered correctly.
2207 2009-11-16 Mark Probst <mark.probst@gmail.com>
2209 * object.c (compute_class_bitmap): Fix for large bitmaps.
2211 2009-11-15 Zoltan Varga <vargaz@gmail.com>
2213 (mono_gc_get_suspend_signal): Fix the build with a system libgc.
2215 * boehm-gc.c (mono_gc_base_init): Applied patch from DKoushik K. Dutta (
2216 koush@koushikdutta.com). Disable GC_no_dls on android.
2218 2009-11-12 Mark Probst <mark.probst@gmail.com>
2220 * sgen-gc.c (find_tlab_next_from_address): Handle the case where
2221 tlab_next points outside the TLAB because the allocator was
2224 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
2226 * reflection.c (mono_image_module_basic_init): Handle exceptions correctly.
2228 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
2230 * object-internals.h: Change signature for mono_string_to_utf8_image.
2232 * object.c (mono_string_to_utf8_image): Change signature to take a MonoError
2235 * reflection.c: Take care of mono_string_to_utf8_image change and avoid raising
2236 exceptions due to mono_string_to_utf8.
2238 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
2240 * object-internals.h: Change signature for mono_string_to_utf8_mp.
2242 * object.c (mono_remote_class): Make sure all resources are released before
2243 raising an exception.
2245 * object.c (mono_print_unhandled_exception): Avoid raising an exception.
2247 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
2249 * mono-perfcounters.c (network_get_impl): Change variable initialization
2250 ordering to fix potential memory leak in case of exceptions.
2252 * mono-perfcounters.c (mono_perfcounter_create): Properly handle badly
2255 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
2257 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): Change
2258 variable initialization ordering to fix potential memory leak in case
2261 2009-11-09 Zoltan Varga <vargaz@gmail.com>
2263 * icall.c (mono_ArgIterator_Setup): Remove the MONO_ARCH_REGPARMS stuff, its not
2266 2009-11-07 Rodrigo Kumpera <rkumpera@novell.com>
2268 * appdomain.c: Fix shadow path code to better deal with exceptions.
2270 2009-11-07 Rodrigo Kumpera <rkumpera@novell.com>
2272 * appdomain.c: Use checked version of mono_string_to_utf8 to avoid raising an
2273 exception in the middle of the runtime code.
2275 2009-11-07 Rodrigo Kumpera <rkumpera@novell.com>
2277 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): Don't
2278 leak memory with broken envvar value.
2280 2009-11-06 Mark Probst <mark.probst@gmail.com>
2282 * reflection.c (mono_reflection_setup_internal_class): Because
2283 nested classes are not added to the name cache, we must put them
2284 in the reflection_info_unregister_classes list.
2286 2009-11-05 Sebastien Pouliot <sebastien@ximian.com>
2288 * class.c: When CoreCLR is enabled don't call mono_init_com_types
2289 if MONO_CLASS_IS_IMPORT return true unless the type reside in
2290 platform (trusted) code. Instead we return a TypeLoadException to
2291 be thrown later. This is the exception thrown by Silverlight 2 if
2292 a type, inside application (user) code is marked with [ComImport]
2294 2009-11-05 Zoltan Varga <vargaz@gmail.com>
2296 * icall.c (ves_icall_System_Diagnostics_Debugger_IsAttached_internal): Call
2297 mono_is_debugger_attached () too.
2299 * mono-debug.c (mono_is_debugger_attached): New helper function.
2300 (mono_set_is_debugger_attached): Ditto.
2302 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2304 * object-internals.h: Add mono_string_to_utf8_checked.
2306 * object.c: Implement mono_string_to_utf8_checked.
2308 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2310 * class.c: Add missing check for load errors after every
2311 call to mono_class_setup_fields
2315 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2317 metadata-verify.c (verify_tables_schema): Fix the error message.
2319 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2321 * metadata.c: Change event table schema to use TDOR for event type
2322 as this is what it's meant to be.
2324 * metadata.c (mono_metadata_compute_size): Change MONO_TABLE_ASSEMBLYPROCESSOR
2325 to MONO_TABLE_ASSEMBLYREFPROCESSOR, which is table that has a MONO_MT_TABLE_IDX
2328 * metadata.c (mono_metadata_compute_size): Trim MT_TABLE_IDX of code that no
2329 longer makes sense: remove MONO_TABLE_EVENT and remove checks for non-existent
2330 rows in MONO_TABLE_GENERICPARAM.
2334 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2336 * class.c (mono_image_add_to_name_cache): Assert on duplicate
2339 * reflection.c (mono_reflection_setup_internal_class): Avoid
2340 registering a gc root the same MonoClass multiple times.
2341 Don't register nested types on the global scope as they should
2342 not be available there.
2344 2009-11-05 Rolf Bjarne Kvinge <RKvinge@novell.com>
2346 * culture-info-tables.h: regenerated.
2348 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
2350 * debug-helpers.c: avoid g_strdup() in mono_type_full_name().
2352 2009-11-04 Sebastien Pouliot <sebastien@ximian.com>
2354 * string-icalls.c|h: Remove string internal calls that are not
2355 used anymore by the class libraries.
2356 * icall.c: Remove System_Reflection_FieldInfo_internal_from_handle
2357 which is not used in the class librairies.
2358 * icall-def.h: Update tables.
2360 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
2362 * class.h: Move mono_class_inflate_generic_type_checked...
2364 * class-internals.h: to here and make it internal. We don't want to
2365 further expose MonoGenericContext.
2367 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
2369 * verify.c (mono_method_verify): Improve error message.
2371 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
2373 * reflection.c (fieldref_encode_signature): If field_image is NULL then
2374 the token is already properly encoded. Fixs 4.0 build.
2376 2009-11-04 Rolf Bjarne Kvinge <RKvinge@novell.com>
2378 * locales.c (construct_number_format): Check if the number index is
2379 valid before trying to use it, if not, just return.
2381 2009-11-04 Zoltan Varga <vargaz@gmail.com>
2383 * marshal.c (mono_marshal_get_runtime_invoke): Don't reset abort exceptions,
2384 since that loses the abort state. Fixes #539394.
2386 2009-11-03 Zoltan Varga <vargaz@gmail.com>
2388 * marshal.c (mono_marshal_get_native_wrapper): For icall wrappers, add an
2389 explicit this argument to the call signature.
2390 (mono_marshal_get_icall_wrapper): Ditto.
2392 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2394 * reflection.c (fieldref_encode_signature): Add new field_image parameter
2395 to indicate which assembly to use when resolving a custom-mod.
2397 Fixes handling of volatile fields used across assemblies as reported in #551513.
2399 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2401 * loader.c: Improve error messages.
2403 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2405 * class.c (mono_class_setup_methods): Only give a slot for virtual methods
2406 of interfaces. Fixes IKVM.
2408 * class.c (mono_class_setup_vtable_general): Improve debug spew.
2410 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2412 * verify.c (verifier_inflate_type): Return the inflated type on success.
2414 2009-11-02 Zoltan Varga <vargaz@gmail.com>
2416 * debug-mono-symfile.c (check_line): Fix the handling of IL offset 0.
2418 * threads.c (mono_thread_attach): Call the profiler thread start callback.
2420 * object-internals.h (_MonoThreadInternal): Add a 'flags' field.
2422 * threads.c (build_wait_tids): Ignore threads which have the DONT_MANAGE
2425 * profiler.c: Add new profiler callbacks for runtime invoke.
2427 * object.c (mono_runtime_invoke): Call the runtime invoke callbacks.
2429 2009-11-01 Mark Probst <mark.probst@gmail.com>
2431 * sgen-gc.c: Keep track of the reason for a major collection and
2432 write it to the heap-dump file.
2434 2009-10-31 Miguel de Icaza <miguel@novell.com>
2436 * threads.c: refactor the code that initializes the
2437 thread_start_args into a reusable function and use this in the two
2438 methods that start up threads.
2440 2009-10-31 Zoltan Varga <vargaz@gmail.com>
2442 * appdomain.c (mono_domain_try_unload): Applied patch from Romain Tartière.
2443 Fix returning when WaitForSingleObjectEx returns WAIT_IO_COMPLETION.
2445 2009-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
2447 * mono-perfcounters.c: add the "_Total" instance for CPU counters.
2448 Until now, we only had the per-cpu(core) counters.
2450 2009-10-28 Mark Probst <mark.probst@gmail.com>
2452 * gc-internal.h, boehm-gc, sgen-gc.c, null-gc: Add
2453 mono_gc_get_suspend_signal(), which returns the suspend signal
2454 number used by the GC.
2456 2009-10-25 Zoltan Varga <vargaz@gmail.com>
2458 * threads.c (start_wrapper): Avoid an assert if thread_start_args () is NULL.
2460 * threads.c (start_wrapper): Call mono_profiler_thread_start () later after
2461 signalling start_notify.
2463 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
2465 * appdomain.c: do not test the st_mode field for shadow-copies.
2468 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
2470 * threadpool.[ch]: added hooks for thread start/finish and item
2471 processing begin/end. For monotouch use only.
2473 2009-10-24 Zoltan Varga <vargaz@gmail.com>
2475 * threads.c (mono_thread_get_name): New helper function.
2477 * reflection.c (resolve_object): Set handle_class for strings too.
2478 (mono_reflection_create_custom_attr_data_args): New helper function to decode
2479 a cattr blob into a set of arrays and structures without creating the custom
2480 attributes themselves.
2481 (create_custom_attr_data): Simplify using create_custom_attr_data_args.
2483 * mono-debug.c (mono_debug_il_offset_from_address): New helper function.
2485 * debug-mono-symfile.c (mono_debug_symfile_get_line_numbers): New helper
2488 2009-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2490 * verify.c: Replace calls to mono_class_inflate_generic_type with
2491 mono_class_inflate_generic_type_checked. Fixes #480005.
2493 2009-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2495 * class.c (mono_class_inflate_generic_type_with_mempool): Clear the error
2496 object since not all paths lead to callees initing it.
2498 2009-10-23 Alp Toker <alp@nuanti.com>
2500 Fix embedding API breakage from r144688. mono-compiler.h is an internal
2501 header and should not be shipped:
2503 * class.h: Back out MONO_DEPRECATED change. Currently depends on config.h
2504 which is specific to the mono build. Not going to work.
2506 2009-10-23 Sebastien Pouliot <sebastien@ximian.com>
2508 * security-manager.c: Report if core-clr is active from
2509 ves_icall_System_Security_SecurityManager_get_SecurityEnabled
2510 to allow Moonlight BCL to behave appropriately (both in browser
2511 and outside, e.g. smcs)
2513 2009-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
2515 * mono-config.c: ignore UTF-8 BOM and report parser errors.
2518 2009-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2520 * class.c: fix typo.
2522 2009-10-22 Rodrigo Kumpera <rkumpera@novell.com>
2524 * class-internals.h: Change signature of mono_class_inflate_generic_type_with_mempool to take
2525 a MonoError parameter.
2527 * class.h: Mark mono_class_inflate_generic_type deprecated, add new mono_class_inflate_generic_type_checked
2528 version that can does proper error handling.
2530 * class.c (inflate_generic_type): Add a MonoError parameter. Don't assert on error, use new mono error machinery.
2532 * class.c (mono_class_inflate_generic_type_with_mempool): Add new MonoError parameter.
2534 * class.c, generics-sharing.c: Changes to handle mono_class_inflate_generic_type_with_mempool new signature.
2536 2009-10-20 Zoltan Varga <vargaz@gmail.com>
2538 * debug-helpers.c (dis_one): Fix the disassembly of empty strings when
2539 NO_UNALIGNED_ACCESS is defined.
2541 2009-10-22 Zoltan Varga <vargaz@gmail.com>
2543 * marshal.c (mono_string_builder_to_utf16): Applied patch from
2544 Hib Eris <hib@hiberis.nl>. Return empty string for empty string builders.
2547 2009-10-22 Mark Probst <mark.probst@gmail.com>
2549 * sgen-gc.c: Shorten sections whenever possible.
2551 2009-10-22 Mark Probst <mark.probst@gmail.com>
2553 * sgen-gc.c: Use our portable semaphore #defines.
2555 2009-10-22 Mark Probst <mark.probst@gmail.com>
2557 * sgen-gc.c: A debug option for dumping the heap layout to a file
2558 after each collection.
2560 2009-10-21 Mark Probst <mark.probst@gmail.com>
2562 * sgen-gc.c: Make managed write barriers atomic via
2565 2009-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2567 * verify.c (verify_delegate_compatibility): Properly verify delegate creation of static
2568 methods. Fixes #543021.
2570 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
2572 * socket-io.[ch]: fix VS build.
2574 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
2577 * socket-io.[ch]: implemented SendFile.
2579 2009-10-20 Zoltan Varga <vargaz@gmail.com>
2581 * class.c (mono_class_create_from_typedef): Initialize class->element_class
2582 before the interfaces to avoid crashes later if class initialization fails.
2585 * marshal.c (emit_marshal_vtype): Implement byref marshalling of DateTime.
2588 2009-10-20 Marek Safar <marek.safar@gmail.com>
2590 * domain.c: Bump 4.0 version.
2592 2009-10-19 Sebastien Pouliot <sebastien@ximian.com>
2594 * assembly.c (mono_assembly_load_reference): Fix leak when 'status'
2595 code is known. (parse_public_key) Remove duplicate (unneeded) NULL
2596 check since 'pubkey' can't be NULL at this stage
2597 * icall.c (ves_icall_System_Array_FastCopy): Add comment about
2598 the check. (ves_icall_Type_GetInterfaceMapData) Remove duplicate
2599 initialization of 'iter'
2601 2009-10-16 Bill Holmes <billholmes54@gmail.com>
2603 * cominterop.c : Search the interface parts of vtable to find
2604 method matches. Fixes 547030.
2606 Code is contributed under MIT/X11 license.
2608 2009-10-15 Gonzalo Paniagua Javier <gonzalo@novell.com>
2610 * marshal.c: BeginInvoke cannot be called on multicast delegates with
2611 multiple targets. Fixes bug #574426.
2613 2009-10-14 Massimiliano Mantione <massi@ximian.com>
2615 * profiler.h: Put here the definition of
2616 MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH
2617 (and fix the build...).
2619 2009-10-14 Massimiliano Mantione <massi@ximian.com>
2621 * profiler.c, profiler.h, profiler-private.h:
2622 Added support for different ways of getting call chains in stat mode.
2624 2009-10-12 Mark Probst <mark.probst@gmail.com>
2626 * object.c, object-internals.h: New function for computing the
2627 size of an array, factored out of mono_array_new_full(). Use
2628 SGen's functions for allocating arrays and vectors.
2630 * sgen-gc.c, gc-internal.h: Special functions for allocating
2631 arrays and vectors without race conditions. A managed array
2634 * boehm-gc.c, null-gc.c: Don't provide a managed array allocator.
2636 2009-10-12 Mark Probst <mark.probst@gmail.com>
2638 * object.c, object.h, icall.c: Write barriers do the copying now,
2639 as well, so no need for an additional memcpy.
2641 * sgen-gc.c: Lock when storing remsets. Do the memory
2642 copying/moving in the write barriers.
2644 * null-gc.c, boehm-gc.c: Write barriers must copy here, too.
2646 * reflection.c: Added an assert.
2648 2009-10-12 Mark Probst <mark.probst@gmail.com>
2650 * threads.c, process.c: A few missing write barriers.
2652 2009-10-12 Joel W. Reed <joelwreed@gmail.com>
2654 * mono-perfcounters.c, mono-perfcounters-def.h: Add
2655 network performance counters for bytes sent per second, bytes
2656 received per second, and bytes total per second.
2658 Code is contributed under MIT/X11 license.
2660 2009-10-09 Mark Probst <mark.probst@gmail.com>
2662 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
2665 2009-10-09 Mark Probst <mark.probst@gmail.com>
2667 * threads.c, object-internals.h, object.c: Move code for
2668 transferring an object to a different domain (via
2669 serialization/remoting) to object.c.
2671 * object.c (call_unhandled_exception_delegate): If the exception
2672 is in a different domain than the delegate, transfer the exception
2675 2009-10-07 Zoltan Varga <vargaz@gmail.com>
2677 * marshal.c (emit_marshal_vtype): Emit marshalling of DateTime to OLE DATE.
2680 2009-10-06 Zoltan Varga <vargaz@gmail.com>
2682 * domain.c (DEFAULT_RUNTIME_VERSION): Change this to v2.0.
2684 2009-10-06 Mark Probst <mark.probst@gmail.com>
2686 * object.c (mono_method_return_message_restore): Handle the case
2687 where the argument is an instance of a generic type. Fixes
2690 2009-10-06 Mark Probst <mark.probst@gmail.com>
2692 * object.c (set_value): Write barrier fix - we must pass the
2693 count, not the size.
2695 2009-10-05 Zoltan Varga <vargaz@gmail.com>
2697 * domain.c (mono_init_internal): Print a useful error message when encountering
2698 an old mscorlib, instead of crashing. Fixes #544307.
2700 2009-10-04 Zoltan Varga <vargaz@gmail.com>
2702 * appdomain.c (copy_app_domain_setup): Fix a warning.
2704 * debug-helpers.c (dis_one): Ditto.
2706 2009-10-04 Mark Probst <mark.probst@gmail.com>
2708 * domain-internals.h, appdomain.c: The AppDomainSetup is copied
2709 into the new domain, instead of referencing the original one.
2711 * marshal.c, marshal.h: Make mono_marshal_xdomain_copy_value()
2714 * appdomain.c: Corlib version bump.
2716 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2718 * threadpool.c: one more...
2720 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2722 * threadpool.c: forgot a LeaveCriticalSection when telling the idle
2723 threads to die because we're shutting down. delgate5.exe works again.
2725 2009-10-01 Bill Holmes <billholmes54@gmail.com>
2727 * cominterop.c (mono_marshal_free_ccw_entry): Updating the
2728 ccw_interface_hash table when a ccw is finalized.
2730 Code is contributed under MIT/X11 license.
2732 2009-09-30 Mark Probst <mark.probst@gmail.com>
2734 * assembly.c, domain.c, image.c, metadata-internals.h: Split
2735 domain and image unloading into two steps. We must do this
2736 because clearing the domain in SGen requires the class metadata to
2737 be intact, but we need to free the mono_g_hash_tables in case a
2738 collection occurs during domain unloading and the roots would trip
2741 2009-09-30 Mark Probst <mark.probst@gmail.com>
2743 * object-internals.h: Remove serialized culture fields from
2746 * icall-def.h, thread-types.h, threads.c: Remove serialized
2749 * appdomain.c: Corlib version bump.
2751 2009-09-30 Zoltan Varga <vargaz@gmail.com>
2753 * marshal.c (emit_marshal_object): Emit out marshalling of stringbuilders.
2756 2009-09-30 Mark Probst <mark.probst@gmail.com>
2758 * sgen-gc.c: Try to shorten the new section after a major
2759 allocation to avoid ever-growing sections.
2761 2009-10-13 Martin Baulig <martin@ximian.com>
2763 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
2764 `MONO_DEBUGGER_EVENT_TRAMPOLINE' into
2765 `MONO_DEBUGGER_EVENT_OLD_TRAMPOLINE' and added a new
2766 `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
2768 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 4.
2770 2009-09-29 Gonzalo Paniagua Javier <gonzalo@novell.com>
2772 * threadpool.c: fixed the order in which 'completed' and the wait
2773 handle, if any, are set. Fixes bug #542933 and delegate2.exe
2774 No need to use the wait_handle field of ASyncCall. Make sure the
2775 threadpool is active when adding a job or queueing an idle thread.
2777 2009-09-29 Zoltan Varga <vargaz@gmail.com>
2779 * object.c (mono_unhandled_exception): Fix a crash if there is no main thread.
2781 * threads.c (build_wait_tids): Fix a crash if there is no main thread, like
2782 when using --compile-all.
2784 2009-09-27 Mark Probst <mark.probst@gmail.com>
2786 * metadata.c (free_generic_class): Unregister the field_objects
2787 roots if we're using SGen.
2789 2009-09-27 Mark Probst <mark.probst@gmail.com>
2791 * reflection.c (mono_dynamic_image_free): Deregister the GC root
2792 for GenericParamTableEntry.gparam.
2794 2009-09-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2796 * marshal.c: don't create the handle when calling. It is created later
2799 2009-09-26 Mark Probst <mark.probst@gmail.com>
2801 * sgen-gc.c: Warning fixes.
2803 2009-09-26 Mark Probst <mark.probst@gmail.com>
2805 * sgen-gc.c: New debug option "xdomain-checks", which scans the
2806 whole heap for cross-domain references before each collection.
2808 * sgen-scan-object.h: The scan action can now use SCAN to scan the
2811 * threadpool-internals.h, threadpool.c: New function
2812 mono_thread_pool_is_queue_array() for checking whether a given
2813 array is used as a (cross-domain) queue by the thread pool code.
2815 2009-09-26 Mark Probst <mark.probst@gmail.com>
2817 * sgen-gc.c: New function mono_gc_scan_for_specific_ref() which
2818 searches the whole heap for objects containing a specific
2819 reference. Only for debugging.
2821 2009-09-26 Mark Probst <mark.probst@gmail.com>
2823 * appdomain.c (MONO_CORLIB_VERSION): Bumped.
2825 * icall-def.h, threads.c, threads-types.h: New icalls for copying
2826 byte arrays between domains.
2828 2009-09-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
2831 * class-internals.h:
2832 * mono-perfcounters-def.h:
2833 * mono-perfcounters.c:
2834 -There is a list of idle threads
2835 -Each of those idle threads wait on their own WaitHandle instead
2836 of all of them using the same semaphore. When a new work item is
2837 added, the job is assigned directly to an idle thread or a newly
2838 created one if possible and then the handle for that thread is
2839 signaled. Compare that to the current approach where all the
2840 threads in the pool compete to dequeue a job from the same
2842 -New struct ThreadPool that brings together the bunch of static
2843 variable for each threadpool (IO and regular).
2844 -New performance counters: # of items added and its rate per
2845 threadpool. The rate will be used later, perhaps together with
2846 other perf. counters, to decide when idle threads should exit.
2848 2009-09-25 Jonathan Chambers <joncham@gmail.com>
2850 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal):
2851 Fix typo on Windows build.
2852 (ves_icall_System_Net_Sockets_Socket_Accept_internal): Fix typo on Windows build.
2854 Code is contributed under MIT/X11 license.
2856 2009-09-25 Mark Probst <mark.probst@gmail.com>
2858 * object-internals.h: The Thread class is split up into Thread and
2859 InternalThread now. We have exactly one InternalThread per
2860 thread, and at most one Thread per appdomain per thread. Most
2861 data is stored in InternalThread. All InternalThread objects live
2864 * class-internals.h: Add internal_thread_class to MonoDefaults.
2866 * appdomain.c (mono_domain_unload), attach.c (receiver_thread),
2867 domain.c, gc.c, icall-def.h, monitor.c, object.c, sgen-gc.c,
2868 socket-io.c, threadpool.c, thread-types.h, threads.c: Changes
2869 resulting from the split of the Thread class.
2871 * gc-internal.h: Prototype for new function for checking whether a
2872 thread is the finalizer thread.
2874 * appdomain.c: Corlib version bump.
2876 2009-09-25 Rolf Bjarne Kvinge <RKvinge@novell.com>
2878 * appdomain.c|h: Add a mono_domain_try_unload method which is
2879 equivalent to mono_domain_unload, except that it returns an exception
2880 instead of throwing it. Make mono_domain_unload use the
2881 mono_domain_try_unload method to avoid code-duplication.
2883 2009-09-25 Zoltan Varga <vargaz@gmail.com>
2885 * debug-helpers.c (dis_one): Avoid unaligned accesses on platforms where that is
2888 2009-09-24 Zoltan Varga <vargaz@gmail.com>
2890 * marshal.c (emit_ptr_to_object_conv): Generate an exception instead of
2891 aborting when a conversion is not implemented.
2893 2009-09-23 Miguel de Icaza <miguel@novell.com>
2895 * verify.c: when comparing culture strings, use g_ascii_strcmp
2897 * assembly.c (mono_public_tokens_are_equal): Change g_strcasecmp
2898 when comparing public key tokens to use memcmp on 16 bytes. I do
2899 not believe this ever worked as advertised in the past.
2901 The standard Public Key is 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
2902 which would have always failed earlier.
2904 2009-06-25 Miguel de Icaza <miguel@novell.com>
2906 * gc.c: Raise a NullArgumentException if the object passed is
2909 2009-09-22 Zoltan Varga <vargaz@gmail.com>
2911 * image.c (mono_image_close): Atomically decrement the reference count and
2912 remove the image from the hash tables, to prevent another thread from seeing a
2913 dying MonoImage. Fixes #541194.
2915 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2917 * threadpool.c: actually use the minimum number of 'completion ports'
2918 (for us is just a potential worker thread).
2920 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2922 * threadpool.c: remove ares_htable. It does not make sense any more
2923 since the same objects are now stored in GC-tracked arrays while they are
2926 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2928 * threadpool.c: increase the minimum length of the queues to 128.
2931 2009-09-21 Zoltan Varga <vargaz@gmail.com>
2933 * marshal.c (mono_marshal_get_string_ctor_signature): New internal function to
2934 return the modified signature used by string ctors.
2936 2009-09-20 Zoltan Varga <vargaz@gmail.com>
2938 * marshal.c (mono_marshal_get_runtime_invoke_dynamic): New internal function
2939 to return a runtime-invoke wrapper which uses DYN_CALL to call the wrapped
2940 method, to be used by full-aot.
2942 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
2944 Since the runtime supports lazy initialization of a type's vtable and this can cause a type
2945 to fail, we need to ensure that the vtable is properly initialized at spots were the type must
2946 be known to be good.
2948 * class.c (mono_class_init): Fail array types if their element type fails initialization
2951 * object.c (mono_class_create_runtime_vtable): Fail array types if their element type fails
2952 initialization, additionally we request the element_type vtable to be initialized as well.
2954 This is fine and should not increase the working set in any meaningful way since it's reasonable
2955 to assume that most code will create an array and eventually populate it, which will require the
2956 type's vtable to be initialized.
2958 * loader.c (field_from_memberref): Add a comment for a possibly useless mono_class_init call.
2960 2009-09-17 Atsushi Enomoto <atsushi@ximian.com>
2962 * normalization-tables.h : regenerated.
2964 2009-09-16 Zoltan Varga <vargaz@gmail.com>
2966 * mono-debug.c (mono_debug_add_method): Increase the size of the buffer,
2967 a leb128 encoding can take up to 5 bytes.
2969 2009-09-15 Rodrigo Kumpera <rkumpera@novell.com>
2971 * class.c (verify_class_overrides): Remove useless argument.
2973 * class.c (mono_class_setup_vtable_general): Move the overrides check to happen
2974 before interface enumeration as this is no longer required.
2976 2009-09-15 Rodrigo Kumpera <rkumpera@novell.com>
2978 * class.c: New function mono_class_is_assignable_from_slow that is safe to be
2979 used under mono_class_init context. This functions avoid any code path that
2980 calls mono_class_init, which leads it to be slow as some things like the interface
2981 bitmap are not available.
2983 * class.c (verify_class_overrides): Use mono_class_is_assignable_from_slow instead
2984 of it's own broken version. Fixes the verifier part of #538588.
2986 * class-internals.h: Export mono_class_is_assignable_from_slow as part of the internal
2989 2009-09-15 Mark Probst <mark.probst@gmail.com>
2991 * class.c (mono_class_init): Always set an exception in a class if
2992 vtable setup fails. Fixes #538577.
2994 * generic-sharing.c: Raise an exception if mono_class_vtable()
2997 2009-09-13 Zoltan Varga <vargaz@gmail.com>
2999 * marshal.c (mono_marshal_get_runtime_invoke): Don't share instance
3000 methods of vtypes, as they could be incorrectly shared with static methods
3001 taking an IntPtr argument.
3003 2009-09-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
3007 * class-internals.h: renamed waithandle_class to
3008 manualresetevent_class.
3009 * marshal.c: propagate the exception if a remoting BeginInvoke call
3012 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3014 * object.c: Properly handle vtable failures.
3016 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3018 * socket-io.c: Assert on vtable failure.
3020 * mono-mlist.c: Assert on vtable failure.
3022 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3024 * marshal.c: Assert on vtable failure.
3026 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3028 * icall.c: Properly handle vtable failures.
3030 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3032 * debug-helpers.c (mono_class_describe_statics): Properly handle vtable failures.
3034 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3036 * cominterop.c (ves_icall_System_ComObject_CreateRCW): Property handle vtable failures.
3038 * console-unix.c (do_console_cancel_event): Same.
3040 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3042 * class-internals.h: Add mono_class_vtable_full function that allows control
3043 if an exception should be raised or not.
3045 * object.c (mono_class_vtable): Call into mono_class_vtable_full. Fix this function
3046 to do what its documentation say, that is to return NULL and set exception_type on
3049 * object.c (mono_class_create_runtime_vtable): Add new raise_on_error parameter
3050 and change the code to honor it.
3052 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
3054 * verify.c: Fix typo in error message.
3056 2009-09-10 Sebastien Pouliot <sebastien@ximian.com>
3058 * security-core-clr.c: Fix default_platform_check so it can run
3059 the runtime coreclr tests (without an infinite recursion when
3060 throwing an exception).
3062 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3064 object.c (mono_delegate_ctor_with_method): Guard against null method.
3066 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3068 * marshal.c (mono_marshal_get_xappdomain_dispatch): Add an assert
3069 that should be replaced with error handling later.
3071 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3073 * marshal.c (mono_delegate_end_invoke): Fix warning.
3075 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3077 * loader.c (mono_field_from_token): Properly handle invalid
3080 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3082 * pedump.c (verify_image_file): Skip types that can't be
3085 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3087 * verify.c: Look for recursive valuetypes only against the
3088 type been initialized as this is a lot simpler and works.
3090 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
3092 * verify.c: Ensure that fields are properly loaded before
3095 2009-09-10 Bill Holmes <billholmes54@gmail.com>
3097 * object.c (mono_object_get_virtual_method) : Call
3098 mono_cominterop_get_invoke if the object is a COM object.
3100 Code is contributed under MIT/X11 license.
3102 2009-09-09 Rodrigo Kumpera <rkumpera@novell.com>
3104 * verify.c: Check for recursive valuetype definitions.
3106 2009-09-08 Rodrigo Kumpera <rkumpera@novell.com>
3108 Use inheritance-aware interface offsets. Inherited types use the same offsets
3109 of their parents. This reduce offset duplication in case more than one type in
3110 the inheritance tree explicitly implements the same interface.
3112 This also removes a source of vtable bubbles found in #532409. An abstract type
3113 isn't required to provide abstract methods to all interfaces it implements, which
3114 resulted in a bubble with the previous scheme as the child would get a non-full
3115 vtable from its parent. We fail all concrete types with vtable bubbles, so this
3118 This change causes an increase of 1.7% in vtable memory usage for IronPython pystone but
3119 it's expected to not cause any significant increase beyond that.
3121 * class.c (setup_interface_offsets): Compute super class iface offsets
3122 first to force sharing.
3124 * class.c: Add VTABLE_SELECTOR macro to the vtable debug macros to help
3125 dumping only the relevant ones.
3127 * class.c (mono_class_setup_vtable_general): Give newslot, non final, virtual
3128 methods a new slot regardless if they belong to an interface or not. This allows
3129 an inherited type to override the iface method separately from the class one.
3131 2009-09-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
3133 * threadpool.c: make the Sleep() alertable to prevent delays exiting
3134 applications that take less than 2s to execute.
3137 2009-09-04 Zoltan Varga <vargaz@gmail.com>
3139 * object-internals.h (MonoRuntimeCallbacks): Add a 'get_runtime_build_info' callback.
3141 * object.c (mono_get_runtime_callbacks): New helper function to return
3142 the runtime callbacks.
3144 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Use the result of
3145 mono_get_runtime_build_info () as the display name.
3147 2009-09-03 Zoltan Varga <vargaz@gmail.com>
3149 * marshal.c (emit_marshal_array): Call conv.ovf.i on the array parameter
3150 argument, since NEWARR expects a native int. Fixes #481559.
3152 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
3154 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Guard
3155 against broken SRE methods.
3157 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
3159 * class.c (mono_type_get_full): Don't call mono_metadata_free_type on
3160 a NULL variable. Abort early on failure.
3162 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
3164 * class.c (can_access_type): Fail visibility test for non nested
3165 types with nested visibility.
3167 2009-09-02 Sebastien Pouliot <sebastien@ximian.com>
3169 * assembly.c (parse_public_key): Avoid allocating (and not
3170 freeing) the public key array when it's not requested by the
3172 * threads.c (mono_thread_manage, mono_thread_create_internal,
3173 ves_icall_System_Threading_Thread_Thread_internal): Free
3174 allocated memory on error.
3176 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
3178 * icall.c, icall-def.h: Remove some dead code from early SRE changes.
3180 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
3182 * class.c (mono_class_setup_fields): Remove duplicated local variable
3184 Rename gklass to gtd to reflect the fact that it points to the generic
3186 Remove the duplicated call to mono_class_setup_fields on gtd and move
3187 the error check to the beginning.
3189 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
3191 * marshal.c (mono_array_to_lparray): Do DISABLE_COM properly.
3192 Remove cruft of the previous patch.
3194 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
3196 * metadata-verify.c (verify_method_table): Check for abstract + final.
3199 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
3201 * verify.c (verify_class_fields): Check for duplicate fields.
3203 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
3205 * metadata-verify.c: Verify the typeref table for duplicates.
3207 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
3209 This reverts r140936 and properly handles interfaces with static methods. The
3210 right fix is to ensure vtables without bubles which is an easier to verify
3211 constraint. We should avoid such special cases as of the reverted patch as those
3212 only make the runtime more brittle.
3214 * class.c (mono_class_setup_vtable_general): Revert previous change that handle
3215 static methods on interfaces.
3217 * class.c (setup_interface_offsets): Use the number of virtual methods when
3218 calculating interface offsets instead of the number of methods. This way we
3219 avoid bubles on the layout.
3221 2009-08-31 Rodrigo Kumpera <rkumpera@novell.com>
3223 * metadata-verify.c (verify_metadata_header): Some very smart
3224 obfuscators like to add extra stream headers. Ignore them.
3226 2009-08-30 Zoltan Varga <vargaz@gmail.com>
3228 * class.c (mono_class_setup_vtable_general): Verify interfaces with static
3231 2009-08-29 Rodrigo Kumpera <rkumpera@novell.com>
3233 * metadata-verify.c: Verify for duplicated types.
3235 2009-08-28 Rodrigo Kumpera <rkumpera@novell.com>
3237 * metadata-verify.c (verify_typedef_table): Verify for nested types
3238 without an entry on the nested class table.
3240 2009-08-28 Zoltan Varga <vargaz@gmail.com>
3242 * cominterop.c (cominterop_get_ccw): Applied patch from tom hindle
3243 <tom_hindle@sil.org>. Add locking around hash table accesses.
3245 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3247 * verify.c (mono_verifier_verify_class): Verify all interface if
3248 really are interfaces. Fixes #534184.
3250 2009-08-27 Rodrigo Kumpera <rkumpera@novell.com>
3252 * pedump.c: Initialize all types during metadata validation so we report
3253 errors only detected as part of class initialization.
3255 2009-08-26 Rodrigo Kumpera <rkumpera@novell.com>
3257 * metadata-verify.c (verify_method_table): PInvoke requires method to
3258 be static. Fixes #534189
3260 2009-08-26 Zoltan Varga <vargaz@gmail.com>
3262 * threads.c (mono_thread_suspend_all_other_threads): Handle 'threads_starting_ip'
3265 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3267 * class.c (mono_class_setup_vtable_general): Verify the resulting vtable
3268 for holes or bad methods. Fixes #525314.
3270 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3272 * class.c (setup_interface_offsets): Don't allocate slot
3273 for the same interface multiple times. This creates bubbles
3274 that waster space and make vtable verification harder.
3276 The same interface get a slot multiple times since we need
3277 to get the closure of all implemented interfaces, which means
3278 the same interface is reported multiple times.
3280 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3282 * verify.c (mono_verifier_verify_class): Don't check the fields
3283 of generic instances since the context on which they got expanded
3284 might lead to false positives.
3286 Such thing happens when a generic type is inflated in the context
3287 of a generic method and the inflated type of a field turns into a
3288 generic method argument, which causes the checking code to think
3289 it's an invalid class when it's not.
3291 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3293 * verify.c (mono_type_is_valid_in_context): Verify if type
3294 is NULL and remove duplicate test.
3296 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3298 * verify.c (mono_verifier_verify_class): Check fields for
3299 invalid generic arguments.
3301 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3303 * class.c (verify_class_overrides): Verify if for static
3304 and non virtual methods.
3306 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3308 * icaa.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor):
3309 Check for errors after retrieving the vtable.
3311 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3313 * class.c (mono_class_setup_vtable_general): Verify
3314 if method overrides are valid before processing them.
3316 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3318 * marshal.c (mono_array_to_lparray): Fix minimal build with
3319 cominterop disabled.
3321 * marshal.c (mono_free_lparray): Same.
3323 2009-08-21 Mark Probst <mark.probst@gmail.com>
3325 * threadpool.c (mono_thread_pool_init): Use mono_object_hash() as
3326 the hash function for the ares_htable.
3328 2009-08-20 Rodrigo Kumpera <rkumpera@novell.com>
3330 * metadata-verify.c (verify_assembly_table): Accept 0x10 as a valid
3331 bit for assembly flags. MS is ok with it but there is no spec anywhere
3334 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3336 * class.c (mono_class_create_from_typedef): Emit profiler events
3339 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3341 * icall.c (ves_icall_Type_GetMethodsByName): Don't leak loader errors.
3342 Release memory on failure.
3344 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3346 * class-internals.h: Add mono_metadata_load_generic_param_constraints_full
3347 to the internal API.
3349 * metadata.c (get_constraints): Use a single-linked table as we don't
3350 traverse it backward. Fail and return FALSE if only of the contraint types
3353 * metadata.c (mono_metadata_load_generic_param_constraints_full): Identical
3354 to mono_metadata_load_generic_param_constraints except for having a return value.
3355 This has to be done since the later is part of the public API.
3357 * class.c (mono_class_create_from_typedef): Properly check the loading of constrains
3360 * loader.c (mono_get_method_from_token): Properly check the loading of constraints
3361 and fail the method.
3363 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3365 * metadata-verify.c (is_valid_method_header): Add work-around to deal
3366 with MS broken behavior of emmitting EH section sizes without the
3369 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3371 * metadata.c (mono_type_create_from_typespec): Don't allocate image
3372 memory until we're sure that we'll need it. This avoids leaking for
3373 broken types or duplicated instantiation.
3375 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3377 * metadata-verify.c (is_valid_method_header): Fix stupid formating
3380 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3382 * metadata-verify.c (is_valid_method_header): Fix number of clauses
3383 and expected size calculation.
3385 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3387 * class.c (mono_class_get_field_idx): Add fixme for broken
3388 behavior for types with multiple fields with the same name.
3389 I would rather fix it, but have no idea on how to generate
3390 such artifact for testing.
3392 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3394 * verify.c (verifier_load_field): We should allow references to
3395 fields to be made using the generic type definition. It's up to
3396 the loader system to fail invalid ops.
3398 * verify.c (get_boxable_mono_type): Only uninstantiated GTDs
3401 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3403 * class.c: Fix usage of mono_metadata_interfaces_from_typedef_full.
3405 * metadata-internals.h: Fix declaration of
3406 mono_metadata_interfaces_from_typedef_full.
3408 * metadata.c (mono_metadata_interfaces_from_typedef_full): Add extra
3409 heap_alloc_result parameter that controls if the result should be
3412 * metadata.c (mono_metadata_interfaces_from_typedef): Let the resulting
3413 array be g_malloc'd and properly document this public API function.
3415 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3417 * cil-coff.h: Fix METHOD_HEADER_FORMAT_MASK to be 2 bits and
3418 remove METHOD_HEADER_TINY_FORMAT1.
3420 * reflection.c: Remove reference to METHOD_HEADER_TINY_FORMAT1.
3422 * metadata.c (mono_metadata_parse_mh_full): Kill tiny format1.
3424 Both spec and MS uses only 2 bits to enumerate the kind of header.
3425 So given that 0x6 and 0x2 are equal under a 2 bits mask, tiny format1
3426 is superfluous, only used for tiny headers with odd code lengths.
3428 This change also make sure that mono doesn't wronly interpret bit 2
3429 of fat header flags, which is currently reserved.
3431 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3433 * metadata.c (do_mono_metadata_parse_type): Do error
3434 checking for element types. Don't abort if presented
3435 with a broken type kind.
3437 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3439 * metadata.c (mono_metadata_parse_method_signature_full):
3440 Gracefully fail bad vararg signatures.
3442 2009-08-18 Christian Hergert <chris@dronelabs.com>
3445 * class.c: Fix warnings for uninitialized variables.
3447 2009-08-18 Christian Hergert <chris@dronelabs.com>
3449 * icall.c: Fix _NSGetEnviron method declaration warning.
3451 2009-08-18 Christian Hergert <chris@dronelabs.com>
3454 * reflection.c: Make bitwise checks explicit.
3456 2009-08-18 Christian Hergert <chris@dronelabs.com>
3459 * marshal.c: Fix printf warnings.
3461 2009-08-18 Zoltan Varga <vargaz@gmail.com>
3463 * reflection.c (encode_cattr_value): Fix a warning.
3465 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3467 * metadata.c (mono_metadata_parse_array_full): Fix memory leak
3470 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3472 * loader.c (mono_method_signature): Don't assert on broken
3473 signature. Print a more useful error message.
3475 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3477 * loader.c (mono_method_get_marshal_info): Assert if
3478 signature is invalid. Bounds check stores to the
3481 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3483 * loader.c (field_from_memberref): Fix warning.
3485 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3487 * loader.c (mono_method_get_param_names): Check if signature
3488 is null. Don't store beyond the size of the name array.
3490 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3492 * loader.c (mono_get_method_constrained): Check if signature
3495 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3497 * loader.c (mono_loader_set_error_bad_image): Improve
3500 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3502 * loader.c (mono_get_method_full): Convert an assertion
3503 into a loader error.
3505 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3507 * class-internals.h, class.c: Better naming and documentation.
3509 2009-08-17 Zoltan Varga <vargaz@gmail.com>
3511 * boehm-gc.c (mono_gc_add_weak_track_handle): Don't do any work if
3514 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3516 * loader.c (mono_method_get_signature_full): Fail gracefully if signature
3519 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3521 * loader.c (mono_loader_error_prepare_exception): Handle missing field
3522 errors with no class set.
3524 * loader.c (field_from_memberref): If the field signature is of the wrong
3525 type fail with a MissingFieldException instead of a BadImageException as
3526 this is the behavior observed on MS.
3528 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3530 * loader.c (field_from_memberref): Don't crash if either the field
3531 signature or the typespec class are invalid.
3533 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3535 * verify.c (verifier_load_field): Don't allow field related
3536 ops to reference fields on generic type definition.
3538 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3540 * metadata-verify.c: Add new warning level for errors specified
3541 by ECMA 335 but that MS ignores.
3543 * metadata-verify.c (verify_method_table): Make compiler controled
3544 visibility + (rt)specialname error a warning as MS ignores this. Ignoring
3545 this check is safe because the end result will only be some visibility
3546 exceptions been thrown.
3548 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3550 * verify.c (get_boxable_mono_type): Don't allow the
3551 use of the generic type definition on boxed type positions.
3555 2009-08-14 Mark Probst <mark.probst@gmail.com>
3557 * threadpool.c: Make sure no cross-domain references remain in
3558 ares_htable or the arrays that are thrown away when resizing.
3560 2009-08-14 Mark Probst <mark.probst@gmail.com>
3562 * appdomain.c, metadata-internals.h, image.c: In MonoImage add a
3563 list of classes for which we have to unregister reflection_info
3564 with the GC and which are not in the namespace cache.
3566 * reflection.c (mono_reflection_initialize_generic_parameter): Add
3567 the class to the list.
3569 2009-08-14 Mark Probst <mark.probst@gmail.com>
3571 * domain.c (mono_domain_free): Unregister the GC roots in
3574 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
3576 * reflection.c (mono_reflection_type_get_handle): Fix typo.
3578 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
3580 * class.c: Add mono_class_get_field_from_name_full which does
3581 the same as mono_class_get_field_from_name but does check field
3584 * class-internals.h: Export mono_class_get_field_from_name_full as
3585 part of the internal API.
3587 * loader.c (field_from_memberref): Search fields by name and signature
3588 as it's valid to have two fields with same name but different types.
3592 2009-08-10 Rodrigo Kumpera <rkumpera@novell.com>
3594 * icall-def.h: Add a bunch of temporary icalls to MonoGenericClass.
3596 * reflection.c (mono_reflection_type_get_handle): Handle MonoGenericClass.
3598 * reflection.c (encode_cattr_value): Use mono_reflection_type_get_handle to encode
3601 2009-08-13 Zoltan Varga <vargaz@gmail.com>
3603 * gc.c (GCHandle_CheckCurrentDomain): Moved this here from icall.c.
3605 * boehm-gc.c (mono_gc_add_weak_track_handle): Handle nulls.
3607 2009-08-12 Mark Probst <mark.probst@gmail.com>
3609 * sgen-gc.c, sgen-scan-object.h: Object scanning code factored out
3610 to sgen-scan-object.h, which can be included and parameterized via
3613 * Makefile.am: sgen-scan-object.h added.
3615 2009-08-12 Mark Probst <mark.probst@gmail.com>
3617 * gc.c: #define GC_dont_gc if we're compiling with SGen.
3619 2009-08-12 Mark Probst <mark.probst@gmail.com>
3621 * domain.c (mono_domain_free): Free a domain's mono_g_hash_tables
3622 before clearing a domain in the GC.
3624 2009-08-12 Mark Probst <mark.probst@gmail.com>
3626 * exception.c (mono_exception_from_name_domain): Actually create
3627 the exception in the specified domain.
3629 * appdomain.c (mono_domain_create_appdomain_internal): Create the
3630 OutOfMemoryException a bit later so that the domain is inialized
3631 "enough" that it works.
3633 2009-08-12 Mark Probst <mark.probst@gmail.com>
3635 * threads.c (thread_cleanup): Clean up the cached_culture_info
3636 array to prevent cross-domain references.
3638 Tue Aug 11 14:38:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
3640 * metadata.c: more documentation for MonoType accessors.
3642 2009-08-11 Raja R Harinath <harinath@hurrynot.org>
3644 Fix incorrect size definitions where the tail array isn't a list
3646 * class-internals.h (MONO_SIZEOF_MARSHAL_TYPE): Use offsetof to
3648 * domain-internals.h (MONO_SIZEOF_JIT_INFO): Likewise.
3649 * metadata.h (MONO_SIZEOF_TYPE): Likewise.
3650 * reflection.h (MONO_SIZEOF_CUSTOM_ATTR_INFO): Likewise.
3652 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3655 * reflection.c: MONO_SIZEOF_CUSTOM_ATTR_INFO.
3657 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3661 * metadata-internals.h:
3663 * reflection.c: use MONO_SIZEOF_METHOD_HEADER.
3665 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3672 * reflection.c: #define for sizeof in MonoType and
3673 MonoMethodSignature.
3675 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3678 * domain-internals.h: add and use #define's instead of sizeof()
3679 for MonoJitInfo and MonoJitInfoTable.
3681 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3684 * class.h: use #define instead of sizeof() for MonoRemoteClass.
3686 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
3691 * class-internals.h:
3692 * generic-sharing.c:
3693 * marshal.c: use a #define instead of sizeof() for a few
3694 structures that use a zero-length array.
3696 2009-08-06 Rodrigo Kumpera <rkumpera@novell.com>
3698 * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Add new fields
3699 to handle inflated generic methods.
3701 * appdomain.c: Bump corlib version.
3703 * reflection.c (mono_image_get_method_on_inst_token): Handle generic method
3706 * reflection.c (fixup_method): Same
3708 * reflection.c (resolve_object): Same.
3710 * reflection.c (inflate_method): Replace a g_assert_not_reached with a
3711 g_error and a decent message.
3713 2009-08-06 Massimiliano Mantione <massi@ximian.com>
3715 * bohem-gc.c (mono_gc_add_weak_track_handle): Get the domain
3716 from the object because it could not yet be available globally
3717 (it happens if the profiler tries to create a gchandle on the
3718 MonoThread object of a thread that is still registering itself
3721 2009-08-04 Rodrigo Kumpera <rkumpera@novell.com>
3723 * reflection.c (mono_generic_class_get_object): Initialized the
3724 managed type arguments array.
3726 * object-internals.h (MonoReflectionGenericClass): Add type_arguments field.
3728 * appdomain.c: Bump corlib version.
3730 2009-08-04 Zoltan Varga <vargaz@gmail.com>
3732 * threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
3735 2009-08-03 Zoltan Varga <vargaz@gmail.com>
3737 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
3738 Avoid a crash if synch_cs is not set.
3740 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
3741 Handle the case when the handle is 0.
3743 * appdomain.c: Bump corlib version.
3745 2009-08-02 Zoltan Varga <vargaz@gmail.com>
3747 * reflection.c (mono_type_get_object): Fix a warning.
3749 2009-08-01 Mark Probst <mark.probst@gmail.com>
3751 * sgen-gc.c (mono_gc_wbarrier_value_copy): Don't compute the GC
3752 descriptor here. We assume it's already been computed.
3754 * generic-sharing.c (instantiate_other_info): Compute the GC
3755 descriptor for info type MONO_RGCTX_INFO_KLASS.
3757 2009-08-01 Mark Probst <mark.probst@gmail.com>
3759 * reflection.c (mono_type_get_object): MonoDomain is an unmanaged
3760 type, so don't use MONO_OBJECT_SETREF to set a field.
3762 2009-08-01 Mark Probst <mark.probst@gmail.com>
3764 * gc.c: We were missing one case where invoking a finalizer would
3765 not reset the domain. Also, in the finalizer thread loop, assert
3766 that we're in the root domain.
3768 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
3770 * icall.c (ves_icall_MonoType_GetArrayRank): Throw ArgumentException
3771 if the type is not an array.
3773 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
3775 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Return the
3776 method bound to the declaring type of the method. Raise an exception
3777 if the type is not a generic param.
3779 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
3781 * class.c (print_unimplemented_interface_method_info): Print the
3784 * class.c (mono_class_setup_vtable_general): When dealing with a
3785 generic instance first check if the generic type definition is
3788 2009-02-11 Tom Hindke <tom_hindle@sil.org>
3790 * marshal.c (mono_array_to_lparray): Implemented so managed object types are converted to native types.
3792 * marshal.c: Added new method mono_free_lparray to free memory allocated by mono_array_to_lparray
3794 * marshal.c (emit_marshal_array): call emit mono_free_lparray where approprate.
3796 * marshal.c (conv_to_icall): added MONO_MARSHAL_FREE_LPARRAY case
3798 * metadata.h (MonoMarshalConv enum): added MONO_MARSHAL_FREE_LPARRAY
3800 Code is contributed under MIT/X11 license
3802 2009-08-30 Rodrigo Kumpera <rkumpera@novell.com>
3804 * verify.c: Fix naming of stelem and ldelem.
3806 2009-07-30 Mark Probst <mark.probst@gmail.com>
3808 * generic-sharing.c: Replace the templates lock with the loader
3809 lock because of very hard to resolve deadlock issues.
3811 2009-07-30 Zoltan Varga <vargaz@gmail.com>
3813 * icall.c (ves_icall_Type_GetMethodsByName): Use
3814 mono_class_get_vtable_size () instead of accessing klass->vtable_size
3815 directly. Fixes #525338.
3817 * class.c (mono_class_get_vtable_size): New helper function.
3819 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*. Check whenever
3820 the field belongs to the type. Fixes #525733.
3822 2009-07-30 Mark Probst <mark.probst@gmail.com>
3824 * sgen-gc.c: When we stop a thread and its stack top is not within
3825 its allocated stack (because it's in an altstack signal handler),
3826 restart it and stop it again, until it is.
3828 2009-07-30 Mark Probst <mark.probst@gmail.com>
3830 * sgen-gc.c: Take a thread's stack top and registers from the
3831 sigcontext in the suspend signal handler.
3833 * sgen-gc.h, sgen-archdep.h, Makefile.am: Move arch-dependent
3834 stuff to sgen-archdep.h.
3836 * gc.c, gc-internal.h: Remove the get_ip_from_sigctx installer and
3837 caller, because have code in sgen-archdep.h to acquire that data.
3839 2009-07-29 Massimiliano Mantione <massi@ximian.com>
3841 * profiler.c, profiler.h, profiler-private.h:
3842 Added support for keeping track of code chunks and buffers.
3844 2009-07-29 Rodrigo Kumpera <rkumpera@novell.com>
3846 * metadata-verify.c: Fix endianness problems on decoding functions.
3847 Based on a patch by Ulrich Weigand <uweigand@de.ibm.com>
3849 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
3851 * icall.c (ves_icall_Type_make_array_type): Handle the new encoding
3852 schema for vectors and one dimension SZARRAY.
3854 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
3856 * reflection.c (mono_reflection_type_get_handle): Handle the new encoding
3857 schema for vectors and one dimension SZARRAY.
3859 2009-07-27 Mark Probst <mark.probst@gmail.com>
3861 * icall-def.h, thread-types.h, threads.c: New separate icalls for
3862 Interlocked.(Compare)Exchange with object arguments, which invoke
3865 2009-07-26 Miguel de Icaza <miguel@novell.com>
3867 * icall.c (ves_icall_Type_GetNestedType): Throw an exception when
3868 passed invalid arguments. Fixes another crasher in the
3869 Silverlight test suite.
3871 * class.c (mono_class_array_element_size): Return 0 for the size
3872 of the class; This fixes the crasher exposed by :
3874 typeof (void).MakeArrayType ();
3876 * icall.c (ves_icall_MonoType_GetEvent): Do not dereference method
3877 if there is no method to dereference. Put all the code that
3878 depends on this inside the if (method) block.
3880 This fixes the crasher exposed by Microsoft's Silvelright CLR test
3881 suite ./Reflection/Emit/TypeBuilder/TypeBuilderGetEvent.exe
3883 With this change, we pass the test.
3885 * reflection.c (mono_reflection_sighelper_get_signature_local):
3886 Only dereference the assembly if it has been set. Fixes a
3887 crasher exposed by #525328
3889 2009-07-25 Mark Probst <mark.probst@gmail.com>
3891 * sgen-gc.c, object.h, null-gc.c, boehm-gc.c, marshal.c: Really
3892 don't perform the store in mono_gc_wbarrier_generic_nostore().
3893 Remove the second argument (value), which is not needed.
3895 2009-07-24 Zoltan Varga <vargaz@gmail.com>
3897 * null-gc.c (mono_gc_wbarrier_generic_nostore): Define this to fix
3900 * boehm-gc.c: Ditto.
3902 2009-07-24 Mark Probst <mark.probst@gmail.com>
3904 * sgen-gc.c, marshal.c, object.h: Make the managed write barrier
3905 not perform the store itself. Introduce
3906 mono_gc_wbarrier_generic_nostore(), which is the same as
3907 mono_gc_wbarrier_generic_store(), except it doesn't perform the
3910 2009-07-24 Mark Probst <mark.probst@gmail.com>
3912 * icall.c (ves_icall_System_Array_SetGenericValueImpl):
3913 mono_gc_wbarrier_value_copy() doesn't perform the copy itself, so
3914 we still need the memcpy().
3916 2009-07-22 Mark Probst <mark.probst@gmail.com>
3918 * sgen-gc.c: Align array bounds calculation to mono_array_size_t
3919 so that big arrays are handled correctly. Always use
3920 safe_object_get_size() to calculate array object sizes, which
3921 takes bounds into account.
3923 2009-07-22 Mark Probst <mark.probst@gmail.com>
3925 * sgen-gc.c (mono_gc_wbarrier_value_copy): Make sure the class's
3926 GC descriptor is computed before we use it.
3928 2009-07-22 Mark Probst <mark.probst@gmail.com>
3930 * icall.c (ves_icall_System_Array_SetGenericValueImpl): Use a
3931 write barrier if necessary.
3933 2009-07-22 Mark Probst <mark.probst@gmail.com>
3935 * icall-def.h, icall.c, thread-types.h: New separate icall for
3936 VolatileWrite(object&,object) that uses a write barrier.
3938 * console-unix.c, file-io.c, icall.c, threads.c: Use write
3939 barriers in icalls which write to "ref" or "out" arguments.
3941 2009-07-21 Zoltan Varga <vargaz@gmail.com>
3943 * marshal.c (mono_marshal_get_runtime_invoke): Do the work done in the exception
3944 handler in a separate icall, to reduce the size of the wrappers.
3946 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
3948 * metadata-verify.c (is_valid_typespec_blob): Fix error message.
3950 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
3952 * metadata-verify.c (parse_field): Allow byref field.
3954 * metadata-verify.c (parse_locals_signature): Allow byref locals.
3956 * metadata-verify.c (is_valid_typespec_blob): Allow byref typespec.
3958 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
3960 * verify.c (do_cast): Fail for any non reference type that isn't boxed.
3963 2009-07-20 Robert Jordan <robertj@gmx.net>
3965 * cominterop.c (cominterop_get_managed_wrapper_adjusted):
3966 Fix invalid IL in valuetype handling (STOBJ must push the
3967 corresponding class). Fixes bug #523149.
3969 Code is contributed under MIT/X11 license.
3971 2009-07-20 Geoff Norton <gnorton@novell.com>
3973 * gc.c: Use proper semaphores where available on posix and darwin.
3975 2009-07-19 Geoff Norton <gnorton@novell.com>
3977 * gc.c: Unnamed posix semaphores are broken on darwin-arm too.
3979 2009-07-19 Rodrigo Kumpera <rkumpera@novell.com>
3981 * refletion.c (is_sre_usertype): Change name to is_usertype and
3982 invert it's result so it returns true if the type is an user type
3983 and not the opposite.
3985 * reflection.c (is_*_type): Change all of those to use new macro
3986 check_corlib_type_cached that cached the type lookup so we don't
3987 need to do string comparisons all the type. Changed the signature
3988 to take a MonoClass instead.
3990 * reflection.c: Change mono_image_create_token and resolve_object
3991 to use is_sre_* functions.
3993 2009-07-18 Mark Probst <mark.probst@gmail.com>
3995 * sgen-gc.c: Check for writes to the stack in the managed
3998 2009-07-18 Mark Probst <mark.probst@gmail.com>
4000 * sgen-gc.c: When a thread is unregistered, don't free its remsets
4001 but put them on a list which is processed with the other thread's
4004 2009-07-18 Mark Probst <mark.probst@gmail.com>
4006 * sgen-gc.c: Fix and enable the internal allocator instead of
4007 using malloc/free (which causes deadlocks).
4009 2009-07-16 Rodrigo Kumpera <rkumpera@novell.com>
4011 * refletion.c: Fix builds with SRE disabled by adding a minimal
4012 implementation of mono_reflection_type_get_handle.
4014 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
4016 * refletion.c: Make mono_reflection_type_get_handle non static.
4018 * object-internals.h: Export mono_reflection_type_get_handle.
4020 * icall.c (ves_icall_MonoGenericClass_InflateType): Resolve the
4021 unmanaged handle using mono_reflection_type_get_handle.
4023 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
4025 * refletion.c: Replace all reads of MonoReflectionType::type with
4026 calls to mono_reflection_type_get_handle. Only the functions that
4027 deal with constructing TypeBuilder::type have not been changed
4028 because they have to deal with NULL values.
4030 This is a first step into supporting reflection types that don't
4031 map directly into their unmanaged counterpart.
4033 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
4035 * metadata-verify.c (parse_locals_signature): Don't complain
4036 on signature with zero locals since MS generates it and doesn't
4039 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
4041 * reflection.c (mono_image_get_array_token): Resolve return
4042 type using mono_reflection_type_get_handle.
4044 * reflection.c (mono_image_get_array_token): Resolve array method
4045 parent type using mono_reflection_type_get_handle.
4047 2009-07-14 Zoltan Varga <vargaz@gmail.com>
4049 * reflection.c (mono_image_basic_init): Applied patch from
4050 <Dax@daxxfiles.net>. Set the public key token from the assembly
4051 builder. Fixes #518909.
4053 * appdomain.c: Bump corlib version.
4055 2009-07-13 Zoltan Varga <vargaz@gmail.com>
4057 * class.c (mono_class_needs_cctor_run): Make this return false if
4058 the class has no cctor.
4060 2009-07-13 Mark Probst <mark.probst@gmail.com>
4062 * sgen-gc.c: When the minor GC needs to allocate a new section,
4063 invoke the major GC afterwards.
4065 2009-07-14 Bill Holmes <billholmes54@gmail.com>
4067 * process.c (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal) :
4068 Applying the window_style field to the SHELLEXECUTEINFO struct.
4070 Code is contributed under MIT/X11 license.
4072 2009-07-13 Mark Probst <mark.probst@gmail.com>
4074 * sgen-gc.c: Fix the race condition in the unmanaged allocator by
4075 locking earlier. Fix it in the managed allocator by making sure
4076 that no thread is stopped there before the GC runs. If we do stop
4077 a thread there, we restart it and let it run a but, until it stops
4080 * gc-internal.h, gc.c: Function for getting the IP from a signal
4081 context via a function registered by mini.
4083 2009-07-11 Zoltan Varga <vargaz@gmail.com>
4085 * object-internals.h (MonoIntPtr): New structure describing a boxed
4088 * object.c (mono_runtime_invoke_array): Handle ptr arguments and
4089 returns. Fixes #519953.
4091 * marshal.c (mono_marshal_get_runtime_invoke): Handle pointer returns.
4093 2009-07-09 Mark Probst <mark.probst@gmail.com>
4095 * class-internals.h, generic-sharing.c: New RGCTX info type for
4096 getting a remoting invoke with check wrapper.
4098 2009-07-07 Geoff Norton <gnorton@novell.com>
4100 * icall-def.h: Fix the enable-minimal build.
4102 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
4104 * object-internals.h: Add MonoReflectionDerivedType.
4106 * reflection.c: Implement support for PointerType.
4107 Fixed tons of warnings.
4109 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
4111 * object-internals.h: Add MonoReflectionByRefType.
4113 * reflection.c: Implement support for ByRefType.
4115 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
4117 * icall-def.h: Add System.Reflection.Emit.DerivedType::create_unmanaged_type.
4119 * object-internals.h: Add MonoReflectionArrayType and
4120 mono_reflection_create_unmanaged_type.
4122 * reflection.c: Implement support for ArrayType.
4124 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
4126 * metadata-verify.c (is_valid_method_header): Parse EH block
4129 2009-07-03 Mark Probst <mark.probst@gmail.com>
4131 * sgen-gc.c (finish_gray_stack): Set the to_space pointer after
4132 processing the disappearing links, and process disappearing links
4133 in a loop until no new objects are copied.
4135 2009-07-03 Mark Probst <mark.probst@gmail.com>
4137 * object.c (handle_enum): Invoke the write barrier when copying
4138 value type instances.
4140 * sgen-gc.c: Register remsets for unmanaged write barriers only
4141 when the address written to is actually on the heap. This makes
4142 set_value() in object.c work without requiring that the result be
4145 2009-07-02 Rodrigo Kumpera <rkumpera@novell.com>
4147 The runtime wrappers are all bound to a given type that must
4148 exist in the same image. For regular images we use the <Module>
4149 type, which is required to exist for all images.
4151 The <Module> type can't be used for dynamic images because it
4152 might not exist at the time the wrapper is required, so we create
4153 a synthetic type to use instead.
4155 The current code works because of the 2 stage setup of MonoClass,
4156 but once this is gone it will no longer work.
4158 * icall-def.h: Add ModuleBuilder::set_wrappers_type.
4160 * metadata-internals.h (MonoDynamicImage): Add wrappers_type.
4162 * object-internals.h: Export mono_image_set_wrappers_type icall
4163 as part of the internal API.
4165 * marshal.c (get_wrapper_target_class): If the image is dynamic,
4166 use MonoDynamicImage::wrappers_type instead of the <Module> type.
4168 reflection.c: Add mono_image_set_wrappers_type qhixh sets the dynamic
4169 image wrappers_type to the provided value.
4171 2009-07-01 Rodrigo Kumpera <rkumpera@novell.com>
4173 * appdomain.c (deregister_reflection_info_roots): No need
4174 to use the image lock here.
4176 2009-07-02 Mark Probst <mark.probst@gmail.com>
4178 * sgen-gc.c (collect_nursery): Also scan from write-barrier roots.
4180 2009-06-29 Zoltan Varga <vargaz@gmail.com>
4182 * threads.c: Store the thread start argument in a hash table instead of
4183 registering it as a root, as libgc doesn't support unregistering roots
4184 under windows, leading to 'too many root sets' errors when many threads
4187 * gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
4188 shutdown, they can still be referenced by the other dying objects.
4191 2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
4193 * socket-io.c: DontLinger does not allow LingerOptions.
4195 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
4197 * metadata-verify.c: The spec doesn't mention that it's possible to add
4198 custom attribute to a generic parameter. Fixed.
4200 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
4202 * class.c (inflate_generic_type): Don't crash while trying to output a message
4203 on why we're aborting.
4205 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
4207 * socket-io.c: DontLinger can take an int or a boolean too.
4209 Fri Jun 26 17:00:04 CEST 2009 Paolo Molaro <lupus@ximian.com>
4211 * gc.c: check for a null argument to SuppressFinalize () and
4212 ReRegisterForFinalize ().
4214 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
4216 * loader.c (method_from_methodspec): Call into the verifier to check
4219 * metadata-verify.c: Addmono_verifier_verify_methodspec_signature.
4221 * verify-internals.h: Export mono_verifier_verify_methodspec_signature as
4222 part of the internal API.
4224 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4226 * metadata.c (mono_type_create_from_typespec): Call into the verifier to check
4229 * metadata-verify.c: Add mono_verifier_verify_typespec_signature.
4231 * verify-internals.h: Export mono_verifier_verify_typespec_signature as
4232 part of the internal API.
4234 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4236 * metadata.c (mono_metadata_parse_mh_full): Call into the verifier to check
4239 * metadata-verify.c: Add mono_verifier_verify_standalone_signature. Fix
4242 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
4243 part of the internal API.
4245 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4247 * metadata-verify.c: Use is_valid_blob_object to verify blob validity
4248 when doing basic verification.
4250 This check must be done since the runtime peeks into signatures in much
4251 more places than it does decoding so it makes sense to ensure that all
4252 pointers to blob objects are well formed.
4254 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4256 * metadata-verify.c (is_valid_blob_object): Add extra minsize argument.
4257 Use proper overflow dectection. Fix usage of it.
4259 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4261 * loader.c (field_from_memberref): Call into the verifier to check
4264 * loader.c (mono_method_get_signature_full): Same.
4266 * loader.c (method_from_memberref): Same.
4268 * metadata-verify.c: Add mono_verifier_verify_memberref_signature.
4270 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
4271 part of the internal API.
4273 2009-06-25 Mark Probst <mark.probst@gmail.com>
4275 * threadpool.c (mono_thread_pool_add): If the domain is unloading
4276 or unloaded, still return an AsyncResult, but don't add it to the
4279 2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
4281 * threads.c: fix missing colon when DEBUG is defined.
4283 2009-06-25 Mark Probst <mark.probst@gmail.com>
4285 * threadpool.c: Don't add new calls to a threadpool if the domain
4286 of the call is unloading or unloaded. When dequeuing a job, null
4287 the reference in the queue.
4289 2009-06-25 Mark Probst <mark.probst@gmail.com>
4291 * sgen-gc.c (null_link_in_range): Add the dislink for the old
4292 generation if an object was moved.
4294 2009-06-25 Sylvain Dupont <duposyl@gmail.com>
4296 * cominterop.h cominterop.c marshal.c: Added support for marshalling out
4297 parameters of type SAFEARRAY[VARIANT].
4299 * reflection.c (encode_marshal_blob): Properly generate element type
4300 (SafeArraySubType marshal attribute option).
4302 Code is contributed under MIT/X11 license.
4304 Thu Jun 25 15:48:09 CEST 2009 Paolo Molaro <lupus@ximian.com>
4306 * reflection.c: in mono_method_clear_object () really ensure all the
4307 objects are removed.
4309 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4311 * loader.c (mono_method_signature): Call into the verifier to check
4312 the method signature.
4314 * metadata-verify.c (verify_method_table): Move signature verification
4315 to verify_method_table_full.
4317 * metadata-verify.c: Add mono_verifier_verify_method_signature.
4319 * verify-internals.h: Export mono_verifier_verify_method_signature as
4320 part of the internal API.
4322 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4324 * loader.c (mono_method_get_header): Call into the verifier to
4325 check the method header.
4327 * metadata-verify.c: Add mono_verifier_verify_method_header.
4329 * verify-internals.h: Export mono_verifier_verify_method_header as
4330 part of the internal API.
4332 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4334 * class.c (mono_class_find_enum_basetype): Call into the verifier to
4335 check the field signature. Replace an assert with an explicit check.
4337 * class.c (mono_class_setup_fields): Call into the verifier to check
4338 the field signature.
4340 * metadata-verify.c: Add mono_verifier_verify_field_signature.
4342 * verify-internals.h: Export mono_verifier_verify_field_signature as
4343 part of the internal API.
4345 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4347 * class.c (mono_class_find_enum_basetype): Simplify this function
4348 by moving code outside of the loop and not decoding static fields.
4350 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4352 * metadata-verify.c (verify_typedef_table): Check the extends
4353 token here. Move to here a flags check from verify_typedef_table_full.
4355 2009-06-24 Zoltan Varga <vargaz@gmail.com>
4357 * metadata-verify.c (is_valid_method_header): Fix a warning.
4359 * metadata-internals.h (MonoImage): Remove the unused
4360 static_rgctx_invoke_wrapper_cache.
4362 * image.c marshal.c: Ditto.
4364 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
4366 * image.c (do_mono_image_load): Enable table data verification.
4368 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
4370 * metadata-verify.c (is_valid_constant): Fix nullref check.
4372 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
4374 * metadata-verify.c (is_valid_constant): Fix string bounds check.
4376 2009-06-22 Mark Probst <mark.probst@gmail.com>
4378 * sgen-gc.c: Managed allocation with pthreads TLS.
4380 * threads.c, threads-types.h: Functions for the JIT to tell the
4381 runtime whether it supports the MONO_TLS opcode.
4383 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
4385 * metadata-verify.c (verify_param_table): Fix a crash for assemblies
4388 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
4390 * metadata-verify.c (is_valid_constant): Fix the string length check.
4391 Use safe overflow checking. Add decent error messages.
4393 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
4395 * metadata-verify.c: Move remaininh blob checks to the offline
4398 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
4400 * metadata-verify.c: Move more blob checks to the offline verification
4403 2009-06-22 Bill Holmes <billholmes54@gmail.com>
4405 * object-internals.h : Adding interrupt_on_stop field.
4407 * threads.c (mono_thread_request_interruption) : On Windows exit the
4408 thread if interrupt_on_stop is set.
4410 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
4411 Removing old interrupt logic and setting the interrupt_on_stop for the
4412 thread when calling accept.
4414 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
4415 setting the interrupt_on_stop for the thread when calling accept.
4417 Contributed under MIT/X11 license.
4419 2009-06-20 Martin Baulig <martin@ximian.com>
4421 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 3.
4423 2009-06-21 Zoltan Varga <vargaz@gmail.com>
4425 * appdomain.c (mono_try_assembly_resolve): Don't call managed code when
4426 running in no-exec mode.
4428 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4430 * metadata-verify.c (verify_method_table): Move header
4431 checking to verify_method_table_full.
4433 * metata-verify.c (mono_verifier_verify_full_table_data):
4434 Call verify_method_table_full.
4436 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4438 * metadata-verify.c (verify_field_table): Move signature
4439 checking to verify_field_table_full.
4441 * metata-verify.c (mono_verifier_verify_full_table_data):
4442 Call verify_field_table_full.
4444 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4446 * metadata-verify.c (verify_typedef_table): Move remaining
4447 stuff to verify_typedef_table_full.
4449 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4451 * metadata-verify.c: Kill is_corlib from VerifyContext.
4452 It is only used by the offline mode.
4453 So we better remove it from the runtime path.
4455 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4457 * metadata-verify.c: Add new mono_verifier_verify_full_table_data
4458 function that perform the offline metadata verification steps.
4460 * metadata-verify.c (verify_typedef_table): Move some checks to
4461 verify_typedef_table_full and make it been called by new function
4462 mono_verifier_verify_full_table_data.
4464 * pedump.c: Call mono_verifier_verify_full_table_data.
4466 * verify-internals.h: Export mono_verifier_verify_full_table_data as
4467 part of the internal API.
4469 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4471 * metadata-verify.c (typedef_is_system_object): Fix System.Object
4474 * metadata-verify.c (verify_implmap_table): Fix implmap invalid
4475 flags bits. SupportLastError was confused as bit 7 instead of 6.
4477 * metadata-verify.c (verify_implmap_table): Fix import scope verification
4478 to check against the module ref table instead of module.
4480 * metadata-verify.c (verify_implmap_table): Fix corlib check.
4482 * pedump.c: Call mono_image_load_names.
4484 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4486 * image.c: Extract mono_image_load_names from do_mono_image_load.
4488 * metadata-internals.h: Export mono_image_load_names as part of
4491 2009-06-19 Zoltan Varga <vargaz@gmail.com>
4493 * metadata.c (mono_metadata_cleanup): Free the generic method cache
4494 first, as it could reference data in the other caches.
4496 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
4498 * metadata-verify.c: Finished with method header verification.
4500 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
4502 * metadata-verify.c: Added more header verification code.
4503 Now only EH clauses are missing.
4505 2009-06-17 Zoltan Varga <vargaz@gmail.com>
4507 * marshal.c (get_runtime_invoke_type): Don't share primitive types
4510 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
4512 * metadata-verify.c: Initial method header verification.
4514 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
4516 * metadata-verify.c (verify_import_table): The IAT contents
4517 might end been patched by the windows DL when running with
4520 2009-06-15 Rodrigo Kumpera <rkumpera@novell.com>
4522 * class.c (mono_class_from_typeref): If the enclosing type is not
4523 found return null instead of crashing. Fixes #508487.
4525 2009-06-15 Atsushi Enomoto <atsushi@ximian.com>
4527 * normalization-tables.h : updated to the latest unicode charcter
4529 * appdomain.c : bump corlib version.
4531 2009-06-14 Zoltan Varga <vargaz@gmail.com>
4533 * class.c (mono_class_from_name): Fix support for assembly references
4534 in the EXPORTEDTYPE table. Fixes #511704.
4536 2009-06-13 Geoff Norton <gnorton@novell.com>
4538 * domain.c: Ensure that mono_domain_assembly_open actually opens the
4539 assembly in the target domain.
4541 2009-06-12 Robert Jordan <robertj@gmx.net>
4543 * cominterop.c (cominterop_get_ccw): Increment mspec's SizeParamIndex
4544 because "this" of the managed signature has become an
4545 ordinary parameter in the unmanaged signature.
4547 2009-06-12 Zoltan Varga <vargaz@gmail.com>
4549 * class-internals.h (struct _MonoGenericContainer): Add an 'image'
4550 field for owner-less generic containers.
4552 * reflection.c (mono_reflection_initialize_generic_parameter): Set the
4553 image field of the owner-less generic containers created here.
4555 * metadata.c (mono_metadata_load_generic_params): Ditto, the
4556 contain is ownerless until the caller sets its owner.
4558 * metadata.c (type_in_image): Handle owner-less generic containers
4561 2009-06-11 Zoltan Varga <vargaz@gmail.com>
4563 * image.c (mono_image_close): Support debug_assembly_unload for
4566 2009-06-11 Andrés G. Aragoneses <aaragoneses@novell.com>
4568 * class.c: Fix some typos in comments.
4570 2009-06-11 Zoltan Varga <vargaz@gmail.com>
4572 * reflection.c (add_custom_modifiers): Avoid reading invalid memory.
4574 * threads.c (mono_thread_execute_interruption): Avoid creating the
4575 abort exception object while holding the synch_cs lock.
4577 2009-06-10 Rodrigo Kumpera <rkumpera@novell.com>
4579 * metadata-verify.c: Verify basic cattr content.
4581 2009-06-10 Zoltan Varga <vargaz@gmail.com>
4583 * reflection.c (add_exported_type): Don't set the FORWARDER flag on
4586 * reflection.c (mono_image_fill_export_table_from_type_forwarders): Add
4587 support for nested types. Fixes #511704.
4589 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
4591 * metadata-verify.c: Verify methodspec signatures.
4593 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
4595 * metadata-verify.c: Verify typespec signatures.
4597 2009-06-09 Zoltan Varga <vargaz@gmail.com>
4599 * metadata.c (free_inflated_method): Call
4600 mono_marshal_free_inflated_wrappers (), which was missed earlier.
4602 2009-06-08 Miguel de Icaza <miguel@novell.com>
4604 * mono-config.c: Small change to report the PPC64/ILP32 model.
4606 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
4608 * metadata-verify.c (parse_type): Check szarray.
4610 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
4612 * metadata-verify.c (parse_type): Check fnptr.
4614 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
4616 * metadata-verify.c (parse_type): Check generic instances.
4618 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
4620 * metadata-verify.c (parse_type): Check array shape.
4622 2009-06-05 Robert Jordan <robertj@gmx.net>
4624 * class.c (mono_class_create_from_typedef): Check only for
4625 mscorlib's System.Array.
4627 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
4629 * metadata-verify.c (parse_type): Check pointer, class/valuetype
4632 * metadata-verify.c (parse_field): Check the signature.
4634 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
4636 * metadata-verify.c: Implement locals signature check.
4638 2009-06-04 Marek Safar <marek.safar@gmail.com>
4640 * domain.c: Add .NET 4.0 Beta 1 version.
4642 2009-06-04 Bill Holmes <billholmes54@gmail.com>
4644 * cominterop.c (cominterop_ccw_queryinterface): Fix for bug 499566.
4645 For QueryInterface on CCWs consider the base class
4648 Code is contributed under MIT/X11 license.
4650 2009-06-04 Zoltan Varga <vargaz@gmail.com>
4652 * wrapper-types.h: Delete STATIC_RGCTX_INVOKE.
4654 * marshal.c (mono_marshal_ret_static_rgctx_invoke): Remove, no longer
4657 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
4658 adding a static-rgctx invoke wrapper, it is done by the runtime trampolines.
4660 * generic-sharing.c (inflate_other_data): Ditto.
4662 2009-06-03 Rodrigo Kumpera <rkumpera@novell.com>
4664 * metadata-verify.c: Implement property signature check.
4666 2009-06-04 Mark Probst <mark.probst@gmail.com>
4668 * sgen-gc.h: Register saving support for PPC.
4670 2009-06-04 Mark Probst <mark.probst@gmail.com>
4672 * sgen-gc.c: Fixed a pthread TLS screwup.
4674 2009-06-04 Mark Probst <mark.probst@gmail.com>
4676 * sgen-gc.c: Do TLS using pthread API if __thread keyword is not
4679 2009-06-04 Mark Probst <mark.probst@gmail.com>
4681 * sgen-gc.c: Disable TLA and managed allocation if the __thread
4682 keyword is not supported.
4684 2009-06-04 Zoltan Varga <vargaz@gmail.com>
4686 * marshal.c metadata.c: Applied patch from Ulrich Weigand
4687 <uweigand@de.ibm.com>: Free the wrappers of inflated generic methods when
4688 the inflated method is freed. Fixes #508389.
4690 The code is contributed under the MIT/X11 license.
4692 2009-06-03 Zoltan Varga <vargaz@gmail.com>
4694 * marshal.c (get_wrapper_target_class): New helper function.
4695 (mono_marshal_get_runtime_invoke): Place runtime-invoke wrappers into
4696 the <Module> class of the image. Fixes #509049.
4698 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4700 * threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
4701 Check if the thread was interrupted and proccess it straight away.
4702 Makes abortion much more responsive.
4704 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4706 * threads.c (mono_thread_execute_interruption): Use atomic cas with
4707 MonoThread::interruption_requested to match it's counterpart.
4709 Fixes a hang in abort-stress-1 on a 2 core x86.
4711 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
4714 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4716 Change MonoImage::name_cache to be protected by the image lock
4717 instead of the loader lock.
4719 * appdomain.c (deregister_reflection_info_roots): Protect access
4722 * class.c (mono_image_init_name_cache): Change from the loader lock
4723 to the image lock. Check if the cache wasn't already created.
4725 * class.c: Change from the loader to the image lock.
4727 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Fix
4728 the code to hold the image lock while iterating over name_cache and
4729 not go into mono_array_new holding it.
4731 * metadata-internals.h: Add a comment about this change.
4733 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4735 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
4736 Under the 2.0 profile raise the loader error.
4740 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4742 * marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
4743 of ldind opcode for generic instances so we don't fail for direct wrappers.
4744 This only affect direct calls.
4746 2009-05-31 Zoltan Varga <vargaz@gmail.com>
4748 * reflection.c (create_dynamic_mono_image): Fix warnings.
4750 * generic-sharing.c (other_info_equal): Ditto.
4752 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
4754 * metadata-verify.c: Implement field signature check.
4756 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
4758 * metadata-verify.c: Implement standalone signature check.
4760 2009-05-28 Rodrigo Kumpera <rkumpera@novell.com>
4762 * metadata-verify.c: Implement methodref signature check.
4764 2009-05-28 Zoltan Varga <vargaz@gmail.com>
4766 * object-internals.h (MonoRuntimeCallbacks): New structure containing
4767 callbacks supplied by the runtime.
4769 * object.c (mono_install_callbacks): New internal function to install
4772 * object.c (mono_create_ftnptr): Move the implementation of this to
4775 * object.c (mono_get_addr_from_ftnptr): Ditto.
4777 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
4779 * metadata-verify.c (parse_return_type): Proper byref check.
4780 * metadata-verify.c (is_valid_method_signature): Check for zero arity
4781 generic signatures and method params.
4783 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
4785 * metadata-verify.c (decode_signature_header): Fix bounds check.
4787 * metadata-verify.c (parse_custom_mods): Check custom mods.
4789 * metadata-verify.c (parse_type): Do initial basic verification
4792 * metadata-verify.c (is_valid_method_signature): Parse the generic
4795 2009-05-26 Rodrigo Kumpera <rkumpera@novell.com>
4797 * icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
4798 discarded based on their most specific definition so we set the method_slots
4799 array before checking if the method is acceptable or not.
4803 2009-05-26 Mark Probst <mark.probst@gmail.com>
4805 * icall.c: Free the old array when resizing a mono_ptr_array.
4807 2009-05-26 Mark Probst <mark.probst@gmail.com>
4809 * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
4810 for the hashes whose keys are managed objects.
4812 2009-05-26 Mark Probst <mark.probst@gmail.com>
4814 * object-internals.h, threads.c: Set the execution context on
4815 thread start here, not in corlib.
4817 * appdomain.c: Bump corlib version.
4819 2009-05-27 Martin Baulig <martin@ximian.com>
4821 * mono-debug.c (mono_debug_init): Use `MONO_DEBUG_FORMAT_DEBUGGER'
4822 if `_mono_debug_using_mono_debugger' is set to make things work
4823 properly when embedding Mono.
4825 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
4827 * class.c (mono_class_setup_fields): Don't mark simd types as having
4828 16 bytes alignment as the whole runtime doesn't support.
4830 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
4832 * metadata-verify.c (safe_read): Use endian safe read macros.
4834 2009-05-25 Zoltan Varga <vargaz@gmail.com>
4836 * object.c (mono_create_ftnptr): Don't allocate from the code mempool since
4837 it is read-only when using full aot.
4839 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
4841 * metadata-verify.c (is_valid_method_signature): Verify parts
4842 of the return type. Provide an error message in case of failure.
4844 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
4846 * metadata-verify.c (is_valid_method_signature): Verify the call conv.
4848 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
4850 * metadata-verify.c: Include the size prefix in the bounds check.
4852 2009-05-22 Miguel de Icaza <miguel@novell.com>
4854 * icall.c: Remove warnings.
4856 * mono-config.c: Allow for CONFIG_CPU to be set in config.h and
4857 prevent auto-detection based on GCC defines.
4861 * metadata-verify.c: Do not include signal.h
4863 * generic-sharing.c, marshal.c: Add returns to avoid some warning
4864 messages. Not sure why the g_assert_not_reached is not enough to
4868 * appdomain.c: Remove code that is not used when
4869 DISABLE_SHADOW_COPY is set.
4871 * image.c: use g_getenv
4873 2009-05-21 Miguel de Icaza <miguel@novell.com>
4875 * reflection.c: Remove code that it not used with
4876 DISABLE_REFLECTION_EMIT is defined.
4878 2009-05-21 Zoltan Varga <vargaz@gmail.com>
4880 * marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
4883 2009-05-20 Miguel de Icaza <miguel@novell.com>
4886 (ves_icall_System_Net_Sockets_Socket_Available_internal): Remove
4887 the ifdef here and instead put that on io-layer
4889 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4891 * metadata-verify.c: Verify the generic param constraint table.
4893 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4895 * metadata-verify.c (verify_generic_param_table): Fix
4896 thinko on the valid flags bits for generic params.
4898 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4900 * metadata-verify.c: Verify the methodspec table.
4902 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4904 * metadata-verify.c: Verify the generic param table.
4906 2009-05-19 Mark Probst <mark.probst@gmail.com>
4908 * sgen-gc.c: Store and use the count with REMSET_VTYPE.
4910 2009-05-19 Mark Probst <mark.probst@gmail.com>
4912 * sgen-gc.c: Use generation enum more consistently and use the
4913 correct generation in mono_gc_register_for_finalization().
4915 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
4917 * metadata-verify.c: Verify the nested class table.
4919 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
4921 * metadata-verify.c: Verify the manifest resource table.
4923 2009-05-17 Zoltan Varga <vargaz@gmail.com>
4925 * debug-helpers.c (dis_one): Add little-endian support for ldstr.
4927 2009-05-16 Zoltan Varga <vargaz@gmail.com>
4929 * class.c (mono_class_get_vtable_entry): Avoid adding static-rgctx
4930 wrappers, this is now done in the JIT.
4932 * class.c (mono_set_generic_sharing_supported): New internal function.
4933 (mono_class_generic_sharing_enabled): Move the #ifdef stuff to the JIT.
4935 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4937 * metadata-verify.c: Verify the exported type table.
4939 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4941 * pedump.c (main): Fake an assembly for netmodules to make the verifier happy.
4943 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4945 * metadata-verify.c: Verify the file table.
4947 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4949 * metadata-verify.c (verify_assembly_table): Fix an error message.
4951 * metadata-verify.c: Verify the assemblyref table.
4953 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4955 * metadata-verify.c (verify_assembly_table): Fix the valid
4956 bits mask for flags.
4958 2009-05-15 Zoltan Varga <vargaz@gmail.com>
4960 * debug-helpers.c (mono_method_full_name): Print generic parameters of
4961 generic methods as well.
4963 2009-05-15 Geoff Norton <gnorton@novell.com>
4965 * gc.c: MachO/Darwin supports and uses semaphores fine for this
4966 use-case and is significantly more performant than the wapi layer.
4968 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
4970 * metadata-verify.c: Verify the assembly table.
4972 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
4974 * metadata-verify.c: Fix rows limit check.
4976 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
4978 * metadata-verify.c: Verify the fieldrva table.
4980 2009-05-13 Mark Probst <mark.probst@gmail.com>
4982 * sgen.c: Speed up weak links and finalizers by grouping them by
4985 2009-05-13 Mark Probst <mark.probst@gmail.com>
4987 * marshal.c (delegate_hash_table_add): When overwriting an entry,
4988 free the old GCHandle (only applies to SGen).
4990 2009-05-13 Zoltan Varga <vargaz@gmail.com>
4992 * loader.c (mono_get_method_from_token): Avoid the expensive call to
4993 mono_metadata_load_generic_params () for non-generic methods.
4995 2009-05-12 Mark Probst <mark.probst@gmail.com>
4997 * monitor.c, monitor.h (mono_monitor_get_object_monitor_weak_link):
4998 New function for returning a monitor's weak link if it has one.
5000 * sgen-gc.c: Remove an object's monitor's weak link (if it has
5001 one) when clearing a domain. These can still be around because
5002 the object might not have been collected.
5004 2009-05-12 Zoltan Varga <vargaz@gmail.com>
5006 * gc.c: Fix a warning.
5008 2009-05-12 Kornél Pál <kornelpal@gmail.com>
5010 * gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
5011 prevous wait that resulted in a deadlock on Windows when initializing
5012 the runtime form DllMain. Also results in improved startup time.
5013 (finalizer_thread): Get rid of thread_started_event.
5014 * threads.c, threads-types.h (mono_thread_create_internal): Return the
5015 resulting MonoThread.
5017 Contributed under MIT/X11 license.
5019 2009-05-11 Rodrigo Kumpera <rkumpera@novell.com>
5021 * metadata-verify.c: Verify the implmap table.
5022 Don't require that #US and #Strings be present.
5024 2009-05-11 Sebastien Pouliot <sebastien@ximian.com>
5026 * security-core-clr.c: Delegate checks are done at creation time,
5027 not a invocation time. Fix exception for Telerik Silverlight demo
5029 2009-05-11 Mark Probst <mark.probst@gmail.com>
5031 * sgen-gc.c (need_remove_object_for_domain): Remove the special
5032 case for the Thread class.
5034 * threads.c: Do clean-up of abort exception/state in
5035 thread_cleanup() instead of Thread.free_internal(). Also clean up
5036 current_appcontext. The reason we have to do that is because
5037 those references might point into another domain and if that
5038 domain is unloaded before the thread is finalized, they point to
5041 2009-05-10 Andreas Faerber <andreas.faerber@web.de>
5043 * null-gc.c (mono_gc_weak_link_add, mono_gc_clear_domain): Fix
5046 Contributed unter MIT/X11 license.
5048 2009-05-09 Miguel de Icaza <miguel@novell.com>
5050 * verify.c, metadata-verifier.c: Add support for disabling the
5051 verifier in some builds.
5053 [ Sorry, my previous commit accidentally commited some work in
5056 2009-05-08 Zoltan Varga <vargaz@gmail.com>
5058 * class.c (mono_class_setup_fields): Set class->field.first for
5061 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
5063 * metadata-verify.c: Verify the typespec table.
5065 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
5067 * metadata-verify.c: Verify the module table.
5069 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5071 * metadata-verify.c: Verify the methodimpl table.
5073 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5075 * metadata-verify.c: Verify the property table.
5077 2009-05-06 Zoltan Varga <vargaz@gmail.com>
5079 * debug-helpers.c (mono_method_desc_match): Add support for generic
5082 2009-05-05 Rodrigo Kumpera <rkumpera@novell.com>
5084 * metadata-verify.c: Verify the propertymap table.
5086 2009-05-04 Rodrigo Kumpera <rkumpera@novell.com>
5088 * metadata-verify.c: Verify the event table.
5090 * metadata-verify.c (search_sorted_table): Fix offset
5093 2009-05-02 Zoltan Varga <vargaz@gmail.com>
5095 * domain-internals.h (struct _MonoJitInfo): Add a 'from_llvm' flag.
5097 2009-05-01 Mark Probst <mark.probst@gmail.com>
5099 * gc.c (mono_gc_run_finalize): Don't set the domain too late,
5100 because mono_delegate_free_ftnptr() needs it.
5102 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5104 * metadata-verify.c: Verify the eventmap table.
5106 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5108 * metadata-verify.c: Verify the standalonesig table.
5110 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5112 * metadata-verify.c: Verify the field layout table.
5114 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5116 * class.c (mono_type_get_name_recurse): Don't crash
5117 for ownerless generic params.
5119 * debug-helpers.c (mono_type_get_desc): Correct the format
5120 for ownerless generic params.
5122 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5124 * metadata-verify.c: Verify the class layout table.
5126 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
5128 * metadata-verify.c: Verify the decl security table.
5130 2009-04-30 Mark Probst <mark.probst@gmail.com>
5132 * domain.c (mono_domain_set_internal_with_options): Don't do
5133 anything if the old domain is the same as the old one. Fixes
5136 2009-04-30 Mark Probst <mark.probst@gmail.com>
5138 * appdomain.c: Deregister the reflection_info roots when unloading
5141 * sgen-gc.c, domain.c, gc-internal.h: mono_gc_clear_domain() nulls
5142 memory allocated by a domain and frees its disappearing links.
5144 * boehm-gc.c, null-gc.c: Empty implementation of
5145 mono_gc_clear_domain().
5147 2009-04-30 Mark Probst <mark.probst@gmail.com>
5149 * appdomain.c (clear_cached_vtable): Free the static fields memory
5152 2009-04-30 Mark Probst <mark.probst@gmail.com>
5154 * gc.c: Set the correct domain when invoking finalizers.
5156 * appdomain.c: Set the correct domain when creating threads.
5158 2009-04-30 Mark Probst <mark.probst@gmail.com>
5160 * sgen-gc.c: Fix skip size for vectors.
5162 2009-05-03 Martin Baulig <martin@ximian.com>
5164 * mono-debug-debugger.c
5165 (mono_debugger_check_breakpoints): Check class init handlers even
5166 if we don't have any method load handers.
5168 2009-04-30 Zoltan Varga <vargaz@gmail.com>
5170 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid
5171 returning refonly assemblies if refonly is FALSE. Fixes #499013.
5173 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
5175 * metadata-verify.c: Verify the field marshal table.
5177 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
5179 * metadata-verify.c: Verify the custom attribute table.
5181 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
5183 * metadata-verify.c: Verify the constant table.
5185 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
5187 * metadata-verify.c: Verify the memberef table.
5189 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
5191 * metadata-verify.c (get_coded_index_token): Remove
5194 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
5196 * metadata-verify.c: Verify the interfaceimpl table.
5198 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
5200 * verify.c: Improve error message.
5202 * debug-helpers.c (mono_type_get_desc): Harden the code that
5203 deals with VAR and MVAR.
5205 2009-04-28 Zoltan Varga <vargaz@gmail.com>
5207 * image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes
5210 2009-04-23 Tom Hindle <tom_hindle@sil.org>
5212 * cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
5213 changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.
5215 2009-04-28 Sebastien Pouliot <sebastien@ximian.com>
5217 * security-core-clr.c: Avoid redundant checks for platform code,
5218 e.g. check for method and for class (very common) and check
5219 for class and outer class (less common)...
5221 2009-04-27 Zoltan Varga <vargaz@gmail.com>
5223 * reflection.c: Avoid returning random cattrs for synthetic methods.
5226 2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
5228 * assembly.c: assemblies in the GAC should never be shadow-copied.
5230 2009-04-26 Mark Probst <mark.probst@gmail.com>
5232 * domain.c, domain-internals.h: Disable
5233 track_resurrection_{objects,handles}_hash in MonoDomain if using
5236 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
5238 * metadata-verify.c: Verify the param table.
5240 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
5242 * metadata-verify.c (verify_typedef_table): Range check FieldList and
5245 * metadata-verify.c (verify_method_table): Proper check the ParamList
5248 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
5250 * metadata-verify.c (verify_method_table): Check for runtime
5251 implemented functions such as delegate .ctors. Remove spurious
5254 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
5256 * pedump.c: Proper initialize the runtime forcing the 2.0 profile.
5258 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
5260 Don't allocate MonoGenericInfo for ownerless generic params.
5261 * class-internals.h (MonoGenericParam::info): Move field to ...
5262 (MonoGenericParamFull): ... this. New struct.
5263 (MonoGenericContainer::type_params): Change type to
5264 MonoGenericParamFull.
5265 (MonoGenericParam, MonoGenericContainer): Update accessors.
5266 * metadata.c (mono_metadata_parse_generic_param): Don't initialize
5267 'info' field for ownerless generic param.
5268 (mono_metadata_load_generic_params): Update to changes.
5269 * reflection.c (mono_reflection_create_generic_class): Likewise.
5270 (reflection_methodbuilder_to_mono_method): Likewise.
5271 (mono_reflection_initialize_generic_parameter): Likewise.
5273 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
5275 Don't use MonoGenericParamInfo for ownerless generic params.
5276 * class.c (get_anon_gparam_class, set_anon_gparam_class): New. Don't
5277 use ParamInfo class at all.
5278 (mono_class_from_generic_parameter): Use them.
5279 (make_generic_param_class): Fix a couple of instances where 'pinfo
5280 == NULL' wasn't handle.
5282 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
5284 * class.c (make_generic_param_class): Carve out of ...
5285 (mono_class_from_generic_parameter): ... here.
5287 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
5289 Simplify mono_class_from_generic_parameter
5290 * class-internals.h (MonoGenericParamInfo::token): New field.
5291 * metadata.c (mono_metadata_load_generic_params): Initialize it
5293 * class.c (mono_class_from_generic_parameter): Use it instead of
5294 searching through metadata.
5296 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5298 * metadata-verify.c: Add verification of the method table.
5300 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5302 * icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
5303 Delegate::Invoke optimization.
5305 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5307 * appdomain.c (mono_domain_create_appdomain_internal): Free the
5308 string returned by get_shadow_assembly_location_base.
5310 * appdomain.c (get_shadow_assembly_location_base): Add a comment
5311 about caller's ownership.
5313 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5315 * reflection.c: Add mono_reflection_cleanup_domain to cleanup
5316 reflection memory on domain unload.
5318 * domain.c (mono_domain_free): Don't free refobject_hash, let the
5319 reflection cleanup code do it.
5321 * domain-internals.h: Add mono_reflection_cleanup_domain.
5323 This fixes a memory leak for managed mirrors of reflection objects
5326 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
5328 * metadata-verify.c: Implement more verification of the field table.
5330 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
5332 * pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
5333 doesn't try to parse the input assembly, which can be broken.
5335 2009-04-23 Mark Probst <mark.probst@gmail.com>
5337 * boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
5338 sgen-gc.c: Implement track resurrection in weak GC handles in SGen
5339 by using the lowest bit in the link to store whether the link is
5340 tracked. Move the track_resurrection hashes into boehm-gc.c.
5342 2009-04-22 Miguel de Icaza <miguel@novell.com>
5344 * Makefile.am: Split the console support in platform specific code
5345 and put together a framework for making this easy in the future so
5346 that we can start splitting code instead of having a mess of PLATFORM_WIN32
5348 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
5350 * pedump.c: Fix a warning.
5352 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
5354 * verify.c (mono_delegate_type_equal): Compare valuetypes using
5355 mono_class_from_mono_type to avoid bad interactions with the dual representation
5356 of the generic type definition.
5358 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
5360 * verify.c (do_invoke_method): Use mono_class_from_mono_type to
5361 get the MonoClass for the call context type as it might be a generic
5366 2009-04-21 Mark Probst <mark.probst@gmail.com>
5368 * object-internals.h: The Thread object has no execution_context
5371 * threads.c, threadpool.c, threads-types.h: Accessor functions for
5372 the execution context.
5374 * appdomain.c: Bump corlib version.
5376 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5378 * verify.c (do_newobj): Improve error message.
5380 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5382 * verify.c (verify_clause_relationship): Only mask as an error if the exception clause
5383 is nested in the filter block.
5385 * verify.c (verify_clause_relationship): The disjoint check must verify if the exception
5386 block is not fully nested.
5390 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5392 * verify.c (verify_type_compatibility_full): Compare MonoClass and
5393 not MonoType to check for equality of valuetypes as the generic type
5394 definition allows for two different encodings: the generic type definition
5395 class or a generic instance over the GTD arguments.
5399 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5401 * verify.c (dump_stack_value): Fix compilation with extra debug turned on.
5403 * verify.c (do_initobj): Improve error message.
5405 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5407 * metadata-verify.c: Enable pe verification as the issue with #496453
5408 is that the authenticode data directory have a different unspecified
5409 format. Ignore it for now.
5411 * pedump.c: Run the metadata verifier together with the IL verifier.
5415 2009-04-20 Rolf Bjarne Kvinge <RKvinge@novell.com>
5417 * metadata-verify.c: Temporarily disable pe verification due to #496453.
5419 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
5421 * class.c (can_access_type): Check visibility against
5422 the element type for pointers and arrays.
5426 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
5428 * metadata-verify.c: Fix cli and table verification to use information
5429 from the MonoImage. A lot of duplicated code got killed.
5431 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
5434 This patch starts to integrate the metadata verifier with the runtime code.
5436 This patch causes major regression in functionality for the metadata verifier
5437 as cli and table verification are disabled since they require to be ported to
5438 use MonoImage information.
5440 * image.c (do_mono_image_load): Split the code in this function
5441 into mono_image_load_pe_data and mono_image_load_cli_data.
5442 Add care_about_pecoff parameter to not load pecoff data.
5443 Call into the metadata verifier for pecoff and cli verification.
5445 * image.c (mono_image_open_raw): New function that doesn't perform
5446 any parsing of the image contents.
5448 The reason for the 3 new functions is to give pedump better control
5449 into the interaction with the verifier.
5451 * metadata-internals.h: Add new functions from image.c as part of the
5454 * metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
5455 mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
5456 to make those functions work together with the runtime.
5458 * verify.c: Add mono_verifier_is_enabled_for_image function that returns
5459 true if the image needs to be verified.
5461 * verify-internals.h: Export new functions from metadata-verify.c and verify.c.
5463 * pedump.c: Use new metadata verifier API.
5465 2009-04-19 Zoltan Varga <vargaz@gmail.com>
5467 * object.c (mono_install_vtable_trampoline): Make this receive a
5468 trampoline creation function instead of trampoline, allowing the JIT
5469 to use a different trampoline for each vtable.
5471 2009-04-18 Mark Probst <mark.probst@gmail.com>
5473 * object.c (mono_raise_exception): Don't reset the thread abort
5474 exception state here.
5476 2009-04-18 Mark Probst <mark.probst@gmail.com>
5478 * icall-def.h: New icall for getting the thread abort exception
5481 * object.c, thread.c, object-internals.h: A thread's abort
5482 exception state is now a GC handle. To get the object it stands
5483 for, we must move it into the current app domain, if it's
5484 different than the one where it originated from.
5486 * appdomain.c: Bump corlib version.
5488 * domain.c, domain-internals.h: New function for setting the
5489 domain and migrate the thread abort exception or not.
5491 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5493 * metadata-verify.c: Add initial verification of the
5496 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5498 * metadata-verify.c: Add a macro to conditionally enable
5499 dumping of verification information. Add make_coded_token
5500 and search_sorted_table to enable search sorted tables
5501 by a given coded token.
5503 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5505 * metadata-verify.c: Add array mapping from table index
5506 to description offset. Add get_col_offset and get_col_size
5509 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5511 * metadata-verify.c: Add remaining table descriptions offsets.
5512 Add remaining coded index descriptions.
5514 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5516 * metadata-verify.c: Fixed constant table description.
5517 Fixed calculation of HasCustomAttribute coded index size.
5518 Fixed calculation of size for many table indexes.
5520 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5522 * pedump.c (dump_metadata): Dump table offset instead
5523 of useless pointer in memory.
5525 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5527 * metadata-verify.c (verify_typedef_table): Add tests for MethodList.
5529 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5531 * metadata-verify.c (verify_typedef_table): Add tests for FieldList and
5532 a missing of for interface types.
5534 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5536 * metadata-verify.c (verify_pe_optional_header): Add comment of why
5537 the code is commented.
5539 * metadata-verify.c (verify_resources_table): Remove spurious printf
5540 and don't fail if there are unmanaged resources. Gmcs generates a useless
5541 one for all assemblies - I bet it's some MS compatibility junk.
5543 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5545 * metadata-verify.c (verify_typedef_table): Verify the extends field.
5547 * metadata-verify.c (mono_image_verify): Add a is_corlib.
5549 * verify-internals.h: Same.
5551 * pedump.c: Fix for mono_image_verify new signature.
5553 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5555 * metadata-verify.c (verify_typedef_table): Verify for some invalid
5558 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5560 * metadata-verify.c (verify_module_table): Ignore the generation field.
5562 2009-04-15 Martin Baulig <martin@ximian.com>
5564 * debug-mono-symfile.c
5565 (mono_debug_symfile_lookup_location): Don't print a warning for
5566 unknown extended opcodes if they're within 0x40 and 0x7f.
5568 2009-04-15 Zoltan Varga <vargaz@gmail.com>
5570 * marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
5571 invoke signatures returning an enum. Fixes #494847.
5573 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
5575 * metadata-verify.c: Initial code to verify the typedef table.
5577 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
5579 * verify.c (mono_method_verify): Don't fail if an unconditional branch
5580 with non empty stack happens before the beginning of a try block.
5584 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
5586 * metadata-verify.c: Verify typename and typenamespace fields of
5589 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
5591 * metadata-verify.c: Initial code to verify the typeref table.
5593 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
5595 * verify.c (verify_delegate_compatibility): Fix error message.
5597 2009-04-14 Sebastien Pouliot <sebastien@ximian.com>
5599 * security-core-clr.c: Fix typo
5601 2009-04-14 Zoltan Varga <vargaz@gmail.com>
5603 * marshal.c (delegate_hash_table_add): Make delegate_target_locations
5604 a MonoGHashTable to keep its values alive.
5605 (emit_marshal_boolean): Fix a warning.
5607 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
5609 * socket-io.c: don't return IPv4/IPv6 addresses if the machine does
5610 not have any interface configured for IPv4/IPv6.
5612 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
5614 * assembly.c: fix typo in error message.
5616 2009-04-14 Zoltan Varga <vargaz@gmail.com>
5618 * marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
5619 allocating the location holding the this argument to prevent
5620 'too many root sets' errors.
5622 * object.c (mono_class_create_runtime_vtable): Set field->offset to -1
5623 to mark fields as special static.
5624 (mono_field_static_get_value): Handle special static fields.
5625 (mono_field_static_set_value): Ditto.
5627 * class-internals.h (struct _MonoClassField): Document this.
5629 2009-04-13 Bill Holmes <billholmes54@gmail.com>
5631 * cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
5632 the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
5633 case. This will handle when managed code returns null to native code.
5635 Code is contributed under MIT/X11 license.
5637 2009-04-13 Bill Holmes <billholmes54@gmail.com>
5639 * object.c (build_imt_slots): Changing a free to a g_free to match
5640 the g_malloc0 in add_imt_builder_entry that allocated this memory.
5642 Code is contributed under MIT/X11 license.
5644 2009-04-13 Bill Holmes <billholmes54@gmail.com>
5646 * marshal.c (emit_marshal_boolean): Adding code to ensure that
5647 the correct TRUE value is passed through the marshaling layer.
5649 Code is contributed under MIT/X11 license.
5651 2009-04-13 Zoltan Varga <vargaz@gmail.com>
5653 * marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
5654 correctly. Fixes #492330.
5656 * marshal.c: Fix the embedding of object pointers into JITted code in
5657 the native-to-managed wrappers by allocating some GC tracked memory, and
5658 embedding the address of that.
5660 2009-04-11 Zoltan Varga <vargaz@gmail.com>
5662 * object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
5663 pointers into the vtable.
5665 2009-04-09 Rodrigo Kumpera <rkumpera@novell.com>
5667 * verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.
5669 * verify.c (verify_ldftn_delegate): Improve error message.
5671 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
5673 * reflection.c (my_mono_class_from_mono_type): Remove.
5675 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
5677 Prepare to reduce memory usage of owner-less generic parameters (1/n)
5678 * class-internals.h (MonoGenericParam): Carve out pklass, name, flags
5679 and constraints fields into ...
5680 (MonoGenericParamInfo): ... this.
5681 (mono_generic_param_info, mono_generic_container_get_param_info):
5683 * class.c, debug-helpers.c, icall.c: Update to changes.
5684 * metadata.c, reflection.c, verify.c: Likewise.
5686 2009-04-09 Zoltan Varga <vargaz@gmail.com>
5688 * debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.
5690 * marshal.c (get_runtime_invoke_type): Share enums with their base types.
5692 * marshal.c (get_runtime_invoke_type): Share pointers with ints and
5693 booleans with sbytes.
5695 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
5697 * class.c (can_access_instantiation): Verify accesibility of element types
5698 for arrays and pointers.
5700 * class.c (can_access_type): Return true if the target class is VAR or MVAR.
5702 * class.c (mono_method_can_access_method_full): Fix typos in the documentation.
5706 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
5708 * verify.c (do_invoke_method): Improve error messages.
5710 2009-04-08 Bill Holmes <billholmes54@gmail.com>
5712 * verify.c: Fixing the MSVC build.
5714 Code is contributed under MIT/X11 license.
5716 2009-04-08 Sebastien Pouliot <sebastien@ximian.com>
5718 * security-core-clr.c: Simplify get_reflection_caller not to call
5719 mono_method_get_last_managed (another stack walk) and adjust the
5720 callers to handle a (should not happen) NULL return value.
5722 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
5724 Add accessors to some MonoGenericParam fields
5725 * class-internals.h (mono_generic_param_owner): New accessor.
5726 (mono_generic_param_num): Likewise.
5727 (mono_type_get_generic_param_owner): New helper.
5728 (mono_type_get_generic_param_num): New helper.
5729 * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
5731 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
5733 * class-internals.h (mono_generic_container_get_param): New wrapper.
5734 * class.c, icall.c, metadata.c, verify.c: Use it.
5736 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
5739 * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
5740 the standard case/loop. In particular, don't complain about
5741 references to generic type definitions.
5743 2009-04-07 Zoltan Varga <vargaz@gmail.com>
5745 * debug-helpers.c (dis_one): Decode string arguments.
5747 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
5749 * pedump.c (dump_verify_info): Dump type name correctly.
5751 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
5753 * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
5754 are larger than code size.
5756 This can happen in valid code if the try/catch block is not followed by any instruction
5757 and do a backward branch on the leave instruction.
5761 2009-04-06 Sebastien Pouliot <sebastien@ximian.com>
5763 * security-core-clr.c: Fix typo while comparing second method names
5764 in can_avoid_corlib_reflection_delegate_optimization
5766 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
5768 * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
5772 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
5774 * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
5775 a MVAR using a class context.
5779 2009-04-06 Zoltan Varga <vargaz@gmail.com>
5781 * object.c (mono_class_compute_gc_descriptor): Make this non-static.
5783 * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
5785 * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
5786 functions supplied by the JIT for the SGEN GC.
5788 * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
5790 2009-04-06 Massimiliano Mantione <massi@ximian.com>
5792 monitor.c (mono_monitor_try_enter_internal):
5793 Added calls to profile monitor contentions.
5794 Also duplicated a small piece of code (the "get the monitor" logic)
5795 from the fast path to the slow path, and changed the relevant goto
5796 statements, so that monitor acquisition events can be emitted from the
5797 slow path (this is by Paolo Molaro).
5799 2009-04-06 Massimiliano Mantione <massi@ximian.com>
5801 * profiler.c, profiler.h, profiler-private.h:
5802 Added support for profiling monitor contentions.
5804 2009-04-03 Rodrigo Kumpera <rkumpera@novell.com>
5806 * metadata-verify.c: Verify the modules table.
5808 2009-04-02 Rodrigo Kumpera <rkumpera@novell.com>
5810 * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
5811 using the context of the method been verifier and not of the method been called.
5813 * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
5814 safely inflate generic types.
5816 2009-04-02 Sebastien Pouliot <sebastien@ximian.com>
5818 * security-core-clr.c: Change the strategy for checking the
5819 "reflection using delegates optimization" to avoid unneeded
5820 attributes in multiple class libraries.
5822 2009-04-02 Mark Probst <mark.probst@gmail.com>
5824 * sgen-gc.c: Remove object element in the disappearing link struct
5825 by storing the object pointer in the link.
5827 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
5829 * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
5831 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
5833 * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
5835 * verify.c (mono_method_verify): Do proper bounds checking of exception
5838 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
5840 * loader.c (mono_field_from_token): Don't crash if the field parent could
5843 2009-03-31 Mark Probst <mark.probst@gmail.com>
5845 * sgen-gc.c: Execute critical finalizers after ordinary
5848 * class-internals.h, domain.c: Add CriticalFinalizerObject to
5851 2009-03-31 Jb Evain <jbevain@novell.com>
5853 * verify.c (do_ldstr): don't check if a string is in the user strings
5854 heap if the current image is dynamic.
5856 2009-03-31 Mark Probst <mark.probst@gmail.com>
5858 * sgen-gc.c: Wait until the last finalizer has executed when
5859 returning from WaitForPendingFinalizers.
5861 2009-03-31 Martin Baulig <martin@ximian.com>
5863 * mono-debug-debugger.h (MonoDebuggerEvent): Add
5864 `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
5865 `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
5866 (mono_debugger_event_create_appdomain): New function.
5867 (mono_debugger_event_unload_appdomain): New function.
5869 * appdomain.c (mono_domain_create_appdomain_internal): Call
5870 mono_debugger_event_create_appdomain().
5872 2009-03-31 Martin Baulig <martin@ximian.com>
5874 * mono-debug-debugger.c
5875 (mono_debugger_register_class_init_callback): Also register the
5876 class init callback if the class is already initialized to make
5877 things work with shadow copied assemblies.
5879 2009-03-31 Sebastien Pouliot <sebastien@ximian.com>
5881 * security-core-clr.c
5882 (mono_security_core_clr_ensure_reflection_access_field): Let
5883 critical code access the field (just like we do for methods). Use
5884 check_field_access helper.
5885 (mono_security_core_clr_ensure_reflection_access_method): Use
5886 check_field_access helper.
5888 2009-03-31 Mark Probst <mark.probst@gmail.com>
5890 * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
5891 call the run-finalize function directly.
5893 * gc.c, gc-internal.h: Make run_finalize() non-static.
5895 2009-03-31 Mark Probst <mark.probst@gmail.com>
5897 * sgen-gc.c: Use a separate struct for disappearing links.
5899 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5901 * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
5902 * MaxIOVectorLength enabled, just ignore them.
5905 2009-03-30 Rodrigo Kumpera <rkumpera@novell.com>
5907 * metadata-verify.c: Fix eglib build.
5909 2009-03-30 Zoltan Varga <vargaz@gmail.com>
5911 * threads-types.h: Fix the win32 build.
5913 2009-03-28 Sebastien Pouliot <sebastien@ximian.com>
5915 * class.c: move coreclr inheritance/override checks to
5917 * security-core.clr.c|h: add code from class.c with additional
5918 documentation. Fix override check when the method is not critical.
5920 2009-03-28 Zoltan Varga <vargaz@gmail.com>
5922 * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
5923 (match_class): Ditto.
5925 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
5927 * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
5929 * metadata-verify.c: Implement table layout row size calculation. Verify
5930 the total size of the tables.
5932 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
5934 * metadata-verify.c: Verify heap sizes and size to decode row counts.
5936 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
5939 * console-io.[ch]: added new mono_console_init() to make sure that
5940 file descriptors 0, 1 and 2 are opened.
5943 2009-03-27 Sebastien Pouliot <sebastien@ximian.com>
5945 * appdomain.h: Export a new callback type and a new function to
5946 set this callback. This allow a mono host to provide it's own
5947 definition for "platform code".
5948 * metadata-internals.h: Add a core_clr_platform_code flag on
5949 _MonoImage to (cache and) know if it is representing platform
5951 * image.c (do_mono_image_open): Set core_clr_platform_code flag
5952 on platform code images.
5953 * security-core-clr.c|h
5954 (mono_security_set_core_clr_platform_callback): Allow the host
5955 to provide it's own platform check definition.
5956 (mono_security_core_clr_determine_platform_image): Detect if an
5957 image is platform code (using the specified callback).
5958 (mono_security_core_clr_is_platform_image): Return cached value
5961 2009-03-27 Zoltan Varga <vargaz@gmail.com>
5963 * threads.c (mono_create_thread): New helper function to wrap CreateThread
5964 which has different parameter types for the 'tid' argument in windows and
5967 * appdomain.c attach.c threads.c: Use the new helper.
5969 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
5971 * metadata-verify.c: Verify valid table bits.
5973 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
5975 * metadata-verify.c (verify_metadata_header): Store size in the size field.
5977 * metadata-verify.c: Add initial table schema verification.
5979 2009-03-26 Zoltan Varga <vargaz@gmail.com>
5981 * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
5982 obtain the refclass argument needed by mono_param_get_objects (). Fixes
5985 * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
5987 * appdomain.c (MONO_CORLIB_VERSION): Bump this.
5989 2009-03-26 Sebastien Pouliot <sebastien@ximian.com>
5991 * security-core-clr.c: Add/update documentation
5993 2009-03-26 Zoltan Varga <vargaz@gmail.com>
5995 * marshal.c (emit_marshal_object): Generate code to throw an exception
5996 instead of throwing it. Fixes #488670.
5998 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
6000 * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
6001 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
6002 an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
6003 and add a call to mono_security_core_clr_ensure_delegate_creation
6004 to do the extra checks required by CoreCLR.
6005 * security-core-clr.c|h: Add function to check delegate creation,
6006 both in the binding and accessibility, under CoreCLR.
6008 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
6010 * reflection.c (mono_reflection_create_dynamic_method): when
6011 coreclr is enabled make sure that every resolved object are
6012 checked (e.g. field and method access).
6013 * security-core-clr.c|h: Add function to check objects resolved
6014 when a dynamic method is created.
6016 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
6018 * metadata-verify.c: Cache directory rva translations.
6020 * metadata-verify.c: Add cli-header and streams verification.
6022 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
6024 * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
6025 the wrong offset (8 instead of 6).
6027 2009-03-23 Zoltan Varga <vargaz@gmail.com>
6029 * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
6030 methods, return the native function address itself. Fixes
6033 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
6035 * console-io.c: some of the values for control characters might not be
6038 2009-03-21 Sebastien Pouliot <sebastien@ximian.com>
6040 * exception.c|h: Add helpers to create [Field|Method]AccessException
6041 * icall.c: Add required coreclr check calls for field reflection.
6042 Move the existing (method) check logic into security-core-clr.c
6043 * security-core-clr.c: Add functions to check if the access of a
6044 field or method is allowed when reflecting under coreclr. This is
6045 mostly done using a stack walk to find the "real" caller: i.e. the
6046 code that is calling the reflection
6048 2009-03-20 Zoltan Varga <vargaz@gmail.com>
6050 * gc-internal.h: Change location of gc_wrapper.h
6052 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
6054 * class.c: Simplification to coreclr checks for overrides that
6055 makes it easier to set breakpoints.
6057 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
6059 * security-core-clr.c|h: (mono_security_core_clr_class_level,
6060 mono_security_core_clr_method_level): Avoid potential
6061 MonoCustomAttrInfo allocation for transparent assemblies (e.g.
6062 user/application code) and make it easier to set breakpoints
6064 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
6066 * metadata-verify.c: Reject cli header tables that mono don't handle.
6068 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
6070 * pedump.c: Fix CLI header dumping.
6072 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
6074 * metadata-verify.c: More CLI header verification.
6076 2009-03-19 Zoltan Varga <vargaz@gmail.com>
6078 * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
6080 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
6082 * metadata-verify.c: Initial verification of the CLI header.
6084 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
6086 * metadata-verify.c (verify_resources_table): Fix verification of zero
6087 sized resource section and id entries count.
6089 2009-03-18 Zoltan Varga <vargaz@gmail.com>
6091 * icall.c: Handle user types in many Type icalls. Fixes #486303.
6093 2009-03-17 Jb Evain <jbevain@novell.com>
6095 * profiler.c: call mono_gc_base_init from mono_profiler_load.
6097 2009-03-17 Zoltan Varga <vargaz@gmail.com>
6099 * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
6100 (mono_gc_make_descr_for_array): Ditto.
6102 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
6104 * verify.c (mono_verifier_is_class_full_trust): Add support for
6105 CoreCLR security mode where trusted assemblies are defined as
6108 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
6110 * metadata-verify.c: Add minimal PECOFF resource verification.
6112 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
6114 * metadata-verify.c: Be less restrictive with some coff fields.
6116 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
6118 * verify.c (init_stack_with_value_at_exception_boundary): Init generic
6119 params as boxed values on stack. Fixes #485706.
6121 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
6123 * console-io.c: the termios values may vary in different flavors of unix.
6125 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
6127 * console-io.[ch]: return the entire set of control characters when
6128 initializing the terminal.
6129 * appdomain.c: bump corlib version.
6131 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
6133 * mono-perfcounters.c: added support for in-process custom
6134 performance counters.
6136 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
6138 * metadata-verify.c: Small cleanup and add comment for IAT directory entry.
6140 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
6142 * metadata-verify.c: Verify the data pointed by the import table.
6144 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
6146 * metadata-verify.c (load_data_directories): Store data
6149 * metadata-verify.c: Verify the import table.
6151 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
6153 * metadata-verify.c: Verify data directories.
6155 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
6157 * metadata-verify.c: Check section header flags.
6159 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
6161 * appdomain.c: if the assembly name is a shadow-copied file, return
6162 TRUE from mono_is_shadow_copy_enabled but don't actually do anything
6163 in mono_make_shadow_copy.
6164 * icall.c: if the assembly name is a shadow-copied file, replace it
6165 with the original assembly path.
6167 Bug #484244 fixed. NUnit tests for corlib can be run without
6170 2009-03-12 Zoltan Varga <vargaz@gmail.com>
6172 * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
6173 entries when the table is reallocated.
6175 * icall.c: Allocate the memory used by the mono_ptr_array macros using
6176 mono_gc_alloc_fixed () since it contains GC refs.
6178 2009-03-10 Zoltan Varga <vargaz@gmail.com>
6180 * reflection.c (ensure_complete_type): New helper function to call
6181 type resolve handlers for unfinished dynamic types.
6182 (resolve_object): Call it for MonoClassFields. Fixes #483852.
6184 2009-03-09 Zoltan Varga <vargaz@gmail.com>
6186 * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
6189 2009-03-08 Rodrigo Kumpera <rkumpera@novell.com>
6191 * appdomain.c (get_shadow_assembly_location): Fix memleak.
6193 2009-03-08 Zoltan Varga <vargaz@gmail.com>
6195 * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
6196 between GCHandles of type WeakTrackResurrection and the objects they
6199 * gc.c: Partly implement the sematics of GCHandles of type
6200 WeakTrackResurrection: these handles should only be cleared after the
6201 finalizer of the object they are pointing to has ran.
6203 2009-03-06 Mark Probst <mark.probst@gmail.com>
6205 * icall.c: Partially revert r126631 because using the jump
6206 trampolines for generic shared methods makes it superfluous.
6208 2009-03-06 Zoltan Varga <vargaz@gmail.com>
6210 * threads.c (handle_store): Create the 'threads' hash table with the proper
6211 MONO_HASH_VALUE_GC type.
6213 2009-03-05 Zoltan Varga <vargaz@gmail.com>
6215 * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
6218 * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
6219 and LAST_GC_TRACKED as a GC root.
6221 * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
6223 * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
6224 the static data even if it consists of 1 reference.
6226 * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
6227 if there is a GC descriptor.
6229 * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
6230 instead of through the GC since they contain no object references.
6232 2009-03-05 Mark Probst <mark.probst@gmail.com>
6234 * generic-sharing.c (instantiate_other_info): Always return a jump
6235 trampoline for method code.
6237 2009-03-05 Marek Habersack <mhabersack@novell.com>
6239 * culture-info-tables.h: generated to include the en-tt culture.
6241 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
6243 * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
6244 capture the thread context.
6246 * object.c (mono_async_result_new): Cache the invoke wrappers to
6247 ExecutionContext::Capture.
6249 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
6251 * marshal.h: Add a prototype for what mono_compile_method returns
6252 for invoke wrappers.
6254 * gc.c: Use the new prototype declaration.
6256 2009-03-04 Geoff Norton <gnorton@novell.com>
6258 * boehm-gc.c: Add some MONO_LOG tracing for the GC
6260 * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
6262 2009-03-04 Martin Baulig <martin@ximian.com>
6265 (mono_debugger_runtime_invoke): Removed.
6267 * mono-debug-debugger.c
6268 (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
6270 2009-03-02 Martin Baulig <martin@ximian.com>
6273 (mono_debugger_unhandled_exception): Removed.
6274 (mono_debugger_handle_exception): Removed.
6275 (mono_debugger_throw_exception): Removed.
6278 (mono_debug_debugger_version): Bump to 5.
6280 * mono-debug-debugger.c: Moved the exception handling code to
6281 ../mini/debug-mini.c
6283 2009-03-03 Zoltan Varga <vargaz@gmail.com>
6285 * domain-internals.h (struct _MonoDomain): Add a separate lock for the
6286 finalize_objects_hash.
6288 * gc.c: Use the separate lock to access the finalize_objects_hash field.
6290 * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
6293 * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
6296 * image.c (mono_image_close): Free it.
6298 * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
6299 allowing a creation of a wrapper which invokes its method using a CALLVIRT
6300 on the this argument.
6302 * gc.c (run_finalize): Optimize the calling of the finalizers.
6304 2009-03-03 Martin Baulig <martin@ximian.com>
6306 * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
6307 of the `MonoGenericInst' changes.
6309 2009-03-03 Rodrigo Kumpera <rkumpera@novell.com>
6311 * icall.c (ves_icall_MonoType_GetGenericArguments): Use
6312 mono_array_class_get_cached to reduce locking contention. Extract
6315 * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
6316 intermediary managed arrays. Use caching version of mono_array_new
6317 to allocate the result array.
6319 * icall.c (ves_icall_Type_GetEvents_internal): Same.
6321 * icall.c (ves_icall_Type_GetNestedTypes): Same.
6323 * locales.c (create_names_array_idx): Use mono_array_new_cached
6324 to reduce locking contention.
6326 2009-03-03 Zoltan Varga <vargaz@gmail.com>
6328 * object.c (mono_method_add_generic_virtual_invocation): Put back the
6329 thunk builder code for the non-interface case.
6331 2009-03-02 Zoltan Varga <vargaz@gmail.com>
6333 * object.c (get_generic_virtual_entries): New helper function to collect
6334 the virtual generic method instances which need to be added to an IMT
6336 (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
6337 Instead of creating a new IMT thunk, reset the vtable slot to the
6338 trampoline, the thunk will be created the next time the trampoline is called.
6339 (build_imt_slots): Add support for virtual generic methods in interfaces by
6340 adding to the IMT thunk all the methods registered using
6341 mono_method_add_generic_virtual_invocation ().
6343 * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
6344 (struct _MonoIMTCheckItem): Ditto.
6346 * object.c (mono_method_add_generic_virtual_invocation): Take a
6347 MonoMethod argument instead of a MonoGenericInst. Fix the construction of
6348 the IMT thunk to include all items.
6350 * object.c (mono_class_create_runtime_vtable): Add a missing
6351 mono_loader_unlock ().
6353 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
6355 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6357 * object-internals.h (MonoReflectionEvent): Add cached_add_event.
6359 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
6361 * object-internals.h: Rename _MonoReflectionEvent to
6362 MonoReflectionMonoEvent so it reflects the right managed type.
6363 Add a MonoReflectionEvent that correctly represents System.EventInfo.
6366 * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
6369 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
6371 * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
6372 intermediary managed arrays. Use caching version of mono_array_new
6373 to allocate the result array.
6375 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
6377 * reflection.c: Use cached version of mono_array_new alongside
6378 the mono_reflection_get_custom_attrs_by_type call path.
6380 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
6382 * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
6383 intermediary managed arrays. Use caching version of mono_array_new
6384 to allocate the result array.
6386 * icall.c (ves_icall_Type_GetConstructors_internal): Same.
6388 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
6390 * icall.c: Add small implementation of a growable stack bound array.
6392 * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
6394 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
6395 intermediary managed arrays. Use caching version of mono_array_new
6396 to allocate the result array.
6398 2009-02-27 Rodrigo Kumpera <rkumpera@novell.com>
6400 * icall.c: New icall ves_icall_System_Enum_compare_value_to that
6401 helps Enum::CompareTo to be implemented without reboxing all enums
6402 to their underlying type.
6403 2009-02-27 Zoltan Varga <vargaz@gmail.com>
6405 * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
6406 since it acquires a global lock leading to scalability problems.
6408 * profiler.c: Make the stat profiler work with multiple appdomains, this
6409 currently only works when no appdomains are unloaded.
6411 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
6413 * appdomain.c: make the check to avoid copying when the assembly is
6414 already shadow copied actually work.
6416 2009-02-26 Zoltan Varga <vargaz@gmail.com>
6418 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6420 * object-internals.h (struct _MonoReflectionGenericClass): Sync with
6421 changes to the managed side.
6423 2009-02-25 Zoltan Varga <vargaz@gmail.com>
6425 * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
6426 classes + a separate lock for it, as it is used frequently at runtime, not
6427 just during metadata loading/JIT compilation.
6429 * class.c (mono_bounded_array_class_get): Use the separate cache + lock
6432 * object-internals.h (mono_class_from_name_cached): New macro to cache
6433 the results of the lookup locally without having to declare a static
6434 variable to hold it.
6435 (mono_class_get_field_from_name_cached): Ditto.
6436 (mono_array_class_get_cached): Ditto.
6438 * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
6441 * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
6442 slower search in metadata.
6444 * pedump.c: Fix a warning.
6446 2009-02-23 Zoltan Varga <vargaz@gmail.com>
6448 * reflection.c (encode_locals): Add checks for user types.
6449 (method_encode_clauses): Ditto.
6450 (method_encode_code): Ditto.
6451 (mono_image_create_token): Ditto.
6453 * object-internals.h: Change the type of more fields from MonoReflectionType*
6456 2009-02-22 Zoltan Varga <vargaz@gmail.com>
6458 * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
6459 the a thread does not suspend within 100ms.
6461 * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
6462 in addition to StopRequested as well.
6464 * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
6466 * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
6467 search the method_hash before inserting a new entry, to avoid crashes when
6468 the same method is inserted multiple times, causing the old
6469 MonoDebugMethodInfo structure to be freed by the value dtor function.
6471 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
6473 * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
6474 SO_EXLUSIVEADDRUSE where available.
6476 2009-02-21 Zoltan Varga <vargaz@gmail.com>
6478 * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
6479 runtime invoke wrappers, this time it is string ctor wrappers, which
6480 pass a dummy string as 'this' instead of their obj argument. Fixes
6483 2009-02-21 Jb Evain <jbevain@novell.com>
6485 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6486 only get create_culture once.
6488 2009-02-20 Zoltan Varga <vargaz@gmail.com>
6490 * reflection.c (mono_reflection_setup_internal_class): Move the user type
6491 check before the locking.
6493 * reflection.c (mono_reflection_setup_internal_class): Check for user types.
6494 (mono_reflection_create_runtime_class): Ditto.
6495 (mono_reflection_sighelper_get_signature_local): Ditto.
6496 (mono_reflection_sighelper_get_signature_field): Ditto.
6498 * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
6499 is a System.MonoType object or similar.
6500 (monotype_cast): New helper function to cast a MonoObject to a
6501 MonoReflectionType object.
6503 * object-internals.h: Change MonoReflectionType* members in structures to
6504 MonoObject* members to force the usage of the monotype_cast () function.
6506 * reflection.c icall.c: Use monotype_cast () for accessing Type members of
6507 structures/arrays. This causes us to assert instead of crashing when
6508 instances of user defined subclasses of System.Type are encountered.
6510 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
6514 * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
6515 win32 resource loaded from a PE file.
6517 * image.c: fix mono_image_lookup_resource.
6519 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
6523 * threads.c: added internal call for WaitHandle.SignalAndWait.
6525 2009-02-19 Bill Holmes <billholmes54@gmail.com>
6527 * cominterop.c : Adding cominterop_type_from_handle and
6528 registering it as an icall. Replacing all references
6529 to type_from_handle.
6531 Code is contributed under MIT/X11 license.
6533 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
6535 * Makefile.am: Add lock-tracer.h and lock-trace.c.
6537 * appdomain.c: Call the tracer init function.
6539 * domain-internals.h: Enable the tracer for the domain locks.
6541 * image.c: Enable the tracer for image locks.
6543 * loader.c: Enable the trace for the loader lock.
6546 * lock-tracer.c: Initial implementation of the lock trace utility.
6547 The tracer requires a compile time define to be enabled and a env var
6548 to be enabled at runtime.
6550 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
6552 * domain.c (mono_domain_code_foreach): Improve documentation.
6554 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
6557 * generic-sharing.c:
6559 * reflection.c: Adjust locking order to the new semantics where the loader lock
6562 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
6564 * domain.c: Add mono_domain_code_* functions that perform locking
6565 around the domain codeman.
6567 * domain-internals.h: Export those functions.
6569 * object.c: Use new functions instead of acquiring the domain lock.
6571 2009-02-19 Zoltan Varga <vargaz@gmail.com>
6573 * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
6574 delegate. Fixes #477396.
6576 2009-02-18 Zoltan Varga <vargaz@gmail.com>
6578 * reflection.c (create_custom_attr): Get rid of alloca.
6580 2009-02-18 Bill Holmes <billholmes54@gmail.com>
6582 * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
6583 Adding exception handling for all CCW calls.
6585 Code is contributed under MIT/X11 license.
6587 2009-02-18 Zoltan Varga <vargaz@gmail.com>
6589 * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
6591 * marshal.c (emit_marshal_boolean): Add null checks to the new
6592 native->managed marshalling code. Fixes #476247.
6594 2009-02-17 Zoltan Varga <vargaz@gmail.com>
6596 * class.c (mono_class_get_vtable_entry): Move the addition of
6597 static rgctx invoke wrappers for vtable methods here, this simplifies
6598 a lot of code and causes fewer rgctx wrappers to be created.
6600 * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
6601 name of the statistics to begin with an uppercase.
6603 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
6605 * reflection.c: Revert previous change as it breaks the build.
6607 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
6609 * verify.c: Properly handle SZARRAY element type.
6613 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
6615 * reflection.c (mono_image_create_method_token): Correctly encode
6616 MethodDef MemberRefParent token.
6620 2009-02-17 Zoltan Varga <vargaz@gmail.com>
6622 * image.c (mono_image_close): Delete the critical section before
6623 freeing the memory holding it.
6625 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6627 * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
6630 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6632 * pedump.c (main): Call mono_marshal_init so pedump
6635 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6637 * loader.c (method_from_memberref): Properly fix #474271 and
6638 don't break the runtime bad.
6640 2009-02-16 Zoltan Varga <vargaz@gmail.com>
6642 * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
6643 (mono_domain_alloc0): Ditto.
6645 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6647 * loader.c (method_from_memberref): Don't abort if the array
6648 method is not found. A regular loader failure is more informative
6653 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6655 *loader.c: Guard MonoImage::method_cache/methodref_cache
6656 using the image lock instead of the loader lock.
6658 * metadata.h: Add comments about which fields are protected by
6661 2009-02-16 Zoltan Varga <vargaz@gmail.com>
6663 * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
6665 * generic-sharing.c (mono_method_construct_object_context): Remove the
6666 wrapper_type == NONE assert, it is not needed.
6668 2009-02-15 Zoltan Varga <vargaz@gmail.com>
6670 * reflection.c (clear_cached_object): New helper function.
6671 (mono_method_clear_object): New function to clear the cached reflection
6672 objects for a dynamic method.
6674 * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
6675 Partly fixes # 463323.
6677 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
6681 * reflection.c: Remove all explicit uses of MonoImage::property_hash.
6683 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
6685 * image.c: Add mono_image_property_(lookup,insert,remove) functions that
6686 take the image lock instead of the loader lock.
6688 * metadata-internals.h: Export new functions.
6690 2009-02-12 Miguel de Icaza <miguel@novell.com>
6692 * domain.c (app_config_parse): Remove another use of stat that is
6693 not necessary as g_file_get_contents already does the presence
6696 2009-02-13 Zoltan Varga <vargaz@gmail.com>
6698 * cominterop.c icall-def.h: Fix the DISABLE_COM build.
6700 * marshal.c: Move the bstr handling code to cominterop.c.
6702 * marshal.c: Remove some COM interop code missed previously.
6704 2009-02-12 Miguel de Icaza <miguel@novell.com>
6706 More Paolo patches from the Wii port:
6708 * security.c: Remove ves_icall_System_Environment_get_UserName
6711 * icall.c: And put ves_icall_System_Environment_get_UserName
6714 * appdomain.c (mono_set_private_bin_path_from_config): Remove
6715 redundant call to stat that was only used to test for the file
6716 existence. Patch from Paolo.
6718 * gc.c (run_finalize): If COM is disabled, do not link in
6719 mono_marshal_free_ccw.
6721 * generic-sharing.c: Use alloca.h here as well.
6723 2009-02-13 Rodrigo Kumpera <rkumpera@novell.com>
6725 * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
6727 2009-02-13 Zoltan Varga <vargaz@gmail.com>
6729 * cominterop.c cominterop.h: New files.
6731 * marshal.c: Move the COM interop related code to cominterop.c. Make a few
6732 function/typedefs which are needed by cominterop.c global.
6734 2009-02-12 Mark Probst <mark.probst@gmail.com>
6736 * generic-sharing.c: Don't take the loader lock to guard image
6739 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6741 * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
6742 called without the loader lock which is required to guard MonoImage:tokens.
6744 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6750 * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
6752 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6754 * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
6755 Rework the code to use regular mono_image_alloc/0.
6757 * loader.c: Rework the code to use regular mono_image_alloc/0.
6759 * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
6761 2009-02-12 Bill Holmes <billholmes54@gmail.com>
6763 * object-internals.h : Fixing a typo in the
6764 MonoReflectionComVisibleAttribute struct.
6766 * marshal.c (cominterop_com_visible): Check the implemented
6767 interfaces for ComImport.
6769 * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls
6770 assume that bools should be treated as VARIANTBOOLs.
6772 * marshal.c (emit_marshal_boolean): Adding cases for
6773 MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
6775 * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to
6776 emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
6778 * marshal.c (cominterop_get_ccw): For COM calls assume that bools
6779 should be treated as VARIANTBOOLs.
6781 Code is contributed under MIT/X11 license.
6783 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6785 * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
6786 allocation with the image lock.
6788 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6790 This patch is the last of a series to remove explicit reference of MonoImage::mempool
6791 and use mono_image_alloc set of functions instead. This time we finish with reflection.c
6793 * object.c: Add mono_string_to_utf8_image.
6795 * object-internals.h: Export mono_string_to_utf8_image.
6797 * reflection.c: Rework all explicit references to the the image mempool to go thought
6798 the mono_image_alloc set of functions.
6800 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6802 This patch is the third of a series to remove explicit reference of MonoImage::mempool
6803 and use mono_image_alloc set of functions instead. This time we finish with marshal.c
6804 and generics-sharing.c.
6806 * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
6807 as first argument. Note that this function remains broken as it doesn't perform locking around the
6810 * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
6812 * image.c: Add g_slist_append_image.
6814 * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
6815 the supplied image for allocation. Move code into mono_metadata_field_info_full.
6817 * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
6818 Fix all related code to do the same.
6820 * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
6822 * metadata-internals.h: Fix the signatures.
6824 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6826 This patch is the second of a series to remove explicit reference of MonoImage::mempool
6827 and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
6828 and similar to work using MonoImage.
6830 * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
6833 * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
6835 * class.c (mono_metadata_signature_deep_dup): Same.
6837 * class.c (inflate_generic_type): Same.
6839 * class.c (mono_class_inflate_generic_type_with_mempool): Same.
6841 * metadata.c (mono_metadata_signature_dup_full): Same.
6843 * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from
6844 mono_metadata_signature_dup_full.
6846 * metadata.c (mono_metadata_type_dup): Same.
6848 * marshal.c: Pass the image to calls to mono_metadata_type_dup.
6850 * reflection.c: Same.
6852 * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
6854 * metadata-internals.h: Fix the signatures.
6856 * class-internals.h: Same.
6858 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
6860 This patch is the first of a series to remove explicit reference of MonoImage::mempool
6861 and use mono_image_alloc set of functions instead.
6863 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
6864 Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
6867 * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
6869 * class.c (g_list_prepend_mempool): Removed.
6871 * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
6873 * image.c: Add g_list_prepend_image.
6875 * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
6877 * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
6880 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
6882 * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
6885 * image.c (mono_image_init): Init the lock field.
6887 * image.c (mono_image_init): Cleanup the lock field.
6889 * image.c: Add mono_image_(un)lock functions.
6891 2009-02-11 Mark Probst <mark.probst@gmail.com>
6893 * class.c, class-internals.h: mono_method_get_context_general()
6894 combines the functionality of mono_method_get_context() and
6895 mini_method_get_context().
6897 * generic-sharing.c, domain-internals.h:
6898 mono_method_construct_object_context() and
6899 mono_domain_lookup_shared_generic() moved from mini.
6901 * icall.c (ves_icall_InternalInvoke): Handle the case where the
6902 method doesn't have the correct instantiation because it's shared
6903 generic code. Fixes #473999.
6905 2009-02-11 Zoltan Varga <vargaz@gmail.com>
6907 * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
6909 * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
6911 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
6913 * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
6915 * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
6917 * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
6918 and recheck the cache for dups after it.
6920 * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
6922 Fixes one of the deadlocks found in #473150.
6924 2009-02-11 Bill Holmes <billholmes54@gmail.com>
6926 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
6927 For Win32, add additional break conditions for accept.
6929 Code is contributed under MIT/X11 license.
6931 2009-02-10 Zoltan Varga <vargaz@gmail.com>
6933 * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
6934 lazily initialize the native wrapper cache.
6935 (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
6936 cache, since they are different from the normal wrappers.
6938 * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
6940 * metadata-internals.h (struct _MonoImage): Add a new wrapper for
6941 AOT compiled native wrappers.
6943 2009-02-09 Geoff Norton <gnorton@novell.com>
6946 * security-core-clr.c: Allow enabling core-clr from the embedding
6949 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
6951 * socket-io.c: when requesting all the local ips, if there are no
6952 interfaces up and running, MS returns 127.0.0.1.
6954 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
6956 * mono-perfcounters-def.h: processor time is an inverse time.
6959 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
6961 * socket-io.c: an empty host name returns the list of local IPs.
6962 Fixes bug #386637 part 1/2.
6964 2009-02-07 Zoltan Varga <vargaz@gmail.com>
6966 * verify.c (mono_class_interface_implements_interface): Call
6967 mono_class_setup_interfaces ().
6968 (merge_stacks): Ditto.
6970 2009-02-06 Zoltan Varga <vargaz@gmail.com>
6972 * class.c (mono_class_setup_interfaces): New function to lazily initalize
6974 (mono_generic_class_get_class): Don't initalize klass->interfaces.
6975 (mono_generic_class_get_class): Ditto.
6977 2009-02-06 U-QUACK\miguel <miguel@quack>
6979 * icall-defs.h: Include also the Encrypt/Decrypt string methods as
6980 they live in security.c
6982 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
6983 another bit from Paolo's code.
6985 2009-02-06 Zoltan Varga <vargaz@gmail.com>
6987 * object.c (build_imt_slots): Add a small optimization to avoid inflating
6988 methods which will be discarded by add_imt_builder_entry ().
6990 * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
6993 * loader.c: Add a statistics for the size of the memberref signature cache.
6995 * loader.c (find_cached_memberref_sig): New helper function.
6996 (cache_memberref_sig): Ditto.
6998 * loader.c: Cache the result of parsing memberref signatures, since otherwise
6999 they will be parsed again for every generic instantiation, leading to unbounded
7002 2009-02-05 Zoltan Varga <vargaz@gmail.com>
7004 * loader.c (mono_get_method_from_token): Avoid creating class for the generic
7005 parameters of generic methods.
7007 * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
7008 after the original method is copied to the inflated method.
7009 (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
7011 * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
7012 field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
7014 * class.c metadata.c: Update after the changes above.
7016 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
7018 * metadata-verify.c: Simplified error handling and added
7019 section table validation.
7021 2009-02-05 Zoltan Varga <vargaz@gmail.com>
7023 * class-internals.h (MonoClassExt): New structure containing rarely used
7024 fields of MonoClass.
7025 (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
7026 through a new 'ext' field.
7028 * class.c (mono_class_alloc_ext): New helper function to allocate
7031 * class.c metadata.c reflection.c: Update after MonoClass structure changes.
7033 2009-02-05 Mark Probst <mark.probst@gmail.com>
7035 * object.c (mono_object_get_virtual_method): Properly inflate
7036 generic methods. Fixes #472692.
7038 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
7040 * class.c (mono_class_create_from_typedef): The CLR supports SystemF
7041 recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
7042 for the parent type, the created type must be ready to be used on a generic
7044 We fill this_arg/byval_arg if the parent is a generic instance to make sure
7045 we won't have duplicated entries in generic_inst_cache.
7049 2009-02-05 Miguel De Icaza <miguel@novell.com>
7051 * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
7052 replace with plain BSD per the comments on the bug MONO77637.
7054 2009-02-05 Zoltan Varga <vargaz@gmail.com>
7056 * class.c (mono_class_get_generic_class): New accessor function.
7057 (mono_class_get_generic_container): Ditto.
7059 * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
7060 fields, similar to the ones in MonoMethod.
7062 * class.c (mono_generic_class_get_class): Set klass->is_inflated.
7063 (mono_class_create_from_typedef): Set klass->is_generic if needed.
7065 * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
7067 * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
7068 the same information as element_class->byval_arg.
7070 * class.c reflection.c: Remove references to class->byval_arg.
7072 * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing
7073 klass->enum_basetype directly.
7075 * verify.c metadata.c object.c icall.c reflection.c: Use
7076 mono_class_enum_basetype () instead of accessing klass->enum_basetype
7079 2009-02-04 Miguel de Icaza <miguel@novell.com>
7081 * icall-def.h: Remove internal calls for sockets when
7082 DISABLE_SOCKET is defined, file system writing features when the
7083 OS only support reading and not writing data and Policy support if
7084 the Policy is disabled.
7086 * image.c (do_mono_image_open): Apply Paolo's patches for using
7087 mono_file_map_ APIs here.
7089 * assembly.c: Add support for platforms to avoid prefix
7092 2009-02-04 Zoltan Varga <vargaz@gmail.com>
7094 * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
7097 * class.c (mono_class_inflate_generic_class): New helper function.
7099 * class.c: Use mono_class_inflate_generic_class in a few places. Add
7100 statistics for inflated methods/classes.
7102 * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
7104 * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
7105 the call is made from Delegate.CreateDelegate () for the invoke method of
7108 * loader.c: Add a statistics for the memory occupied by inflated signatures.
7110 * metadata.c (mono_metadata_signature_size): New helper function.
7112 * class.c (mono_class_get_method_from_name_flags): Add an optimization for
7115 * metadata.c (inflated_method_in_image): Avoid calling
7116 mono_method_signature () if the method does not already have a signature.
7118 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
7120 * verify.c (is_compatible_boxed_valuetype): When checking if the boxed
7121 valuetype is compatible with target type, check by inheritance as a
7122 VT is not really compatible with System.ValueType, for example.
7124 * verify.c (do_invoke_method): Improve error message.
7126 * verify.c (do_box_value): If boxing a nullable, use the type argument
7129 * verify.c (do_newobj): Improve error message.
7133 2009-02-03 Miguel de Icaza <miguel@novell.com>
7135 * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
7137 2009-02-03 Mark Probst <mark.probst@gmail.com>
7139 * generic-sharing.c: Don't hold domain lock when calling
7140 instantiate_other_info(). Fixes #471958.
7142 * domain-internals.h, loader.c: Describe locking policy of domain
7143 lock vs loader lock.
7145 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
7147 * verify.c (mono_delegate_signature_equal): Make it possible to check
7148 first-arg-bound delegates to static method.
7150 * verify.c (verify_delegate_compatibility): Correctly verify delegates to
7151 static methods with the first arg bound.
7155 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
7157 * verify.c: Added stack_slot_full_name to provide decent and more meanfull
7160 * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
7161 under strict mode. Any type, when boxed can be seen as a reference type.
7165 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
7167 * object.h: The lower bound of an array is a signed integer value.
7168 Introduce mono_array_lower_bound_t typedef. It should be used instead of
7169 gint32 as under MONO_BIG_ARRAYS it will be a gint64.
7171 * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
7172 calculate the upper bound.
7176 2009-02-02 Miguel de Icaza <miguel@novell.com>
7178 From Paolo's work, refactored, cleared up:
7180 * threadpool.c, icall.c: ifdef code that requires a working socket
7183 * metadata.c (mono_metadata_field_info): Do not attempt to return
7184 a value from a function declared as void.
7186 * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
7187 from the console stack.
7189 * assembly.c: use strrchr instead of rindex.
7191 * class.c, object.c, marshal.c, icall.c, reflection.c: include
7192 alloca.h on systems that have it.
7194 * environment.c: Avoid code that uses stuff from
7197 * appdomain.c: Include sys/time.h.
7199 * console-io.c: include sys/ioctl.h if it is available.
7201 2009-02-03 Zoltan Varga <vargaz@gmail.com>
7203 * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
7205 * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
7208 * marshal.c: Set mb->skip_visibility instead of setting it on the method
7209 after it was created and cached, as the later is not thread safe.
7211 2009-02-02 Zoltan Varga <vargaz@gmail.com>
7213 * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
7214 called while the debugging module is not initialized. Fixes #471669.
7216 2009-02-02 Rodrigo Kumpera <rkumpera@novell.com>
7218 * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
7222 2009-02-02 Mark Probst <mark.probst@gmail.com>
7224 * generic-sharing.c (lookup_or_register_other_info): Make sure the
7225 loader lock is not taken while the templates lock is held. Fixes
7228 2009-02-02 Mark Probst <mark.probst@gmail.com>
7230 * metadata.c (type_in_image): Added a check to fix a monodis
7233 2009-02-02 Zoltan Varga <vargaz@gmail.com>
7235 * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
7238 * object.c (mono_runtime_invoke_array): Ditto.
7240 * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
7241 freeing wrappers of dynamic methods.
7243 * loader.c (mono_free_method): Call it. Fixes #463323.
7245 * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
7246 methods taking vtype/byref arguments, to fix yet another bug caused by
7247 the sharing of runtime invoke wrappers. Partly fixes #471259.
7249 2009-02-01 Zoltan Varga <vargaz@gmail.com>
7251 * debug-mono-symfile.c (check_line): Return NULL instead of returning
7252 <first file in file table>:1 when the IL offset does not have an associated
7255 2009-01-31 Zoltan Varga <vargaz@gmail.com>
7257 * mono-debug.c (mono_debug_lookup_locals): New function to return local
7258 variable info for a method.
7260 * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
7262 2009-01-30 Jb Evain <jbevain@novell.com>
7264 * pedump.c: reuse code from monodis to make sure pedump honors
7265 MONO_PATH, which is needed to verify net_2_1 assemblies.
7267 2009-01-29 Zoltan Varga <vargaz@gmail.com>
7269 * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
7270 there is no line number info.
7272 2009-01-29 Raja R Harinath <harinath@hurrynot.org>
7274 Avoid some MonoType allocations
7275 * reflection.c (mono_reflection_initialize_generic_parameter):
7276 Reuse MonoType from param->pklass rather than allocating one.
7277 (mono_dynamic_image_free): Update to changes.
7279 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
7281 Rearrange some code to improve consistency
7282 * reflection.c (mono_reflection_setup_generic_class): Move body ...
7283 (mono_reflection_initialize_generic_parameter): ... here.
7285 2009-01-28 Zoltan Varga <vargaz@gmail.com>
7287 * generic-sharing.c (has_constraints): Enable gshared for methods/classes
7288 with type constraints as an experiment.
7290 * boehm-gc.c (on_gc_notification): Update mono_stats.
7292 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
7294 Avoid some allocations
7295 * class-internals.h (_MonoGenericInst::type_argv): Convert from
7296 pointer to tail array to avoid extra allocation.
7297 * metadata.c (free_generic_inst): Update to changes.
7298 (mono_metadata_get_generic_inst): Likewise. Use alloca instead of
7301 2009-01-27 Zoltan Varga <vargaz@gmail.com>
7303 * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
7304 return TRUE if the two type objects are the same.
7306 2009-01-26 Zoltan Varga <vargaz@gmail.com>
7308 * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
7309 (mono_class_native_size): Use klass->marshal_info->min_align instead of
7310 klass->min_align, since klass->min_align contains the managed alignment,
7311 while the native alignment can be different, like for longs on x86.
7314 * class-internals.h (MonoMarshalType): Add a min_align field.
7316 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
7318 * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
7321 2009-01-26 Zoltan Varga <vargaz@gmail.com>
7323 * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
7324 some comments about the usage of the used_regs field.
7326 * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
7329 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
7331 * appdomain.c: return NULL instead of throwing FileNotFoundException
7332 when LoadAssembly() fails.
7334 2009-01-23 Mark Probst <mark.probst@gmail.com>
7336 * metadata.c (mono_metadata_generic_param_equal): Only compare the
7337 image if the owner is NULL. Fixes the AOT failures.
7339 2009-01-23 Zoltan Varga <vargaz@gmail.com>
7341 * metadata.c (mono_metadata_load_generic_params): Initialize the
7342 MonoGenericParam structure using memset so the image field is initialized
7345 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
7347 * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
7350 2009-01-21 Zoltan Varga <vargaz@gmail.com>
7352 * class.c (mono_class_setup_vtable_general): In the generic instance
7353 optimization, set method->slot for abstract virtual methods. Fixes part of
7356 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
7358 * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
7359 which signals that the unloading has started but all appdomain services must
7362 * appdomain.c (mono_domain_unload): The initial state for unloading now
7363 is unloading_start and we switch to unloading after the managed call to
7364 AppDomain::DomainUnload has finished.
7366 The new unloading state has to be created because managed code in the
7367 DomainUnload event can depend on things like the threadpool still working.
7368 The domain must remain fully functional while the event executes.
7370 This shown as an issue due to Process::WaitForExit, which waits for
7371 async reads of stdout and stderr to complete. Since those are processed
7372 in the threadpool the code deadlocks because the DomainUnload callback
7373 waits for the async read finished event, which should have been set by a
7374 threadpool job but has been discarded due to the domain been in unload
7377 2009-01-21 Mark Probst <mark.probst@gmail.com>
7379 * metadata.c (mono_metadata_generic_param_equal): Owner as well as
7382 2009-01-21 Mark Probst <mark.probst@gmail.com>
7384 * reflection.c (resolve_object): For fields, inflate the class and
7385 then get the field in the inflated class.
7387 2009-01-20 Mark Probst <mark.probst@gmail.com>
7389 * object-internals.h (struct _MonoException): Added a comment
7390 explaining the new use of trace_ips.
7392 2009-01-20 Mark Probst <mark.probst@gmail.com>
7394 * generic-sharing.c (inflate_other_data): Inflate array methods
7397 * loader.c, class-internals.h: Rename search_in_array_class() to
7398 mono_method_search_in_array_class() and make it non-static.
7400 2009-01-19 Zoltan Varga <vargaz@gmail.com>
7402 * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
7403 Hopefully fixes #458168.
7405 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
7407 * object.c (mono_raise_exception): Remove call to InterlockedIncrement
7408 as it is performed elsewhere.
7410 Code is contributed under MIT/X11 license
7412 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
7414 * mono-perfcounters-def.h: Add counters for asp.net requests total and
7416 * object.c (mono_raise_exception): Increment the exceptions total
7417 counter when an exception is thrown.
7418 * class-internals.h: Add a location for storing the total number of
7419 asp.net requests served.
7420 * mono-perfcounters.c: Implement update support for asp.net counters
7421 from the class libraries. Implement read support for asp.net counters
7422 and exceptions total counter.
7424 2009-01-19 Zoltan Varga <vargaz@gmail.com>
7426 * loader.c (search_in_array_class): Call mono_class_setup_methods () before
7427 accessing klass->methods. Fixes #467385.
7429 2009-01-18 Zoltan Varga <vargaz@gmail.com>
7431 * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
7432 for byval arguments without an [Out] attribute. Fixes #467212.
7434 * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com).
7435 Fix compilation under android.
7437 * sgen-gc.c: Instead of scanning gray objects after all roots have been
7438 processed, scan them directly after they are copied, to achieve better locality
7441 * socket-io.c: Applied patch from Koushik Dutta
7442 (koush@koushikdutta.com). Disable IPV6 when running under android.
7444 2009-01-18 Zoltan Varga <vargaz@gmail.com>
7446 * icall.c (ves_icall_InternalExecute): Add write barriers.
7448 * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
7451 * sgen-gc.c: Implement write barriers in IL code.
7453 2009-01-17 Geoff Norton <gnorton@novell.com>
7455 * image.c: Avoid trying to walk the reference table of dynamic assemblies.
7457 2009-01-17 Geoff Norton <gnorton@novell.com>
7459 * image.c: When unloading the image->references table, there can be gaps
7460 in it. Ensure that we iterate every entry to avoid leaking assembly references
7461 when unloading an appdomain.
7463 2009-01-16 Zoltan Varga <vargaz@gmail.com>
7465 * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
7466 speed up ptr-in-nursery checks.
7468 * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
7469 threads_lock () to prevent deadlocks.
7471 * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
7472 does not need to be scanned during minor collections, since writes to it
7473 must use write barriers.
7475 2009-01-15 Rodrigo Kumpera <rkumpera@novell.com>
7477 * metadata-verify.c: Add pe nt header verification.
7479 2009-01-15 Zoltan Varga <vargaz@gmail.com>
7481 * gc.c: Fix a few warnings when using SGEN.
7483 2009-01-14 Rodrigo Kumpera <rkumpera@novell.com>
7485 * metadata-verify.c: Add pe optional header verification.
7487 2009-01-15 Zoltan Varga <vargaz@gmail.com>
7489 * sgen-gc.c: Add support for user defined marker functions, used by
7490 MonoGHashTable to avoid registering a GC root for every hash node.
7492 2009-01-14 Zoltan Varga <vargaz@gmail.com>
7494 * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
7495 non-pinned roots into separate hashes to avoid having to traverse them
7496 in functions which are only interested in one kind.
7498 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
7500 * metadata-verify.c: Add pe header machine field verification.
7502 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
7504 * metadata-verify.c: Add pe header size verification.
7506 2009-01-14 Zoltan Varga <vargaz@gmail.com>
7508 * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
7509 using the GC, they don't contain references.
7511 * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
7513 2009-01-13 Geoff Norton <gnorton@novell.com>
7515 * appdomain.c|h: Expose mono_domain_unload to the embedding api so that
7516 AppDomains created on the native side can be cleaned up on the native side.
7518 2009-01-13 Geoff Norton <gnorton@novell.com>
7520 * appdomain.c: Ensure that we call mono_context_init for the embedding api
7521 as well as the managed api.
7523 2009-01-13 Geoff Norton <gnorton@novell.com>
7525 * appdomain.h|c: New API for creating a MonoDomain in the embedding api
7526 with a MonoAppDomain initialized against it.
7528 2009-01-13 Zoltan Varga <vargaz@gmail.com>
7530 * reflection.c (MOVING_GC_REGISTER): Fix a warning.
7532 * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
7534 * marshal.c: Avoid setting the exception clauses after a method has been entered
7535 into the wrapper caches. Fixes #465700.
7537 * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
7539 (mono_mb_create_method): Set the clauses from the method builder.
7541 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
7543 * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
7544 Patch from Makoto Kishimoto.
7546 2009-01-13 Zoltan Varga <vargaz@gmail.com>
7548 * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by
7549 encoding them as ROOT_DESC_COMPLEX.
7550 (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
7552 2009-01-12 Zoltan Varga <vargaz@gmail.com>
7554 * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
7555 no longer point to the nursery.
7557 * sgen-gc.c: Add a few comments/FIXMEs.
7559 * sgen-gc.c: Implement scanning of the alloc_pinned objects.
7561 * marshal.c (mono_marshal_get_synchronized_wrapper): Make the
7562 initialization of the various _method variables thread safe. Fixes
7565 2009-01-12 Mark Probst <mark.probst@gmail.com>
7567 * domain.c, domain-internals.h: Remove the shared_generics_hash
7568 and its lookup functions.
7570 2009-01-12 Bill Holmes <billholmes54@gmail.com>
7572 * socket-io.c: Fixing the MSVC build.
7574 Code is contributed under MIT/X11 license.
7576 2009-01-12 Rodrigo Kumpera <rkumpera@novell.com>
7578 * metadata-verify.c: Add pe header watermark verification.
7580 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
7582 * metadata-verify.c: Add lfanew verification.
7584 2009-01-12 Jb Evain <jbevain@novell.com>
7586 * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
7587 METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
7589 2009-01-10 Zoltan Varga <vargaz@gmail.com>
7591 * socket-io.c: Fix the build.
7593 * environment.c: Fix an #ifdef.
7595 2009-01-09 Zoltan Varga <vargaz@gmail.com>
7597 * threadpool.c (async_invoke_thread): Handle the wait function returning
7598 WAIT_IO_COMPLETION as well.
7599 (async_invoke_io_thread): Ditto.
7601 2009-01-09 Bill Holmes <billholmes54@gmail.com>
7603 * threads.c: Fixing the Windows build.
7605 Code is contributed under MIT/X11 license.
7607 2009-01-09 Zoltan Varga <vargaz@gmail.com>
7609 * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
7611 (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
7612 the thread to wait again.
7614 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
7616 * metadata-verify.c: Initial skeleton of the metadata verifier.
7618 * pedump.c: Add support for the metadata verifier.
7620 * verify-internal.h: Export the whole assembly metadata verifier function.
7622 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
7624 * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
7626 2009-01-09 Zoltan Varga <vargaz@gmail.com>
7628 * Makefile.am: Upgrade dtrace-prelink.sh location.
7630 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
7632 * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
7633 well. Otherwise the shutdown deadlock that happens on unix will can happen
7635 If the main thread code finishes too fast it's possible that the finalizer
7636 thread won't have executed yet, won't record itself as the finalizer thread
7637 and the shutdown sequence will wait on it forever.
7639 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
7641 * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
7644 2009-01-08 Miguel de Icaza <miguel@novell.com>
7646 * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
7647 Robert Jordan for pointing this out.
7649 2009-01-08 Christian Prochnow <cproch@seculogix.de>
7652 * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
7653 ves_icall_System_IO_DriveInfo_GetDriveType.
7655 2009-01-07 Miguel de Icaza <miguel@novell.com>
7657 * icall.c: Wrap calls to mono_strtod in CriticalSection
7658 invocations when using eglib, to work around #464316.
7660 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
7662 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
7663 return value of GetCurrentDirectory to never access unitialized memory.
7665 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
7667 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
7668 return value of GetCurrentDirectory and expand the buffer if needed.
7672 2009-10-07 Tom Hindle <tom_hindle@sil.org>
7674 * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) :
7675 Adding a call to mono_init_com_types.
7677 Code is contributed under MIT/X11 license.
7679 2009-01-07 Geoff Norton <gnorton@novell.com>
7681 * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on
7682 darwin. Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
7683 ai_canonname can be null in some cases on darwin, where the runtime assumes it will
7684 be the value of the ip buffer.
7686 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
7688 * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
7689 interfaces_packed here.
7691 Fixes part of #463294.
7693 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
7695 * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
7697 Fixes part of #463294.
7699 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
7701 * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
7702 is a boxed complex as well.
7704 Fixes part of #463294.
7706 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
7708 * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
7709 control if a methodspec should be created for the generic method definition from external assemblies.
7710 Caching of methodspec is done using the handleref hash table.
7714 2009-01-05 Rodrigo Kumpera <rkumpera@novell.com>
7716 * loader.c (find_method): When searching the interfaces of a class
7717 check the transitive closure of implemented interfaces.
7721 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
7723 * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
7725 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
7727 * class.c (get_implicit_generic_array_interfaces): Extract valuetype
7728 interfaces calculation to fill_valuetype_array_derived_types.
7730 * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
7731 ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
7734 * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
7735 interfaces for valuetypes if needed.
7737 * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
7738 for their basetype as well. Types are array expanded if rank is > 0.
7742 2008-12-30 Bill Holmes <billholmes54@gmail.com>
7744 * socket-io.h : Changing the signature of
7745 ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
7748 * icall-def.h : Changing the signature of
7749 System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
7751 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
7752 For Windows only. Avoid blocking when calling accept by
7753 querying for a connection via select. The loop also queries
7754 the thread state every 1000 micro seconds for the thread
7755 stop state. This will avoid the process hanging on shutdown
7756 when using a TcpChannel that is never connected to.
7758 Code is contributed under MIT/X11 license.
7760 2008-12-30 Marek Safar <marek.safar@gmail.com>
7762 * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
7764 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
7766 * class.c (get_implicit_generic_array_interfaces): Extract common
7767 code to a helper function making it a lot easier on the eyes.
7769 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
7771 * class.c (get_implicit_generic_array_interfaces): If the internal
7772 enumerator is an interface inflate System.Object instead of itself.
7776 2008-12-24 Rodrigo Kumpera <rkumpera@novell.com>
7778 * object.c (mono_runtime_invoke_array): Don't assert with
7779 byref nullable types.
7781 * marshal.c (mono_marshal_get_runtime_invoke): To handle
7782 byref nullables we unbox the object and store it on the
7784 We can't use the boxed object since it is the T of Nullable<T>
7785 and the boxed representation of a nullable it's underlying type
7787 We could cheat and create a boxed nullable and use the same
7788 machinery of other byref VTs but this feels like a hack and
7789 using the stack has the bonus of reducing heap pressure.
7793 2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
7795 * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
7800 2008-12-19 Bill Holmes <billholmes54@gmail.com>
7802 * icall-def.h : Adding an internal call definition for
7803 System.Environment.internalBroadcastSettingChange.
7805 * icall.c : Adding a Windows only implementation to broadcast a
7806 WM_SETTINGCHANGE when an environment variable has changed.
7808 Code is contributed under MIT/X11 license.
7810 2008-12-19 Mark Probst <mark.probst@gmail.com>
7812 * class.c, class-internals.h: Made
7813 mono_class_has_parent_and_ignore_generics() non-static.
7815 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
7817 * image.c: deal with the mmap failing when loading an image.
7819 2008-12-17 Geoff Norton <gnorton@novell.com>
7821 * threadpool.c: Ensure that the io_queue_lock is initialized
7822 in all circumstances, as we always attempt to cleanup against it.
7824 2008-12-17 Miguel de Icaza <miguel@novell.com>
7826 * icall.c (ves_icall_System_Environment_get_Platform): For
7827 compatibility reasons for existing client code we will keep
7828 returning 4 for a while.
7830 For how long will depend on the documentation being updated, and
7831 for us to give client code a chance to be updated.
7833 This reverts the original decison on #433108 since we did not
7834 catch roughly 33 instances of the broken code in our own source
7835 code base, we did not catch failures on the buildbots, and QA did
7836 not bring this as a problem.
7838 Only today I found some customer's code breaking due to our own
7839 class libraries not being fully updated and tracked it down to
7840 this change. I am reverting it because if we could not even get
7841 our story straight in our own code base, how can we hope that our
7842 end user code be fixed?
7844 As of this morning, our Wiki page that documents how to detect
7845 Unix had not been fixed.
7847 2008-12-16 Zoltan Varga <vargaz@gmail.com>
7849 * metadata.c (inflated_method_in_image): Add a workaround for #458168.
7851 * class.c (mono_class_get_fields): Handle loading errors.
7853 2008-12-12 Mark Mason <mmason@upwardaccess.com>
7855 * 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.
7857 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
7859 * mono-perfcounters.c: avoid warning.
7861 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
7863 * reflection.c (ensure_runtime_vtable): Work on generic instances and
7864 make sure all interfaces have MonoClass::interface_id set.
7866 * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
7867 method table is property set.
7869 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
7871 * class.c: New function mono_class_setup_interface_id that setup
7872 MonoClass::interface_id if needed.
7874 * class-internals.h: Export new function.
7876 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
7878 * class.c: Add code to sanity check the vtable after setup_vtable_general
7881 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
7883 * icall.c: make Assembly.GetExecutingAssembly work properly when
7884 reflection is used to invoke the method.
7887 2008-12-11 Mark Probst <mark.probst@gmail.com>
7889 * metadata/generic-sharing.c: Look for constraints in all type
7890 arguments, not just the first one.
7892 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
7894 * appdomain.c: return the correct CodeBase for an Assembly instance
7895 that was loaded from the shadow-copy directories.
7898 2008-12-10 Zoltan Varga <vargaz@gmail.com>
7900 * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
7902 * sgen-gc.c (check_object): New debugging helper function.
7904 * object.c: Fix calls to mono_value_copy_array ().
7906 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
7908 * class.c (mono_class_setup_fields): If working on an inflated class
7909 first check if the generic definition did init with success.
7913 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
7915 pedump.c (main): Fix a warning.
7917 2008-12-10 Bill Holmes <billholmes54@gmail.com>
7919 * object-internals.h : Adding a definition for
7920 MonoReflectionComVisibleAttribute.
7922 * marshal.c (cominterop_com_visible) : Method added to check the
7923 ComVisible attribute of a class.
7925 * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :
7926 cominterop_raise_hr_exception added to consolidate common code
7927 to raise hr exceptions.
7929 * marshal.c (cominterop_can_support_dispatch) : Method added to determine
7930 if a managed class should support IDispatch.
7933 (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :
7934 Added additional checks for managed object when getting
7935 an IDispatch interface.
7937 Code is contributed under MIT/X11 license.
7939 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
7941 pedump.c (main): Handle mono_get_method () returning NULL.
7943 2008-12-09 Zoltan Varga <vargaz@gmail.com>
7945 * marshal.h: Fix a warning.
7947 2008-12-09 Bill Holmes <billholmes54@gmail.com>
7949 * marshal.c : Adding cominterop_release_all_rcws to release all
7950 runtime callable wrappers held by the runtime.
7952 * marshal.h : Adding declaration for cominterop_release_all_rcws.
7954 Code is contributed under MIT/X11 license.
7956 2008-12-09 Zoltan Varga <vargaz@gmail.com>
7958 * metadata.c (mono_image_alloc_lock): New helper function.
7959 (mono_image_alloc0_lock): Ditto.
7961 * metadata.c: Use the alloc_lock () helper functions for allocating
7962 memory from the image mempool.
7964 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
7966 * class.c (mono_class_from_generic_parameter): Document it's
7967 locking behavior. Fix double checked locking here, we stored in
7968 param->pklass a partially initialized MonoClass and no membar was used.
7970 2008-12-05 Marek Habersack <mhabersack@novell.com>
7972 * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
7973 (3) functions are present in the C library use them to do the
7974 job. If they are absent, make sure that the sum of int_part and
7975 dec_part is rounded before returning. This is necessary due to the
7976 division of dec_part by the power of 10 before the final addition
7977 is performed - if the result is not rounded in some cases it will
7978 yield invalid results.
7980 2008-12-04 Zoltan Varga <vargaz@gmail.com>
7982 * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
7983 wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR
7984 instruction instead of a pointer constant.
7986 2008-12-03 Zoltan Varga <vargaz@gmail.com>
7988 * loader.c (mono_method_get_header): Do most of the work outside the
7989 loader lock, to avoid assembly load hook deadlocks.
7991 * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
7992 (mono_metadata_parse_type_full): Ditto.
7994 2008-12-02 Rodrigo Kumpera <rkumpera@novell.com>
7996 * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
7997 Make the stack depth fixed. Ensure proper argument passing to the backtrace
7998 funtions. Finally, use a lock to produce well ordered output.
8000 The lock looks silly, as all calls to the corlib mempool should be guarded
8001 with the loader lock, but for some reason this fact doesn't help.
8003 * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
8005 2008-12-02 Mark Probst <mark.probst@gmail.com>
8007 * socket-io.c: 64 bit big-endian fixes.
8009 2008-12-01 Rodrigo Kumpera <rkumpera@novell.com>
8011 * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
8012 targets that require strict compatibility between the types.
8014 * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
8015 to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
8016 Kill the strict argument and create a new one valuetype_must_be_boxed.
8018 * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
8019 state that all valuetypes must be boxed.
8023 2008-11-29 Kornél Pál <kornelpal@gmail.com>
8025 * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
8026 IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
8028 Contributed under MIT/X11 license.
8030 2008-11-28 Rodrigo Kumpera <rkumpera@novell.com>
8032 * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
8033 the inflate_generic_type machinery should handle it.
8035 This avoids a crash when the field's flags is zero and it's type is
8037 What happens is that mono_metadata_parse_type_full will see that opt_attrs
8038 is zero and will return one of the cached built-in primitive types. Since
8039 those types live in read-only memory, the code that copies it crashes.
8041 2008-11-28 Mark Probst <mark.probst@gmail.com>
8043 * object.c: Don't put function descriptors into generalized IMT
8046 2008-11-28 Mark Probst <mark.probst@gmail.com>
8048 * class.c: Enable generic code sharing on PPC64.
8050 2008-11-27 Mark Probst <mark.probst@gmail.com>
8052 * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
8055 * generic-sharing.c: Allocate the method template slists from the
8056 image mempool so it doesn't leak.
8058 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
8060 * class.c (generic_array_methods): Release the linked list.
8062 2008-11-27 Mark Probst <mark.probst@gmail.com>
8064 * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
8065 invocation to g_utf16_to_utf8().
8067 2008-11-26 Mark Probst <mark.probst@gmail.com>
8069 * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
8070 arguments on big endian archs.
8072 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
8074 * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
8075 the type name (test added in corlib).
8077 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
8079 * pedump.c: initialize perf. counters. Fixes a segv.
8081 2008-11-25 Martin Baulig <martin@ximian.com>
8083 * mono-debug-debugger.c
8084 (mono_debugger_runtime_invoke): Return the exception object if an
8085 exception was thrown. Visual Studio displays the exception object
8086 in the locals window.
8088 2008-11-24 Mark Probst <mark.probst@gmail.com>
8090 * mini-trampolines.c (mono_delegate_trampoline): Don't return a
8093 2008-11-24 Mark Probst <mark.probst@gmail.com>
8095 * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
8096 MONO_TYPE_U are sizeof (gpointer), too.
8098 2008-11-24 Mark Probst <mark.probst@gmail.com>
8100 * marshal.c (mono_type_native_stack_size): Fixed size and
8101 alignment for reference types.
8103 2008-11-23 Mark Probst <mark.probst@gmail.com>
8105 * class.c (mono_class_generic_sharing_enabled): Disable generic
8106 code sharing for PPC64.
8108 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
8110 * icall.c (mono_method_get_equivalent_method): Make sure
8111 method->klass->methods is inited before looping over it.
8113 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
8115 * object.c: when calling ExecuteAssembly in a newly created domain,
8116 the configuration file and application base are already set up.
8117 Bug #446353 take 2 fixed.
8119 2008-11-20 Zoltan Varga <vargaz@gmail.com>
8121 * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
8122 Fixes #444715. Fix a warning.
8124 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
8126 * appdomain.c: write the full path of the assembly to the .ini file
8127 created when "shadow-copying"
8130 2008-11-18 Zoltan Varga <vargaz@gmail.com>
8132 * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
8133 if signature==FALSE.
8135 2008-11-17 Bill Holmes <billholmes54@gmail.com>
8137 * marshal.h : Fix the cygwin build.
8138 marshal.c:12442: undefined reference to `_IID_IMarshal'
8140 Code is contributed under MIT/X11 license.
8142 2008-11-17 Bill Holmes <billholmes54@gmail.com>
8144 * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
8145 free threaded marshaler when QueryInterface is called on a COM callable
8146 wrapper requesting the IMarshal interface.
8148 Code is contributed under MIT/X11 license.
8150 2008-11-14 Zoltan Varga <vargaz@gmail.com>
8152 * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
8154 * reflection.c (mono_type_get_object): Special case the very common
8157 * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
8160 2008-11-13 Bill Holmes <billholmes54@gmail.com>
8162 * process.h : Adding method declaration for
8163 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
8165 * process.c : Adding implementation for
8166 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
8168 * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
8169 to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
8171 Code is contributed under MIT/X11 license.
8173 2008-11-10 Rodrigo Kumpera <rkumpera@novell.com>
8175 * appdomain.c (unload_thread_main): Clean up threadpool by
8176 calling mono_thread_pool_remove_domain_jobs.
8178 * domain-internals.h (struct _MonoDomain): Add new fields to
8179 help coordinate the cleanup of the threadpool.
8181 * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
8182 that cleans up the threadpool of all jobs associated with an appdomain.
8183 It does that by cleaning up the queues and making sure all active
8184 threads are accounted.
8186 * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
8187 unloaded or in the process of. Take this is such way that there is
8188 no race condition between another thread starting the unload and the
8189 current thread acknowledging it.
8191 * threadpool.c (async_invoke_thread): Same.
8193 * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
8194 firing the new thread.
8196 * threadpool.c (start_tpthread): Same.
8198 * theadpool.c (append_job): Increment threadpool_jobs before queueing.
8200 * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
8202 2008-11-06 Jonathan Chambers <joncham@gmail.com>
8204 * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle):
8205 Add support for DuplicateHandle.
8207 * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
8208 Add support for DuplicateHandle.
8210 * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
8211 Add support for DuplicateHandle.
8213 Code is contributed under MIT/X11 license.
8215 2008-11-06 Mark Probst <mark.probst@gmail.com>
8217 * class-internals.h: Make min_align into a whole byte.
8219 * class.c: Set min_align for SIMD types to 16.
8221 2008-11-05 Geoff Norton <gnorton@novell.com>
8223 * attach.c: Default the attacher to enabled for all cases including
8226 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
8228 * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
8231 2008-11-04 Mark Probst <mark.probst@gmail.com>
8233 * monitor.c, monitor.h: New function for querying offsets of
8234 members of MonoThreadsSync.
8236 2008-11-04 Zoltan Varga <vargaz@gmail.com>
8238 * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
8239 to speed up this function and to avoid the boundless memory growth caused by
8240 the signature_dup () calls.
8242 2008-11-02 Zoltan Varga <vargaz@gmail.com>
8244 * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
8247 * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
8250 * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
8252 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
8255 * domain-internals.h: made mono_set_private_bin_path_from_config()
8257 * object.c: call the above function after setting the configuration
8258 file path for the root domain.
8261 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
8263 * assembly.c: when the assembly is loaded from an absolute path, end
8264 basedir with a directory separator.
8267 2008-10-30 Mark Probst <mark.probst@gmail.com>
8269 * monitor.c (mono_monitor_get_fast_enter_method): If
8270 CompareExchange is not available, don't create the fastpath
8271 instead of asserting. (The method is missing in the 1.1 profile.)
8273 2008-10-30 Mark Probst <mark.probst@gmail.com>
8275 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
8277 * monitor.c, monitor.h: Code for generating Monitor.Enter and
8278 Monitor.Exit IL fastpaths.
8280 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
8282 * class.c (mono_class_create_from_typedef): Added Vector2ul.
8284 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
8286 * class.c (mono_class_create_from_typedef): Added Vector2l.
8288 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
8290 * class.c (mono_class_create_from_typedef): Added Vector2d.
8292 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
8294 * appdomain.c: translate \ into / for cache_path.
8295 * domain-internals.h: new mono_is_shadow_copy_enabled().
8296 * icall.c: (fill_reflection_assembly_name) do the same path
8297 manipulations that get_code_base does.
8298 (get_code_base) use mono_is_shadow_copy_enabled.
8300 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
8302 * appdomain.c: shadow-copied assemblies go to CachePath +
8303 ApplicationName when both are set. DynamicBase has nothing to do with
8307 2008-10-26 Zoltan Varga <vargaz@gmail.com>
8309 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
8310 STANDALONESIG table.
8312 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
8313 standalone signatures.
8315 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
8316 comparison code: instead of comparing the signatures using a custom
8317 equals function, transform them to a common signature and compare that. This
8318 works better with AOT.
8320 2008-10-25 Zoltan Varga <vargaz@gmail.com>
8322 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
8324 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
8325 call for generic instances.
8326 (mono_class_setup_properties): Call setup_properties () before accessing
8329 * class.c (mono_class_get_virtual_methods): New helper function to iterate
8330 over the virtual methods of a class using metadata if possible, avoiding the
8331 creation of MonoMethod's for non-virtual methods.
8333 * class.c (mono_class_setup_vtable_general): Rewrite this to use
8334 get_virtual_methods () to iterate over the virtual methods of classes.
8336 2008-10-25 Martin Baulig <martin@ximian.com>
8338 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
8340 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
8342 * class.c (mono_class_create_from_typedef): Added Vector4i.
8344 2008-10-24 Mark Probst <mark.probst@gmail.com>
8346 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
8347 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
8348 special-casing applies to eliminate the call completely.
8350 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
8352 * class.c (mono_class_create_from_typedef): Added Vector8s.
8354 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
8356 * class.c (mono_class_create_from_typedef): Added Vector16sb.
8358 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
8360 * icall.c: get rid of annoying warning.
8362 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
8364 * threadpool.c: in 1.x, if you change the background status of the
8365 threadpool thread, it's not reset.
8366 Remove unnecessary calls to SetState.
8368 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
8370 * threadpool.c: asynchronously create a set of idle threads upon first
8371 use of the threadpool. SetMinThreads will now start the appropriate
8372 number of idle threads if they are not already running. The default is
8373 1 threadpool thread per CPU. Increased the maximum number of threads
8376 2008-10-22 Martin Baulig <martin@ximian.com>
8378 Revert r116521 from Zoltan, it breaks the debugger:
8380 * class.c (mono_class_get_virtual_methods): New helper function to iterate
8381 over the virtual methods of a class using metadata if possible, avoiding the
8382 creation of MonoMethod's for non-virtual methods.
8384 * class.c (mono_class_setup_vtable_general): Rewrite this to use
8385 get_virtual_methods () to iterate over the virtual methods of classes.
8387 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
8389 * threads.c: when creating a threadpool thread, set its state to
8391 * threadpool.c: reset the background state of a threadpool thread
8392 after finishing each work item
8395 2008-10-22 Zoltan Varga <vargaz@gmail.com>
8397 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
8399 * class.c (mono_class_setup_vtable_general): Add an optimized version for
8400 generic instances which works by inflating the methods in the container
8403 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
8404 variant which doesn't make a copy if no inflation was done.
8405 (mono_class_setup_fields): Use it.
8407 * metadata.c (mono_metadata_get_shared_type): New helper function to
8408 return a shared instance of a given MonoType.
8410 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
8411 a copy of most non-generic types.
8413 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
8415 * threadpool.c: remove one more GetSystemInfo () call.
8417 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
8419 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
8420 use the code in mono-proclib.h to get processor information.
8422 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
8424 * appdomain.c: fixed the logic that determines whether assemblies in a
8425 directory are "shadow-copied" or not. Bug #433483 fixed.
8427 2008-10-22 Zoltan Varga <vargaz@gmail.com>
8429 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
8432 2008-10-21 Zoltan Varga <vargaz@gmail.com>
8434 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
8437 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
8438 reflection.c: Use mono_field_get_name () for accessing a field's name.
8440 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
8443 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
8446 * loader.c (find_method_in_class): Reenable the metadata optimization by
8447 not using it for generic instances.
8449 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
8450 data/def_type fields from MonoClassField into a separate structure.
8451 (struct MonoClassField): Remove data/def_type fields.
8452 (struct _MonoClass): Add a 'field_def_values' array to store the default
8453 values/RVA for fields.
8455 * class.c reflection.c: Update after the changes.
8457 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
8458 for accessing field->data.
8460 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
8462 * loader.c (find_method_in_class): Revert the last change for now as
8463 it breaks Mono.C5 unit tests.
8465 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
8466 'field_generic_types' and 'field_objects' which contain the information
8467 previously stored in MonoInflatedField.
8468 (MonoInflatedField): Delete.
8469 (struct _MonoClassField): Delete 'generic_info' field.
8471 * reflection.c: Store the information which was previously in
8472 field->generic_info in MonoDynamicGenericClass instead.
8474 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
8475 MonoClassField changes.
8477 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
8479 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
8480 store the value inside the data array of the MonoMethodWrapper.
8481 This saves memory, is faster and fixes the lifetime issues (methods
8482 were never removed from the hash previously). May also fix bug#436996.
8484 2008-10-21 Zoltan Varga <vargaz@gmail.com>
8486 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
8487 generic instances, compute the type from the generic definition instead of
8488 looking in field->generic_info.
8490 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
8491 for inflated fields, the only user was get_fieldref_token () which no
8494 * class.c (mono_class_init): Revert the last change as it seems to cause
8497 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
8498 bytes on 64 bit platforms.
8500 * object.c (mono_class_create_runtime_vtable): Fix a warning.
8502 * object.c (mono_class_create_runtime_vtable): Don't initalize
8503 field->data/field->def_type here, it is done lazily by
8504 mono_class_get_field_default_value ().
8506 * icall.c (ves_icall_get_enum_info): Call
8507 mono_class_get_field_default_value () instead of directly accessing
8508 field->data and field->def_type.
8510 * object.c (get_default_field_value): Ditto.
8512 * class.c (mono_field_get_data): Ditto.
8514 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
8515 call for generic instances.
8517 * loader.c (find_method_in_class): If klass != from_class, then inflate
8518 the method with the context of from_class, since the caller assumes this.
8520 2008-10-20 Zoltan Varga <vargaz@gmail.com>
8522 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
8523 for accessing method->slot.
8525 2008-10-20 Cedric Vivier <cedricv@neonux.com>
8527 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
8529 2008-10-19 Zoltan Varga <vargaz@gmail.com>
8531 * class.c (mono_method_get_vtable_index): Use
8532 mono_method_get_vtable_slot () for accessing method->slot.
8534 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
8535 accessing klass->methods.
8537 * class.c (mono_method_get_vtable_slot): New helper function.
8538 (mono_class_get_vtable_entry): Ditto.
8539 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
8540 accessing method->slot.
8542 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
8543 method to get_inflated_method ().
8545 * class.c (mono_class_get_inflated_method): New helper method to obtain
8546 a method of an inflated class without calling setup_methods ().
8547 (mono_class_get_cctor): Use get_inflated_method.
8549 * generic-sharing.c (mono_class_get_method_generic): Ditto.
8551 * marshal.c image.c: Lazily create all the marshal caches.
8553 * image.c (mono_image_init): Move initialization of runtime_invoke
8554 caches to marshal.c.
8556 * marshal.c (get_cache): New helper function to lazily initialize a
8558 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
8560 * debug-helpers.c (mono_method_full_name): Include generic arguments.
8562 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
8564 * loader.c: fixed check for interface type.
8566 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
8568 * appdomain.c: check for NULL setup before it's referenced.
8571 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
8573 * class.c: remove the unused old vtable setup code.
8575 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
8577 * class.c: don't depend on interface order in
8578 setup_interface_offsets (bug #435777).
8579 * reflection.c: sort the InterfaceImpl table (patch from
8580 Jb Evain <jbevain@novell.com>).
8582 2008-10-13 Zoltan Varga <vargaz@gmail.com>
8584 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
8585 the low level assemblies lock.
8587 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
8589 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
8590 object.c, reflection.c, socket-io.c, threads.c: introduced
8591 mono_framework_version () to return the major framewrok version,
8592 changed the code that was using more complex patterns to use it.
8593 Return the correct value for PlatformID for OSX.
8595 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
8597 * icall-def.h, process.h, process.c: added an icall to get info about
8598 processes using mono-proclib.
8600 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
8602 * mono-perfcounters.c: use the mono-proclib functions to
8603 access process information.
8605 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
8607 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
8608 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
8609 reflection.c: remove rawbuffer usage: mmap support is more sanely
8610 provided by utils/mono-mmap.
8612 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
8614 * gc.c: use posix semaphores when possible so that
8615 mono_gc_finalize_notify() is signal safe.
8617 2008-10-11 Zoltan Varga <vargaz@gmail.com>
8619 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
8620 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
8621 be #ifdef-ed out, the linker will remove the rest.
8623 * marshal.c: Implement DISABLE_COM.
8625 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
8627 2008-10-11 Miguel de Icaza <miguel@novell.com>
8629 * locales.c (string_invariant_compare_char): Optimization: do not
8630 call g_unichar_type unless we actually need the information.
8632 2008-10-10 Mark Probst <mark.probst@gmail.com>
8634 * object.c, class-internals.h: Also create remoting trampolines
8635 for generic methods. Pass the domain to the remoting trampoline
8636 creation function, too.
8638 2008-10-10 Zoltan Varga <vargaz@gmail.com>
8640 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
8642 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
8644 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
8647 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
8650 * locales.c: remove the use of g_strdown. Fixes bug #322313.
8652 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
8654 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
8655 for the least possible amount of time (extending the fix in r113458).
8657 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
8659 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
8661 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
8663 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
8664 as possible simd intrinsic types.
8665 Optimized the test to check for the common prefix first.
8667 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
8669 * class.c: back out part of a broken optimization committed on
8670 May 23th (bug #433908).
8672 2008-10-09 Mark Probst <mark.probst@gmail.com>
8674 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
8675 Win32. Should fix #432388 for most cases until we have the new
8678 2008-10-08 Zoltan Varga <vargaz@gmail.com>
8680 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
8681 instead of using inst->id so the hash is stable for AOT.
8683 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
8686 * icall.c: create a .ini file for shadow-copied assemblies that
8687 contains the location of the original assembly. Use this to return the
8688 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
8689 Also fix the number of '/' for windows when returning the CodeBase.
8692 2008-10-07 Bill Holmes <billholmes54@gmail.com>
8694 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
8696 Code is contributed under MIT/X11 license.
8698 2008-10-07 Bill Holmes <billholmes54@gmail.com>
8700 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
8701 if if the class vtable needs initialized.
8703 Code is contributed under MIT/X11 license.
8705 2008-10-07 Bill Holmes <billholmes54@gmail.com>
8707 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
8708 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
8709 STRING->BSTR, and CLASS->INTERFACE.
8711 Code is contributed under MIT/X11 license.
8713 2008-10-07 Marek Habersack <mhabersack@novell.com>
8715 * sysmath.h: changed the declaration of the
8716 ves_icall_System_Math_Round2 icall by adding an extra
8717 away_from_zero parameter.
8719 * sysmath.c (ves_icall_System_Math_Round2): added support for
8720 away from zero rounding. The icall now takes an extra boolean
8721 parameter to signal that away from zero operation is requested.
8723 2008-10-06 Zoltan Varga <vargaz@gmail.com>
8725 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
8726 the delegate klass so it can work with full-aot.
8727 (mono_marshal_get_delegate_end_invoke): Ditto.
8728 (mono_marshal_get_delegate_invoke): Ditto.
8730 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
8732 * gc.c, attach.h, attach.c: remove a bad pattern:
8733 add_finalizer_callback () is not implemented correctly, it can't
8734 without adding more overhead to the finalizer loop and it's not
8735 even needed, since we know exactly what we need to call, so there is
8736 no need to do so through an expensive function pointer.
8738 2008-10-04 Zoltan Varga <vargaz@gmail.com>
8740 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
8742 * attach.c (mono_attach_init): Remove the #ifdef.
8744 2008-10-04 Andreas Färber <andreas.faerber@web.de>
8746 * attach.c (mono_attach_init): Don't use
8747 mono_gc_add_finalizer_thread_callback when compiling without GC.
8750 Code is contributed under MIT/X11 license.
8752 2008-10-03 Zoltan Varga <vargaz@gmail.com>
8754 * class.c (mono_class_create_from_typedef): Remove the
8755 #ifndef DISABLE_SIMD stuff.
8757 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
8759 * class-internals.h (MonoClass): Added simd_type bit field.
8761 * class.c (mono_class_create_from_typedef): Check if type is a simd
8764 2008-10-03 Mark Probst <mark.probst@gmail.com>
8766 * object.c (mono_method_add_generic_virtual_invocation): Only add
8767 instantiations to the thunk whose count is at least as large as
8770 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
8772 * icall.c: changed the Type of the exception thrown when trying to
8773 invoke a constructor on an abstract class. Part of the fix for bug
8776 2008-10-02 Mark Probst <mark.probst@gmail.com>
8778 * class.c, class-internals.h (mono_method_get_vtable_index): New
8779 function which returns the index into the vtable and properly
8780 handles inflated virtual generic methods.
8782 2008-10-01 Mark Probst <mark.probst@gmail.com>
8784 * object.c, domain.c, object-internals.h, domain-internals.h:
8785 Generalize IMT thunk machinery to also handle thunks for virtual
8786 generic method invokes. When a virtual generic method is invoked
8787 more than a number of times we insert it into the thunk so that it
8788 can be called without lookup in unmanaged code.
8790 * generic-sharing.c, class-internals.h: Fetching a
8791 MonoGenericInst* for a method from an (M)RGCTX.
8793 2008-10-01 Zoltan Varga <vargaz@gmail.com>
8795 * marshal.c (emit_marshal_string): Applied a variant of a patch by
8796 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
8797 marshalling. Fixes #431304.
8799 2008-10-01 Bill Holmes <billholmes54@gmail.com>
8801 * marshal.c (emit_marshal_variant) : Change the attribute checks to
8802 handle when ref is specified without In or Out.
8804 Code is contributed under MIT/X11 license.
8806 2008-09-30 Mark Probst <mark.probst@gmail.com>
8808 * loader.c (mono_get_method_constrained): Don't expand method with
8809 the class's context, because it's already a method of that class.
8811 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
8813 * attach.c : should be correct build fix.
8815 2008-09-29 Zoltan Varga <vargaz@gmail.com>
8817 * attach.c: Fix the previous change.
8819 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
8821 * attach.c : quick w32 build fix.
8823 2008-09-27 Miguel de Icaza <miguel@novell.com>
8825 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
8826 crashes MonoDevelop: #430455.
8828 2008-09-27 Zoltan Varga <vargaz@gmail.com>
8830 * domain-internals.h (struct _MonoDomain): Move most fields used only by
8831 the JIT do MonoJitDomainInfo in ../mini/mini.h.
8833 * domain.c: Remove initialization/cleanup of the removed fields.
8835 2008-09-27 Mark Probst <mark.probst@gmail.com>
8837 * class.c (mono_class_generic_sharing_enabled): Enable generic
8838 code sharing for PPC.
8840 2008-09-26 Bill Holmes <billholmes54@gmail.com>
8842 * attach.c : Fixing the Windows builds.
8844 Code is contributed under MIT/X11 license.
8846 2008-09-25 Zoltan Varga <vargaz@gmail.com>
8848 * class.c (mono_class_generic_sharing_enabled): Experimentally change
8849 the default generic sharing mode to 'all'.
8851 2008-09-25 Mark Probst <mark.probst@gmail.com>
8853 * generic-sharing.c, class-internals.h: New function for checking
8854 whether a method needs a static RGCTX invoke wrapper. A few
8855 funtions moved from mini/generic-sharing.c.
8857 * icall.c: New function used.
8859 2008-09-25 Mark Probst <mark.probst@gmail.com>
8861 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
8862 Static RGCTX invoke wrapping applies to value type methods, too.
8864 * class.c (mono_class_setup_vtable_general): In generic-shared
8865 value types, wrap methods with a static RGCTX invoke wrapper.
8867 2008-09-25 Zoltan Varga <vargaz@gmail.com>
8869 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
8872 2008-09-24 Zoltan Varga <vargaz@gmail.com>
8874 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
8875 register a callback which is called when the finalizer thread is woken
8877 (finalizer_thread): Call the callback if it exists.
8879 * attach.h attach.c: New files, implementing the attach mechanism.
8881 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
8883 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
8884 by the previous change.
8886 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
8888 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
8889 loader.c, marshal.c, metadata-internals.h, metadata.c,
8890 method-builder.c, object.c, reflection.c: introduced specific functions
8891 to allocate from the domain and image mempools and cleaned up most of
8892 the code to use them (still missing a few in reflection.c).
8893 Keep the loader bytes counter updated.
8895 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
8897 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
8898 loader-related counters.
8900 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
8902 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
8903 added more MS-compatible counters.
8905 2008-09-22 Zoltan Varga <vargaz@gmail.com>
8907 * class.c (mono_class_setup_fields): Call setup_fields before accessing
8908 class->blittable. Fixes #428217.
8910 2008-09-21 Zoltan Varga <vargaz@gmail.com>
8912 * reflection.c (mono_image_get_field_on_inst_token): Call
8913 field_encode_signature () since that handles custom modifiers too.
8916 2008-09-20 Zoltan Varga <vargaz@gmail.com>
8918 * reflection.c (add_custom_modifiers): New helper function to merge custom
8919 modifiers stored in objects to a MonoType.
8920 (fieldref_encode_signature): Encode custom modifiers.
8921 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
8922 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
8924 2008-09-19 Kornél Pál <kornelpal@gmail.com>
8926 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
8927 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
8928 64-bit IL only images because imports are not resolved for IL only images.
8929 Special thanks to Bill Holmes for finding this bug and testing the patch.
8930 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
8932 Contributed under MIT/X11 license.
8934 2008-09-19 Miguel de Icaza <miguel@novell.com>
8936 * mono-config.c (dllmap_start): Add support for the bits keyword
8937 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
8939 2008-09-19 Mark Probst <mark.probst@gmail.com>
8941 * reflection.c (inflate_mono_method): When the class the method is
8942 to be inflated for is itself not inflated, just return the method.
8944 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
8946 * mono-perfcounters.c: use more user friendly process instance names.
8948 2008-09-18 Bill Holmes <billholmes54@gmail.com>
8950 * marshal.c (emit_marshal_variant) : Change the attribute checks to
8951 handle "[in] ref" and "[in][out] ref" cases.
8953 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
8954 to mono_mb_create_method. This was causing problems calling native to
8955 managed passing Variants by value.
8957 Code is contributed under MIT/X11 license.
8959 2008-09-18 Zoltan Varga <vargaz@gmail.com>
8961 * class.c (can_access_internals): Call mono_assembly_load_friends ()
8962 before accessing the friend_assembly_names field.
8964 * assembly.c (mono_assembly_load_friends): Make this callable multiple
8966 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
8967 called lazily when it is needed.
8969 * metadata-internals.h (struct _MonoAssembly): Add
8970 'friend_assembly_names_inited' flag.
8972 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
8974 * mono-perfcounters-def.h: fix the types of a few counters.
8975 * mono-perfcounters.c: implemented the instance names getter
8978 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
8980 * culture-info-table.h : regenerated.
8982 2008-09-17 Robert Jordan <robertj@gmx.net>
8984 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
8985 context bound objects. Fixes #415577.
8987 Code is contributed under MIT/X11 license.
8989 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
8991 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
8992 implementation (bug #423582).
8994 2008-09-16 Zoltan Varga <vargaz@gmail.com>
8996 * object.c (mono_object_get_virtual_method): Handle the case method->slot
8997 is not set. Fixes #426309.
8999 2008-09-16 Jb Evain <jbevain@novell.com>
9001 * class.c (mono_class_from_name): fix the exported type look up
9002 when the type is defined in a referenced assembly.
9004 2008-09-16 Jb Evain <jbevain@novell.com>
9006 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
9007 increment the next index counter on each iteration to make that work
9008 for more than one type forwarder. Unmanaged part to fix #422929.
9010 2008-09-15 Mark Probst <mark.probst@gmail.com>
9012 * object-internals.h: enum ComInterfaceType in
9013 MonoInterfaceTypeAttribute is guint32, not guint16.
9015 2008-09-12 Mark Probst <mark.probst@gmail.com>
9017 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
9020 2008-09-11 Mark Probst <mark.probst@gmail.com>
9022 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
9025 2008-09-11 Mark Probst <mark.probst@gmail.com>
9027 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
9028 Endianness fixes for MonoSymbolFileOffsetTable.
9030 2008-09-10 Bill Holmes <billholmes54@gmail.com>
9032 * process.c (complete_path) : Removing quotes from the
9033 input path. The glib file routines do not handle file paths
9034 that have quotes around them.
9036 Code is contributed under MIT/X11 license.
9038 2008-09-10 Bill Holmes <billholmes54@gmail.com>
9040 * socket-io.h : Adding a comment to provide locations where
9041 changes to MonoSocketAsyncResult need to be synced.
9043 Code is contributed under MIT/X11 license.
9045 2008-09-10 Zoltan Varga <vargaz@gmail.com>
9047 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
9048 parameters as well. Fixes #425001.
9050 2008-09-08 Miguel de Icaza <miguel@novell.com>
9052 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
9055 2008-09-07 Miguel de Icaza <miguel@novell.com>
9057 * console-io.c: Add support for tracking the window size if it
9060 The setup is very simple: the TtySetup function will now return a
9061 pointer to a location in memory that tracks the current console
9062 size. The managed code checks its current value every time its
9063 queried against the last value set, and updates accordingly.
9065 With this setup we can work with multiple consoles, and we do not
9066 require to poke into managed code from a signal handler.
9068 Additionally, the environment for COLUMNS and LINES is now handled
9071 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
9073 2008-09-07 Mark Probst <mark.probst@gmail.com>
9075 * marshal.c (mono_type_native_stack_size): Treat
9076 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
9078 2008-09-04 Jb Evain <jbevain@novell.com>
9080 * class.c (mono_class_is_assignable_from): fix assignability of nullables
9083 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
9085 * verify.c (verify_type_compatibility_full): Revert change
9086 to allow converting a native int to unmanaged pointer be verifiable
9087 under non-strict mode.
9088 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
9090 * verify.c: Added some TODOs.
9092 2008-09-02 Bill Holmes <billholmes54@gmail.com>
9094 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
9095 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
9096 Changed to use GlobalAlloc for the memory returned on Windows platforms.
9098 Code is contributed under MIT/X11 license.
9100 2008-09-02 Jb Evain <jbevain@novell.com>
9102 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
9104 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
9106 reflection.c (typebuilder_setup_fields): Handle classes with
9109 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
9111 class.c (mono_class_setup_events): Add memory barrier due to
9112 double checked locking.
9114 class.c (mono_class_setup_properties): Same.
9116 2008-08-31 Zoltan Varga <vargaz@gmail.com>
9118 * class.c (mono_class_is_assignable_from): Fix the build.
9120 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
9121 before accessing klass->interface_bitmap. Fixes #421744.
9123 2008-08-28 Zoltan Varga <vargaz@gmail.com>
9125 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
9126 the runtime into no-exec mode, useful when running the AOT compiler.
9128 * appdomain.c gc.c object.c: Avoid executing managed code when running
9131 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
9133 * reflection.c (_mono_reflection_get_type_from_info): Handle the
9134 special case when the mono_assembly_loaded () returns NULL because the
9135 search hook is not installed.
9137 2008-08-25 Zoltan Varga <vargaz@gmail.com>
9139 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
9140 crashes in bstr marshalling on linux.
9142 2008-08-24 Zoltan Varga <vargaz@gmail.com>
9144 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
9145 with more than one parameter.
9147 2008-08-24 Miguel de Icaza <miguel@novell.com>
9149 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
9150 start/stop flow control as well when turning off ICANON (allows
9151 C-s and C-q to be read by Console.ReadKey).
9153 2008-08-24 Zoltan Varga <vargaz@gmail.com>
9155 * class.c (mono_class_init): Move the initialization of nested classes
9156 into mono_class_get_nested_types (). Fixes #418433.
9158 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
9161 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
9162 iterating tough the nested classes of a class.
9164 2008-08-23 Zoltan Varga <vargaz@gmail.com>
9166 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
9169 2008-08-22 Miguel de Icaza <miguel@novell.com>
9171 * console-io.c (sigcont_handler): Support signal chaining for
9174 (console_set_signal_handlers): Use best practices with sigaction,
9175 clear the structure before using it.
9177 2008-08-22 Robert Jordan <robertj@gmx.net>
9179 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
9180 Fix the Windows build.
9182 2008-08-22 Zoltan Varga <vargaz@gmail.com>
9184 * class.c (mono_class_generic_sharing_enabled): Make the default
9185 sharing mode 'corlib'.
9187 2008-08-21 Zoltan Varga <vargaz@gmail.com>
9189 * console-io.c (console_set_signal_handlers): Fix a warning.
9191 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
9192 method normally, the JIT will take care of avoiding recursion.
9194 2008-08-20 Bill Holmes <billholmes54@gmail.com>
9196 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
9198 Code is contributed under MIT/X11 license.
9200 2008-08-20 Miguel de Icaza <miguel@novell.com>
9202 * console-io.c (sigcont_handler): We need to restore the entire
9203 termios state, not only the original settings, as things like echo
9204 can be controlled after this (Booish exposes this issue with its
9205 own ReadLine implementation).
9207 Additionally, we need to set the terminal back into keypad_xmit
9210 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
9211 string as a paramter as well. Otherwise we get different
9214 2008-08-20 Zoltan Varga <vargaz@gmail.com>
9216 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
9217 delegates with byref out parameter passing. Fixes #351520.
9219 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
9221 (mono_type_get_desc): Add the type arguments for GENERICINST.
9222 (mono_method_full_name): Stringify the class name using mono_type_full_name
9223 so it picks up generic arguments.
9225 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
9227 * console-io.c: Removed debug output.
9229 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
9231 reflection.c (mono_reflection_create_runtime_class): Alloc
9232 the nested classes linked list using the dynamic image mempool.
9233 Fixes leak in corlib compilation.
9235 2008-08-19 Miguel de Icaza <miguel@novell.com>
9237 * console-io.c: Fix incredibly annoying behavior on the console
9238 after resuming execution after control-z. This affected every
9239 console application.
9241 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
9243 * mempool-internals.h: Header for mono private mempool functions. The first
9244 two function are for allocating glib linked lists using pools.
9246 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
9248 * Makefile.am: Added mempool-internals.h.
9250 2008-08-16 Zoltan Varga <vargaz@gmail.com>
9252 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
9253 (mono_domain_free): Ditto.
9255 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
9256 be used by the JIT to store its domain-specific information, instead of putting
9257 it directly into MonoDomain.
9259 * domain.c (mono_install_create_domain_hook): New helper function to install
9260 a hook which initializes domain->runtime_info.
9262 * domain.c (mono_install_free_domain_hook): Ditto.
9264 2008-08-15 Zoltan Varga <vargaz@gmail.com>
9266 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
9267 asserting if the ares parameter is null.
9269 * mono-perfcounters.c: Fix warnings.
9271 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
9272 is not needed, don't check for interruptions either.
9273 (mono_marshal_get_delegate_end_invoke): Ditto.
9275 2008-08-15 Marek Habersack <mhabersack@novell.com>
9277 * mono-perfcounters.c (predef_readonly_counter): added support for
9278 reading the ASP.NET Requests Queued counter from another process.
9280 2008-08-12 Zoltan Varga <vargaz@gmail.com>
9282 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
9283 MonoImage to simplify the AOT code.
9285 2008-08-10 Zoltan Varga <vargaz@gmail.com>
9287 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
9288 marshalling. Fixes #416078.
9290 2008-08-08 Zoltan Varga <vargaz@gmail.com>
9292 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
9293 it is set, looking up the icall address is deferred to the JIT, since
9294 in embedded scenarios, the icall might not be registered in the runtime
9295 doing the AOT compilation. Backported from the 2.0 branch.
9297 2008-08-08 Zoltan Varga <vargaz@gmail.com>
9299 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
9302 2008-08-05 Marek Habersack <mhabersack@novell.com>
9304 * Makefile.am: added support for cross-compilation.
9306 2008-08-04 Zoltan Varga <vargaz@gmail.com>
9308 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
9310 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
9312 * mono-perfcounters.c: jitted methods and jitted bytes counters.
9314 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
9316 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
9317 mono-perfcounters.c: performance counters implementation.
9319 2008-07-31 Zoltan Varga <vargaz@gmail.com>
9321 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
9322 to gpointer, letting the AOT code decide what to store in it.
9324 2008-07-31 Bill Holmes <billholmes54@gmail.com>
9326 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
9327 mono_class_setup_methods if the methods are not initialized.
9329 Code is contributed under MIT/X11 license.
9331 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
9333 * verify.c: Remove some debug code I commited by accident.
9335 * verify.c (mono_method_is_valid_in_context): Change the return value
9336 to make possible to distinguish between invalid and unverifiable.
9338 * verify.c (verifier_load_method): Don't return NULL for unverifiable
9341 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
9343 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
9344 constraints. Fixes regression in gtest-253.
9346 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
9348 * verify.c (mono_verifier_verify_class): Don't allow generic types
9349 with explicit layout.
9351 * verify.c (mono_method_verify): Check locals and argument types.
9353 2008-07-29 Zoltan Varga <vargaz@gmail.com>
9355 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
9356 wait if the thread is in StopRequested state.
9358 * class.c (mono_class_from_name): Refactor the module searching code into
9359 a separate function so it can be reused in the AOT case too.
9361 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
9363 * verify.c (mono_type_is_valid_in_context): Improve the error message.
9364 Check both the type and it's generic type definition for loader errors.
9366 * verify.c (mono_method_is_valid_in_context): Don't generate another
9367 error when a type errors occur, this leads to the wrong exception been
9370 2008-07-28 Dick Porter <dick@ximian.com>
9374 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
9375 New internal calls to duplicate and close a process handle.
9377 2008-07-27 Andreas Färber <andreas.faerber@web.de>
9379 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
9381 2008-07-27 Zoltan Varga <vargaz@gmail.com>
9383 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
9385 2008-07-27 Robert Jordan <robertj@gmx.net>
9387 * class.c (mono_class_init): Don't compute class.has_finalize for
9388 valuetypes. Fixes #412477.
9390 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
9392 * verify.c: Implement constraint equivalence checking.
9393 This is required when a generic parameter is used as
9394 argument to a constrained one.
9398 2008-07-24 Zoltan Varga <vargaz@gmail.com>
9400 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9402 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
9404 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
9405 synch with managed object layout.
9407 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
9409 * verify.c (do_branch_op): Handle valuetypes and generic
9412 * verify.c (do_cmp_op): Same.
9416 2008-07-24 Mark Probst <mark.probst@gmail.com>
9418 * generic-sharing.c: Fix memory leaks.
9420 * class.c, class-internals.h: Make
9421 mono_class_inflate_generic_type_with_mempool() non-static.
9423 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
9425 * pedump.c (dump_verify_info): Dump full class name.
9427 2008-07-24 Mark Probst <mark.probst@gmail.com>
9429 * generic-sharing.c: Removed some old code that didn't do anything.
9431 2008-07-24 Massimiliano Mantione <massi@ximian.com>
9432 * profiler.c: Added runtime_initialized_event,
9433 mono_profiler_install_runtime_initialized and
9434 mono_profiler_runtime_initialized. This new hook tells the profiler
9435 when the runtime is sufficiently initialized to be able to call
9436 mono_thread_attach on the root appdomain.
9437 * profiler.h, profiler-private.h: Likewise.
9439 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
9441 * verify.c (do_cast): Do boxing for generic arguments as well.
9443 * class.c (is_nesting_type): Drop generic instantiations before
9444 checking for nesting.
9446 * class.c (can_access_instantiation): Allow access to generic
9449 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
9451 * verify.c (verify_class_for_overlapping_reference_fields):
9452 On some cases, the field size might be zero, guard against that.
9453 Fix the explicit layout check to work as expected.
9455 2008-07-23 Zoltan Varga <vargaz@gmail.com>
9457 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
9458 mono_thread_resume () during shutdown, since the thread we want to abort
9461 2008-07-22 Zoltan Varga <vargaz@gmail.com>
9463 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
9466 * debug-mono-symfile.c: Fix a warning.
9468 * mono-perfcounters.c (get_cpu_times): Fix a warning.
9470 * object.c (mono_class_vtable): Check if exception_type is set, and return
9471 NULL as defined by the function comments.
9473 2008-07-22 Mark Probst <mark.probst@gmail.com>
9475 * mempool.c: Use malloc for every single mempool allocation if the
9476 configure option is set. This makes it easier to track mempool
9477 allocations with tools like Valgrind.
9479 2008-07-22 Jb Evain <jbevain@novell.com>
9481 * reflection.c (create_dynamic_mono_image): emit the same
9482 metadata version that SL2 does when creating a SL2 image.
9484 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
9487 * icall.c: New icall System.Enum:get_hashcode. This function
9488 avoids the overhead of boxing the enum to the underlying type.
9490 2008-07-21 Mark Probst <mark.probst@gmail.com>
9492 * reflection.c (mono_method_get_object): Don't let static RGCTX
9493 invoke wrappers get into MonoReflectionMethods.
9495 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
9497 * object-internals.h:
9498 * object.c: New mono_runtime_class_init_full function
9499 that makes throwing the exception optinal.
9501 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
9502 for the case where the exception object is supplied.
9504 2008-07-16 Kornél Pál <kornelpal@gmail.com>
9506 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
9509 Contributed under MIT/X11 license.
9511 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
9513 * string-icalls.c (ves_icall_System_String_InternalSplit):
9514 Optimize array allocation by caching the MonoClass of the
9517 * icall.c (ves_icall_Type_GetMethodsByName): Same.
9519 * reflection.c (mono_param_get_objects): Same.
9521 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
9524 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
9525 It inflates the given type using the class context.
9527 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
9529 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
9530 the vtable if it already exists.
9532 * object-internals.h: Add mono_class_try_get_vtable as part of the
9535 * reflection.c (mono_type_get_object): Use the MonoObject from the
9536 vtable when possible. Reduces locking contention on reflection heavy
9539 2008-07-15 Zoltan Varga <vargaz@gmail.com>
9541 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
9542 g_bit_nth_msf () since that macro is not implemented in eglib.
9544 2008-07-13 Zoltan Varga <vargaz@gmail.com>
9546 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
9547 on platforms which do not support it.
9549 2008-07-12 Zoltan Varga <vargaz@gmail.com>
9551 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
9553 2008-07-11 Martin Baulig <martin@ximian.com>
9555 * mono-debug-debugger.h
9556 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
9558 * mono-debug-debugger.c
9559 (_mono_debugger_interruption_request): New global volatile variable.
9560 (mono_debugger_check_interruption): New public function.
9563 (mono_thread_current_check_pending_interrupt): Call
9564 mono_debugger_check_interruption().
9565 (mono_thread_interruption_checkpoint_request): Likewise.
9567 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9569 * verify.c: Add more type checks for loaded types. Verify the result
9570 handle from ldtoken.
9572 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9574 * loader.c (field_from_memberref): Don't crash if the field
9577 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9579 * verify.c: Verify if type and method instantiations
9580 don't have invalid VAR or MVAR arguments.
9582 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9584 * verify.c: Fix double free of function pointer list.
9586 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9588 * object.c (mono_string_to_utf8): Comment the new code as it
9591 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
9593 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
9595 2008-07-07 Bill Holmes <billholmes54@gmail.com>
9597 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
9598 is not throw too many times.
9600 Code is contributed under MIT/X11 license.
9602 2008-07-07 Zoltan Varga <vargaz@gmail.com>
9604 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
9605 debugging is turned off.
9607 2008-07-06 Zoltan Varga <vargaz@gmail.com>
9609 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
9611 2008-07-04 Mark Probst <mark.probst@gmail.com>
9613 * class-internals.h, class.c: Added new generic sharing option:
9614 Share only stuff in System.Collections.Generic, which is now the
9617 2008-07-04 Mark Probst <mark.probst@gmail.com>
9619 * generic-sharing.c, class-internals.h: New function for getting a
9620 generic method in a generic class given the corresponding method
9621 for a different instantiation of the class. Partly refactored
9622 from mini-trampolines.c.
9624 * class.c: Make sure generic methods have a class_inst if they are
9625 part of a generic class.
9627 * metadata.c (mono_type_stack_size_internal): Handle type
9630 2008-07-04 Mark Probst <mark.probst@gmail.com>
9632 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
9633 Signifies whether information on the this/vtable/mrgctx variable
9636 2008-07-04 Mark Probst <mark.probst@gmail.com>
9638 * object.c, object-internals.h, icall.c: New function
9639 mono_delegate_ctor_with_method(), which does the same as
9640 mono_delegate_ctor(), but takes an explicit method argument
9641 instead of taking the method from the jit info.
9643 * marshal.c: When creating a delegate with an inflated method take
9644 the "this" argument as the target class for the castclass.
9646 2008-07-03 Mark Probst <mark.probst@gmail.com>
9648 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
9649 mono_jit_info_table_find() to perform very badly in some cases.
9651 2008-07-02 Zoltan Varga <vargaz@gmail.com>
9653 * icall.c (type_from_typename): Handle 'string'.
9655 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
9656 wrappers into the wrapper_hash, since the key is not a MonoMethod.
9658 2008-07-01 Zoltan Varga <vargaz@gmail.com>
9660 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
9662 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
9663 number of available managed allocator types.
9665 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
9666 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
9668 2008-06-30 Zoltan Varga <vargaz@gmail.com>
9670 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
9671 which is a low level lock protecting just the 'jit_code_hash' hash table.
9673 * domain.c: Initialize+cleanup jit_code_hash_lock.
9675 2008-06-30 Kornél Pál <kornelpal@gmail.com>
9677 * coree.c (mono_load_coree): Set coree_module_handle global variable only
9678 after initialization.
9680 * coree.h: Make MonoFixupExe internal.
9682 Contributed under MIT/X11 license.
9684 2008-06-30 Kornél Pál <kornelpal@gmail.com>
9686 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
9687 because that is platform independent. Check NumberOfRvaAndSizes in PE32
9689 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
9690 image being loaded is a CLI image and _CorValidateImage gets called.
9692 * coree.h: Add MonoLoadImage.
9694 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
9695 instead of LoadLibrary.
9697 Contributed under MIT/X11 license.
9699 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
9701 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
9702 for any primitive type.
9704 2008-06-29 Zoltan Varga <vargaz@gmail.com>
9706 * object.c (mono_array_new_specific): Optimize this and the other allocation
9709 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
9710 domains too if mono_dont_free_domains is set.
9712 * domain-internals.h (mono_dont_free_domains): New internal option controlling
9713 whenever to free appdomain data after it has been unloaded.
9715 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
9717 2008-06-28 Zoltan Varga <vargaz@gmail.com>
9719 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
9720 (mono_method_get_equivalent_method): Fix a warning.
9722 * object.c (mono_message_init): Avoid looking up array types for each call.
9724 2008-06-27 Zoltan Varga <vargaz@gmail.com>
9726 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
9729 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
9732 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
9735 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
9738 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
9740 * object.c (mono_value_box): Fix boxing of nullables.
9742 2008-06-26 Kornél Pál <kornelpal@gmail.com>
9744 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
9745 mono_module_handle that is defined by the linker; no initialization required.
9746 * coree.h: Remove mono_module_handle, add __ImageBase, update
9747 mono_image_open_from_module_handle.
9748 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
9749 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
9750 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
9751 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
9752 to 4 GB away from image base address. IA64 version is not tested but was very
9753 easy to implement and should work if we ever need it.
9754 * domain.c (mono_init_internal): Avoid system error message boxes.
9755 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
9756 with has_entry_point. Handle do_mono_image_load fauilre correctly.
9757 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
9758 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
9759 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
9761 Contributed under MIT/X11 license.
9763 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
9765 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
9766 as part of the private mono API.
9768 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
9769 Do proper argument checking for methods that belong to generic classes.
9770 Do proper type resolution for GMFH/2.
9773 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
9775 * verify.c (do_switch): Fix a memory corruption bug with
9776 the jump index is out of bound.
9778 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
9780 * verify.c: Disable debug code.
9782 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
9784 * reflection.c (mono_image_get_methodbuilder_token): Use
9785 mono_image_get_methodspec_token_for_generic_method_definition
9786 instead of mono_image_get_memberref_token. We cache more memberef
9789 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
9791 * verify.c: Inflate exception clause types.
9794 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
9796 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
9799 * reflection.c (mono_image_get_ctorbuilder_token): Same.
9801 * reflection.c (mono_image_create_method_token): Same.
9803 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
9805 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
9806 It does the same as mono_image_get_methodref_token but works on
9809 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
9810 and always generate a methodspec. This follows the old behavior and fixes
9811 the regressions in System.Core.
9813 2008-06-24 Zoltan Varga <vargaz@gmail.com>
9815 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
9816 don't event mono_class_get () succeeds. Fixes #402182.
9818 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
9820 * metadata-internals.h: Added MonoDynamicImage::methodspec
9821 hashtable to store methodspec tokens created for MethodBuilders.
9823 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
9824 MethodBuilders as open instantiations if a methodspec was requested.
9826 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
9828 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
9830 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
9834 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
9836 * loader.c (method_from_methodspec): Avoid crashing if the
9837 method lookup fails.
9839 2008-06-20 Dick Porter <dick@ximian.com>
9841 * socket-io.c (get_socket_assembly): Cope with Moonlight network
9842 classes being in a different assembly. Fixes bug 399184.
9844 2008-06-20 Zoltan Varga <vargaz@gmail.com>
9846 * loader.c (mono_loader_init): Make this callable multiple times.
9847 (mono_dllmap_insert): Call mono_loader_init () so this works even before
9848 the runtime is initialized. Fixes #401755.
9850 2008-06-19 Dick Porter <dick@ximian.com>
9852 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
9855 2008-06-19 Dick Porter <dick@ximian.com>
9858 * icall-def.h: Implement Socket generic Send() and Receive()
9859 methods. Fixes bug 395168.
9861 2008-06-19 Kornél Pál <kornelpal@gmail.com>
9863 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
9865 Contributed under MIT/X11 license.
9867 2008-06-18 Martin Baulig <martin@ximian.com>
9869 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
9870 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
9871 set to 80.0. The debugger <-> runtime interface is now frozen as
9875 (mono_debug_debugger_version): Bump to 4.
9877 2008-06-18 Martin Baulig <martin@ximian.com>
9879 * debug-mono-symfile.c
9880 (load_symfile): Don't check the minor version.
9882 * debug-mono-symfile.h: Bump the version number to 50.0.
9884 2008-06-18 Martin Baulig <martin@ximian.com>
9886 * debug-mono-symfile.c
9887 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
9888 minimum required version.
9890 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
9892 * reflection.c (mono_custom_attrs_from_property): Fix support for
9893 retriveving cattrs of dynamic inflated generic types.
9895 * reflection.c (mono_custom_attrs_from_event): Same.
9897 * reflection.c (mono_custom_attrs_from_field): Same;
9899 * reflection.c (typebuilder_setup_events): Same cattrs of events.
9901 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
9902 Moved to metadata.c.
9904 * metadata.c: New functions to retrive the equivalent field, event
9905 of property from the generic type definition.
9907 * metadata-internals.h: Added new functions from metadata.c.
9909 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
9911 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
9912 to cached in a mempool is used.
9914 * metadata.c (free_generic_class): In some situations field generic_info type
9915 is not properly dup'ed and leads to double free'ing.
9919 2008-06-17 Mark Probst <mark.probst@gmail.com>
9921 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
9922 this arguments (will be needed later for generic methods).
9925 2008-06-17 Mark Probst <mark.probst@gmail.com>
9927 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
9928 Create a static RGCTX invoke wrapper for methods which require it.
9930 2008-06-17 Mark Probst <mark.probst@gmail.com>
9932 * object.c, class-internals.h: New function for checking whether
9933 an individual field is special static.
9935 2008-06-15 Zoltan Varga <vargaz@gmail.com>
9937 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
9938 linear search since the table is sorted.
9940 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
9943 2008-06-14 Zoltan Varga <vargaz@gmail.com>
9945 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
9946 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
9948 * gc.c (mono_domain_finalize): Allow an infinite timeout.
9950 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
9952 * threads.c (mono_thread_request_interruption): Get rid of locking, use
9953 InterlockedCompareExchange to query and modify
9954 thread->interruption_requested.
9956 * object-internals.h (struct _MonoThread): Change interruption_requested
9957 to a gint32 so it can be modified by atomic operations. Add
9958 'critical_region_level' from the managed side, change small_id to a guint32,
9959 add new set of 'unused' fields.
9961 * appdomain.c: Bump corlib version.
9963 2008-06-13 Zoltan Varga <vargaz@gmail.com>
9965 * class.c (mono_class_from_name): Search modules as well. Fixes
9968 2008-06-13 Mark Probst <mark.probst@gmail.com>
9970 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
9971 templates. Templates are generalized with an additional type_argc
9972 argument. RGCTX templates have type_argc==0, MRGCTX templates
9975 * domain-internals.h, domain.c: New hash table for looking up
9978 * metadata.c, metadata-internals.h: Rename hash and equal
9979 functions for MonoGenericInst's and make them public.
9981 * class-internals.h: New data structures for the MRGCTX. Macros
9982 for distinguishing slots in the RGCTX and the MRGCTX.
9984 2008-06-13 Mark Probst <mark.probst@gmail.com>
9986 * object.c (mono_method_get_imt_slot): Put the same methods of
9987 different instantiations of the same generic interface in the same
9988 IMT slots, to make generic sharing simpler.
9990 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
9992 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
9994 * metadata.c (mono_metadata_field_info_with_mempool): Added.
9995 This function works just like mono_metadata_field_info, but
9996 accept a mempool as argument to be used allocating memory.
9998 * marshal.c (mono_marshal_load_type_info): Use new function
9999 to load marshal data into image mempool.
10001 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
10003 * class.c (mono_class_inflate_generic_type_with_mempool):
10004 This function allows to inflate a generic type using
10007 * class.c (inflate_generic_type): Take a mempool as argument
10008 and use it to do type dup'ing.
10010 * class.c (mono_class_setup_fields): Field type for generic
10011 generic classes are allocated from the image mempool.
10013 * metadata.c (free_generic_class): Inflated field type is
10014 now allocated in the image mempool.
10016 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
10018 * threads.c (thread_cleanup): Free MonoThread::name.
10020 2008-06-12 Marek Habersack <mhabersack@novell.com>
10022 * appdomain.c (ensure_directory_exists): avoid unnecessary
10023 mkdir(2) calls when the shadow directory already exists.
10024 (mono_make_shadow_copy): copy also satellite assemblies from the
10025 private bin directories.
10027 2008-06-11 Zoltan Varga <vargaz@gmail.com>
10029 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
10031 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
10032 a page boundary. Fixes #396219.
10034 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10036 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
10037 due to double-checked locking.
10039 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10041 * assembly.c (build_assembly_name): Release memory on failure.
10043 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
10045 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10047 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
10050 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10052 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
10055 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10057 * loader.c (field_from_memberref): Check if field signature type is equal
10058 to the non-inflated type of the field. Fixes #398980.
10060 2008-06-11 Zoltan Varga <vargaz@gmail.com>
10062 * assembly.c (mono_assembly_load_from_full): Call
10063 mono_assembly_load_friends () outside the assemblies lock, since it can
10064 acquire the loader lock. Fixes #323696.
10066 * reflection.c (resolve_object): Inflate the inst with the context for
10067 FieldOnTypeBuilderInst. Fixes #399010.
10069 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10071 * reflection.c (mono_image_get_field_on_inst_token): Don't
10072 inflate the field to encode it's signature. If it's a
10073 VAR or MVAR it should stay that way in the signature.
10076 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10078 * reflection.c (resolve_object): Release memory of inflated types.
10080 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10082 * loader.c (mono_method_get_signature_full): Remove assert about
10083 loading a methodspec to a generic method. We have such methods, such as
10084 System.Threading.Interlocked::CompareExchange<T>.
10085 This assert was removed since it crashes the verifier when it checks
10086 methods calling CompareExchange<T>.
10088 2008-06-10 Marek Safar <marek.safar@gmail.com>
10090 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
10091 of Type array and not MonoType.
10093 2008-06-10 Marek Habersack <mhabersack@novell.com>
10095 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
10098 2008-06-10 Martin Baulig <martin@ximian.com>
10100 * debug-mono-symfile.h
10101 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
10102 changes to the file format, but we were generating incorrect
10103 source file indices in the line number table due to a bug, which
10104 made backtraces report an incorrect source file.
10106 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
10108 * mono-debug.c: Moved mono_debug_free_method_jit_info from
10109 mini/debug-mini.c to here.
10111 * mono-debug.c (il_offset_from_address): Free memory from find_method.
10113 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
10114 use it to release structs returned by mono_debug_find_method.
10116 2008-06-10 Zoltan Varga <vargaz@gmail.com>
10118 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
10119 since it needs to set method->slot for all interface methods.
10121 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
10123 * class-internals.h: Forgot to add.
10125 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
10127 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
10129 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
10130 Lookup the custom attributes from property_hash.
10132 * reflection.c (mono_save_custom_attrs): Save the custom attributes
10133 in property_hash. Allocate all data using the image mempool.
10135 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
10136 for dynamic_custom_attrs to checks if the image is dynamic.
10138 2008-06-09 Zoltan Varga <vargaz@gmail.com>
10140 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
10143 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
10144 runtime functions while holding the domain assemblies lock.
10146 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
10148 * verify.c: Reapplied the last bit of the reverted changes.
10150 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
10152 * verify.c: Reapplied more of the reverted changes.
10154 2008-06-09 Martin Baulig <martin@ximian.com>
10156 * debug-mono-symfile.c (load_symfile): Check the major version
10157 first; if it's wrong, don't print the minor version in the error message.
10159 2008-06-09 Zoltan Varga <vargaz@gmail.com>
10161 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
10162 lock instead of the domain lock to avoid deadlocks, since the thread might
10163 already hold the loader lock.
10165 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
10166 (mono_thread_attach): Ditto.
10168 * monitor.c: Use a TLS variable for holding the current thread id instead
10169 of calling pthread_self ().
10170 (mono_monitor_init_tls): New internal function to initialize the TLS
10172 (mono_monitor_try_enter_internal): Put the owner == id check after the
10175 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
10176 missed optimizations when using gcc-4.3.
10178 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
10180 * reflection.c (mono_dynamic_image_free): Free the memory
10181 used by MonoGenericParam in MonoDynamicImage::gen_param.
10183 * reflection.c (mono_reflection_setup_generic_class): Allocate
10184 container from mempool.
10186 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
10187 container from mempool.
10189 2008-06-07 Zoltan Varga <vargaz@gmail.com>
10191 * threads.c (mono_set_pending_exception): New internal function to set the
10192 pending exception of the current thread.
10193 (mono_thread_get_and_clear_pending_exception): Check for
10194 thread->pending_exception as well.
10196 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
10198 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
10199 it can trigger a collection.
10201 2008-06-06 Martin Baulig <martin@ximian.com>
10203 Merged the `debugger-kahalo' branch.
10206 (MONO_DEBUGGER_VERSION): Bumped to 72.
10208 * debug-mono-symfile.h
10209 (MonoSymbolFileMethodIndexEntry): Removed.
10210 (MonoSymbolFileMethodEntry): New public typedef.
10211 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
10212 (MonoSymbolFileSourceEntry): Remove everything except `index' and
10214 (MonoSymbolFileMethodEntry): Removed.
10215 (MonoSymbolFileLexicalBlockEntry): Removed.
10216 (MonoSymbolFileLineNumberEntry): Removed.
10217 (MonoDebugLexicalBlockEntry): Removed.
10218 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
10219 removed `num_il_offsets' and `il_offsets'.
10220 (MonoSymbolFile): Replace `version' with `major_version' and
10222 (MONO_SYMBOL_FILE_VERSION): Replace with
10223 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
10224 `MONO_SYMBOL_FILE_MINOR_VERSION'.
10226 * debug-mono-symfile.c
10227 (mono_debug_symfile_lookup_location): Add support for the new line
10228 number table format.
10230 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
10232 * metadata.c (free_generic_class): Release the inflated
10233 MonoClass of dynamic generic classes if it's not a generic
10236 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
10238 * verify.c: Reapplied more of the reverted changes.
10240 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
10242 * reflection.c (lookup_custom_attr): Clean the cached flag or
10243 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
10246 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
10248 * verify.c: Reapplied a small part of the reverted changes.
10250 2008-06-07 Zoltan Varga <vargaz@gmail.com>
10252 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10254 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
10255 previously in managed code.
10256 (mono_monitor_exit): Ditto.
10257 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
10259 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
10260 the managed definition.
10262 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
10264 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
10266 2008-06-06 Zoltan Varga <vargaz@gmail.com>
10268 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
10270 * monitor.c: Add some micro optimizations.
10272 * icall.c (type_from_typename): Handle 'bool'.
10274 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
10276 * verify.c: Implement constructor verification per P III 1.8.1.4.
10279 2008-06-06 Zoltan Varga <vargaz@gmail.com>
10281 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
10282 holding the assemblies lock here too.
10284 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
10286 * verify.c: Kill stack_top function.
10288 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
10290 * verify.c: Kill stack_get function.
10292 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
10294 * verify.c (mono_method_verify): Last change broke the build. Fixed.
10296 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
10298 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
10301 * verify.c (mono_method_verify): Inflate params and locals to avoid
10302 mismatch when checking for compatibility.
10304 2008-06-05 Jonathan Chambers <joncham@gmail.com>
10306 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
10307 Length prefix should be size in bytes. Fix bug #339530.
10309 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
10310 Length prefix should be size in bytes. Fix bug #339530.
10312 Code is contributed under MIT/X11 license.
10314 2008-06-05 Bill Holmes <billholmes54@gmail.com>
10316 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
10318 Contributed under MIT/X11 license.
10320 2008-06-05 Martin Baulig <martin@ximian.com>
10322 * mono-debug-debugger.c
10323 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
10325 2008-06-05 Zoltan Varga <vargaz@gmail.com>
10327 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
10328 while holding the assemblies lock to prevent deadlocks. Handle the case
10329 where the search hook returns NULL but the assembly was still loaded.
10332 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
10333 modify domain state.
10335 2008-06-05 Andreas Färber <andreas.faerber@web.de>
10337 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
10338 * Makefile.am (pedump_LDADD): Post-process object files and
10339 add dtrace-generated object file, if necessary.
10341 Code is contributed under MIT/X11 license.
10343 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
10345 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
10347 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
10349 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
10351 2008-06-04 Mark Probst <mark.probst@gmail.com>
10353 * threads.c: Try to free everything from the delayed free table
10354 when shutting down threads, and set the variable to NULL after the
10355 table is freed so that calling
10356 mono_thread_hazardous_try_free_all() when shutting down the root
10357 domain doesn't crash.
10359 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
10361 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
10362 the caller if resulting type was inflated.
10364 * class.c (mono_class_create_from_typespec): Free the MonoType if it
10367 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
10370 2008-06-04 Zoltan Varga <vargaz@gmail.com>
10372 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
10373 class library tests.
10375 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
10376 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
10379 2008-06-04 Mark Probst <mark.probst@gmail.com>
10381 * domain.c, domain-internals.h: The JIT infos are now freed by the
10382 JIT info table code. They are freed immediately if there only a
10383 single JIT info table in circulation. If there is more, the free
10384 is delayed via a queue.
10386 * threads.c, threads-types.h: New hazard pointer function for
10387 freeing all freeable delayed items in one sitting.
10389 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10391 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
10393 * reflection.c (typebuilder_setup_properties): Same.
10395 * reflection.c (typebuilder_setup_events): Same.
10397 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10399 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
10400 and use it for allocating memory.
10402 * reflection.c (mono_marshal_spec_from_builder): Same.
10404 * reflection.c: Change code to use new signatures.
10406 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
10408 2008-06-03 Zoltan Varga <vargaz@gmail.com>
10410 * decimal.c (rescale128): Put back one line which was accidently commented
10413 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
10416 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10418 * reflection.c (mono_reflection_generic_class_initialize): Name must
10419 be always malloc'ed so we can free it later on. Do this for field, property
10422 * metadata.c (free_generic_class): Free field, property and event names.
10424 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10426 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
10427 instead of g_memdup.
10429 * reflection.c (typebuilder_setup_fields): Same.
10431 2008-06-03 Zoltan Varga <vargaz@gmail.com>
10433 * decimal.c (rescale128): Optimize this function a bit more.
10435 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10437 * metadata.c (free_generic_class): Release some memory from
10438 SRE generic classes.
10440 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10442 * reflection.c (mono_image_get_generic_field_token): No reference
10443 to name is kept, free it.
10445 * reflection.c (mono_reflection_generic_class_initialize): Free
10446 more memory of the inflated field.
10448 2008-06-03 Zoltan Varga <vargaz@gmail.com>
10450 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
10453 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
10455 * reflection.c (mono_dynamic_image_free): Release memory used by
10456 MonoDynamicImage::array_methods elements.
10458 * reflection.c (assembly_add_win32_resources): Release memory after
10461 2008-06-02 Zoltan Varga <vargaz@gmail.com>
10463 * decimal.c (log2_32): Use an optimized version for this function too.
10465 * decimal.c (log2_64): Fix this on 32 bit machines.
10467 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
10469 * class.c (mono_dup_array_type): Implement allocation using a mempool.
10471 * class.c (mono_metadata_signature_deep_dup): Same.
10473 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
10476 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
10478 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
10480 * metadata-internals.h: Added mono_metadata_signature_dup_full.
10482 * class-internals.h: Update signatures to take a MonoMemPool.
10484 2008-06-02 Dick Porter <dick@ximian.com>
10486 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
10488 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
10489 FormatMessage API to get the error text. Fixes bug 321827.
10491 2008-06-02 Zoltan Varga <vargaz@gmail.com>
10493 * decimal.c: Add some micro optimizations to make decimal operations faster.
10495 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
10497 * reflection.c (method_encode_clauses): Take a mempool
10498 as parameter and use it to allocate the clause array.
10500 * reflection.c (mono_image_get_field_on_inst_token): Free
10501 the inflated type after encoding it.
10503 * reflection.c (mono_dynamic_image_free): Free each element
10504 of MonoDynamicImage::gen_params.
10506 * reflection.c (reflection_methodbuilder_to_mono_method):
10507 Allocate the generic param array from the mempool.
10508 Allocate signature params from the mempool.
10510 * reflection.c (mono_reflection_generic_class_initialize):
10511 Free inflated fields after been used.
10513 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
10515 * icall.c: Reapply the memory leak fixes as they no
10516 longer make mono crash.
10518 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
10520 * reflection.c (mono_type_get_object): Don't store the suplied
10521 MonoType with type_hash. A caller which pass a type that
10522 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
10523 might end with a pointer to freed memory.
10524 The solution is to use byval_arg or this_arg from the associated
10525 MonoClass of the supplied type.
10527 2008-05-29 Zoltan Varga <vargaz@gmail.com>
10529 * icall.c: Revert the rest of the last change as it breaks the build too.
10531 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
10533 * icall.c: Revert a leak fix as it's breaking the build.
10535 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
10537 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
10539 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
10541 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
10543 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
10545 * icall.c: Fix some memory leaks.
10547 2008-05-29 Dick Porter <dick@ximian.com>
10549 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
10550 async socket operations from the pending list when a socket
10551 closes. Leaving it until the threadpool services the event
10552 exposes a race condition when a socket descriptor is reused.
10555 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10557 * object.c: Fix negative index check for array alocation.
10559 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10561 * icall.c, marshal.c: Delegate wrappers should skip visibility.
10562 This check is performed by the verifier for IL created delegates
10563 and by Delegate::CreateDelegate for programatically created ones.
10566 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10568 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
10569 Fix code to use mono_array_size_t instead of int.
10571 Based on patch by Luis F. Ortiz.
10572 Contributed under X11 license.
10573 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10575 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10577 * icall.c: Added ves_icall_System_Array_GetLongLength and
10578 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
10581 * icall.h: Export both new functions.
10583 Based on patch by Luis F. Ortiz.
10584 Contributed under X11 license.
10585 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10587 2008-05-28 Martin Baulig <martin@ximian.com>
10589 The debugger now requires exactly r103463.
10591 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
10592 This version is not supported by the debugger, wait for 72.
10594 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10596 * object.h: Changed array related functions to use
10597 mono_array_size_t instead of guint32. Forgot to commit this file.
10599 Patch by Luis F. Ortiz.
10600 Contributed under X11 license.
10601 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10604 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10606 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
10607 don't define it. Use the number literal instead.
10609 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
10611 * icall.c: Changed array related functions to use
10612 mono_array_size_t instead of guint32.
10614 * icall.c (ves_icall_System_Array_GetLength): Check for length
10615 overflow under MONO_BIG_ARRAYS.
10617 Based on patch by Luis F. Ortiz.
10618 Contributed under X11 license.
10619 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10621 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
10623 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
10625 Based on patch by Luis F. Ortiz.
10626 Contributed under X11 license.
10627 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10629 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
10631 * object.c, object.h: Changed array related functions to use
10632 mono_array_size_t instead of guint32.
10634 Patch by Luis F. Ortiz.
10635 Contributed under X11 license.
10636 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10638 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
10640 * object.h: Introduced mono_array_size_t typedef. This must be used
10641 in all places an array length is expected. This is 64bits wide if
10642 MONO_BIG_ARRAYS is enabled.
10644 Patch by Luis F. Ortiz.
10645 Contributed under X11 license.
10646 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10648 2008-05-27 Zoltan Varga <vargaz@gmail.com>
10650 * security-manager.c class.c: Set the class exception info by calling
10651 mono_class_set_failure ().
10653 * class.c (mono_class_get_exception_data): New accessor function.
10654 (mono_class_set_failure): Store exception_data in the property hash.
10656 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
10657 the struct as a property.
10659 * loader.c (mono_get_method_full): Store the lookup result for method
10660 tokens in method_cache, the others in methodref_cache to decrease the memory
10661 usage of hash tables.
10663 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
10664 (mono_image_init): method_cache is lazy inited now.
10666 * metadata-internals.h (struct _MonoImage): Change method_cache to
10667 a MonoValueHashTable, add a separate methodref_cache.
10669 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
10671 * number-formatter.h: Fix tables to avoid arithemtic overflow in
10672 Double.ToString as exposed by Bug #383531.
10674 2008-05-26 Zoltan Varga <vargaz@gmail.com>
10676 * number-formatter.h: Make some tables static.
10678 * class.c (mono_method_set_generic_container): New accessor function.
10679 (mono_method_get_generic_container): Ditto.
10681 * class-internals.h (struct _MonoMethod): Remove rarely used
10682 'generic_container' field, store it in the property hash instead. Add
10683 'is_generic' boolean field instead.
10685 * image.c (mono_image_init): Initialize property_hash.
10686 (mono_image_close): Destroy property_hash.
10688 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
10689 hold rarely used fields of runtime structures belonging to this image.
10691 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
10692 to get/set method->generic_container.
10694 * loader.c (mono_get_method_from_token): Avoid loading the method header for
10697 2008-05-25 Zoltan Varga <vargaz@gmail.com>
10699 * class.c (mono_class_inflate_generic_method_full): Don't increase
10700 mono_stats.inflated_method_count for methods found in the cache.
10702 * threads.c (mono_thread_request_interruption): Add a comment about
10705 2008-05-24 Zoltan Varga <vargaz@gmail.com>
10707 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
10708 interface_offsets_packed table.
10710 * class.c (mono_class_init): Remove some dead code.
10712 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
10713 mono_class_setup_vtable () when CAS is active to detect security problems.
10715 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
10717 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
10719 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
10720 parameters as it's irrelevant for delegate checking.
10722 2008-05-23 Zoltan Varga <vargaz@gmail.com>
10724 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
10726 * class.c (mono_class_init): Control the creation of a generic vtable using
10727 a global which is true by default, but set to false by the runtime startup code.
10729 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
10730 Disabled for now since it breaks the embedding API.
10731 Move the setup of class->methods for arrays to mono_class_setup_methods ().
10732 (mono_class_setup_methods): Add a memory barrier.
10734 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
10735 when mono_class_init () doesn't compute the generic vtable.
10737 2008-05-23 Massimiliano Mantione <massi@ximian.com>
10738 * profiler.c: Added mono_profiler_install_statistical_call_chain,
10739 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
10740 to support call chains (backtrace) in the stat profiler.
10741 * profiler.c, profiler-private.h: Likewise.
10743 2008-05-22 Mark Probst <mark.probst@gmail.com>
10745 * generic-sharing.c: Init generic class when a method of it is
10746 requested via a runtime generic context.
10748 2008-05-22 Zoltan Varga <vargaz@gmail.com>
10750 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
10752 * reflection.c (mono_type_get_object): Add a FIXME.
10754 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
10756 * class.c (mono_class_get_method_by_index): New helper function, returning an
10757 entry in the class->methods array.
10759 2008-05-21 Zoltan Varga <vargaz@gmail.com>
10761 * class.c (mono_class_init): Only do the array optimization for szarrays.
10762 Avoid creating a generic vtable for generic instances as well.
10763 (mono_class_get_method_from_name_flags): Don't search in the metadata for
10766 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
10768 * loader.c (mono_get_method_constrained): Inflate the signature
10769 with class context. Fix #325283.
10771 2008-05-21 Zoltan Varga <vargaz@gmail.com>
10773 * object.c (mono_class_create_runtime_vtable): Add a comment.
10775 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
10777 (setup_interface_offsets): Handle the case when this is called twice for arrays.
10778 (mono_class_setup_vtable_general): Add an assert.
10779 (mono_class_init): Avoid creating a generic vtable for arrays.
10781 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
10782 here, let mono_class_init () do that.
10784 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
10785 interfaces in mscorlib.
10787 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
10788 interfaces. Add some comments.
10789 (mono_class_init): Call mono_class_setup_methods () here since it is no
10790 longer called by mono_class_setup_vtable ().
10792 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
10793 not set in class->vtable.
10794 (mono_class_create_runtime_vtable): Reenable the disabled code.
10796 * object.c (mono_class_create_runtime_vtable): Disable the last change for
10797 now as it causes some test failures.
10799 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
10800 if using the vtable trampoline. Also remove some strange code which put the
10801 generic methods themselves into the vtable slots. Remove the AOT init_vtable
10802 stuff as it is no longer needed.
10804 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
10806 * pedump.c: Give make --verify all option check code as well.
10807 Using --verify code won't check for metadata now.
10809 2008-05-19 Martin Baulig <martin@ximian.com>
10811 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
10814 (_mono_debug_using_mono_debugger): New global variable; it's set
10815 directly by the debugger, so mono_debug_using_mono_debugger() also
10816 works after attaching.
10818 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
10820 * object.c (mono_class_create_runtime_vtable): Use memory barriers
10821 as we do double checked locking on MonoClass::runtime_info and
10822 MonoClassRuntimeInfo::domain_vtables.
10824 2008-05-18 Zoltan Varga <vargaz@gmail.com>
10826 * debug-helpers.c (print_field_value): Fix a warning.
10828 2008-05-16 Zoltan Varga <vargaz@gmail.com>
10830 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
10831 set in the AOT case.
10833 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
10835 * class.c (mono_class_setup_vtable_general): Use memory barriers
10836 as we do double checked locking on MonoClass::vtable.
10838 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
10840 * reflection.c (resolve_object): Inflate only if the generic context
10841 is not null. Fixes #389886.
10843 2008-05-15 Jonathan Chambers <joncham@gmail.com>
10845 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
10848 Code is contributed under MIT/X11 license.
10850 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
10852 * class.c: Revert unrelated change.
10854 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
10856 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
10857 a generic instantiation, use mono_class_from_mono_type instead of playing
10858 with MonoType directly.
10860 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
10862 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
10863 checks must ignore generic instantiations, so mono_class_has_parent is not
10864 suitable. Fixes #390128.
10866 2008-05-14 Zoltan Varga <vargaz@gmail.com>
10868 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
10869 it to avoid registering tokens during metadata generation. Fixes #390023.
10871 2008-05-14 Kornél Pál <kornelpal@gmail.com>
10873 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
10876 Contributed under MIT/X11 license.
10878 2008-05-14 Kornél Pál <kornelpal@gmail.com>
10880 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
10881 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
10882 to fixup the EXE image.
10883 (mono_cleanup): Use mono_close_exe_image.
10884 (mono_close_exe_image): New function.
10885 * image.c: Include "marshal.h".
10886 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
10887 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
10888 counting when the image is loaded outside of mono_image_open_full. Set status
10889 based on GetLastError.
10890 * coree.c: Include required headers. Add init_from_coree.
10891 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
10892 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
10893 (_CorExeMain): Set init_from_coree.
10894 (CorExitProcess): Only call ExitProcess for now.
10895 (CorBindToRuntimeEx): New stub implementation.
10896 (CorBindToRuntime): New function.
10897 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
10898 (MonoFixupExe): ILONLY executables require no fixups.
10899 (mono_set_act_ctx): New function to set activation context.
10900 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
10901 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
10902 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
10903 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
10905 * domain-internals.h: Add mono_close_exe_image.
10907 Contributed under MIT/X11 license.
10909 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
10911 * metadata.c (mono_metadata_compute_size): Correctly calculate field
10912 size for generic param and event tables. Fixes #388977.
10914 2008-05-13 Zoltan Varga <vargaz@gmail.com>
10916 * loader.c (mono_method_signature): Use memory barriers because of the double
10917 checked locking pattern.
10919 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
10920 aborting or aborted as well. Fixes #376391.
10922 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
10923 existing runtime state in the Suspend handler during shutdown.
10925 2008-05-12 Zoltan Varga <vargaz@gmail.com>
10927 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
10929 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
10930 which are starting up or shutting down.
10932 * threads.c (mono_threads_set_shutting_down): Don't return a value since
10933 this function never returns if the runtime is already shutting down.
10935 * icall.c (ves_icall_System_Environment_Exit): Update after
10936 mono_threads_set_shutting_down () signature change.
10938 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
10940 * class.c: Added can_access_instantiation to verify if the instantiation
10941 is visible. Fix access check for nested types as they returned TRUE
10942 before doing type and generic instantiation visibility checks.
10944 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
10946 * reflection.c (mono_reflection_create_generic_class): The created type
10947 must have a different container from its TypeBuilder. Otherwise they
10948 will end sharing generic arguments, which is wrong.
10950 Due to the sharing, making a generic instance of the created type using
10951 the TypeBuider generic arguments resulted in the generic type definition
10952 been returned, which is wrong as well.
10954 As a bonus the code was leaking the type_params array. This memory should
10955 be allocated from the image mempool.
10957 This fixes bug #354047.
10959 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
10961 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
10962 to here as they are now used in assembly.c new code.
10963 Added a skipverification flag to MonoAssembly.
10964 New internal function mono_assembly_has_skip_verification.
10966 * assembly.c: New function mono_assembly_has_skip_verification. It checks
10967 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
10970 2008-05-07 Zoltan Varga <vargaz@gmail.com>
10972 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
10973 needed. Fixes #387034.
10975 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
10977 2008-05-06 Miguel de Icaza <miguel@novell.com>
10979 * assembly.c (mono_assembly_load_reference): Prevent crash while
10980 disassembling Silverlight 2.0 executables while we still do not
10981 have GACed libraries.
10983 2008-05-07 Zoltan Varga <vargaz@gmail.com>
10985 * reflection.c: Special case generic type definitions as well. Fixes #383444.
10987 2008-05-06 Zoltan Varga <vargaz@gmail.com>
10989 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
10990 of the dynamic case. Fixes #387404.
10992 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
10994 *verify.c (mono_verifier_is_class_full_trust): If under
10995 verify_all and the verifier mode was not set, only
10996 gac and corlib types are fulltrust. This makes --verify-all
10997 usable to detect unverifiable code, which is the expected
11000 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
11002 * verify.h: Ops, commited the header with debug
11005 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
11007 * verify.c (merge_stack): Use the new value on unverifiable
11010 * verify.c (verify_type_compatibility_full): Comparison
11011 of nullable types can't use mono_class_is_assignable_from.
11013 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
11014 that makes all verification errors be reported.
11016 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
11017 mono_method_verify.
11019 2008-05-05 Robert Jordan <robertj@gmx.net>
11021 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
11022 support for value types. See #386415.
11024 * object.c: comments.
11026 Code is contributed under MIT/X11 license.
11028 2008-05-05 Martin Baulig <martin@ximian.com>
11030 * debug-mono-symfile.h
11031 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
11032 for old pre-terrania symbol files.
11034 2008-05-05 Andreas Färber <andreas.faerber@web.de>
11036 * mono-config.c: Add ppc64 architecture.
11038 Code is contributed under MIT/X11 license.
11040 2008-05-05 Andreas Färber <andreas.faerber@web.de>
11042 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
11043 PPC64 uses function descriptors as well.
11045 Code is contributed under MIT/X11 license.
11047 2008-05-04 Zoltan Varga <vargaz@gmail.com>
11049 * object.c (compute_class_bitmap): Ignore literal static fields.
11051 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
11052 var has an invalid format.
11053 (describe_ptr): Add some sanity checks for the vtable.
11054 (add_nursery_frag): Clear unused nursery fragments.
11055 (major_collection): Clear all remaining nursery fragments.
11057 2008-05-03 Robert Jordan <robertj@gmx.net>
11059 * image.c, metadata-internals.h: add thunk_invoke_cache.
11061 * marshal.c, marshal.h: implement
11062 mono_marshal_get_thunk_invoke_wrapper ().
11064 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
11066 Code is contributed under MIT/X11 license.
11068 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
11070 * verify.c (do_leave): Empty the stack.
11072 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
11074 * class.c (mono_class_is_assignable_from): Variance
11075 doesn't work between reference and value types. For example,
11076 given type C<T+>, C<int32> is not assignable to C<object>.
11077 Break the argument checking loop on first error.
11079 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
11081 * icall.c : base64_to_byte_array() needs some more strict
11082 check for sequence of '=' characters. Patch by Santa
11083 Marta (http://deee.g.hatena.ne.jp/santamarta).
11085 Contributed under MIT/X11 license.
11086 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
11088 2008-05-02 Jonathan Chambers <joncham@gmail.com>
11090 * domain.c: Disable LoadLibrary support to fix Win32 build.
11092 Code is contributed under MIT/X11 license.
11094 2008-05-02 Zoltan Varga <vargaz@gmail.com>
11096 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
11097 to help with cache behaviour.
11099 2008-05-01 Miguel de Icaza <miguel@novell.com>
11101 * appdomain.c (mono_domain_from_appdomain): Add new accessor
11104 2008-05-01 Zoltan Varga <vargaz@gmail.com>
11106 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
11108 2008-05-01 Dick Porter <dick@ximian.com>
11110 * process.c (process_get_fileversion): Only pass 16 bits of
11111 language ID to VerLanguageName. Fixes bug 381204.
11113 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
11115 * verify.c (mono_method_verify): Fix the comparison
11116 operator for code bounds check.
11118 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
11120 * verify.c (mono_method_verify): Check the bounds of
11121 all access of the code array.
11123 2008-04-29 Kornél Pál <kornelpal@gmail.com>
11125 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
11127 2008-04-28 Zoltan Varga <vargaz@gmail.com>
11129 * image.c (mono_image_strong_name_position): Fix return value when the rva is
11132 2008-04-28 Kornél Pál <kornelpal@gmail.com>
11134 * loader.c (mono_get_method_from_token, mono_method_signature): Add
11135 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
11136 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
11137 fixup main EXE images when using mono.exe for mixed-mode assembly support.
11138 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
11140 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
11141 runtime initialization from metadata.
11142 * assembly.c: Remove obsolete ceGetModuleFileNameA.
11143 (mono_set_rootdir): Use mono_get_module_file_name.
11144 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
11146 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
11147 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
11148 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
11149 MonoCLIImageInfo. Add support for module handles.
11150 (load_cli_header): Update mono_cli_rva_image_map signature.
11151 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
11152 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
11153 (mono_image_rva_map): Add support for module handles.
11154 (mono_image_ensure_section_idx): Add support for module handles.
11155 (mono_image_close): Add support for module handles.
11156 (do_load_header): Add support for module handles.
11157 (mono_image_open_from_module_handle): New function for internal use.
11158 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
11159 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
11160 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
11162 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
11163 * image.h: Add mono_image_fixup_vtable.
11164 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
11166 * coree.h: New file.
11167 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
11168 unsupported native code.
11169 (mono_marshal_set_callconv_from_modopt): New function splitted from
11170 mono_marshal_get_managed_wrapper.
11171 (mono_marshal_get_managed_wrapper): Use
11172 mono_marshal_set_callconv_from_modopt.
11173 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
11174 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
11175 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
11176 that results in a deadlock when the runtime is loaded in _CorDllMain.
11177 * Makefile.am: Add coree.c and coree.h.
11179 Contributed under MIT/X11 license.
11181 2008-04-28 Mark Probst <mark.probst@gmail.com>
11183 * generic-sharing.c: Search for type arguments in array element
11186 2008-04-28 Mark Probst <mark.probst@gmail.com>
11188 * class-internals.h, generic-sharing.c: New, small runtime generic context.
11190 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
11192 * object.c: Don't setup the RGCTX when the vtable is created,
11193 because we're setting it up lazily now.
11195 2008-04-26 Zoltan Varga <vargaz@gmail.com>
11197 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
11200 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
11202 * verify.c (verify_class_for_overlapping_reference_fields):
11203 If class is under fulltrust allow reference types to overllap
11204 if they have the same RVA.
11206 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
11208 * pedump.c: Added new flag valid-only, that makes the verifier
11209 behaves just like --security=validil. It won't fail type load
11210 due to unverifiable restrictions.
11212 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
11214 * class-internals.h (struct MonoMethod): Added a verification_success
11215 field to cache verifier executions. Reduced MonoMethod:slot size by
11218 2008-04-23 Zoltan Varga <vargaz@gmail.com>
11220 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
11221 instead of a 'vt' argument to save an indirection and to allow these to be used
11223 (scan_vtype): New helper function to scan an area using a gc descriptor.
11224 (mono_gc_wbarrier_value_copy): Implement this.
11225 (handle_remset): Add support for REMSET_VTYPE.
11226 (find_in_remset_loc): Ditto.
11227 (mono_gc_base_init): Allow some debugging options to be controlled through the
11228 use of the MONO_GC_DEBUG env variable.
11229 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
11230 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
11232 2008-04-23 Martin Baulig <martin@ximian.com>
11234 * domain.c (mono_domain_create): Move the call to
11235 mono_debug_domain_create() down, after allocating the domain id.
11237 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
11239 verify.c (verify_class_for_overlapping_reference_fields): Skip
11240 static fields while verifying for overlapping fields as they
11241 don't matter at all.
11243 2008-04-23 Marek Habersack <mhabersack@novell.com>
11245 * domain-internals.h: added a declaration of
11246 mono_make_shadow_copy.
11248 * assembly.c (mono_assembly_open_full): shadow copying of
11249 assemblies moved to here, so that all the assemblies within the
11250 application domain's private binary directories can be
11251 processed. Fixes bug #380546
11253 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
11254 mono_make_shadow_copy and made non-static. The decision whether
11255 to shadow-copy an assembly is made based on its location - it's
11256 copied if it's in one of the private application domain binary
11257 directories and its different to the target file in the shadow
11258 directory. Fixes bug #380546
11260 2008-04-22 Zoltan Varga <vargaz@gmail.com>
11262 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
11264 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
11267 * reflection.c (mono_image_create_token): Handle
11268 Method/ConstructorOnTypeBuilderInst.
11269 (resolve_object): Ditto.
11270 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
11271 so it can be called from resolve_object. Also handle the case when the inflated
11272 class already has its methods setup.
11274 2008-04-21 Martin Baulig <martin@ximian.com>
11276 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
11278 2008-04-20 Geoff Norton <gnorton@novell.com>
11280 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
11281 pointer dereference.
11283 2008-04-15 Marek Habersack <mhabersack@novell.com>
11285 * appdomain.c (try_load_from): if IOMAP is in effect, call the
11286 portability API to look up the assembly file. Fixes behavior in
11287 situations when the application has a bin/ directory, but the
11288 assembly search patch refers to Bin/ (and thus the requested file
11289 name is Bin/SomeLibrary.dll). Fixes bug #379888
11291 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
11293 verify.c (mono_type_is_generic_argument): Extracted this check
11294 from a dozen places to here.
11296 verify.c: Fixed all issues related to boxing generic arguments
11297 and their constraints.
11299 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
11301 verify.c (mono_class_interface_implements_interface): Fix win32 build.
11303 2008-04-14 Zoltan Varga <vargaz@gmail.com>
11305 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
11306 isn't finished yet. Fixes #363447.
11308 2008-04-13 Zoltan Varga <vargaz@gmail.com>
11310 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
11313 2008-04-13 Jb Evain <jbevain@novell.com>
11315 * domain.c: update the 2.1 profile versions.
11316 Merged from the Moonlight 2 branch.
11318 2008-04-12 Zoltan Varga <vargaz@gmail.com>
11320 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
11321 mscorlibs for the non-refonly case as well.
11323 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
11324 in mono_assembly_load_from_full (). Fixes #378924.
11326 2008-04-11 Geoff Norton <gnorton@novell.com>
11328 * icall.c: The global extern environ doesn't exist on Mac. We
11329 need to call NSGetEnviron instead.
11331 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11333 verify.c: Add generic method constraint verification.
11335 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11337 class.c (mono_class_inflate_generic_method_full): Add a long
11338 explanation to the is_mb_open hack. Remove the FIXME.
11340 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11342 * verify.c (mono_method_verify): Mark all unknown opcodes
11343 as invalid. Mark jmp as unverifiable.
11345 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11347 * verify.c: Add code to do type constraint verification on class instances.
11349 * verify.c (mono_verifier_verify_class): Use the type constraint
11352 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11354 * class.c (mono_class_get_field_default_value): Don't pass cindex
11355 as hint to mono_metadata_get_constant_index. The local is not initialized
11356 and should contain garbage most of the time. This could only work
11357 with a lot of luck.
11359 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
11361 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
11363 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
11365 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
11367 * class.c (mono_class_from_generic_parameter): Save the token of the
11368 generic param in MonoClass::sizes.generic_param_token.
11370 * reflection.c (mono_custom_attrs_from_class): If the class type is
11371 VAR or MVAR retrieve the attributes of the generic param.
11373 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
11375 * class.c (mono_class_init): Do class verification if the verifier
11378 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
11380 * verify-internal.h: Added mono_verifier_verify_class.
11382 * verify.c: Added mono_verifier_verify_class. It checks for
11383 classes with explicit layout that have overlapping reference fields.
11385 * pedump.c: Init the verifier state prior to verification. Fixed
11386 command line arguments.
11388 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
11390 * Makefile.am: Added verify-internals.h, hopefully fix the build.
11392 2008-04-08 Zoltan Varga <vargaz@gmail.com>
11394 * verify-internals.h: Fix a warning.
11396 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
11398 * verify-internals.h: New header with the verifier configuration
11399 extracted from mini.c.
11401 * verify.c: Implemented the new functions exported by verify-internals.h.
11403 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
11405 * verify.c: Add proper verification of ckfinite.
11407 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
11409 * verify.c (do_conversion): Improved error message to something
11412 * verify.c (check_is_valid_type_for_field_ops): Fix to work
11413 with primitive types.
11415 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
11417 * verify.c: Added tail prefix checking. Marked icall
11420 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
11422 * verify.c: Fix the detection of branches to the middle
11425 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
11427 * verify.c: Implemented verification of volatile. and
11428 unaligned. prefix. Check if a type is valid after retrieving it.
11430 2008-04-01 Dick Porter <dick@ximian.com>
11432 * process.c (process_get_fileversion): If there's no string block,
11433 set the file language to en_US. Fixes the other new part of bug
11436 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
11438 * class.c: New functions mono_method_can_access_field_full and
11439 mono_method_can_access_method_full. They perform type visibility
11440 and type site check.
11442 * class-internal.h: Added exported functions.
11444 * verify.c: Use new functions to implement proper visibility checks.
11446 2008-03-29 Zoltan Varga <vargaz@gmail.com>
11448 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
11450 2008-03-28 Dick Porter <dick@ximian.com>
11452 * process.c (process_get_fileversion): Use the first language ID
11453 we see, rather than insisting on an invariant language. Fixes bug
11456 2008-03-28 Zoltan Varga <vargaz@gmail.com>
11458 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
11459 the streams to fix reading of invalid memory later.
11461 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
11464 2008-03-26 Zoltan Varga <vargaz@gmail.com>
11466 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
11467 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
11469 2008-03-26 Massimiliano Mantione <massi@ximian.com>
11470 * threads.h: Added MonoThreadManageCallback type and
11471 mono_thread_set_manage_callback prototype
11472 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
11473 (used to store the mono_thread_manage callback).
11474 * threads.c: Added mono_thread_set_manage_callback, and handle
11475 "MonoThread->manage_callback" in build_wait_tids.
11477 2008-03-26 Dick Porter <dick@ximian.com>
11479 * process.c (process_get_fileversion): Set FileVersionInfo strings
11480 to Empty when the resource doesn't have the particular info.
11483 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
11485 * verify.c (mono_method_verify): Proper prefix validation.
11487 2008-03-25 Zoltan Varga <vargaz@gmail.com>
11489 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
11490 itself in a separate argument instead of throwing them. Fixes #373448.
11492 * appdomain.c: Bump corlib version.
11494 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
11496 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
11498 2008-03-20 Kornél Pál <kornelpal@gmail.com>
11500 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
11503 2008-03-20 Mark Probst <mark.probst@gmail.com>
11505 * generic-sharing.c, class-internals.h: Code for putting
11506 reflection types into the runtime generic context.
11508 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
11510 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
11514 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
11516 * verify.c (VerifyContext): Added instruction prefix data to the struct.
11518 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
11520 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
11522 * verify.c (do_cast): Let the result value keep the boxed status.
11524 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
11526 2008-03-17 Jb Evain <jbevain@novell.com>
11528 * reflection.c: when running on a 2.0 runtime, emit
11529 unconditionally the #~ header version as 2.0, and the
11530 CLI header version as 2.5, for symmetry's sake with csc.
11532 2008-03-16 Zoltan Varga <vargaz@gmail.com>
11534 * class.c: Remove the unused cache_interface_offsets stuff.
11536 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
11537 profiler.c: Fix warnings.
11539 2008-03-16 Mark Probst <mark.probst@gmail.com>
11541 * generic-sharing.c, class-internals.h: Support for putting
11542 methods into the runtime generic context.
11544 2008-03-16 Zoltan Varga <vargaz@gmail.com>
11546 * class.c (mono_class_setup_fields): Ignore calls made to this function for
11547 classes which are generic instances of not-yet finished typebuilders. Fixes
11550 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
11552 2008-03-15 Zoltan Varga <vargaz@gmail.com>
11554 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
11556 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
11557 field, replace it with a hash table in MonoDynamicImage.
11559 * reflection.c (inflate_mono_method): Access the generic definition object from
11560 image->generic_def_objects instead of imethod->reflection_info.
11562 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
11564 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
11566 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
11567 function in reflection.c so it is easier to keep in sync with the dynamic image
11570 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
11571 mono_image_close ().
11573 2008-03-15 Mark Probst <mark.probst@gmail.com>
11575 * class.c (mono_class_generic_sharing_enabled): Disable generic
11576 sharing for all architectures except AMD64 and x86 to fix build.
11578 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
11580 * verify.c: Use the generic definition MonoGenericContext when available.
11581 Remove code for checking generics instance compatibility in favor of
11582 mono_class_is_assignable_from.
11584 2008-03-14 Mark Probst <mark.probst@gmail.com>
11586 * marshal.c, marshal.h, metadata-internals.h, image.c,
11587 wrapper-types.h: New wrapper for invoking a shared static method
11588 without having to pass the runtime generic context argument.
11590 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
11592 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
11594 2008-03-14 Zoltan Varga <vargaz@gmail.com>
11596 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
11598 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
11599 create a token from a FieldOnTypeBuilderInst.
11600 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
11601 (resolve_object): Ditto.
11603 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
11604 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
11606 2008-03-14 Martin Baulig <martin@ximian.com>
11608 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
11610 * debug-mono-symfile.h
11611 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
11612 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
11614 2008-03-10 Martin Baulig <martin@ximian.com>
11616 * debug-mono-symfile.h
11617 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
11618 `lexical_block_table_offset'.
11619 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
11621 (MonoSymbolFile): Added `version'.
11624 (MonoDebugLexicalBlockEntry): Removed.
11625 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
11628 * mono-debug.c (mono_debug_add_method): Don't compute lexical
11629 blocks here; the debugger now does this internally.
11631 2008-02-27 Martin Baulig <martin@ximian.com>
11633 * object.c (mono_runtime_exec_main): Call
11634 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
11635 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
11637 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
11639 * verify.c (verify_type_compatibility_full): Allow native int to be converted
11640 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
11642 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
11644 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
11645 ldftn with a virtual method.
11647 2008-03-13 Geoff Norton <gnorton@novell.com>
11649 * decimal.c: Only include memory.h if the platform has it.
11651 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
11653 * assembly.c, class.c, metadata-internals.h: make sure public key
11654 tokesns are compared in a case-insensitive way. Also, all
11655 the lookups in the GAC use a lowercase public key token
11656 (gaacutil already does the lowercasing on install). Fixes
11659 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
11661 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
11664 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
11666 * image.c: when someone loads a mscorlib from a file, return the
11667 currently loaded mscorlib (fixes bug #369253).
11669 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
11671 * class.c: handle types with no parents by forcing them to have
11672 System.Object as a parent and marking them as broken (this currently
11673 allows the first part of bug #369173 to work as well, likely because
11674 we don't check for typeload exceptions everywhere yet).
11676 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
11678 * class.c: more complete check that types belong to corlib
11679 (fixes second part of bug #369173).
11681 2007-03-10 Bill Holmes <billholmes54@gmail.com>
11683 * generic-sharing.c: Including glib.h for the MSVC builds to define
11684 "inline" to "__inline" before including mono-membar.h.
11686 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
11687 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
11690 Contributed under MIT/X11 license.
11692 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
11694 * verify.c (do_invoke_method): Remove return type validation.
11696 * verify.c (do_ret): Do return type validation at return site instead of
11699 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
11701 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
11703 * verify.c: Some todos cleaned and improved a few error messages.
11705 2008-03-08 Zoltan Varga <vargaz@gmail.com>
11707 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
11709 2008-03-07 Zoltan Varga <vargaz@gmail.com>
11711 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
11712 system types correctly.
11714 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
11717 2008-03-06 Zoltan Varga <vargaz@gmail.com>
11719 * assembly.c (build_assembly_name): Fix a warning.
11721 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
11723 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
11724 the called function takes an object type argument. Fixes storing or
11725 valuetypes across remoting as well as reducing memory usage.
11726 * image.c, metadata-internals.h: remove now unused ldfld_remote and
11727 stfld_remote wrapper caches.
11729 2008-03-06 Zoltan Varga <vargaz@gmail.com>
11731 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
11734 * reflection.c (mono_image_register_token): New helper function to save
11735 a token->object mapping.
11737 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
11740 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
11741 one dimension arrays. Fixes #367670.
11742 (mono_reflection_get_type_internal): Ditto.
11744 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
11746 * marshal.c: mono_load_remote_field_new() always returns object.
11747 so use the proper signature (fixes bug #366445).
11749 2008-03-04 Zoltan Varga <vargaz@gmail.com>
11751 * class-internals.h (MonoMethod): Remove unused uses_this flag,
11752 add an 'inline_failure' flag instead.
11754 2008-03-04 Mark Probst <mark.probst@gmail.com>
11756 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
11757 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
11758 contains the location of "this", used for exception handling.
11760 2008-03-04 Zoltan Varga <vargaz@gmail.com>
11762 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
11763 their size on all platforms for perf reasons.
11765 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11767 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
11770 * object-internal.h: Same.
11772 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11774 * reflection.h: Fix the build I just broke.
11776 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11778 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
11779 Test if a token is valid, this remove explicit usage of
11780 MonoDynamicImage::tokens from the verifier code.
11782 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
11784 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
11785 instead of direct access to MonoDynamicImage::tokens.
11787 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11789 * verify.c (token_bounds_check): Fix the build I just broke.
11791 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11793 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
11795 * verify.c (verifier_load_method): Fixed the errors message.
11797 * verify.c (mono_method_verify): Fixed a debug message.
11799 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
11801 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
11802 mono-perfcounters.h, class-internals.h: support for predefined
11803 writable counters, query of categories and counters, bugfixes.
11805 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
11807 * verify.c (do_refanytype): Verify the refanytype opcode.
11809 * verify.c (mono_method_verify): Use do_refanytype.
11811 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
11813 * verify.c (do_mkrefany): Verify the mkrefany opcode.
11815 * verify.c (mono_method_verify): Use do_mkrefany.
11817 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
11819 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
11820 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
11823 2008-02-27 Zoltan Varga <vargaz@gmail.com>
11825 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
11826 the type load exception.
11828 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
11830 * verify.c: Added a few FIXME for method signatures
11832 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
11833 of mono_method_get_signature and get vararg call working. Removed unused
11834 checks for return value.
11836 * verify.c (do_refanyval): Verify the refanyval opcode.
11838 * verify.c (mono_method_verify): Implemented verification of arglist and
11841 2008-02-27 Zoltan Varga <vargaz@gmail.com>
11843 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
11844 vtypes to marshal.c.
11846 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
11847 it works for AOT as well.
11849 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
11851 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
11852 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
11853 the system time is adjusted.
11855 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
11857 * icall.c, icall-def.h: use the new time functions (fixes the
11858 non-monotonic behaviour of TickCount).
11860 2008-02-26 Zoltan Varga <vargaz@gmail.com>
11862 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
11863 it breaks the build.
11865 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
11866 cattr is not finished yet.
11868 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
11870 * verify.c: Proper token validation for field, method and type.
11872 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
11874 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
11876 * loader.c (method_from_memberref): Generate type load error instead of method missing
11877 if the type is not found.
11879 2008-02-23 Zoltan Varga <vargaz@gmail.com>
11881 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
11882 some of the conversions caused the generation of a marshal directive exception.
11884 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
11886 verify.c: Report which exception should be thrown by the JIT.
11887 Added a lot of FIXME notes.
11889 2008-02-22 Mark Probst <mark.probst@gmail.com>
11891 * generic-sharing.c: Runtime generic context slots are not
11892 instantiated on init anymore. Instead, provide function to do the
11893 instantiating on demand.
11895 * class-internals.h: Added vtable to runtime generic context.
11896 Macros for encoding direct and indirect slot offsets in one
11899 2008-02-21 Mark Probst <mark.probst@gmail.com>
11901 * object.c, generic-sharing.c: Moved some generic sharing code
11902 from object.c to generic-sharing.c.
11904 * generic-sharing.c: Added support for extensible runtime generic
11907 * metadata-internals.h: Two new hash tables in MonoImage for
11908 extensible runtime generic context support.
11910 * domain.c: Unregister generic vtables upon domain unloading.
11912 * image.c: Destroy new hash tables upon image unloading.
11914 * metadata.c: Unregister generic subclasses upon image unloading.
11916 * class-internals.h: New data structure for runtime generic
11917 context template. New fields in the runtime generic context for
11920 * Makefile.am: Added generic-sharing.c.
11922 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
11924 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
11925 there is a pending loader exception, raise it.
11927 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
11930 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
11935 2008-02-20 Zoltan Varga <vargaz@gmail.com>
11937 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
11939 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
11941 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
11942 ref-only requests for compatibility with MS.
11944 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
11946 * reflection.c (mono_custom_attrs_from_method): Don't silently
11947 return an empty list for generic method instances.
11948 (mono_custom_attrs_from_param): Likewise.
11950 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
11951 Raja R Harinath <harinath@hurrynot.org>
11954 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
11955 * class.c (mono_class_inflate_generic_method_full): Initialize it
11956 when a fully-open method is instantiated.
11957 * metadata.c (inflated_method_equal, inflated_method_hash): Update
11959 * reflection.c (inflate_mono_method): Don't create a temporary context.
11961 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
11963 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
11964 Compute correct value, to prepare for imethod->reflection_info going away.
11966 2008-02-19 Zoltan Varga <vargaz@gmail.com>
11968 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
11970 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
11972 * verify.c: Implement skip visibility flag.
11974 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
11976 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
11977 which contains an extra field to tell the kind of exception that should be thrown.
11979 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
11981 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
11983 * loader.c (mono_method_get_param_names): Initialize 'klass' after
11984 'method' is updated.
11986 2008-02-11 Zoltan Varga <vargaz@gmail.com>
11988 * class.c (mono_class_layout_fields): Set class->min_align for classes using
11989 explicit layout as well. Fixes #360375.
11991 2008-02-11 Geoff Norton <gnorton@novell.com>
11993 * loader.c: Guard and dereference against inflated generic methods
11995 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
11997 * class.c: Include Retargetable spec in assembly name.
11998 * assembly.c: Always include PublicKeyToken spec in assembly name
11999 (with value "null" if assembly is not signed), and include
12001 * icall-def.h: Added icall for Assembly.get_fullname.
12002 * icall.c: Added icall returning the fullname of an assembly.
12004 2008-02-09 Zoltan Varga <vargaz@gmail.com>
12006 * class.c (mono_class_setup_vtable_general): Add a missing call to
12007 mono_class_setup_methods () which is needed in the AOT case.
12009 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
12011 * verify.c (mono_type_get_stack_name): Added. Return the name for the
12012 stack type of the given MonoType.
12014 * verify.c (verify_type_compatibility_full): Handle the void type.
12016 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
12017 way stack merging works.
12019 * verify.c (store_local): Improved verification message.
12021 * verify.c (do_branch_op): If the merging is invalid, the method
12022 is unverifiable and not invalid. Improved error message.
12024 * verify.c (merge_stacks): Properly merge a boxed valuetype and
12025 a reference type diferent than System.Object. Improved error
12028 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
12030 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
12032 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
12033 type of an enum even if the argument is byref.
12035 * verify.c: Replace all explicit uses of enumtype and enum_basetype
12036 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
12038 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
12040 *verify.c (verify_type_compatibility_full): Make enum types
12041 compatible with their base types.
12043 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
12044 types are compatible for the special case of a boxed valuetype and
12047 * verify.c (verify_stack_type_compatibility): The function
12048 is_compatible_boxed_valuetype was extracted from here.
12050 * verify.c (push_arg): Only set ctx->has_this_store if the method
12053 * verify.c (do_ldelem): Fixed a typo in an error message and added
12054 strict check for mixing int32 and native int as the array type
12057 * verify.c (merge_stacks): Consider boxed valuetypes in the
12058 compatibility checks.
12060 2008-02-07 Massimiliano Mantione <massi@ximian.com>
12061 * profiler.h: (MonoGCEvent): Added start-stop the world events.
12063 2008-02-06 Massimiliano Mantione <massi@ximian.com>
12064 *class.c: use_new_interface_vtable_code: renamed the env var to have
12065 a "MONO_" prefix, and fix the logic to enable it by default.
12067 2008-02-06 Massimiliano Mantione <massi@ximian.com>
12069 mono_class_setup_vtable_general: rewrote the way in which interface
12070 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
12071 makes the code more maintainable.
12072 For now the old code is still there, and can be activated setting
12073 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
12075 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
12077 * verify.c: guarded some debug functions around and #ifdef.
12079 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
12081 2008-02-06 Zoltan Varga <vargaz@gmail.com>
12083 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
12084 changes for now since they seem to break too many things.
12086 2008-02-05 Mark Probst <mark.probst@gmail.com>
12088 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
12089 mono_marshal_find_nonzero_bit_offset): Added macro and function
12090 for finding the byte- and bit-offset of a bitfield within a
12093 2008-02-05 Zoltan Varga <vargaz@gmail.com>
12095 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
12096 (mono_marshal_get_struct_to_ptr): Ditto.
12098 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
12101 2008-02-03 Zoltan Varga <vargaz@gmail.com>
12103 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
12104 between methods for non-corlib types.
12106 2008-02-02 Geoff Norton <gnorton@novell.com>
12108 * loader.c (mono_method_get_param_names): Populate the parameter name for
12109 generic parameters as well. (Fixes #342536)
12111 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
12113 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
12115 * verify.c (do_invoke_method): Fix for calling with byref structs.
12117 * verify.c (do_cast): push a boxed value type based on the type token and not
12120 2008-01-31 William Holmes <billholmes54@gmail.com>
12122 * process.c (process_module_string_read): Check the size returned form
12123 VerQueryValue to avoid out of memory exception.
12125 2008-01-30 Zoltan Varga <vargaz@gmail.com>
12127 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
12128 Handle properly modules which are not in the moduleref table. Fixes
12131 2008-01-29 Zoltan Varga <vargaz@gmail.com>
12133 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
12134 the dynamic case which is now in managed code.
12135 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
12137 * marshal.c (mono_string_to_bstr): Fix a warning.
12138 (init_com_provider_ms): Ditto.
12140 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
12142 * exception.c (mono_get_exception_out_of_memory): New helper function.
12144 2008-01-28 Jonathan Chambers <joncham@gmail.com>
12146 * marshal.c: Add support for BSTR marshalling
12147 using other COM systems.
12149 Code is contributed under MIT/X11 license.
12151 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
12153 * object.c (mono_runtime_invoke_array): reverted previous
12154 commit as it breaks the build.
12156 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
12158 * object.c (mono_runtime_invoke_array): Verify arguments for
12159 invalid types. Fixes #348522.
12161 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
12163 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
12164 non-final virtual calls using call.
12166 * verify.c (do_invoke): fixed some TODOs.
12168 * verify.c (push_arg): set has_this_store for "ldarga 0".
12170 2008-01-27 Zoltan Varga <vargaz@gmail.com>
12172 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
12173 which belong to an inflated class. Fixes #356531.
12175 2008-01-26 Robert Jordan <robertj@gmx.net>
12177 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
12178 which resort to FindFirstFile when a certain error condition
12179 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
12180 Code is contributed under MIT/X11 license.
12182 2008-01-24 Jonathan Chambers <joncham@gmail.com>
12184 * marshal.c (emit_marshal_string): Fix out string marshalling
12185 to use specified encoding. Fixes #323900.
12187 Code is contributed under MIT/X11 license.
12189 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
12191 * class.c (mono_class_inflate_generic_method_full): Don't modify
12192 iresult->context after cache check.
12194 2008-01-23 Zoltan Varga <vargaz@gmail.com>
12196 * class.c (mono_class_inflate_generic_method_full): Change the
12197 struct assignments to memcpy for better visibility and add some comments.
12199 2008-01-23 Dick Porter <dick@ximian.com>
12201 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
12202 procedure, and make it work on windows.
12204 2008-01-22 Zoltan Varga <vargaz@gmail.com>
12206 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
12207 a MonoReflectionTypeBuilder since it is always of that type.
12209 * reflection.c (mono_type_get_object): Remove an unneccesary check.
12211 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
12213 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
12215 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
12217 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
12219 * reflection.c (mono_reflection_create_runtime_class): Remove already created
12220 instantiations from the type cache.
12222 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
12224 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
12226 * verify.c (do_unbox_value): push a controled mutability managed pointer.
12228 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
12230 * verify.c (do_ldstr): added, verifies if the #US token is valid.
12232 * verify.c (mono_method_verify): removed old TODO
12234 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
12236 * verify.c (do_newobj): add visibility check.
12238 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
12240 * verify.c (do_load_function_ptr): add visibility check.
12242 2008-01-21 Massimiliano Mantione <massi@ximian.com>
12244 mono_generic_class_get_class: hook profiler events.
12245 mono_field_get_offset: added to support heap-shot in the new profiler.
12246 *class.h: exported mono_field_get_offset.
12248 mono_reflection_setup_internal_class: hook profiler events.
12250 2008-01-20 Zoltan Varga <vargaz@gmail.com>
12252 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
12253 argument here too and use it to avoid checking for pending exceptions if
12256 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
12258 * assembly.c (build_assembly_name): add arg for passing the assembly
12259 flags. Do not consider a PublicKey with value "null" valid.
12260 (mono_assembly_name_parse_full): added boolean argument that will be
12261 set if the assembly name contains a PublicKeyToken spec. Added support
12262 for the Retargetable spec for which only Yes or No are allowed as valid
12263 value. Consider assembly name invalid if Retargetable spec is set, but
12264 either version, culture or public key (token) are not specified.
12265 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
12266 with implementation in assembly.c.
12267 * icall.c (fill_reflection_assembly_name): also copy assembly flags
12268 from MonoAssemblyName.
12269 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
12270 introduced argument for mono_assembly_name_parse_full to know if the
12271 assembly name has a PublicKeyToken spec, and if it has instruct
12272 fill_reflection_assembly_name to use default value for keyToken (if
12273 PublicKeyToken is null).
12275 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
12277 * verify.c (mono_method_verify): fixed ovf ops with
12278 float values. They are unverifiable now.
12280 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
12282 * class.c (set_failure_from_loader_error): add BadImageException to the
12283 list of exceptions that can cause a type to fail to load.
12285 * class.c (mono_class_get_exception_for_failure): same.
12287 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
12289 * verify.c (in_any_exception_block): added, check if offset
12290 is part of any exception handling clause.
12292 * verify.c (get_stack_type): added VAR and MVAR types.
12294 * verify.c (do_stobj): better error messages.
12296 * verify.c (do_cpobj): added, check cpobj.
12298 * verify.c (do_initobj): added, check initobj.
12300 * verify.c (do_sizeof): added, check sizeof.
12302 * verify.c (do_localloc): added, check localloc.
12304 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
12306 2008-01-17 Zoltan Varga <vargaz@gmail.com>
12308 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
12309 save_lmf/restore_lmf opcodes.
12311 * threads.c (mono_threads_install_notify_pending_exc): New function to
12312 install a callback notifying the JIT there is a pending exception on a thread.
12313 (mono_thread_request_interruption): Call the new callback.
12314 (mono_thread_get_and_clear_pending_exception): New function to return the
12315 exception pending on a thread.
12317 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
12318 to turn off checking for pending exceptions.
12319 (mono_marshal_get_native_wrapper): Ditto.
12321 2008-01-16 Zoltan Varga <vargaz@gmail.com>
12323 * threads-types.h: Get rid of the unnecessary extern declarations.
12325 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
12327 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
12328 return field from parent class if not private.
12329 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
12330 returns fields from parent class if they are not private.
12331 (method_nonpublic): added function to determine if a given method
12332 should be considered non-public. Returns false for private methods
12333 on parent class, and internal methods from parent on the 1.0 profile.
12334 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
12335 use method_nonpublic function to determine whether method should be
12337 (property_accessor_public): use newly introduced method_nonpublic
12338 function to determine whether accessor is non-public.
12339 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
12340 event from parent class if not private. Only return static event if
12341 Static flag is set, and only return static event from parent class if
12342 FlattenHierarchy flag is set.
12343 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
12344 include non-private events from parent class.
12346 2008-01-16 Zoltan Varga <vargaz@gmail.com>
12348 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
12351 2008-01-16 Wade Berrier <wberrier@novell.com>
12353 * security.c: Add assembly.h header to appease some warnings
12355 2008-01-16 Dick Porter <dick@ximian.com>
12357 * process.c (process_module_string_read): Remove trailing null
12358 when saving string.
12360 2008-01-16 Mark Probst <mark.probst@gmail.com>
12362 * class-internals.h: A new data structure describing the layout of
12363 a runtime generic context (MonoRuntimeGenericContextTemplate).
12365 * metadata-internals.h: Added a hash table to MonoDomain that maps
12366 from open generic classes to their runtime generic context
12369 * object.c: Building of the runtime generic context, including
12370 proper handling of generic type arguments of superclasses.
12371 Building of the runtime generic context according to the template.
12373 2008-01-15 Zoltan Varga <vargaz@gmail.com>
12375 * class.c (mono_class_setup_fields): Set field.count for generic instances.
12378 * image.c (do_mono_image_open): Pass TRUE as last_exists to
12379 mono_portability_find_file (). Fixes #325466.
12380 (mono_image_get_public_key): Fix a warning.
12382 2008-01-14 Zoltan Varga <vargaz@gmail.com>
12384 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
12386 (mono_class_from_name_case): Ditto.
12388 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
12390 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
12391 common storage for the tables used in the System/NumberFormatter class.
12393 2008-01-13 Zoltan Varga <vargaz@gmail.com>
12395 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
12397 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
12399 * verify.c (get_boxable_mono_type): check if the token is valid.
12401 * verify.c (set_stack_value): changed to add an error if an
12402 invalid type is set on stack. Changed all callers due to signature change.
12404 * verify.c (do_stobj): implement stobj validation.
12406 2008-01-11 Zoltan Varga <vargaz@gmail.com>
12408 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
12409 set container->is_method, it was set earlier.
12411 * metadata.c (type_in_image): Handle MVARs which belong to not finished
12414 * reflection.c (mono_reflection_initialize_generic_parameter): Set
12415 is_method of the generic container to TRUE for methods.
12417 2008-01-10 Zoltan Varga <vargaz@gmail.com>
12419 * metadata.c (type_in_image): Handle type parameters properly.
12421 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
12422 memory ownership of this structure.
12424 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
12426 * verify.c (get_boxable_mono_type): make typedref types been just
12427 unverifiable. check for void type.
12429 * verify.c (do_unbox_any): added, verify opcode unbox.any.
12431 * verify.c (do_load_function_ptr): accept method spec tokens.
12433 2008-01-10 Zoltan Varga <vargaz@gmail.com>
12435 * marshal.c (mono_class_native_size): Always set *align even if this is called
12438 2008-01-09 Zoltan Varga <vargaz@gmail.com>
12440 * verify.c (mono_verify_corlib): Remove this as it was not used and was
12443 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
12445 * verify.c: removed some old unused tables. A huge bunch of small fixes
12446 to things found while testing the verifier with mono basic.
12448 * verify.c (dump_stack_value): dump null literal flag to.
12450 * verify.c (verify_type_compatibility_full): fix comparison
12451 for types that have a generic super type.
12453 * verify.c (verify_stack_type_compatibility): fix compatibility
12454 between null literals and reference types. fix compatibility between
12455 boxed valuetypes and object. fix corner case test for enums.
12457 * verify.c (do_cmp_op): proper verification of cgt.un in case
12458 of reference types.
12460 * verify.c (do_invoke_method): fix error message.
12462 * verify.c (do_store_indirect
12464 * verify.c (check_is_valid_type_for_field_ops): proper verification
12465 of managed pointers to valuetypes and boxed valuetypes. proper verification
12468 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
12469 allow token to be a reference type.
12471 * verify.c (do_cast): proper handling of boxes valuetypes.
12473 * verify.c (do_stelem): proper handling of storing a boxed valuetype
12476 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
12477 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
12478 fixed the decoding of unbox_any
12480 2008-01-08 Zoltan Varga <vargaz@gmail.com>
12482 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
12484 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
12486 * verify.c (do_newobj): do delegate verification.
12488 * verify.c (verify_delegate_compatibility): perform delegate
12491 * verify.c (verify_ldftn_delegate): perform tests related to
12494 * verify.c (mono_delegate_signature_equal): perform the
12495 slightly diferent signature comparison required by delegates.
12497 * metadata.c (mono_metadata_type_equal_full): added and exported
12498 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
12499 allows signature only comparison.
12501 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
12504 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
12506 * verify.c: added a bunch of stack_slot_* functions to
12507 make access to stack slot type easier. This is required to
12508 allow optional flags, like null literal, boxed value and
12510 All access paths to IlStackDesc::stype have been changed
12511 to use these new funcions.
12512 Removed a bunch of unused functions and cleared all warnings.
12513 This patch introduces the usage of the this pointer and
12516 2008-01-07 Zoltan Varga <vargaz@gmail.com>
12518 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
12520 2008-01-06 Zoltan Varga <vargaz@gmail.com>
12522 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
12523 match managed version.
12525 * appdomain.c: Bump corlib version.
12527 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
12530 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
12532 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
12533 Set public key token to zero-length byte array if assembly is not
12536 2008-01-05 Zoltan Varga <vargaz@gmail.com>
12538 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
12539 writing a vtype array elem.
12541 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
12543 * assembly.c (build_assembly_name): return FALSE if length of token is
12544 not 16 (if not "null").
12545 (mono_assembly_name_parse_full): return FALSE if value of version,
12546 culture, token or key is 0.
12547 * icall.c (fill_reflection_assembly_name): add boolean arguments to
12548 specify whether public key and public key token must be set to default
12549 value (zero-length byte array) if not available. Set versioncompat to
12550 SameMachine. If public key is available or the default is set, then
12551 set PublicKey flag.
12552 (ves_icall_System_Reflection_Assembly_FillName): if no public key
12553 is available, use empty byte array as default value. On the 2.0
12554 profile, use default value for public key token if not set.
12555 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
12556 profile, use default value for public key if not set. On the 2.0
12557 profile, use default value for public key token if not set.
12558 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
12559 default values for public key and public key token.
12561 2008-01-05 Zoltan Varga <vargaz@gmail.com>
12563 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
12564 field to keep it in synch with the managed object.
12566 * marshal.c (emit_marshal_object): Add support for byref marshalling of
12567 delegates. Fixes #351520.
12569 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
12570 contains defined memory.
12572 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
12574 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
12576 * sgen-gc.c (check_consistency): New helper function to do a consistency check
12577 of the GC data structures.
12579 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
12581 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
12583 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
12585 (mono_array_clone_in_domain): Ditto.
12586 (mono_array_clone_in_domain): Ditto.
12588 * threads.c (start_wrapper): Register the thread start argument as a GC root.
12589 (cache_culture): Use a write barrier.
12591 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
12592 (ves_icall_get_property_info): Ditto.
12594 * object.h (MONO_STRUCT_SETREF): New macro.
12596 * class-internals.h (MonoStats): Add some GC statistics.
12598 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
12600 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
12602 * exception.c (mono_exception_from_name_two_strings):
12603 Break from loop after method is found.
12605 2008-01-04 Dick Porter <dick@ximian.com>
12607 * process.c (process_module_string_read): Rename variable to
12608 reflect correct usage, after fixing bug 345972.
12610 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
12612 * verify.c (mono_type_create_fnptr_from_mono_method):
12613 created a MonoType function pointer instance to be used during
12614 verification. The verifier releases this memory at end.
12616 * verify.c (mono_method_is_constructor): extracted repeated
12617 checks for constructor into a single class.
12619 * verify.c (do_push_field): use new extracted method
12620 for constructor check.
12622 * verify.c (do_newobj): same.
12624 * verify.c (do_ldftn): renamed to do_load_function_ptr
12625 and make it verify ldvirtftn too.
12627 * verify.c (mono_method_verify: proper verification
12628 of ldvirtftn. release created MonoMethod instances.
12630 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
12632 * verify.c (token_bounds_check): added.
12634 * verify.c (do_ldftn): added.
12636 * verify.c (mono_method_verify): proper verificartion of ldftn.
12638 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
12640 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
12641 than the table row count. It's the resposibility of the caller to
12642 make the bounds check and raise the correct error.
12644 * metadata.c (mono_metadata_decode_row_col): Same.
12646 * loader.c (mono_get_method_from_token): perform bounds check
12647 on token for methoddef table.
12649 2007-12-29 Miguel de Icaza <miguel@novell.com>
12652 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
12653 assert into a negative result, the managed code already coped with
12656 Some folks on Windows reported this error.
12658 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
12660 * appdomain.c: Bump corlib version.
12662 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
12663 CultureInfo.CreateCulture to create CultureInfo for name.
12664 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
12665 create CultureInfo for name. Fixes bug #347174.
12667 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
12669 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
12672 * verify.c (is_valid_branch_instruction): allow branching to the
12673 first instruction of the protected block.
12675 * verify.c (is_valid_cmp_branch_instruction): same.
12677 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
12678 avoid double initialization.
12680 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
12681 detect which cases the eval stack should just be copied.
12683 * verify.c (mono_method_verify): check if the eval stack
12684 is empty when entering a protected block.
12686 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
12688 * verify.c: added is_clause_in_range, is_clause_inside_range,
12689 is_clause_nested and verify_clause_relationship. They perform
12690 the verifications stated in P1 12.4.2.7.
12692 * verify.c (mono_method_verify): remove some unused variables,
12693 add the new exception clause checks, add instruction border
12694 checks for protected block start/end, improved some error
12695 messages and fixed a bug in the way invalid instruction access
12698 2007-12-26 Zoltan Varga <vargaz@gmail.com>
12700 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
12701 from GC 7.0 if available.
12703 * object.c: Remove an unused define.
12705 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
12707 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
12709 * null-gc.c (mono_gc_make_descr_for_array): Implement.
12711 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
12713 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
12714 to take the same arguments as the other make_descr functions.
12716 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
12718 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
12721 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
12724 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
12725 call to boehm-gc.c.
12727 * boehm-gc.c (mono_gc_register_root): Fix a warning.
12729 * null-gc.c (mono_gc_register_root): Fix a warning.
12731 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
12733 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
12734 (mono_gc_base_init): Call GC_init ().
12736 * null-gc.c: Define mono_gc_register_root () as a no-op.
12738 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
12740 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
12742 * verify.c: add prototype for merge_stacks at top
12744 * verify.c (do_switch): added.
12746 * verify.c (merge_stacks): on some cases the stack merging
12747 was not happening properly. Unequal stack sizes at merge
12748 points should be invalid.
12750 * verify.c (mono_method_verify): added more debug info on stack state.
12751 verify switch properly.
12753 2007-12-24 Zoltan Varga <vargaz@gmail.com>
12755 * method-builder.h: New file, moved the mono_mb_ declarations here from
12758 * boehm-gc.c marshal.c: Include method-builder.h.
12760 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
12762 * marshal.c: Remove some code which is now in method-builder.c.
12764 2007-12-23 Zoltan Varga <vargaz@gmail.com>
12766 * method-builder.c: New file, extraction of the method builder functionality
12769 * marshal.c: Move the mb functions into method-builder.c.
12771 * marshal.h marshal.c: Export some mono_mb_... functions.
12773 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
12775 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
12778 * class.c (mono_class_get_full): Check the token type in the dynamic case.
12780 * loader.c (mono_field_from_token): Ditto.
12782 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
12785 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
12788 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
12789 a helper function for setting it.
12791 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
12794 * assembly.c: Significally simplify code now that referenced assemblies are
12795 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
12797 * threads.h: Don't include the internal threads-types.h header file. Fixes
12800 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
12802 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
12803 instructions that were target of branches or are at protected block boundaries.
12805 * verify.c (in_same_block): handle filter clauses.
12807 * verify.c (is_valid_branch_instruction): added. checks the target of
12808 instructions br or brtrue/false.
12810 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
12811 binary branch instructions such as beq and bge.
12813 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
12814 and made it pin the instruction as been part of the exception block.
12816 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
12819 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
12822 * verify.c (do_ret): ret from a protected block is unverifiable and
12825 * verify.c (do_static_branch): verify br and br.s instructions.
12827 * verify.c (merge_stacks): add extra param to support detection
12828 of branches in the middle of instructions.
12830 * verify.c (mono_method_verify): verify branches and exception blocks
12831 that target the middle of instructions. Proper verification of br and br.s.
12833 2007-12-21 Zoltan Varga <vargaz@gmail.com>
12835 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
12836 skip_visibility field.
12837 (reflection_methodbuilder_from_dynamic_method): Ditto.
12839 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
12840 registrations. Fixes #348193.
12842 * threads.h: Move the internal mono_thread_get_pending_exception () to
12843 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
12845 2007-12-20 Zoltan Varga <vargaz@gmail.com>
12847 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
12848 icall registration. Fixes #348193.
12850 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
12851 for corlib classes into object. Fixes #349621.
12853 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
12855 * icall.c (property_accessor_nonpublic): new function to determine
12856 whether an accessor allows a property to be considered non-public.
12857 Returns false for private accessor(s) from parent class, and internal
12858 accessor(s) from parent on 2.0 profile (and higher).
12859 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
12860 to determine whether property should be included if NonPublic flag
12861 is set. Fixes bug #349078.
12863 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
12865 * verify.c (init_stack_with_value): added.
12867 * verify.c (mono_method_verify): extracted common
12868 code for exception initialization into init_stack_with_value.
12870 * verify.c (mono_method_verify): initialize the exception
12871 for handler clauses as well.
12873 * verify.c (mono_method_verify): fix the exception clause
12874 ordering rules, it should use handler end offset and not
12877 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
12879 * rawbuffer.c: remove useless warning.
12881 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
12883 * threads.h, threads-types.h: move functions to the correct header
12884 (fixes bug#349952).
12886 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
12888 * verify.c (mono_method_verify): proper verification
12889 of exception handling clauses ranges and fallthru in
12890 and out of protected blocks.
12892 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
12894 * verify.c (mono_method_verify): fixed compilation issue.
12896 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
12898 * verify.c (mono_method_verify): a printf slipped in, changed
12899 to use verifier debug macro.
12901 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
12903 * verify.c (is_correct_leave): check for filter clauses.
12905 * verify.c (do_filter): added.
12907 * verify.c (mono_method_verify): property verification of leave.
12910 2007-12-18 Mark Probst <mark.probst@gmail.com>
12912 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
12913 Win32 build, until we figure out how to do the proper thing on
12916 2007-12-17 Zoltan Varga <vargaz@gmail.com>
12918 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
12919 by the previous patch.
12921 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
12922 the assembly resolve handler for refonly assemblies.
12924 2007-12-17 Mark Probst <mark.probst@gmail.com>
12926 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
12927 Make sure only one thread is allowed to commence shutdown, and
12928 don't allow new threads to be started once shutdown is in
12931 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
12933 * verify.c (is_correct_endfilter): added.
12935 * verify.c (is_unverifiable_endfilter): added.
12937 * verify.c (do_endfilter): added.
12939 * verify.c (mono_method_verify): property verification of endfilter
12940 and fixed a corner case or endfinally.
12942 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
12944 * verify.h: new flags to support fail fast of unverifiable code and
12945 do non-strict verification. Non-strict verification is required to
12946 have MS runtime compatibility. There are a huge amount of unverifiable
12947 code that it accepts as verifiable. The strict mode verifies the code
12949 Non-strict mode will be required in cases where code needs to be
12950 accepted as verifiable but fails under strict mode.
12952 * pedump.c: added support to fail fast and non-strict verification.
12954 * verify.c: added support for both fail fast and non-strict verification.
12956 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
12958 * verify.c (is_correct_endfinally): added.
12960 * verify.c (mono_method_verify): property verification of endfinally.
12962 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
12964 * verify.c (in_any_block): check for filter clauses.
12966 * verify.c (is_correct_rethrow): added.
12968 * verify.c (mono_method_verify): property verification of rethrow.
12970 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
12972 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
12974 * verify.c (do_throw): added.
12976 * verify.c (mono_method_verify): property verification of throw
12978 2007-12-11 Zoltan Varga <vargaz@gmail.com>
12980 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
12981 assemblies. Fixes #346425.
12983 2007-12-10 Zoltan Varga <vargaz@gmail.com>
12985 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
12988 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
12990 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
12991 prevent asserts when this is called with a token which might not be valid.
12993 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
12994 lookup_dynamic_token_class with valid_token == FALSE.
12996 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
12998 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
13000 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
13002 2007-12-10 Mark Probst <mark.probst@gmail.com>
13004 * gc.c: Don't delay threadpool thread finalization unless Mono is
13007 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13009 * threads.c: turn an assert into a non-fatal warning.
13011 2007-12-09 Robert Jordan <robertj@gmx.net>
13013 * icall.c (GetVirtualMethod): Add missing argument validation.
13015 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
13017 * verify.c (do_cast): added.
13019 * verify.c (mono_method_verify): property verification of castclass and isinst.
13022 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
13024 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
13026 * verify.c (do_stelem): added.
13028 * verify.c (mono_method_verify): property verification of stelem.X.
13030 2007-12-07 Mark Probst <mark.probst@gmail.com>
13032 * class.c, class-internals.h: Introduce an environment variable
13033 (MONO_GENERIC_SHARING) through which the extent of generic code
13034 sharing can be controlled (share all classes, share only corlib
13035 classes, or share nothing).
13037 * object.c: Only create runtime generic context for classes for
13038 which sharing is enabled.
13040 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
13042 * verify.c (do_ldelem): refactor it to work with ldelem.any.
13044 * verify.c (mono_method_verify): property verification of ldelem.any.
13046 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
13048 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
13049 added ldelem.X opcodes.
13051 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
13053 * verify.c: proper verification of ldelem.X
13055 2007-12-06 Zoltan Varga <vargaz@gmail.com>
13057 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
13059 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
13061 * verify.c (mono_method_verify): null literal requires special handling,
13062 the value pushed on stack need to be flagged as so.
13064 * verify.c (do_ldelema): Verify ldelema properly.
13066 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
13068 * verify.c: Verify ldlen properly.
13070 2007-12-05 Zoltan Varga <vargaz@gmail.com>
13072 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
13073 to the target object's type. Fixes #346160.
13075 2007-12-05 Dick Porter <dick@ximian.com>
13077 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
13078 Solaris needs the same workaround as BSD-derived systems. Fixes
13079 bug 323524, patch by Burkhard Linke
13080 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
13082 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
13084 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
13085 handle to use when error dialog is shown; otherwise, update mask
13086 to show no error dialog when an error occurs.
13088 2007-12-03 Zoltan Varga <vargaz@gmail.com>
13090 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
13092 * class.c (mono_class_get_field_default_value): New helper function to initialize
13093 field->def_type and field->data.
13095 2007-11-30 Zoltan Varga <vargaz@gmail.com>
13097 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
13100 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
13102 * marshal.c: Avoid depending on delegate->method_info being set.
13104 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
13106 * object.c (mono_delegate_ctor): Set delegate->method.
13108 * object-internals.h (struct _MonoDelegate): Add 'method' field.
13110 * appdomain.c: Bump corlib version.
13112 2007-11-27 Raja R Harinath <harinath@gmail.com>
13114 * metadata.c (mono_generic_inst_equal_full): Short-circuit
13115 equality check if we're comparing canonicalized MonoGenericInsts.
13117 2007-11-23 Zoltan Varga <vargaz@gmail.com>
13119 * class.c (generic_array_methods): Call mono_class_setup_methods () before
13120 accessing class->methods.
13122 2007-11-22 Dick Porter <dick@ximian.com>
13124 * threads.c: Ensure that the synch_cs is set before trying to use
13127 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
13129 * profiler.c: r89126 broke the statistial profiler, unbreak.
13131 2007-11-22 Martin Baulig <martin@ximian.com>
13133 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
13136 (mono_debug_debugger_version): Bump to 3.
13137 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
13138 -> mono_debugger_class_initialized().
13140 * mono-debug-debugger.c
13141 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
13144 (mono_debugger_start_class_init_func): Removed.
13145 (mono_debugger_class_loaded_methods_func): Added.
13146 (mono_class_setup_methods): Call it here.
13148 2007-11-22 Martin Baulig <martin@ximian.com>
13151 (mono_debug_add_delegate_trampoline): New public method.
13152 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
13155 (MonoSymbolTable): Added `global_data_table'.
13156 (MonoDebuggerTypeKind): Removed.
13158 2007-11-21 Zoltan Varga <vargaz@gmail.com>
13160 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
13163 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
13165 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
13167 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
13169 2007-11-20 Martin Baulig <martin@ximian.com>
13171 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
13173 * mono-debug-debugger.c
13174 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
13175 (mono_debugger_remove_breakpoint): Likewise.
13176 (mono_debugger_check_breakpoints): Likewise.
13177 (mono_debugger_register_class_init_callback): New public method.
13178 (mono_debugger_remove_class_init_callback): Likewise.
13179 (mono_debugger_add_type): Likewise.
13181 * mono-debug-debugger.h
13182 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
13184 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
13186 * class.c: more interface implementations needed for the
13187 array enumerator (fixes bug #341112).
13189 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
13191 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
13192 fix ParamName of ArgumentNullExceptions.
13194 2007-11-17 Miguel de Icaza <miguel@novell.com>
13196 * reflection.c (mono_reflection_encode_sighelper): Generate the
13197 modopts and modreqs. I have a useless test that crashes monodis,
13198 but that shows the code working.
13200 2007-11-17 Zoltan Varga <vargaz@gmail.com>
13202 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
13203 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
13205 2007-11-15 Dick Porter <dick@ximian.com>
13207 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
13208 When joining a thread, it's the thread that's calling Join that
13209 gets WaitSleepJoin state not the target. Fixes the standalone
13210 test case in bug 334740, and hopefully the whole bug too.
13212 2007-11-15 Dick Porter <dick@ximian.com>
13214 * process.c: Read file version info from the files pointed at by
13215 process modules, not the current process. Fixes bug 315969.
13217 Use windows typedef names in some places to fix warnings on the
13220 2007-11-15 Mark Probst <mark.probst@gmail.com>
13222 * image.c, metadata-internals.h: Added a generic_class_cache hash
13223 to MonoImage for looking up generic classes when sharing generics.
13225 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
13227 * sgen-gc.c: warning cleanups.
13229 2007-11-15 Zoltan Varga <vargaz@gmail.com>
13231 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
13232 inherited properties.
13234 2007-11-14 Mark Probst <mark.probst@gmail.com>
13236 * object.c, class-internals.h: Added more information to the
13237 runtime generic context.
13239 2007-11-13 Zoltan Varga <vargaz@gmail.com>
13241 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
13242 instead of just the target method. Generalize the abstract method handling to
13243 handle any non-static method.
13245 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
13246 mono_marshal_get_delegate_invoke () signature change.
13248 2007-11-13 Mark Probst <mark.probst@gmail.com>
13250 * class.c, class-internals.h: Made
13251 mono_type_get_basic_type_from_generic () public. Fixed member
13252 access check for shared generics.
13254 * loader.c: Don't insert field into field cache if it's part of a
13255 non-inflated generic class.
13257 * domain.c, domain-internals.h: The generic sharing context is now
13258 part of the jit info data structure. Added two accessor
13261 2007-11-12 Zoltan Varga <vargaz@gmail.com>
13263 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
13264 the array Get/Set/Address methods, since the JIT inlines them.
13266 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
13268 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
13269 (mono_image_init): Initialize runtime_invoke_direct_cache.
13271 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
13272 mono_marshal_get_delegate_invoke signature change.
13274 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
13275 an additional argument. Add support for invoking abstract methods.
13277 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
13279 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
13281 2007-11-09 Mark Probst <mark.probst@gmail.com>
13283 * class.c: Do field layout for open generic classes as well.
13285 2007-11-09 Mark Probst <mark.probst@gmail.com>
13287 * gc.c, gc-internal.h: Don't finalize threadpool threads with
13288 other objects, because the threadpool is still around. Put them
13289 in a list instead and after finalizing all other objects in the
13290 root domain shut down the thread pool and then finalize the
13291 threads. Fixes bug #337383.
13293 * threads.c, thread-types.h: New mono_thread_create_internal()
13294 function for marking a thread with the threadpool flag before it
13295 started. Set synch_cs to NULL after freeing it.
13297 * threadpool.c: Mark threadpool threads before they start.
13299 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
13301 * reflection.h, reflection.c: don't export random functions
13302 and lazy load dbnull and missing objects.
13304 2007-11-07 Jonathan Chambers <joncham@gmail.com>
13306 * class.c: Initialize COM types if COM interfaces
13307 are present (not just COM classes).
13309 Code is contributed under MIT/X11 license.
13311 2007-11-07 Massimiliano Mantione <massi@ximian.com>
13313 create_dynamic_mono_image: hook module profiler events (dynamic case).
13314 mono_image_basic_init: hook assembly profiler events (dynamic case).
13316 2007-11-07 Massimiliano Mantione <massi@ximian.com>
13318 simple_appdomain_unload: completely terminate the profiler
13319 instead of only processing the statistical samples.
13320 simple_shutdown: make sure this is really called exactly once,
13321 even in multithreaded applications, and always listen to
13323 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
13324 here, the "[un]load" functions will do it.
13325 Fixes bugs #333791 and #325261.
13327 2007-11-07 Geoff Norton <gnorton@novell.com>
13329 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
13330 rather than depend on __APPLE__.
13332 2007-11-07 Mark Probst <mark.probst@gmail.com>
13334 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
13336 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
13338 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
13339 UTF16 MonoString. Fix the crash from bug #335488
13341 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
13343 * marshal.c: Correct (for non-Win32 OS) length != size in
13344 mono_string_from_bstr. Fix #339530.
13346 2007-11-06 Geoff Norton <gnorton@novell.com>
13348 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
13351 2007-11-05 Kornél Pál <kornelpal@gmail.com>
13353 * process.c: Added run-time GetProcessId API detection for Windows.
13355 2007-11-04 Miguel de Icaza <miguel@novell.com>
13357 * reflection.c (mono_param_get_objects): If a parameter has the
13358 attribute [System.Runtime.InteropServices.Optional] we should
13359 set the DefaultValue of the ParameterInfo to be
13360 System.Reflection.Missing instead of DBNull.
13364 (mono_get_reflection_missing_object): New method,
13365 returns the System.Reflection.Missing.Value singleton instance.
13367 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
13369 * culture-info-table.h : regenerated.
13371 2007-11-02 Jonathan Chambers <joncham@gmail.com>
13373 * icall.c: Use GetEnvironmentStrings on windows
13374 so we are using the same environment block as
13375 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
13378 Code is contributed under MIT/X11 license.
13380 2007-10-31 Martin Baulig <martin@ximian.com>
13382 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
13384 * mono-debug-debugger.h
13385 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
13387 2007-10-30 Zoltan Varga <vargaz@gmail.com>
13389 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
13392 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
13394 * culture-info-table.h : regenerated.
13396 2007-10-30 Robert Jordan <robertj@gmx.net>
13398 * icall-def.h, icall.c:
13399 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
13401 Code is contributed under MIT/X11 license.
13403 2007-10-29 Zoltan Varga <vargaz@gmail.com>
13405 * class.c (mono_class_setup_vtable): Find the inflated methods in the
13406 inflated class instead of inflating them again.
13408 * class.c (mono_class_setup_vtable): Inflate the override methods in the
13411 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
13412 Call setup_supertypes () after klass->parent is set.
13413 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
13415 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
13416 for inflated instances of not yet created dynamic generic classes.
13417 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
13418 times from inflated_method.
13419 (methodbuilder_to_mono_method): Ditto.
13421 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
13423 * gc.c: code cleanup and removed old untested option of not creating the
13426 2007-10-29 Zoltan Varga <vargaz@gmail.com>
13428 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
13429 creating a jump trampoline for dynamic methods.
13431 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
13433 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
13434 generic TypeBuilders when called from another method of the same type (bug #335131).
13437 2007-10-27 Zoltan Varga <vargaz@gmail.com>
13439 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
13440 doesn't seem to work perfectly.
13442 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
13443 called multiple times.
13444 (methodbuilder_to_mono_method): Ditto.
13445 (resolve_object): Inflate FieldBuilder's.
13447 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
13449 * string-icalls.c, string-icalls.h, appdomain.c: patch from
13450 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
13451 RemoveEmptyEntries in the string.Split implementation (bug #322375).
13453 2007-10-26 Dick Porter <dick@ximian.com>
13455 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
13456 Thread initialisation changes
13458 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
13460 * verify.c: fix compatibility check between arrays and System.Array
13462 2007-10-26 Zoltan Varga <vargaz@gmail.com>
13464 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
13465 too. Fixes #336999.
13467 2007-10-25 Zoltan Varga <vargaz@gmail.com>
13469 * object.c (mono_value_box): Use typed allocation here.
13471 2007-10-23 Zoltan Varga <vargaz@gmail.com>
13473 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
13474 trampoline instead of compiling the method right away.
13476 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
13478 2007-10-21 Zoltan Varga <vargaz@gmail.com>
13480 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
13481 related fields for dynamic classes. Fixes #334493.
13483 2007-10-20 Zoltan Varga <vargaz@gmail.com>
13485 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
13487 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
13489 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
13490 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
13492 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
13494 * reflection.c (create_generic_typespec): Initialize klass->generic_container
13496 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
13498 2007-10-18 Jonathan Chambers <joncham@gmail.com>
13500 * marshal.c: Use correct key when removing item
13503 Code is contributed under MIT/X11 license.
13505 2007-10-17 William Holmes <billholmes54@gmail.com>
13507 *marshal.c: Adding a case to marshal booleans to U1
13509 Code is contributed under MIT/X11 license.
13511 2007-10-18 Zoltan Varga <vargaz@gmail.com>
13513 * class.c (mono_class_from_name): Search the modules compromising dynamic
13514 assemblies. Fixes #331601.
13516 2007-10-16 Zoltan Varga <vargaz@gmail.com>
13518 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
13519 exception if the type name contains an assembly component. Fixes #334203.
13521 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
13522 modules inside dynamic assemblies. Fixes #334200.
13524 * reflection.c: Set image->public_key and image->public_key_length;
13526 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
13529 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
13531 2007-10-16 Mark Probst <mark.probst@gmail.com>
13533 * metadata.c: Implemented correct comparing of generic classes.
13534 An inflated generic class can be equal to a non-inflated one if it
13535 is inflated with generic type variables as type arguments. Fixes
13538 2007-10-15 Dick Porter <dick@ximian.com>
13540 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
13541 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
13544 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
13545 instead of a monitor lock. This means that monitor_try_enter and
13546 co can set the thread state safely.
13547 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
13548 thread_interrupt_requested, so interrupt actually works.
13550 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
13551 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
13552 state accessor function
13554 2007-10-15 Martin Baulig <martin@ximian.com>
13557 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
13558 the debugger with the current runtime.
13560 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
13562 * object.c, object-internals.h: added the ability to set a single
13563 trampoline for all the slots in a vtable.
13565 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13567 * marshal.c: deal with a possible race condition during multicast
13568 delegate invocation.
13570 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13572 * class.c: ensure value type methods don't have the synchronized
13575 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
13577 * string-icalls.c, string-icalls.h: reverted unapproved patch that
13580 2007-10-11 Joel Reed <joelwreed@comcast.com>
13582 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
13583 to take an options parameter so that empty entries can be removed during
13584 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
13586 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
13588 * marshal.c: make sure we don't store the signature from a dynamic
13589 method into the runtime invoke cache (bug #327189).
13591 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
13593 * marshal.c: make sure the wrapper methods are properly initialized.
13595 2007-10-11 Mark Probst <mark.probst@gmail.com>
13597 * metadata.c, metadata-internals.h: Generalized
13598 mono_type_stack_size() to mono_type_stack_size_internal() which
13599 takes an additional argument specifying whether it allows open
13602 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
13604 * verify.c (do_invoke_method): handle typedbyref params
13605 correctly and check for unverifiable return values.
13607 * verify.c (do_newobj): fix a warning.
13609 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
13611 * verify.c: don't tread typedbyref as allways unverifable,
13612 so uses, like (ld/st)loc.0 are valid. verify for the cases
13613 that it matters, like boxing related operations.
13615 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
13617 * verify.c: add verification of the newobj opcode. verification
13618 of delegate instantation still missing due ldftn and virldftn not
13619 pushing the function type on stack
13621 2007-10-08 Mark Probst <mark.probst@gmail.com>
13623 * class-internals.h: Runtime generic context data structure
13626 * object.c: Initialization of runtime generic context at runtime
13627 vtable creation time.
13629 2007-10-08 Massimiliano Mantione <massi@ximian.com>
13630 * class.c (mono_class_create_from_typedef,
13631 mono_class_from_generic_parameter, mono_ptr_class_get,
13632 mono_fnptr_class_get, mono_bounded_array_class_get)
13633 * domain.c (mono_domain_create, mono_domain_free)
13634 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
13635 * image.c (do_mono_image_load, mono_image_close):
13636 Hooked up load-unload profiler events.
13638 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
13640 * domain.c: track statistics about the actual amount of native code
13643 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
13645 * class.c: the valuetype enumerators don't have the additional
13646 supertypes interfaces.
13648 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
13650 * class.c: need more interfaces setup for the IEnumerator<T>
13651 object created for arrays (tests/ienumerator-interfaces.2.cs).
13653 2007-10-05 Zoltan Varga <vargaz@gmail.com>
13655 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
13657 2007-10-05 Alp Toker <alp@atoker.com>
13659 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
13660 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
13663 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
13665 * verify.c (verify_type_compatibility_full): verification of
13666 compatibility improved, validates correctly non-strict checks between
13667 native int and I4 types different than (unsigned)int32.
13669 * verify.c (do_store_indirect): added, do all verification of
13672 * verify.c (get_load_indirect_mono_type): renamed to
13673 get_indirect_op_mono_type, as it now returns the MonoType for
13674 ldind.X and stind.X opcodes.
13676 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
13678 * reflection.c: Fix the encoding of generic type definition for
13681 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
13682 mono_image_typedef_or_ref but allows to specify if typespec lookups should
13683 be made. Typespec check is done prior to typeref cache lookup.
13685 * reflection.c (mono_image_typedef_or_ref): now just delegate to
13686 mono_image_typedef_or_ref_full.
13688 * reflection.c (encode_generic_class): encode the generic class
13689 directly instead of calling encode_type.
13691 * reflection.c (encode_type): encode the generic type definition
13692 MonoClass as a generic instantiation.
13694 * reflection.c (create_typespec): cache typespec tokens in
13695 the assembly->typespec cache. Don't create typespec for a generic
13696 instance MonoClass. Create typespec for the generic type defintion.
13698 * reflection.c (create_generic_typespec): encode the generic
13699 class directly instead of calling encode_type.
13701 * reflection.c (mono_image_create_token): encode the generic
13702 type definition not using a typespec for MonoType instances.
13705 2007-10-04 Raja R Harinath <rharinath@novell.com>
13708 * class.c (mono_image_init_name_cache): Don't return nested
13709 'protected internal' classes.
13710 (mono_class_from_name_case): Likewise.
13712 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
13714 * icall-def.h, icall.c : get_bundled_machine_config() is now the
13715 common function used by both DefaultConfig in System.dll and
13716 InternalConfigurationHost in System.Configuration.dll.
13718 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
13720 * class.c: automatically add to vectors only a few essential explicit
13721 generic interfaces. The rest of the interfaces that arrays should
13722 provide are currently implicitly added (but still not lazily, see the
13723 design in the discussion of bug#325495 for the details of what is
13724 needed for that). Additionally, implicit interfaces are assigned the
13725 same vtable slot as the explicit interfaces (as they are compatible):
13726 this enables huge memory savings since we don't need to instantiate
13727 as many memthods and as large vtables anymore. Also, Since
13728 GetEnumerator<T> returns an instance of a type that is required to
13729 support a similarly large set of interfaces as arrays, we add
13730 implicit interfaces and interface offset sharing support to those
13731 types, too. This change adds all the required interfaces so that
13732 the anonarray.cs test case in the bug report works (we don't add
13733 all the interfaces to arrays of arrays 3-level deep and more because
13734 of the memory requirements explained in the bug and since they are much
13735 less common: the lazy-loading support will enabled them to work, too).
13737 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
13739 * verify.c (merge_stacks): major clean up, all type compatibility
13740 checks are done by verify_type_compatibility. This fix my earlier lack
13741 of understanding of the CLR type system and merge_stacks no longer looks
13744 * verify.c: fixed some bad spelling.
13746 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
13748 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
13749 a given stack slock.
13751 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
13752 verify_type_compatibility_full. This removed a near indentical function and fixed
13753 handling of Int32 and IntPtr across all opcodes.
13755 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
13757 * class.c: only vectors have the additional generic interfaces.
13759 2007-10-01 Jonathan Chambers <joncham@gmail.com>
13761 * mono-config.c: Use g_strcasecmp instead of
13762 strcasecmp like everywhere else to fix
13763 compilation with MSVC.
13765 Code is contributed under MIT/X11 license.
13767 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13769 * object.c, object-internals.h: refactored the IMT code to enable
13770 building a single slot at a time and lazily creating the IMT trampolines
13773 2007-09-29 Zoltan Varga <vargaz@gmail.com>
13775 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
13777 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
13780 2007-09-29 Raja R Harinath <harinath@gmail.com>
13782 * loader.c (method_from_methodspec): Rearrange to avoid
13783 un-necessary exposition. Don't assert out if the method's
13784 declaring type is a generic type definition.
13786 2007-09-28 Martin Baulig <martin@ximian.com>
13788 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
13790 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
13792 * class-internals.h: optimize field layout of MonoClass to
13793 requires less cachelines at runtime and save a few bytes on 64 bit
13796 2007-09-28 Jb Evain <jbevain@novell.com>
13798 * reflection.c: when encoding type names in custom attributes,
13799 if the type is a closed generic type, its generic arguments
13800 have to be serialized as AssemblyQualifiedName, so that when
13801 they are deserialized, it's possible to re-create them properly.
13805 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
13807 * object.c, class-internals.h: added delegate-creation counter.
13809 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
13811 * class.c: cleanup of the code that synthetizes interfaces for
13812 arrays in 2.0: saves quit a bit of corlib mempool memory.
13813 Code to fix bug #325495 ifdeffed out for now until the issues
13814 with memory usage and O(n^2) behaviour are fixed.
13816 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
13818 * marshal.c: when possible, do not duplicate the name of the methods
13819 in the method builder and in the generated MonoMethod.
13821 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
13822 * verify.c: added support for type checking ldind_* opcodes.
13824 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
13826 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
13827 which is used to distinguish the fully open instantiation of a TypeBuilder
13828 with the rest. This temporary hack is required to restore the property that
13829 the fully open instantiation is the same type of the generic type definition.
13831 * class-internals.h (mono_generic_class_is_generic_type_definition):
13832 new function as part of the internal API.
13834 * class.c (inflate_generic_type): return NULL when the generic inst is
13835 fully open. The fully open generic type is now the same as the generic type
13836 definition for non TypeBuilder types.
13838 * class.c (mono_generic_class_get_class): removed assert since it is
13839 no longer valid, gklass->cached_class can point to the generic type definition.
13841 * class.c (mono_generic_class_is_generic_type_definition): new.
13843 * metadata.c (mono_generic_class_hash): added is_tb_open field
13844 to the hash calculation.
13846 * metadata.c (free_generic_class): if the generic class is associated
13847 with the generic type definition, its field will come from the mempool and
13850 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
13851 new, this function identifies the corner case of a TypeBuilder fully open
13854 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
13855 for lookup. Set gclass->cached_class to be the container class in case of
13856 the fully open instantiation of non TypeBuilder types.
13858 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
13859 to compare generic classes.
13861 * reflection.c (method_encode_methodspec): remove assert that
13862 no longer is valid.
13864 * reflection.c (mono_reflection_generic_class_initialize): add
13865 an aditional assert to ensure the proper type is used.
13867 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
13869 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
13872 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
13874 * verify.c (push_arg): Fixed support for ldarga
13875 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
13876 MonoType used as first arg in case of instance calls.
13878 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
13880 * verify.c: Support for verifying VAR and MVAR types,
13882 2007-09-25 Zoltan Varga <vargaz@gmail.com>
13884 * icall.c (ves_icall_get_property_info): Set the reflected type of the
13885 accessors correctly.
13887 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
13889 * threads.c: support OSX and other systems in
13890 mono_thread_get_stack_bounds (bug #328026).
13892 2007-09-25 Martin Baulig <martin@ximian.com>
13895 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
13897 2007-09-24 Martin Baulig <martin@ximian.com>
13900 (MonoDebugClassEntry): Moved the definition of this struct into
13901 mono-debug.c to make it private.
13904 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
13905 type table per symbol file, we don't need to store the symfile id
13908 2007-09-24 Martin Baulig <martin@ximian.com>
13910 Create one type table per symbol file, since a `MonoClass *' gets
13911 invalid when its image is unloaded.
13913 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
13914 (MonoDebugHandle): Added `type_table'.
13916 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
13918 * mempool.c, mempool.h: added mono_mempool_new_size () API
13919 to be able to specify a smaller initial size for the pool.
13920 Adjusted the code to slowly increase pool size before using
13921 the previous default size.
13922 * image.c: use a small initial size for image mempools.
13924 2007-09-23 Zoltan Varga <vargaz@gmail.com>
13926 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
13929 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
13930 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
13932 2007-09-22 Zoltan Varga <vargaz@gmail.com>
13934 * metadata.c (mono_type_create_from_typespec): Remove an invalid
13935 free. Fixes #327438.
13937 2007-09-21 Raja R Harinath <harinath@gmail.com>
13939 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
13940 generic instantiations, etc.
13941 <MONO_TYPE_ARRAY>: Likewise.
13943 2007-09-21 Martin Baulig <martin@ximian.com>
13945 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
13946 these structs were never defined.
13947 (MonoDebugHandle): Removed the `_priv' field, it was never used.
13949 2007-09-21 Martin Baulig <martin@ximian.com>
13951 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
13953 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
13955 * image.c: removed the guid hash tables: we can get the same info
13956 without the additional memory usage hit (partially fixes also bug #327052).
13958 2007-09-10 Massimiliano Mantione <massi@ximian.com>
13960 * profiler.h, profiler-private.h, profiler.c: add a new profiler
13961 event to handle unloading methods. After the event is called, the
13962 corresponding MonoMethod* must be considered invalid.
13963 * loader.c (mono_free_method): call the new mono_profiler_method_free
13966 2007-09-20 Mark Probst <mark.probst@gmail.com>
13968 * domain-internals.h: New flag in MonoJitInfo which marks shared
13969 generic methods. New hash table (shared_generics_hash) in
13970 MonoDomain to keep track of shared generic methods. Prototypes
13971 for functions to register and lookup shared generic methods.
13973 * domain.c: Support for registering and looking up shared generic
13974 methods via a hash table (shared_generics_hash) in MonoDomain.
13976 * class-internals.h: New exception to signal failure of shared
13977 compilation of a generic method. New counters for generics
13978 sharing in MonoStats.
13980 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
13982 * image.c, metadata-internals.h: don't keep a file descriptor open
13983 for loaded assemblies (bug#325988).
13985 2007-09-19 Raja R Harinath <rharinath@novell.com>
13987 * metadata.c (signature_in_image): New. Carve out of type_in_image.
13988 (ginst_in_image, gclass_in_image): Simplify. Change signature to
13989 use the corresponding datatypes.
13990 (type_in_image): Update to changes.
13991 (CleanForImageUserData): Simplify.
13992 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
13993 Avoid quadratic behaviour in handling the "stolen" list by
13994 separating the filter predicate out, and by prepending the stolen
13995 items rather than appending them.
13996 (steal_ginst_in_image): Likewise.
13997 (mono_metadata_clean_for_image): Update to changes.
13999 2007-09-19 Martin Baulig <martin@ximian.com>
14001 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
14003 2007-09-19 Martin Baulig <martin@ximian.com>
14005 * mono-debug.c (mono_debug_cleanup): Don't call
14006 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
14008 2007-09-19 Raja R Harinath <harinath@gmail.com>
14010 Fix crash on 'make run-test' in mcs/errors
14011 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
14012 Avoid more potential allocations in mono_class_from_mono_type.
14013 (ginst_in_image): Update to changes.
14014 (gclass_in_image): Rearrange slightly.
14016 2007-09-18 Zoltan Varga <vargaz@gmail.com>
14018 * class.c (mono_class_init): Move the code that sets up class->methods to
14019 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
14021 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
14022 canonical instance of an inflated generic signature.
14023 (mono_type_create_from_typespec): Remove an invalid free.
14025 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
14027 2007-09-18 Marek Habersack <mhabersack@novell.com>
14029 * domain-internals.h: added a declaration of the
14030 mono_assembly_load_full_nosearch internal function.
14032 * assembly.c (mono_assembly_load_with_partial_name): use
14033 mono_try_assembly_resolve return value properly.
14034 (mono_assembly_load_full_nosearch): copied the function body from
14035 mono_assembly_load_full, without the code to invoke assembly
14037 (mono_assembly_load_full): calls the above new function and if the
14038 assembly is not resolved, invokes the search hooks.
14040 * appdomain.c (mono_runtime_init): restore the global postload
14041 assembly search handlers.
14043 2007-09-18 Zoltan Varga <vargaz@gmail.com>
14045 * class.c (mono_class_init): Make sure class->methods and class->properties
14046 are never NULL in the generics case.
14048 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
14050 2007-09-17 Zoltan Varga <vargaz@gmail.com>
14052 * metadata.c (free_generic_class): Disable some code to fix the build.
14054 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
14056 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
14057 from the image mempool.
14059 * metadata.c (free_generic_class): Free more data from the inflated class.
14061 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
14063 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
14065 (mono_type_create_from_typespec): Ditto.
14067 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
14068 MonoImage to the caller.
14069 (mono_init_internal): Save the opened image in a global variable.
14070 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
14072 * reflection.c (resolve_object): Fix a leak.
14074 * metadata.c: Fix the freeing of data in the generics caches.
14076 * metadata.c (free_generic_inst): Comment this out to fix the build.
14077 (free_generic_class): Ditto.
14079 * metadata.c: Free cached generic methods, instantinations and classes when
14080 they are removed from the caches.
14081 (mono_metadata_free_type): Free the type itself.
14083 * class.c: Free the result of mono_class_inflate_generic_type () in a few
14086 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
14088 * boehm-gc.c: restrict managed allocs to __thread supporting
14091 2007-09-16 Zoltan Varga <vargaz@gmail.com>
14093 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
14094 (mono_generic_class_get_class): Fix a leak.
14096 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
14097 mono_metadata_free_type ().
14098 (mono_metadata_inflate_generic_inst): Fix a leak.
14100 2007-09-14 Zoltan Varga <vargaz@gmail.com>
14102 * mono-debug.c (free_header_data): Fix a leak missed earlier.
14104 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
14107 * mono-debug.c (mono_debug_close_image): Fix call to
14108 g_hash_table_remove ().
14110 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
14112 * icall-def.h: redirect all the string ctor to the managed
14113 CreateString () methods.
14114 * string-icalls.c, string-icalls.h: removed dead code for string
14117 2007-09-14 Zoltan Varga <vargaz@gmail.com>
14119 * mono-debug.c: Fix memory leaks.
14121 2007-09-14 Jonathan Chambers <joncham@gmail.com>
14123 * threads-types.h: Implement mono_hazard_pointer_set and
14124 mono_hazard_pointer_clear macros using do/while(0) to fix
14125 compilation with MSVC.
14127 Code is contributed under MIT/X11 license.
14129 2007-09-14 Zoltan Varga <vargaz@gmail.com>
14131 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
14132 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
14134 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
14136 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
14139 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
14141 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
14142 managed-code allocated as well.
14144 2007-09-13 Zoltan Varga <vargaz@gmail.com>
14146 * class.c (mono_class_is_assignable_from): Add support for generic variance.
14148 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
14150 * boehm-gc.c: fixed the build after the AOT changes.
14152 2007-09-13 Zoltan Varga <vargaz@gmail.com>
14154 * wrapper-types.h: Add an ALLOC wrapper type.
14156 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
14157 reference managed allocator methods.
14159 2007-09-12 Marek Safar <marek.safar@gmail.com>
14161 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
14162 of Type array and not MonoType, a fix suggested by Hari.
14164 2007-09-12 Jonathan Chambers <joncham@gmail.com>
14166 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
14167 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
14169 Code is contributed under MIT/X11 license.
14171 2007-09-10 Massimiliano Mantione <massi@ximian.com>
14173 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
14175 2007-09-12 Marek Habersack <mhabersack@novell.com>
14177 * image.c (do_mono_image_open): if assembly file fails to open and
14178 MONO_IOMAP is in effect, try to find the path in a
14179 case-insensitive way.
14181 * appdomain.c (mono_runtime_init): do not install postload hooks -
14182 tests show that MS.NET doesn't use anything of that sort to
14183 trigger the AppDomain.AssemblyResolve event.
14184 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
14186 (mono_runtime_init): init portability helpers here.
14188 * assembly.c (mono_assembly_load_with_partial_name): if other
14189 attempts fail, trigger the AppDomain.AssemblyResolve event handler
14190 to resolve the assembly.
14192 * domain-internals.h: added mono_try_assembly_resolve and marked
14195 2007-09-11 Jb Evain <jbevain@novell.com>
14197 * object-internals.h (MonoReflectionDynamicMethod): add
14198 a `MonoReflectionType *owner` field. The owner is used
14200 (mono_reflection_create_dynamic_method): use the owner of the dynamic
14201 method as the class declaring the dynamic method.
14202 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
14203 dynamic method to the declaring type of the methodbuilder.
14205 2007-09-11 Mark Probst <mark.probst@gmail.com>
14207 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
14208 rules for calling methods via reflection.
14210 2007-09-11 Zoltan Varga <vargaz@gmail.com>
14212 * reflection.c (resolve_object): Add support for MonoGenericClass.
14213 Inflate MonoType's.
14215 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
14217 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
14218 provide a managed method that does fast allocations without needing
14219 a managed->unmanaged transition. Boehm GC implementation currently
14220 enabled for ptrfree objects on sane architectures.
14222 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
14224 * marshal.c, marshal.h: exported a couple of useful functions and
14225 added mono_mb_get_label () to easily handle backward branches.
14227 2007-09-10 Zoltan Varga <vargaz@gmail.com>
14229 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
14231 2007-09-10 Massimiliano Mantione <massi@ximian.com>
14233 * loader.c (find_method): Fixed the regression introduced while
14236 2007-09-09 Zoltan Varga <vargaz@gmail.com>
14238 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
14241 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
14242 icall.c reflection.c: Pass a MonoGenericContext argument to
14243 mono_lookup_dynamic_token ().
14245 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
14248 2007-09-09 Robert Jordan <robertj@gmx.net>
14250 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
14251 for generic methods.
14253 * object.c (mono_object_get_virtual_method): Handle generic methods.
14256 Code is contributed under MIT/X11 license.
14258 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
14260 * image.c: fix locking in mono_image_load_file_for_image ().
14262 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
14264 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
14265 used only as a cache: added an icall to fill it.
14267 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
14269 * reflection.h: exposed mono_reflection_free_type_info
14270 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
14271 since mono_reflection_bind_generic_parameters makes a copy of it.
14272 * reflection.c (free_type_info): subinfos should be freed.
14273 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
14275 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
14276 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
14277 this fixes #82695 and #81726.
14280 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
14282 * process.h, process.c: added support for user profile/info in
14283 ProcessStartInfo. For now only Windows works.
14285 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
14287 * metadata.c: consider the generic arguments when comparing
14288 signatures (bug #82614).
14290 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14292 * cil-coff.h, image.c: updated assembly loader to cope with the
14293 PE32+ 64 bit file format.
14295 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14297 * assembly.c, class.c, domain.c, loader.c: remove useless
14298 inclusion of cil-coff.h.
14300 2007-08-29 Jonathan Chambers <joncham@gmail.com>
14302 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
14303 if interface is marked with CoClassAttribute.
14305 Code is contributed under MIT/X11 license.
14307 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
14309 * sgen-gc.c: ensure no object from the to space is copied again or finalized
14310 if it's seen twice in major collections.
14312 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
14314 * sgen-gc.c: big objects are not copied to the gray area, but they
14315 need to be considered for scanning, too, if they are brought alive
14316 by an object ready for finalizations or a survived one.
14318 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
14320 * sgen-gc.c: properly account the number of disappearing links when
14321 they are nullified.
14323 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
14325 * sgen-gc.c: share the code to scan the registered roots between the
14326 different types of collections.
14328 2007-08-28 Zoltan Varga <vargaz@gmail.com>
14330 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
14332 2007-08-28 Zoltan Varga <vargaz@gmail.com>
14334 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
14335 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
14337 2007-08-28 Mark Probst <mark.probst@gmail.com>
14339 * security-manager.c (mono_security_manager_get_methods):
14340 LinkDemandSecurityException now has 2 arguments instead of 3.
14342 2007-08-27 Zoltan Varga <vargaz@gmail.com>
14344 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
14345 platforms which need it.
14347 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14349 * sgen-gc.c: unregister thread data structures with a pthread_key_t
14352 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
14354 * threads.c: free the thread static data on thread exit.
14356 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
14358 * class.c: walk the hierarchy to find the generic definition for
14359 a class (fixes runtime part of bug #82498).
14361 2007-08-24 Zoltan Varga <vargaz@gmail.com>
14363 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
14366 * image.c (mono_image_close): Here. Hopefully fixes #82510.
14368 2007-08-24 Mark Probst <mark.probst@gmail.com>
14370 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
14372 2007-08-24 Robert Jordan <robertj@gmx.net>
14374 * appdomain.c: don't perform the ':'->';' substitution on Win32.
14376 2007-08-24 Jb Evain <jbevain@novell.com>
14378 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
14381 2007-08-24 Mark Probst <mark.probst@gmail.com>
14383 * threads.c: Make sure a thread gets cleaned up only once. Fixes
14386 2007-08-24 Zoltan Varga <vargaz@gmail.com>
14388 * assembly.c: Fix a warning.
14390 2007-08-23 Marek Habersack <mhabersack@novell.com>
14392 * appdomain.c: parse the <runtime> section looking for the probing
14393 element with the 'privatePath' attribute, which sets additional
14394 directories in which the runtime should look for assemblies.
14396 2007-08-23 Robert Jordan <robertj@gmx.net>
14398 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
14401 2007-08-23 Martin Baulig <martin@ximian.com>
14403 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
14404 _mono_debug_init_corlib() and remove it from the header file.
14406 2007-08-23 Martin Baulig <martin@ximian.com>
14408 * mono-debug-debugger.c
14409 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
14410 don't notify the debugger about it.
14412 * mono-debug-debugger.h
14413 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
14415 2007-08-23 Robert Jordan <robertj@gmx.net>
14417 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
14418 Code is contributed under MIT/X11 license.
14420 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14422 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
14424 2007-08-22 Martin Baulig <martin@ximian.com>
14426 * mono-debug.c: Store debugging info on a per-domain basis and
14427 free it on domain unload. Add support for unloading symbol files.
14430 (MonoDebugList): New typedef.
14432 - add `data_tables and `type_table'.
14433 - replace 'symbol_files' and `num_symbol_files' with a
14435 (mono_debug_data_table): Removed.
14436 (mono_debug_list_add): New public function.
14437 (mono_debug_list_remove): New public function.
14438 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
14439 (mono_debug_init_2_memory): Renamed into
14440 mono_debug_open_image_from_memory().
14441 (mono_debug_close_image): New public function.
14442 (mono_debug_domain_create): Likewise.
14443 (mono_debug_domain_unload): Likewise.
14444 (MONO_DEBUGGER_VERSION): Bump to 60.
14446 * mono-debug-debugger.h
14447 (MonoDebuggerEvent):
14448 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
14449 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
14450 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
14451 - rename `THREAD_CREATED' and `THREAD_EXITED' into
14452 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
14453 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
14455 (mono_debugger_add_symbol_file): Removed.
14456 (mono_debugger_add_type): Removed.
14457 (mono_debugger_lookup_type): Removed.
14458 (mono_debugger_lookup_assembly): Removed.
14461 (mono_domain_create): Call mono_debug_domain_create().
14462 (mono_init_internal): Call mono_debug_init_corlib().
14465 (mono_assembly_close): Call mono_debug_close_image().
14467 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
14469 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
14472 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
14474 * sgen-gc.c: ensure section->pin_queue_end is initialized
14475 correctly when non pinning objects in the section have been found.
14477 2007-08-22 Marek Habersack <mhabersack@novell.com>
14479 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
14480 containing a list of directories separated by ':'. MSDN docs say
14481 the directories should be separated with ';'. Part of a bugfix for
14484 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
14486 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
14487 it should MonoType and not MonoClass.
14489 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
14491 * culture-info-table.h : regenerated.
14493 2007-08-20 William Holmes <billholmes54@gmail.com>
14495 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
14496 to call ReplaceFile Kernel32 on windows or in io-layer.
14497 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
14498 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
14499 as an internal call.
14501 Code is contributed under MIT/X11 license.
14503 2007-08-20 Jb Evain <jbevain@novell.com>
14505 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
14506 and MONO_EXCEPTION_FIELD_ACCESS.
14508 * debug-helpers.[c|h]: new mono_field_full_name function.
14510 2007-08-20 Mark Probst <mark.probst@gmail.com>
14512 * class.c: Removed class_security_level() and moved it to
14513 security-core-clr.c.
14515 * security-core-clr.c, security-core-clr.h: class_security_level()
14516 is now public and renamed to mono_security_core_clr_class_level().
14517 It also looks for security attributes in the classes a class is
14520 2007-08-20 Mark Probst <mark.probst@gmail.com>
14522 * security-core-clr.c, security-core-clr.h: CoreCLR security
14525 * Makefile.am: Added security-core-clr.[ch].
14527 * security-manager.c, security-manager.h: Functions and enum for
14528 setting and getting the security mode.
14530 * class.c: CoreCLR security checks.
14532 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
14534 * icall-def.h, process.c, process.h: implemented icall to get
14535 user/system processor times.
14537 2007-08-17 Mark Probst <mark.probst@gmail.com>
14539 * domain.c, threads.c, class-internals.h, domain-internals.h: New
14540 reader-lock-free jit_info_table.
14542 2007-08-17 Zoltan Varga <vargaz@gmail.com>
14544 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
14546 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
14548 * object-internals.h (MonoException): Add missing _data member.
14550 2007-08-08 Massimiliano Mantione <massi@ximian.com>
14552 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
14553 checking that only methods with matching qname or fqname are picked
14554 from implemented interfaces.
14556 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
14558 * verify.c (do_newarr):added, do type verification of
14559 newarr ops, push the right value on the eval stack.
14560 * verify.c (mono_method_verify): use do_newarr
14563 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
14565 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
14566 factored the common code into get_boxable_mono_type, which
14567 is now using mono_type_get_full, this fixed byref related tests.
14569 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
14571 * class.c: added mono_type_get_full, this function has the same
14572 behavior of mono_class_get_full but the returned MonoType has
14573 all metadata of the associated token in case of a typespec token.
14574 * class.c: added mono_type_retrieve_from_typespec, used by
14575 mono_type_get_full to retrieve the token type.
14576 * class.c (mono_class_create_from_typespec): changed to use
14577 mono_type_retrieve_from_typespec.
14578 * class.c (mono_ldtoken): changed to use mono_type_get_full
14579 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
14580 * class-internals.h: exported mono_type_get_full for internal use.
14582 2007-08-16 Jb Evain <jbevain@novell.com>
14584 * domain.c (supported_runtimes): add entry for
14585 the 'moonlight' runtime version.
14587 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
14589 * verify.c (mono_method_verify): small typo sliped in.
14591 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
14593 * verify.c (do_unbox_value): added, do type verification of
14595 * verify.c (mono_method_verify): use do_unbox_value
14598 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
14600 * verify.c (dump_stack_value): fixed typo, was printing string
14601 instead of object on stack.
14602 * verify.c (do_box_value): moved the byref check up as it leads
14603 to invalid code and should be done earlier.
14604 * verify.c: improved error messages for and ldobj
14606 2007-08-15 William Holmes <billholmes54@gmail.com>
14608 * marshal.c (emit_marshal_custom): Omit the call to
14609 marshal_native_to_managed when calling native to managed
14610 and the argument is specified as an out argument.
14612 Code is contributed under MIT/X11 license.
14614 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
14616 * verify.c: fixed the type checks for generics, function pointers and vectors.
14617 Added type verification for ldobj and ldtoken. The verifier
14618 would segfault if header or signature of a method contained references
14619 to non-existant types.
14621 2007-08-15 Jonathan Chambers <joncham@gmail.com>
14623 * marshal.c (cominterop_get_ccw): Patch from
14624 Bill Holmes to no walk up interface hierarchy.
14625 All parent methods should be present in the interface for COM.
14627 Code is contributed under MIT/X11 license.
14629 2007-08-15 Jonathan Chambers <joncham@gmail.com>
14631 * marshal.c (emit_marshal_com_interface): Patch from
14632 Bill Holmes to handle COM Interfaces as return values
14633 for native->managed calls.
14635 Code is contributed under MIT/X11 license.
14637 2007-08-14 Jonathan Chambers <joncham@gmail.com>
14639 * marshal.c (cominterop_get_idispatch_for_object): Implement
14640 for runtime callable wrappers.
14642 Code is contributed under MIT/X11 license.
14644 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
14646 * pedump.c (main): changed from mono_init to mono_init_from_assembly
14647 so 2.0 types are accessible
14650 2007-08-13 Miguel de Icaza <miguel@novell.com>
14652 * domain.c (mono_init_internal): Call mono_assembly_load_friends
14653 once we load mscorlib. Due to the order in which we initialize,
14654 the mono_assembly_load_full routine that loads mscorlib did not
14655 load friends. We now load it once we load the
14656 mono_defaults.internals_visible_class class.
14658 * assembly.c: Expose the mono_load_friend_assemblies method.
14660 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
14662 * verify.c: improved the handling of boxing, better
14663 type checking for unary ops and conversion. Fix bug
14664 regarding managed pointer compatibility checking
14666 2007-08-11 Zoltan Varga <vargaz@gmail.com>
14668 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
14670 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
14672 2007-08-09 Raja R Harinath <rharinath@novell.com>
14674 * reflection.c (dup_type): Remove.
14675 * class.c (dup_type): Remove.
14676 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
14677 instead of the dodgy 'dup_type'.
14678 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
14679 handle the case where 'dup_type' needed the second argument.
14681 2007-08-08 Zoltan Varga <vargaz@gmail.com>
14683 * domain.c: Fix a warning.
14685 2007-08-08 Massimiliano Mantione <massi@ximian.com>
14687 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
14688 checking that methods with the same fqname are not overridden
14689 with a method from an ancestor.
14691 2007-08-07 Zoltan Varga <vargaz@gmail.com>
14693 * threads.c (free_thread_static_data_helper): Avoid a crash if
14694 thread->static_data is not yet set.
14696 2007-08-07 Jonathan Chambers <joncham@gmail.com>
14698 * marshal.c: Use correct image when emitting
14699 native wrapper for COM calls.
14701 Code is contributed under MIT/X11 license.
14703 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
14705 * icall-def.h, security.c, security.h :
14706 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
14708 2007-08-07 Martin Baulig <martin@ximian.com>
14710 * mono-debug-debugger.h
14711 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
14713 * domain.c (mono_domain_free): Call
14714 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
14716 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
14718 * verify.c (check_underflow, check_overflow): error message now returns IL offset
14719 * verify.c (in_same_block): code should test if either offset is inside the clauses
14720 * verify.c (mono_method_verify): push the exception into the eval stack of exception
14723 2007-08-03 Zoltan Varga <vargaz@gmail.com>
14725 * image.c (mono_image_close): Fix a leak.
14727 * object.c (mono_runtime_invoke_array): Avoid using alloca.
14729 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
14731 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
14733 * domain.c, threads.c, threads-types.h: fix memory retention issue
14734 with thread static variables not being cleared on domain unload.
14735 Reuse thread static slots after domain unload.
14737 2007-08-03 Zoltan Varga <vargaz@gmail.com>
14739 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
14742 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
14743 now done in mono_runtime_invoke_array.
14745 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
14746 receiver is a nullable type.
14748 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
14751 2007-08-03 Jonathan Chambers <joncham@gmail.com>
14753 * marshal.c: Implement COM Objects as return type for
14754 managed->unmanaged calls. Added Release calls for COM Object
14755 out/return values in managed->unmanaged calls.
14757 Code is contributed under MIT/X11 license.
14759 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
14761 * threads.h, threads-type.h: move the hazard pointer declarations
14762 to the private header.
14764 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
14766 * file-io.c, appdomain.c: memory leak fixes.
14768 2007-08-02 Dick Porter <dick@ximian.com>
14771 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
14772 SO_REUSEADDR setting into io-layer/sockets.c.
14774 2007-08-01 Zoltan Varga <vargaz@gmail.com>
14776 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
14777 from Object when called on a generic parameter. Fixes #82211.
14779 2007-08-01 Dick Porter <dick@ximian.com>
14781 * file-io.c (convert_share): Test FileShare values bit-by-bit.
14782 Fixes bug 79250 yet again.
14784 2007-07-30 Martin Baulig <martin@ximian.com>
14786 Merged the `debugger-dublin' branch.
14789 (MonoDebugDataTable): New typedef.
14790 (MonoDebugMethodAddressList): New typedef.
14791 (MonoDebugWrapperData): Removed.
14792 (MonoDebugSymbolTable): Removed `current_data_table',
14793 `current_data_table_size', `current_data_table_offset'.
14794 (MonoDebugDataItemType): Moved into mono-debug.c.
14795 (MonoDebugMethodJitInfo): Remove `address'.
14796 (mono_debug_data_table): New global variable.
14797 (mono_debug_lookup_method_addresses): New public function.
14798 (mono_debug_find_method): Take a `MonoMethod *', not a
14799 `MonoDebugMethodInfo *'.
14801 * mono-debug.c: Drop support for the old symbol tables.
14803 2007-06-28 Martin Baulig <martin@ximian.com>
14805 * mono-debug.c (mono_debug_debugger_version): New public variable.
14807 2007-07-31 William Holmes <billholmes54@gmail.com>
14809 * metadata.c Changed mono_type_create_from_typespec to not insert
14810 the type into the hash map until after
14811 do_mono_metadata_parse_type has completed.
14813 Code is contributed under MIT/X11 license.
14815 2007-07-31 Zoltan Varga <vargaz@gmail.com>
14817 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
14818 generic parameter. Fixes #82211.
14820 2007-07-27 Jb Evain <jbevain@novell.com>
14822 * pedump.c (dump_metadata, dump_metadata_header): dump
14823 versions contained in the metadata header.
14825 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
14827 * threads.c: register small_id_table with the GC.
14829 2007-07-27 Mark Probst <mark.probst@gmail.com>
14831 * threads.c, threads.h, class-internals.h, object-internals.h:
14832 Hazard pointers, to be used by lock-free parallel algorithms.
14834 2007-07-26 Dick Porter <dick@ximian.com>
14836 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
14837 routine on non-windows platforms, as I've not managed to think of
14838 a non-kludgy way of doing this. Finishes off bug 78739.
14840 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
14842 * object.c: properly setup interface_bitmap in proxy vtables.
14844 2007-07-25 Marek Habersack <mhabersack@novell.com>
14846 * appdomain.c (get_shadow_assembly_location): do not use TickCount
14847 to create unique shadow copy target directories, use the domain's
14848 serial number instead. Each domain gets a unique target directory
14851 * domain.c (mono_domain_create): added code to increment domain
14852 shadow copy serial number and cache the value in the current
14855 * domain-internals.h (struct _MonoDomain): added a new field -
14856 shadow_serial to hold the serial number used in generation of
14857 shadow-copy directories. This is to make sure that the directory
14858 name is unique for each and every domain created. We avoid a race
14859 condition with overriding assemblies already in use by other app
14862 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
14864 * class.c (mono_bounded_array_class_get): fixed memory leak when
14865 binding generic parameters.
14867 2007-07-24 Raja R Harinath <rharinath@novell.com>
14869 * metadata.c (do_mono_metadata_parse_generic_class): Use
14870 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
14873 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
14875 * loader.c, class-internals.h, reflection.c: removed the per-method
14876 generics hashtable: we use the global one through the call of
14877 mono_class_inflate_generic_method ().
14879 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
14881 * class.c, metadata.c, class-internals.h: introduce yet another
14882 generics global cache for inflated methods (fixes 98% of the perf
14883 issue in bug #81806).
14885 2007-07-23 Raja R Harinath <rharinath@novell.com>
14887 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
14888 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
14889 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
14890 return a MonoGenericInst containing (a copy) of those types.
14891 (mono_metadata_inflate_generic_inst): Update to changes.
14892 (mono_metadata_parse_generic_inst): Likewise.
14893 (mono_get_shared_generic_inst): Likewise.
14894 * reflection.c (mono_class_bind_generic_parameters): Likewise.
14895 (mono_reflection_bind_generic_method_parameters): Likewise.
14896 * metadata-internals.h: Likewise.
14897 * icall.c (free_generic_context): Kill.
14898 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
14900 * reflection.c (reflection_methodbuilder_to_mono_method): Use
14901 mono_metadata_type_dup.
14902 * marshal.c (mono_mb_create_method): Likewise.
14904 * metadata.c (mono_metadata_type_dup): Rename from
14905 mono_metadata_type_dup_mp. Take an optional mempool instead of a
14906 MonoImage. Handle a few more cases, esp. when no mempool is given.
14907 * marshal.c, metadata-internals.h: Update to changes.
14909 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
14911 * class.c: fixed a small leak for array classes and removed warning.
14913 2007-07-22 Zoltan Varga <vargaz@gmail.com>
14915 * loader.c (mono_method_get_param_token): Make this work on generic methods.
14916 Return 0x8000000 for return parameters. Fixes #82161.
14918 2007-07-21 Marek Habersack <grendello@gmail.com>
14920 * appdomain.c (get_shadow_assembly_location): append the current
14921 ticks value to the path. Avoids overwriting the same assemblies by
14922 several threads at the same time.
14924 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
14925 and Raja R Harinath <rharinath@novell.com>
14927 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
14929 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
14930 property for testing if a method is a generic method definition.
14932 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
14934 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
14936 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14938 * verify.c: used function from private branch, reverted to the one in class.h
14940 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14942 * verify.c: a typo slipped in and the code wont compile
14944 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14946 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
14947 disabled box instruction as it is doing the wrong thing
14948 improved stack dump messages, now it is easier to debug type related issues
14951 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
14953 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
14955 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14957 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
14958 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
14959 grouped with class and valuetype. This change will simply
14960 the code as it should be handled just like unmanaged pointers.
14962 2007-07-19 Mark Probst <mark.probst@gmail.com>
14964 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
14966 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14968 * verify.c: several stack merge issues fixed, reference comparisons now
14969 check the type size. strict type check now works correctly.
14970 added more uses of IS_MANAGED_POINTER macro.
14971 fixed issues pointed by running the test suite against .net.
14974 2007-07-19 Mark Probst <mark.probst@gmail.com>
14976 * class.c, loader.c, class-internals.h: Removed the
14977 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
14980 * icall.c: Better error checking in some internal reflection
14983 2007-07-18 William Holmes <billholmes54@gmail.com>
14985 * filewatcher.c : removed unused variable 'filename' in
14986 ves_icall_System_IO_FSW_SupportsFSW
14988 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
14990 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
14993 2007-07-15 Zoltan Varga <vargaz@gmail.com>
14995 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
14997 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
14999 2007-07-14 Zoltan Varga <vargaz@gmail.com>
15001 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
15002 Implement generics support.
15003 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
15005 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
15006 type_args and method_args arguments.
15007 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
15008 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
15009 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
15011 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
15013 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
15014 It adds a rootimage parameter to mono_reflection_get_type_internal,
15015 adds new function mono_reflection_get_type_with_rootimage and use
15016 the rootimage to resolve the types instead of the current image
15018 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
15020 * culture-info-table.h: Forgot to update after r78304.
15022 2007-07-13 Raja R Harinath <rharinath@novell.com>
15024 * class.c (mono_class_is_open_constructed_type)
15025 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
15027 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
15029 * class.c (mono_bounded_array_class_get): method fails if used with
15030 an incomplete TypeBuilder enum (no basetype field), fixed it by
15031 avoiding calculating the size for such array as it cannot be instantiated.
15034 2007-07-12 Raja R Harinath <rharinath@novell.com>
15036 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
15038 * metadata.c, reflection.c: Update to changes.
15040 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
15042 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
15043 mono_class_is_valid_enum, they are used to valide a enum when loading.
15044 * reflection.c: used new functions to throw TypeLoadException when and
15045 invalid enum is build with TypeBuilder. Fixes #82018
15047 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
15049 * object.c: forgot commit of mono_class_setup_methods () to access
15051 * object-internals.h: added a few more handy fields to
15054 2007-07-11 Zoltan Varga <vargaz@gmail.com>
15056 * object.c (build_imt): Call mono_class_setup_methods () before accessing
15059 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
15061 * class-internals.h, object-internals.h, object.c: IMT-based
15062 interface invocation core from Massimiliano Mantione
15063 (massi@ximian.com) with a reworked arch-specific interface,
15064 bsearch implementation and a few bugfixes and memory savings by me.
15066 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
15068 * class.c (mono_class_create_from_typedef): mono would segfault if
15069 an enum did not have a __value field. It now throws a TypeLoadException
15070 for such cases. Fix bug #82022
15072 2007-07-10 Zoltan Varga <vargaz@gmail.com>
15074 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
15076 2007-07-09 Mark Probst <mark.probst@gmail.com>
15078 * class.c (mono_class_init): If a class is already inited but has
15079 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
15081 2007-07-09 Mark Probst <mark.probst@gmail.com>
15083 * class.c: Properly handle the case of an unimplemented interface
15084 method. Fixes: 81673.
15086 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
15088 * class-internals.h, object.c: cleanup patch from massi: use
15089 MonoVTable->interface_bitmap since the vtable interfaces offset array
15092 2007-07-10 Zoltan Varga <vargaz@gmail.com>
15094 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
15095 GetMDStreamVersion icall instead.
15097 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
15099 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
15100 not use mono_dl_build_path() with a full library name: makes
15101 fallbacks to libgaim and libfam work.
15103 2007-07-06 William Holmes <billholmes54@gmail.com>
15105 * assembly.c: Added a continue statement in probe_for_partial_name when
15106 parse_assembly_directory_name fails. Fixes : 82002
15108 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
15110 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
15111 and added a verification for TYPEDBYREF.
15112 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
15113 make native int interchangeable with int32 and some small cleanup and formating.
15114 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
15115 handle byref of byref.
15116 * verify.c (push_local): handle byref of byref.
15117 * verify.c (do_binop): invalid mix of values is unverifiable
15118 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
15119 added visibility checks
15120 * verify.c (field related method): added visibility checks
15121 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
15123 2007-07-06 Zoltan Varga <vargaz@gmail.com>
15125 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
15128 2007-07-05 Zoltan Varga <vargaz@gmail.com>
15130 * profiler.c (mono_profiler_load): Fix an off-by-one error.
15132 * marshal.c (emit_marshal_string): When returning a string from managed code,
15133 allways make a copy even for unicode strings. Fixes #81990.
15135 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
15137 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
15138 of byref generic inst types (bug #81997).
15140 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
15142 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
15143 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
15145 2007-07-02 Zoltan Varga <vargaz@gmail.com>
15147 * marshal.c (emit_marshal_string): Add support for unicode strings in
15148 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
15150 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
15152 * verify.c: field load/store are now verified, missing only access checks now
15154 2007-06-28 Martin Baulig <martin@ximian.com>
15156 * mono-debug.c (mono_debug_debugger_version): New public variable.
15158 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
15160 * locales.c: When constructing DateTimeFormat or NumberFormat for
15161 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
15162 MonoCultureInfo contructed from the current locale is always
15163 read-only and has UseUserOverride set to true. All MonoCultureInfo
15164 instances returned for GetCultures have both IsReadOnly and
15165 UseUserOverride set to true. Fixes part of bug #81930.
15167 2007-06-22 Jonathan Chambers <joncham@gmail.com>
15169 * icall-def.h: Update System.__ComObject icalls
15170 * marshal.c: Avoid managed transition (and object creation)
15171 when looking up COM interface in RCW.
15172 * marshal.h: Ditto.
15174 Code is contributed under MIT/X11 license.
15176 2007-06-22 Zoltan Varga <vargaz@gmail.com>
15178 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
15179 to avoid crashes during assembly unloading.
15181 2007-06-22 Raja R Harinath <rharinath@novell.com>
15183 Fix MethodInfo.IsGenericMethodDefinition
15184 * reflection.c (mono_reflection_bind_generic_method_parameters):
15185 Rearrange code to ensure we always uses a generic method definition.
15186 * class.c (mono_class_inflate_generic_method_full): Set
15187 'generic_container' field only for generic method definitions.
15188 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
15189 Use presense of 'generic_container' field as indication of being a
15190 generic method definition.
15192 2007-06-21 Zoltan Varga <vargaz@gmail.com>
15194 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15196 * object-internals.h: Reflect changes in the layout of the managed Delegate
15199 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
15200 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
15201 runtime memory used by the dynamic method. Fixes #77146.
15203 2007-06-21 Dick Porter <dick@ximian.com>
15206 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
15207 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
15210 2007-06-21 Raja R Harinath <rharinath@novell.com>
15212 * reflection.c (method_encode_methodspec): Add a tripwire.
15213 * class.c (inflate_generic_type): The fully open generic type is
15214 not the same as the generic type definition.
15216 2007-06-21 Martin Baulig <martin@ximian.com>
15218 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
15220 * mono-debug-debugger.h
15221 (MonoDebuggerBreakpointInfo): Removed.
15222 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
15223 (mono_debugger_remove_breakpoint): Likewise.
15224 (mono_debugger_breakpoint_callback): Likewise.
15225 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
15227 2007-06-21 Raja R Harinath <rharinath@novell.com>
15229 * metadata.c (mono_metadata_lookup_generic_class): The fully open
15230 generic type is not the same as the generic type definition.
15231 * class.c (mono_generic_class_get_class): Likewise.
15233 2007-06-20 Geoff Norton <gnorton@customerdna.com>
15235 * icall.c: The second argument to
15236 System.Reflection.MethodBase.GetMethodFromHandleInternalType
15237 is a MonoType not a MonoClass.
15239 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
15241 * verify.c: support for function pointers in the verifier
15243 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
15245 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
15247 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
15249 * assembly.c: removed Mono.Data.SqliteClient from the list of
15250 forward-compatible assemblies as it breaks the ABI (bug #81899).
15252 2007-06-19 Raja R Harinath <rharinath@novell.com>
15254 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
15255 lookup/update with the loader lock.
15256 * reflection.c (mono_class_bind_generic_parameters): No need to
15257 protect mono_metadata_lookup_* with the loader lock.
15258 * class.c (inflate_generic_type): Likewise.
15260 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
15261 on a generic instantiated type.
15263 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
15265 *verify.c: produce meanfull error messages on verification error
15266 *verify.c: fixed some cases of verification errors reported as validation errors
15267 *pedump.c: fixed the error name array, now it shows validation errors properly
15268 *verify.h: fixed the contant that should be used for verification errors
15270 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
15272 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
15273 for bug #77596, 81858 and 80743 (generics data structures on domain
15276 2007-06-15 Raja R Harinath <rharinath@novell.com>
15278 Avoid allocating 'MonoGenericContext' on the heap.
15279 * class-internals (_MonoMethodInflated::context): Make field
15280 inline, not a pointer.
15281 * loader.c (method_from_methodspec): Allocate 'new_context' on the
15282 stack. Use the context embedded within the inflated method as the
15283 hash key, rather than 'new_context'.
15284 * class.c (inflate_generic_context): Simplify. Return a struct
15285 rather than allocating on the heap.
15286 (mono_class_inflate_generic_method_full): Update to changes. Now,
15287 doesn't salt away a copy of the context -- simplifying the
15288 lifetime rules of a 'MonoGenericContext *'.
15289 (mono_method_get_context): Return pointer to embedded context.
15290 (setup_generic_array_ifaces): Allocate temporary context on stack.
15291 * reflection.c (inflate_mono_method): Likewise.
15292 (mono_reflection_bind_generic_method_parameters): Likewise.
15293 Use the context embedded within the inflated method as the hash key.
15295 Avoid a source of allocation of 'MonoGenericContext'.
15296 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
15297 and 'cached_context' fields into embedded 'MonoGenericContext' field.
15298 * class.c: Update to changes.
15299 (mono_generic_class_get_context): Simplify drastically. Now just
15300 returns a pointer to the field.
15301 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
15302 argument as a const pointer.
15303 (mono_metadata_generic_context_equal): Likewise.
15304 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
15307 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
15309 * verify.c improved the handling of brtrue/brfalse, factored out common code
15311 2007-06-14 Raja R Harinath <rharinath@novell.com>
15313 Kill MonoGenericMethod.
15314 * class-internals.h (MonoGenericContext::method_inst): Rename from
15315 'gmethod' and convert to a MonoGenericInst.
15316 (MonoGenericMethod): Remove.
15317 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
15318 * loader.c (method_from_methodspec): Update to changes. Use a
15319 MonoGenericContext as the key to the hashtable.
15320 * metadata.c (mono_metadata_generic_context_equal): Rename from
15321 'mono_metadata_generic_method_equal' and take MonoGenericContext.
15322 (mono_metadata_generic_context_hash): Likewise from
15323 'mono_metadata_generic_method_hash'. Change hash function.
15324 (mono_metadata_load_generic_params): Update to changes.
15325 (mono_get_shared_generic_method): Remove.
15326 * metadata-internals.h (mono_get_shared_generic_method): Remove.
15327 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
15328 (inflate_generic_context): Likewise.
15329 (mono_class_inflate_generic_method_full): Likewise.
15330 (setup_generic_array_ifaces): Likewise.
15331 (mono_class_create_from_typespec): Likewise.
15332 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
15333 (method_encode_methodspec): Update callsite.
15334 (reflection_methodbuilder_to_mono_method): Update to changes.
15335 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
15336 MonoGenericContext as the key to the hashtable.
15337 (inflate_mono_method): Update to changes.
15339 * class-internals.h (MonoGenericMethod::container): Remove.
15340 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
15342 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
15344 * profiler-private.h, profiler.c, profiler.h: added API to profile
15347 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
15349 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
15351 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
15353 * verify.c: method invocation is now validated, now we verify parameter types on stack.
15354 Fixed overflow and underflow not aborting the verification process.
15356 2007-06-13 Mark Probst <mark.probst@gmail.com>
15358 * class-internals.h (MonoStats): Added stats entries for dynamic
15361 2007-06-12 Zoltan Varga <vargaz@gmail.com>
15363 * loader.c (mono_free_method): Free header->locals and header->clauses.
15365 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
15368 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
15370 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
15372 2007-06-12 Raja R Harinath <rharinath@novell.com>
15374 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
15377 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
15379 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
15381 2007-06-11 Raja R Harinath <harinath@gmail.com>
15383 MonoGenericMethod on a diet
15384 * class-internals.h (_MonoMethodInflated::reflection_info): Move
15386 (_MonoGenericMethod::reflection_info): ... from here.
15387 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
15389 * reflection.c (inflate_mono_method): Likewise.
15390 (mono_reflection_bind_generic_method_parameters): Likewise.
15392 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
15394 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
15395 *verify.c: factored long ldarg forms to share code with short forms
15397 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
15399 *verify.c: fixed code formating factored some duplicate code
15400 into a new function
15402 *verify.h: fixed binary incompatibility introduced earlier
15404 *pedump.c: fixed formating
15406 2007-06-11 Raja R Harinath <harinath@gmail.com>
15408 Fix assertion when disassembling Mono.C5.dll
15409 * loader.c (method_from_methodspec): Avoid inflating a method
15410 twice with the same context. If the methodref is inflated, use
15411 the declaring method instead.
15413 * class.c (mono_class_from_generic_parameter): Fix case similar to
15414 bug #81830 handled below, but for method containers.
15416 2007-06-10 Raja R Harinath <harinath@gmail.com>
15418 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
15419 get_shared_generic_class. Directly inflate the instance.
15420 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
15421 (inflate_generic_class): Delete.
15422 (get_shared_generic_class): Delete. Move setting of
15423 'cached_class' and 'cached_context' ...
15424 * metadata.c (mono_metadata_lookup_generic_class): ... here.
15426 * metadata.c (mono_metadata_lookup_generic_class): Change
15427 signature to take the components of a MonoGenericClass rather than
15428 an allocated MonoGenericClass. Change semantics to be intern-like.
15429 * reflection.c (mono_class_bind_generic_parameters): Update to
15430 changes. Make locking region tighter.
15431 * class.c (inflate_generic_class): Update to changes.
15432 (get_shared_generic_class): Likewise.
15433 * metadata-internals.h: Likewise.
15435 * reflection.c (mono_class_bind_generic_parameters): Take and
15436 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
15437 (mono_reflection_bind_generic_parameters): Use
15438 'mono_class_bind_generic_parameters' rather than duplicate the code.
15439 * class.c (mono_bounded_array_class_get): Update to changes.
15440 * object-internals.h: Likewise.
15442 * reflection.c (mono_class_bind_generic_parameters): Only support
15443 parameterizing generic type definitions. Remove support for other
15446 2007-06-08 Zoltan Varga <vargaz@gmail.com>
15448 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
15450 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
15451 in the dynamic case.
15453 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
15455 * threads.c: When cleaning up thread, reset the Background bit.
15458 2007-06-08 Jonathan Chambers <joncham@gmail.com>
15460 * metadata.c: Move variable declarations to top of scope.
15461 * verify.c: Move variable declarations to top of scope.
15463 Code is contributed under MIT/X11 license.
15465 2007-06-08 Raja R Harinath <rharinath@novell.com>
15467 * reflection.c (mono_class_bind_generic_parameters): Replace
15468 open-coded loop with mono_metadata_inflate_generic_inst.
15470 * class.c (get_shared_generic_class): Don't call
15471 mono_get_shared_generic_inst. Use the container's own
15474 * metadata.c (mono_metadata_load_generic_params): Move
15475 initialization of 'context' field here from ...
15476 * class.c (mono_class_create_from_typedef): ... here, and ...
15477 * loader.c (mono_get_method_from_token): ... here.
15479 * class.c (get_shared_generic_class): Rename from
15480 mono_get_shared_generic_class and make static.
15481 (mono_get_shared_generic_inst): Move to metadata.c.
15482 * loader.c (mono_get_shared_generic_method): Likewise.
15483 * class-internals.h, metadata-internals.h: Update to changes.
15486 * class.c (mono_class_from_generic_parameter): Don't assume a
15487 generic container owner exists. Generic containers from monodis
15490 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
15492 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
15493 * verify.h: new typedefs to returns the non-verifiable status
15494 * verify.c: initial implementation of generics, stack merging and object compatibility check
15496 2007-06-06 Mark Probst <mark.probst@gmail.com>
15498 * class.c, image.c, class-internals.h (MonoImage): class_cache is
15499 a MonoInternalHashTable again (fixed bug in internal hash table
15502 2007-06-06 Mark Probst <mark.probst@gmail.com>
15504 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
15505 MonoInternalHashTable again (fixed bug in internal hash table
15508 2007-06-06 Mark Probst <mark.probst@gmail.com>
15510 * class.c, image.c, class-internals.h, domain.c,
15511 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
15512 changes. Have to figure out what makes them break the SWF
15515 2007-06-04 Mark Probst <mark.probst@gmail.com>
15517 * class.c, image.c, class-internals.h (MonoImage): class_cache is
15518 a MonoInternalHashTable now.
15520 2007-06-04 Mark Probst <mark.probst@gmail.com>
15522 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
15523 MonoInternalHashTable now.
15525 2007-05-31 Zoltan Varga <vargaz@gmail.com>
15527 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
15530 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
15532 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
15533 dependent trampoline.
15535 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15537 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
15539 2007-05-29 Robert Jordan <robertj@gmx.net>
15541 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
15543 2007-05-28 Zoltan Varga <vargaz@gmail.com>
15545 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
15547 2007-05-25 Jonathan Chambers <joncham@gmail.com>
15549 * marshal.c: Fix interface lookup loops for
15550 cominterop_get_com_slot_for_method and
15551 cominterop_get_method_interface. Only need to lookup
15552 if type is a class, else use interface type method is on.
15554 Code is contributed under MIT/X11 license.
15556 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
15558 * reflection.c: HasSecurity can be present even if no specially
15559 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
15560 SecurityAttribute). Fix CAS regression tests on buildbot.
15562 2007-05-24 Jonathan Chambers <joncham@gmail.com>
15564 * appdomain.c: Add configure checks for header files.
15565 * image.c: Add configure checks for header files.
15566 * file-io.c: Add configure checks for header files.
15567 * debug-mono-symfile.c: Add configure checks for header files.
15568 * threadpool.c: Add configure checks for header files.
15569 * console-io.c: Add configure checks for header files.
15570 * profiler.c: Add configure checks for header files.
15571 * rawbuffer.c: Add configure checks for header files.
15572 * icall.c: Add configure checks for header files.
15573 * rand.c: Add configure checks for header files.
15574 * socket-io.c: Add configure checks for header files.
15576 Code is contributed under MIT/X11 license.
15578 2007-05-24 Zoltan Varga <vargaz@gmail.com>
15580 * reflection.c (mono_custom_attrs_from_builders): Remove the
15581 assertion as it breaks the build.
15583 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
15585 * reflection.c (lookup_custom_attr): Make a copy here too.
15587 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
15590 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
15593 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
15596 2007-05-22 Zoltan Varga <vargaz@gmail.com>
15598 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
15599 (load_cattr_value): Ditto.
15601 2007-05-20 Zoltan Varga <vargaz@gmail.com>
15603 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
15605 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
15607 * threads.c: In "start_wrapper", set apartment_state to MTA if
15608 apartment_state is Unknown and we're running on 2.0 profile or
15610 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
15611 to main method, then set apartment_state to Unknown on 1.0 profile,
15612 and MTA on 2.0 profile.
15614 2007-05-16 Jb Evain <jb@nurv.fr>
15616 * class-internals.h (MonoDefaults): Add an attribute_class and
15617 customattribute_data_class.
15618 * domain.c (mono_init_internal): Populate them.
15619 * reflection.c: Use them to remove duplicates. Make a vew
15620 MonoClass variables `static'.
15622 2007-05-15 Massimiliano Mantione <massi@ximian.com>
15624 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
15625 step in implementing IMT, so that all isinst checks now can go
15626 through the bitmap.
15627 This was needed because vtables for TransparentProxy need to look
15628 like the vtable of the "target" class, so they need to point to
15629 its interface bitmap directly.
15631 * object.c: inside "mono_class_create_runtime_vtable" and
15632 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
15634 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
15636 * object-internals.h
15637 culture-info.h : added territory field in MonoCulture and
15638 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
15639 * locales.c : fill territory field above too.
15640 * culture-info-table.h : regenerated.
15642 2007-05-12 Zoltan Varga <vargaz@gmail.com>
15644 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
15647 2007-05-11 Jonathan Chambers <joncham@gmail.com>
15649 * object.c: Always initialize apartment, even if
15650 there is no custom attributes on entry point.
15652 Code is contributed under MIT/X11 license.
15654 2007-05-10 Jonathan Chambers <joncham@gmail.com>
15656 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
15657 * metadata.c: If no encoding is set, check for unicode
15660 Code is contributed under MIT/X11 license.
15662 2007-05-09 Jonathan Chambers <joncham@gmail.com>
15664 * threads.c: Handle if mono_thread_current returns NULL
15666 Code is contributed under MIT/X11 license.
15668 2007-05-09 Jonathan Chambers <joncham@gmail.com>
15670 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
15671 in start_wrapper. Added mono_thread_init_apartment_state and
15672 mono_thread_cleanup_apartment_state.
15673 * object.c: Initialize thread apartment state on main thread
15674 by checking for STAThreadAttribute on entry point.
15675 * object-internals.h: Add apartment_state field to MonoThread.
15676 * threads-types.h: Add unmanaged definition of
15677 System.Threading.ApartmentState, MonoThreadApartmentState.
15679 Code is contributed under MIT/X11 license.
15681 2007-05-08 Jonathan Chambers <joncham@gmail.com>
15683 * class.c: Fix windows build.
15684 * class-internals.h: Fix windows build.
15686 Code is contributed under MIT/X11 license.
15688 2007-05-08 Robert Jordan <robertj@gmx.net>
15690 * process.c (CreateProcess_internal):
15691 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
15692 .CreateNoWindow was specified. Fixes #81496.
15694 2007-05-08 Massimiliano Mantione <massi@ximian.com>
15696 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
15697 step in implementing IMT, replaced it with two compact arrays
15698 (interfaces_packed and interface_offsets_packed) and a bitmap that
15699 is used for isinst checks (interface_bitmap).
15701 * class.c: (compare_interface_ids): compare function to pass to
15702 bsearch when looking for an interface with a given id.
15703 (mono_class_interface_offset): reimplemented using bsearch on
15704 interfaces_packed, getting the offset from interface_offsets_packed.
15705 (print_implemented_interfaces): utility debugging function.
15706 (setup_interface_offsets): reworked to initialize interfaces_packed,
15707 interface_offsets_packed and interface_bitmap.
15709 * object.c: replaced all accesses to "MonoClass.interface_offsets"
15710 with uses of interfaces_packed and interface_offsets_packed.
15712 2007-05-08 Massimiliano Mantione <massi@ximian.com>
15714 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
15715 mono_class_interface_offset prototype to wrap all accesses to
15716 "MonoClass.interface_offsets".
15718 * class.c: Implemented mono_class_interface_offset, and wrapped all
15719 accesses to "MonoClass.interface_offsets".
15721 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
15722 "MonoClass.interface_offsets".
15724 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
15726 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
15727 GetMethodFromHandle overloads (bug #78637).
15729 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
15731 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
15732 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
15734 2007-05-01 Zoltan Varga <vargaz@gmail.com>
15736 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
15739 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
15741 (mono_custom_attrs_from_index): Ditto.
15743 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
15746 2007-04-30 Zoltan Varga <vargaz@gmail.com>
15748 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
15749 is now allocated from a mempool.
15751 2007-04-28 Zoltan Varga <vargaz@gmail.com>
15753 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
15754 caller holds threads_lock, leading to deadlocks. Fixes #81476.
15756 2007-04-26 Zoltan Varga <vargaz@gmail.com>
15758 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
15759 mono_loader_clear_error () too late. Fixes #81463.
15761 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
15763 * culture-info-table.h : regenerated.
15765 2007-04-25 Zoltan Varga <vargaz@gmail.com>
15767 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
15770 2007-04-25 Dick Porter <dick@ximian.com>
15772 * Makefile.am: Put the mingw enforced-optimisation back into the
15773 PLATFORM_WIN32 section.
15775 2007-04-24 Zoltan Varga <vargaz@gmail.com>
15777 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
15780 * image.c (mono_image_load_module): New API function to load a module reference.
15782 * image.c (load_modules): Load modules lazily. Fixes #80812.
15784 * class.c (mono_class_from_typeref): Use mono_image_load_module.
15786 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
15788 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
15789 to mono_image_load_module_dynamic.
15791 2007-04-23 Jonathan Chambers <joncham@gmail.com>
15793 * marshal.c: Fix calling convention for CCW on non-windows
15794 platforms. STDCALL on windows, CDECL everywhere else to work
15795 with XPCOM and MainWin COM.
15797 Code is contributed under MIT/X11 license.
15799 2007-04-23 Martin Baulig <martin@ximian.com>
15804 (method_from_memberref): Added `gboolean *used_context' argument.
15805 (mono_get_method_from_token): Likewise.
15806 (mono_get_method_full): Don't insert the method in the cache when
15807 `used_context' is true.
15809 2007-04-23 Raja R Harinath <rharinath@novell.com>
15811 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
15813 * reflection.c (mono_reflection_bind_generic_parameters): Don't
15814 create new MonoTypes for returned types.
15815 * class.c (mono_generic_class_get_class): Export mono-internal.
15816 * class-internals.h: Update to changes.
15818 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
15820 * threadpool.c, threadpool.h, icall-def.h: patch from
15821 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
15823 2007-04-18 Zoltan Varga <vargaz@gmail.com>
15825 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
15827 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
15829 * threads.c (mono_thread_get_stack_bounds): New helper function.
15831 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
15832 Correctly compute stack bounds when attaching. Fixes #81394.
15834 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
15836 * reflection.c: fix handling of doubles in custom attributes
15837 for the arm-fpa format (bug #81368).
15839 2007-04-18 Raja R Harinath <rharinath@novell.com>
15841 * reflection.c (assembly_add_win32_resources): Mildly relax an
15842 bounds check to let the end pointer point just past the end of the
15843 allocated buffer. (may fix #81384)
15845 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
15847 * culture-info-table.h : regenerated.
15849 2007-04-07 Zoltan Varga <vargaz@gmail.com>
15851 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
15852 the thread is aborted early.
15854 2007-04-05 Dick Porter <dick@ximian.com>
15856 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
15857 FindFirstFile()/FindNextFile() to find entries. This lets the
15858 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
15861 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
15863 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
15865 2007-04-04 Martin Baulig <martin@ximian.com>
15868 (mono_method_desc_full_match): Add support for nested classes.
15870 2007-04-02 Zoltan Varga <vargaz@gmail.com>
15872 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
15874 2007-04-01 Zoltan Varga <vargaz@gmail.com>
15876 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
15877 waiting for too many threads.
15879 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
15881 * environment.c: Fix return value check on uname so we can get the
15882 executing version on Solaris operating systems.
15884 2007-03-28 Jb Evain <jbevain@gmail.com>
15886 * class.c (mono_type_get_name_recurse): Complete the
15887 fix for the creation of assembly qualified names for
15888 pointer types. Fixes #81208.
15890 2007-03-27 Dick Porter <dick@ximian.com>
15892 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
15893 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
15897 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
15898 the value of ReleaseMutex().
15900 2007-03-27 Dick Porter <dick@ximian.com>
15902 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
15903 in little-endian order, not network endian, so must be converted
15904 to host endian here. Fixes bug 80593.
15906 2007-03-22 Jb Evain <jbevain@gmail.com>
15908 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
15909 qualified names for pointer types. Fixes #81208.
15911 2007-03-21 Jonathan Chambers <joncham@gmail.com>
15913 * marshal.c: Add support for PreserveSigAttribute.
15915 Code is contributed under MIT/X11 license.
15917 2007-03-14 Zoltan Varga <vargaz@gmail.com>
15919 * process.c: Fix endianness issues. Fixes #81126.
15921 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
15922 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
15924 * image.c (mono_image_lookup_resource): Make this work on big-endian
15925 machines.Change API contract so the caller needs to free the return value.
15927 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
15930 2007-03-14 Martin Baulig <martin@ximian.com>
15932 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
15933 mono_type_get_desc() as well.
15935 2007-03-13 Jonathan Chambers <joncham@gmail.com>
15937 * icall.c: Fix environ access in VS.
15939 2007-03-13 Alp Toker <alp@atoker.com>
15941 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
15942 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
15945 2007-03-12 Zoltan Varga <vargaz@gmail.com>
15947 * reflection.c (mono_reflection_create_dynamic_method): Add support for
15948 circular references among dynamic methods. Fixes #81091.
15950 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
15952 2007-03-09 Martin Baulig <martin@ximian.com>
15954 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
15956 2007-03-09 Jonathan Chambers <joncham@gmail.com>
15958 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
15959 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
15961 Code is contributed under MIT/X11 license.
15963 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
15965 * loader.c: Reapply patch for bug #79424.
15967 2007-03-06 Zoltan Varga <vargaz@gmail.com>
15969 * metadata.c (mono_type_to_unmanaged): Only convert object to
15970 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
15972 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
15974 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
15975 (and incorrectly set) is_reference field from MonoGenericInst.
15977 2007-03-06 Zoltan Varga <vargaz@gmail.com>
15979 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
15982 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
15984 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
15986 2007-03-05 Miguel de Icaza <miguel@novell.com>
15988 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
15989 FileOptions.1 value to mean "temporary", map that to
15990 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
15994 2007-03-03 Marek Habersack <mhabersack@novell.com>
15996 * appdomain.c: implement MS .Net style shadow copying. Copies of
15997 the assemblies are made in a subdirectory of the dynamic base
15998 directory, the assembly names are preserved.
15999 Copy .mdb and .config files along with the assemblies being shadowed.
16001 2007-02-28 Zoltan Varga <vargaz@gmail.com>
16003 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
16004 (emit_marshal_handleref): Ditto.
16006 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
16007 on Visual C++. Fixes #80671.
16009 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
16011 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
16012 for clone operations.
16014 2007-02-28 Zoltan Varga <vargaz@gmail.com>
16016 * marshal.c: Fix warnings.
16018 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
16020 * loader.c: allow case-insensitive matching of the dll name
16021 in dllmap handling when prefixed with "i:".
16023 2007-02-20 Jonathan Chambers <joncham@gmail.com>
16025 * threads.c: Fix #ifdef for dummy_apc function for VS.
16027 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
16029 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
16031 2007-02-19 Massimiliano Mantione <massi@ximian.com>
16032 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
16033 giving precedence to the methods with a fully qualified name
16034 (InterfaceName.MethodName) when building the interface sections
16037 2007-02-16 Dick Porter <dick@ximian.com>
16039 * threadpool.c (append_job): Fix fast-path array handling, so it's
16040 less likely the array will grow exponentially when the load is
16043 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
16045 * metadata-internals.h, loader.c: fix dllmap lookup order
16046 for non-function maps, too, and prepare for fallback code.
16048 2007-02-12 Robert Jordan <robertj@gmx.net>
16050 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
16051 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
16052 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
16053 GlobalFree. Fixes a part of bug #77075.
16055 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
16057 * loader.c: implemented typedef parent in field memberref.
16059 2007-02-11 Jonathan Chambers <joncham@gmail.com>
16061 * marshal.c: Fix warnings and remember to call Release on
16064 Code is contributed under MIT/X11 license.
16066 2007-02-10 Miguel de Icaza <miguel@novell.com>
16068 * class-internals.h: Add MonoHandleRef definition, and
16069 handleref_class to mono_defaults.
16071 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
16072 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
16074 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
16075 (do nothing on this stage)
16076 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
16077 (emit_marshal_handleref): New method, used for argument handling
16080 2007-02-08 Jonathan Chambers <joncham@gmail.com>
16082 * class.c (mono_class_setup_parent): Lazily init com types.
16083 * domain.c (mono_init_internal, mono_init_com_types): Lazily
16085 * object.c (mono_remote_class_vtable): Lazily init com types.
16086 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
16087 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
16088 * domain-internals.h: Expose mono_init_com_types.
16089 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
16090 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
16091 Add support for COM Callable Wrapper marshalling.
16092 * marshal.h: Add icall definitions.
16093 * gc.c: Handle freeing of CCWs in finalizer code.
16095 Code is contributed under MIT/X11 license.
16097 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
16099 * reflection.c: changed all the signature encoding code to use
16100 a variable-sized buffer.
16102 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
16104 * marshal.c: locking fixes: never take the loader lock
16105 or other runtime locks when holding the marshal lock
16108 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
16110 * marshal.c: make the delegate function pointer mapping
16111 work for the moving GC.
16113 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
16115 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
16118 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
16120 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
16123 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
16125 * threadpool.c: made the code moving-GC safe.
16127 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
16129 * assembly.c, boehm-gc.c, class-internals.h, class.c,
16130 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
16131 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
16133 * reflection.c: warning cleanup, some threading and moving GC fixes.
16135 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
16137 * class.c, loader.c: create the needed Set/Get/Address array methods
16138 as well as the .ctors in mono_class_init (), fixes bug #80567.
16140 2007-01-24 Zoltan Varga <vargaz@gmail.com>
16142 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
16143 we doesn't decrease its alignment. Should fix the sparc build.
16145 2007-01-24 Dick Porter <dick@ximian.com>
16148 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
16149 Create the returned object if we need to ignore an unsupported
16150 socket option. Fixes a segfault reported by Atsushi.
16152 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
16154 * class.c, object.c: restrict GC-tracked fields to
16155 UIntPtr fields used inside corlib, so we provide better
16156 type info to the GC and also allow broken packing as in
16159 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
16161 * sgen-gc.c: removed duplicated function.
16163 2007-01-19 Miguel de Icaza <miguel@novell.com>
16165 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
16166 value that means that the value is not supported, but that we
16167 should not return a failure, but instead report this as a
16168 successful operation.
16170 2007-01-19 Raja R Harinath <rharinath@novell.com>
16172 Fix tests/bug79956.2.il
16173 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
16174 (mono_generic_class_get_class): If the generic definition in an
16175 enum, copy over other fields related to it.
16177 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
16179 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
16180 genericinst enums (bug #79215).
16182 2007-01-17 Massimiliano Mantione <massi@ximian.com>
16183 * class.c: Fix bug 80307.
16185 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
16187 * image.c: if the file table is not present, try to load
16188 all the modules, since we don't have info about them
16189 having or not metadata (bug #80517).
16190 * assembly.c: allow mono_assembly_load_references () to
16191 work for netmodules.
16193 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
16195 * image.c, metadata-internals.h, object.c: execute module
16196 cctors when running on the 2 runtime if present (bug #80487).
16198 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
16200 * icall.c: optimized InitializeArray() on bigendian.
16202 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
16204 * icall.c: fix for the broken ARM FPA double format.
16206 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
16208 * icall.c: handle endian issues for r4 and r8 types, too, in
16209 the InitializeArray() icall.
16211 2007-01-15 Miguel de Icaza <miguel@novell.com>
16213 * loader.c (mono_loader_error_prepare_exception): Clear the error
16214 once we have extracted the information from it, do this before we
16215 call into the JIT's class loading mechanisms.
16217 * object.c (mono_class_create_runtime_vtable): Do not clear the
16218 loader error before calling mono_class_get_exception_for_failure
16219 as the loader error is needed inside
16220 mono_class_get_exception_for_failure to throw the error (thinko).
16224 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
16226 * reflection.c: align fields rva data so it's faster to load at
16229 2007-01-12 Raja R Harinath <rharinath@novell.com>
16231 Prepare to simplify GenericMethod handling.
16232 * class-internals.h (mono_method_get_context): New accessor function.
16233 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
16234 rather than directly accessing '->context' field.
16236 * class-internals.h (_MonoGenericParam.method): Move ...
16237 (_MonoGenericContainer): ... here. Add into union with klass field.
16238 * class.c, icall.c, loader.c, metadata.c, reflection.c:
16241 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
16243 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
16244 the wrapper type enum and reduce relocations.
16246 2007-01-12 Raja R Harinath <rharinath@novell.com>
16248 * reflection.c (inflate_mono_method): Reuse method instantiation
16249 from the generic method, if available.
16251 2007-01-11 Jonathan Chambers <joncham@gmail.com>
16253 * marshal.c (emit_marshal_variant): Fix conv_arg
16254 type in last commit, based on whether parameter is byref.
16256 2007-01-11 Jonathan Chambers <joncham@gmail.com>
16258 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
16260 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
16261 MONO_TYPE_OBJECT back for VARIANT support.
16263 2007-01-11 Jonathan Chambers <joncham@gmail.com>
16265 * marshal.c, marshal.h, icall-def.h: Implement
16266 Marshal.ReAllocCoTaskMem.
16268 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
16270 * marshal.c: memory retention fixes: use the proper
16271 image cache for runtime_invoke method lookups.
16273 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
16275 * mempool.c: added code to help debug mempool allocations.
16277 2007-01-11 Dick Porter <dick@ximian.com>
16279 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
16280 support (experimenting with faking it with IP_MTU_DISCOVER for
16281 systems that don't have IP_DONTFRAGMENT.)
16282 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
16285 * icall-def.h: new System.Net.Sockets.Disconnect icall.
16287 * socket-io.h: Add new fields to MonoSocketAsyncResult
16288 corresponding to the new ones in Socket.cs.
16290 2007-01-11 Raja R Harinath <rharinath@novell.com>
16292 Fix IronPython regression mentioned in #80249
16293 * metadata.c (do_mono_metadata_parse_generic_class): Clear
16294 'cached_context' field, since it may have been initialized as a
16295 side-effect of metadata parsing.
16297 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
16298 (_MonoGenericClass.cached_class): Move here and rename from lone
16299 remaining field of ...
16300 (_MonoInflatedGenericClass): ... this. Remove.
16301 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
16304 Fix mcs/tests/test-128.cs regression.
16305 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
16306 2007-01-10 change below.
16307 [MONO_TYPE_OBJECT]: Recurse into array case.
16309 2007-01-11 Raja R Harinath <harinath@gmail.com>
16311 * class-internals.h (mono_get_inflated_generic_class): Remove.
16312 * class.c (mono_get_inflated_generic_class): Remove.
16313 (mono_generic_class_get_class): Rename from
16314 mono_class_create_generic.
16315 (mono_class_from_mono_type) [GENERICINST]: Use it.
16316 * reflection.c, metadata.c: Update to changes. Use
16317 'mono_class_from_mono_type'.
16319 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
16321 * reflection.c: use passed type when encoding an array element
16322 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
16324 2007-01-09 Robert Jordan <robertj@gmx.net>
16326 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
16327 result arguments (someDelegate.EndInvoke (unrelatedAres)).
16330 2007-01-09 Raja R Harinath <rharinath@novell.com>
16332 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
16334 * object.c (set_value): Avoid aliasing between type->data.klass
16335 and type->data.generic_class.
16337 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
16339 2007-01-08 Raja R Harinath <rharinath@novell.com>
16341 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
16342 between type->data.klass and type->data.generic_class.
16344 2007-01-08 Lluis Sanchez <lluis@ximian.com>
16346 * marshal.c: In MS.NET, StringBuilder objects are not copied by
16347 value in out parameters.
16349 2007-01-08 Raja R Harinath <rharinath@novell.com>
16351 Simplify invariant for MonoGenericClass::klass field.
16352 * class.c (mono_class_create_generic): Verify 'klass' is null.
16353 * metadata.c (do_mono_metadata_parse_generic_class): Don't
16354 initialize 'klass' field.
16356 2007-01-05 Raja R Harinath <rharinath@novell.com>
16358 Ongoing work to avoid redundant data and simplify invariants.
16359 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
16360 'generic_class', and change type to a GenericInst.
16361 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
16362 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
16364 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
16366 * class.c : skip io-layer under PLATFORM_WIN32.
16368 2007-01-03 Tor Lillqvist <tml@novell.com>
16370 Fix #80305: In a bundled executable, look in the bundled exe
16371 assembly to determine the runtime version. Add the possibility to
16372 bundle also the machine.config file.
16374 * assembly.c (mono_assembly_open_from_bundle): Make
16375 non-static. Allow being called even if we have no bundled
16376 assemblies, and return NULL right away in that case.
16378 * domain-internals.h: Declare mono_assembly_open_from_bundle()
16381 * domain.c (app_config_parse): Take an assembly exe file name as
16382 parameter instead of a config file name. Check for a bundled
16383 config file for that assembly by calling
16384 mono_config_string_for_assembly_file() (see below) before looking
16385 for one in the file system.
16386 (get_runtimes_from_exe): Corrsponding change to call of
16387 app_config_parse().
16388 (get_runtimes_from_exe): Check for bundled assembly exe file first
16389 by calling mono_assembly_open_from_bundle(). If no bundled
16390 assembly exe file is found, call mono_image_open() as before to
16391 look it up in the file system.
16393 * mono-config.c: Add variable bundled_machinec_onfig.
16394 (mono_config_string_for_assembly_file): New function.
16395 (mono_config_for_assembly): Move code snippet that looks for a
16396 bundled assembly .config file into the above new function. Call
16398 (mono_register_machine_config, mono_get_machine_config): New
16399 functions to set and retrieve
16401 * assembly.h: Declare mono_register_machine_config().
16403 * mono-config.h: Declare mono_get_machine_config() and
16404 mono_config_string_for_assembly_file().
16406 * icall.c: No declaration of environ necessary on Win32. It is
16407 declared (as a macro expanding to a function call) in stdlib.h.
16408 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
16409 New internal mono function. Returns the value of
16410 mono_get_machine_config() as a Mono string.
16412 * icall-def.h: Add get_bundled_machine_config().
16414 2007-01-04 Raja R Harinath <rharinath@novell.com>
16416 Remove redundant field
16417 * class-internals.h (_MonoGenericContext.container): Remove field.
16418 * loader.c (mono_method_get_signature_full): Don't parse a
16419 "container" for a signature parse when the signature is inflated
16421 (method_from_methodspec): Likewise, for a generic_inst.
16422 * class.c, metadata.c, reflection.c: Update to changes.
16424 2006-01-04 Raja R Harinath <rharinath@novell.com>
16426 * class-internals.h (_MonoGenericClass): Rename 'context' field to
16427 'cached_context', and change semantics -- it starts off NULL, and
16428 is initialized on demand.
16429 * class.c (mono_generic_class_get_context): New accessor to
16430 replace 'context' field accesses.
16431 (mono_class_get_context): New helper.
16432 (*): Update to changes.
16433 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
16435 2007-01-03 Miguel de Icaza <miguel@novell.com>
16437 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
16438 before the memcpy. Fixes Marshal2 regression.
16440 2007-01-02 Jb Evain <jbevain@gmail.com>
16442 * blob.h: add a MONO_TYPE_ENUM definition
16443 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
16444 fix the encoding of arrays of enums in custom attributes.
16448 2007-01-01 Miguel de Icaza <miguel@novell.com>
16450 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
16451 string is null terminated, but only cut the string short if it
16452 overflows the buffer.
16454 (mono_string_to_byvalstr): Also fix this routine. The code here
16455 was not properly terminating a string (it was only terminated
16456 because of the previous catch-all memset).
16458 I left the memset, because I do not know if applications expect
16459 the runtime to clear this region.
16463 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
16464 Clear the error before returning to unmanaged code to prevent the
16465 runtime from being confused later on (fixes 80420).
16466 (ves_icall_type_from_name): Always call mono_loader_clear_error
16467 after parsing a type that could have failed.
16468 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
16470 * loader.c (mono_loader_clear_error): Fix indentation.
16472 2006-12-28 Martin Baulig <martin@ximian.com>
16474 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
16476 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
16478 * reflection.c: patch from Rolf Bjarne Kvinge to fix
16479 getting a token for an EnumBuilder.
16481 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
16483 * reflection.c: be more careful in case resource generation
16484 fails to create the data array.
16486 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
16488 * sgen-gc.c: write barrier for clone and fix unregister handles.
16490 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
16492 * reflection.c: some fixes needed in the generics code for the moving GC.
16494 2006-12-22 Robert Jordan <robertj@gmx.net>
16496 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
16497 account. Fixes bug #80299.
16499 2006-12-21 Raja R Harinath <rharinath@novell.com>
16501 Fix WaitHandle usage in delegates.
16502 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
16503 * object.c (mono_wait_handle_new): Use the property set method to
16504 initialize the handle.
16505 (mono_wait_handle_get_handle): New.
16506 * threadpool.c (mono_async_invoke): Use it.
16507 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
16509 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
16511 2006-12-21 Jonathan Chambers <joncham@gmail.com>
16513 * marshal.c (emit_marshal): Call emit_marshal_variant and
16514 emit_marshal_com_interface when applicable.
16515 (emit_marshal_variant, emit_marshal_com_interface): Add
16516 methods for this case and remove if's from emit_marshal_object.
16518 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
16520 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
16522 2006-12-19 Jonathan Chambers <joncham@gmail.com>
16524 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
16525 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
16526 and GlobalFree on Windows. Remove FIXME.
16528 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
16530 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
16531 implementation for managed objects.
16533 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
16535 * object.c: implemented code to be used for checking
16536 that no reference field overlaps with non-references.
16538 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16540 * threadpool.c: fix queue code to be compatible with the
16543 2006-12-18 Miguel de Icaza <miguel@novell.com>
16545 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
16546 in structures by throwing ArgumentNullException.
16548 (emit_marshal_safehandle): Also when they are null parameters.
16550 (emit_marshal_safehandle): Add support for ref
16551 SafeHandles parameters
16553 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16555 * profiler.c: updated to use the mono-dl API instead of
16558 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16560 * profiler.c: updated to use the mono-dl dynamic loading
16561 API instead of gmodule.
16563 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
16565 * profiler.c: use readlink, older versions of glib don't have
16566 g_file_read_link ().
16568 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16570 * profiler.c: try to detect the path to mono if libc fails to provide
16571 a useful name (bug #80286).
16573 2006-12-16 Raja R Harinath <rharinath@novell.com>
16576 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
16577 instance, use the generic type definition instead.
16578 (ves_icall_Type_GetNestedTypes): Likewise.
16579 * class.c (mono_class_create_generic): Always set the
16580 nested_classes of a generic instance to NULL, even if the generic
16581 type definition has nested types.
16583 2006-12-15 Jonathan Chambers <joncham@gmail.com>
16585 * marshal.c (mono_string_from_bstr): Revert previous Windows change
16588 2006-12-15 Miguel de Icaza <miguel@novell.com>
16590 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
16591 my arguments were in the wrong order. I also fixed the Windows
16592 version which seems to have had the same issue.
16594 (mono_free_bstr): On Unix, this is g_free.
16595 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
16596 conversions (for the tests in corlib to pass).
16598 2006-12-14 Miguel de Icaza <miguel@novell.com>
16600 * marshal.c (emit_ptr_to_object_conv): For now, ignore
16601 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
16602 exception if a ref SafeHandle in a struct has changed).
16604 (emit_struct_conv): Do not perform layout checks for classes
16605 derived from SafeHandle, as those are specially handled.
16607 (emit_object_to_ptr_conv): Add support for
16608 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
16610 (emit_marshal_safehandle): Implement conversion of return values
16611 of safehandles (MARSHAL_ACTION_CONV_RESULT).
16613 * threads.c: WaitHandle now is compiled with two different handles
16614 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
16617 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
16618 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
16619 these routines to cope with both kinds of fields.
16621 2006-12-12 Miguel de Icaza <miguel@novell.com>
16623 * metadata.c (mono_type_to_unmanaged): Handle the case where
16624 type->data.klass is a SafeHandle, and in that case, return the
16625 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
16626 MONO_MARSHAL_CONV_SAFEHANDLE.
16628 2006-12-11 Miguel de Icaza <miguel@novell.com>
16630 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
16631 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
16632 calling emit_marshal_object.
16634 (emit_marshal_safehandle): Implement marshalling of
16635 SafeHandle parameters (no ref support yet).
16637 (MarshalAction): Document the defines as I implement
16638 them for SafeHandle.
16640 (emit_marshal_object): indentation police.
16642 * class-internals.h: Define MonoSafeHandle.
16643 Add safehandle_class to MonoDefaults type.
16645 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
16646 list of classes to check for fields.
16648 * domain.c (mono_init_internal): Add SafeHandle to the list of
16649 mono_defaults loaded.
16651 2006-12-15 Raja R Harinath <rharinath@novell.com>
16654 * reflection.c (mono_reflection_bind_generic_parameters): If the
16655 generic type definition is a type builder, ensure that it is fully
16656 initialized before instantiating it. Kill some dead code.
16658 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
16660 * object.c: clear the loader_error () before loading
16661 more metadata stuff (bug #80258).
16663 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
16665 * icall.c, icall-defs.h: type modifiers icalls for
16666 parameters and properties.
16668 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
16670 * object.c, icall.c: fixed warnings.
16672 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
16674 * marshal.c: fixed a couple of leaks and coding style in a few places.
16676 2006-12-08 Dick Porter <dick@ximian.com>
16678 * process.c: Cope with NULL ProcessStartInfo arguments on windows
16679 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
16682 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
16684 * process.c: ProcessStartInfo may have only filename set and
16685 arguments can be NULL.
16687 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16689 * icall.c: fix leak found by Robert Jordan.
16691 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
16693 * marshal.c, marshal.h: generate managed method to access an element
16694 of a multi-dimensional array.
16696 2006-11-30 Paolo Molaro (lupus@ximian.com)
16698 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
16700 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16702 * icall.c: back out GetFields () fix until the serialization code is
16703 fixed to not depend on the incorrect behaviour.
16705 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
16707 * profiler.c: provide defaults if none are set.
16709 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
16711 * Makefile.am, attrdefs.h: new public header file with
16712 constants for attributes for use by embedders.
16714 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
16716 * icall.c: GetFields () fix for bug #80064.
16718 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
16720 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
16721 removed long unused icalls.
16723 2006-11-27 Jonathan Chambers <joncham@gmail.com>
16726 (mono_marshal_emit_managed_wrapper): Level of indirection for
16727 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
16728 can be generated without a delegate class.
16729 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
16731 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
16733 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16735 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
16738 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16740 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
16741 icall-def.h: added icalls needed by System.GC.
16743 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
16745 * loader.c: ensure the class in catch clauses is handled
16746 correctly for generics methods (fixes bug#79980).
16748 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
16750 * monitor.h, monitor.c: added mono_locks_dump () function
16751 to help debug deadlocks involving managed locks.
16753 2006-11-13 Dick Porter <dick@ximian.com>
16755 * file-io.c (get_file_attributes): If the file is a symlink try
16756 and get the stat data for the target, but also add the
16757 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
16758 the specs for the windows symlink support, but will probably have
16759 to be reworked when I have test data from a vista machine. Fixes
16762 2006-11-13 Dick Porter <dick@ximian.com>
16764 * gc.c (mono_domain_finalize):
16765 * marshal.c (mono_delegate_begin_invoke):
16766 * threadpool.c (socket_io_init, mono_thread_pool_init)
16767 (mono_thread_pool_finish):
16768 * monitor.c (mono_monitor_try_enter_internal):
16769 * threads.c (mono_thread_resume, mono_thread_init)
16770 (mono_thread_suspend_all_other_threads)
16771 (mono_thread_execute_interruption):
16772 * appdomain.c (mono_domain_unload): Check for NULL error returns
16773 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
16776 2006-11-11 Miguel de Icaza <miguel@novell.com>
16779 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
16780 Only close the handle if the value of the handle is not
16781 INVALID_HANDLE_VALUE. This just makes the process a bit more
16784 Improvement for #75733, so that we do not run into this problem.
16787 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
16788 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
16789 internal variables. Fixes #79462
16792 2006-11-09 Dick Porter <dick@ximian.com>
16794 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
16795 Use poll() not select(). Fixes bug 79397.
16797 2006-11-09 Raja R Harinath <rharinath@novell.com>
16800 * assembly.c (mono_assembly_load_from_full): Check that the given
16801 image has an assembly manifest.
16803 2006-11-09 Ankit Jain <jankit@novell.com>
16805 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
16806 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
16807 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
16809 2006-11-07 Dick Porter <dick@ximian.com>
16811 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
16812 Put the old resolver behaviour back for pre-2.0 profiles.
16814 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
16816 * threadpool.c: precise GC and locking fixes.
16818 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
16820 * class.c: don't load types that have an explicit unaligned
16821 managed reference. Provide better info in the TypeLoad exception.
16822 Part of the fix for bug #79744.
16823 * object.c: use the correct check for class type load issues.
16825 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
16827 * class.c: enforce alignment of fields with managed references
16828 even when Pack=1 is forced by the user (bug #77788).
16830 2006-11-03 Dick Porter <dick@ximian.com>
16832 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
16833 If the address reverse lookup fails, return it as the hostname
16834 anyway. Fixes bug 79721.
16836 2006-11-03 Dick Porter <dick@ximian.com>
16838 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
16839 Fix build on Windows.
16841 2006-11-02 Dick Porter <dick@ximian.com>
16844 * object-internals.h:
16845 * exception.c (mono_get_exception_thread_interrupted):
16846 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
16849 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
16850 Check for pending Thread.Interrupt.
16852 2006-10-27 Massimiliano Mantione <massi@ximian.com>
16853 * loader.c: Fixed bug 79684.
16855 2006-10-27 Dick Porter <dick@ximian.com>
16857 * file-io.c (get_file_attributes): Force symlinks to directories
16858 to be returned as a regular file. Fixes bug 79733.
16859 2006-10-26 Dick Porter <dick@ximian.com>
16861 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
16862 CreateFile to open a directory then we need to set the
16863 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
16865 2006-10-23 Zoltan Varga <vargaz@gmail.com>
16867 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
16870 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
16872 * sgengc.c: small cleanup of timer code.
16874 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
16876 * sgen-gc.c: fix some warnings and start adding support for
16877 complete object removal on domain unload.
16879 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
16881 * assembly.c: build_assembly_name should not consider a version
16882 number without build or revision number invalid. Fixes bug #79715.
16884 2006-10-18 Jonathan Chambers <joncham@gmail.com>
16886 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
16887 call kernel32 function OutputDebugString directly.
16889 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
16891 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
16893 * reflection.c: small cleanup, using a function to insert a MonoString
16894 in the string heap.
16896 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
16898 * reflection.c: moving GC fixes.
16900 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
16902 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
16903 all the objects with finalizers belonging to an unloading appdomain.
16905 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
16907 * sgen-gc.c: added ability to allocate even when the nursery is fully
16908 pinned and fixed a couple of bugs.
16910 2006-10-15 Zoltan Varga <vargaz@gmail.com>
16912 * threads.h: Revert the last change for now.
16914 * threads.h (mono_thread_get_pending_exception): Rename this to
16915 mono_thread_get_undeniable_exception ().
16917 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
16919 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
16920 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
16921 when fname does not refer to valid assembly. This result in a more
16922 meaningful error message.
16923 * exception.c: added mono_get_exception_bad_image_format2 which
16924 constructs a BadImageFormatException using the ctor taking a custom
16925 message and the file name. Passing in a NULL msg results in a default
16927 * exception.h: define mono_get_exception_bad_image_format2 function.
16928 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
16929 when file name pointed to an invalid IL image. Use
16930 mono_get_exception_file_not_found2 to construct FileNotFoundException,
16931 as this results in a more meaningful error message.
16933 2006-10-15 Zoltan Varga <vargaz@gmail.com>
16935 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
16938 2006-10-12 Zoltan Varga <vargaz@gmail.com>
16940 * metadata.c (mono_type_size): Change the align parameter to guint32 for
16941 consistency with the other _size functions.
16942 (mono_type_stack_size): Ditto.
16944 * class.c object.c icall.c: Fix warnings caused by the above change.
16946 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
16948 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
16950 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
16952 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
16954 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
16955 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
16956 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
16957 threadpool.h, threads-types.h: mark more internal functions.
16959 2006-10-11 Dick Porter <dick@ximian.com>
16961 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
16962 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
16963 reproduce the bug even before applying the fix.)
16965 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
16967 * reflection.c: allow retrieving attributes for arguments in generic
16968 methods (bug #79241).
16970 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
16972 * debug-mono-symfile.c: properly check fopen () result (found by
16975 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
16977 * reflection.c: make error message clearer and fixed two
16978 issuelets found by Coverity.
16980 2006-10-10 Zoltan Varga <vargaz@gmail.com>
16982 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
16984 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
16986 * object-internals.h, gc-internal.h, profiler-private.h:
16987 mark internal functions.
16989 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
16991 * reflection.c: put data in the text section.
16992 * icall.c: recognize more types in type_from_typename ().
16993 * process.c, marshal.c: added some GC FIXMEs.
16995 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
16997 * loader.c: check for NULL before initializing.
16999 2006-10-09 Zoltan Varga <vargaz@gmail.com>
17001 * gc.c (finalizer_thread): Use a non-alertable wait here.
17003 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
17004 until the correct solution is found.
17006 2006-10-06 Zoltan Varga <vargaz@gmail.com>
17008 * reflection.c (mono_module_get_object): Avoid an assert when operating on
17009 modules with no metadata. Fixes #79596.
17011 * image.c (load_metadata_ptrs): Put back the error message when
17012 the #- heap is encountered since the support is not complete yet.
17014 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
17016 * gc.c: do not allow the user to SuppressFinalize () a
17017 delegate because it would leak the trampoline if present.
17019 2006-10-06 Zoltan Varga <vargaz@gmail.com>
17021 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
17024 2006-10-05 Zoltan Varga <vargaz@gmail.com>
17026 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
17028 * metadata.c (mono_metadata_get_param_attrs): Ditto.
17030 * row-indexes.h: Add definitions for *Ptr tables.
17032 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
17034 * metadata.c (mono_metadata_translate_token_index): New helper function to
17035 translate table indexes used in uncompressed metadata.
17036 (mono_metadata_decode_table_row): Ditto.
17037 (mono_metadata_decode_table_row_col): Ditto.
17039 * metadata.c: Add table schema for *Ptr tables.
17041 * class.c loader.c: Use the new helper function to access the affected metadata
17044 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
17047 2006-10-04 Zoltan Varga <vargaz@gmail.com>
17049 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
17050 sequences which can be unbounded in size. Fixes #79583.
17052 2006-10-02 Zoltan Varga <vargaz@gmail.com>
17054 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
17055 static initialization.
17057 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
17059 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
17061 * domain.c (mono_domain_free): Free up type_init_exception_hash.
17063 * object.c (mono_runtime_class_init): Implement correct semantics when a static
17064 ctor fails, i.e. throw the same exception on subsequent accesses.
17066 2006-09-0 Jonathan Chambers <joncham@gmail.com>
17068 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
17069 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
17070 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
17071 Handle marshalling of interfaces and VARIANTs contained in structs.
17073 Code is contributed under MIT/X11 license.
17075 2006-09-30 Zoltan Varga <vargaz@gmail.com>
17077 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
17079 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
17082 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17084 * console-io.c: ignore previous SIGINT handler.
17086 2006-09-27 Zoltan Varga <vargaz@gmail.com>
17088 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
17089 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
17090 #79460, #79461, #79485.
17092 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
17094 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
17097 2006-09-26 Zoltan Varga <vargaz@gmail.com>
17099 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
17100 could be generated from it.
17102 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
17104 * rand.c: fix read loop to correctly handle EINTR.
17106 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
17108 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
17109 internal calls are defined to keep methods closer to the declaring
17110 type and allow a significant reduction in runtime relocations and
17113 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
17115 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
17116 exception message to have FileNotFoundException use the default
17117 assembly load error message. Fixes bug #79426.
17118 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
17120 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17122 * threadpool.c: (start_thread_or_queue) use the root domain when
17123 creating the thread instead of the async object one.
17125 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
17127 * class.c, object.c, class-internals.h, reflection.c:
17128 for arrays, store element_size inside MonoClass (speedup
17129 for array object creation).
17131 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
17133 * icall.c: fixed CodeBase to use the file name and not the module
17136 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
17138 * mono-debug.c, mono-debug.h: export find_method as
17139 mono_debug_find_method ().
17141 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
17143 * debug-helpers.c, class-internals.h: added a few functions useful
17144 when debugging under gdb.
17146 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17148 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
17149 characters that need special handling.
17151 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
17153 * mono-config.c: make the os/cpu specification more flexible,
17154 allowing lists and negation.
17156 2006-09-18 Jonathan Chambers <joncham@gmail.com>
17158 * marshal.c: COM Interop fixes. Handle case where method->klass.
17159 is interface. Handle BSTR/MonoString when null. Use CDECL as
17160 calling convention on non-windows platforms. This is for
17161 compatibility with XPCOM and MainWin COM.
17163 Code is contributed under MIT/X11 license.
17166 2006-09-18 Zoltan Varga <vargaz@gmail.com>
17168 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
17169 correctly. Fixes #79217.
17171 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
17173 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
17175 * mono-config.c: allow both an os and cpu attribute for dllmap
17176 and dllentry elemnets to enable a single config file to be used
17177 for multiple architectures.
17179 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
17181 * loader.c: MonoLoaderError was cleared too soon on load failure.
17184 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
17186 * icall.c: use the defining class vtable when accessing a
17187 static field, not a pobblibly derived class.
17189 2006-09-17 Zoltan Varga <vargaz@gmail.com>
17191 * icall.c string-icalls.c: Remove references to unicode.h.
17193 * unicode.h unicode.c Makefile.am: Remove these unused source files.
17195 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
17197 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
17198 indicating the image where custom marshaller types should be looked up.
17199 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
17200 custom marshallers, instead of corlib. Fixes #79425.
17202 2006-09-14 Zoltan Varga <vargaz@gmail.com>
17204 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
17206 2006-09-14 Jonathan Chambers <joncham@gmail.com>
17208 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
17209 Implement Environment.ProcessorCount.
17211 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
17212 Implement Environment.ProcessorCount.
17215 Add Environment.ProcessorCount icall.
17217 Patch by Jason McFall.
17219 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17221 * assembly.c: don't append .exe/.dll when the filename already contains
17222 one of those extensions.
17224 2006-09-12 Martin Baulig <martin@ximian.com>
17226 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
17227 to array interfaces.
17229 2006-09-11 Martin Baulig <martin@ximian.com>
17231 * reflection.c (mono_image_build_metadata): Create the
17232 MethodImpl's after emitting all types and methods, so we don't
17233 need another fixup pass for them.
17235 2006-09-11 Zoltan Varga <vargaz@gmail.com>
17237 * class.c (mono_class_from_name_case): Fix regression introduced by the last
17240 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
17242 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
17245 2006-09-10 Zoltan Varga <vargaz@gmail.com>
17247 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
17248 args is not set. Fixes #78926.
17250 2006-09-08 Zoltan Varga <vargaz@gmail.com>
17252 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
17254 * image.c (load_class_names): Move this to class.c, and rename it to
17255 'mono_image_init_name_cache'.
17256 (load_modules): Fix a warning.
17258 * class.c icall.c image.c: Initialize image->name_cache lazily.
17260 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
17261 on its name using information in the AOT file.
17263 * class.c (mono_class_from_name): Use the new hook function.
17265 2006-09-06 Zoltan Varga <vargaz@gmail.com>
17267 * reflection.c (mono_param_get_objects): Handle enum default parameter values
17270 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
17273 2006-09-06 Martin Baulig <martin@ximian.com>
17275 * icall.c (mono_lookup_internal_call): Small fix.
17277 2006-09-05 Raja R Harinath <rharinath@novell.com>
17279 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
17282 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
17284 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
17285 when --debug is specified.
17287 2006-09-04 Zoltan Varga <vargaz@gmail.com>
17289 * class.c (setup_generic_array_ifaces): Fix a warning.
17291 2006-09-04 Miguel de Icaza <miguel@novell.com>
17293 * Temporarily remove the patch to assemly.c that checks the
17294 assembly versions as it breaks our gacutil.
17296 2006-09-03 Zoltan Varga <vargaz@gmail.com>
17298 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
17300 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
17303 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
17304 created using the default ctor. Fixes #79152.
17305 (mono_string_builder_to_utf16): Ditto.
17307 2006-09-01 Martin Baulig <martin@ximian.com>
17309 Fix handling of the generic array interfaces.
17311 * class-internals.h
17312 (MonoDefaults): Removed `generic_array_class' and added
17313 `generic_ilist' class.
17316 (mono_bounded_array_class_get): Add the new generic array interfaces.
17317 (setup_generic_array_ifaces): New static method; create vtable
17318 entries for each method in the generic array interfaces.
17321 (select_container): Allow "parent-less" generic methods.
17324 (mono_marshal_get_generic_array_helper): New public method.
17327 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
17328 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
17329 moved the interncall into System.Array.
17331 2006-09-01 Raja R Harinath <rharinath@novell.com>
17333 A few more cases of avoiding work on types with ->byref set.
17334 Has the real fix for #79238
17335 * icall.c (is_generic_parameter): New helper.
17336 (ves_icall_Type_GetGenericParameterPosition): Use it.
17337 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
17338 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
17339 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
17340 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
17342 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
17344 (ves_icall_Type_get_IsGenericInstance): Likewise.
17345 (ves_icall_Type_get_IsGenericType): Likewise.
17347 2006-09-01 Zoltan Varga <vargaz@gmail.com>
17349 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
17352 * mempool.h (mono_mempool_get_allocated): New helper function.
17354 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
17357 * mempool.c: Fix warnings and the calculation of stats.
17359 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
17361 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
17363 * loader.c (mono_get_method_from_token): Update method_count stat.
17365 * class-internals.h (MonoStats): Add some stats.
17367 2006-08-31 Robert Jordan <robertj@gmx.net>
17369 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
17370 with managed variants.
17371 All code is contributed under the MIT/X11 license.
17373 2006-08-31 Zoltan Varga <vargaz@gmail.com>
17375 * reflection.c (reflection_methodbuilder_to_mono_method): Set
17376 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
17378 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
17380 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
17381 with cycles in classes.
17383 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
17385 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
17386 missing a [MarshalAs] directive. Fixes #79203.
17388 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
17389 klass->marshal_info. Fixes #79217.
17391 2006-08-30 Martin Baulig <martin@ximian.com>
17393 Committing a patch from Joachim Ante <joe@otee.dk>:
17394 Add support for binary data symbol stores.
17396 * debug-mono-symfile.c
17397 (mono_debug_open_mono_symbol_file): Renamed into
17398 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
17402 (mono_debug_open_image): Added `raw_contents' and `size' args.
17403 (mono_debug_init_2_memory): New public function.
17405 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
17407 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
17409 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17411 * appdomain.c: implement support for ShadowCopyFiles.
17413 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
17415 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
17416 when value is NULL (and should remove CID #51).
17418 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17420 * image.c: moved 2 functions to ../utils.
17422 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
17424 * gc.c: cope with the target object of a GC handle being NULL
17427 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
17429 * class.c: recursively check parent's explicit implementations
17430 of interface methods (fixes bug #79125).
17432 2006-08-19 Miguel de Icaza <miguel@novell.com>
17434 * filewatcher.c: Avoid warnings when building, do not redefine
17435 constants that are defined.
17439 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17441 * image.c: don't fail when the link points to an absolute path.
17443 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
17445 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
17448 2006-08-17 Miguel de Icaza <miguel@novell.com>
17450 * image.c (full_path): A new method used to obtain the actual path
17451 of an assembly even in the presence of symbolic links.
17453 This is necessary for the case where we are running a binary that
17454 has been GACed, but we are using the "published" path name
17455 ($prefix/mono/1.0/blah.exe) which happens to point to the real
17458 This was the source of the failure for the `xsp' command with the
17459 recent AppDomain changes, as far as the runtime was concerned,
17460 there were two different assemblies: $prefix/mono/1.0/blah.exe and
17461 $prefix/mono/gac/blah/version/blah.exe.
17463 (do_mono_image_open): use full path
17465 2006-08-17 Zoltan Varga <vargaz@gmail.com>
17467 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
17469 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
17471 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
17472 domain_id is supplied. Fix CID #241 and corlib's unit tests.
17474 2006-08-17 Zoltan Varga <vargaz@gmail.com>
17476 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
17477 small structures. Fixes #78990.
17479 2006-08-17 Zoltan Varga <vargaz@gmail.com>
17481 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
17483 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
17485 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17488 * marshal.c: don't load all the assemblies from a domain into newly
17489 created ones. The new domains might have different rules and load
17490 assemblies from different locations. Fixes bug #76757.
17492 Patch by Lluis. Conflicts resolved by Brian Crowell.
17494 2006-08-16 Alp Toker <alp@atoker.com>
17496 * socket-io.c: First half of the fix for #79084.
17497 Set sa_size to the length of the content, not that of the struct.
17498 Don't add NULL suffix to the content, this should be done in
17499 managed code if needed.
17501 2006-08-14 Raja R Harinath <rharinath@novell.com>
17504 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
17505 mono_metadata_parse_type returns NULL.
17507 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
17509 * normalization-tables.h : new file for string normalization data.
17510 * locales.c, locales.h, icall.c :
17511 added load_normalization_resource() for string normalization,
17513 * Makefile.am : added normalization-tables.h to the sources.
17515 2006-08-13 Zoltan Varga <vargaz@gmail.com>
17517 * marshal.c: Add more helper functions to reduce code duplication and use them
17520 2006-08-12 Zoltan Varga <vargaz@gmail.com>
17522 * marshal.c: Fix non-x86 stdcall warnings.
17524 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
17527 2006-08-11 Jonathan Chambers <joncham@gmail.com>
17529 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
17530 type check on multi-dimensional arrays. Fixes #79000.
17532 2006-08-10 Jonathan Chambers <joncham@gmail.com>
17534 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
17535 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
17536 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
17537 * class-internals.h: add is_com_object to class structure.
17538 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
17539 null checks to COM object marshalling. Fix .ctor call on RCW.
17540 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
17542 All code is contributed under the MIT/X11 license.
17544 2006-08-09 Dick Porter <dick@ximian.com>
17546 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
17547 racing mono_monitor_allocator_lock() somewhere, so don't delete
17548 the critical section for now. Found by running and exiting
17551 2006-08-10 Zoltan Varga <vargaz@gmail.com>
17553 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
17554 (ves_icall_System_ComObject_FindInterface): Ditto.
17555 (ves_icall_System_ComObject_CacheInterface): Ditto.
17557 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
17558 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
17560 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17562 * threadpool.c: treat pipes from process asynchronous reads as sockets
17563 when reading from them, so we get select/poll or epoll to wait for
17566 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
17568 * loader.c: Fix a typo (CID #233) in the null check.
17570 2006-08-07 Zoltan Varga <vargaz@gmail.com>
17572 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
17573 Hopefully fixes #78949.
17575 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
17576 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
17577 bytes. Fixes #78972.
17579 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17581 * filewatcher.c: we need to set errno here.
17583 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17585 * filewatcher.c: let Win32Exception get the error value.
17587 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17589 * filewatcher.c: translate errno into win32 errors for Win32Exception
17590 to know what happened.
17592 2006-08-01 Zoltan Varga <vargaz@gmail.com>
17594 * threadpool.c: Fix more warnings.
17596 * assembly.c (search_loaded): Fix warnings.
17598 * threadpool.c (mono_thread_pool_finish): Fix warnings.
17599 (mono_async_invoke): Ditto.
17601 2006-07-28 Jonathan Chambers <joncham@gmail.com>
17603 * object.c (mono_remote_class_vtable): Need to create proxy vtable
17604 entries for __ComObject type in addition to ComImport types.
17605 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
17608 All code is contributed under the MIT/X11 license.
17610 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
17612 * image.c: avoid tentative loading of modulerefs that contain
17613 no metadata (P/Invoke library names).
17615 2006-07-28 Dick Porter <dick@ximian.com>
17617 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
17618 mono_loader_lock() somewhere, so don't delete the critical section
17619 for now. Found by running and exiting monodevelop.
17621 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17623 * filewatcher.c: define the inotify syscalls when we're building on
17624 linux and have sys/syscall.h. The build system might not have support
17625 for inotify but the target system might have it.
17627 2006-07-26 Miguel de Icaza <miguel@novell.com>
17629 * domain.c: Documentation updates.
17631 * loader.c (mono_free_method): Do not release the method
17632 information if we are being profiled, as profilers will use this
17633 information at shut down to present some data to the user.
17635 This is needed so that the profiler does not crash, as the
17636 profiler tends to keep MonoMethods around, and they might become
17637 invalid if we free these.
17639 (mono_get_method_constrained): Return the original CIL stream
17640 method as well, so verification can be performed against it.
17642 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17644 * filewatcher.[ch]: support for inotify file system watcher.
17645 * icall.c: add new internal calls for the inotify file system watcher.
17647 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17649 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
17652 2006-07-20 Dick Porter <dick@ximian.com>
17654 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
17657 2006-07-20 Dick Porter <dick@ximian.com>
17659 * threads.c (start_wrapper): Do the thread cleanup while we still
17660 hold a reference to its object. Fixes bug 78123.
17662 2006-07-18 Kornél Pál <kornelpal@gmail.com>
17664 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
17665 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
17666 "managed-to-managed".
17667 * icall.c: Redirect string constructors that take sbyte* to
17668 ves_icall_System_String_ctor_RedirectToCreateString.
17669 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
17670 to CreateString () methods with matching signature.
17671 * reflection.c: Use original security informations for
17672 MONO_WRAPPER_MANAGED_TO_MANAGED.
17673 * security-manager.c: Use original security informations for
17674 MONO_WRAPPER_MANAGED_TO_MANAGED.
17675 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
17676 that is a placeholder and only its address should be used.
17677 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
17678 that is a placeholder and only its address should be used.
17680 2006-07-15 Jonathan Chambers <joncham@gmail.com>
17682 Begin implementing COM Interop.
17683 * appdomain.c: Increment corlib version.
17684 * class.c: Set ComImport classes' parent to __ComObject.
17685 * loader.c: Mark cominterop methods as such.
17686 * domain.c: Add __ComObject class to MonoDefaults structure.
17687 * image.c: Add 2 hashtables to the image for COM Interop related methods
17688 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
17689 using the mempool allocator
17691 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
17692 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
17693 declaration for mono_metadata_type_dup_mp.
17695 * debug-helpers.c: Added strings for two additional wrapper types
17696 * object.c: Create proxy objects for ComImport classes
17697 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
17698 and added __ComObject class to MonoDefaults structure.
17700 * object-internals.h: Finish MonoRealProxy definition, and add definition of
17701 MonoComInteropProxy and MonoComObject.
17703 * marshal.c: Added support for COM Interop
17704 (signature_cominterop): Converts managed signature to corresponding
17705 unmanaged COM signature.
17706 (cominterop_get_function_pointer): gets unmanaged function pointer via
17708 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
17709 (cominterop_get_method_interface): returns interface type that method is defined on
17710 (mono_mb_emit_cominterop_call): emits native call to function pointer
17712 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
17713 that matches signature of unmanaged function.
17714 (cominterop_get_native_wrapper): wrapper around adjusted method call.
17715 (cominterop_get_invoke): forwards call from proxy to __ComObject
17716 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
17717 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
17718 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
17720 * marshal.h: Added Marshal icall declarations.
17721 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
17722 so we can access them in finalizer
17724 2006-07-14 Dick Porter <dick@ximian.com>
17726 * object.c (mono_type_initialization_cleanup): Fix a race
17727 condition by temporarily commenting out the critical section
17730 2006-07-14 Zoltan Varga <vargaz@gmail.com>
17732 * reflection.c (create_custom_attr): Fix some warnings.
17733 (create_custom_attr_data): Ditto.
17734 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
17735 types. Fixes #78855.
17737 2006-07-11 Zoltan Varga <vargaz@gmail.com>
17739 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
17741 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
17743 2006-07-08 Zoltan Varga <vargaz@gmail.com>
17745 * reflection.c (resolve_object): Add support for DynamicMethod.
17747 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
17748 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
17750 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
17752 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
17753 don't leak GPtrArray's pdata has we have no use (nor free) for it.
17755 2006-07-01 Zoltan Varga <vargaz@gmail.com>
17757 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
17760 2006-06-30 Raja R Harinath <rharinath@novell.com>
17762 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
17763 slightly: remove a shadow local variable.
17765 2006-06-29 Raja R Harinath <rharinath@novell.com>
17767 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
17768 definition that introduces the virtual function slot.
17769 Also fix Coverity #105.
17771 2006-06-29 Zoltan Varga <vargaz@gmail.com>
17773 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
17774 for dynamic assemblies. Fixes #78724.
17776 2006-06-28 Zoltan Varga <vargaz@gmail.com>
17778 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
17781 2006-06-21 Martin Baulig <martin@ximian.com>
17784 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
17787 2006-06-21 Zoltan Varga <vargaz@gmail.com>
17789 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
17791 2006-06-20 Raja R Harinath <rharinath@novell.com>
17793 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
17795 * class.c (mono_class_create_from_typespec): Add 'context' argument.
17796 Inflate result if necessary.
17797 (mono_class_get_full): Remove old version. Rename from
17798 'mono_class_get' and add 'context' argument. Pass it to
17799 ..._create_from_typespec.
17800 (mono_class_get): New. Simple wrapper to mono_class_get_full.
17801 (mono_ldtoken): Revert change below.
17803 2006-06-20 Martin Baulig <martin@ximian.com>
17805 * class.c (mono_ldtoken): Don't pass the generic context to
17806 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
17808 2006-06-15 Zoltan Varga <vargaz@gmail.com>
17810 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
17811 and later freeing it. Fixes #78638.
17813 2006-06-15 Miguel de Icaza <miguel@novell.com>
17815 * icall.c (mono_class_get_throw): Revert over-zealous error
17816 throwing, the caller for mono_class_get_throw will cope with
17817 errors when classes are not properly initialized already.
17819 The code still copes with loader exceptions though.
17821 Fixes the regression in reftype1 and reftype3 from the CAS tests.
17823 2006-06-14 Miguel de Icaza <miguel@novell.com>
17825 Fixes the `make run1' version of RuntimeAbort (to be commited,
17826 source is in Bugzilla).
17828 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
17829 FALSE on class loading failure instead of returning true.
17831 * class.c (mono_class_create_from_typedef): It is possible for
17832 mono_metadata_interfaces_from_typedef_full to fail if a class is
17833 not found, cope with this.
17836 2006-06-14 Dick Porter <dick@ximian.com>
17839 * process.c: Fix a bunch of signed/unsigned warnings from gcc
17842 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
17844 * culture-info-table.h : oops, forgot to make it nsync with r61548.
17846 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
17848 * icall.c: Another fix for building mono in Visual Studio.
17850 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
17852 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
17854 2006-06-09 Martin Baulig <martin@ximian.com>
17856 * debug-mono-symfile.c: Put this back and really fix it this
17857 time. Sorry for all the trouble.
17859 2006-06-08 Zoltan Varga <vargaz@gmail.com>
17861 * icall.c (mono_class_get_throw): Fix a warning.
17862 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
17863 ReflectionTypeLoadException if needed. Fixes #78606.
17865 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
17866 (mono_class_init): Ditto.
17868 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
17869 ref_only exceptions.
17870 (mono_loader_clear_error): Make this work even if there is no error.
17872 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
17874 * object-internals.h marshal.c marshal.h icall.c: Implement method
17875 Marshal.GetComSlotForMethodInfo using internal call.
17877 2006-06-07 Zoltan Varga <vargaz@gmail.com>
17879 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
17880 a function for signalling it.
17882 * class.c (mono_class_from_typeref): Use the new kind of loader error when
17883 a referenced assembly is not found.
17885 * loader.c (mono_loader_error_prepare_exception): Add support for
17886 LOADER_ERROR_ASSEMBLY. Fix formatting.
17888 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
17890 * domain.c appdomain.c class-internals.h marshal.c: Add support
17891 for VARIANT marshalling on windows and increment corlib version
17892 since Variant struct was added.
17894 2006-06-03 Miguel de Icaza <miguel@novell.com>
17896 * debug-mono-symfile.c: Revert Martin's previous patch which broke
17897 stack trace line information:
17899 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
17900 (Martin) when looking up B which is between A and C, return A not C.
17904 Thanks to Alexander Olk for tracking this down.
17906 2006-06-02 Zoltan Varga <vargaz@gmail.com>
17908 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
17910 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
17911 avoid clobbering its value.
17912 (mono_string_to_lpstr): Fix a warning on windows.
17914 2006-05-31 Zoltan Varga <vargaz@gmail.com>
17916 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
17918 * reflection.c loader.c: Removed references to 'dummy' flag.
17920 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
17922 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
17923 it gets GC tracking.
17925 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
17928 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
17930 * marshal.c threadpool.c: Update callers of mono_async_result_new.
17932 * appdomain.c: Bump corlib version.
17934 2006-05-30 Zoltan Varga <vargaz@gmail.com>
17936 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
17937 CEE_STIND_REF when working with object references.
17939 2006-05-31 Zoltan Varga <vargaz@gmail.com>
17941 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
17944 2006-05-30 Miguel de Icaza <miguel@novell.com>
17946 * loader.c (method_from_memberref): Fix argument value for
17947 mono_loader_set_error_method_load (I was passing the MonoClass
17948 instead of the class name char *).
17950 2006-05-30 Zoltan Varga <vargaz@gmail.com>
17952 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
17953 CEE_STIND_REF when working with object references.
17955 2006-05-30 Martin Baulig <martin@ximian.com>
17957 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
17958 mono_method_full_name() change and replace the ':' with a '.'
17961 2006-05-30 Martin Baulig <martin@ximian.com>
17963 * debug-mono-symfile.c
17964 (mono_debug_symfile_lookup_location): Fix the algorithm:
17965 when looking up B which is between A and C, return A not C.
17967 2006-05-29 Martin Baulig <martin@ximian.com>
17970 (MonoDebugMethodInfo): Make the typedef public.
17971 (MonoDebugSourceLocation): New public struct.
17974 (mono_debug_source_location_from_address): Removed.
17975 (mono_debug_source_location_from_il_offset): Removed.
17976 (mono_debug_il_offset_from_address): Removed.
17977 (mono_debug_address_from_il_offset): Removed.
17978 (mono_debug_lookup_method): New public function.
17979 (mono_debug_lookup_source_location): New public function; replaces
17980 the old mono_debug_source_location_from_*() functions; see the
17981 inline documentation.
17982 (mono_debug_free_source_location): New public function.
17983 (mono_debug_print_stack_frame): New public function; see the
17984 inline documentation.
17986 * debug-mono-symfile.c
17987 (mono_debug_find_source_location): Renamed into
17988 mono_debug_symfile_lookup_location(); only take a
17989 `MonoDebugMethodInfo *' and an `offset' argument; added inline
17991 (mono_debug_find_method): Renamed into
17992 mono_debug_symfile_lookup_method().
17994 2006-05-27 Zoltan Varga <vargaz@gmail.com>
17996 * assembly.c (mono_assembly_open_full): Dont overwrite the status
17997 returned by mono_image_open_full ().
17999 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
18000 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
18003 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
18006 2006-05-27 Miguel de Icaza <miguel@novell.com>
18008 * class.c (mono_class_from_typeref): handle missing images
18009 earlier, deals with bug #78418. Refactor code;
18011 Fix a warning introduced in my previous commit (some stale code
18012 from before I revisited my patch).
18014 * class.c (mono_class_create_from_typedef): On failure, remove the
18015 class from the MonoImage->class_cache as the class is not
18016 initialized; Fixes the leak pointed out by Paolo.
18018 2006-05-25 Dick Porter <dick@ximian.com>
18020 * threads.c (mono_thread_cleanup): Build fix. Comment out the
18021 DeleteCriticalSections until I figure out which one may still be
18022 sometimes locked when mono_thread_cleanup is called.
18024 2006-05-24 Dick Porter <dick@ximian.com>
18026 * threads.c (mono_thread_cleanup): Move the threading cleanup out
18027 of mono_thread_manage and back into its own function, so it can be
18028 called after the finalizer thread has finished.
18030 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
18032 2006-05-24 Zoltan Varga <vargaz@gmail.com>
18034 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
18037 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
18038 with non-blittable elements.
18039 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
18041 2006-05-24 Martin Baulig <martin@ximian.com>
18043 * mono-debug-debugger.h (MonoDebuggerEvent): Added
18044 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
18046 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
18047 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
18048 `mono_debugger_event_handler' to NULL.
18050 2006-05-24 Martin Baulig <martin@ximian.com>
18052 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
18054 2006-05-24 Martin Baulig <martin@ximian.com>
18056 * mono-debug-debugger.h
18057 (mono_debugger_create_notification_function): Added
18058 `MonoCodeManager *' argument.
18060 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
18062 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
18064 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
18066 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
18067 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
18070 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
18072 * icall.c: precise GC support: objects can't be stored in unmanaged
18073 memory anymore, even if they are kept alive by other references: since
18074 they can move the GC needs to be able to always find them.
18076 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
18078 * object.c: precise GC support for static fields. Support
18079 for moving GCs: write barriers and pinned allocation for interned
18082 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
18084 * domain.c, domain-internals.h: precise GC support for the MonoDomain
18087 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
18089 * class.c, gc.c: sgen and precise GC updates.
18091 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
18093 * marshal.h, marshal.c: added write barrier wrapper and precise type
18096 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
18098 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
18101 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
18103 * reflection.c: precise and sgen GC updates.
18105 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
18107 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
18109 2006-05-22 Zoltan Varga <vargaz@gmail.com>
18111 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
18113 2006-05-20 Zoltan Varga <vargaz@gmail.com>
18115 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
18116 MONO_TYPE_OBJECT. Fixes #78462.
18118 2006-05-18 Zoltan Varga <vargaz@gmail.com>
18120 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
18121 and blittable types.
18123 2006-05-17 Miguel de Icaza <miguel@novell.com>
18125 * class.c (mono_class_get_exception_for_failure): Implement parts
18126 of a TODO: if the loader error is set (instead of the class
18127 error), we return a Loader exception that can be properly thrown
18130 This was exposed by some Winforms 2.0 code that I tried to run
18131 (Atsushi pointed me to it).
18133 2006-05-17 Zoltan Varga <vargaz@gmail.com>
18135 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
18136 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
18138 * marshal.c (emit_marshal_vtype): Add limited support for
18139 UnmanagedType.LPStruct. Fixes #78427.
18141 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
18142 Applied a patch from kangaroo to fix #77523.
18144 2006-05-17 Martin Baulig <martin@ximian.com>
18147 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
18148 (debugger_thread_created): Removed.
18149 (debugger_thread_exited): Removed.
18151 2006-05-15 Zoltan Varga <vargaz@gmail.com>
18153 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18155 * object-internals.h (MonoReflectionResource): Sync with managed version.
18157 2006-05-12 Wade Berrier <wberrier@novell.com>
18159 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
18161 2006-05-12 Zoltan Varga <vargaz@gmail.com>
18163 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
18164 functions try to allocate from the image mempool.
18166 2006-05-12 Dick Porter <dick@ximian.com>
18168 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
18170 2006-05-12 Lluis Sanchez <lluis@ximian.com>
18172 * object.c: The FieldGetter and FieldSetter methods require the full
18173 name of the class, not only the name. Fixes bug #78277.
18175 2006-05-11 Miguel de Icaza <miguel@novell.com>
18177 * loader.c (method_from_memberref): Do not pass the NULL klass to
18178 mono_loader_set_error_() methods. Pass the non-NULL value
18181 2006-05-11 Zoltan Varga <vargaz@gmail.com>
18183 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
18184 (mono_assembly_close): Null out assembly->image->references after freeing it.
18186 * image.c (mono_image_close): Free image->references.
18188 * reflection.c (mono_image_basic_init): Fix a small memory leak.
18190 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
18192 * marshal.c: In function mono_mb_add_local don't use the mb pointer
18193 before checking if it's NULL (g_assert).
18195 2006-05-10 Martin Baulig <martin@ximian.com>
18197 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
18198 I thought I already killed that two months ago, but now it somehow reappeared.
18200 2006-05-10 Martin Baulig <martin@ximian.com>
18202 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
18204 2006-05-10 Zoltan Varga <vargaz@gmail.com>
18206 * reflection.c: Allocate memory for dynamically created methods in the image
18209 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
18211 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
18212 don't use the ad pointer before checking if it's NULL (g_assert).
18214 2006-05-09 Zoltan Varga <vargaz@gmail.com>
18216 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
18217 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
18219 * marshal.c: Allocate all signatures from mempools.
18221 * marshal.c: Allocate some more signatures from mempools.
18223 2006-05-09 Miguel de Icaza <miguel@novell.com>
18225 * object.c (mono_load_remote_field): The code used to provide a
18226 temporary variable for returning results if the user did not
18227 provide a result pointer. But our temporary variable was allocted
18230 Fix calling code to always pass a result area. Coverity ID 103.
18232 2006-05-06 Zoltan Varga <vargaz@gmail.com>
18234 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
18235 value, not the old. Fixes #78312.
18236 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
18238 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
18239 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
18242 * assembly.c (mono_assembly_close): Free image->references.
18244 * assembly.c (mono_assembly_names_equal): Fix a warning.
18245 (mono_assemblies_cleanup): Cleanup more global data.
18247 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
18249 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
18250 ptr_cache and image->modules.
18252 * image.c (mono_image_init): Allocate array_cache lazily.
18254 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18256 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
18257 behavior was changed recently and has bad side effects.
18259 2006-05-05 Zoltan Varga <vargaz@gmail.com>
18261 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
18263 * assembly.c (mono_assembly_close): Remove a debug printf.
18265 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
18267 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
18268 to also allow for temporary references between mono_image_open ()/close ().
18270 * domain.c (get_runtimes_from_exe): Add a FIXME.
18272 2006-05-04 Zoltan Varga <vargaz@gmail.com>
18274 * marshal.c: Fix support for dynamic methods.
18276 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
18278 * marshal.c (mono_marshal_cleanup): New cleanup function.
18280 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
18283 * class.c (mono_class_init): Fix leaking class->nested_classes.
18285 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
18287 * image.c (mono_image_init): Initialize the new cashes.
18289 * image.c (mono_image_close): Destroy the new cashes.
18291 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
18293 * mempool.c (mono_mempool_strdup): New helper function.
18295 * class-internals.h: Add prototype for mono_loader_unlock ().
18297 * domain.c (mono_jit_info_table_find): Fix a warning.
18298 (mono_debugger_check_runtime_version): Ditto.
18300 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
18301 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
18302 functions to these modules.
18304 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
18307 * marshal.c (mono_free_bstr): Fix a warning.
18309 * assembly.c (mono_assembly_open_full): Fix another small leak.
18311 * object.c: Fix some unload leaks in the remoting code.
18313 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
18316 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
18318 * reflection.c: Fix some unload leaks in dynamic assemblies.
18320 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
18322 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
18323 * marshal.h: Add BSTR support on Win32
18324 * icall.c: Add BSTR icalls
18325 * metadata.h: Add BSTR enums
18327 2006-04-28 Miguel de Icaza <miguel@novell.com>
18329 Work to catch the crash from #76795 and turn it into an
18330 exception. As I stubbed out pieces of the VisualBasic support,
18331 I found a number of places where the code was failing and I added
18332 checks to those places.
18334 * metadata.c (do_mono_metadata_parse_generic_class): Make this
18335 function return a status code. If we fail to parse the signature
18336 from mono_metadata_parse_generic_inst, return FALSE.
18338 * loader.c (mono_get_method_from_token): If we fail to load the
18339 method (mono_class_get) return NULL.
18341 * (method_from_memberref): Return NULL if we are unable to parse
18342 the method signature
18344 (mono_loader_error_prepare_exception): Since we now use the
18345 loader_error flag internally to stop processing, and obtaining
18346 exceptions that might be thrown will walk this code path the
18347 proper way of going from a MonoLoaderError into a
18348 MonoException was convoluted. This new routine encapsulates the
18349 process of turning the error into an exception and *clearing* the
18352 2006-04-27 Miguel de Icaza <miguel@novell.com>
18354 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
18355 with missing assemblies), and to cope with:
18357 * Missing fieldref from a non-existing assembly.
18358 * Missing methodref from a non-existing assembly.
18360 The first batch of work to address *some* of the issues from 76661.
18362 * object.c (mono_class_create_runtime_vtable): If we fail to
18363 initialize the class raise the exception here.
18365 * metadata.c (mono_class_get_overrides_full): If any methods fail
18366 to load return the failure to the caller.
18368 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
18369 flagging assemblies that failed to load.
18371 Do not crash if we are unable to load the assembly.
18373 (mono_assembly_close): Do nothing with REFERENCE_MISSING
18376 * loader.c (mono_loader_set_error_type_load): Change the
18377 convention to always pass unallocated strings, so we make our own
18378 copies (I know our own code had duplicated strings before, but
18379 this keeps the normal conventions).
18380 (method_from_memberref): Call mono_loader_set_error_method_load
18381 for all possible failures of loading the class.
18382 Remove assert, turn into a loader error.
18384 (mono_loader_error_to_exception): Move this routine from mini
18385 (mini_loader_error_to_exception) there was no need to have that in
18388 * class.c (mono_class_from_typeref): If we were not able to load
18389 the assembly with mono_assembly_load_reference, call the
18390 mono_loader_set_error_type_load to register the problem.
18392 (mono_class_setup_fields): If we fail to load the type from
18393 mono_metadata_parse_type_full, call mono_class_set_failure and
18394 break from the loop.
18396 If class->exception_type is set, we do not layout the fields as
18397 that might crash the runtime, and instead return (from breaking
18398 from the previous loop).
18400 (mono_class_setup_vtable): This now returns a boolean indicating
18401 whether the table was properly setup. The decision is driven by
18402 mono_class_get_overrides_full which might run into non-existing
18405 (mono_class_init): Returns TRUE on success or FALSE if there was a
18406 problem in loading the type (incorrect assemblies, missing
18407 assemblies, methods, etc).
18409 When we call mono_class_setup_fields we also check for a potential
18410 error inside this call (either a class exception or a general
18413 (mono_class_create_from_typedef): If the parent fails to load
18414 (calling mono_class_get_full) return NULL.
18418 calls to mono_metadata_parse_type_full should be checked
18419 everywhere and set the mono_class_set_failure
18420 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
18422 The current patch checks the places where my manually constructed
18423 tests show the errors are showing up, but we should do it
18428 mono_class_init return values should be tested everywhere, like
18429 the previous case this is something that we should audit
18430 everywhere and not only on the cases exposed by the tests I
18433 2006-04-26 Miguel de Icaza <miguel@novell.com>
18435 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
18436 boolean parameter and instead pass the information on `options'
18437 parameter (FileOptions).
18439 * icall.c: Register the new signature for MonoIO.Open.
18441 * debug-helpers.c (dis_one): Trying to understand how coverity
18442 works. Fix Run 5, item 78.
18444 2006-04-26 Dick Porter <dick@ximian.com>
18446 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
18449 2006-04-25 Martin Baulig <martin@ximian.com>
18451 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
18453 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
18454 debugger_thread_created().
18455 (debugger_gc_push_all_stacks): Don't handle the main thread in any
18457 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
18458 (mono_debugger_finalize_threads): New function; undo the effects
18459 of mono_debugger_init_threads().
18460 (mono_debugger_create_all_threads): Removed.
18462 2006-04-24 Zoltan Varga <vargaz@gmail.com>
18464 * image.c (mono_image_close): Tidy up trace messages.
18466 * assembly.c (mono_assembly_close): Ditto.
18468 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
18469 no longer references an already freed assembly. Fixes #78168.
18471 2006-04-21 Dick Porter <dick@ximian.com>
18473 * threads.c (mono_thread_detach): Fix reference counting when
18476 2006-04-21 Zoltan Varga <vargaz@gmail.com>
18478 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
18481 2006-04-19 Zoltan Varga <vargaz@gmail.com>
18483 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
18484 (mono_type_to_stind): Ditto.
18486 * marshal.c: Use the new helper functions to simplify code.
18488 * image.c (mono_image_close): Add some code for help debug assembly unloading
18491 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
18494 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
18495 assembly was already loaded in another appdomain. Fixes #78083.
18497 2006-04-13 Zoltan Varga <vargaz@gmail.com>
18499 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
18500 referenced assemblies.
18501 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
18503 * domain.c (mono_domain_free): Add a trace message.
18505 * appdomain.c (add_assemblies_to_domain): Ditto.
18507 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
18510 2006-04-12 Zoltan Varga <vargaz@gmail.com>
18512 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
18514 2006-04-12 Martin Baulig <martin@ximian.com>
18516 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
18517 `USE_INCLUDED_LIBGC'.
18519 2006-04-12 Zoltan Varga <vargaz@gmail.com>
18521 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
18522 the patch contains ../ and a small directory name later. Hopefully fixes
18525 2006-04-10 Martin Baulig <martin@ximian.com>
18527 Clean up the debugger's thread-handling code.
18529 The debugger's thread-handling code has been moved from
18530 ../mini/debug-debugger.c to threads.c. We now iterate directly
18531 over the `threads' hash, keep track of exiting threads and also
18532 use proper locking.
18534 We can now debug XSP and XSP based applications with the debugger.
18536 * object-internals.h (MonoThread): Added `gpointer end_stack'.
18539 (MonoThreadCallbacks): Removed; this was only used by the debugger.
18540 (mono_install_thread_callbacks): Likewise.
18542 * threads.c (mono_thread_callbacks): Removed.
18543 (debugger_thread_created, debugger_thread_exited): New static functions.
18544 (start_wrapper): Call debugger_thread_created().
18545 (thread_cleanup): Call debugger_thread_exited().
18546 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
18547 (mono_debugger_init_threads): New public function.
18548 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
18549 iterate directly over the `threads' hash and also use proper locking.
18551 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
18553 * mono-debug-debugger.h
18554 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
18556 2006-04-10 Zoltan Varga <vargaz@gmail.com>
18558 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
18559 argument type=array. Fixes #78057.
18561 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
18563 * culture-info-table.h : regenerated. Fixed bug #69652.
18565 2006-04-07 Zoltan Varga <vargaz@gmail.com>
18567 * loader.c metadata.c: Reapply a variant r59116.
18569 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
18571 * class.c (mono_class_setup_interface_offsets): New internal function.
18573 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
18574 interfaces too. Fixes #77398.
18576 * reflection.c (encode_cattr_value): Add support for
18577 parameter type=object, argument type=array.
18578 (load_cattr_value): Ditto. Fixes #77916.
18580 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
18581 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
18583 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
18584 a byval char array and CharSet is Ansi.
18586 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
18588 2006-04-06 Zoltan Varga <vargaz@gmail.com>
18590 * metadata.c: Add some locking comments.
18592 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
18594 (mono_metadata_free_method_signature): Don't free the signature itself.
18596 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
18598 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
18599 reference the same MonoImage.
18600 (mono_assembly_load_from_full): Add an assert.
18602 2006-04-05 Zoltan Varga <vargaz@gmail.com>
18604 * image.c (mono_image_close): Don't put the image we are about to free into the
18605 loaded_images_guid_hash.
18607 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
18608 to reduce code duplication.
18610 * marshal.c: Register the native functions called by this module as icalls, to
18611 somewhat centralize the creation of MonoMethodSignature's.
18613 * loader.c (mono_method_signature): Add a cache for method signatures.
18615 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
18616 the parameter attributes of a method.
18617 (mono_metadata_parse_method_signature_full): Refactored the computation of
18618 parameter attributes into a separate function. Also avoid one allocation in
18621 * assembly.c (mono_assembly_close): Ditto.
18623 * image.c (mono_image_close): Log trace messages with INFO level.
18625 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
18627 * image.c reflection.c: Correct reference counting of image modules.
18629 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
18630 of this function from the image mempool.
18632 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
18633 to allow more cached types to be used.
18635 * mono-debug.c (mono_debug_add_method): Appled patch from
18636 David S. Miller <davem@sunset.davemloft.net>: Access
18637 minfo->lexical_blocks[] entry elements using read32().
18639 2006-04-04 Zoltan Varga <vargaz@gmail.com>
18641 * loader.c (mono_free_method): No longer free the method header for non-dynamic
18642 methods as it is allocated from the mempool.
18644 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
18647 * metadata-internals.h: Add comments describing the reference counting scheme
18648 used for MonoImage and MonoAssembly.
18650 * image.c assembly.c reflection.c: Rework reference counting of images and
18651 assemblies so they are freed when the runtime is shut down. Free some
18652 additional memory structures when an image is unloaded.
18654 2006-04-03 Zoltan Varga <vargaz@gmail.com>
18656 * class.c loader.c reflection.c: Allocate more data structures in
18659 2006-03-31 Miguel de Icaza <miguel@novell.com>
18662 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
18663 build on pre glib 2.4 systems.
18665 2006-03-31 Zoltan Varga <vargaz@gmail.com>
18667 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
18669 * icall.c: Fix some warnings.
18671 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
18673 * culture-info-table.h : regenerated.
18675 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
18677 * threads.c, object-internals.h, verify.c: changed the culture caching
18678 code to use a normal MonoArray for storage so the GC can keep track of
18679 them easily. Fixed bits of the cache logic, too and simplified the
18682 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
18684 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
18685 thread for non-Boehm GCs.
18687 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
18689 * domain.c, object.c, domain-internals.h: reduce the amount of memory
18690 needed to keep track of the data for static fields.
18692 2006-03-29 Raja R Harinath <rharinath@novell.com>
18695 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
18696 for interface classes. Use 'num_methods' instead.
18697 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
18698 before using '->vtable_size' field.
18700 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
18702 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
18703 doesn't contain managed pointers, so use a normal hashtable.
18705 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
18707 * reflection.c, class-internals.h, domain.c: fixed handling of types
18708 used as values for objects in custom attributes (bug #77915):
18710 2006-03-24 Martin Baulig <martin@ximian.com>
18712 * class.c (mono_class_setup_fields): Added support for generic
18713 instances; fixes #77580.
18715 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18717 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
18719 2006-03-24 Dick Porter <dick@ximian.com>
18721 * file-io.c (get_file_attributes): More stat macro breakage.
18724 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
18726 * profiler.c: added the file=filename option in the default profiler
18727 to output the profile data to filename.
18729 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18731 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
18734 2006-03-22 Martin Baulig <martin@ximian.com>
18736 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
18737 allocated `MonoClassField *' in `fb->handle'.
18739 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
18741 * class.c, image.c, metadata-internals.h: implemented new mechanism to
18742 allocate interface ID to save memory and allow better ID reuse on
18743 appdomain unload. setup_generic_vtable () removal from Martin.
18745 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
18747 * object.h, appdomain.c, domain.c, exception.c, icall.c,
18748 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
18749 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
18750 write barriers for reference stores with managed objects accessed with
18751 C structures in the runtime and in embedding programs.
18753 2006-03-20 Raja R Harinath <rharinath@novell.com>
18755 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
18756 'interface_id' and 'max_interface_id' fields of MonoClasses
18757 representing open generic types.
18759 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
18761 * object.h, object.c, icall.c: added functions to deal with
18762 storing valuetypes that contain references in managed objects.
18763 * reflection.c, string-icalls.c, threads.c, marshal.c: small
18764 fixes and comments around uses of mono_array_addr ().
18766 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
18768 * object.h, icall.c, monitor.c: object.GetHashCode ()
18769 implementation that supports the moving garbage collector.
18771 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
18773 * icall.c, threads-types.h, threads.c: implemented finalizer for
18774 LocalDataStoreSlot.
18776 2006-03-15 Zoltan Varga <vargaz@gmail.com>
18778 * metadata.c (mono_type_size): Add a fixme.
18779 (mono_type_stack_size): Ditto.
18781 * object-internals.h (MonoReflectionAssemblyBuilder): Added
18782 'type_forwarders' field.
18784 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
18785 attribute from net 2.0.
18787 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
18790 * class.c (mono_class_setup_fields): Fix a warning.
18792 * class.c (mono_class_from_name): Add support for assemblyref entries
18793 in the EXPORTEDTYPE table.
18795 * reflection.c: Add support for handling type forwarders under net 2.0.
18797 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18799 2006-03-14 Zoltan Varga <vargaz@gmail.com>
18801 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
18802 overwriting entries in ModuleBuild->types, also clean up the code
18803 a little. Fixes #77774.
18805 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
18807 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
18808 load friend assembly info when present.
18810 2006-03-14 Raja R Harinath <rharinath@novell.com>
18812 Fix crasher on gtest-158.cs.
18813 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
18814 the return value if the MonoClass we want is yet in an
18815 inconsistent state.
18816 * class.c (mono_class_create_from_typedef): Add an comment
18817 explaining an order dependency between mono_class_setup_parent and
18818 mono_class_setup_mono_type.
18820 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
18822 * class.c: documentation updates and events bug fix.
18824 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
18826 * class.c: some cleanup, locking fixes.
18828 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
18830 * class.c: fix the generics code to setup nested
18831 type info to the instantiated type (bug #77770).
18833 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
18835 * marshal.c: fixed a few type correctness issues.
18837 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
18839 * loader.c: the Set/Get/Addrtess array methods should be public.
18841 2006-03-11 Zoltan Varga <vargaz@gmail.com>
18843 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
18845 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
18848 2006-03-10 Zoltan Varga <vargaz@gmail.com>
18850 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
18852 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
18854 * mempool.c (mono_mempool_alloc): Speed this up a bit.
18855 (mono_mempool_alloc0): Ditto.
18857 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18860 (create_object_from_sockaddr): it was allocating 4 extra bytes
18861 for the AF_UNIX data. Fixes bug #77747.
18863 2006-03-09 Zoltan Varga <vargaz@gmail.com>
18865 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
18867 2006-03-09 Dick Porter <dick@ximian.com>
18869 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
18870 Fixes bug 76966 again.
18872 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
18874 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
18876 * appdomain.c: Bumped corlib version to 48 (due to r57532)
18878 2006-03-07 Martin Baulig <martin@ximian.com>
18881 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
18883 2006-03-07 Martin Baulig <martin@ximian.com>
18886 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
18887 regression introduced in r56970; see gtest-252.cs.
18889 * loader.c (mono_get_method_constrained): Correctly handle generic
18890 methods; see gtest-253.cs.
18892 2006-03-04 Zoltan Varga <vargaz@gmail.com>
18894 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
18896 2006-03-04 Martin Baulig <martin@ximian.com>
18898 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
18899 compute the parent type at runtime, just like we're already doing
18903 (mono_reflection_bind_generic_parameters): Don't compute the
18904 parent type anymore.
18906 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
18908 2006-03-04 Martin Baulig <martin@ximian.com>
18910 * mono-debug-debugger.h
18911 (mono_debugger_create_notification_function): Allocate memory at
18912 runtime and return a pointer to it.
18914 2006-03-03 Zoltan Varga <vargaz@gmail.com>
18916 * assembly.c: Fix windows build.
18918 * assembly.c: Fix build.
18920 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
18922 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
18924 2006-03-03 Dick Porter <dick@ximian.com>
18927 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
18928 Check parameters before dereferencing them. Fixes Aaron's part of
18931 2006-03-03 Raja R Harinath <rharinath@novell.com>
18933 Fix performance regression.
18934 * loader.c (find_method_in_class): Add 'from_class' argument.
18935 Rename 'klass' argument to 'in_class'. The signature is compared
18936 against the method in 'in_class', and the corresponding method is
18937 returned from 'from_class'.
18938 (find_method): Walk both 'in_class' and 'from_class' in parallel.
18939 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
18940 type definition and generic instantiation in parallel.
18941 (mono_get_method_constrained): Update to changes.
18943 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
18945 * threads.c: make sure the domain is correct, too when doing
18946 mono_thread_attach ().
18948 2006-03-01 Zoltan Varga <vargaz@gmail.com>
18950 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
18951 windows. Fixes #77683.
18953 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
18955 * object.h, *: introduced specific way to set elements of an array
18956 of references to be used as write barrier. Still need to audit the
18957 uses of mono_array_addr.
18959 2006-03-01 Miguel de Icaza <miguel@novell.com>
18961 * object-internals.h: New field to cache the assmebly name, patch
18962 from Tambet Ingo (tambet@ximian.com)
18964 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
18966 * decimal.h, class-internals.h, metadata-internals.h,
18967 file-io.h: mark a few function declarations as internal, to
18968 reduce the number of PLT entries.
18970 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18972 * file-io.c: fix typo in warning message.
18974 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
18976 * loader.c: on unix, lookup the "*A" version of a function
18977 if charset is auto as a second option before failing.
18979 2006-02-28 Raja R Harinath <rharinath@novell.com>
18981 * class.h (mono_class_inflate_generic_method): Revert to two
18983 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
18984 (mono_class_inflate_generic_method_full): Add.
18985 * class.c (mono_class_inflate_generic_method_full): Rename from
18986 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
18987 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
18988 * loader.c, reflection.c: Update to changes.
18990 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
18992 * icall.c: const fixes and small improvements.
18994 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18996 * threadpool.c: for asynchronous connect(), enable the same workaround
18997 for BSD 6 as for the Mac. Fixes bug #77637.
18999 2006-02-24 Zoltan Varga <vargaz@gmail.com>
19001 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
19002 formatted classes. Fixes #77524.
19004 2006-02-24 Raja R Harinath <rharinath@novell.com>
19006 * class.c (inflate_generic_type): Add a couple more
19007 micro-optimizations.
19008 (inflate_generic_context): Don't use the 'gmethod' from
19010 (mono_class_inflate_generic_method): If the method has generic
19011 parameters, but the passed-in context doesn't have a 'gmethod',
19012 create one. Use the possibly simplified generic instantiation
19013 from the declaring class instead of the one passed in.
19015 2006-02-24 Raja R Harinath <harinath@gmail.com>
19017 Make generic method signature and method header handling lazy.
19018 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
19019 (inflate_generic_header): Likewise.
19020 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
19021 parameter to avoid inflating types.
19022 (mono_get_inflated_method): Empty out.
19023 * class.h (mono_class_inflate_generic_method): Update to changes.
19024 * loader.c (mono_get_method_from_token): Don't parse signature for
19025 generic methods, nor methods of generic classes.
19026 (mono_method_signature): Rename from 'mono_method_signature'.
19027 Inflate signature on demand.
19028 (mono_method_get_header): Inflate method header on demand.
19029 * reflection.c: Update to changes.
19031 2006-02-23 Raja R Harinath <rharinath@novell.com>
19033 * metadata.c (mono_metadata_inflate_generic_inst): If the
19034 instantiation is closed, don't bother expanding it in the new
19036 * class.c (inflate_generic_class): If the generic instantiation
19037 doesn't change after inflation, return the argument itself.
19038 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
19040 (inflate_generic_context): If neither the generic class nor the
19041 generic method instantiations change, return the original context.
19042 * reflection.c (mono_method_get_object): Do
19043 'mono_get_inflated_method' before accessing the ->klass field.
19044 (inflate_mono_method): Don't create a MonoGenericMethod unless
19046 (inflate_method): Don't pass a constructed type as the declaring
19047 type of a methodbuilder.
19049 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
19051 * object.c: fix memory overwrite.
19053 2006-02-22 Dick Porter <dick@ximian.com>
19055 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
19056 it doesn't work any more.
19057 (mono_threads_request_thread_dump): Fix unused variable warnings.
19059 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
19061 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
19062 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
19063 the public header file.
19065 2006-02-21 Zoltan Varga <vargaz@gmail.com>
19067 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
19069 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
19071 * class-internals.h, object.c: reduce the size of MonoVTable
19072 and store the interface_offsets array at negative offsets.
19074 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
19076 * metadata.c: tweak table descriptors data structures to reduce
19077 size and runtime relocations.
19079 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
19081 * marshal.c: fix some types and opcodes to be type-safe
19082 in marshaling wrappers.
19084 2006-02-21 Ankit Jain <jankit@novell.com>
19086 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
19088 2006-02-21 Raja R Harinath <rharinath@novell.com>
19090 * metadata.c (get_constraints): Relax debugging checks for monodis.
19092 2006-02-21 Ankit Jain <jankit@novell.com>
19094 * metadata.c (mono_metadata_load_generic_params): Move the code
19095 checking for ambiguous generic params from here to mono/dis/get.c
19096 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
19098 2006-02-21 Raja R Harinath <harinath@gmail.com>
19100 Fix assertion triggered when compiling nemerle.
19101 * class.c (mono_get_shared_generic_inst): Rename from
19102 get_shared_inst and make non-static.
19103 * loader.c (mono_get_shared_generic_method): New. Used to create
19104 the MonoGenericContext-equivalent of a MonoGenericContainer.
19105 (mono_get_method_from_token): Initialize the 'context' field of
19106 the created MonoGenericContainer.
19107 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
19108 * metadata.c (get_constraints): Add sanity check.
19109 * class-internals.h: Add new internal methods.
19111 * reflection.c (verify_safe_for_managed_space): New sanity check.
19112 Currently checks that owner-less generic parameters aren't allowed
19114 (mono_type_get_object): Use it.
19115 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
19116 that are now in mono_type_get_object.
19117 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
19119 2006-02-19 Raja R Harinath <harinath@gmail.com>
19121 * metadata.c (mono_type_create_from_typespec): Rename from
19122 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
19123 argument and caching of types in the generic container.
19124 (unwrap_arrays, find_generic_param): Remove.
19125 * metadata-internals.h: Update.
19126 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
19128 2006-02-18 Zoltan Varga <vargaz@gmail.com>
19130 * class.c (mono_class_get_exception_for_failure): Fix a warning.
19132 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
19133 return values. Fixes #77581.
19135 * class.c (mono_fnptr_class_get): Switch name and name_space.
19137 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
19138 classes and add support for [In, Out] attributes.
19139 (mono_marshal_free_asany): Ditto. Fixes #77524.
19141 2006-02-18 Raja R Harinath <harinath@gmail.com>
19143 * class.c (mono_class_from_generic_parameter): Make more robust to
19144 incomplete MonoGenericContainers from monodis.
19146 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
19148 * class-internals.h: added some more exception types.
19149 * class.c, metadata.c: added a few checks to handle missing
19152 2006-02-17 Raja R Harinath <rharinath@novell.com>
19154 Use owner-less generic-params some more.
19155 * class.c (my_mono_class_from_generic_parameter): Remove.
19156 (mono_class_from_generic_parameter): Handle null image,
19157 param->name and param->owner.
19158 (mono_class_from_mono_type): Update.
19159 (mono_class_create_from_typespec): Remove 'container' parameter.
19160 If that parameter is non-null, the result is always inflated by
19161 'mono_class_get_full' anyway.
19162 (mono_class_get): Rename from _mono_class_get. Remove 'container'
19164 (mono_class_get_full): Update.
19166 * class.c (inflate_generic_type) [GENERICINST]: If the generic
19167 instance is not open, don't bother inflating.
19168 (mono_class_setup_fields): Hoist some loop-invariants. Don't
19169 parse metadata for inflated classes.
19170 (_mono_class_get): Change GenericContext* parameter to
19172 (mono_class_create_from_typespec): Likewise. Simplify, and
19173 implement trivially. All the cases are handled in
19174 mono_class_from_mono_type. Don't inflate returned class.
19175 (mono_class_get_full): Delegate GENERICINST optimization to
19176 inflate_generic_type.
19177 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
19179 2006-02-16 Dick Porter <dick@ximian.com>
19181 * socket-io.c (create_object_from_sockaddr): Fix typo.
19182 (create_sockaddr_from_object): Check array lengths before
19183 potentially accessing items off the end.
19184 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
19185 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
19186 (ves_icall_System_Net_Sockets_Socket_Send_internal)
19187 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
19188 length checks to avoid wraparound overflows.
19189 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
19190 contents of the array of sockets
19191 (hostent_to_IPHostEntry2)
19192 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
19193 Check return value of inet_ntop ().
19194 (addrinfo_to_IPHostEntry): Fix typo
19196 2006-02-16 Raja R Harinath <rharinath@novell.com>
19198 Type metadata parsing doesn't use generic-instantiation information.
19199 * metadata.c (mono_metadata_parse_array_full): Change
19200 MonoGenericContext* parameter to MonoGenericContainer*.
19201 (mono_metadata_parse_type_full): Likewise.
19202 (mono_type_create_from_typespec_full): Likewise.
19203 (mono_metadata_parse_mh_full): Likewise.
19204 (mono_metadata_parse_generic_inst): Likewise.
19205 (do_mono_metadata_parse_generic_class): Likewise.
19206 (do_mono_metadata_parse_type): Likewise.
19207 * metadata-internals.h: Update to changes.
19208 * class.c (mono_class_find_enum_basetype): Likewise.
19209 (mono_class_setup_fields): Likewise.
19210 (mono_class_create_from_typespec): Likewise.
19211 * loader.c (method_from_methodspec): Likewise.
19212 (mono_get_method_from_token): Likewise.
19213 (mono_method_get_header): Likewise.
19215 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
19217 * marshal.c: handle additional GENERICINST case (patch from
19218 Thong Nguyen <tum@veridicus.com>).
19219 Fix a few cases where LDIND_I/STIND_I was used for references.
19221 2006-02-16 Raja R Harinath <rharinath@novell.com>
19223 * reflection.c (mono_reflection_get_token): Remove unused variable.
19225 2006-02-16 Martin Baulig <martin@ximian.com>
19227 * reflection.c (mono_reflection_get_token): Add support for fields
19228 in instantiated generic types.
19231 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
19233 2006-02-15 Martin Baulig <martin@ximian.com>
19236 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
19237 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
19238 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
19239 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
19241 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
19243 * class.c, metadata.c, metadata.h, object.c, icall.c,
19244 marshal.c: changed mono_type_get_underlying_type () to do
19245 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
19246 Fixed handling of instantiated generic valuetypes (bug #75479).
19248 2006-02-15 Raja R Harinath <rharinath@novell.com>
19250 * metadata.c (mono_metadata_decode_signed_value): Simplify.
19251 Delegate to mono_metadata_decode_value, and work on the returned value.
19253 * icall.c (ves_icall_MonoType_GetGenericArguments):
19254 Add consistency check here too.
19256 2006-02-15 Ankit Jain <jankit@novell.com>
19258 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
19261 2006-02-15 Ankit Jain <jankit@novell.com>
19263 * metadata.c (mono_metadata_decode_signed_value): New function to decode
19264 signed values, used only for representing lower bounds of arrays.
19265 (mono_metadata_parse_array_full): Use new
19266 mono_metadata_decode_signed_value to decode lower bounds.
19268 2006-02-14 Martin Baulig <martin@ximian.com>
19271 (mono_reflection_get_token): Support "MonoGenericMethod" and
19272 "MonoGenericCMethod" and allow generic instances / methods.
19274 2006-02-11 Zoltan Varga <vargaz@gmail.com>
19276 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
19277 to obtain the terminal size using an ioctl.
19279 * object.c (mono_nullable_init): Revert this as nullable reference
19280 types are not valid.
19281 (mono_nullable_box): Ditto.
19283 2006-02-09 Dick Porter <dick@ximian.com>
19285 * threads.c (mono_thread_detach): Drop a reference to the thread
19288 2006-02-09 Zoltan Varga <vargaz@gmail.com>
19290 * object.c (mono_nullable_init): Handle nullable reference types.
19291 (mono_nullable_box): Ditto. Fixes #77446.
19293 2006-02-07 Martin Baulig <martin@ximian.com>
19295 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
19297 2006-02-07 Ankit Jain <jankit@novell.com>
19299 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
19300 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
19301 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
19302 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
19303 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
19304 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
19306 2006-02-02 Zoltan Varga <vargaz@gmail.com>
19308 * class.c (mono_class_create_generic): Set type_token as well.
19310 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
19311 compatible with MS.
19313 2006-02-02 Martin Baulig <martin@ximian.com>
19315 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
19316 has never been used so far.
19318 2006-02-02 Martin Baulig <martin@ximian.com>
19320 * mono-debug-debugger.h: Changed comment at the top of this file;
19321 the header is not installed, but it's safe to #include it from
19324 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
19325 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
19327 2006-02-02 Martin Baulig <martin@ximian.com>
19330 (MonoSymbolTable): Removed the `metadata_info' field.
19333 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
19335 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
19336 (mono_debugger_add_builtin_types): Removed.
19337 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
19338 (mono_debugger_create_notification_function): We now operate on a
19339 pre-allocated area; take a `gpointer' and return `void'.
19341 * mono-debug-debugger.c
19342 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
19343 (mono_debugger_add_builtin_types): Removed.
19345 2006-02-02 Martin Baulig <martin@ximian.com>
19347 * threads.c (mono_debugger_create_all_threads): New public method.
19349 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
19351 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
19352 breaks on several platforms.
19354 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
19356 * assembly.c: the VS.NET build doesn't supply default values for
19357 MONO_ASSEMBLIES and MONO_CFG_DIR.
19359 2006-02-01 Zoltan Varga <vargaz@gmail.com>
19361 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
19364 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
19366 * loader.c (method_from_memberref): Fix a warning.
19368 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
19370 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
19371 with explicit layout. Fixes #77433.
19373 2006-01-31 Zoltan Varga <vargaz@gmail.com>
19375 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
19376 max_interface_id is initialized before using it. Fixes #77398.
19377 (ves_icall_Type_GetInterfaces): Ditto.
19379 2006-01-30 Raja R Harinath <rharinath@novell.com>
19381 * metadata.c (mono_metadata_parse_method_signature_full): Don't
19382 allocate memory for parameter attributes when parsing memberref
19384 * loader.c (mono_loader_set_error_method_load): Don't warn.
19385 (method_from_memberref): Ensure MissingMethodException gets thrown
19386 if method is not found. Make warning more informative.
19388 2006-01-29 Raja R Harinath <harinath@gmail.com>
19391 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
19392 return true if is byref.
19393 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
19394 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
19395 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
19397 2006-01-27 Raja R Harinath <rharinath@novell.com>
19399 Fix tests/find-method.2.il
19400 * loader.c (find_method, find_method_in_class): Remove is_inflated
19401 argument. Revert 2006-01-18 change.
19402 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
19403 is generic, search for method in its generic definition.
19404 * class.c (mono_class_setup_vtable_general): Print generic
19405 arguments of generic types in debugging printf.
19407 2006-01-26 Zoltan Varga <vargaz@gmail.com>
19409 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
19411 * threads.c (mono_threads_request_thread_dump): New helper function.
19413 2006-01-25 Raja R Harinath <rharinath@novell.com>
19415 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
19417 2006-01-25 Ankit Jain <jankit@novell.com>
19419 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
19420 move definition to ..
19421 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
19423 2006-01-25 Ankit Jain <jankit@novell.com>
19424 Raja R Harinath <rharinath@novell.com>
19426 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
19427 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
19430 2006-01-25 Martin Baulig <martin@ximian.com>
19432 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
19433 `MonoDebuggerThread' into debug-debugger.c.
19435 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
19437 * profiler.c: fix printing of data.
19439 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
19441 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
19442 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
19444 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
19446 * object.c: fix deadlock related to string interning.
19448 2006-01-23 Martin Baulig <martin@ximian.com>
19450 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
19452 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
19454 2006-01-23 Martin Baulig <martin@ximian.com>
19456 * mono-debug.h: Moved the prototypes of some functions which are
19457 used by the JIT here from mono-debug-debugger.h.
19459 2006-01-21 Martin Baulig <martin@ximian.com>
19461 * Makefile.am: Don't install mono-debug-debugger.h.
19463 2006-01-21 Martin Baulig <martin@ximian.com>
19465 * mono-debug-debugger.h: Enforce the private status of this header
19466 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
19467 Moved some stuff from mono-debugger-jit-wrapper.h here.
19469 2006-01-20 Raja R Harinath <rharinath@novell.com>
19471 * class.c (mono_class_from_typeref): Add a sanity test to help
19472 catch lack of assembly load/search hooks.
19474 2006-01-19 Zoltan Varga <vargaz@gmail.com>
19476 * marshal.c (emit_struct_conv): Relax the fields with same offset
19477 check even more. Fixes #77230.
19479 2006-01-18 Martin Baulig <martin@ximian.com>
19481 * loader.c (find_method_in_class): Added `gboolean is_inflated'
19482 argument; if false, we compare the uninstantiated signatures.
19483 (method_from_memberref): Compare the uninstantiated signatures;
19486 2006-01-18 Robert Jordan <robertj@gmx.net>
19488 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
19489 Clear the weak link. Fixes bug #77170.
19491 * gc.c (mono_gchandle_free):
19492 Reflect *-gc.c changes (tiny optimization).
19494 2006-01-18 Zoltan Varga <vargaz@gmail.com>
19496 * metadata.c (mono_metadata_signature_dup): Applied patch from
19497 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
19500 2006-01-17 Zoltan Varga <vargaz@gmail.com>
19502 * marshal.c (emit_struct_conv): Allow fields with the same offset when
19503 marshalling from native to managed code. Fixes #77230.
19505 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19507 * threadpool.c: fix problem (Mac only) when more than one asynchronous
19508 connect. Fixes bug #77020.
19510 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
19512 * class.c: fixed id assignement for nested interfaces (bug #77275).
19513 Added also better info for --print-vtable debugging.
19515 2006-01-12 Martin Baulig <martin@ximian.com>
19517 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
19518 interfaces on-the-fly; fixes #76625.
19520 * class-internals.h
19521 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
19522 don't need that anymore.
19524 2006-01-12 Miguel de Icaza <miguel@novell.com>
19527 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
19528 To avoid initing the nested_classes when not needed I turned the
19529 PeerCredData as a toplevel internal class, as it has to be shared
19532 Fixes the CASA issue.
19534 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
19536 * domain.c: Accessors for MonoJitInfo
19538 * profiler-private.h: Add jitinfo to the end jit hook
19540 * profiler.[ch]: Define new hooks, called after jitting which give
19541 the MonoJitInfo that was compiled
19543 2006-01-10 Martin Baulig <martin@ximian.com>
19545 * class.c (mono_class_setup_events): Add support for generic
19546 classes; fixes #76440.
19548 2006-01-06 Raja R Harinath <rharinath@novell.com>
19551 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
19552 on passed-in method.
19554 2006-01-03 Zoltan Varga <vargaz@gmail.com>
19556 * object.c (mono_runtime_invoke_array): Add Nullable support.
19558 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
19560 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
19562 * file-io.c: Don't consider sockets as directory and avoid an endless
19563 loop. Fix bug #76966.
19565 2006-01-03 Zoltan Varga <vargaz@gmail.com>
19567 * object.c (mono_nullable_init): New helper function.
19568 (mono_nullable_box): Ditto.
19570 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
19572 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
19574 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
19576 2006-01-02 Zoltan Varga <vargaz@gmail.com>
19578 * class.c (mono_class_is_assignable_from): Make T assignable to
19581 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
19583 * appdomain.c: Bump corlib version to 46.
19584 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
19585 serialization purpose) and changed ves_icall_System_Reflection_
19586 Assembly_get_code_base signature to accept a boolean (to escape, or
19587 not, the assembly code base).
19589 2005-12-23 Dick Porter <dick@ximian.com>
19593 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
19594 CreateEvent icall now returns "created" boolean parameter.
19596 2005-12-22 Zoltan Varga <vargaz@gmail.com>
19598 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
19601 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
19602 when attr_klass is an interface. Fixes #77045.
19604 2005-12-20 Zoltan Varga <vargaz@gmail.com>
19606 * marshal.c (emit_struct_conv): Fix previous patch.
19608 * marshal.c (emit_struct_conv): Add a check for fields with the same
19611 2005-12-20 Raja R Harinath <rharinath@novell.com>
19613 Fix regression in Mono.C5.
19614 * class.c (mono_class_create_generic): If 'klass' is an interface
19615 set up the interface offsets.
19616 (mono_class_is_assignable_from): Don't throw away generic arguments.
19618 2005-12-19 Raja R Harinath <rharinath@novell.com>
19620 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
19623 2005-12-15 Raja R Harinath <rharinath@novell.com>
19625 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
19627 (do_mono_metadata_parse_generic_class): Don't pass the current
19628 generic context when parsing the type being instantiated: it
19629 cannot use it, anyway.
19631 * loader.c (method_from_memberref): Don't inflate a signature if
19632 it doesn't contain any type parameters.
19634 2005-12-15 Zoltan Varga <vargaz@gmail.com>
19636 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
19638 2005-12-14 Martin Baulig <martin@ximian.com>
19641 (mono_type_get_name_recurse): Don't return null for type
19642 parameters and open generic classes.
19643 (mono_class_setup_methods): Don't exclude generic instances.
19644 (mono_get_unique_iid): Use different IDs for different
19645 instantiations of the same generic type.
19646 (mono_class_setup_vtable): Only use setup_generic_vtable() for
19647 open generic instances; create a normal vtable for closed generic
19649 (mono_class_setup_vtable_general): We're now also called for
19650 closed generic instances.
19653 (mono_reflection_bind_generic_parameters): Correctly use
19654 mono_metadata_lookup_generic_inst() everywhere.
19656 2005-12-14 Zoltan Varga <vargaz@gmail.com>
19658 * object.c (mono_class_create_runtime_vtable): Call
19659 mono_class_setup_vtable ().
19661 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
19663 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
19666 * loader.c (mono_loader_set_error_type_load): Print the type load
19667 warnings to the console so they are more visible to the user.
19668 (mono_loader_set_error_method_load): Ditto.
19670 * reflection.c (ensure_runtime_vtable): Revert the last change as it
19673 * reflection.c (ensure_runtime_vtable): Fix build.
19675 * reflection.c (ensure_runtime_vtable): Disable an optimization which
19676 doesn't work in all cases.
19678 2005-12-13 Zoltan Varga <vargaz@gmail.com>
19680 * object.c (mono_array_new_full): Treat a single dimensional array
19681 with 0 lower bounds as an szarray. Fixes #76973.
19683 * reflection.c (custom_attr_visible): Really fix this.
19685 2005-12-12 Zoltan Varga <vargaz@gmail.com>
19687 * reflection.c (custom_attr_visible): Allow nested public attributes
19690 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
19693 2005-12-12 Raja R Harinath <harinath@gmail.com>
19695 * class.c (set_generic_param_owner): Delete.
19696 (mono_class_create_from_typedef): Don't set ->owner field of
19697 generic parameters to "param containers" of enclosing classes.
19698 * reflection.c (mono_reflection_initialize_generic_parameter):
19701 2005-12-11 Zoltan Varga <vargaz@gmail.com>
19703 * reflection.c (custom_attr_visible): Fix build.
19705 2005-12-10 Zoltan Varga <vargaz@gmail.com>
19707 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
19708 private attributes.
19710 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
19711 handling of null parameter defaults.
19713 2005-12-09 Raja R Harinath <rharinath@novell.com>
19715 * class.c (mono_class_from_generic_parameter): Don't set
19716 klass->generic_container.
19717 (my_mono_class_from_generic_parameter): Likewise.
19719 2005-12-07 Zoltan Varga <vargaz@gmail.com>
19721 * reflection.c (load_public_key): Fix a warning.
19722 (method_encode_code): Fix unaligned accesses.
19724 2005-12-07 Martin Baulig <martin@ximian.com>
19726 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
19729 (write_generic_param_entry): Encode our custom attrs.
19731 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
19733 2005-12-07 Martin Baulig <martin@ximian.com>
19735 * reflection.c (encode_new_constraint): Removed; we don't use the
19736 `NewConstraintAttribute' anymore.
19738 2005-12-06 Zoltan Varga <vargaz@gmail.com>
19740 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
19741 not fire a TypeResolve event when Assembly.GetType () is called.
19743 2005-12-05 Ben Maurer <bmaurer@ximian.com>
19745 Beginning of support for nullable types in the runtime. Parts of
19746 this patch are from Martin.
19748 * appdomain.c (MONO_CORLIB_VERSION): Bump
19750 * domain.c (mono_init_internal): get the nullable type
19752 * class.c (mono_class_is_nullable): New method
19753 (mono_class_get_nullable_param): New mehod
19754 (mono_class_create_generic): In types T? set cast_class to T
19756 * class-internals.h (MonoDefaults): new nullable default class
19757 (mono_class_get_nullable_param, mono_class_get_nullable_param):
19760 2005-12-05 Raja R Harinath <rharinath@novell.com>
19762 * metadata.c (select_container): New. Refactor code to select the
19763 appropriate GenericContainer given the type of generic parameter
19764 we are looking for.
19765 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
19766 not a MonoGenericContext. Use select_container. Update parameters.
19767 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
19768 and MONO_TYPE_MVAR.
19769 (unwrap_arrays): Remove duplicate tests.
19770 (find_generic_param): Rename from 'has_same_context'. Now walks a
19771 generic instantiated class to find any arguments that are generic
19773 (mono_type_create_from_typespec_full): Use find_generic_param to
19774 avoid evicting some generic instantiations from the typespec
19777 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
19779 * reflection.c: fixed writing of doubles on ARM FPA.
19781 2005-12-02 Robert Jordan <robertj@gmx.net>
19783 * icall.c: Fixed EventInfo.ReflectedType (#76829).
19785 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19787 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
19788 least on SUSE 10 they are not the same (on debian, they are just the
19791 2005-12-01 Raja R Harinath <rharinath@novell.com>
19793 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
19794 DeclaringType for VARs and MVARs.
19795 * class.c (set_generic_param_owner): Fix initialization of owner
19798 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
19800 * icall.c: fixed Enum.ToObject() to correctly convert the values.
19802 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19804 * threadpool.c: workaround for a bug that shows up on the Mac:
19805 select()+connect() on a blocking socket is not like it should
19806 be, so we proceed to connect() in that case, wasting the I/O
19807 threadpool thread until connect succeedes. Fixes bug #75436.
19809 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19811 * threadpool.c: fix typo when setting file descriptor states.
19813 2005-11-28 Raja R Harinath <rharinath@novell.com>
19815 * class-internals.h (MonoGenericContainer.is_signature): Remove.
19816 * metadata.c (mono_metadata_parse_method_signature_full): Don't
19817 create a temporary signature container.
19818 (mono_metadata_parse_generic_param): Update to changes.
19819 (mono_type_create_from_typespec_full): Update to changes.
19820 * loader.c (method_from_memberref): Don't use a
19821 MonoGenericContainer while parsing a memberref signature.
19822 (method_from_methodspec): Remove dead-store of the 'container'
19823 variable. It's overwritten before use.
19825 * metadata.c (mono_type_create_from_typespec_full): Make debugging
19827 (mono_metadata_parse_generic_param): Likewise.
19828 * loader.c (find_method_in_class): Does not need a
19829 MonoGenericContainer. Use 'mono_method_signature' rather than
19830 'mono_method_signature_full'.
19831 (find_method, mono_get_method_constrained, method_from_memberref):
19834 * metadata.c (mono_type_create_from_typespec_full): Ensure that
19835 owner-less generic-parameters are never evicted from the typespec
19838 * loader.c (method_from_memberref): Don't use the current context
19839 when parsing signatures.
19840 (method_from_methodspec, mono_get_method_from_token): Update to changes.
19842 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
19843 side-effects in g_assert.
19844 * loader.c (mono_get_method_from_token): Resolve klass earlier so
19845 that we don't potentially lose information.
19847 2005-11-26 Dick Porter <dick@ximian.com>
19850 * threads.c: icalls to implement basic (ie, not named)
19851 System.Threading.Semaphore.
19853 2005-11-24 Dick Porter <dick@ximian.com>
19856 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
19857 Use GetProcessId() if it's available.
19859 2005-11-23 Zoltan Varga <vargaz@gmail.com>
19861 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
19863 2005-11-23 Raja R Harinath <rharinath@novell.com>
19864 Ankit Jain <jankit@novell.com>
19866 * loader.c (mono_get_method_from_token): Initialize 'method' field
19867 of all generic parameters before parsing the signature. Remove
19868 code that "fixed"-up MVAR references.
19870 2005-11-23 Ankit Jain <jankit@novell.com>
19872 * metadata.c (mono_metadata_has_generic_params):
19873 (mono_metadata_load_generic_param_constraints):
19874 (mono_metadata_load_generic_params): Move duplicate code ...
19875 (mono_metadata_get_generic_param_row): ... here. Returns the
19876 first row-id in GenericParam table for a given owner (token).
19877 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
19880 2005-11-23 Raja R Harinath <rharinath@novell.com>
19881 Ankit Jain <jankit@novell.com>
19883 * metadata.c (mono_metadata_class_equal): Pass signature_only when
19884 comparing VARs too.
19885 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
19886 type->data.generic_param only if the type is an MVAR.
19887 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
19888 leak owner-less VARs and MVARs into managed space.
19890 2005-11-21 Martin Baulig <martin@ximian.com>
19892 * class-internals.h
19893 (MonoMethod): Moved the `generic_container' here from
19894 `MonoMethodNormal' since we now also need it for
19895 `MonoMethodPInvoke';
19896 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
19897 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
19898 an union containing both `MonoMethodNormal' and
19899 `MonoMethodPInvoke'.
19902 (mono_get_method_from_token): Allow implementing generic methods
19906 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
19909 2005-11-17 Dick Porter <dick@ximian.com>
19913 * process.c: Split the Process Start_internal icall into
19914 ShellExecuteEx_internal and CreateProcess_internal, which are
19915 called depending on whether UseShellExecute is true. Fixes bug
19918 * appdomain.c (MONO_CORLIB_VERSION): Incremented
19920 2005-11-17 Zoltan Varga <vargaz@gmail.com>
19922 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
19923 'msize' parameters, use the information in 'mspec' instead.
19924 (emit_object_to_ptr_conv): Ditto.
19926 * marshal.c (emit_struct_conv): Handle explicit layout structs with
19927 fields out of order. Fixes #76733.
19929 2005-11-17 Ankit Jain <jankit@novell.com>
19931 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
19933 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
19935 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
19938 2005-11-16 Zoltan Varga <vargaz@gmail.com>
19940 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
19941 for types with non-auto layout. Fixes #76717.
19943 2005-11-16 Ankit Jain <jankit@novell.com>
19945 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
19946 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
19947 if generic_context is null.
19948 (mono_metadata_generic_param_equal): param->owner can be null.
19949 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
19952 2005-11-16 Zoltan Varga <vargaz@gmail.com>
19954 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
19957 2005-11-15 Martin Baulig <martin@ximian.com>
19959 * object.c (set_value): Use mono_class_from_mono_type() instead of
19960 the hack for generic instances; fixes #76136.
19962 2005-11-15 Zoltan Varga <vargaz@gmail.com>
19964 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
19967 * image.c (load_metadata_ptrs): Initialize the new fields.
19969 * reflection.c (create_dynamic_mono_image): Ditto.
19971 * reflection.c (build_compressed_metadata): Use the new fields.
19973 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
19976 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
19979 2005-11-15 Ankit Jain <jankit@novell.com>
19980 Raja R Harinath <harinath@gmail.com>
19982 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
19983 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
19984 new per-generic_container cache if the cached MonoType's context matches
19985 the current context.
19986 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
19987 to the expected context.
19988 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
19990 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
19992 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
19993 we changed the signature of an icall.
19994 * icall.c: Modify to mono_double_ParseImpl return true/false
19995 depending on the success, instead of throwing the exception. This will
19996 help us in Double.TryParse methods.
19998 2005-11-14 Zoltan Varga <vargaz@gmail.com>
20000 * marshal.c (emit_marshal_object): Throw an exception when
20001 marshalling 'object' instead of crashing. Fixes #76696.
20003 2005-11-11 Zoltan Varga <vargaz@gmail.com>
20005 * class-internals.h: Add prototype for mono_type_get_full_name ().
20007 2005-11-11 Dick Porter <dick@ximian.com>
20009 * threads.c (mono_thread_manage): Make sure the main thread has
20010 abandoned all its mutexes when cleaning up. Fixes bug 74680.
20012 2005-11-11 Zoltan Varga <vargaz@gmail.com>
20014 * loader.c (mono_loader_set_error_type_load): Log a warning to the
20015 console about the missing type.
20016 (mono_loader_set_error_method_load): Ditto.
20018 2005-11-09 Miguel de Icaza <miguel@novell.com>
20020 * mono-config.c (mono_get_config_dir): Set the system defaults if
20023 * assembly.c (mono_set_dirs): New API entry point to set the
20024 assembly and the config directory in one call
20026 2005-11-09 Zoltan Varga <vargaz@gmail.com>
20028 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
20029 the ftnptr was created from a delegate in a domain other than the
20030 current domain. Fixes #75377.
20032 * exception.h exception.c: Add mono_get_exception_not_supported ().
20034 2005-11-08 Martin Baulig <martin@ximian.com>
20036 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
20038 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
20040 * security-manager.h: Added definitions to deal with strongname key
20041 pairs bigger (and smaller) than 1024 bits.
20042 * reflection.c: Remove hardcoded strongname size (128 bytes) and
20043 adjust wrt the public key length being used.
20045 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
20047 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
20048 Windows build (r51396-51397).
20050 2005-11-03 Martin Baulig <martin@ximian.com>
20052 * class.c (mono_class_setup_vtable_general): Also add generic
20053 methods to the vtable; fixes #76581.
20055 2005-11-01 Miguel de Icaza <miguel@novell.com>
20057 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
20058 sure that we lookup GetString method from the System.Text.Encoding
20059 class, not the derived class or we get an empty method.
20061 Fixed class #76612.
20063 2005-10-25 Miguel de Icaza <miguel@novell.com>
20065 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
20066 if it has been previously set (embedders).
20068 Make mono_set_rootdir available also on Unix.
20070 005-10-24 Robert Jordan <robertj@gmx.net>
20072 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
20074 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
20076 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
20077 only calls which are made to native code use this flag.
20079 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
20081 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
20083 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
20084 Add support for FieldBuilders.
20086 2005-10-29 Martin Baulig <martin@ximian.com>
20089 (mono_debug_using_mono_debugger): New public method; returns
20090 whether we're running inside the debugger.
20092 2005-10-27 Zoltan Varga <vargaz@gmail.com>
20094 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
20095 for Method/Constructor/FieldBuilders.
20097 2005-10-26 Zoltan Varga <vargaz@gmail.com>
20099 * reflection.c (module_add_cattrs): Save custom attributes for global methods
20100 and fields as well.
20102 2005-10-26 Martin Baulig <martin@ximian.com>
20104 * mono-debug-debugger.c
20105 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
20107 2005-10-24 Raja R Harinath <harinath@gmail.com>
20109 * icall.c (base64_to_byte_array): Don't pass an out-of-range
20110 integer to isspace.
20112 2005-10-21 Zoltan Varga <vargaz@gmail.com>
20114 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
20115 when passing valuetypes byref. Fixes #76502.
20117 2005-10-19 Jackson Harper <jackson@ximian.com>
20119 * profiler.c: Don't put a . in front of types that are not in a
20122 2005-10-18 Zoltan Varga <vargaz@gmail.com>
20124 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
20126 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
20128 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
20130 (mono_marshal_get_ldflda_wrapper): Fix a warning.
20132 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20134 * assembly.c metadata-internals.h icall.c: Define an additional
20135 parameter for mono_assembly_name_parse_full, so we can avoid creating
20136 S.R.AssemblyName.Version when no version info wasn't passed.
20138 2005-10-09 Miguel de Icaza <miguel@novell.com>
20140 * class.c (mono_type_get_full_name): Reimplement method that was
20143 * image.c: Some docs
20145 2005-10-10 Zoltan Varga <vargaz@gmail.com>
20147 * profiler.c (output_newobj_profile): Fix printing of Total memory
20150 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
20152 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
20154 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
20156 * threads.c: remove debug output.
20158 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
20160 * threads.c (mono_thread_manage): Fix crashes if more than 64
20161 threads need to be aborted. Hopefully fixes #75899.
20163 * assembly.c (mono_stringify_assembly_name): New helper function.
20165 * class.c: Use mono_stringify_assembly_name instead of the similar
20168 * assembly.h assembly.c: Add support for calling a postload search
20169 hook if an assembly cannot be loaded.
20171 * appdomain.c: Register new search hooks which call the AssemblyResolve
20172 events in AppDomain. Fixes #75231
20174 2005-10-07 Martin Baulig <martin@ximian.com>
20176 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
20177 methods without debug info.
20179 2005-10-07 Zoltan Varga <vargaz@gmail.com>
20181 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
20184 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20186 * file-io.c: now that we return symlinks, use lstat and, when the file
20187 is a symbolic link, stat, to get the file attributes. Also avoid the
20188 conversion to/from utf16/external.
20190 2005-10-06 Zoltan Varga <vargaz@gmail.com>
20192 * class.c (mono_class_layout_fields): Compute klass->has_references
20193 correctly if an embedded valuetype is not yet initialized. Fixes
20196 2005-10-04 Martin Baulig <martin@ximian.com>
20199 (mono_metadata_load_generic_param_constraints): New public
20200 function; splitted the constraints loading out from
20201 mono_metadata_load_generic_params().
20203 * class.c (mono_class_create_from_typedef): Call
20204 mono_metadata_load_generic_param_constraints() after setting up
20205 the type and creating our parent; fixes #75329.
20207 2005-10-04 Martin Baulig <martin@ximian.com>
20209 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
20210 non-dynamic parent classes.
20212 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
20214 * file-io.c : win32 build fix (ETXTBSY seems not found).
20216 2005-10-04 Martin Baulig <martin@ximian.com>
20219 (mono_image_get_methodspec_token): Make the cache actually work;
20222 2005-10-04 Martin Baulig <martin@ximian.com>
20224 * class.c (mono_class_name_from_token): Removed the unneccessary
20225 `MonoGenericContext *' argument.
20227 2005-10-04 Martin Baulig <martin@ximian.com>
20230 (method_from_methodspec): Make the caching work again; fixes the
20231 performance regression from #76262.
20233 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20237 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
20238 GetFileSystemEntries that performs the same work but without going
20239 into io-layer, locking, etc.
20241 2005-09-30 Zoltan Varga <vargaz@gmail.com>
20243 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
20244 ThreadState_Stopped as well. Fixes #76047.
20246 2005-09-29 Martin Baulig <martin@ximian.com>
20249 (inflate_generic_context): If the new context has a `gmethod', set
20250 its `container' that that gmethod's `container'.
20253 (mono_metadata_parse_generic_param): Simplify things;
20254 `generic_container = generic_context->container;' is just fine.
20256 * loader.c (method_from_methodspec): Code cleanups.
20258 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
20260 * decimal.c: fix warning (and let gcc generate correct
20261 code on ARM with optimizations).
20263 2005-09-28 Martin Baulig <martin@ximian.com>
20266 (method_from_memberref): Added `MonoGenericContext *class_context'
20267 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
20268 (method_from_methodspec): If we're a memberref, use the enclosing
20269 context when parsing its parent. Fixes #76262; see gtest-206.cs.
20271 2005-09-28 Martin Baulig <martin@ximian.com>
20273 * object.c (mono_runtime_invoke_array): Added support for
20274 MONO_TYPE_GENERICINST; fixes #75917.
20276 2005-09-27 Martin Baulig <martin@ximian.com>
20278 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
20279 `k->byval_arg.type' to determine the actual type.
20281 * loader.c (method_from_methodspec): Removed some hacks.
20283 2005-09-27 Ben Maurer <bmaurer@ximian.com>
20285 * class-internals.h (mono_field_is_deleted): Do the test for
20286 rtspecialname before we check the actual name of the field. This
20287 prevents us from dereferencing a pointer into the string table,
20288 saving us from accessing a few pages
20290 * *.c: Replace the use of {Enter,Leave}CriticalSection with
20291 macros. This will allow a deadlock debugger to easily be plugged
20294 2005-09-27 Martin Baulig <martin@ximian.com>
20296 * loader.c (method_from_methodspec): Create a "signature"
20297 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
20299 2005-09-27 Martin Baulig <martin@ximian.com>
20302 (inflate_generic_class): Correctly set the new context's
20306 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
20307 instead of a `MonoGenericContext *'.
20308 (mono_method_signature_full): Take a `MonoGenericContainer *'
20309 instead of a `MonoGenericContext *'.
20312 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
20313 instead of a `MonoGenericContext *'.
20314 (mono_metadata_parse_method_signature_full): Likewise.
20316 2005-09-26 Martin Baulig <martin@ximian.com>
20319 (mono_class_from_generic_parameter): Set `klass->generic_container'
20320 (mono_class_from_generic_parameter): Likewise.
20321 (mono_bounded_array_class_get): We inherit the generic container
20322 from the element class.
20325 (find_method, find_method_in_class): Take a `MonoGenericContext *'
20326 argument rather than computing it here.
20327 (method_from_memberref): Correctly set the generic context before
20328 parsing the signature. Fixes #75681.
20330 2005-09-26 Zoltan Varga <vargaz@gmail.com>
20332 * object.c (mono_class_has_special_static_fields): Fix warnings.
20334 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20336 * assembly.c: Add parse_public_key function, to
20337 par the public keys. Also added mono_assembly_name_parse_full,
20338 to define it the parsed key should be freed or not.
20339 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
20340 to parse a long format assembly name.
20341 * metadata-internals.h: Keep mono_assembly_name_parse_full as
20342 private, since calling it to preserve the key requires
20343 freeing it manually.
20345 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
20347 * locales.c : removed HAVE_ICU part.
20349 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
20351 * object.c (mono_class_create_runtime_vtable): Avoid calling
20352 field_is_special_static if the klass has no special static fields.
20354 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
20355 (MonoCachedClassInfo): Likewise.
20357 * object.c (mono_class_has_special_static_fields): New helper function.
20359 2005-09-23 Zoltan Varga <vargaz@gmail.com>
20361 * class.c (mono_class_create_from_typedef): Don't call
20362 interfaces_from_typedef_full for enums.
20363 (mono_class_create_from_typedef): Compute the base types of enums directly
20364 without calling mono_class_setup_fields ().
20365 (mono_class_find_enum_basetype): New helper function.
20367 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
20368 one place inside the string heap.
20370 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
20372 * class.c: locking fixes, code cleanups, some docs added.
20373 Allocate some data structures in the image mempool.
20375 2005-09-23 Zoltan Varga <vargaz@gmail.com>
20377 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
20380 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
20382 * class-internals.h, class.c, reflection.c: reduce memory taken by
20385 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
20387 * metadata.c, metadata.h, loader.h: documentation updates, code and
20390 2005-09-23 Zoltan Varga <vargaz@gmail.com>
20392 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
20395 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
20396 page faults caused by the runtime while reading metadata.
20398 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20400 * socket-io.c: the field names were changed 3 months ago and no one
20401 realized until bug #76077 got filed!
20403 2005-09-20 Martin Baulig <martin@ximian.com>
20405 * icall.c (assembly_icalls): Removed some unused debugger icalls.
20407 2005-09-20 Martin Baulig <martin@ximian.com>
20409 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
20410 write the rank into the class entry.
20412 2005-09-20 Martin Baulig <martin@ximian.com>
20414 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
20416 2005-09-19 Zoltan Varga <vargaz@gmail.com>
20418 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20420 * icall.c (custom_attrs_defined_internal): New icall.
20422 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
20424 (mono_custom_attrs_construct_by_type): New helper function.
20426 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
20428 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
20429 terminate the resulting string. Fixes #76123.
20431 2005-09-16 Martin Baulig <martin@ximian.com>
20434 (mono_debug_add_method): Ignore inflated methods for the moment.
20436 2005-09-14 Martin Baulig <martin@ximian.com>
20438 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
20440 2005-09-13 Zoltan Varga <vargaz@gmail.com>
20442 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
20443 return a success/failure indication.
20444 (mono_metadata_interfaces_from_typedef_full): Ditto.
20445 (get_constraints): Ditto.
20447 2005-09-12 Zoltan Varga <vargaz@gmail.com>
20449 * marshal.c (emit_marshal_array): Fix handling of null arrays.
20451 * marshal.c (emit_marshal_array): Add support for returning string
20452 arrays from delegates. Fixes #76063.
20454 * marshal.c: Use the emit_ldloc/stloc macros where possible.
20456 2005-09-11 Zoltan Varga <vargaz@gmail.com>
20458 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
20461 2005-09-09 Zoltan Varga <vargaz@gmail.com>
20463 * reflection.c icall.c: Fix after mono_get_exception_type_load
20466 * assembly.c (mono_assembly_get_assemblyref): New helper function.
20467 (mono_assembly_load_reference): Use the new helper.
20469 * class-internals.h (MonoLoaderError): New structure containing
20470 information about type loading errors.
20472 * class-internals.h loader.c: Add APIs to store per-thread loader
20475 * loader.c class.c: Set the loader error if needed.
20477 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
20479 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
20481 * decimal.c: fixed to handle the broken ARM fp format.
20483 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
20485 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
20488 2005-09-06 Martin Baulig <martin@ximian.com>
20490 * domain.c (supported_runtimes): Added v2.0.50727.
20492 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
20494 * culture-info.h: reduce the size of some structures.
20496 2005-09-05 Martin Baulig <martin@ximian.com>
20498 Reflect latest API changes in the August CTP.
20501 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
20502 ("MonoType.HasGenericArguments"): Removed.
20503 ("MonoMethod.BindGenericParameters"): Renamed to
20504 "MakeGenericMethod".
20505 ("MethodBuilder.BindGenericParameters"): Renamed to
20506 "MakeGenericMethod".
20508 2005-09-05 Martin Baulig <martin@ximian.com>
20510 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
20512 2005-09-05 Martin Baulig <martin@ximian.com>
20514 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20516 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
20517 generic_container is non-NULL.
20519 2005-09-05 Martin Baulig <martin@ximian.com>
20521 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20523 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
20525 2005-08-29 Michal Moskal <malekith@nemerle.org>
20527 * reflection.c (encode_locals,
20528 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
20529 for large generic types.
20531 2005-09-05 Martin Baulig <martin@ximian.com>
20533 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20535 * class.c (mono_dup_array_type): New public method.
20536 (mono_metadata_signature_deep_dup): New public method.
20537 (dup_type): Correctly duplicate array and function types.
20539 2005-09-05 Martin Baulig <martin@ximian.com>
20541 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20543 * reflection.c (get_default_param_value_blobs): Handle generic types
20544 and generic methods.
20546 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
20548 * class.c: Fixed error reporting (method/class were inversed) for
20549 inheritance demands.
20550 * security-manager.c|h: Added the AppDomain when calling the managed
20551 System.Security.SecurityManager.InheritanceDemand method.
20553 2005-09-01 Raja R Harinath <rharinath@novell.com>
20555 * reflection.c (encode_marshal_blob): 'marshaltype' and
20556 'marshaltyperef' are alternate sources for the custom marshaler
20559 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
20561 * class.c: fix creation of array classes with rank == 1
20562 (patch by Ankit Jain <jankit@novell.com>).
20564 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
20566 * object.c: fix check for creating the bound data for arrays vs
20569 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20571 * object.c: configuration file name is now based on the executable name,
20572 not the image name. Fixes bug #75931.
20574 2005-08-29 Zoltan Varga <vargaz@gmail.com>
20576 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
20577 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
20579 2005-08-25 Zoltan Varga <vargaz@gmail.com>
20581 * rand.c: Use wincrypt.h instead of WinCrypt.h.
20583 2005-08-24 Ankit Jain <jankit@novell.com>
20584 Raja R Harinath <rharinath@novell.com>
20586 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
20587 called by it recursively.
20588 (mono_class_init): Remove special case in pending_init handling, since it's
20589 superseded by the fix to mono_class_from_typeref.
20591 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
20593 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
20594 BROKEN_THREAD_START stuff.
20596 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
20598 * class-internals.h object.c: Add a new kind of trampoline called a delegate
20601 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
20603 * object.c (mono_delegate_ctor): Replace the original function address with
20604 a delegate trampoline.
20606 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
20608 * icall.c: add boolean argument to base64_to_byte_array and
20609 InternalFromBase64String to control whether a whitespace-only string
20610 is allowed (or should casue a FormatException to be thrown). We need
20611 this as the behavior has changed between MS.NET 1.x and 2.0, and we
20612 to match the MS behaviour in both profiles.
20613 * appdomain.c: Bump corlib version.
20615 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20617 This patch implements a big portion of publisher policy
20618 support, used to bind assembly versions and redirect
20619 one assembly from version A to version B.
20622 New GSList loaded_assembly_bindings, for storing the cached
20624 (assembly_binding_maps_name): New static function for checking if a
20625 assembly binding information maps an assembly name.
20626 (mono_assembly_binding_info_free): New function for freeing
20627 assembly binding information resources.
20628 (get_publisher_policy_info): New static function for retrieving
20629 assembly binding information from a MonoImage.
20630 (compare_versions): New static function for comparing an assembly
20631 binding information data and the version of an assembly name.
20632 (check_policy_versions): New static function for checking if an
20633 assembly binding info mapping an assembly name is valid for it.
20634 (mono_assembly_load_publisher_policy): New static function for
20635 loading the 'policy.major.minor.MyAssembly' image for an assembly
20636 with an assembly name 'aname'.
20637 (mono_assembly_bind_version): New static function for updating
20638 assembly redirection.
20639 (mono_assembly_apply_binding): New static function for applying
20641 (search_binding_loaded): New static function for searching
20642 loaded assembly binding infos in the cache domain.
20643 (mono_assembly_load_full): Don't apply assembly binding for
20644 reflection only assemblies.
20646 * metadata-internals.h: Add MonoAssemblyBindingInfo,
20647 which contains information about assembly binding. Also
20648 declare signature for mono_config_parse_publisher_policy ()
20649 function, used to retrieve pub policy info.
20652 (publisher_policy_start): New static function used to parse publisher
20653 policy config files.
20654 (publisher_policy_parser): New static MonoParseHandler containing
20655 the functions used when parsing config files.
20656 (mono_config_parse_publisher_policy): New function for parsing
20657 publisher policy files.
20659 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
20661 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
20663 * marshal.c (mono_delegate_free_ftnptr): Ditto.
20665 * object.c (mono_get_addr_from_ftnptr): New helper function.
20667 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
20669 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20671 2005-08-19 Dick Porter <dick@ximian.com>
20673 * threads.c, threads.h, appdomain.c, appdomain.h,
20674 profiler-private.h, monitor.c, object.c, object-internals.h,
20675 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
20676 store the thread ID, so it can hold a 64 bit value if needed.
20678 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
20680 * reflection.c (mono_reflection_create_dynamic_method): Store the
20681 handle class into the method references as well so ldtoken works in
20684 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
20687 2005-08-19 Ankit Jain <jankit@novell.com>
20690 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
20691 here rather than using the method signature of a arbitrary function
20692 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
20694 Hack done with Harinath.
20696 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20698 * threadpool.c: disable printing stack traces when we get a exception
20699 in a threadpool thread. I need to do more testing to figure out which
20700 cases actually print this. Fixes bug #75828.
20702 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20704 * icall.c: there might be ignored whitespace after the last '='. This
20705 fixes length computation and bug #75840.
20707 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
20709 * assembly.c (mono_assembly_load_full): Consider .exe extension as
20710 well. Fixes #75809.
20712 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
20715 * reflection.c (create_custom_attr_data): Ditto.
20717 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
20719 * locales.c, culture-info.h : removed RegionLCIDMap.
20720 * culture-info-tables.h : regenerated.
20722 2005-08-16 Martin Baulig <martin@ximian.com>
20724 * class.c (mono_type_get_name_recurse): Small fix.
20726 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
20728 * locales.c : indentation fixie.
20730 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
20732 * object-internals.h,
20736 icall.c : added RegionInfo table support.
20737 * culture-info-table.h : regenerated for region support.
20739 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
20741 * reflection.c (resolve_object): handle all kinds of MonoMethod
20742 including generic ones
20744 2005-08-12 Ankit Jain <jankit@novell.com>
20746 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
20747 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
20749 2005-09-12 Lluis Sanchez <lluis@ximian.com>
20751 * process.c: Don't close a thread handle when it's NULL. This is a
20752 workaround for bug #75733.
20754 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
20756 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
20758 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
20760 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
20762 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20764 * threadpool.c: if a work item in the thread pool has a callback that
20765 catches a exception, don't propagate it after invoking the callback.
20768 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
20770 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
20772 * class-internals.h (MonoCachedClassInfo): Add some new fields.
20774 * class.c (mono_class_init): Load field info lazily in the AOT case.
20776 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
20778 2005-08-03 Ankit Jain <jankit@novell.com>
20781 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
20782 PInvoke calling convention is 0.
20784 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
20786 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
20787 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
20789 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
20791 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
20792 to handle threads not started by the GC (patch by Michael Meeks
20793 <michael.meeks@novell.com>).
20795 2005-07-31 Kamil Skalski <nazgul@omega.pl>
20797 * reflection.c: Make buffer used in emitting types larger for some
20798 big generic types (patch by Michal Moskal).
20800 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
20802 * mono-debug.c: Fix some (not all) alignment problems.
20804 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20806 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
20807 Invoke mono_image_load_from_data_full passing the refonly
20811 (mono_assembly_open_from_bundle): Add the refonly argument,
20812 in order to pass it to other methods it calls to.
20813 (do_mono_assembly_open): Add the refonly argument, in order
20814 to pass it to other methods it calls to.
20815 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
20816 the refonly parameter to it.
20818 * image.c: Add loaded_images_refonly_hash and
20819 loaded_images_refonly_guid_hash to cache the reflection
20820 only loaded images.
20821 (mono_images_init): Initialize the hash tables used for
20822 caching the reflection only images.
20823 (load_modules): Invoke mono_image_open_full passing the refonly
20824 parameter to load the modules the correct way.
20825 (build_guid_table): Add the refonly argument, to re-build the
20826 correct hash table.
20827 (do_mono_image_open): Added the refonly argument, in order to
20828 define it for the loaded image.
20829 (mono_image_loaded_full): New function, which receives an
20830 additional parameter to look for the image in the refonly or
20831 non-refonly section.
20832 (mono_image_loaded): Updated, using mono_image_loaded_full.
20833 (mono_image_loaded_by_guid_full): The same case that happens
20834 with mono_image_loaded_full.
20835 (mono_image_loaded_by_guid): Likewise.
20836 (register_image): Use the ref_only variable inside MonoImage
20837 to decide in which hash table store the current image.
20838 (mono_image_open_from_data_full): Rename
20839 mono_image_open_from_data to mono_image_open_from_data_full,
20840 adding the refonly argument, to define the ref_only variable
20842 (mono_image_open_from_data): Return
20843 mono_image_open_from_data_full.
20844 (mono_image_open_full): Rename mono_image_open to
20845 mono_image_open_full, receiving the new refonly argument,
20846 to pass it to inner methods.
20847 (mono_pe_file_open): Update this function, to open
20848 a MonoImage as a non-refonly image.
20849 (mono_image_close): Use the refonly variable inside
20850 MonoImage to remove the image from the correct caches.
20852 * image.h: Add the signatures of mono_image_open_full,
20853 mono_image_open_from_data_full, mono_image_loaded_full,
20854 mono_image_loaded_by_guid_full.
20856 * metadata-internals.h: Add the ref_only field to
20859 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20861 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
20862 Fix the last behavior, which used to load the assemblies and
20863 extract MonoReflectionAssemblyName information, instead of
20864 extract it from the metadata tables. Needed for Reflection
20867 2005-07-29 Martin Baulig <martin@ximian.com>
20869 * mono-debug-debugger.c
20870 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
20874 (mono_debug_address_from_il_offset): Check whether we have
20875 debugging support before attempting to take the lock.
20876 (mono_debug_source_location_from_address): Likewise.
20877 (mono_debug_source_location_from_il_offset): Likewise.
20878 (mono_debug_il_offset_from_address): Likewise.
20879 (mono_debug_address_from_il_offset): Likewise.
20881 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
20883 * class.c (mono_class_from_name_case): Add support for dynamic images.
20886 * object.c (mono_class_compute_gc_descriptor): Add a workaround
20889 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
20891 * reflection.c (mono_method_get_object): Fix warning.
20893 2005-07-28 Martin Baulig <martin@ximian.com>
20896 (mono_debug_add_wrapper): Also write the wrapper type.
20898 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
20900 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
20902 * class.c (mono_class_init): Avoid reading nested classes if the AOT
20903 data indicates the class has none.
20905 2005-07-26 Ben Maurer <bmaurer@ximian.com>
20907 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
20908 loader lock with the debugger lock. Prevents deadlocks for beagle.
20910 Beagle can now run on an smp box for a weekend without any
20913 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
20915 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
20916 in a module. Fixes #75629.
20918 2005-07-26 Martin Baulig <martin@ximian.com>
20920 * mono-debug.c (mono_debug_add_wrapper): New static method.
20921 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
20922 interncall or a wrapper.
20924 * mono-debug.h (MonoDebugWrapperData): New public typedef.
20925 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
20926 (MONO_DEBUGGER_VERSION): Bump to 51.
20928 * mono-debug-debugger.c
20929 (mono_debugger_add_type): Removed this empty function.
20930 (mono_debugger_add_method): Likewise.
20932 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
20934 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
20935 before accessing method->slot.
20937 2005-07-21 Jb Evain <jbevain@gmail.com>
20939 * reflection.c (method_encode_clauses/class): Handle filters clauses.
20942 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
20944 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
20947 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
20949 * image.h image.c: Add mono_image_get_guid () API function.
20951 2005-07-19 Ben Maurer <bmaurer@ximian.com>
20953 There were issues when multiple threads tried to load
20954 assemblies. A deadlock was created between assemblies_mutex and
20955 mono_domain_assemblies_lock. This fixes the issue by making the
20956 assembly ref counting be lock free. See bug 75586.
20958 * image.c (mono_image_close): The add ref function here was using
20959 Interlocked operations while the unref was using a mutex and a
20960 --. I don't think this was ever a bug that would be exposed in a
20961 non-pendantic way (ie, by an embedder doing a ref on one thread
20962 and an unref on another), but for the sake of correctness, this is
20965 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
20966 (mono_assembly_load_reference): Call mono_assembly_addref rather
20967 than touching the refcount ourselves.
20968 (mono_assembly_close): Use InterlockedDecrement to unref the
20969 assembly. Don't acquire the lock unless it is actually needed.
20971 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
20973 * class.c (mono_class_layout_fields): Fix calculation of has_references
20976 2005-07-12 Martin Baulig <martin@ximian.com>
20978 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20981 (mono_type_hash): Provide better hashing for generic instances.
20982 (mono_generic_inst_hash): Improve hashing.
20983 (mono_generic_class_hash): Likewise.
20985 * reflection.c (mymono_metadata_type_hash): Improve hashing for
20988 2005-07-12 Martin Baulig <martin@ximian.com>
20990 * reflection.c (mono_reflection_create_runtime_class): Remove the
20991 hack for generic type definitions and non-`Run' assemblies.
20992 (mono_reflection_bind_generic_parameters): Also use
20993 `klass->wastypebuilder' to check for TypeBuilders.
20995 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
20997 * class.c (mono_class_layout_fields): Fix calculation of has_references
21000 * class.c (inflate_generic_class): Fix a leak.
21001 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
21004 2005-07-11 Martin Baulig <martin@ximian.com>
21006 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
21009 2005-07-11 Martin Baulig <martin@ximian.com>
21011 * loader.c (find_method): Also lookup in
21012 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
21014 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
21016 * appdomain.c (mono_domain_unload): Don't free the error message
21017 before passing it to mono_get_exception_...
21019 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
21021 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
21023 * threads.c: try to better guess an available RT signal (bug #75387).
21025 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
21027 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
21030 2005-07-07 Martin Baulig <martin@ximian.com>
21032 * class.c (mono_type_get_name_full): Return NULL for
21033 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
21036 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
21038 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
21039 exit the appdomain as well being aborted.
21041 * threadpool.c: Create all threadpool threads inside the root appdomain, and
21042 change back to the root domain after calling managed code. This enables
21043 appdomains using threadpools to be unloaded.
21045 2005-07-07 Martin Baulig <martin@ximian.com>
21047 * class-internals.h
21048 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
21049 into `MonoDynamicGenericClass' since we only need it for dynamic
21052 * reflection.c (mono_class_bind_generic_parameters): We don't need
21053 to compute the `parent' here.
21055 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
21057 * culture-info-table.h : regenerated.
21059 2005-07-06 Martin Baulig <martin@ximian.com>
21062 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
21064 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
21066 2005-07-06 Martin Baulig <martin@ximian.com>
21068 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
21069 we're doing a signature-only comparision; fixes #74945.
21071 2005-07-06 Martin Baulig <martin@ximian.com>
21073 * class-internals.h (MonoGenericClass): Moved some things out into
21074 a new `MonoInflatedGenericClass' type.
21075 (MonoInflatedGenericClass): New type; the `klass' of a
21076 `MonoGenericClass' is now computed lazyly in
21077 mono_get_inflated_generic_class().
21079 * class.c (mono_get_inflated_generic_class): New public function.
21080 (mono_class_inflate_generic_method): Removed the unused
21081 `MonoClass *' argument.
21082 (setup_generic_vtable): Don't call mono_get_inflated_method() on
21084 (mono_class_create_generic): Make this static and merge it with
21085 mono_class_create_generic_2(); we're now called automatically from
21086 mono_get_inflated_generic_class().
21088 * loader.c (mono_method_signature): Call
21089 mono_get_inflated_method() here.
21091 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
21093 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
21094 type of fields with RVA.
21096 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
21097 for this pseudo class.
21098 (my_mono_class_from_generic_parameter): Likewise.
21099 (mono_class_init): Allow interfaces to have cctors.
21101 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
21103 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
21104 lazily for AOT methods.
21106 2005-07-05 Martin Baulig <martin@ximian.com>
21108 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
21109 returns FALSE for a successful match, not TRUE.
21111 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
21113 * loader.c (mono_method_get_index): Optimize this a bit.
21115 2005-07-04 Martin Baulig <martin@ximian.com>
21118 (class_compute_field_layout): Move the check for generic type
21119 definitions into mono_class_layout_fields(). Fixes #74684.
21120 (mono_class_from_generic_parameter): Correctly compute
21121 `klass->parent'; fixes #75457.
21123 * reflection.c (register_assembly, register_module): Make sure
21124 `domain->rejobject_hash' is already created.
21126 2005-07-02 Martin Baulig <martin@ximian.com>
21128 * class-internals.h
21129 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
21130 `MonoDynamicGenericClass'.
21132 2005-07-01 Lluis Sanchez <lluis@ximian.com>
21134 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
21135 returned by a field getter is null, since null is a valid value.
21137 2005-07-01 Martin Baulig <martin@ximian.com>
21139 * reflection.c (mono_reflection_generic_class_initialize): Update
21140 the `dgclass->fields [i].parent' to the correct class.
21141 (mono_image_get_fieldref_token): Use the declaring type, not the
21144 2005-07-01 Martin Baulig <martin@ximian.com>
21146 * loader.c (find_method): Also look in the interfaces; fixes #75429.
21148 2005-06-30 Ben Maurer <bmaurer@ximian.com>
21150 * threads.c (thread_cleanup): assert that thread != NULL
21151 (wait_for_tids_or_state_change): We were using the wrong variable
21152 when accessing wait->threads. `i' was always out of the bounds of
21155 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21157 * loader.c: map user32 and kernel32 to libMonoSupportW
21159 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
21161 * appdomain.c (unload_thread_main): Mark this as WINAPI.
21163 2005-06-28 Martin Baulig <martin@ximian.com>
21165 * loader.c (method_from_methodspec): Fix #75334.
21167 2005-06-28 Martin Baulig <martin@ximian.com>
21169 Fix #74953 - Arrays now implement the generic IList<T> interface
21170 on the 2.0 platform.
21172 * class-internals.h (MonoDefaults): Added `generic_array_class'.
21174 * reflection.c (mono_class_bind_generic_parameters): New public
21175 function; similar to mono_reflection_bind_generic_parameters(),
21176 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
21178 * domain.c (mono_init_internal): Try to initialize.
21179 `mono_defaults.generic_array_class' here; this'll only succeed if
21180 we're using the 2.0 corlib.
21183 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
21184 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
21185 (mono_lookup_internal_call): Added support for nested classes.
21188 (mono_get_method_from_token): Set `result->signature->pinvoke' if
21189 we're an interncall and have generic arguments.
21192 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
21193 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
21194 instance of System.Array.InternalArray<T> for arrays, so they
21195 implement the generic IList<T> interface.
21197 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
21199 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
21200 (chastamar@yahoo.com). Fixes #75374.
21202 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
21204 * culture-info-table.h: regenerated.
21206 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21208 * icall.c: handle spaces correctly for base64 strings.
21210 2005-06-26 Ben Maurer <bmaurer@ximian.com>
21212 * *.c: Kill some warnings.
21214 2005-06-23 Duncan Mak <duncan@novell.com>
21216 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
21217 that this builds on Solaris 10 (x86).
21219 2005-06-23 Martin Baulig <martin@ximian.com>
21222 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
21223 generic type definitions.
21225 2005-06-23 Martin Baulig <martin@ximian.com>
21229 * metadata.c (mono_class_get_overrides): Renamed to
21230 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
21231 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
21232 pass it to mono_get_method_full().
21234 2005-06-22 Ben Maurer <bmaurer@ximian.com>
21236 * reflection.c (mono_reflection_create_runtime_class): take the
21237 mono_domain_lock in this method. Prevents deadlocks
21239 2005-06-22 Martin Baulig <martin@ximian.com>
21241 * loader.c (method_from_methodspec): Fix #75330.
21243 2005-06-22 Martin Baulig <martin@ximian.com>
21245 * reflection.c (type_get_qualified_name): Use
21246 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
21247 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
21248 argument; use it if we don't have an assembly name.
21250 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
21252 * object.c: In mono_message_init, set "copy out" flag for in
21253 parameters with the [Out] flag.
21255 2005-06-21 Martin Baulig <martin@ximian.com>
21258 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
21261 2005-06-21 Martin Baulig <martin@ximian.com>
21263 * class.c (mono_class_init): Don't initialize `class->fields' for
21264 generic instances since they're initialized again in
21265 compute_field_layout().
21266 (compute_field_layout): Set the field's `generic_info' here; fix
21269 2005-06-21 Martin Baulig <martin@ximian.com>
21271 * class-internals.h
21272 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
21274 * metadata.c (mono_metadata_generic_method_equal): Also
21275 distinguish the `generic_class'; fixes #75334.
21277 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21281 * domain-internals.h:
21282 * reflection.c: 'domain_assemblies' field is now protected by its own
21283 lock. Don't call into managed code to run the AssemblyLoad event if we
21284 now there are no registered delegates for it.
21286 2005-06-20 Martin Baulig <martin@ximian.com>
21288 * class.c (mono_class_is_assignable_from): Use a custom version of
21289 mono_class_has_parent() to make things work for generic instances;
21292 2005-06-20 Martin Baulig <martin@ximian.com>
21294 * loader.c (method_from_methodspec): Apply a patch from
21295 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
21297 2005-06-20 Martin Baulig <martin@ximian.com>
21299 * class.c (mono_class_init): Reverted Zoltan's last change; it
21302 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
21304 * threads.c (wait_for_tids_or_state_change): Add missing locking.
21306 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21308 * socket-io.c: fix the index in the socket array for writable/error
21309 sockets. Fixes bug #75306.
21311 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
21313 * class.c (mono_class_init): Allow interfaces to have static ctors.
21315 2005-06-17 Martin Baulig <martin@ximian.com>
21317 * loader.c (method_from_methodspec): Use `context->container' when
21318 parsing the `gmethod->inst'.
21320 2005-06-17 Martin Baulig <martin@ximian.com>
21322 * class.c (mono_type_get_name_recurse): Don't add the assembly
21323 name for type arguments.
21325 2005-06-15 Martin Baulig <martin@ximian.com>
21327 * reflection.c (mono_image_get_inflated_method_token): Encode
21328 correct klass; fixes #75260.
21330 2005-06-13 Michal Moskal <malekith@nemerle.org>
21332 * icall.c: Make GetCorrespondingMethod/Constructor take
21333 MonoReflectionMethod method not MonoMethod. Removed
21334 MonoType.GetCorrespondingField, and make
21335 MonoGenericType.GetCorrespondingField take name not
21338 2005-06-13 Michal Moskal <malekith@nemerle.org>
21340 * reflection.c (field_encode_signature, encode_locals):
21341 Make sizes of buffers for types larger (for big generic types).
21342 (create_generic_typespec,
21343 mono_reflection_sighelper_get_signature_local,
21344 mono_reflection_sighelper_get_signature_field):
21345 Add asserts for too small buffers.
21347 2005-06-15 Martin Baulig <martin@ximian.com>
21349 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
21350 if our parent is not a dynamic type.
21352 2005-06-15 Martin Baulig <martin@ximian.com>
21354 * class-internals.h (MonoTypeNameFormat): New enum.
21357 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
21358 (mono_type_get_full_name): Removed.
21359 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
21360 argument instead of the boolean's.
21362 * icall.c (ves_icall_System_MonoType_getFullName):
21363 Added `gboolean assembly_qualified'.
21366 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
21368 * reflection.c (mono_reflection_parse_type): Parse the new type
21371 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21373 * icall.c: no need to convert from utf16 to utf8 and then back again
21374 after the call to GetLogicalDrives.
21376 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21378 * icall.c: frombase64. Fix problems exposed by new tests.
21380 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21382 * icall.c: added internal calls for converting char [] and strings in
21383 base64 into byte [].
21385 2005-06-10 Martin Baulig <martin@ximian.com>
21387 * class.c (mono_class_create_generic_2): Read the nested classes
21388 from the metadata rather than from `gklass->nested_classes' since
21389 `gklass' might not be initialized yet.
21391 2005-06-09 Duncan Mak <duncan@novell.com>
21393 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
21394 all public headers. Fixes #74919.
21396 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
21398 * domain.c: The key for proxy_vtable_hash is now a pointer
21399 array. Added new GHashFunc and GCompareFunc functions for this.
21401 * class.h: The list of interfaces in MonoRemoteClass is known in
21402 advance and can't grow (we create a new MonoRemoteClass if needed),
21403 so now the interface array can be allocated together with
21406 * object.c: Added a new method create_remote_class_key.
21407 Fixed mono_remote_class so it does not depend on
21408 mono_upgrade_remote_class.
21409 Removed extend_interface_array.
21410 Added new method clone_remote_class(), which makes a copy of a remote
21411 class and adds a new interface or class to it.
21412 mono_upgrade_remote_class() now creates a new remote class (or gets
21413 it from the cache) if an vtable upgrade is needed. In this way
21414 we make sure that other objects sharing the same remote class
21415 don't get the new vtable with unwanted interfaces.
21417 * object-internals.h:
21418 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
21420 * marshal.c: Track changes in mono_upgrade_remote_class().
21422 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
21423 * icall.c: Add runtime methods for obtaining members of inflated
21424 class, which were created from supplied non-inflated members. It
21425 is used in internal Get{Method,Constructor,Field} methods in
21428 2005-06-09 Martin Baulig <martin@ximian.com>
21431 (mono_reflection_bind_generic_method_parameters): Fix #75169.
21433 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
21434 * reflection.c (mono_image_basic_init): Define
21435 Version in MonoDynamicAssembly.
21437 2005-06-08 Martin Baulig <martin@ximian.com>
21442 (mono_method_signature_full): New public method; takes a
21443 `MonoGenericContext *'.
21444 (find_method): Use mono_method_signature_full() and pass the
21445 klass'es context to it.
21447 * class.c (mono_class_is_inflated_method): Use
21448 mono_method_signature_full() and pass the context to it.
21450 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
21452 * object.c: add proper locking in mono_remote_class_vtable(),
21453 fixes possible memory corruption.
21455 2005-06-08 Michael Meeks <michael.meeks@novell.com>
21457 * marshal.c (mono_remoting_marshal_init): set
21458 initialized after initialization.
21460 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
21462 * locales.c : hush.
21464 2005-06-06 Michael Meeks <michael.meeks@novell.com>
21466 * object.c (extend_interface_array): fix really silly
21467 memory corrupting / comparison bug.
21469 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
21471 * reflection.c: Functions added to support the creation
21472 of CustomAttributeData, which includes Attribute data
21473 used by ReflectionOnly methods.
21475 * reflection.h: mono_reflection_get_custom_attrs_data and
21476 mono_custom_attrs_data_construct added (functions exposed).
21478 * icall.c: Added mono_reflection_get_custom_attrs_data
21481 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
21483 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
21486 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
21488 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
21490 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
21491 dynamic DllImportAttribute.
21493 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
21494 dynamic DllImportAttribute.
21496 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
21499 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21501 * threads.c: avoid segfault when an unstarted thread is aborted.
21503 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
21505 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
21506 Returns the name and version of the runtime for reporting.
21508 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21510 * appdomain.c: bump corlib version.
21511 * object-internals.h: new field in MonoReflectionAssembly.
21513 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21515 * object-internals.h: Carlos forgot to add this field.
21517 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
21519 * icall.c: Added create_version to create instances
21520 of Version of MonoReflectionAssemblyName. This change helps
21521 the AssemblyName tests to keep running fine.
21523 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
21525 * object.c (mono_method_return_message_restore): A somehow less
21526 intrusive fix for #75138.
21528 2005-06-03 Raja R Harinath <rharinath@novell.com>
21530 * object.c (mono_method_return_message_restore): Fix computation
21531 of expected number of out args.
21533 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
21535 * reflection.c (mono_image_get_method_info): Fix the case when the
21538 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
21540 * object.c: Added missing null check in
21541 mono_method_return_message_restore.
21543 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
21545 * reflection.c (mono_image_get_method_info): Handle the case when
21548 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
21550 * object.c: When creating the vtable for a proxy, take into account
21551 all inherited interfaces, not only the ones registered in
21552 iclass->interfaces. This fixs bug #74996.
21553 Also, in mono_method_return_message_restore, verify that the array
21554 of out args has the expected lengh.
21556 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21558 * socket-io.c: update the timeout in Poll when the call is interrupte.
21560 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21562 * socket-io.c: support abort/suspend in Select_internal after last
21565 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21567 * threadpool.c: remove warning.
21569 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21572 * socket-io.[ch]: Select_internal uses poll() now when available, thus
21573 removing the 1024 limit from select(). Runtime part of the fix for
21576 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21578 * socket-io.c: when resolving the addresses for the same
21579 host returned by gethostname(), get the local IPs from the interface
21580 list. Loopback addresses are discarded if the are interfaces up with
21581 non-loopback ones. Fixes bug #63265.
21583 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
21585 * appdomain.c, verify.c, object-internals.h, reflection.c:
21586 bumped corlib number to 36, and added new extra_flags field
21587 to ReflectionMethodBuilder and friends. Fixes #75060.
21589 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
21591 * gc.c: register a new weak link only if the object is non-null
21594 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
21596 * culture-info.h : short time pattern too.
21598 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
21600 * culture-info.h : expand long time pattern string length.
21602 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
21604 * culture-info-table.h : update (more French date format; #72788).
21606 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
21608 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
21609 the method is static. Fixes #75029.
21611 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
21613 * reflection.c: Update the table_idx field of method builders after
21614 saving the module, since it can change. This is a workaround for
21617 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
21619 * culture-info-table.h : update (additional French date format).
21621 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
21623 * icall.c (ves_icall_type_Equals): Revert last change.
21625 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
21627 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
21629 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
21631 * class-internals.h: Added executioncontext_class field to
21632 MonoDefaults structure.
21633 * domain.c: Cache System.Threading.ExecutionContext class in
21635 * object.c: Capture the ExecutionContext for asynchroneous calls in
21636 mono_async_result_new.
21637 * object-internals.h: Added execution_context and original_context
21638 fields to MonoAsyncResult. Added execution_context to MonoThread.
21639 * security-manager.c|.h: Added mono_get_context_capture_method to
21640 return the capture method (if required by the security manager or by
21641 the framework version used).
21642 * threadpool.c: Apply capture (if present) ExecutionContext in
21643 mono_async_invoke and revert to original context after it completes.
21645 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
21647 * culture-info-table.h : updated (real hacky solution for zh-CHT).
21649 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
21651 * culture-info-table.h : zh-CHT related workaround.
21653 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
21655 * marshal.c (emit_marshal_custom): Add some error checking and call the
21656 methods in the ICustomMarshaler interface. Fixes #74875.
21658 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
21659 native->managed wrappers.
21661 2005-05-12 Martin Baulig <martin@ximian.com>
21663 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
21664 here and use the loader lock.
21666 * mono-debug.c: Properly lock when the debugger is not attached.
21667 (mono_debug_init): Release the initial lock if we're not running
21670 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
21672 * marshal.c (emit_marshal_custom): Pass through NULL values without
21673 calling the custom marshalling routines.
21675 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
21676 conversion in structures. Fixes #74882.
21678 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
21680 * culture-info-table.h : zh-* cultures were missing.
21682 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
21684 * threads.c: Added a new event background_change_event which is signaled
21685 when a thread changes its background mode.
21686 Moved here several checks previously done in managed code. The checks
21687 require the thread lock, and using the thread lock in managed code
21688 can result in deadlocks.
21689 Merged Start_internal and Thread_internal into a single method. Now
21690 Thread_internal does all work of creating and starting a thread.
21691 Added icalls for setting and getting the state of the object. Moved from
21692 managed code to avoid locking there.
21693 Added wait_for_tids_or_state_change() which is called instad of
21694 wait_for_tids when waiting for non-backround threads to end. This method
21695 will return if one of the threads ends or the background_change_event
21697 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
21698 the background mode. This method signals the background_change_event
21701 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
21702 removed Start_internal.
21704 2005-05-11 Martin Baulig <martin@ximian.com>
21706 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
21707 to order of some fields to get proper alignment on 64-bit machines.
21709 2005-05-11 Martin Baulig <martin@ximian.com>
21711 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
21712 changes as they're broken and completely fuck up the debugger.
21714 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
21716 2005-05-10 Martin Baulig <martin@ximian.com>
21718 * reflection.c (mono_reflection_generic_class_initialize): Don't
21719 call mono_class_setup_parent() here.
21721 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21723 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
21724 send/receive timeout use an integer in milliseconds. We were using a
21727 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21730 (internal_get_cultures): reserve the first slot of the array for the
21731 InvariantCulture, which will be filled in managed code.
21733 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
21735 * reflection.c (mono_image_fill_module_table): Initialize the
21736 GENERATION field as well.
21738 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21740 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
21741 Monitor.Enter on the object.
21743 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
21745 * threads.c: Enable the wait for running threads when exiting.
21746 * icall.c: Suspend all threads before exiting.
21748 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
21750 * assembly.c (mono_assembly_load_reference): Fix warning.
21752 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21754 * threadpool.c: changed the default number of threads per cpu. From now
21755 on, the default will be 20 + (5 * number of cpus) instead of 50.
21757 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
21759 * loader.c (mono_method_get_signature_full): Add locking here.
21761 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
21763 * appdomain.c: Moved methods for parsing and freeing assembly
21764 names to assembly.c.
21765 * assembly.c, domain-internals.h: Created public methods for parsing
21766 assembly names. Fixed mono_assembly_load_with_partial_name:
21767 it now finds the best match, taking into account the version,
21768 token and culture specified in the partial name. Also return
21769 the latest version if no version information is specified.
21771 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
21773 * threadpool.c: replace check for SocketAsyncCall class.
21775 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21777 * threadpool-internals.h:
21778 * Makefile.am: added threadpool-internals.h
21780 * threadpool.c: call mono_unhandled_exception on exceptions not handled
21781 that happen in threadpool threads (tested on MS).
21782 (mono_thread_pool_remove_socket): new function that dispatch any pending
21783 AIO call on a socket that is closing. By now only epoll really needs it,
21784 as select/poll wake up when the socket closes.
21787 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
21789 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
21791 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
21793 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
21795 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
21797 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
21799 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
21800 has an abort request, convert it into a suspend request.
21802 2005-04-30 Ben Maurer <bmaurer@ximian.com>
21804 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
21805 warning for the usage of `UnmanagedFunctionPointerAttribute' which
21806 is not supported yet.
21808 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21810 * image.c: register assemblies loaded from data (bundles) in the loaded
21811 assemblies hash. Fixes bug #74772.
21813 2005-04-29 Martin Baulig <martin@ximian.com>
21815 * class.c (mono_type_get_name_recurse): Update to the new naming
21816 schema from the latest .NET 2.x beta2.
21817 (mono_class_setup_vtable_general): If we're a generic instance,
21818 copy the vtable from our generic type definition and inflate all
21821 * loader.c (find_method): Update to the new naming schema from the
21822 latest .NET 2.x beta2.
21824 2005-04-29 Raja R Harinath <harinath@gmail.com>
21826 * class.c (mono_class_init): Add a mono_loader_unlock to the
21829 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
21831 * icall.c (ves_icall_System_Environment_Exit): Remove the
21832 suspend_all_other_threads () call for the time being, since it can hang.
21834 * threads.c (mono_thread_manage): Similarly, disable the waiting for
21835 the background threads to exit, since it can also hang.
21837 * class.c (mono_class_init): Applied patch from Ankit Jain
21838 (radical@gmail.com). Avoid pending init errors when a field refers
21839 to a nested class using a typeref. Fixes #74734.
21841 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
21842 this for dynamic modules.
21844 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21846 * threads.c: don't wait for threads that are in the process of aborting
21847 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
21848 and waiting for background threads to finish. This makes xsp and
21849 mod-mono-server exit without random length delays and/or hangs.
21851 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21853 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
21855 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
21857 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
21858 dynamic types to prevent infinite loops. Fixes #74727.
21860 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
21861 ..._is_assignable_to.
21863 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
21865 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
21867 2005-04-25 Martin Baulig <martin@ximian.com>
21869 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
21872 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
21874 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
21876 * reflection.c (build_compressed_metadata): Set metadata header
21879 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
21881 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
21882 number into an integral and a decimal part. Fixes #70473.
21884 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
21886 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
21888 * culture-info-table.h : reflected the latest locale-builder output.
21890 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21892 * threadpool.c: check for SuspendRequested too when deciding if
21893 mono_thread_interruption_checkpoint should be called.
21895 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21897 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
21898 * threads.c: remove interruption_mutex and use Interlocked instead. When
21899 suspending all the threads, wait for all the suspended events at once.
21900 If we're shutting down and get an APC that is going to be queued,
21901 call mono_thread_execute_interruption immediately, as the thread might
21902 be sleeping on a pthread condition or mutex.
21904 * icall.c: call mono_runtime_set_shutting_down before suspending the
21907 Fixes bug #74693. And now xsp is happier when exiting.
21909 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
21911 * loader.c (mono_stack_walk): Fix #74690.
21913 2005-04-22 Martin Baulig <martin@ximian.com>
21915 * mono-debug.h (MonoDebugMethodJitInfo): Added
21916 `MonoDebugMethodJitInfo *jit'.
21918 * mono-debug.c (mono_debug_read_method): Cache the
21919 MonoDebugMethodJitInfo in `address->jit'.
21920 (mono_debug_free_method_jit_info): New public method.
21922 2005-04-22 Martin Baulig <martin@ximian.com>
21924 * class.c (mono_class_is_assignable_from): Disallow
21925 type parameter -> interface.
21927 2005-04-21 Dick Porter <dick@ximian.com>
21929 * threads.c (mono_thread_create): Turn an assertion into an error.
21931 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
21933 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
21935 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
21936 Fix some gcc 4.0 warnings.
21938 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
21940 * file-io.c: fix alt dir separator char on unix systems
21941 and cleanup (fixes bug #71214).
21943 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
21945 * marshal.c: Use CALLVIRT instead of CALL when dispatching
21946 a call to a remote domain, since the method may be an
21947 interface method in the client domain. This fixes bug #74192.
21949 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21951 * threadpool.c: recv/send are now performed before going back to managed
21952 code to save one transition.
21954 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21956 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
21958 * metadata/threadpool.c: removed hack to workaround the bug above.
21962 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
21964 * reflection.c reflection.h: Fix handling of parameter defaults in
21965 dynamic methods. Also fixes handling of parameter attributes.
21968 * mono-debug.c (mono_debug_close_image): Fix warning.
21970 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21972 * socket-io.h: replaced old unused field with new 'blocking'.
21973 * threadpool.c: restore socket blocking state on windows(tm).
21975 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
21977 * icall.c: don't return the codebase in the AssemblyName[] returned by
21978 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
21979 * object-internals.h: Removed FIXME (fields were presents) and fixed
21980 versioncompat declaration.
21982 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21984 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
21985 not closed, so don't cleanup when it happens.
21987 2005-04-13 Chris Toshok <toshok@ximian.com>
21989 * mono-debug-debugger.h: change prototype for
21990 mono_debugger_lookup_type.
21992 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
21993 this function, although it should probably be named
21994 mono_debugger_init_type.
21996 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21998 * threadpool.c: fix non-AIO case.
22000 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
22002 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
22003 the built-in profiler to measure just JIT compilation times.
22005 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22007 * threadpool.c: the epollfd might be closed by another thread at
22008 any time, so ignore EBADF at treat it as a "we're closing" sign.
22010 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22012 * threadpool.c: release the semaphores with a count equals to the number
22013 of working threads in both IO and regular pools. Fixed typo that messed
22014 up the count of IO pool threads. Don't initialize the pipe handles if
22017 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22019 * threadpool.c: some systems don't like a NULL when deleting the socket
22022 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22024 * threadpool.c: fix semaphore allocation.
22026 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22028 * threadpool.c: added epoll() based implementation for asynchronous IO
22029 that is used instead of the default poll() when available.
22030 It can be disabled by setting MONO_DISABLE_AIO.
22032 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22034 * threadpool.c: windows needs 'closesocket' and instead of returning
22035 0 when the stream is closed while in select, it returns -1. Fixes bug
22038 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
22040 * class.c (class_compute_field_layout): Fix the regression caused by
22043 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22045 * threadpool.c: separate pool for socket async. IO.
22046 * threadpool.h: mono_max_worker_threads is not a global any more.
22048 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
22050 * class.c (class_compute_field_layout): Fix #74549.
22052 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22054 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
22055 use 2 connected sockets instead.
22057 2005-04-08 Miguel de Icaza <miguel@novell.com>
22059 * mono-config.c: Add new entry point for mkbundle
22060 mono_config_parse_memory.
22062 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22064 * threadpool.c: removed another unused function.
22066 2005-04-08 Ankit Jain <radical@corewars.org>
22068 * reflection.c (get_default_param_value_blobs): Add 'types'
22069 parameter to get the types encoded in the constant table.
22070 (mono_param_get_objects): Use the type from the constant table,
22071 not the type of the parameter, when creating default values.
22072 Handle null default values correctly.
22074 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22081 * socket-io.c: removed dead code for async IO.
22083 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22085 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
22087 * threadpool.c: intercept socket async. calls and pass them to a thread
22088 that is polling and dispatching the job items to the threadpool as
22089 socket become ready. Fixes bugs #71217, #71933.
22091 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
22092 between char and short/ushort arrays.
22094 * socket-io.c: remove dead code.
22096 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
22099 icall.c : removed InternalToUpper_Comp() and
22100 InternalToLower_Comp().
22102 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
22104 * char-conversions.h : The tables were incorrectly generated. Should
22105 be generated against invariant culture.
22107 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
22109 * object.c (mono_runtime_invoke_array): Fix return value when
22110 passing pre-created valuetype objects to ctors.
22112 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
22113 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
22116 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
22118 * domain.c: removed g_assert for runtimesecurityframe_class. This is
22119 only used with --security and hides the wrong corlib version error.
22121 2005-03-30 Joshua Tauberer <tauberer@for.net>
22123 * class.c: Changed mono_class_name_from_token so that types
22124 outside of a namespace don't have an initial period. Improved
22125 the g_warning message used in _mono_class_get when loading
22127 * assembly.c: In mono_assembly_load_reference, when an assembly
22128 can't be found, "No such file or directory" is misleading and
22129 unhelpful because a few paths were checked for the presence of
22130 the assembly. When that happens (ENOENT), display a nicer
22131 message indicating the directories that were searched. In all
22132 cases, the warning is made easier to read for non-hackers.
22134 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
22136 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
22138 * appdomain.h|domain.c: Removed inline from functions.
22139 * appdomain.c: Reduced warnings when compiling on windows.
22140 * icall.c: Fixed output_debug declaration to gunichar2*.
22141 * mono-config.c: Reduced warnings when compiling on windows.
22142 * rand.c: Added missing "windows.h". Added missing return value.
22143 * rawbuffer.c: Added missing winsock2.h for windows.
22144 * sysmath.h: Added mono-compiler.h header to allow/ease
22145 compilation with non-GCC compilers.
22146 * threads.c: Fixed declarations to compile with VS.NET C compiler.
22147 Removed cast warnings.
22149 Adapted from the work of J Lothian (for VC6).
22151 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
22153 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
22156 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
22158 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
22161 2005-03-27 Raja R Harinath <harinath@gmail.com>
22163 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
22164 has to be in $(exec_prefix). $(prefix) is for arch-independent
22165 stuff, and it would probably use $(prefix)/share rather than
22168 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22170 * console-io.c: added 2 includes that might be missing.
22172 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
22174 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
22177 * reflection.c (create_custom_attr): Allocate the params array using
22178 alloca so it gets GC tracking.
22180 2005-03-23 Chris Toshok <toshok@ximian.com>
22182 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
22185 2005-03-24 Raja R Harinath <rharinath@novell.com>
22187 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
22188 changes to pick up any changes in prefix, etc.
22190 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
22192 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
22194 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
22195 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
22197 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
22199 * class-internals.h object-internals.h class.c reflection.c: Extend the
22200 mono_lookup_dynamic_token () function to return the class of the
22203 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
22204 well. Fixes #73848.
22206 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
22208 * security-manager.c: Skip inheritance checks for intra-corlib
22209 class inheritance and method overrides. This skips a lot of checks
22210 and (anyway) permissions cannot work until corlib is loaded.
22212 2005-03-23 Martin Baulig <martin@ximian.com>
22214 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
22215 MONO_TYPE_GENERICINST.
22217 2005-03-23 Martin Baulig <martin@ximian.com>
22219 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
22221 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
22223 * class.c: added locking comments to some functions.
22224 Cache the interface offsets arrays (saves about 20 KB
22225 of runtime memory in a typical app).
22226 Reduce the time overhead in mono_class_setup_supertypes ().
22228 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
22230 * icall.c: speedup and fix leaks in GetMethodsByName and
22231 GetPropertiesByName.
22233 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
22235 * reflection.c: some locking fixes.
22237 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
22239 * metadata.c: added missing break in case statement.
22241 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
22243 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
22244 typedbyref return values. Fixes #73941.
22246 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
22248 * security-manager.c|h: Added demandunmanaged method and
22249 suppressunmanagedcodesecurity class to MonoSecurityManager.
22250 Renamed aptc class to allowpartiallytrustedcallers.
22252 2005-03-17 Martin Baulig <martin@ximian.com>
22254 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
22256 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22258 * file-io.c: disabled file async. IO using aio_*. It uses the
22259 threadpool now. Workaround for bug #73718.
22261 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
22263 * assembly.h, mono-config.c: added code to deal with bundled configs
22264 for bundled assemblies.
22266 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
22268 * *.c, private.h: cleanup, removing old private.h header file.
22270 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
22272 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
22273 and throw_on_unmappable_char attributes.
22275 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
22277 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
22278 _ProcessName_internal.
22280 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
22282 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
22285 * icall.c threads.c threads-types.h: Remove slothash icalls as they
22286 are no longer used.
22288 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
22290 * object.c (compute_class_bitmap): Add support for generics. Fixes
22293 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
22295 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
22297 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22299 * filewatcher.c: commented out the code for windows watcher, as we don't
22300 use it (we use the managed implementation instead).
22302 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
22304 * object-internals.h (MonoThread): Remove 'unused1' field.
22306 * appdomain.c: Bump corlib version.
22308 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
22310 * reflection.c (mono_reflection_create_runtime_class): Remove the
22311 AssemblyBuilder.Save optimization since it causes too many problems.
22313 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
22315 * exception.c|h: Added mono_get_exception_reflection_type_load to
22316 create a ReflectionTypeLoadException object.
22317 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
22318 to return NULL is a InheritanceDemand fails during reflection. Updated
22319 ves_icall_System_Reflection_Assembly_GetTypes to throw a
22320 ReflectionTypeLoadException if an InheritanceDemand fails during
22321 reflection. Added icall mapping for GetLinkDemandSecurity.
22322 * security-manager.c|h: Added ves_icall_System_Security_
22323 SecurityManager_GetLinkDemandSecurity internal call to return the
22324 class and methods permissions set for a LinkDemand. Removed unused
22325 fields in MonoSecurityManager.
22327 2005-03-10 Martin Baulig <martin@ximian.com>
22329 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
22330 it's a generic instance.
22332 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
22334 * reflection.c (mono_get_object_from_blob): Applied patch from
22335 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
22337 * class.c (mono_class_is_assignable_from): Another try at fixing
22338 #73469 without breaking anything.
22340 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
22342 * class.c: (mono_class_is_assignable_from): Revert the last changes
22343 since they don't work with generics.
22345 * class.c (mono_class_is_assignable_from): Fix build bustage.
22347 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
22348 the managed IsAssignableFrom method. Fixes #73469.
22350 * reflection.c (mono_reflection_call_is_assignable_from): New helper
22353 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
22355 * object.c (mono_load_remote_field_new): Fix returning uninitialized
22356 memory when the remoting callback does not sets the out arguments.
22359 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
22362 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
22364 * object-internals.h (MonoStackFrame): Sync with managed object layout.
22366 * appdomain.c: Bump corlib version.
22368 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
22370 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
22373 * threads.c (mono_thread_attach): Detect threads which are not started
22374 by the GC pthread wrappers.
22376 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
22378 * icall.c: Added new icall for RNG.
22379 * rand.c|h: Added new icall to open the RNG. This allows to share a
22380 single handle on Linux to access /dev/urandom and fix #73183.
22382 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
22384 * object.c: setting the new vtable in a transparent proxy object must
22385 not change the GC descriptor.
22387 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
22389 * object.c: fixed compilation without GCJ support.
22390 * reflection.c: for runtime-created types ensure klass->has_references
22391 is correct (bug #73215).
22393 2005-03-02 Martin Baulig <martin@ximian.com>
22395 * class.c (mono_class_is_assignable_from): Make this work if
22396 `oklass' is a generic instance; fixes #72831.
22398 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
22400 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
22403 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
22405 * marshal.c: Reorganize native->managed marshalling code to also use
22406 the emit_marshal_... functions.
22408 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
22410 * object.c: typed allocs have issues with bitmap sizes > 30,
22411 so check for max_set >= 30.
22413 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
22415 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
22416 managed code. Fixes #73012.
22418 * metadata.h (MonoMarshalSpec): Add elem_mult field.
22420 * metadata.c reflection.c: Load/Emit elem_mult as well.
22422 * metadata.h (MonoMarshalSpec): Add comment.
22424 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
22426 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
22427 num_elem to -1 if not given.
22429 * object-internals.h (MonoReflectionMarshal): Add has_size field.
22431 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
22434 2005-03-01 Marek Safar <marek.safar@seznam.cz>
22436 * null-gc.c (mono_gc_free_fixed): Was not compilable.
22438 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
22440 * reflection.c (encode_marshal_blob): Encode param_num field as well.
22442 * object-internals.h (MonoReflectionMarshal): Add param_num field.
22444 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
22446 * object.c: generalized the reference bitmap creation
22447 and added hooks for the new GC.
22448 * class-internals.c: removed the gc_bitmap field from MonoClass.
22450 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
22452 * domain.c: help the compiler to produce better code
22453 in mono_jit_info_table_find ().
22455 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
22457 * object.c: make all allocations look typed.
22459 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
22461 * socket-io.c: load Mono.Posix if it's not loaded already
22464 2005-02-24 Martin Baulig <martin@ximian.com>
22466 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
22467 * reflection.c (dup_type): Likewise.
22469 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
22471 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
22472 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
22474 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
22476 * domain.c, threads.c, object-internals.h: make the critical thread
22477 local vars use the fast access mode (even when we're compiled in
22478 a lib). Provide accessors to be used by the jit during codegen.
22480 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
22482 * appdomain.c: Changed hook functios behavior to include
22483 support for the reflection only assemblies. Some icalls were changed
22484 to support the mentioned assemblies too. Signatures of static methods
22485 try_assembly_resolve and real_load now have an additional parameter:
22488 * assembly.c: General changes to mono_assembly_ methods to support
22489 reflection only api. Functions mono_assembly_open, mono_assembly_load,
22490 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
22491 suffix, to support an additional gbool parameter to specify whether
22492 the assembli is reflection only or not. Created some new hook functions
22493 to add support for reflection only assemblies. Signatures of static
22494 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
22495 have now an additional parameter: refonly.
22497 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
22498 indicating whether the assembly is reflection only or not.
22500 * exception.c: Add mono_get_exception_invalid_operation.
22502 * icall.c: Throw an InvalidOperationException when trying to invoke
22503 a property/method/event, or trying to set/get the value of a field.
22504 Also add an icall to retrieve the ref_only flag to the
22505 MonoReflectionAssembly.
22507 2005-02-23 Chris Toshok <toshok@ximian.com>
22509 Part of fix for #72827.
22510 * mono-debug.c (mono_debug_add_method): add lexical block data to
22511 the info we write. Kind of a hack at the moment - we copy the
22512 lexical block info from the MonoDebugMethodInfo to the
22513 MonoDebugMethodJitInfo here, before writing it.
22514 (mono_debug_read_method): read the lexical block info.
22516 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
22518 * debug-mono-symfile.h: add lexical block support.
22520 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
22523 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
22525 * loader.c (mono_lookup_pinvoke_call): Fix warning.
22527 * object.c (mono_runtime_free_method): Call mono_free_method () and
22528 put the TODOs there.
22530 * loader.c (mono_free_method): Free up most memory allocated for
22533 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
22535 * reflection.c: properly flag a Type argument to a
22536 named custom attr value (bug #72248).
22538 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
22540 * reflection.c: reduce code duplication in named custom
22541 attribute encoding.
22543 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
22545 * reflection.c: properly encode custom attrs of type object
22548 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
22550 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
22552 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
22554 * socket-io.c: load System.dll if it's not loaded already
22555 (bug #72850 and #70477).
22557 2005-02-21 Martin Baulig <martin@ximian.com>
22559 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
22562 2005-02-21 Martin Baulig <martin@ximian.com>
22564 * reflection.c (mono_image_build_metadata): We also need to
22565 "fixup" the MethodImpl table after we computed the final method
22566 indices. Call fixup_methodimpl() to do that.
22567 (fixup_methodimpl): New private method.
22569 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
22571 * assembly.c: special case mscorlib.dll (bug#72536),
22572 patch from Carlos Alberto Cortez.
22574 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
22576 * threads-types.h threads.c: Fix build bustage.
22578 * threads.c: Use a union for long<->double conversions.
22580 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
22581 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
22583 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
22584 containing the checkpoint call with NOT_TAKEN.
22586 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
22587 checkpoint before pushing the arguments, so they won't have to be
22590 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
22592 * domain.c, assembly.c, domain-internals.h: make some data
22593 const and relocation-free.
22595 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
22597 * object.c, appdomain.c, class-internals.h: introduce the
22598 MonoClassRuntimeInfo structure to hold the info needed to
22599 use a class at runtime. Made mono_class_vtable() lock-free
22600 for all the appdomains.
22602 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
22604 * metadata-internals.h, image.c: introduce a per-image mempool to
22605 be used for memory that has the same lifetime as the image.
22607 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
22609 * domain.c: In mono_init_internal(), instead of selecting the first
22610 runtime version supported by an executable, get a list of all
22611 supported versions and select the one for which an mscorlib exists
22612 (since even if the runtime supports a given version, it doesn't mean
22613 that the framework for that version is installed).
22614 Modified get_runtimes_from_exe to support this behavior.
22615 In supported_runtimes, added information about additional system
22618 * assembly.c: Added support for more than one system assembly version
22619 per runtime version. Updated the assembly list.
22620 In mono_assembly_remap_version, removed the initial version check,
22621 since we don't know to which version we need to compare until we
22622 get the version set on which the assembly is based.
22623 Moved the code for loading corlib into the new method
22624 mono_assembly_load_corlib(), so it can be used by the initialization
22627 * domain-internals.h: Updated data structures and added declaration
22628 for mono_assembly_load_corlib.
22630 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
22632 * reflection.c (resolve_object): Fix the creation of the signature in
22633 the SignatureHelper case.
22635 * assembly.c (mono_assembly_remap_version): Fix binary search.
22637 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
22639 * class.c: Added inheritance check when a method is overloaded (from a
22640 virtual method or when implementing an interface) and when a class is
22641 inherited. Added functions to set a failure for a class and to
22642 retreive the exception from a failure.
22643 * class-internals.h: Added fields to MonoClass to keep the exception
22644 information status for inheritance (or other exceptions) to be thrown
22645 later (i.e. not at load time).
22646 * object.c: Throw the inheritance SecurityException when a type is to
22647 be created with either class or method inheritance violations.
22648 * reflection.c|h: Fix when getting declsec from a class. Removed
22649 unrequired code for class. Improved sanity in parameter naming.
22650 * security-manager.c|h: Added functions to check for class and method
22653 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
22655 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
22656 and has_finalize in dynamic types as well.
22658 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
22660 * culture-info-table.h : fixed currency format for en-GB (and so on).
22662 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
22664 * gc.c: ensure the GC handles never have 0 as a value.
22666 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
22668 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
22669 a pointer to a struct to unmanaged code. Fixes #72625.
22671 2005-02-16 Martin Baulig <martin@ximian.com>
22673 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
22675 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
22677 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
22679 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
22681 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
22683 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
22684 UnmanagedFunctionPointerAttribute, use it for determining calling convention
22687 * reflection.c (mono_custom_attrs_get_attr): New helper function.
22689 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
22691 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
22693 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
22694 changes to make the current context a field in MonoThread.
22696 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
22698 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
22701 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
22702 extracted from mono_marshal_get_native_wrapper.
22704 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
22705 to create wrappers around native functions.
22707 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
22708 delegates for arbitrary function pointers. Fixes #71472.
22710 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
22712 * threads.c: cleaned up the code a little.
22714 2005-02-15 Martin Baulig <martin@ximian.com>
22716 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
22719 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
22720 allocate larger chunks if needed.
22722 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
22724 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
22727 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
22729 * domain.c: keep the domains in an array and ensure the domain ids
22730 are kept small, so they can be used as indexes to domain-specific data
22731 with a small memory overhead.
22733 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
22735 * icall.c: Handle byref types in Type icalls. Fixes #72544.
22737 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
22739 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
22741 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
22743 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
22745 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
22748 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
22750 2005-02-12 Ben Maurer <bmaurer@ximian.com>
22752 * domain-internals.h: add the hashtable here.
22754 * class-internals.h: Remove `info' from MonoMethod
22756 * domain.c: Add a new hashtable, jit_trampoline_hash
22758 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
22760 * object.c: don't set the value of static fields
22763 2005-02-11 Martin Baulig <martin@ximian.com>
22765 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
22766 (mono_debug_add_method): Silently ignore the method if it's too big.
22767 (mono_debug_add_type): Likewise.
22769 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
22771 * threads.c, appdomain.c: remove #ifdefs from the code.
22773 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
22775 * metadata-internals.h: Added flags to MonoAssembly to cache the most
22776 common security informations. This allows us to stay in unmanaged code
22777 when doing LinkDemand and it's special cases (except for the first
22778 time for initialization). The flags a very much used with --security.
22779 * reflection.c|h: Added code to get declarative security attributes
22780 for LinkDemand and InheritanceDemand. This required to refactor the
22781 existing code for Demand.
22782 * security-manager.c|h: Added new method fields for the special cases
22785 2005-02-10 Martin Baulig <martin@ximian.com>
22787 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
22788 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
22790 2005-02-10 Martin Baulig <martin@ximian.com>
22792 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
22793 debugging code; this is almost a complete rewrite.
22795 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
22797 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
22799 * domain.c, object.h: expose mono_string_equal () and
22800 mono_string_hash ().
22801 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
22802 it's implemented in managed code.
22804 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
22806 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
22807 lo leak objects between appdomains.
22809 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
22811 * assembly.c: old compilers compilation fix from
22812 robertj@gmx.net (Robert Jordan).
22814 2005-02-09 Ben Maurer <bmaurer@ximian.com>
22816 * class-internals.h: Little reminder for the future.
22818 * debug-helpers.c: Fix up wrapper_type_names
22820 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
22822 * image.c, metadata-internals.h: when loading an image from a file,
22823 mmap all of it and use the same codepaths as when using a
22824 in-memory image: the code is simpler and we use less memory
22825 (both writable and readonly).
22827 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
22829 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
22830 API to alloc runtime data structures that need to be tracked by the
22831 GC and contain pointers.
22832 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
22833 make the code more readable and eventually use a different GC.
22835 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
22837 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
22840 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
22842 * object.c: In release_type_locks(), don't release the cctor lock
22843 if it has already been released. This fixes a crash in the
22846 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
22848 * gc.c, marshal.c, icall.c: register a delegate for finalization
22849 only when the native function pointer has been allocated for it.
22851 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
22853 * object.c: cleaned up some code, allocate objects that are
22854 pointer free with the atomic malloc variant. Allocate memory
22855 for static data from the mempool if it's pointer-free.
22856 Allocate the bounds array at the end of the array data, when needed.
22857 * object-internals.h, object.h: move a private function in a private
22859 * class.c: handle missing case in tracking references in fields.
22861 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
22863 * class.c, class-internals.h: keep track if a type has
22864 reference fields in either the instance or static fields.
22866 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
22868 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
22869 and renamed to MonoRuntimeInfo. Added fields to store the expected
22870 framework assembly version. Changed mono_get_framework_version and
22871 mono_get_runtime_version for a single mono_get_runtime_info method.
22873 * assembly.c: Added method to remap system assembly versions to the
22874 current executing runtime version. Removed old mapping code.
22875 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
22877 * icall.c, reflection.c: Track api changes.
22879 2005-02-06 Miguel de Icaza <miguel@novell.com>
22881 * loader.c (method_from_memberref): Improve error reporting,
22882 produce the class name instead of the typeref/typedef index.
22884 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
22886 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
22888 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
22890 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
22891 stdcall and charset name mangling. Reorganize the code and add
22892 some tracing stuff.
22894 2005-02-05 Ben Maurer <bmaurer@ximian.com>
22896 * monodiet.c: More iters!
22898 * marshal.c: Iter usage.
22900 * icall.c: Iter usage.
22902 * object.c: Use iters.
22904 * debug-helpers.c: More iters
22906 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
22908 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
22911 2005-02-05 Ben Maurer <bmaurer@ximian.com>
22913 * mono-debug-debugger.c: use iters
22915 * class.c, class-internals.h: mono_class_setup_events is static
22918 * All callers: use iters
22920 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
22922 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
22923 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
22925 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
22927 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
22929 * marshal.h: Add prototypes for ldfld/stfld_remote.
22931 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
22932 this is called during startup.
22934 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
22936 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
22937 MonoThreadsSync struct private in monitor.c. Changed the way
22938 MonoThreadsSync is allocated so it's faster and there is no
22939 need to keep track of it with a finalizer and it uses less memory.
22940 This also finally allows us to allocate mono objects as ptrfree when
22941 there are no reference fields.
22943 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
22945 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
22946 disappearing link to the GC interface and use them to simplify
22947 the gchandles code.
22949 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
22951 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
22952 stfld_remote which call mono_load/store_field_new. This allows methods
22953 calling ldfld/stfld wrappers to be AOTed.
22955 * console-io.c: Include sys/filio.h under solaris.
22957 * console-io.c: Include curses.h if needed correctly.
22959 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
22961 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
22962 method->klass as well.
22964 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
22966 * class.c (mono_class_init): Switch on lazy initialization of
22969 * class.c (mono_class_get_finalizer): Handle the case when the
22970 finalizer is inherited.
22972 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22974 * console-io.c: <curses.h> is needed by term.h on solaris.
22976 2005-02-03 Ben Maurer <bmaurer@ximian.com>
22978 * icall.c, class-internals.h, monodiet.c, class.c: Remove
22979 mono_class_setup_properties where possible. Remove this ftn from
22980 the header file, and make it static.
22982 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
22984 * loader.c: Add missing setup_... call.
22986 * class.c: Add missing setup_... calls.
22988 * class.c (mono_class_init): Switch on lazy initialization of
22989 the generic vtable.
22991 * class.c (mono_class_init): Fix generics broken by the recent changes.
22993 * monodiet.c (handle_type): Add missing setup_... calls.
22995 * class.c: Back out garbage in previous patch.
22997 * class.c: Add missing setup_... calls.
22999 * class.c (mono_class_get_method_from_name_flags): Avoid calling
23000 mono_class_setup_methods () if possible.
23002 * class-internals.h (MonoClass): Add 'has_cctor' flag.
23004 * class-internals.h (MonoCachedClassInfo): New structure.
23006 * class.c: Initialize properties and events fields of MonoClass lazily.
23008 * class.c: Add infrastructure for lazily initializing the methods and
23009 vtable fields of MonoClass. Not yet used.
23011 * class.c (mono_class_get_finalizer): New helper function.
23013 * class.c: Add infrastructure for loading some class related data from
23016 * object.c: Add infrastructure for initializing the vtable from data
23019 * gc.c (run_finalize): Use mono_class_get_finalizer ().
23021 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
23022 appropriate initialization function before accessing parts of the
23023 MonoClass structure.
23025 * marshal.c: Fix warnings.
23027 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
23029 * mono-debug-debugger.c (get_exception_message): Use
23030 mono_class_get_method_from_name_flags ().
23032 2005-02-02 Ben Maurer <bmaurer@ximian.com>
23034 * reflection.c, appdomain.c: Replace a few manual searches that
23035 Zoltan missed. (Paolo approved this part of my initial patch).
23037 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
23039 * profiler.c: disable recording statistical events at report time.
23041 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
23043 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
23044 to byteswap arrays of enum values, too (bug #72080).
23046 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
23048 * appdomain.c (set_domain_search_path): Allow this to be called if
23049 domain->setup is not yet set.
23051 * loader.c (mono_method_get_index): New helper function.
23053 * loader.c reflection.c: Use mono_method_get_index ().
23055 * class.c (mono_class_get_method_from_name_flags): New helper method.
23057 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
23060 * class.c (mono_class_get_cctor): New helper method.
23062 * string-icalls.c object.c class.c marshal.c reflection.c: Use
23063 mono_class_get_method () to look up methods.
23065 2005-02-01 Miguel de Icaza <miguel@novell.com>
23067 * console-io.c: Fix the build, this should work on Windows.
23069 2005-01-31 Ben Maurer <bmaurer@ximian.com>
23071 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
23072 be set to null to keep things valid
23074 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23076 * icall.c: added Console 2.0 icalls.
23077 * Makefile.am: added console-io.[ch]
23078 * console-io.[ch]: internal calls for Console 2.0 API.
23080 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
23082 * class.c: make sure we consider all the interfaces
23083 when calculating max_interface_id (bug found by
23084 Jeroen Frijters running ikvm).
23086 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
23088 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
23089 valuetype fields to null.
23091 * object.c (set_value): Ditto. Fixes #71669.
23093 2005-01-31 Martin Baulig <martin@ximian.com>
23095 * metadata.c (mono_metadata_has_generic_params): New public
23096 function; checks whether something is a generic method.
23098 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
23100 * appdomain.c: fix infinite recursion when adding assemblies.
23102 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
23104 * object.c: Fix small typo to return all items for Environment.
23105 GetCommandLineArgs.
23107 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
23109 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
23110 reflection.c: more domain and assembly-unload related fixes
23111 and memory leaks plugs.
23113 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
23115 * 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.
23117 2005-01-29 Ben Maurer <bmaurer@ximian.com>
23119 * loader.c (mono_method_signature): Make this method lazy
23120 (mono_get_method_from_token): Don't computate the signature here.
23122 Doing this saves quite a bit of memory. I got 90 kb on starting up
23123 monodoc. It should also save some disk reads on startup.
23125 * *: MonoMethod->signature might be NULL now. You *MUST* use
23126 mono_method_signature.
23128 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
23130 * object.c (mono_runtime_get_main_args): Return an array from the
23131 current domain here. Fixes #71938.
23133 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
23135 * monitor.c: formatting changes to comply with the
23136 mono coding style and remove #ifdefs from the code.
23138 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
23140 * metadata.c, private.h: remove some unneeded data
23141 and use a more compact representation for table schemas.
23143 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
23145 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
23146 to get a better distribution in hash tables.
23147 * *.c: use mono_aligned_addr_hash() where appropriate.
23148 * assembly.c: make var static.
23150 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
23152 * domain-internals.h: Put MonoJitInfo on a diet.
23154 * domain.c: Fix a warning.
23156 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
23158 * gc.c: rework the gc handles code to reuse handles
23161 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
23163 * domain.c: fixed long standing bug in mono_string_equal() which
23164 was brought to light with the ldstr changes.
23166 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
23168 * reflection.c: Remove warning by adding missing include for marshal.h
23170 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
23172 * domain.c, object.c: change the ldstr_table to hold
23173 MonoString* as keys: makes the runtime isinterned lookup
23174 faster and simplifies memory management.
23176 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
23178 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
23179 possible to add imperative security checks before calling the icall.
23180 * reflection.c: Return security attributes on the original MonoMethod
23181 (and not the wrapped one). This fix permissions on icalls.
23183 2005-01-25 Dick Porter <dick@ximian.com>
23185 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
23186 the check for mktime() support actually test the mktime() return
23187 value. "Fixes" bug 71682, though the output is still different to
23190 2005-01-25 Martin Baulig <martin@ximian.com>
23192 * class.c (mono_class_is_assignable_from): Make this work for
23195 2005-01-24 Ben Maurer <bmaurer@ximian.com>
23197 * marshal.c (mono_string_utf8_to_builder)
23198 (mono_string_builder_to_utf16): We might not have ownership of the
23199 string. In thise case, we need to create a new buffer.
23201 * object-internals.h (mono_stringbuilder_capacity): sb->str might
23202 be null, in which case, use the default capacity.
23204 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
23206 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
23207 GC events to the profiler.
23209 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
23211 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
23212 if you don't want the GC to run.
23214 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
23216 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
23217 start providing a GC API and keeping different implementations in
23219 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
23221 2005-01-22 Ben Maurer <bmaurer@ximian.com>
23223 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
23224 mmap rather than allocating a huge buffer.
23225 (mono_debug_close_mono_symbol_file): Free the buffer allocated
23228 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
23230 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
23231 and CheckExecutionRights.
23232 * reflection.c|h: Keep the index of the declarative security to be
23233 used, instead of the pointer, when AOT compiler is used. Also add
23234 class initialization when requesting demands.
23235 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
23236 CheckExecutionRights. Both properties are now FALSE by default, and
23237 unmodifiable, unless the --security option is used.
23239 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
23241 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
23242 reflection.c: properly refcount images and assemblies, many leaks fixed.
23244 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23246 * threadpool.c: increase the timeout for threads in the thread pool to
23247 10s. Fixes bug #67159.
23249 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
23251 * class-internals.h: Sun's compiler insists on explicit
23252 signed on bit fields to handle then correctly.
23254 2005-01-19 Miguel de Icaza <miguel@ximian.com>
23256 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
23257 Make the size of the array fit only the number of invalid path
23258 chars that we have.
23260 * class.c (_mono_class_get): Improve the error reporting when a
23261 class referenced is not found, to assist debugging.
23263 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
23265 * threads.c: fix off-by-one error.
23266 * domain.c: free data allocated in the domain.
23268 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
23270 * reflection.c (mono_method_body_get_object): Fill out exception info
23273 * object-internals.h: Add MonoReflectionExceptionHandlingClause
23276 2005-01-19 Martin Baulig <martin@ximian.com>
23278 * loader.c (mono_get_method_constrained): Make this work again.
23280 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
23282 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
23283 guint16 to match the managed side.
23285 * reflection.c (mono_reflection_body_get_object): Fill out local
23288 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
23291 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
23292 'local_var_sig_token'.
23294 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
23296 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
23299 * reflection.c (mono_method_body_get_object): Handle abstract and
23302 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
23304 * marshal.c, loader.c, class-internals.h, reflection.c:
23305 store the emthod data for a wrapper in an array instead of a list.
23307 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
23309 * marshal.c: change the code to allocate memory more
23310 conservatively for method wrappers.
23312 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
23314 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
23315 fields from MonoClass to the marshal info structure where they belong.
23317 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
23319 * class.c, object.c, class-internals.h, marshal.c: rearrange
23320 some fields and tweak some types to lower memory usage.
23322 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
23324 * threads.c (signal_thread_state_change): Handle the case when the
23325 target thread is the current thread.
23327 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
23329 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
23330 emit_ptr_to_object_conv.
23332 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
23333 marshalling. Fixes #71352.
23335 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
23337 * metadata.h, blob.h: move table enum to blob.h so it can be included
23339 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
23340 cut the size of MonoImage/MonoDynamicImage.
23342 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
23344 * profiler.c (mono_profiler_install_simple): Fix default arguments.
23346 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
23348 * reflection.c, reflection.h, icall.c: add a function to check
23349 if an attribute type is defined for a metadata object.
23351 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
23353 * object-internals.h: Added some needed fields from StringBuilder class.
23354 * marshal.c: Set the maxCapacity when creating a StringBuilder.
23356 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
23358 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
23359 threads before shutting down the runtime.
23361 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
23363 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
23365 * object-internal.h, threads.c: implement stacksize and
23366 parameterized thread start functionality (requires
23367 matching corlib). Marked broken code for later removal.
23369 2005-01-12 Martin Baulig <martin@ximian.com>
23371 * class-internals.h (MonoGenericClass): Moved the `initialized'
23372 flag to MonoDynamicGenericClass, removed `init_pending'.
23373 (MonoGenericInst): Added `is_reference' flag.
23375 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
23377 * reflection.c (mono_image_create_pefile): Only set the pe_offset
23378 inside the MSDOS header. Fixes #71201.
23380 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
23382 (mono_domain_finalize): Ditto.
23384 2005-01-12 Martin Baulig <martin@ximian.com>
23386 * class.c (mono_get_shared_generic_class): Use the cache for
23387 non-dynamic generic classes.
23389 * class-internals.h (mono_class_create_generic_2): Removed
23390 function prototype, this function is now static inside class.c.
23392 * class.c (mono_class_create_generic_2): Made this static, only
23393 call it from mono_class_init() and mono_class_setup_parent().
23394 (collect_implemented_interfaces_aux): Call mono_class_init() on
23395 the interfaces we collect.
23396 (mono_class_setup_vtable): Call mono_class_init (class->parent).
23398 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
23400 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
23401 it a real thread handle.
23403 * domain-internals.h: Move exvar_offset from MonoJitInfo to
23404 MonoJitExceptionInfo, since each catch clause needs its own variable.
23406 2005-01-11 Dick Porter <dick@ximian.com>
23408 * image.c (mono_pe_file_open): New variant on mono_image_open()
23409 that does not set up the CLI metadata; used for FileVersionInfo so
23410 it can get the data for windows binaries too.
23412 * process.c (process_read_string_block): Don't read off the end of
23413 the StringTable block.
23415 These both fix bug 70766.
23417 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
23419 * gc.c: set some fields to NULL at GC cleanup time.
23420 * threads.c: if we quit the main thread, call exit ().
23422 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
23424 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
23426 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
23428 * threads.h, threads.c, object.c: added accessor and settor for
23429 main_thread. Handle it specially when exiting from it: wait
23430 for other foreground threads to exit.
23432 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
23434 * process.c, verify.c: remove some bloat.
23436 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
23438 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
23439 the calling convention to cdecl under win32.
23441 2005-01-08 Ben Maurer <bmaurer@ximian.com>
23443 * object.c (mono_object_get_size): New function to get the size of
23444 an object instance.
23446 * profiler.c (simple_allocation): Use above.
23448 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
23450 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
23451 ves_icall_System_AppDomain_getRootDomain (as it's not required to
23452 get an appdomain by it's id and we can't assume the root's id is 0).
23453 * domain-internals.h: Change the function prototype to match.
23454 * icall.c: Change the icall table for AppDomain.
23456 2005-01-08 Miguel de Icaza <miguel@ximian.com>
23458 * locales.c (string_invariant_compare_char): Only compute
23459 GUnicodeTypes in the case where we need them. Test for ordinality
23460 first and return if so.
23465 * FIXME: here we must use the information from c1type and c2type
23466 * to find out the proper collation, even on the InvariantCulture, the
23467 * sorting is not done by computing the unicode values, but their
23468 * actual sort order.
23471 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
23473 * loader.c: for P/Invoke methods, allow the "Internal" shared
23474 library name to refer to the calling process symbol namespace.
23476 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
23478 * Makefile.am: Add the security manager to the build.
23479 * security-manager.c|h: New. Initialization of the security manager.
23481 2005-01-07 Dick Porter <dick@ximian.com>
23484 * monitor.c: Update thread state during Monitor and WaitHandle
23485 waits. Fixes bug 71031.
23487 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
23489 * reflection.c (property_encode_signature): Correctly handle when the
23490 property has no methods.
23492 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
23494 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
23496 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
23497 fields from mb, not rmb. Fixes #71017.
23499 * marshal.c (emit_ptr_to_str_conv): Add support for
23500 ByValTStr -> string conversion. Fixes #71015.
23502 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
23504 * mempool.c (mono_mempool_contains_addr): New helper function.
23506 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
23508 * metadata.c (mono_metadata_compute_size): Fix size calculation of
23509 HasSematics encoded fields.
23511 * metadata.c (mono_type_to_unmanaged): Improve error message for
23512 invalid string marshalling.
23514 * metadata.c: Fix warnings.
23516 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
23518 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
23521 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
23523 * domain.c object.c domain-internals.h: Revert part of r38077 since the
23524 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
23527 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
23529 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
23530 so methods containing these can be AOTed.
23532 2005-01-03 Martin Baulig <martin@ximian.com>
23534 * loader.c (find_method): Removed the hack for generic instances.
23535 (method_from_memberref): If our parent is a generic instance, pass
23536 its generic type definition to find_method() and then inflate the
23538 (mono_get_method_constrained): Pass the generic type definition to
23539 find_method() and inflate the method later.
23541 * class-internals.h (MonoStats): Added `generic_class_count'.
23543 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
23544 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
23546 * reflection.c (mono_custom_attrs_from_params): Don't ignore
23547 generic type definitions.
23549 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
23551 * loader.c icall.c: Fix warnings.
23553 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
23555 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
23556 blittable types. Fixes #70864.
23558 2004-12-29 Martin Baulig <martin@ximian.com>
23561 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
23563 * reflection.c (mono_method_get_object): Create a
23564 "System.Reflection.MonoGenericMethod" for inflated methods; don't
23565 call mono_get_inflated_method().
23567 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
23569 2004-12-27 Martin Baulig <martin@ximian.com>
23571 * class-internals.h (MonoMethod): Added `is_inflated' flag.
23572 (MonoMethodInflated): Added `inflated' field.
23574 * class.c (mono_class_inflate_generic_method): Don't really
23575 inflate the method here; just set the `is_inflated' flag in the
23577 (mono_class_get_inflated_method): Actually inflate the method here
23578 if it's not already inflated; we use the MonoMethodInflated's new
23579 `inflated' field as a cache.
23581 2004-12-26 Martin Baulig <martin@ximian.com>
23584 (inflate_generic_class): Moved some code out of inflate_generic_type().
23585 (mono_class_inflate_generic_method): If we're already inflated,
23586 inflate the context and use the declaring method; ie. make sure
23587 the declaring method of an inflated method is always the generic
23589 (mono_class_create_from_typedef): Create
23590 `class->generic_container->context->gclass'.
23592 2004-12-24 Ben Maurer <bmaurer@ximian.com>
23594 * metadata-internals.h, marshal.c, reflection.c: More
23595 MonoGHashTable->GHashTable.
23597 * domain-internals.h, class.c: Change MonoGHashTable's into
23598 GHashTables for some cases where no gc stuff is used
23600 All users: update apis
23602 2004-12-23 Ben Maurer <bmaurer@ximian.com>
23604 * metadata.c (builtin_types): Make this `const'. Makes this get
23605 put into the shareable section.
23606 (mono_metadata_init): Casts to make gcc happy.
23608 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
23610 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
23612 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
23614 * icall.c: Added an internal call to retrieve the position and length
23615 of assembly-level declarative security attributes (RequestMinimum,
23616 RequestOptional and RequestRefuse). This is used by the Assembly class
23617 to re-create the corresponding permission sets.
23619 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
23621 * marshal.c: fix the stelemref wrapper to be type correct
23624 2004-12-20 Ben Maurer <bmaurer@ximian.com>
23626 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
23627 to do key & 0x7fffffff. Hashtable already does this. It just
23628 results in longer code.
23630 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
23632 * appdomain.c: Bump corlib version.
23633 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
23634 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
23635 * reflection.c|h: Add functions to get declarative security infos
23636 (blob position and length) for assemblies, classes and methods.
23638 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
23640 * reflection.c: sort the constant table (bug #70693).
23642 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
23644 * object-internals.h, threads.c, domain.c: add accessors for
23645 the MonoThread and MonoDomain tls keys.
23647 2004-12-18 Martin Baulig <martin@ximian.com>
23649 * class.c (inflate_generic_type): If we're inflating a generic
23650 instance, set `ngclass->context->container = context->container';
23651 ie. the container we inflated into.
23653 * metadata.c (mono_metadata_parse_generic_param): Reflect above
23654 inflate_generic_type() changes.
23656 2004-12-17 Martin Baulig <martin@ximian.com>
23658 * class-internals.h
23659 (MonoGenericClass): Replaced `MonoType *generic_type' with
23660 `MonoClass *generic_class'. Removed `dynamic_info'; if
23661 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
23662 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
23664 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
23666 * exception.c (mono_exception_from_token): New helper function.
23668 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
23670 * assembly.c (mono_assembly_load_with_partial_name): Call
23671 mono_assembly_loaded before invoking the preload hooks. Fixes
23674 * object-internals.h (MonoThread): Change culture_info and
23675 ui_culture_info into an array.
23677 * threads.c: Cache culture info objects from more than one appdomain.
23679 * threads.c threads-types.h icall.c: Add icalls for manipulating the
23680 current UI culture.
23682 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
23684 * threads.h threads.c appdomain.c: Clear the culture_info field of
23685 all threads during unloading if they point to an object in the dying
23688 2004-12-13 Ben Maurer <bmaurer@ximian.com>
23690 * culture-info.h (TextInfoEntry): New struct
23691 * object-internals.h: sync with managed
23692 * locales.c: fill the `text_info_data' field
23693 * culture-info-tables.h: update
23695 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
23697 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
23700 2004-12-12 Ben Maurer <bmaurer@ximian.com>
23702 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
23703 (ves_icall_ModuleBuilder_getMethodToken): Ditto
23705 2004-12-12 Martin Baulig <martin@ximian.com>
23707 * mono-debug-debugger.c (write_type): If we're an enum and the
23708 builtin types have already been initialized, call mono_class_init().
23710 2004-12-11 Martin Baulig <martin@ximian.com>
23712 * metadata.c (mono_metadata_load_generic_params): Added
23713 `MonoGenericContainer *parent_container' argument; automatically
23714 compute `container->is_method'; pass the correct owner to
23717 * reflection.c (compare_genericparam): Sort the GenericParam table
23718 according to increasing owners.
23720 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
23722 * profiler.c: allow disabling the default profiler.
23724 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
23726 * decimal.c, icall.c: allow disabling System.Decimal support.
23728 2004-12-09 Marek Safar <marek.safar@seznam.cz>
23730 * reflection.c: Add support for null attribute arguments.
23732 2004-12-09 Martin Baulig <martin@ximian.com>
23734 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
23735 names to get rid of compiler warnings.
23737 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
23739 * marshal.c (mono_marshal_get_struct_to_ptr): Call
23740 mono_marshal_load_type_info (). Fixes #69625.
23741 (mono_marshal_get_ptr_to_struct): Likewise.
23743 2004-12-08 Martin Baulig <martin@ximian.com>
23745 * mono-debug.h: Bumped version number to 47.
23747 * mono-debug-debugger.c
23748 (mono_debugger_event_handler, mono_debugger_event): Take two
23749 guint64 arguments insteed of a gpointer and a guint32.
23751 2004-12-08 Martin Baulig <martin@ximian.com>
23753 * debug-mono-symfile.h
23754 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
23755 `address' to `native_offset'.
23757 2004-12-08 Martin Baulig <martin@ximian.com>
23759 * class.c (mono_class_create_from_typespec): Only inflate if we
23760 either have `context->gclass' or `context->gmethod'.
23762 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
23764 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
23766 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
23768 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
23770 * reflection.c (mono_assembly_get_object): Remove the workaround put
23771 in for the release.
23773 * appdomain.c: Use the corlib_internal field from MonoAssembly.
23775 * appdomain.c: Bump corlib version.
23777 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
23778 be visible in other appdomains.
23780 2004-12-07 Ben Maurer <bmaurer@ximian.com>
23782 * threads.c: Interlocked inc and dec for longs were messed up,
23783 use a KISS based impl for this. Fixes 70234
23785 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
23787 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
23789 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
23791 * icall.c: fix to follow policy not to allow struct
23792 arguments in icalls.
23794 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23796 * process.c: make the patch that handles spaces in file paths work
23797 on mono/windows too.
23799 2004-12-06 Martin Baulig <martin@ximian.com>
23801 * class.c (mono_class_create_generic): Call
23802 mono_class_setup_supertypes() if we're dynamic.
23803 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
23805 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
23807 * object-internals.h: Add new fields to MonoThread.
23809 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
23811 * icall.c threads-types.h threads.c: Add new icalls.
23813 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
23815 * object-internals.h (MonoReflectionAssembly): Sync object layout with
23818 * appdomain.c: Bump corlib version.
23820 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
23821 internal assemblies. Fixes #69181.
23823 2004-12-05 Martin Baulig <martin@ximian.com>
23825 * class.c (mono_class_inflate_generic_signature): Make this a
23826 no-op if `context' is NULL or we don't have any type parameters;
23827 also copy `sentinelpos'.
23829 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
23831 * image.c: Add unbox_wrapper_cache.
23833 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
23835 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
23836 function generator.
23838 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
23841 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
23843 2004-12-04 Martin Baulig <martin@ximian.com>
23845 * loader.c (mono_method_get_signature_full): New public function;
23846 like mono_method_get_signature(), but with an additional
23847 `MonoGenericContext *' argument.
23849 * class.c (mono_class_inflate_generic_signature): Formerly known
23850 as inflate_generic_signature(); make this public.
23852 2004-12-04 Martin Baulig <martin@ximian.com>
23855 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
23856 instead of a `MonoGenericContainer *'.
23857 (mono_metadata_parse_array_full): Likewise.
23858 (mono_metadata_parse_signature_full): Likewise.
23859 (mono_metadata_parse_method_signature_full): Likewise.
23860 (mono_metadata_parse_generic_inst): Likewise.
23861 (mono_metadata_parse_generic_param): Likewise.
23862 (mono_metadata_parse_mh_full): Likewise.
23863 (mono_type_create_from_typespec_full): Likewise.
23865 2004-12-03 Martin Baulig <martin@ximian.com>
23867 * class-internals.h (MonoGenericContainer): Replaced the
23868 `MonoGenericContext * pointer with a `MonoGenericContext'
23869 structure and made it the first element.
23871 2004-12-03 Martin Baulig <martin@ximian.com>
23874 (inflate_generic_type): Set the `context->container' when creating
23875 a new MonoGenericContext.
23876 (mono_class_inflate_generic_method): Likewise.
23877 (mono_class_create_from_typespec): Just use `context->container'
23878 to get the container.
23880 * loader.c (method_from_methodspec): Set `context->parent' from
23881 `context->container' - and if that's a method container, use its
23882 parent. Also set the `context->container' when creating a new
23883 MonoGenericContext.
23884 (mono_get_method_from_token): Use just `context->container' to get
23887 * metadata.c (do_mono_metadata_parse_generic_class): Also set
23888 `gclass->context->container'.
23890 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
23891 the `context->container' when creating a new MonoGenericContext.
23893 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
23895 * reflection.c (compare_genericparam): Sort params with identical
23896 owner by their number. Fixes gen-111 on sparc.
23898 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
23900 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
23901 around the domain changes.
23903 * appdomain.c (mono_domain_unload): Handle the case when the thread
23904 calling Unload is itself being aborted during unloading. Fixes #70022.
23906 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
23908 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
23909 checkpoint_func as an icall so it gets a wrapper.
23910 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
23911 in the cross-appdomain wrappers too.
23913 * threads.c (mono_thread_has_appdomain_ref): Make this public.
23915 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
23917 * reflection.c: Fix some memory leaks.
23919 2004-12-02 Martin Baulig <martin@ximian.com>
23921 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
23923 * metadata.c (generic_class_cache): New static hashtable.
23924 (mono_metadata_lookup_generic_class): New public method.
23926 2004-12-02 Martin Baulig <martin@ximian.com>
23928 * class.c (mono_class_create_from_typedef): Call
23929 mono_class_setup_parent() and mono_class_create_mono_type() before
23930 parsing the interfaces.
23932 2004-12-02 Martin Baulig <martin@ximian.com>
23934 * metadata.c (generic_inst_cache): New static hashtable.
23935 (mono_metadata_lookup_generic_inst): New public function.
23936 (mono_metadata_inflate_generic_inst): New public function.
23937 (mono_metadata_parse_generic_inst): New public function.
23938 (do_mono_metadata_parse_generic_class): Use the new
23939 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
23940 since this'll also use the cache.
23942 * reflection.c (mono_reflection_bind_generic_method_parameters):
23943 Use mono_metadata_lookup_generic_inst() to use the new cache.
23945 * class.c (inflate_mono_type): Use
23946 mono_metadata_inflate_generic_inst() to inflate a generic
23947 instance; this'll also use the new cache.
23949 * loader.c (method_from_methodspec): Use
23950 mono_metadata_parse_generic_inst() and
23951 mono_metadata_inflate_generic_inst() rather than parsing it
23952 manually, so we can use the new cache.
23954 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
23956 * threads.c (wait_for_tids): Do not incorrectly free threads when
23957 the wait times out.
23959 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
23961 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
23962 iter->args based on whether parameters are passed in registers (i.e.
23963 MONO_ARCH_REGPARMS is defined)
23965 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
23967 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
23968 the exception message. Fixes #70070.
23969 (method_from_methodspec): Fix warnings.
23971 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23973 * process.c: (complete_path) return the path quoted
23975 2004-12-01 Martin Baulig <martin@ximian.com>
23977 * class-internals.h (MonoGenericInst): New structure.
23978 (MonoGenericClass): Replaced `type_argc', `type_argv' and
23979 `is_open' with `MonoGenericInst *inst'.
23980 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
23981 `is_open' with `MonoGenericInst *inst'.
23983 2004-11-30 Martin Baulig <martin@ximian.com>
23985 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
23987 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
23988 to `generic_class_cache'.
23991 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
23992 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
23993 (mono_generic_inst_is_valuetype): Renamed to
23994 mono_generic_class_is_valuetype().
23996 * class-internals.h
23997 (MonoGenericInst): Renamed to MonoGenericClass.
23998 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
23999 (MonoClass): Renamed `generic_inst' to `generic_class'.
24000 (MonoGenericContext): Renamed `ginst' to `gclass'.
24002 * object-internals.h
24003 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
24005 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
24006 mono_reflection_generic_class_initialize().
24008 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
24009 now known as "System.Reflection.MonoGenericClass".
24010 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
24012 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
24014 * class-internals.h: Added a flag field to MonoClass to cache the
24015 declarative security attributes actions associated with the class.
24016 * domain-internals.h: Added booleans to MonoJitInfo to cache the
24017 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
24018 applicable to the JITted method.
24019 * reflection.c|h: Added functions to extract (as flags) which security
24020 actions are available (declaratively) for a method, class or assembly.
24021 * metadata.c|h: Added functions to search the declarative security
24022 table in the metadata.
24024 2004-11-29 Ben Maurer <bmaurer@ximian.com>
24026 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
24027 EXPORTEDTYPES are already in the class name cache, so there is no
24028 need to add extra code here to look at them. Just removes a bit of
24031 (ves_icall_System_Environment_get_TickCount): No need for #if
24032 WINDOWS. We already have the code in io-layer.
24034 2004-11-28 Martin Baulig <martin@ximian.com>
24037 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
24040 2004-11-27 Miguel de Icaza <miguel@ximian.com>
24042 * assembly.c (do_mono_assembly_open): Instead of having a
24043 conditional WITH_BUNDLE, incorporate support for bundles here, by
24044 having a global `bundles' variable holding a pointer to the actual
24047 (mono_register_bundled_assemblies): New API call used by the
24050 See mkbundle.1 for details.
24052 2004-11-27 Martin Baulig <martin@ximian.com>
24054 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
24055 the vtable for generic methods.
24057 2004-11-26 Martin Baulig <martin@ximian.com>
24060 (mono_metadata_generic_method_hash): New public function.
24061 (mono_metadata_generic_method_equal): Likewise.
24063 * class-internals.h
24064 (MonoGenericContainer): Added `GHashTable *method_hash'.
24066 * reflection.c (ReflectionMethodBuilder): Added
24067 `MonoGenericContainer *generic_container'.
24068 (reflection_methodbuilder_to_mono_method): Don't create a new
24069 MonoGenericContainer each time we're called.
24070 (mono_reflection_bind_generic_method_parameters): Use
24071 `container->method_hash' to cache the results so we don't create a
24072 different method if we're called several times with the same
24075 * loader.c (method_from_methodspec): Use the new
24076 `container->method_hash' here, too.
24078 2004-11-26 Martin Baulig <martin@ximian.com>
24080 * class.c (inflate_generic_signature): Correctly compute
24081 `res->has_type_parameters'.
24082 (mono_class_vtable): Use the `has_type_parameters' flag to
24083 determine whether we're a generic method.
24085 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
24087 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
24089 * object.c (mono_runtime_run_main): Fix a small memory leak.
24091 2004-11-25 Martin Baulig <martin@ximian.com>
24093 * class.c (set_generic_param_owner): Fixed the loop.
24095 2004-11-25 Martin Baulig <martin@ximian.com>
24097 * object.c (mono_class_vtable): Don't create any JIT wrappers for
24100 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
24102 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
24103 names. Fixes #69787.
24105 2004-11-24 Martin Baulig <martin@ximian.com>
24107 * class.c (mono_class_create_generic_2): If we don't have a
24108 `ginst->parent', inflate `gklass->parent' to get our parent.
24110 2004-11-24 Martin Baulig <martin@ximian.com>
24112 * reflection.c (compare_genericparam): Correctly sort the
24113 GenericParam table; fixes #69779.
24115 2004-11-23 Ben Maurer <bmaurer@ximian.com>
24117 * reflection.c: When writing a PE file, don't create a huge
24118 buffer in memory. Just write the arrays we have to the file.
24119 This reduces memory usage.
24121 * metadata-internals.h: MonoDynamicStream pefile is no longer used
24124 2004-11-17 Martin Baulig <martin@ximian.com>
24126 * class.c (mono_class_init): Don't setup `class->parent' for
24127 dynamic instances; moved this to mono_class_generic_2().
24128 (mono_class_create_generic): Also set `klass->inited' for dynamic
24130 (mono_class_create_generic_2): Don't do anything for dynamic
24131 generic instances. Set `klass->parent' here and also call
24132 mono_class_setup_parent() here.
24134 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
24135 `MonoType *parent' argument; set `ginst->parent' before calling
24136 mono_class_create_generic_2(), so we set the correct parent.
24138 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
24140 * reflection.c: allow getting attributes from ModuleBuilder
24143 2004-11-17 Martin Baulig <martin@ximian.com>
24145 * class.c (mono_class_create_from_typedef): If a type parameter is
24146 inherited from an outer class, set its owner to that class.
24148 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
24150 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
24151 for (int*) written size. This fixes bug #69592.
24153 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
24155 * icall.c: Added IsAuthenticodePresnet internal call.
24156 * image.c|h: New function that check a MonoImage for an Authenticode
24157 signature in the certificate PE data directory.
24158 * security.c|h: New internal call to ask the runtime if an
24159 Authenticode signature seems referenced in the PE header.
24161 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
24163 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
24165 * reflection.c (mono_image_create_pefile): Free the assembly streams
24166 after writing out the assembly file.
24168 * object.c (mono_runtime_run_main): Fix small memory leak.
24170 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
24171 property access modifiers. Fixes #69389.
24173 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
24175 * domain.c, object.c, object-internals.h, domain-internals.h,
24176 object.h, marshal.c: keep dynamic code info per domain.
24178 2004-11-15 Martin Baulig <martin@ximian.com>
24180 * class.c (mono_type_get_name_recurse): Put type arguments in
24181 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
24184 2004-11-15 Martin Baulig <martin@ximian.com>
24186 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
24187 (mono_class_setup_vtable): When computing `the_cname' for a
24188 generic instance, don't include the namespace since we'd otherwise
24191 2004-11-15 Martin Baulig <martin@ximian.com>
24193 * class.c (mono_class_create_generic): Changed return type to void.
24194 (mono_class_create_generic_2): New public function; setup
24195 `class->method', `class->field' and `class->interfaces' here
24196 instead of in mono_class_init().
24198 * class.h (mono_class_create_generic): Moved to class-internals.h.
24200 2004-11-14 Ben Maurer <bmaurer@ximian.com>
24202 * reflection.c (mono_image_create_pefile): take a file HANDLE.
24203 rather than writing to memory, write to this file. Right now,
24204 we are just writting into a buffer, and copying that. However
24205 we can avoid the buffer later.
24207 (mono_dynamic_stream_reset): new function
24209 * icall.c, object-internals.h: update for the above.
24211 2004-11-13 Ben Maurer <bmaurer@ximian.com>
24213 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
24214 have been using gc'd memory. First it is slower, unlikely
24215 the comment in the source code said, secondly, it increases
24216 our footprint to do it in the gc.
24218 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
24219 the method so that it does not have to copy to managed code.
24221 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
24223 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
24225 2004-11-12 Martin Baulig <martin@localhost>
24227 * reflection.c (mono_image_create_token): Allow generic method
24228 definitions here, since they may appear in an `.override'; see
24229 gen-98/gen-99 for an example.
24231 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
24233 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
24236 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
24239 2004-11-11 Martin Baulig <martin@ximian.com>
24241 * class.c (mono_class_setup_vtable): In an explicit interface
24242 implementation, the method name now includes the arity.
24244 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
24246 * object.c (mono_array_full_copy): Fix warning.
24248 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
24250 * appdomain.c: Removed look_for_method_by_name(). Use the new method
24251 mono_class_get_method_from_name() instead.
24253 * class-internals.h: Added two new types of wrappers.
24254 Added MonoRemotingTarget enum. Added new trampoline function type, which
24255 takes an additional MonoRemotingTarget value as parameter, so it is
24256 possible to request a trampoline for a specific target.
24258 * class.c: Added new mono_class_get_method_from_name() method.
24260 * class.h: In MonoRemoteClass, we can have now to vtables, one for
24261 general remoting sinks and one specific for cross domain calls.
24263 * debug-helpers.c: Added new wrapper names.
24265 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
24268 * image.c: Porperly delete value objects form the remoting invoke hashtable.
24270 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
24271 with several other methods (mono_marshal_get_xappdomain_dispatch,
24272 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
24273 and others) can generate a fast remoting wrapper for cross domain calls.
24274 More information can be found in docs/remoting.
24275 Other changes: Removed mono_find_method_by_name, and used
24276 mono_class_get_method_from_name instead.
24277 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
24278 is stored in the remoting invoke hashtable.
24280 * marshal.h: published the new method for getting the xdomain wrapper,
24281 and also added a method for getting the adequate wrapper for a given
24284 * object-internals.h, object.c: Added a couple of methods for capying and
24286 Modified mono_install_remoting_trampoline, which takes the new remoting
24287 trampoline that has a remoting target as parameter.
24288 mono_class_proxy_vtable now also takes a remoting target as parameter, and
24289 will return the most suitable vtable for the target.
24290 Added mono_remote_class_vtable, which returns the vtable of a remote class
24291 (which can be the normal remoting vtable or the xdomain vtable).
24293 * threads.c: the xdomain invoke and dispatch wrappers must also be
24294 protected against interruptions.
24296 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24298 * icall.c: use memmove in BlockCopyInternal when the source and
24299 destination arrays are the same.
24301 2004-11-09 Martin Baulig <martin@ximian.com>
24303 * class-internals.h (MonoGenericContainer): Removed `method' and
24304 `signature', replaced them with `is_method' and `is_signature'
24305 flags. Added `context'.
24307 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
24308 instead of a `MonoGenericContainer *'.
24310 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
24311 for dynamic type parameters.
24312 (mono_metadata_load_generic_params): Setup `container->context'.
24314 * reflection.c (mono_reflection_setup_generic_class): Setup
24315 `tb->generic_container->context'.
24316 (do_mono_reflection_bind_generic_parameters): Use
24317 mono_class_inflate_generic_type() to correctly inflate types,
24318 rather than using our own hack just for MONO_TYPE_VAR.
24320 2004-11-09 Martin Baulig <martin@ximian.com>
24322 * class.c (mono_class_inflate_generic_method): Small fix; don't
24326 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
24327 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
24328 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
24329 (ves_icall_Type_BindGenericParameters): Likewise.
24330 (ves_icall_Type_get_IsGenericInstance): Likewise.
24331 (ves_icall_Type_GetGenericParameterPosition): Likewise.
24332 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
24333 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
24334 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
24336 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
24338 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
24339 assembly versions and public key tokens. Fixes #69113.
24341 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
24343 * metadata.c: fix bug introduced with the type cache changes
24346 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
24348 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
24349 the MonoClass pointer instead of the token in exception clauses.
24350 * reflection.c: updates for the above and make the code not depend
24351 on the structure of MonoExceptionClause.
24353 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
24355 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
24356 Add support for dynamic assemblies. Fixes #69114.
24358 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
24360 2004-11-07 Ben Maurer <bmaurer@ximian.com>
24362 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
24363 since most only those methods use it. the code member of
24364 MonoMethodPInvoke was dead, so that can be removed too. Also,
24365 remove inline_count (again, not used), and move slot so that it
24366 can share bits with some other flags. This saves 8 bytes in the
24367 structure and gives us about 50 kb back for mcs helloworld.cs
24369 * *.[ch]: Do naming changes for the above.
24371 * loader.c (mono_method_get_header): Lazily init the header
24373 (mono_get_method_from_token): don't init the header here
24374 (mono_free_method): the header may never be allocated
24376 Overall, this saves 150 kb of unmanaged allocations
24377 for mcs helloworld.cs. That accounts for 10% of the unmanaged
24380 * loader.c, loader.h (mono_method_get_header): new accessor.
24382 * *.[ch]: use the above method. Prepares us to lazily load
24385 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
24386 three warnings, which are actual bugs (see 69206).
24388 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
24389 unused. Saves a cool 4 bytes / method.
24391 2004-11-06 Ben Maurer <bmaurer@ximian.com>
24393 * metadata.c (builtin_types): Add types for System.Object here.
24394 (mono_metadata_parse_type_full): Cache MonoType*'s that are
24395 for a class or valuetype from klass->this_arg or klass->byval_arg.
24397 On mcs for a hello world, this gets us down from 21836 MonoType's
24400 (mono_metadata_free_type): Account for the above change.
24402 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
24404 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
24405 exception instead of asserting if name is null.
24406 (ves_icall_System_AppDomain_GetData): Ditto.
24408 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
24410 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
24413 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
24414 Return NULL when the domain does not have entry_assembly set.
24416 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
24417 Add a 'resource_modules' argument.
24418 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
24420 * reflection.c (mono_reflection_create_runtime_class): Move setting
24421 of wastypebuilder here, so mono_get_type_object () returns a MonoType
24424 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
24425 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
24426 Throw an ArgumentNullException if 'ptr' is null.
24428 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
24429 assemblies here. Fixes #69020.
24431 2004-11-05 Geoff Norton <gnorton@customerdna.com>
24433 * reflection.c (build_compressed_metadata): Fix the previous patch for
24434 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
24437 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
24439 * assembly.c (mono_assembly_names_equal): Allow a match if one of
24440 the cultures is false. Fixes #69090.
24442 * reflection.c (build_compressed_metadata): Fix invalid memory read
24443 detected by valgrind.
24445 * reflection.c (mono_reflection_get_type): Avoid triggering a
24446 TypeResolve multiple times for the same type. Fixes #65577.
24448 2004-11-04 Ben Maurer <bmaurer@ximian.com>
24450 * marshal.c: Avoid using ldftn to call managed functions. It is
24451 much slower than just a call.
24453 * reflection.c (mono_module_get_object): free the basename we
24454 allocate here from glib.
24456 * reflection.c (ensure_runtime_vtable): make sure to free
24457 overrides. Also, we were allocating an array of MonoMethod not an
24458 array of MonoMethod*.
24460 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
24462 * image.c (mono_image_close): free image->guid here.
24464 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
24466 * reflection.c: Fix some spec conformance issues with the PE file
24467 structures so mcs compiled apps run on the Net 2.0 beta.
24469 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
24471 * string-icalls.c (ves_icall_System_String_ctor_encoding):
24472 Implement this. Fixes #67264.
24474 * debug-helpers.h debug-helpers.c marshal.c: Move
24475 mono_find_method_by_name to debug-helpers.c.
24477 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
24479 * object.c (mono_release_type_locks): type_initialization_hash is
24482 * reflection.c object.c object-internals.h: Fix warnings.
24484 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
24485 without accessors. Fixes #61561.
24487 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
24488 application base from the root domain if not set. Fixes #65641.
24489 (mono_runtime_init): Fix warning.
24491 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24493 * appdomain.c: call mono_thread_pool_init.
24494 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
24495 of worker threads based on the number of CPUs and the environment
24496 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
24497 for non-windows (windows) systems.
24499 2004-10-27 Chris Toshok <toshok@ximian.com>
24501 * mono-debug-debugger.c (write_class): don't call mono_class_init
24502 here, as even with the check for (!klass->init_pending), we get
24503 into a situation where we're hitting cycles in class
24504 initialization. Fixes #68816.
24506 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
24508 * image.c: Avoid overwriting values in the loaded_images_hash when an
24509 assembly is loaded multiple times. Fixes #61152.
24511 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
24512 so multiple satellite assemblies for the same name can be loaded.
24515 * mono_domain_assembly_preload: Actually return the loaded assembly,
24518 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
24519 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
24521 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
24522 pending finalizers are not invoked after the appdomain has been
24523 unloaded. Fixes #67862.
24525 2004-10-22 Martin Baulig <martin@ximian.com>
24527 * mono-debug-debugger.c
24528 (mono_debugger_runtime_invoke): Don't box valuetypes.
24530 2004-10-22 Chris Toshok <toshok@ximian.com>
24532 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
24533 don't hide private methods.
24535 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
24537 * icall.c: Allows the runtime to "share" (when known) the public key
24538 token of an assembly. This avoid the need to recalculate the token
24539 (from the public key) in managed code.
24541 2004-10-21 Chris Toshok <toshok@ximian.com>
24543 * debug-helpers.c (append_class_name): argh, revert last patch.
24545 2004-10-21 Chris Toshok <toshok@ximian.com>
24547 * debug-helpers.c (append_class_name): use '+' as the delimiter,
24548 not '/', so that it matches what the debugger uses to look up
24551 2004-10-21 Martin Baulig <martin@ximian.com>
24553 * mono-debug-debugger.c (mono_debugger_throw_exception): New
24554 public method; this is called each time an exception is thrown and
24555 allows the debugger to use exception catch points.
24557 2004-10-21 Martin Baulig <martin@ximian.com>
24559 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
24560 the stack pointer and the exception object in some struct and pass
24561 that to the debugger.
24563 2004-10-21 Chris Toshok <toshok@ximian.com>
24565 * mono-debug-debugger.c (do_write_class): add instance/static
24566 event support. We don't expose "raise" or "other" yet.
24567 (event_is_static): new method.
24569 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
24571 * mono-debug-debugger.c
24572 (mono_debugger_handle_exception): Remove
24573 bogus return value for fussy compilers.
24575 2004-10-20 Martin Baulig <martin@ximian.com>
24577 * mono-debug-debugger.c
24578 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
24579 (mono_debugger_handled_exception): Likewise.
24581 2004-10-20 Martin Baulig <martin@ximian.com>
24583 * mono-debug-debugger.h (MonoDebuggerEvent): Added
24584 MONO_DEBUGGER_EVENT_EXCEPTION.
24586 * mono-debug-debugger.c (mono_debugger_handle_exception): New
24587 public function to send the debugger a notification for an
24588 exception and inform it about a catch/finally clause.
24590 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
24592 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
24593 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
24596 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
24598 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
24600 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
24601 marshalled as [In,Out]. Fixes #58325.
24603 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
24605 * reflection.c (mono_method_body_get_object): Implement some fields.
24607 2004-10-12 Martin Baulig <martin@ximian.com>
24609 * reflection.c (mono_reflection_bind_generic_parameters): Small
24610 fix, correctly retrieve our parent from a generic instance.
24612 2004-10-12 Martin Baulig <martin@ximian.com>
24614 * metadata.c (mono_metadata_generic_param_equal): We always have
24618 (mono_class_from_generic_parameter): We need to have an owner.
24619 (my_mono_class_from_generic_parameter): Likewise.
24621 * reflection.c (mono_reflection_setup_generic_class): Renamed to
24622 mono_reflection_create_generic_class() and added a new
24623 mono_reflection_setup_generic_class().
24624 (mono_reflection_initialize_generic_param): If we're a nested
24625 generic type and inherited from the containing class, set our
24626 owner to the outer class.
24628 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
24630 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
24632 * reflection.c (mono_method_body_get_object): New function to create
24633 a MethodBody object.
24635 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
24637 2004-10-11 Martin Baulig <martin@ximian.com>
24639 * metadata.c (_mono_metadata_type_equal): Renamed to
24640 do_mono_metadata_type_equal() and made static.
24642 2004-10-11 Martin Baulig <martin@ximian.com>
24644 * appdomain.c: Bump corlib version number to 28.
24646 2004-10-10 Martin Baulig <martin@ximian.com>
24648 * class-internals.h
24649 (MonoGenericInst): Added `MonoGenericContainer *container'.
24650 (MonoGenericMethod): Likewise.
24651 (MonoGenericContext): Likewise.
24652 (MonoGenericParam): Added `MonoGenericContainer *owner'.
24655 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
24656 (do_mono_metadata_parse_generic_inst): Likewise.
24657 (mono_metadata_parse_type_full): New public method. This is the actual
24658 mono_metadata_parse_type() implementation - with an additional
24659 `MonoGenericContainer *' argument.
24660 (mono_metadata_parse_array_full): Likewise.
24661 (mono_metadata_parse_signature_full): Likewise.
24662 (mono_metadata_parse_method_signature_full): Likewise.
24663 (mono_metadata_parse_mh_full): Likewise.
24664 (mono_type_create_from_typespec): Likewise.
24665 (mono_metadata_interfaces_from_typedef_full): New public method;
24666 this is similar to the other _full() methods, but we take a
24667 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
24668 (mono_metadata_parse_generic_param): Take an additional
24669 `MonoGenericContainer *' argument and lookup the MonoGenericParam
24670 from that container.
24671 (mono_metadata_generic_param_equal): New static method to compare
24672 two type parameters.
24673 (_mono_metadata_type_equal): New static method; takes an
24674 additional `gboolean signature_only' argument - if true, we don't
24675 compare the owners of generic parameters.
24676 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
24677 with a TRUE argument - do a signature-only comparision.
24679 * loader.c: Use the new _full() methods and pass the
24680 MonoGenericContainer to them.
24682 * object-internals.h (MonoReflectionTypeBuilder): Added
24683 `MonoGenericContainer *generic_container' field.
24684 (MonoReflectionMethodBuilder): Likewise.
24686 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
24688 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
24689 case initial images of dynamic assemblies.
24691 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
24693 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
24695 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
24696 length of event->other array.
24697 (typebuilder_setup_events): Ditto.
24699 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
24700 'assembly_by_name' and add an 'assemblies' list.
24702 * assembly.h assembly.c: Add a new search hook for determining whenever
24703 an assembly is already loaded. Use this instead of searching in the
24704 loaded_assemblies list.
24706 * domain.c appdomain.c: Implement the new search hook so loaded
24707 assemblies are now scoped by appdomain. Fixes #67727.
24709 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
24711 * threads.c (mono_thread_attach): Initialize synch_lock field so
24712 mono_thread_detach works again.
24714 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
24715 'lib' too. Fixes #63130.
24717 2004-10-06 Jackson Harper <jackson@ximian.com>
24719 * culture-info-tables.h: regenerated.
24721 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
24723 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
24724 implemented by other interfaces in the result. Fixes #65764.
24726 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
24727 Handle unloadable modules without crashing.
24729 * image.c (load_modules): Revert the previous patch since modules must
24730 have a fixed index inside the array.
24732 * image.c (load_modules): Don't include native modules in the modules
24735 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
24737 * reflection.h: Add param_defaults field.
24739 * reflection.c: Add support for parameter defaults in dynamic methods.
24742 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
24743 an empty string when a type has no namespace. Fixes #64230.
24745 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
24747 * tabledefs.h: Added "internal" security actions to support non-CAS
24748 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
24749 Note: they do not seems to be used anymore in 2.0 (new metadata format)
24751 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
24753 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
24754 constructor of abstract class. Fixes #61689.
24756 2004-10-04 Martin Baulig <martin@ximian.com>
24758 * class-internals.h (MonoGenericContainer): New type.
24759 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
24760 `MonoGenericContainer *generic_container'.
24761 (MonoClass): Replaced `gen_params' and `num_gen_params' with
24762 `MonoGenericContainer *generic_container'.
24764 * metadata.c (mono_metadata_load_generic_params): Return a
24765 `MonoGenericContainer *' instead of a `MonoGenericParam *';
24766 removed the `num' argument.
24768 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
24770 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
24771 for dynamic images.
24773 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
24776 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
24778 * reflection.c: Save pe_kind and machine values into the generated
24781 * appdomain.c: Bump corlib version number.
24783 * object-internals.h: Reorganize layout of LocalBuilder.
24785 * class-internals.h class.c (mono_class_get_implemented_interfaces):
24786 New helper function.
24788 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
24789 created MonoType for dynamic types. Fixes #66180.
24791 2004-10-02 Ben Maurer <bmaurer@ximian.com>
24793 * threadpool.c: the ares hashtable needs a critical section around it.
24794 this prevents some nasty segfaults
24796 2004-10-02 Massimiliano Mantione <massi@ximian.com>
24798 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
24799 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
24802 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
24804 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
24806 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
24808 * image.c: Always canonicalize image file names, to avoid loading
24809 the same assembly twice when referenced using a relative path.
24811 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
24813 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
24815 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
24817 * marshal.c: Fix warnings.
24819 2004-09-29 Geoff Norton <gnorton@customerdna.com>
24821 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
24822 attempting to marshal the delegate_trampoline as the method_addr.
24823 This patch has a static hashtable of marshalled delegates so that
24824 we can map delegate_trampoline addresses back to delegates. This
24825 allows a delegate passed to managed code to be passed back into native
24828 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
24830 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
24832 * reflection.c (method_encode_code): Align method headers properly.
24835 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
24837 * marshal.c: In the runtime invoke wrapper, reset the abort
24838 exception if it is cached. This avoids the automatic rethrowal of
24839 the exception after the catch of the wrapper. Also check for pending
24840 interruptions before calling the managed method. This is done using
24841 the new method emit_thread_force_interrupt_checkpoint, since the
24842 normal checkpoint method is ignored when running the invoke wrapper.
24843 * object.c: If the abort exception is rethrown, set the abort_exc
24844 field of the thread, so it will be rethrown aftere every catch.
24845 * threadpool.c: Only run an interruption checkpoint if what has been
24846 requested is a stop of the thread (aborts will be ignored).
24847 * threads.c: By default, a thread will now never be interrumped while
24848 running the runtime invoke wrapper (this ensures that runtime_invoke
24849 will always return to the caller if an exception pointer is provided).
24850 There is a new special method mono_thread_force_interruption_checkpoint()
24851 to force an interruption checkpoint even if running a protected
24852 wrapper, which is used by the same runtime invoke wrapper to do a check
24855 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
24857 * object.c, object-internals.h: Implemented mono_release_type_locks,
24858 which releases the cctor locks held by a thread.
24859 * threads.c, threads.h: In thread_cleanup, release cctor locks held
24860 by a thread. Added mono_thread_exit() method to be used to safely stop
24863 2004-09-28 Raja R Harinath <rharinath@novell.com>
24865 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
24866 Move null check before dereference. Avoid indexing beyond the end
24867 of the 'modules' array.
24869 2004-09-28 Raja R Harinath <rharinath@novell.com>
24871 * metadata-internals.h (MonoImage): Add module_count field.
24872 * image.c (load_modules): Set image->module_count.
24873 (mono_image_load_file_for_image): Use image->module_count.
24874 * reflection.c (mono_image_load_module): Append to image->modules array
24875 of dynamic assembly.
24876 (mono_module_get_object): Fix loop to actually increment index.
24877 Use image->module_count.
24878 * assembly.c (mono_assembly_load_references): Use image->module_count.
24879 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
24882 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
24884 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
24885 Avoid assert on generic types.
24887 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
24889 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
24891 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
24893 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
24894 function to convert a MarshalSpec structure to its managed counterpart.
24896 * reflection.c: Fix warnings.
24898 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
24901 * icall.c (mono_create_icall_signature): Fix build.
24903 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
24905 * icall.c: Add MakePointType icall.
24907 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
24910 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24912 * threadpool.c: reuse allocated slots in the queue.
24914 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
24916 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
24918 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
24920 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
24923 * tabledefs.h: Add constants for pinvoke attributes BestFit and
24924 ThrowOnUnmappableChar.
24926 * icall.c (ves_icall_Type_GetPacking): New icall.
24928 2004-09-24 Martin Baulig <martin@ximian.com>
24930 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
24932 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24935 (mono_domain_set): allow setting a domain that is being unloaded.
24936 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
24939 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
24941 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
24942 the GetCustomAttributes icall.
24944 2004-09-23 Martin Baulig <martin@ximian.com>
24946 * object-internals.h (MonoReflectionGenericParam): Replaced
24947 'has_ctor_constraint', `has_reference_type' and `has_value_type'
24948 with `guint32 attrs'.
24950 2004-09-23 Martin Baulig <martin@ximian.com>
24952 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
24954 2004-09-23 Martin Baulig <martin@ximian.com>
24956 * object-internals.h (GenericParameterAttributes): New enum.
24958 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
24960 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
24962 * class.c (init_events): Fill out event->other field.
24964 * class.c: Fix warnings.
24966 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
24968 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
24970 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
24971 walk which doesn't supply the IL offset.
24973 2004-09-22 Martin Baulig <martin@ximian.com>
24975 * reflection.c (mono_reflection_setup_internal_class): If we're
24976 System.ValueType, System.Object or System.Enum, set
24977 `klass->instance_size' and create the vtable.
24978 (mono_reflection_create_internal_class): If we're an enum type,
24979 get the base class from our current corlib.
24981 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
24983 * reflection.h (MonoResolveTokenError): New type.
24985 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
24988 * icall.c: Add an 'error' argument to the ResolveToken icalls.
24990 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
24992 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
24993 Support also calling constructors, but only for already allocated objects.
24995 2004-09-17 Geoff Norton <gnorton@customerdna.com>
24997 * reflection.c (type_get_qualified_name): If the klass is null
24998 return the typename to avoid a NullRefEx.
24999 (encode_cattr_value): Get the qualified name of the boxed type,
25000 not the underlying enumtype. Fixes #62984.
25002 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
25004 * marshal.c: Fix problems with previous checkin.
25006 2004-09-21 <vargaz@freemail.hu>
25008 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
25009 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
25011 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
25013 2004-09-21 Geoff Norton <gnorton@customerdna.com>
25015 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
25016 should only return a type for pointers, arrays, and passbyref types.
25019 2004-09-21 Martin Baulig <martin@ximian.com>
25021 * domain.c (mono_debugger_check_runtime_version): New public
25024 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
25026 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
25028 * reflection.c: Added missing sort to the declarative security
25029 attributes table. MS implementation stops seeing the attributes if the
25030 token number regress in the table (as shown by ildasm and permview).
25032 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
25034 * object-internals.h (MonoReflectionModule): Add 'token' field.
25036 * reflection.c (mono_reflection_get_token): Add support for Module
25038 (mono_module_get_object): Set 'token' field.
25039 (mono_module_file_get_object): Set 'token' field.
25041 * icall.c: Add new Assembly and Module icalls.
25043 * appdomain.c: Bump corlib version.
25045 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
25047 * loader.h loader.c class.h class.c: Add helper functions for obtaining
25048 tokens of metadata objects.
25050 * reflection.h reflection.c (mono_reflection_get_token): New function
25051 to obtain the token of a metadata object.
25053 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
25055 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
25057 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
25059 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
25061 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
25063 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
25064 * object-internals.h: Added 3 MonoArray* members to MonoReflection
25065 AssemblyBuilder to access the permissions set in the class lib.
25066 * reflection.c: Added security attributes encoding step in
25067 mono_image_build_metadata.
25068 * tabledefs.h: Added new security actions defined in 2.0:
25069 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
25071 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
25073 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
25076 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
25078 * locales.c: nullify the ICU_collator member of CompareInfo when it is
25079 finalized. There where random SIGSEVs at program termination, when
25080 an object being finalized was trying to do a string comparison and
25081 the current culture was already finalized.
25083 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25085 * threads.c: call thread_cleanup before finishing the thread if we get
25088 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
25090 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
25091 assemblies from the parent. Fixes #65665.
25093 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
25095 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
25098 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
25100 * reflection.h: add prototype for mono_get_dbnull_object
25101 * reflection.c: add prototypes for get_default_param_value_blobs
25102 and mono_get_object_from_blob for fussier compilers
25104 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
25106 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
25107 false deadlock checks in class initialization.
25109 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
25111 * image.c (mono_image_addref): Fix comment.
25113 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
25116 2004-09-12 Jambunathan K <kjambunathan@novell.com>
25118 * reflection.c (mono_param_get_objects): Modified to return
25119 ParameterInfo.DefaultValue object.
25121 (get_default_param_value_blobs):
25122 (mono_get_object_from_blob):
25123 (mono_get_dbnull_object): New helper routines.
25125 * object.c (mono_get_constant_value_from_blob): New helper routine
25126 carved out from get_default_field_value ()
25128 * object-internals.h (mono_get_constant_value_from_blob): Added
25129 function declaration.
25131 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
25133 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
25134 referenced assemblies. Fixes #62135.
25136 * exception.h exception.c (mono_get_exception_file_not_found2): New
25139 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
25141 * class.h class.c: Add mono_type_get_underlying_type ().
25143 2004-09-09 Geoff Norton <gnorton@customerndna.com>
25145 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
25146 Fix GetTypes() to support dynamically created assemblies.
25148 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
25150 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
25152 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
25155 * reflection.h reflection.c loader.c: Allow dynamic construction of
25156 pinvoke methods. Fixes #65571.
25158 * reflection.c (mono_reflection_get_type): Revert previous change since
25159 it causes regressions.
25161 2004-09-08 Martin Baulig <martin@ximian.com>
25163 * class.c (class_compute_field_layout): Don't call
25164 mono_class_layout_fields() for open generic instances.
25166 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
25167 * threads.c appdomain.c: fix typo in GC macro
25169 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25171 * threads.c: don't call mono_thread_detach() in start_wrapper(),
25172 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
25174 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
25176 * image.c (mono_image_close): Applied patch from
25177 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
25178 assembly is loaded multiple times from data.
25180 * image.c (mono_image_open): Fix warning.
25182 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
25184 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
25185 once. Fixes #58334.
25187 * reflection.c (mono_reflection_create_runtime_class): Initialize
25188 klass->nested_classes. Fixes #61224.
25190 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
25192 * threads.c: sched_yield() on exit, to allow threads to quit.
25194 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
25196 * object.c (mono_unhandled_exception): Remove leftover debug code.
25198 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
25200 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
25202 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
25204 * marshal.c (emit_marshal_array): Really null terminate string arrays.
25206 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
25208 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
25210 * marshal.c (emit_marshal_array): Null terminate string arrays.
25212 * marshal.c (raise_auto_layout_exception): Fix warning.
25214 * reflection.c (mono_param_get_objects): Initialize the default value
25215 with DBNull.Value, not null. Fixes #62123.
25217 2004-09-01 Miguel de Icaza <miguel@ximian.com>
25219 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
25220 throw an exception with a cute explanation.
25222 2004-09-06 Dick Porter <dick@ximian.com>
25224 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
25225 Close the new process's thread handle, as we don't use it. The
25226 handle stays around forever otherwise.
25228 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
25230 * object.c (arith_overflow): Fix warning.
25232 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
25233 calling conventions in method refs. Fixes #65352.
25235 * reflection.c: Fix warnings.
25237 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
25239 * icall.c: Add a new icall for Array.Clear
25241 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
25243 * object.c: When allocating an array, we have to throw
25244 an overflow exception if any of the lengths are < 0.
25246 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
25248 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
25249 properly. Also move implementation of string array marshalling to
25250 managed code. Fixes #42316.
25252 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25254 * assembly.c: provide more information when loading an assembly fails.
25256 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25258 * filewatcher.c: don't expect the development fam package to be
25261 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
25263 * marshal.c: Make a copy of the signature cookie since it will be
25264 freed by the caller.
25266 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
25268 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
25270 * metadata.c (mono_metadata_free_marshal_spec): New function to free
25273 * marshal.c: More refactoring.
25275 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
25278 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
25280 * object.c: In mono_message_invoke, fill the output parameter array after
25281 calling the managed method (it was done before the call). This fixes
25284 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
25286 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
25289 2004-09-02 Martin Baulig <martin@ximian.com>
25291 * class.c (mono_class_instance_size): Don't allow generic type
25292 definitions or open generic instances.
25293 (mono_class_array_element_size): If we're a value type, call
25294 mono_class_instance_size() on the original class.
25296 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
25297 handle generic instances.
25299 * mono-debug-debugger.c (write_type): Handle generic instances
25302 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
25304 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
25305 the allocation request fails. Fixes #65089.
25307 * object.c (mono_runtime_free_method): Do not call mono_free_method.
25309 * object.c (mono_runtime_free_method): New function to free a dynamic
25312 * marshal.c (mono_delegate_free_ftnptr): New function to free the
25313 delegate trampoline.
25315 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
25316 with hasthis as dynamic,
25318 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
25320 * domain.c (mono_jit_info_table_remove): New function to remove an
25321 entry from the jit info table.
25323 * class-internals.h (MonoMethod): Add 'dynamic' field.
25325 * loader.c: Fix warnings.
25327 2004-09-01 Martin Baulig <martin@ximian.com>
25329 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
25330 instead of mono_debugger_lock() because the latter one is a no-op
25331 unless running in the debugger.
25333 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
25335 * class.c (class_compute_field_layout): Classes with auto-layout or
25336 reference fields are not blittable.
25338 2004-09-01 Dick Porter <dick@ximian.com>
25340 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
25341 mono_image_get_filename() to get the assembly location.
25344 * metadata.h: Fix compile warnings
25346 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
25348 * class.c (class_compute_field_layout): System.Object is blittable.
25350 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
25351 as in/out. Fixes #59909.
25353 2004-09-01 Martin Baulig <martin@ximian.com>
25355 * metadata.h (MONO_TYPE_ISREFERENCE): Call
25356 mono_metadata_generic_inst_is_valuetype() if we're a generic
25357 instance to check whether our underlying type is a reference type.
25359 2004-09-01 Martin Baulig <martin@ximian.com>
25361 * metadata.c (mono_type_size): If we're a generic instance, call
25362 mono_class_value_size() for value types.
25364 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
25366 * marshal.c: Implement more custom marshalling functionality. Fixes
25369 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
25371 * mono-debug.c, debug-mono-symfile.c: add some locking love.
25373 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
25375 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
25377 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
25379 * icall.c: Fix some warnings.
25381 * threads.c (abort_appdomain_thread): Fix unref errors.
25382 (mono_thread_current): Fix THREAD_DEBUG define.
25384 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
25386 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
25388 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
25390 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
25392 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
25395 2004-08-28 Martin Baulig <martin@ximian.com>
25398 (mono_metadata_generic_inst_is_valuetype): New public function.
25400 * metadata.h (MONO_TYPE_ISSTRUCT): Call
25401 mono_metadata_generic_inst_is_valuetype() if we're a generic
25402 instance to check whether our underlying type is a valuetype.
25404 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
25406 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
25409 2004-08-25 Martin Baulig <martin@ximian.com>
25411 * loader.c (mono_get_method_from_token): Abstract methods can also
25412 be generic and thus have type parameters.
25414 * metadata-internals.h
25415 (MonoDynamicImage): Added `GPtrArray *gen_params'.
25417 * reflection.c (mono_image_get_generic_param_info): Don't create a
25418 metadata row, just add an entry to the `gen_params' array.
25419 (build_compressed_metadata): Sort the `gen_params' array and then
25420 actually create the metadata.
25422 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25424 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
25426 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
25428 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
25430 2004-08-24 Martin Baulig <martin@ximian.com>
25432 * class.cs (mono_class_is_subclass_of): Like an interface, a
25433 generic instance also derives from System.Object.
25435 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
25437 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
25438 custom modifiers to be in any order. Fixes #61990.
25440 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
25442 * object.c: Register mono_object_new_fast icall.
25444 * object.c (mono_class_get_allocation_ftn): Return to calling
25445 mono_object_new_fast, since it seems faster to compute the object
25446 size in unmanaged code than passing it as a parameter.
25448 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
25450 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
25451 this function with Boehm as the oom handler, so we don't have to check
25452 the result of GC_malloc.
25454 * object.c: Remove checks for oom.
25456 * object.h object.c (mono_class_get_allocation_ftn): New function to
25457 return the icall which can be used to allocate an instance of a given
25460 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
25462 * class-internals.h: Add 'enabled' field.
25464 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
25466 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
25468 2004-08-18 Jambunathan K <kjambunathan@novell.com>
25469 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
25472 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
25474 * appdomain.c: use the Tls function for appdomain too,
25475 at Zoltan's request. Actually return in mono_context_get
25477 * appdomain.c, profiler.c, threads.c: use __thread
25479 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
25481 * appdomain.c threads.c: Call GC_CreateThread on windows.
25483 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
25484 multiple libraries since this don't work on windows.
25486 2004-08-18 Martin Baulig <martin@ximian.com>
25488 * class-internals.h
25489 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
25492 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
25493 MonoMethodNormal since we also need it for abstract and interface
25497 (build_compressed_metadata): Sort the GenericParam table.
25498 (mono_image_create_token): Added `gboolean create_methodspec'
25499 argument; this is false when generating a MethodImpl token.
25500 (reflection_methodbuilder_to_mono_method): Abstract and interface
25501 methods may also have generic parameters.
25503 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
25505 * appdomain.c: thread local alloc
25507 2004-08-17 Martin Baulig <martin@ximian.com>
25509 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
25512 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
25515 * class.c (mono_type_get_full_name): New public function.
25516 (mono_type_get_name): Don't include the type arguments.
25518 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
25520 * Makefile.am: Build static versions of libmetadata and libmonoruntime
25521 for inclusion into the mono executable.
25523 2004-08-16 Martin Baulig <martin@ximian.com>
25525 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
25526 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
25528 2004-08-14 Martin Baulig <martin@ximian.com>
25530 * class.c (dup_type): Also copy the `byref' field.
25532 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
25534 * reflection.c (create_dynamic_mono_image): Revert the last change
25535 since it breaks bootstrap.
25537 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
25539 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
25541 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
25542 not free them with g_free.
25544 2004-08-11 Martin Baulig <martin@ximian.com>
25546 * reflection.c (mono_reflection_setup_internal_class): Also call
25547 mono_class_setup_mono_type() if we already have a `tb->type.type'.
25549 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
25551 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
25552 called during default (first) AppDomain creation. Keep track of
25553 Evidence when loading assemblies.
25555 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
25557 * opcodes.c, opcodes.h: reduce runtime relocations.
25559 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
25561 * culture-info.h, locales.c: fixes and chages to sue the new
25562 optimized format of the locale data.
25563 * culture-info-tables.h: regenerated.
25565 2004-08-06 Geoff Norton <gnorton@customerdna.com>
25567 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
25569 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
25571 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
25572 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
25573 * domain-internals.h: icall declaration.
25574 * icall.c: icall registration.
25575 * object-internals.h: New fields in MonoAssembly for CAS.
25577 2004-08-05 Duncan Mak <duncan@ximian.com>
25579 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
25582 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
25584 * reflection.c: fix to deal with object[] arrays in custom ctors
25587 2004-08-05 Martin Baulig <martin@ximian.com>
25589 * class.c (mono_class_array_element_size): Added support for
25590 generic instances and correctly handle "recursive" types.
25592 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
25594 * assembly.c: Fix warnings.
25596 2004-08-04 Martin Baulig <martin@ximian.com>
25599 (mono_type_get_name_recurse): Added `gboolean include_arity'
25600 argument specifying whether or not we should include the generic
25601 arity in the type name.
25602 (_mono_type_get_name): New static function.
25603 (mono_class_setup_vtable): If we're a generic instance, don't
25604 include the generic arity in the names of explicit method
25607 2004-08-03 Martin Baulig <martin@ximian.com>
25609 * class.c (mono_type_get_name_recurse): Enclose the generic type
25610 arguments in `<', '>'.
25612 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
25614 * gc.c: make GC warning messages use the trace API, they are just
25615 noise to most of the users.
25617 2004-08-03 Martin Baulig <martin@ximian.com>
25619 * debug-mono-symfile.c (read_string): Correctly read the string.
25621 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
25623 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
25625 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
25627 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
25629 2004-07-30 Martin Baulig <martin@ximian.com>
25631 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
25632 Reflect latest symbol writer changes.
25634 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
25636 * object.c: always create an object if null is passed
25637 to Invoke() where a valuetype is expected.
25639 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
25641 * marshal.c (mono_marshal_init): make managed
25642 signatures match native ones better for 64bits.
25644 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25646 * appdomain.c: hack to build correctly the private bin path on windows.
25649 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
25651 * assembly.c: Load mscorlib from the correct framework directory
25652 (mono/<version>/mscorlib.dll).
25653 * appdomain.h: Added prototypes for new functions.
25654 * internals.h: Added some prototypes.
25655 * domain.c: When initializing the runtime, get from the executable and
25656 the configuration files the runtime version that the app supports.
25657 Added support methods for reading app.exe.config. Added list of versions
25658 supported by the JIT. Added two new methods: mono_init_from_assembly,
25659 which initializes the runtime and determines the required version from
25660 the provided exe file, and mono_init_version, which initializes
25661 the runtime using the provided version.
25662 * icall.c: Get machine.config from version-specific directory.
25663 * reflection.c: When generating an image, embed the version number
25664 of the current runtime.
25666 2004-07-28 Dick Porter <dick@ximian.com>
25669 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
25670 returned sockaddr size before creating the remote address object.
25671 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
25674 2004-07-28 Dick Porter <dick@ximian.com>
25676 * locales.c (string_invariant_compare_char): Fix invariant char
25677 compares between upper and lower cases. Fixes bug 61458.
25679 2004-07-27 Ben Maurer <bmaurer@ximain.com>
25681 * marshal.c: actually cache stelem.ref wrappers.
25683 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
25685 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
25686 sections and remove the mono_cli_rva_map () function.
25688 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
25690 * debug-mono-symfile.c: fix one more endianess issue, from a patch
25691 by Geoff Norton (<gnorton@customerdna.com>).
25693 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
25695 * class.c: fix class loads for pointer types (typeof(int) !=
25698 2004-07-27 Martin Baulig <martin@ximian.com>
25700 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
25701 reading the debugging information from an external ".mdb" file.
25703 2004-07-24 Martin Baulig <martin@ximian.com>
25705 * reflection.c (mono_image_get_type_info): Only write a class
25706 layout entry if we actually have a size or a packing size.
25708 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
25710 * reflection.c (type_get_fully_qualified_name):
25711 insert cast to get type checking of ?: with non-gcc compilers
25713 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
25715 * rand.c: use g_getenv for both lookups of
25718 2004-07-17 Martin Baulig <martin@ximian.com>
25720 * reflection.c (mono_reflection_bind_generic_method_parameters):
25721 Set `gmethod->reflection_info'.
25723 2004-07-17 Martin Baulig <martin@ximian.com>
25725 * class.c (mono_class_create_from_typedef): Insert the newly
25726 created class into the hash table before computing the interfaces
25727 since we could be called recursively.
25729 2004-07-16 Ben Maurer <bmaurer@ximain.com>
25731 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
25732 function to implement stelem.ref in managed code
25733 * class-internals.h, debug-helpers.c: a new wrapper type
25736 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
25738 * gc.c: allow GC handles to work even when no GC is compiled in.
25739 Fix part of bug #61134 (GetAddrOfPinnedObject).
25741 2004-07-13 Peter Williams <peter@newton.cx>
25743 * process.c (complete_path): Make sure we don't attempt to execute
25746 2004-07-12 Geoff Norton <gnorton@customerdna.com>
25748 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
25749 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
25750 and will add/subtract the hour if needed
25752 2004-07-12 Martin Baulig <martin@ximian.com>
25754 * reflection.c (mono_field_get_object): If we have
25755 `field->generic_info', take the attributes from
25756 `field->generic_info->generic_type'.
25758 2004-07-12 Martin Baulig <martin@ximian.com>
25760 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
25761 This function must be called before initializing the runtime.
25762 (mono_debug_init_1): New function; call this after initializing
25763 the runtime, but before loading the assembly. It tells the
25764 debugger to load corlib and the builtin types.
25766 * mono-debug-debugger.c: Did some larger changes in the debugging
25767 code; support recursive class declarations, make sure we actually
25770 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25772 * debug-helpers.c: undo my previous patch and fixed the real issue in
25773 ../mini/exceptions-x86.c
25775 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25777 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
25778 when no HOME env. variable was set and a NullRef was thrown in a .cctor
25779 called from other .cctors.
25781 2004-07-09 Miguel de Icaza <miguel@ximian.com>
25783 * loader.c: Removed the mono_loader_wine_init hack now that we are
25784 doing a managed version of Windows.Forms.
25786 2004-07-09 Ben Maurer <bmaurer@ximian.com>
25788 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
25789 threadpool.c, threads.c: remove static data from rootset.
25791 2004-07-09 Dick Porter <dick@ximian.com>
25793 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
25794 Don't do any more processing if the matched length was 0. It was
25795 increasing the size of the string before. Fixes bug 61167.
25797 2004-07-09 Dick Porter <dick@ximian.com>
25801 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
25802 Add support for SO_PEERCRED if its available.
25804 2004-07-09 Peter Bartok <pbartok@novell.com>
25805 * loader.c: winelib.exe.so error message is now only displayed if
25806 MONO_DEBUG is set. To help us avoid questions when people are trying
25807 out the new Managed.Windows.Forms.
25809 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
25811 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
25812 for isinst and castclass wrappers.
25814 * class-internals.h icall.c: Move registration and lookup of JIT icalls
25815 to libmetadata from the JIT, so they could be used by the marshalling
25816 code and the interpreter.
25818 * marshal.c: Register marshalling related JIT icalls here instead of
25819 in mini.c. Use CEE_MONO_ICALL instead of the family of
25820 CEE_MONO_PROC<x> opcodes to call marshalling functions.
25822 * metadata.h: Remove unneeded marshalling conversions.
25824 * opcodes.c: Update for new opcodes.
25826 2004-07-08 Martin Baulig <martin@ximian.com>
25828 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
25829 (mono_debug_get_domain_data): Make this function static.
25831 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
25833 * gc.c, object.h: add nice GC handle API for embedders.
25835 2004-07-06 Ben Maurer <bmaurer@ximian.com>
25837 * reflection.c: more changes for the new api
25839 * object.c: When we reflect on a field w/ a constant value, it
25840 will not have a memory location, so we must access metadata. Also,
25841 allow easier reading of strings so that we can read them from
25844 * class.c (mono_class_layout_fields): no need for literal fields here.
25846 * class-internals.h: api changes for const fields
25848 * icall.c (ves_icall_get_enum_info): use new apis for const fields
25850 2004-07-06 Martin Baulig <martin@ximian.com>
25852 * mono-debug.h: Increment version number to 44.
25854 * mono-debug.c (mono_debug_add_wrapper): The second argument is
25855 now a gpointer, rewrote this whole method.
25857 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
25858 function. Add information about the wrapper in a new "misc table".
25860 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
25861 for the new misc table.
25863 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
25865 * metadata-internals.h image.c: Add a cache for helper signatures.
25867 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
25869 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
25871 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
25872 delegates from a delegate. Fixes #61033.
25874 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
25875 marshalling of stringbuilder arrays. Fixes #59900.
25877 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
25879 * icall.c: Add EnumBuilder:setup_enum_type icall.
25881 2004-06-30 Ben Maurer <bmaurer@ximian.com>
25883 * icall.c: Added a new icall for the property version of
25884 OffsetOfStringData.
25886 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
25888 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
25889 it has a constant size across platforms.
25891 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
25894 2004-06-29 Martin Baulig <martin@ximian.com>
25896 * mono-debug.c (mono_debug_add_method): Protect the whole function
25897 in mono_debugger_lock(), not just parts of it.
25899 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
25901 * reflection.c: make sure padding bytes in heaps are zeroed.
25903 2004-06-24 David Waite <mass@akuma.org>
25905 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
25906 image.c, loader.c, locales.c, marshal.c, metadata.c,
25907 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
25908 string-icalls.c, threads.c: change to C90-style comments from C99 /
25911 2004-06-24 Dick Porter <dick@ximian.com>
25914 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
25915 return createdNew. Fixes bug 60412.
25918 * icall.c: Add createdNew parameter to CreateMutex icall
25920 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
25922 * reflection.c, object-internals.h: save default value in params.
25924 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25926 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
25927 no need to build a new path combining that with the application base.
25930 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
25932 * reflection.c: fixed minor standard compliance issues.
25934 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
25936 * reflection.c: fixed issue with encoding some custom attributes
25937 (arrays in properties and fields, bug #60411).
25939 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25941 * reflection.c: fix start address when copying the public key token.
25943 2004-06-23 Martin Baulig <martin@ximian.com>
25945 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
25946 the `exc' object in a static object to put it into the GC's root set.
25948 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
25950 * reflection.c: make mono_reflection_setup_internal_class ()
25951 callable a second time to setup a new parent class.
25953 2004-06-23 Dick Porter <dick@ximian.com>
25955 * threads.c: Check for WAIT_IO_COMPLETION return values.
25957 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
25959 * appdomain.c: Removed the g_free on the public key token. Now copy
25960 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
25961 * assembly.c: Added public key token string value when loading
25962 assemblies. Fix bug #60439.
25963 * icall.c: Added missing informations (like public key) in
25964 GetReferencedAssemblies. Fix #60519.
25965 * image.h: Changed definition for public key token from const char*
25966 public_tok_value to guchar public_key_token [17];
25967 * reflection.c: Updated for changes to public key token.
25969 2004-06-22 Lluis Sanchez Gual
25971 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
25972 for the field in base classes.
25974 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
25976 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
25977 mark headers as not supported, they are installed only for use by the
25980 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
25982 * *.c, *.h: avoid namespace pollution in public headers.
25984 2004-06-21 Martin Baulig <martin@ximian.com>
25986 * exception.c (mono_get_exception_security): It's in
25987 "System.Security", not in "System".
25989 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
25990 the exception classes.
25992 2004-06-21 Martin Baulig <martin@ximian.com>
25994 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
25995 Protect the exception object from being finalized.
25997 2004-06-21 Martin Baulig <martin@ximian.com>
25999 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
26002 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
26004 * reflection.c: Load the assembly in mono_reflection_type_from_name,
26005 if it was not loaded before. Fix parts of #60439.
26007 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
26009 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
26010 code that was broken since Ben's change: wrappers are now
26011 dependent on the method signature only again.
26013 2004-06-21 Martin Baulig <martin@ximian.com>
26015 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
26016 added interface support.
26018 2004-06-21 Martin Baulig <martin@ximian.com>
26020 * class.c (mono_vtable_get_static_field_data): New public method.
26022 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
26024 * filewatcher.c : Windows build fix to be compliant with API changes.
26026 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
26028 * class.h, class.c: more accessors.
26029 * metadata.h, metadata.c: prepare for hiding MonoType and
26030 MonoMethodSignature: people should use the accessors from now on
26031 outside of the tree.
26033 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
26035 * *.c, *.h: more API cleanups.
26037 2004-06-18 Jackson Harper <jackson@ximian.com>
26039 * assembly.c: Trace loading assemblies.
26040 * loader.c: Trace loading native libraries.
26041 * mono-config.c: Trace loading config files.
26043 2004-06-18 Dick Porter <dick@ximian.com>
26045 * locales.c: Tell ICU the lengths of strings, it can cope with
26046 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
26048 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
26050 * image.c: swapped name/filename;
26052 2004-06-18 Martin Baulig <martin@ximian.com>
26054 * mono-debug-debugger.c (write_class): Write the parent class at
26055 the end of the header.
26057 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
26059 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
26061 2004-06-17 Raja R Harinath <rharinath@novell.com>
26063 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
26064 (bundle_obj): New conditional define.
26065 (BUILT_SOURCES): Remove.
26066 ($(bundle_srcs)): Make parallel-make safe.
26067 (libmonoruntime_la_LIBADD): Make unconditional.
26068 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
26069 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
26071 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
26073 * culture-info-tables.h: It was inconsistent with the latest
26076 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
26078 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
26081 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
26084 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
26086 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
26087 cleaned up public header threads.h.
26089 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
26091 * Makefile.am, *.c, *.h: more API cleanups.
26093 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
26095 * Makefile.am: removed monosn from compilation.
26096 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
26097 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
26098 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
26099 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
26100 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
26101 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
26103 2004-06-15 Jackson Harper <jackson@ximian.com>
26105 * assembly.c: Make locales lower case when searching the GAC for
26106 assemblies. gacutil will always make locales lowercase when
26107 installing so this effectively makes them case insensitive.
26109 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
26111 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
26112 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
26113 parameter which allows to choose whether the wait can be interrupted or
26114 not. Also added the method mono_monitor_enter(), which locks the monitor
26115 using an infinite wait and without allowing interruption.
26116 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
26118 * object.h: Added new fields in MonoThread. suspend_event holds the event
26119 used to susped/resume the thread. synch_lock is the lock object to use for
26120 modifying the thread state.
26121 * threads.c: Use the new synch_lock object for locking, instead of "this",
26122 which can generate deadlocks.
26123 Moved thread state change in Thread.Sleep and Thread.Join from managed
26124 to unmanaged code. This avoids a deadlock when the thread was suspended
26125 just after acquiring the thread lock.
26126 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
26127 Implemented Thread.Suspend using an event instead of ThreadSuspend,
26128 which is not fully implemented in the io-layer.
26129 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
26131 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
26133 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
26134 threads-types.h: more API cleanups.
26136 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
26138 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
26139 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
26140 threadpool.c, threads.c: first pass at the exported API cleanup.
26142 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
26144 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
26146 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26148 * icall.c: added internalGetHome.
26150 2004-06-14 Dick Porter <dick@ximian.com>
26152 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
26153 possible to return successfully when '.' or '..' were the only
26154 entries in a directory, but were skipped. The MonoIOStat was not
26155 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
26158 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
26160 * reflection.c: make binaries run on .Net 1.1 by default.
26162 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
26164 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
26166 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
26168 * marshal.c: keep track of struct size with explicit layout
26171 2004-06-12 Martin Baulig <martin@ximian.com>
26173 * mono-debug-debugger.c: Comment out a debugging g_message().
26175 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
26177 * reflection.c, reflection.h: do not free custom attrs that are cached.
26178 * icall.c: use braces to make code clearer.
26180 2004-06-11 Martin Baulig <martin@ximian.com>
26182 * class.h (MonoInflatedField): New type.
26183 (MonoClassField): Replaced `MonoType *generic_type' with
26184 `MonoInflatedField *generic_info'.
26187 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
26189 2004-06-11 Martin Baulig <martin@ximian.com>
26191 * reflection.c (mono_image_create_method_token): Correctly encode
26194 2004-06-11 Martin Baulig <martin@ximian.com>
26196 * metadata.c (mono_metadata_parse_method_signature): When parsing
26197 a MethodDef which has VarArgs, also set sentinelpos if we don't
26198 have any parameters.
26200 2004-06-11 Martin Baulig <martin@ximian.com>
26202 * verify.c (mono_method_verify): In CEE_CALL, use
26203 mono_method_get_signature() to get the method's signature, unless
26204 we're a PInvoke method.
26206 2004-06-10 Jackson Harper <jackson@ximian.com>
26208 * assembly.c: Use <path>/lib/mono/gac for the extra paths
26209 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
26210 logical name as the supplied path is just a prefix to the gac not
26211 the direct path to it.
26213 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
26215 * reflection.c: make the token for a created method match
26216 the token of the MethodBuilder it was created from
26217 (IKVM requires this behaviour now).
26219 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
26221 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
26222 reflection.c, socket-io.c: leak fixes.
26224 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
26226 * icall.c: handle sentinel pos in vararg methods in position different
26229 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26231 * culture-info-tables.h: freshly generated.
26233 2004-06-09 Martin Baulig <martin@ximian.com>
26235 * loader.c (mono_get_method_constrained): Call `mono_class_init
26236 (constrained_class)'.
26238 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
26240 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
26241 any methods. Fixes #59629.
26243 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
26245 * culture-info-tables.h: reflecting locale-builder updates.
26247 2004-06-08 Dick Porter <dick@ximian.com>
26250 * locales.c: Fixed compile warnings, including a real bug in
26251 CompareInfo_internal_compare.
26253 2004-06-08 Dick Porter <dick@ximian.com>
26256 (ves_icall_System_Globalization_CompareInfo_internal_index):
26257 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
26258 Double-check the resuls of usearches, because ICU currently
26259 ignores most of the collator settings here. Fixes bug 59720.
26261 2004-06-08 Dick Porter <dick@ximian.com>
26264 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
26265 Fix memory leak and segfault-causing typo. No idea how this one
26266 lasted so long without being noticed.
26268 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
26270 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
26271 any methods. Fixes #59629.
26273 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26276 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
26277 own the critical section before). Removed dead code (that's done
26278 in the preload hook).
26280 (mono_assembly_load_with_partial_name): call the preload hook.
26282 2004-06-08 Martin Baulig <martin@ximian.com>
26284 * metadata.c (mono_metadata_signature_alloc): Default
26285 `sentinelpos' to -1.
26287 * reflection.c (mono_image_get_array_token): Likewise.
26289 2004-06-08 Martin Baulig <martin@ximian.com>
26291 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
26293 * metadata.c (mono_metadata_parse_method_signature): When parsing
26294 a MethodDef which has VarArgs, set sentinelpos.
26296 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
26297 `gint16' since we're using -1 for non-varargs methods.
26300 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
26301 (method_encode_signature): Added varargs support.
26302 (method_builder_encode_signature): Likewise.
26303 (mono_image_get_varargs_method_token): New static method.
26304 (mono_image_create_method_token): New public method; this is
26305 called via an icall instead of mono_image_create_token() when
26306 calling a varargs method.
26308 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
26310 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
26312 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
26314 * culture-info-tables.h : Reflecting the latest locale-builder that
26315 fixed empty array representation ({} to {0}).
26317 2004-06-07 Jackson Harper <jackson@ximian.com>
26319 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
26320 looking up extra gac paths. This allows MONO_GAC_PATH to act
26321 exactly like a prefix.
26323 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
26325 * reflection.c (mono_reflection_type_from_name): Make a copy of the
26326 type name before modifying it. Fixes #59405.
26328 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
26330 * culture-info.h: added fields for "all datetime patterns".
26331 * locales.c: ( ves_icall_System_Globalization_CultureInfo
26332 _construct_datetime_format ()): fill xxx_patterns fields.
26333 * object.h: added fields for "all datetime patterns" to
26334 MonoDateTimeFormatInfo.
26335 * culture-info-tables.h: reflecting locale-builder updates.
26337 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
26339 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
26340 the event has no add and remove methods. Fixes #59629.
26342 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
26344 * object.c: Fixed possible integer overflow when allocating large
26347 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
26349 * culture-info-tables.h: reflecting locale-builder updates.
26351 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
26353 * culture-info-tables.h: reflecting locale-builder updates.
26355 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
26357 * culture-info-tables.h: reflecting locale-builder updates.
26359 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
26361 * threads.c: Made Thread.Sleep abortable.
26363 2004-06-02 Martin Baulig <martin@ximian.com>
26365 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
26367 * debug-mono-symfile.h: Bumped symbol file version number to 37.
26369 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
26371 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
26373 2004-05-30 Jackson Harper <jackson@ximian.com>
26375 * reflection.c: Do not hardcode assembly versions or public key
26376 tokens anymore. All of this except the corlib section was dead
26379 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
26381 * object.c (mono_runtime_invoke_array): Automatically create boxed
26382 objects for byref valuetypes if needed. Fixes #59300.
26384 * object.c (mono_method_return_message_restore): Handle
26385 MONO_TYPE_OBJECT as well.
26387 2004-05-28 Jackson Harper <jackson@ximian.com>
26389 * reflection.c: The modified type encoding was causing build
26390 problems. Reverted for now.
26392 2004-05-28 Jackson Harper <jackson@ximian.com>
26394 * reflection.c/h: Take an assembly ref so that we dont create
26395 fully qualified names when encoding types in the same assembly as
26396 the custom attribute being emitted.
26397 * appdomain.c: Increment version number.
26399 2004-05-26 Duncan Mak <duncan@ximian.com>
26402 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
26403 Set the full version number (major, minor, build, revision).
26405 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
26407 * marshal.c (emit_struct_conv): increment src/dst after blit
26408 (mono_marshal_get_managed_wrapper,
26409 mono_marshal_get_native_wrapper): make sure we have marshalling
26410 info before marshalling params (info computation affects
26413 * class.c (class_compute_field_layout): correctly deal with
26415 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
26416 value types (as per what windows dows by default)
26417 (mono_class_setup_mono_type): System.ValueType is blittable
26418 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
26421 * marshal.c (mono_marshal_load_type_info): flag types as
26422 non-blittable if the native layout doesn't match the managed
26425 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26427 * appdomain.c: don't add stuff in the private search path that is
26428 above the application base. If application base is not set, there's
26429 no private search path.
26431 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
26433 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
26434 byref struct arguments in native->managed marshalling.
26436 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
26438 * marshal.c (mono_marshal_get_runtime_invoke): correctly
26439 cache methods using signature (special case for methods
26440 that are value type or string class)
26442 * image.c (mono_image_close): clean up allocated GSList's
26443 in runtime_invoke_cache.
26445 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26447 * mono-config.c: set the correct path for mono_cfg_dir on windows when
26448 there's no MONO_CFG_DIR environment variable defined.
26450 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26452 * threads.c: windows version must be >= 0x0500 to include OpenThread.
26454 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
26456 * threadpool.c: Really wait for 500ms after the async call, even if the wait
26458 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
26459 before waiting for it, and call CloseHandle after the wait to unref it.
26460 This will make sure that handles are not disposed too early.
26462 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26467 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
26470 * object.c: se the application_base only for the domain that runs
26471 Main. Fixes bug #59216,
26473 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26476 * object.c: only the domain in which Main is run have
26477 SetupInformation.ConfigurationFile set, so moved a few lines from
26478 appdomain.c to object.c.
26480 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26482 * appdomain.c: we tried to load [name].(dll|exe), but according
26483 to bug #57710, we must also try [culture]/[name].(dll|exe) and
26484 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
26485 There's a test case attached to bug #58922.
26487 2004-05-27 Dick Porter <dick@ximian.com>
26490 * file-io.c: Implemented icalls for locking and unlocking regions
26492 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
26493 FALSE on error (fixes both compiler warning and real bug.)
26495 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
26497 * culture-info-tables.h: reflecting locale-builder updates.
26499 (Added missing ChangeLog entry for 05/26)
26501 2004-05-27 Jackson Harper <jackson@ximian.com>
26503 * locales.c: Fix some cut and paste errors.
26505 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26507 * mono-config.c: set the correct path for config. directory on windows.
26509 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
26511 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
26514 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
26516 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
26517 from pinvoke functions.
26519 * marshal.c (mono_ftnptr_to_delegate): Implement this.
26521 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
26523 * culture-info-tables.h: reflecting locale-builder updates.
26525 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
26527 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
26530 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
26532 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
26533 * icall.c: Modified icalls for RNG.
26534 * rand.c|h: Changed RNG interface to allow thread-safe usage under
26535 Windows (CryptoAPI).
26537 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
26539 * locales.c: Fix build.
26541 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
26543 * culture-info-tables.h: reflecting locale-builder updates.
26545 2004-05-25 Jackson Harper <jackson@ximian.com>
26547 * locales.c: When creating the current culture use the $LANGs
26548 specific culture. So DateTimeFormat and NumberFormat entries are created.
26550 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
26552 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
26553 a char array as parameter.
26555 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
26557 * image.c: In mono_image_open(), always use an absolute path name to
26558 look for already loaded images.
26560 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
26562 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
26563 missing in the windows build (like older cygwin include files).
26565 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
26567 * icall.c: Fixed check for possible integer overflow in Buffer_
26568 BlockCopy icall. Replaced comments style // by /* */.
26570 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
26572 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
26574 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
26575 check after MONO_VTADDR. Fixes pinvoke2.exe.
26577 * marshal.h marshal.c metadata.h: Add beginnings of support for
26578 ftnptr -> delegate marshalling.
26580 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
26582 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
26583 * threads.c: Fix warnings.
26585 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
26587 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
26588 * icall.c: Registered icalls for Suspend and Resume.
26589 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
26591 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
26592 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
26593 * process.c: Use WaitForSingleObjectEx.
26594 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
26596 * threads.c, threads.h: Make use of new Ex wait methods. Improved
26597 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
26598 for Suspend and Resume. Added new mono_thread_stop, used for stoping
26599 background threads. Added basic support for Abort in Windows.
26600 Start new threads using a managed delegate invoke wrapper. This wrapper
26601 has an interruption checkpoint that is needed since an interruption
26602 can be requested before the thread leaves the unmanaged code that starts
26604 * marshal.c: Added interruption checkpoint after every native call, and
26605 also before managed calls for wrappers called from unmanaged code to
26606 go into managed code.
26607 * object.h: Added new field in MonoThread to keep track of interruption
26610 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
26612 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
26615 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26622 * rand.c: getenv -> g_getenv (windows!)
26624 * process.c: complete_path is also used on non-windows platforms.
26626 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26628 * icall.c: new signature for Process_Start.
26630 * process.[ch]: new signature for Process_Start. If we're on windows
26631 and UseShellExecute is false, we have to search for the program by
26632 ourselves if we don't get a full path.
26634 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
26636 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
26637 marshalling and call CleanUpNativeData if needed. Fixes #58646.
26639 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26641 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
26644 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26646 * process.c: use double quotes to quote program name and arguments on
26647 windows. Fixes bug #58575.
26649 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26651 * file-io.c: don't return "." and ".." when using windows Find*File.
26653 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
26655 * marshal.c: Don't pass wrappers to message init because method
26656 addressed used to lookup metadata. part of remoting[2|3] fix.
26658 2004-05-15 Jackson Harper <jackson@ximian.com>
26660 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
26661 path is essentially the same as MONO_PATH except that it points to
26662 GACs instead of lib directories.
26663 * loader.h: The user gac is gone so we dont need function to
26665 * mono-config.c: user gac option is now gone.
26667 2004-05-15 Jackson Harper <jackson@ximian.com>
26669 * culture-info.h: Make defines more consistent, add calendar data
26670 to the culture info table.
26671 * culture-info-tables.h: Add basic calendar data. Basically
26672 everyone gets default gregorian until all the data is
26674 * locales.c: Use the new consistent defines. Set calendar data for
26675 culture info objects.
26676 * object.h: add a field for calendar data to CultureInfo
26678 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
26680 * image.c: image->runtime_invoke_cache is keyed on signatures now.
26681 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
26683 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
26684 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
26685 an extra param that is the pointer of the method to invoke. The IL for
26686 the invoke method is no longer specific to the method, but to the
26687 signature of the method. Thus, we can share the same code for multiple
26688 methods. This reduces the number of methods that have to be compiled.
26690 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
26692 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
26694 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
26696 * icall.c: Optimize Buffer.BlockCopy.
26698 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26700 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
26701 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
26702 quote). Changed them to "MMMM yyyy".
26704 2004-05-12 Miguel de Icaza <miguel@ximian.com>
26707 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
26709 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
26711 * reflection.h: Updated after changes to managed structures.
26713 * appdomain.c: Bump corlib version.
26715 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26717 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
26720 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26722 * Makefile.am: link to ../os/libmonoos.la on windows.
26725 -If MONO_DEBUG, warn about non-existing directories in
26727 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
26728 compile time variable.
26729 -Removed init_default_path and call mono_set_rootdir from
26730 libmonoos.a instead (windows only).
26732 * assembly.h: declare mono_assembly_getrootdir().
26735 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
26737 * loader.c: s/getenv/g_getenv/
26739 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
26741 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
26743 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
26745 * metadata.h: Add new marshalling conversions.
26747 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
26750 * reflection.c (mono_reflection_get_type): Lookup the type in all
26751 modules of a multi-module assembly. Fixes #58291.
26753 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
26755 * threads.c: Before aborting a background, set the StopRequested
26756 state. This avoids throwing the Abort exception.
26757 In mono_thread_manage, don't continue with the shutdown until all
26758 aborted threads have actually stopped.
26760 2004-05-10 Jackson Harper <jackson@ximian.com>
26762 * locales.c: Remove the modifier from culture names.
26764 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26766 * Makefile.am: monosn is not installed any more. It has been deprecated
26769 2004-05-07 Jackson Harper <jackson@ximian.com>
26772 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
26773 Fix array construction, add bailout if the length is 0.
26775 2004-05-07 Dick Porter <dick@ximian.com>
26777 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
26778 machine doesn't have a DNS entry. Patch by Urs Muff
26779 (umuff@quark.com), fixes bug 57928.
26781 2004-05-06 Jackson Harper <jackson@ximian.com>
26783 * reflection.c: Handle null PublicTokens properly. alloc mem for
26784 assembly names culture so we dont crash when freeing it.
26786 2004-05-06 Jackson Harper <jackson@ximian.com>
26788 * assembly.c: Check the usergac when loading with partial names.
26790 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
26792 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
26793 does nothing for now (not required for Linux/Windows) but the class
26794 library can call it (and a newer or modified runtime could need it).
26795 * icall.c: Registred icall.
26797 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26799 * loader.c: prints a message on module loading error we set MONO_DEBUG
26800 environment variable.
26802 2004-05-05 Jackson Harper <jackson@ximian.com>
26804 * appdomain.c: Handle PublicKeyToken=null properly.
26806 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
26808 * environment.c|h: Added icall ves_icall_System_Environment_
26809 GetOSVersionString to get the current OS version as a string.
26810 * icall.c: Registred icall.
26812 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
26814 * object.c: in mono_object_get_virtual_method(), take into account that
26815 non-virtual methods don't have a slot in the vtable. Check needed when
26816 the object is a proxy.
26818 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
26820 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
26821 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
26823 * object.c (mono_class_compute_gc_descriptor): Fix warning.
26825 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
26826 passed when a valuetype is expected.
26828 * object.c (mono_unhandled_exception): Only set the exit code if the
26829 exception happens in the main thread. Fixes thread5.exe.
26831 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
26832 invalid names. Fixes #58047.
26834 2004-05-03 Jackson Harper <jackson@ximian.com>
26836 * assembly.c: This line was committed accidently and is unneeded.
26838 2004-05-03 Jackson Harper <jackson@ximian.com>
26840 * icall.c: Add new icall for Assembly::LoadWithPartialName
26841 * assembly.c/.h: new function that probes the GAC to load partial
26842 assembly names by Paolo Molaro.
26844 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26846 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
26847 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
26848 (type_get_fully_qualified_name): Added PublicKeyToken when building a
26851 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26853 * appdomain.c: fixed check for 'neutral' culture and removed warning.
26854 * reflection.c: fix bug when parsing a full type name and Version is not
26855 the last thing in the string.
26857 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
26859 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
26860 crashes when it is freed.
26862 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26864 * assembly.c: print the compat warning to stderr.
26866 2004-05-01 Miguel de Icaza <miguel@ximian.com>
26868 * assembly.c (mono_assembly_load_references): Add a compatibility
26869 hack to run old applications that might be still referencing the
26870 3300-based assemblies, only do this for System.xxx.
26872 2004-05-01 Jackson Harper <jackson@ximian.com>
26874 * appdomain.c: If the culture is neutral we set it to "".
26876 2004-04-29 Jackson Harper <jackson@ximian.com>
26878 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
26880 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
26882 * string-icalls.c: added low overhead function for copying chars
26883 * icall.c: added needed icall for the above function
26885 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26887 * icall.c: fix return value of get_global_assembly_cache. Implemented
26888 Environment.GetLogicalDrives.
26890 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
26892 * rand.c: try and talk to egd or prngd
26893 for random bytes if opening devices fail.
26895 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
26897 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
26898 alignment for the type using the native alignment of its members
26899 instead of using klass->min_align.
26901 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
26903 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26906 * socket-io.c: added check for sys/aio.h.
26908 2004-04-28 Dick Porter <dick@ximian.com>
26910 * threads.c: Don't abort a thread thats already aborting, when
26911 terminating everything.
26913 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26915 * icall.c: added 2 new async calls for Socket.
26917 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
26918 IO on *nix systems.
26920 * threadpool.c: removed unused variable.
26922 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
26924 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
26926 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
26928 * locales.c: put back string_invariant_tolower () and
26929 string_invariant_toupper ().
26931 2004-04-26 David Waite <mass@akuma.org>
26936 * unicode.h: remove comma from end of enumeration declarations
26938 2004-04-26 David Waite <mass@akuma.org>
26940 * debug-mono-symfile.h:
26943 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
26946 2004-04-26 Jackson Harper <jackson@ximian.com>
26948 * appdomain.c: Increment version number.
26950 2004-04-26 Jackson Harper <jackson@ximian.com>
26952 * appdomain.c: Set assembly references public token value when
26953 PublicKeyToken is specified, not the hash_value. Free public token
26954 values when free assembly name data. Previously the public key
26955 token was hex decoded, however we are using hex encoded public key
26956 tokens, so this is not neccasary.
26957 * assembly.c: Lookup assemblies in the gac if their public token
26958 value is set. Add function to allow enabling user gac
26959 lookups. Specify whether or not the assembly was loaded from the
26960 GAC. Compare full assembly names when checking the cache for
26961 assemblies (Temporarily disabled see comment in code). Remove
26962 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
26963 specifies trace-loader they get extra info to stdout on the
26964 loading of assemblies.
26965 * image.h: Add a field for an assembly references public token
26966 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
26967 whether an assembly has been loaded from the GAC.
26968 * image.c: Remove a corlib -> mscorlib name mapping.
26969 * loader.h: Add function to enable/disable the user gac.
26970 * mono-config.c: Check if the usergac is enabled in the config
26972 * icall.c: New icall to determine whether or not an assembly has
26973 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
26974 * tabldefs.h: Add constant for assemblyref flag that specifies a
26975 full public key is used instead of a public token.
26976 * reflection.c: Remove mscorlib -> corlib mappings. Set
26977 PublicTokenValue instead of hash value. This value is a hex
26978 string so it does not need to be expanded.
26980 2004-04-26 Martin Baulig <martin@ximian.com>
26982 * mono-debug-debugger.c (mono_debugger_initialize): Set
26983 `mono_debugger_initialized' before calling mono_debug_lock().
26985 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
26987 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
26988 InternalToUpper/InternalToLower.
26989 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
26990 removed invariant culture shortcut. This is now done in managed code.
26991 * locales.c: (string_invariant_toupper/tolower) removed.
26993 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26995 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
26996 Added Poll internal call.
26998 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
26999 call for Poll. Select was too heavy for polling a single socket.
27001 * threadpool.[ch]: added mono_threadpool_cleanup.
27002 * threads.c: use it. Don't use Thread_Abort on windows.
27004 2004-04-23 Martin Baulig <martin@ximian.com>
27006 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
27008 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
27010 * icall.c: Registred new icalls for key pair protection and added an
27011 icall for Environment.GetFolderPath on Windows.
27012 * security.c|h: Added new icalls for key pair protection.
27014 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27016 * socket-io.c: don't display the non-supported family warning for known
27017 families. Now this is not displayed on windows when checking support
27020 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27022 * class.c: don't display the layout warning for static fields.
27024 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
27026 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
27027 * locales.c, locales.h: Added new icalls for culture-specific
27028 Char.ToLower and Char.ToUpper.
27030 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27032 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
27035 2004-04-20 Martin Baulig <martin@ximian.com>
27037 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
27038 of the type name before passing it to mono_reflection_type_from_name().
27040 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
27042 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
27043 encodings here. Fixes #56965.
27045 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
27047 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
27048 fix test on strstr result not that I can see anything that
27049 relies on the result.
27051 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
27053 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
27056 * marshal.c (mono_marshal_get_string_encoding): New helper function.
27058 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
27059 function to determine which marshalling to use for strings. Fixes
27062 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
27064 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
27066 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
27068 * icall.c: #include mono-config.h
27070 2004-04-15 Jackson Harper <jackson@ximian.com>
27072 * culture-info-tables.h: Fix date formats for en-US culture.
27074 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
27076 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
27077 ThreadPool.SetMinThreads.
27078 * threadpool.c: Implemented ThreadPool.GetMinThreads and
27079 ThreadPool.SetMinThreads.
27081 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
27083 * mono-config.c: also load the .config file in the directory
27084 where the assembly was found.
27086 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
27088 * assembly.c: load per-assembly config files.
27089 * icall.c: decrapified code to get the config dir and moved to
27091 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
27092 per-assembly config files. When doing a dll map lookup give precedence
27093 to the per-assembly data.
27095 2004-04-14 Martin Baulig <martin@ximian.com>
27097 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
27098 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
27099 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
27101 * mono-debugger-debugger.c: While the debugger is locked, remember
27102 whether the symbol tables have changes and send one single
27103 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
27105 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
27107 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
27109 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
27112 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
27113 account when marshalling string arrays. Fixes #56965.
27115 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
27117 * icall.c: Add new icalls mapping for security.
27118 * security.c|h: Add internal calls for WindowsIdentity,
27119 WindowsImpersonationContext and WindowsPrincipal.
27121 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
27123 * class.c: Added comment to ensure the System.MonoDummy class
27124 is removed when no longer necessary
27126 2004-04-13 Miguel de Icaza <miguel@ximian.com>
27128 * appdomain.c: Pass arguments to the bootstraping exceptions to
27129 minimize JITed methods at boot
27131 * metadata.c (mono_exception_from_name_two_strings): Allow for the
27132 second string to be null.
27134 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
27135 Change the protocol to minimize the JIT methods at startup. Now
27136 it Returns the internal codepage, if the value of "int_code_page"
27137 is 1 at entry, and we can not compute a suitable code page
27138 number, returns the code page as a string.
27140 2004-04-13 Jackson Harper <jackson@ximian.com>
27142 * culture-info-tables.h: Fix number of decimal digits for all
27145 2004-04-13 Jackson Harper <jackson@ximian.com>
27147 * icall.c: Clairfy out of sync error message. It is not always
27148 your corlib that is out of sync.
27150 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
27152 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
27153 properties when only the set accessor is overriden. Fixes #55874.
27155 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
27157 * assembly.c (mono_assembly_load_references): Make this thread safe.
27160 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
27162 * monosn.c: Add missing initialization calls.
27164 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
27167 ves_icall_System_Globalization_CultureInfo_construct_number_format
27168 Fix g_assert so it compiles on fussier compilers re int/ptr
27171 2004-04-08 Dick Porter <dick@ximian.com>
27174 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
27175 53992. Also rearrange the code so that the internal calls return
27176 an error value and exceptions are thrown from managed code.
27178 * icall.c: Add type info to the socket icalls.
27180 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27182 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
27185 2004-04-07 Martin Baulig <martin@ximian.com>
27187 * class.c (mono_class_from_generic_parameter): Don't default
27188 `klass->parent' to `mono_defaults.object_type'.
27190 2004-04-07 Martin Baulig <martin@ximian.com>
27192 * reflection.c (mono_reflection_initialize_generic_parameter): Set
27193 `param->pklass->reflection_info'.
27195 2004-04-07 Jackson Harper <jackson@ximian.com>
27197 * culture-info-tables.h: Fix date separator symbol.
27199 2004-04-07 Martin Baulig <martin@ximian.com>
27201 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
27202 from System.Type to System.MonoType.
27204 2004-04-07 Martin Baulig <martin@ximian.com>
27207 (MonoReflectionGenericParam): Added `has_reference_type' and
27208 `has_value_type' fields.
27210 * reflection.c (mono_image_get_generic_param_info): Encode the
27211 correct flags if we have the `class' or `struct' constraint.
27213 2004-04-07 Martin Baulig <martin@ximian.com>
27216 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
27218 2004-04-07 Jackson Harper <jackson@ximian.com>
27220 * appdomain.c: Revert extra patches, just wanted to bump the
27223 2004-04-07 Jackson Harper <jackson@ximian.com>
27225 * Makefile.am: Add culture-info private headers.
27226 * icall.c: Add new icalls for contructing locales.
27227 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
27228 * locales.h: Declare new culture info construction methods.
27229 * object.h: Add new fields used to avoid the CultureMap to
27231 * culture-info.h: Definition of structs used in the culture info
27233 * culture-info-tables.h: Autogenerated tables that contain culture
27234 info data. This file was generated with the locale-builder tool.
27235 * appdomain.c: Incement corlib version number.
27237 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
27239 * appdomain.c: (mono_runtime_init) move mono_thread_init
27240 to before mono_object_new calls so critical sections
27241 are initialized before use.
27243 2004-04-07 Martin Baulig <martin@ximian.com>
27246 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
27247 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
27248 (ves_icall_MonoGenericParam_initialize): Removed.
27249 (monogenericparam_icalls): Removed.
27250 (generictypeparambuilder_icalls): Added new table for
27251 System.Reflection.Emit.GenericTypeParameterBuilder.
27254 (mono_reflection_define_generic_parameter): Removed.
27255 (mono_reflection_initialize_generic_parameter): This is now called
27256 from GenericTypeParameterBuilder's .ctor.
27258 2004-04-06 Martin Baulig <martin@ximian.com>
27260 * class.c (mono_class_init): Don't inflate nested classes in a
27262 (mono_type_get_name_recurse): Include the generic arguments for
27263 generic instances and generic type declarations.
27264 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
27265 (_mono_class_get_instantiation_name): Removed.
27266 (mono_class_create_generic): Always use `gklass->name' as our name.
27268 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
27270 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
27271 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
27272 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
27273 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
27274 closed generic methods here.
27277 (mono_reflection_generic_inst_get_nested_types): Removed.
27278 (inflate_mono_method): Copy the generic parameters from the
27279 MonoMethodHeader into out MonoGenericMethod.
27281 2004-04-06 Martin Baulig <martin@ximian.com>
27284 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
27286 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
27288 * reflection.c (build_compressed_metadata): If we have any entries
27289 in the GenericParam, MethodSpec or GenericParamConstraint tables,
27290 set the header version to 1.1.
27292 2004-04-06 Martin Baulig <martin@ximian.com>
27294 * class.c (mono_class_init): If we're a generic instance,
27295 initialize our nested classes, too.
27296 (_mono_class_get_instantiation_name): Deal with the new `!%d'
27299 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27301 * process.c: quote the argument passed to the shell on windows.
27303 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
27305 * threads.c (mono_alloc_special_static_data): Allow this to be
27306 called during startup.
27308 2004-04-02 Martin Baulig <martin@ximian.com>
27311 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
27313 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
27315 * icall.c: Fix build.
27317 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
27319 * Makefile.am: Added security.c|h.
27320 * icall.c: Added icall for get_UserName;
27321 * security.c: New file for security related icalls. Added function
27322 get_UserName for System.Environment (fix #56144).
27323 * security.h: New. Header file for security.c
27325 2004-04-02 Dick Porter <dick@ximian.com>
27327 * icall.c: Deleted the icalls that were obsoleted some time ago
27328 by the ICU string code, and which were mixed into the icall
27329 rearranging. Fixes bug 55969.
27332 * string-icalls.c: Deleted the code that those icalls reference.
27334 2004-04-01 Martin Baulig <martin@ximian.com>
27336 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
27338 * class.c (mono_class_from_generic_parameter): Don't set
27339 TYPE_ATTRIBUTE_INTERFACE.
27340 (my_mono_class_from_generic_parameter): Likewise.
27342 2004-04-01 Martin Baulig <martin@ximian.com>
27344 * loader.c (find_method): Added an optional `MonoClass *ic'
27345 argument to search in a specific interface.
27346 (mono_get_method_constrained): New public function.
27348 2004-04-01 Martin Baulig <martin@ximian.com>
27350 * reflection.c (mono_image_get_generic_field_token): Use the
27351 `handleref' cache here.
27353 2004-04-01 Martin Baulig <martin@ximian.com>
27355 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
27357 * reflection.c (create_generic_typespec): Use the `typespec' hash
27358 here, not the `typeref' one.
27360 2004-04-01 Martin Baulig <martin@ximian.com>
27362 * class.c (mono_class_inflate_generic_type): Moved the
27363 functionality into a new static inflate_generic_type() which
27364 returns NULL if it didn't do anything. Only increment the
27365 `mono_stats.inflated_type_count' if we actually inflated
27367 (mono_class_get_full): Check the classes type to see whether we
27368 need to inflate it; also inflate MONO_TYPE_(M)VAR.
27370 2004-04-01 Jackson Harper <jackson@ximian.com>
27372 * reflection.c: Set culture for assembly references.
27374 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
27376 * reflection.[ch], icall.[ch], Fix support for pinning variables.
27378 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27381 (do_mono_assembly_open): the critical section also covers
27382 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
27384 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27387 (mono_manage_threads): abort the background threads when finishing.
27390 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27392 * gc.c: only close the done_event handle if there was no timeout.
27395 2004-03-30 Martin Baulig <martin@ximian.com>
27397 * icall.c (icall_entries): It's called "System.Activator", not
27398 "System.Activation".
27400 2004-03-30 Martin Baulig <martin@ximian.com>
27402 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
27403 (mono_class_create_from_typespec): Likewise.
27405 2004-03-30 Martin Baulig <martin@ximian.com>
27407 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
27408 `has_ctor_constraint' and `initialized'.
27410 2004-03-30 Martin Baulig <martin@ximian.com>
27412 * reflection.c (encode_new_constraint): New static function to add
27413 the constructor constraint attribute to a type parameter.
27414 (encode_constraints): Call encode_new_constraint() if necessary.
27417 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
27419 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
27421 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
27423 * reflection.c, icall.c: add support for pinning variables.
27425 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
27427 * marshal.c (mono_marshal_get_managed_wrapper):
27428 init bool local with zero rather than null.
27430 2004-03-29 Martin Baulig <martin@ximian.com>
27432 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
27433 the "official" behavior here.
27434 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
27436 2004-03-29 Martin Baulig <martin@ximian.com>
27438 * icall.c: Reflect latest API changes.
27440 2004-03-29 Martin Baulig <martin@ximian.com>
27442 * loader.c (mono_get_method_from_token): Also call
27443 mono_metadata_load_generic_params () for abstract and interface
27444 methods; replace the type arguments in the method signature with
27445 the ones which are loaded from the metadata.
27447 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
27449 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
27450 of the lock is not the current thread. MS.NET don't do it, in spite of
27451 what the documentation says. See bug #56157.
27453 2004-03-28 Martin Baulig <martin@ximian.com>
27455 * class.c (mono_class_init): Don't call init_properties() and
27456 init_events() for generic instances; set `prop->parent' when
27457 inflating properties.
27459 * reflection.c (mono_generic_inst_get_object): Call
27460 `mono_class_init (ginst->klass)'.
27461 (mono_type_get_object): Only create a MonoGenericInst if your
27462 generic type is a TypeBuilder.
27463 (do_mono_reflection_bind_generic_parameters): Only set
27464 `ginst->is_dynamic' if our generic type is a TypeBuilder.
27466 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
27468 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
27471 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27473 * icall.c: added Kill_internal icall.
27474 * process.[ch]: added Kill_internal icall.
27476 2004-03-25 Martin Baulig <martin@ximian.com>
27478 * class.h (MonoStats): Added `generic_instance_count',
27479 `inflated_method_count', `inflated_type_count' and
27480 `generics_metadata_size'.
27482 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27484 * reflection.c: no warnings now.
27486 2004-03-25 Martin Baulig <martin@ximian.com>
27488 * class.c (mono_class_get_full): New public function; does a
27489 mono_class_get(), but also takes a `MonoGenericContext *'.
27491 * loader.c (mono_field_from_memberref): Renamed to
27492 `field_from_memberref', made static and added `MonoGenericContext *'
27494 (mono_field_from_token): Added `MonoGenericInst *' argument.
27495 (method_from_memberef): Likewise.
27496 (mono_get_method_from_token): Likewise.
27497 (mono_get_method_full): New public function; does a
27498 mono_get_method(), but also takes a `MonoGenericContext *'.
27500 * verify.c (mono_method_verify): Get the method's generic context
27501 and pass it to mono_field_from_token(), mono_get_method_full() and
27502 mono_class_get_full().
27504 2004-03-25 Martin Baulig <martin@ximian.com>
27506 * class.c (mono_class_inflate_generic_type): Take a
27507 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
27508 `MonoGenericMethod *'.
27510 2004-03-25 Martin Baulig <martin@ximian.com>
27512 * loader.h (MonoMethodInflated): Store the MonoGenericContext
27513 instead of the MonoGenericMethod here.
27515 2004-03-25 Martin Baulig <martin@ximian.com>
27517 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
27518 each time we create a new MonoGenericInst, we also create a new
27519 context which points back to us.
27521 * class.c (inflate_method): Use `ginst->context' instead of
27522 creating a new context.
27524 * loader.c (method_from_memberref): Use
27525 `klass->generic_inst->context' instead of creating a new context.
27527 2004-03-25 Martin Baulig <martin@ximian.com>
27529 * class.h (MonoGenericContext): New struct.
27530 (MonoGenericMethod): Removed `generic_inst'.
27532 * class.c (mono_class_inflate_generic_method): Take a
27533 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
27535 2004-03-25 Martin Baulig <martin@ximian.com>
27537 * loader.h (MonoMethodInflated): New typedef.
27539 * metadata.h (MonoMethodSignature): Removed `gen_method', make
27540 `generic_param_count' consume just 30 bits, added `is_inflated'
27541 and `has_type_parameters' flags (one bit each).
27543 * class.c (mono_class_inflate_generic_method): Create a
27544 MonoMethodInflated instead of a MonoMethodNormal and set
27545 `is_inflated' in the method signature.
27547 * class.h (MonoGenericMethod): Removed `generic_method'.
27549 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
27551 * image.c: Make sure the name of a MonoImage is always an absolute path.
27552 This fixes bug #54415.
27554 2004-03-24 Martin Baulig <martin@ximian.com>
27556 * class.c (mono_class_setup_vtable): If we're a generic instance,
27557 use our generic type's vtable size.
27559 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
27561 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
27562 MONO_NO_UNLOAD env var as a temporary workaround for unloading
27565 2004-03-23 Martin Baulig <martin@ximian.com>
27567 * class.h (MonoDynamicGenericInst): Added `int count_events' and
27568 `MonoEvent *events'.
27570 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
27571 (typebuilder_icalls): Added "get_event_info"; calls
27572 mono_reflection_event_builder_get_event_info().
27574 * reflection.c (mono_reflection_generic_inst_initialize): Added
27575 `MonoArray *events'.
27576 (mono_reflection_event_builder_get_event_info): New function.
27578 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
27580 * object.h: add mono_type_initialization_init
27582 * object.c (mono_runtime_class_init):
27583 implement class constructor synchronization rules
27584 to cope with threading issues.
27585 add mono_type_initialization_init
27587 * appdomain.c (mono_runtime_init): call
27588 mono_type_initialization_init
27590 * class.h: removing initializing field from MonoVTable
27592 2004-03-23 Martin Baulig <martin@ximian.com>
27594 * class.c (my_mono_class_from_generic_parameter): Use
27595 `param->name' if it's not NULL.
27597 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
27599 * class.c: do not insert non-virtual methods in the vtable.
27600 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
27601 that means the method is non-virtual. This never would have
27604 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
27606 * profiler.c: Added lock for accessing coverage_hash.
27608 2004-03-22 Martin Baulig <martin@ximian.com>
27610 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
27611 `method->method->signature->generic_param_count != 0' to make it
27612 work for interface methods.
27614 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27616 * process.c: quote the string passed to the shell using g_shell_quote.
27618 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27621 (mono_threads_manage): don't remove the finalizer thread and self
27622 from the threads hash table so that mono_thread_manage can be called
27625 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27627 * process.c: quote the arguments when UseShellExecute is true. Fixes
27630 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27632 * threads.c: set mono_thread_detach as a cleanup routine for every
27633 thread. This way it's always executed upon thread termination, either
27634 aborted or finished normally. No more xsp hangs!
27636 2004-03-17 Martin Baulig <martin@ximian.com>
27638 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
27639 `int count_nested' and a `MonoType **nested'.
27641 * reflection.c (mono_reflection_bind_generic_parameters): Moved
27642 most of the functionality into a new static
27643 do_mono_reflection_bind_generic_parameters() and don't take a
27644 `MonoType *nested_in' argument any more. Don't compute nested
27646 (mono_reflection_generic_inst_get_nested_types): New public method
27647 to get nested types.
27649 * class.c (mono_class_create_generic): Set `klass->nested_in' if
27650 we're a nested class.
27652 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
27653 mono_reflection_generic_inst_get_nested_types() to compute the
27656 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
27658 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
27659 descriptive error message under windows.
27661 2004-03-17 Martin Baulig <martin@ximian.com>
27663 * class.c (dup_type): Added `const MonoType *original' argument;
27664 copy the attrs from the original type.
27666 2004-03-17 Martin Baulig <martin@ximian.com>
27668 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
27669 `m->generic_inst_cache' here.
27671 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
27673 * exception.h exception.c: Add stack_overflow_exception.
27675 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27678 (overlapped_callback): call SetEvent *after* invoking the callback.
27679 No need to call CloseHandle.
27681 2004-03-16 Martin Baulig <martin@ximian.com>
27683 * reflection.c (mono_image_get_fieldref_token): Take a
27684 `MonoReflectionField *' instead of a `MonoClassField *' and a
27685 `MonoClass *'; store the `MonoReflectionField *' in the hash.
27687 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27689 * appdomain.c: don't add the culture to the filename we're looking for
27690 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
27692 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27694 * locales.c: don't ignore symbols when doing case insensitive compares.
27695 Thanks Dick! Fixes bug #54046.
27697 * threads.c: surround 'threads' usage with enter/leave in
27698 mono_thread_manage.
27700 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
27702 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
27703 implicitly marshalled as [Out]. Fixes #55450.
27705 (mono_marshal_get_runtime_invoke): Zero out the result if there is
27708 2004-03-16 Martin Baulig <martin@ximian.com>
27710 * class.c (mono_class_from_generic_parameter): Use the actual
27713 2004-03-16 Martin Baulig <martin@ximian.com>
27715 * reflection.c (type_get_signature_size): New static function.
27716 Compues the size of the type in a method signature.
27717 (method_get_signature_size): New static function; calls
27718 type_get_signature_size() to compute the actual size of the
27719 method's signature.
27720 (method_encode_signature): Use method_get_signature_size() to get
27721 the signature's size rather than using `nparams * 10'.
27723 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27725 * file-io.h: define here WapiOverlapped on windows. I don't want the
27726 regular OVERLAPPED one.
27729 * threadpool.c: somehow, BindIoCompletionCallback is not found.
27730 Disabling AIO on windows.
27732 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27734 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
27737 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27739 * appdomain.c: upgraded corlib version.
27741 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
27742 and BeginWrite. Allow opening files for asynchrnous operations.
27744 * file-io.h: new struct that maps FileStreamAsyncResult.
27745 * icall.c: added new icalls.
27746 * process.[ch]: support setting child process environment variables
27747 and use the SHELL or COMSPEC when UseShellExecute is true.
27749 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
27750 callback for async. IO is here and also BindHandle.
27752 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
27755 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
27757 * reflection.c (create_custom_attr): Allow len == 0.
27759 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
27760 computation on big-endian machines.
27762 2004-03-13 Martin Baulig <martin@ximian.com>
27764 * class.h (MonoGenericInst): Added `int count_ifaces'.
27766 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
27767 `ginst->count_ifaces' instead `klass->interface_count' since we
27768 may get called before the vtable is created.
27770 * loader.c (mono_method_get_param_names): If we're a generic
27771 instance, return and don't initialize the class.
27773 * reflection.c (mono_reflection_setup_generic_class): Don't call
27774 ensure_runtime_vtable().
27775 (mono_reflection_bind_generic_parameters): Set
27776 `ginst->count_ifaces'.
27778 2004-03-11 Jackson Harper <jackson@ximian.com>
27782 * unicode.h: Remove unused System.Char icalls.
27784 2004-03-11 Miguel de Icaza <miguel@ximian.com>
27786 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
27787 code when we P/Invoke the first library in Windows.Forms, instead
27788 of when we first open the assembly.
27790 * assembly.c: Drop the lookup from here.
27792 2004-03-10 Martin Baulig <martin@ximian.com>
27794 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
27795 class for properties, fields and events. Finally fixes #54945.
27797 2004-03-10 Martin Baulig <martin@ximian.com>
27799 * metadata.c (mono_metadata_class_equal): New static function;
27800 checks whether two generic instances or two generic parameters are
27802 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
27805 2004-03-10 Martin Baulig <martin@ximian.com>
27807 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
27809 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
27810 argument and write it into the `reflection_info' field.
27813 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
27814 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
27816 2004-03-09 Jackson Harper <jackson@ximian.com>
27818 * char-conversions.h: use 8 bits for numeric data its all we need
27819 * icall.c: numeric data is only 8 bits now.
27821 2004-03-09 Martin Baulig <martin@ximian.com>
27823 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
27825 * class.c (init_properties, init_events): Initialize the new
27828 * reflection.c (typebuilder_setup_properties): Likewise.
27829 (typebuilder_setup_events): Likewise.
27831 * reflection.h (MonoEventInfo): Replaced `parent with
27832 `declaring_type' and `reflected_type'.
27834 * icall.c (ves_icall_get_property_info): Distinguish between
27835 declaring and reflected type.
27836 (ves_icall_get_event_info): Likewise.
27838 2004-03-09 Martin Baulig <martin@ximian.com>
27840 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
27841 (ves_icall_Type_GetField): Correctly set field->klass.
27843 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
27845 * loader.h: Fix warning.
27847 2004-03-08 Miguel de Icaza <miguel@ximian.com>
27849 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
27850 library routine if present. Notice that it will still continue
27851 executing even if its missing, for those working on the Gtk#
27852 edition of Windows.Forms.
27854 * assembly.c (do_mono_assembly_open): If loading the
27855 System.Windows.Forms call mono_loader_wini_init.
27857 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
27859 * class.h: Added MonoRemoteClass struct.
27860 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
27861 function for MonoStrings.
27862 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
27863 Added internal call for getting the proxy type.
27864 * marshal.c: Get the type of transparent proxies from its remote_class.
27865 Added methods that generate the IL for type checks and casts:
27866 mono_marshal_get_isinst, mono_marshal_get_castclass,
27867 mono_marshal_get_proxy_cancast.
27868 * marshal.h: Declaration of the previous new methods.
27869 * object.c: Added new moethods for creating and updating MonoRemoteClass
27870 instances: mono_remote_class, mono_upgrade_remote_class,
27871 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
27872 * verify.c: FIx transparent_proxy_fields layout.
27873 * appdomain.c: Bump corlib version.
27875 2004-03-04 Jackson Harper <jackson@ximian.com>
27877 * icall.c: Add icall to access char conversion tables.
27878 * char-conversions.h: Character conversion tables.
27879 * Makefile.am: Add char-conversions.h private header file.
27881 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
27883 * appdomain.c (unload_thread_main): Increase unloading timeout to
27884 10 sec as a temporary workaround for Nant problems.
27886 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
27888 * gc.c: Add checks for GC_enable and GC_disable.
27890 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
27891 (jaak@zd.com.pl). Fix memory corruption in String.Replace
27894 2004-02-27 Martin Baulig <martin@ximian.com>
27896 * reflection.c (mono_reflection_bind_generic_parameters): Take a
27897 `MonoReflectionType *' instead of a `MonoType *'.
27899 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
27901 * gc.c (run_finalize): Avoid finalizing the object representing the
27903 (finalizer_thread): Fix warning.
27905 2004-02-25 Martin Baulig <martin@ximian.com>
27907 * class.c (_mono_class_get_instantiation_name): Added `int offset'
27908 argument for nested types.
27909 (mono_class_create_generic): Added support for nested generictypes.
27911 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
27914 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
27916 * reflection.c (method_encode_signature): Increase the minimum
27917 value of `size' from 10 to 11.
27918 (mono_reflection_bind_generic_parameters): Take `int type_argc'
27919 and `MonoType **types' arguments instead of the `MonoArray
27920 *types'; added `MonoType *nested_in'. Recursively instantiate
27923 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
27925 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
27926 stack_overflow_ex members which are used by exception handling.
27928 * appdomain.c (mono_runtime_init): Initialize the new members.
27930 * gc.c (mono_gc_enable): New helper function.
27931 * gc.c (mono_gc_disable): New helper function.
27933 2004-02-23 Martin Baulig <martin@ximian.com>
27935 * icall.c: I must have been really stupid - make it actually work
27938 2004-02-23 Martin Baulig <martin@ximian.com>
27940 * loader.c (method_from_memberref): Only inflate the method if
27941 it's in another klass.
27943 2004-02-23 Martin Baulig <martin@ximian.com>
27945 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
27946 (mono_class_init): If we're a generic instance and an interface,
27947 compute `class->interface_id'; also create `class->interfaces'
27948 here and inflate them.
27950 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
27952 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
27954 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
27956 2004-02-15 Miguel de Icaza <miguel@ximian.com>
27958 * reflection.c (method_encode_code): Improved the error message
27959 generated by the exception.
27961 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27963 * icall.c: Martin did not do what he said in the ChangeLog for
27964 2004-02-18, but put back the changes for properties and events.
27965 Commenting those changes out again and adding comment to bug #54518.
27967 * process.c: removed warning.
27969 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
27971 * marshal.c (emit_struct_conv): Print an error message instead of
27972 asserting when a type does not have the StructLayout attribute.
27974 2004-02-20 Martin Baulig <martin@ximian.com>
27976 * reflection.c (mono_type_get_object): Also use the cache for
27978 (mono_reflection_bind_generic_parameters): Always compute
27981 2004-02-20 Martin Baulig <martin@ximian.com>
27983 * class.h (MonoGenericMethod): Removed `klass'.
27985 * class.c (mono_class_inflate_generic_method): Added `MonoClass
27988 2004-02-20 Martin Baulig <martin@ximian.com>
27990 * reflection.c (method_encode_methodspec): Actually use the
27991 uninflated signature for the memberref.
27993 2004-02-20 Martin Baulig <martin@ximian.com>
27995 * class.h (MonoGenericMethod): Removed `declaring'.
27997 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
27998 is NULL, compute it here.
28000 2004-02-20 Martin Baulig <martin@ximian.com>
28002 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
28004 * metadata.c (mono_metadata_generic_inst_hash): New method.
28005 (mono_metadata_generic_inst_equal): New method.
28007 * reflection.c (mono_reflection_bind_generic_parameters): Use the
28008 `klass->image->generic_inst_cache' cache to avoid creating
28009 duplicate MonoGenericInst's.
28011 * class.c (mono_class_inflate_generic_type): Use the cache.
28013 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
28015 * object.c: fixed gc descriptor calculation for embedded valuetypes.
28017 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28019 * icall.c: added Socket.WSAIoctl icall.
28021 * socket-io.[ch]: implemented
28022 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
28024 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
28026 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
28028 2004-02-18 Urs C Muff <umuff@quark.com>
28030 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
28031 this work on PPC and other big-endian architectures.
28033 * debug-mono-symfile.h: Prepended the names of all the `guint32'
28034 fields with an underscore to make sure they're only accessed by
28035 the read32() macro.
28037 2004-02-18 Martin Baulig <martin@ximian.com>
28039 * icall.c: Put the klass->refclass changes back for methods and
28040 fields, but not for properties and events. We're currently not
28041 distinguishing between DeclaringType and ReflectedType for
28042 properties and events, that's what caused the regressions.
28044 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28047 (mono_async_result_new): the handle can be NULL.
28049 * threadpool.c: Use an event instead of a semaphore, don't initialize
28050 it until needed. This saves quite a few semaphores from being created
28051 when using the threadpool.
28053 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
28055 * object.c (mono_string_is_interned_lookup): Fix interning of long
28056 strings. Fixes #54473.
28058 * domain.c (ldstr_equal): Optimize if the two strings are equal.
28060 * icall.c: Revert the klass->refclass changes since they introduce
28061 regressions (bug #54518).
28063 2004-02-18 Martin Baulig <martin@ximian.com>
28065 * class.c (mono_class_init): If we're a generic instance and don't
28066 come from a TypeBuilder, inflate our members here.
28067 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
28068 (mono_class_create_generic): New public method.
28069 (mono_class_initialize_generic): Removed.
28070 (get_instantiation_name): Renamed to
28071 _mono_class_get_instantiation_name() and made it public.
28073 2004-02-18 Martin Baulig <martin@ximian.com>
28075 * class.c (mono_class_inflate_generic_type): Clear the new
28076 instance's `nginst->klass' when inflating a generic instance.
28077 (mono_class_is_subclass_of): Added (basic) support for generic
28080 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
28082 * appdomain.h, domain.c: use a MonoCodeManager instead of a
28083 MonoMempool to hold compiled native code.
28085 2004-02-17 Martin Baulig <martin@ximian.com>
28087 * class.h (MonoDynamicGenericInst): Added `count_properties' and
28090 * reflection.c (mono_reflection_generic_inst_initialize): Added
28091 `MonoArray *properties' argument.
28093 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
28095 2004-02-17 Martin Baulig <martin@ximian.com>
28097 * icall.c (ves_icall_Type_GetFields): Renamed to
28098 ves_icall_Type_GetFields_internal() and added a
28099 `MonoReflectionType *rtype' argument; pass it to
28100 mono_field_get_object() to set the field's "reflected" type.
28101 (ves_icall_Type_GetConstructors): Likewise.
28102 (ves_icall_Type_GetEvents): Likewise.
28103 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
28104 argument; pass it to mono_method_get_object() to set the method's
28107 2004-02-17 Martin Baulig <martin@ximian.com>
28109 * class.h (MonoDynamicGenericInst): New type.
28110 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
28112 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
28113 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
28114 (ves_icall_MonoGenericInst_GetFields): New interncall.
28116 * class.c (mono_class_from_generic): Don't call
28117 mono_class_initialize_generic() if this is a dynamic instance;
28118 ie. it's being created from a TypeBuilder.
28119 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
28120 `class->byval_arg.type'.
28122 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
28123 to `inflate_method' and made static.
28124 (mono_reflection_inflate_field): Removed.
28125 (mono_reflection_generic_inst_initialize): New public method.
28127 * reflection.h (MonoReflectionGenericInst): Removed `methods',
28128 `ctors' and `fields'; added `initialized'.
28130 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
28132 * debug-helpers.c (mono_method_full_name): Fix output for empty
28135 2004-02-12 Martin Baulig <martin@ximian.com>
28137 * class.h (MonoClassField): Added `MonoType *generic_type'.
28139 * reflection.c (mono_image_get_fieldref_token): Added support for
28140 instantiated generic types.
28141 (field_encode_inflated_field): Removed.
28142 (mono_image_get_inflated_field_token): Removed.
28143 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
28145 * reflection.h (MonoReflectionInflatedField): Removed.
28147 2004-02-12 Martin Baulig <martin@ximian.com>
28149 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
28150 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
28152 * reflection.c (mono_image_get_methodspec_token): Take a
28153 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
28154 (mono_image_create_token): Check whether we have a
28155 `method->signature->gen_method' and call
28156 mono_image_get_methodspec_token() if appropriate.
28157 (inflated_method_get_object): Removed.
28158 (mono_reflection_bind_generic_method_parameters): Return a
28159 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
28160 (mono_reflection_inflate_method_or_ctor): Likewise.
28162 * reflection.h (MonoReflectionInflatedMethod): Removed.
28164 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
28166 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
28167 for custom valuetype marshalling.
28169 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
28171 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28173 * icall.c: fixed WSAGetLastError_internal name.
28175 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
28177 * threads.c (mono_thread_attach): Allow this to be called multiple
28178 times for a thread.
28180 * threads.c (build_wait_tids): Do not wait for ourselves.
28182 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
28183 appdomain list is empty.
28185 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
28186 memory returned by mono_string_builder_to_utf16, since it points into
28187 managed memory. Thanks to Bernie Solomon for noticing this.
28189 * icall.c: Add AppDomainSetup icalls.
28191 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
28193 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
28196 * reflection.c (reflection_methodbuilder_to_mono_method): Save
28197 custom attributes to the method_aux struct. Also fix array indexes etc.
28199 * loader.c (mono_method_get_param_names): Make dynamic case work again.
28201 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
28203 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
28204 (both static and runtime) and reduce startup time.
28206 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
28208 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
28209 AsAny marshalling conversion instead of crashing.
28211 * marshal.c: Fix warnings.
28213 2004-02-09 Martin Baulig <martin@ximian.com>
28215 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
28217 * reflection.h (MonoReflectionInflatedMethod): Removed the
28218 `declaring' field, it's now in the unmanaged MonoGenericMethod.
28220 * reflection.c (method_encode_methodspec): Removed the `method'
28221 argument; we get it from `gmethod->declaring'.
28222 (inflated_method_get_object): Removed the `declaring' argument.
28224 2004-02-09 Martin Baulig <martin@ximian.com>
28226 * class.h (MonoGenericMethod): New type.
28227 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
28230 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
28231 a `MonoGenericMethod *gen_method' one.
28233 * class.c (mono_class_inflate_generic_type): Take an additional
28234 `MonoGenericMethod * argument. This is only non-NULL if we're
28235 inflating types for a generic method.
28236 (mono_class_inflate_generic_signature): Renamed to
28237 inflate_generic_signature() and made static; take a
28238 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
28239 (inflate_generic_header): Take a `MonoGenericMethod *' argument
28240 instead of a `MonoGenericInst *' one.
28241 (mono_class_inflate_generic_method): Likewise.
28243 * reflection.c (encode_generic_method_sig): Take a
28244 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
28245 (method_encode_methodspec): Likewise.
28246 (inflated_method_get_object): Likewise.
28248 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
28249 field with a `MonoGenericMethod *gmethod' one.
28251 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
28253 * class.h (mono_class_has_parent): add parens to expansion
28256 2004-02-08 Martin Baulig <martin@ximian.com>
28258 * image.h (MonoImage): Removed `generics_cache'.
28260 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
28261 instead of a `MonoType *' argument; removed the `inflate_methods'
28262 argument. Don't inflate methods here.
28264 * loader.c (find_method): If it's a generic instance, call
28265 mono_class_init() on the `sclass->generic_inst->generic_type'.
28267 * metadata.c (mono_type_size): Make this work on uninitialized
28268 generic instances; call it on the `ginst->generic_type's class.
28270 * reflection.c (mono_reflection_bind_generic_parameters): Call
28271 mono_class_from_generic() to create the `ginst->klass'.
28273 2004-02-08 Martin Baulig <martin@ximian.com>
28275 * class.h (MonoClass): Changed type of `generic_inst' from
28276 `MonoType *' to `MonoGenericInst *'.
28278 2004-02-08 Martin Baulig <martin@ximian.com>
28280 * icall.c (ves_icall_Type_BindGenericParameters): Just call
28281 mono_type_get_object(), this is now creating a `MonoGenericInst'
28282 for MONO_TYPE_GENERICINST.
28283 (ves_icall_MonoGenericInst_GetParentType): Likewise.
28284 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
28286 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
28287 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
28288 (inflated_method_get_object): Added `MonoClass *refclass' argument.
28289 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
28290 and reflected type.
28292 * reflection.h (MonoReflectionInflatedMethod): Removed
28293 `declaring_type' and `reflected_type'.
28295 2004-02-08 Martin Baulig <martin@ximian.com>
28297 * class.h (MonoGenericInst): Added `MonoType *parent' and
28298 `MonoType **ifaces'.
28300 * reflection.h (MonoReflectionGenericInst): Removed `klass',
28301 `parent' and `interfaces'.
28303 * reflection.c (mono_reflection_bind_generic_parameters): Take a
28304 `MonoType *' argument and return a `MonoType *'.
28307 (ves_icall_MonoGenericInst_GetParentType): New interncall.
28308 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
28310 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
28312 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
28313 valuetype marshalling.
28315 2004-02-06 Martin Baulig <martin@ximian.com>
28318 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
28319 (my_mono_class_from_generic_parameter): Likewise.
28321 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
28323 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
28324 contents of the symbol files lazily.
28326 * object.h (MonoThread): Add 'name' and 'name_len' fields.
28328 * threads.h threads.c icall.c: New icalls for getting and setting the
28331 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
28333 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
28334 Raise an exception when the domain is not found.
28336 2004-02-03 Martin Baulig <martin@ximian.com>
28338 * reflection.c (mono_image_get_methodspec_token): Use the
28339 uninflated signature; fixes gen-33.
28341 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
28343 * gc.c threads.c: Make the finalizer thread a normal managed thread so
28344 the finalizer code can use thread functionality.
28346 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
28347 the finalizer thread.
28349 * threads.c: Make some functions more robust.
28351 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
28353 * metadata.h: Add new marshalling conventions.
28355 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
28356 stringbuilder marshalling. Fixes #53700.
28358 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
28360 * reflection.c (mono_image_get_type_info): Save declarative security
28363 * reflection.c (mono_image_get_field_info): Handle uninitialized
28364 unmanaged fields as well.
28366 * appdomain.c: Bump corlib version.
28368 2004-02-01 Martin Baulig <martin@ximian.com>
28370 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
28371 method type arguments.
28373 2004-01-30 Duncan Mak <duncan@ximian.com>
28375 * marshal.h: Add prototype for
28376 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
28378 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
28381 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
28383 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
28384 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
28386 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
28388 * marshal.c (mono_marshal_get_native_wrapper): Add support for
28389 custom marshalling of valuetypes.
28391 * marshal.c: Fix some warnings.
28393 2004-01-29 Martin Baulig <martin@ximian.com>
28395 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
28396 for generic method parameters.
28398 * reflection.c (method_encode_methodspec): Write the uninflated
28399 signature into the methodspec table.
28400 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
28401 is always the uninflated method.
28402 (reflection_methodbuilder_to_mono_method): Copy the generic
28403 parameters from the MethodBuilder into `header->gen_params'.
28405 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
28407 * class.c (mono_class_from_generic_parameter): Fix warning.
28409 2004-01-27 Martin Baulig <martin@ximian.com>
28411 * class.c (mono_class_from_generic_parameter): Don't create
28412 `klass->methods' here.
28414 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
28416 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
28417 extension since it does not work with libraries named lib<FOO>.dll.so.
28419 2004-01-25 Martin Baulig <martin@ximian.com>
28421 * class.c (mono_class_inflate_generic_type): Added support for
28422 MONO_TYPE_GENERICINST.
28424 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
28425 inflate methods on open constructed types.
28427 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28429 * object.c: fire ProcessExit event in the root AppDomain after running
28430 Main. Fixes bug #53299.
28432 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
28434 * socket-io.c: include the new socket-wrappers.h header.
28435 Use the wrappers instead of the unix socket functions to make the code
28438 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
28440 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
28442 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
28445 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
28447 * reflection.c (mono_image_create_pefile): Handle the case when the
28448 entry point is not a MethodBuilder.
28450 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
28451 field to ReflectionMethod since it is not allways a builder.
28453 * reflection.c (type_get_fully_qualified_name): New helper function to
28454 return the fully qualified name of a type.
28456 * reflection.c (encode_marshal_blob): Always emit the fully qualified
28457 type name for custom marshallers.
28459 * reflection.c (mono_marshal_spec_from_builder): Ditto.
28461 * class.c (mono_class_setup_vtable): If a parent class already
28462 implements an interface, use the implementing methods from that class.
28465 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28467 * threadpool.c: just return instead of ExitThread to allow for thread
28470 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
28472 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
28473 when closing resource modules.
28475 * reflection.c (mono_image_create_pefile): Handle the case when the
28476 entry point is not a MethodBuilder.
28478 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
28479 field to ReflectionMethod since it is not allways a builder.
28481 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
28483 * marshal.c (mono_marshal_get_managed_wrapper):
28484 mono_marshal_alloc takes native int so CONV_I
28485 the arg for 64bits.
28487 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
28489 * reflection.c (fixup_cattrs): New function to fixup the methoddef
28490 tokens in the cattr table. Fixes #53108.
28492 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28494 * loader.c: don't trim ".dll" before looking up in the config file.
28495 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
28497 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
28499 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
28500 Return the module which contains the resource as well.
28501 (ves_icall_System_Reflection_Module_Close): New icall.
28503 * appdomain.c: Bump corlib version number.
28505 * image.c (mono_image_addref): New public function.
28507 * assembly.c: Call mono_image_addref.
28509 * reflection.c (mono_module_get_object): Increase reference count of
28512 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
28515 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
28516 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
28517 proper exceptions on DllImport problems.
28519 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
28521 * class.c, metadata.c: eliminate CSIZE macro.
28523 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
28525 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
28526 * object.h: Added async_callback field in MonoAsyncResult.
28527 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
28528 * verify.c: Added async_callback in MonoAsyncResult layout.
28530 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
28532 * reflection.c (mono_reflection_get_custom_attrs): Add support
28535 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
28537 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
28539 (mono_marshal_method_from_wrapper): Add null pointer check.
28541 2004-01-16 Martin Baulig <martin@ximian.com>
28543 * debug-mono-symfile.h: Set version number to 36 and reflect
28544 latest symbol writer changes.
28546 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
28548 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
28549 multi-dimensional arrays.
28550 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
28551 (mono_class_from_mono_type): Use bounded_array_class_get.
28553 * class.c (mono_bounded_array_class_get): New function which takes
28554 a 'bounded' bool argument to distinguish vectors from one dimensional
28557 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
28558 bounded_array_class_get if the array has bounds.
28560 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
28561 Search modules loaded using AssemblyBuilder:AddModule as well.
28563 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28565 * appdomain.c: increased corlib version.
28566 * filewatcher.c: removed g_print.
28568 (get_property_info): only allocate what is actually requested.
28569 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
28571 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28573 * Makefile.am: added filewatcher.[ch]
28574 * filewatcher.[ch]: FileSystemWatcher runtime support.
28575 * icall.c: added new FSW icalls.
28577 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
28579 * string-icalls.c: fix stringbuilder regression as suggested by
28580 Iain McCoy <iain@mccoy.id.au>.
28582 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
28584 * process.c (process_read_stringtable_block): Recognize '007f' as
28585 a language neutral stringtable block.
28587 2004-01-12 Patrik Torstensson
28589 * object.h (MonoStringBuilder) : Changed layout to support our
28590 new stringbuilder class.
28591 * marshal.c: Change marshalling to support the new layout of
28593 * appdomain.c: increased version number because new layout of
28596 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
28598 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
28599 assembly name as an string instead of an AssemblyName, since it is
28600 easier to extract info from it.
28602 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
28603 the culture subdirectories too. Fixes #52231.
28605 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28607 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
28608 It takes 2 new parameters with an optional name for the method to look
28609 for and case ignoring info.
28611 * threadpool.c: removed unused variable.
28613 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28615 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
28616 It takes 2 new parameters with an optional name for the property to look
28617 for and case ignoring info.
28620 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
28622 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
28625 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28628 * assembly.c: escape the uri before passing it to g_filename_from_uri.
28631 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
28633 * reflection.c: Add support for more than one unmanaged resource.
28635 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
28636 in field->def_value, as done in all other cases.
28638 * reflection.c (mono_reflection_get_custom_attrs): Add support for
28641 * reflection.c (mono_reflection_create_runtime_class): Remove
28642 errorneous assignment to klass->element_class, since it is already
28643 done in mono_reflection_setup_internal_class.
28645 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28647 * gc.c: added missing LeaveCriticalSection.
28648 * icall.c: indented a couple of lines.
28649 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
28650 if we call EndInvoke inside a callback. Fixes bug #52601.
28652 2004-01-07 Martin Baulig <martin@ximian.com>
28654 * mono-debug-debugger.h
28655 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
28657 2004-01-06 Miguel de Icaza <miguel@ximian.com>
28659 * appdomain.c: Use messages in NotImplementedException.
28661 * exception.c (mono_get_exception_not_implemented): Now this takes
28662 a message argument.
28664 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
28665 exception instead of g_asserting an aborting when something is not
28668 Add some inline docs.
28670 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
28672 * reflection.h: Update after changes to object layout.
28674 * reflection.c: Implement saving of unmanaged aka win32 resources.
28676 * appdomain.c: Bump version number.
28678 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
28679 Handle missing domains gracefully.
28681 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
28683 * file-io.c : On Windows, there are much more invalid_path_chars.
28685 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
28687 * class.h, object.c: prepare for GetType () speedup.
28689 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
28691 * profiler.c: workaround for --profile null reference exception on
28692 cygwin. Patch by Patrik Torstensson.
28694 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
28696 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
28697 make work for unaligned access.
28699 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
28701 * class.c: small cleanup (class->fields [i] -> field).
28702 * image.c: check address of metadata is valid.
28704 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
28706 * assembly.h assembly.c (mono_assembly_loaded): New public function to
28707 search the list of loaded assemblies.
28709 * reflection.c (mono_reflection_type_from_name): Use
28710 mono_assembly_loaded instead of mono_image_loaded.
28712 * reflection.c: Fix warnings.
28714 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
28716 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
28717 is dynamic. This is needed since an assembly can contain both dynamic and
28718 non-dynamic images.
28720 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
28723 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
28725 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
28726 to store modules loaded using AddModule.
28728 * reflection.c (mono_image_fill_file_table): Generalize this so it works
28731 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
28733 * reflection.c (mono_image_fill_export_table_from_module): New function to
28734 fill out the EXPORTEDTYPES table from a module.
28736 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
28737 into a separate function. Also handle loaded non-dynamic modules.
28739 * reflection.c (mono_image_basic_init): Fix memory allocation.
28741 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
28743 * assembly.c (mono_assembly_load_references): Make this public.
28745 2003-12-19 Martin Baulig <martin@ximian.com>
28747 * class.c (mono_class_initialize_generic): Made this static, take
28748 a `MonoGenericInst *' instead of a `MonoClass *'.
28749 (mono_class_from_generic): Call mono_class_initialize_generic()
28750 unless we're already initialized or being called from
28751 do_mono_metadata_parse_generic_inst().
28753 * class.h (MonoGenericInst): Added `initialized' and
28754 `init_pending' flags.
28756 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
28757 `mono_class_init (gklass)' or mono_class_initialize_generic()
28758 here; set `generic_inst->init_pending' while parsing the
28761 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
28763 * locales.c: include string.h for memxxx prototypes
28765 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
28767 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
28768 constructor when accessing literal fields.
28770 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
28772 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
28774 * reflection.c (assembly_add_resource_manifest): New function to fill
28775 the MANIFESTRESOURCE table.
28777 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
28779 * reflection.h: Update to changes in class layout.
28781 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
28782 Reenable call to mono_runtime_is_shutting_down ().
28784 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
28785 determine if the runtime is shutting down.
28787 2003-12-16 Jackson Harper <jackson@ximian.com>
28789 * icall.c: comment out call to mono_runtime_is_shutting_down to
28792 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
28794 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
28795 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
28797 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
28799 * reflection.c: move definition of swap_with_size
28800 to before its first call
28802 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
28804 * appdomain.c (mono_runtime_is_shutting_down): New public function.
28806 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
28809 * object.c: Fix warnings.
28811 * icall.c (ves_icall_Type_Get...): Only consider inherited static
28812 members if FlattenHierarchy is set.
28814 * reflection.c (mono_image_add_decl_security): New function to emit
28815 declarative security.
28817 * reflection.h reflection.c: Add support for declarative security.
28819 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
28821 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
28823 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
28825 * appdomain.c verify.c: Moved corlib version checking into its own
28826 function in appdomain.c since it needs to create vtables etc.
28828 2003-12-13 Patrik Torstensson <p@rxc.se>
28830 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
28831 instead of unwrapped server.
28833 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
28835 * verify.c (check_corlib): Fix field index.
28837 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
28839 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
28842 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
28844 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
28845 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
28846 cope with sizeof(size_t) != sizeof(guint32).
28848 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28850 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
28851 in case of failure.
28853 2003-12-10 Mark Crichton <crichton@gimp.org>
28855 * icall.c: removed the GetNonZeroBytes. We now handle this case
28858 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
28860 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
28862 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
28865 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
28867 * verify.c (check_corlib): Handle the case when the version field is
28868 initialized by a static constructor.
28870 2003-12-08 Patrik Torstensson <p@rxc.se>
28872 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
28874 2003-12-08 Martin Baulig <martin@ximian.com>
28876 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
28877 a MonoReflectionGenericParameter, also take the parameter index
28878 and name as arguments.
28879 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
28880 (ves_icall_MonoGenericParam_initialize): New interncall.
28881 (ves_icall_Type_make_byref_type): New interncall.
28883 * reflection.h (MonoReflectionGenericParam): Derive from
28884 MonoReflectionType, not just from MonoObject. Added `refobj' and
28887 * reflection.c (mono_reflection_define_generic_parameter): Create
28888 and return a new MonoReflectionGenericParam; don't initialize the
28890 (mono_reflection_initialize_generic_parameter): New public method;
28891 initializes the constraints and creates the `param->pklass'.
28893 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
28895 * reflection.h reflection.c: Use the new fields 'num_types',
28896 'num_fields' and 'num_methods' to track the number of types etc.
28898 * verify.c (check_corlib): Check corlib version number.
28900 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
28902 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
28903 function works on all methods.
28905 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
28907 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
28908 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
28909 the custom_type_info flag of the transparent proxy.
28910 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
28911 objects that supports IRemotingTypeInfo.
28912 * object.h: Added custom_type_info field in transparent proxy.
28914 2003-12-06 Martin Baulig <martin@ximian.com>
28916 * class.c (mono_class_create_from_generic): Removed.
28917 (mono_class_from_generic): Check `ginst->klass' before doing
28918 anything else. This is important to fully support "recursive"
28921 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
28922 empty `generic_inst->klass' before doing anything else.
28924 2003-12-06 Dick Porter <dick@ximian.com>
28929 * locales.c: Use C structs to access class fields. Don't do a
28930 conversion between MonoString and UChar because both are
28931 platform-endian UTF-16. Compare now takes startindex and count
28932 parameters. Add a char overload for IndexOf. Speed up the
28933 invariant string IndexOf.
28935 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
28937 * Makefile.am (monosn_LDADD): Fix parallel build.
28939 2003-12-04 Martin Baulig <martin@ximian.com>
28942 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
28943 (ves_icall_Type_make_array_type): New interncall.
28945 2003-12-04 Martin Baulig <martin@ximian.com>
28947 * locales.c: also change it in the !HAVE_ICU case.
28949 2003-12-04 Dick Porter <dick@ximian.com>
28952 * locales.c: construct_compareinfo is now in CompareInfo, not
28955 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
28957 * image.c (mono_image_load_file_for_image): Cache loaded images in the
28958 image->files array.
28960 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
28963 * assembly.c (mono_assembly_load_references): Only load references
28966 * class.c (mono_class_from_name): Avoid linear search of the
28967 EXPORTEDTYPE table.
28969 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
28971 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
28973 * image.h (MonoImage): Add 'field_cache' field.
28975 * loader.c (mono_field_from_token): Cache field lookups.
28977 * reflection.c (mono_module_get_object): Fix name property.
28979 * icall.c (ves_icall_get_enum_info): Update after changes to
28980 mono_metadata_get_constant_index ().
28982 * icall.c: Get rid of get_type_info icall, use a separate icall for
28983 each type property to avoid needless memory allocations. Fixes #51514.
28985 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
28986 to avoid needless binary searches.
28988 * class.c (class_compute_field_layout): Move the initialization of
28989 field->def_value to mono_class_vtable ().
28991 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
28994 * object.c (mono_object_allocate): Make it inline.
28996 * object.c (mono_object_allocate_spec): Make it inline.
28998 2003-12-02 Dick Porter <dick@ximian.com>
29000 * locales.c (create_NumberFormat): NumberFormatInfo construction.
29001 Patch by Mohammad DAMT (mdamt@cdl2000.com).
29003 2003-12-01 Dick Porter <dick@ximian.com>
29005 * threads.c: Fix signature and call in CreateMutex and
29008 2003-12-01 Dick Porter <dick@ximian.com>
29011 * locales.c: Implement string compares and searching
29013 * object.h: Add extra Thread field
29015 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
29017 * reflection.c (fixup_method): Add support for MonoCMethod.
29019 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
29021 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
29023 * reflection.c (assembly_name_to_aname): Allow extra characters in
29024 assembly names. Fixes #51468.
29026 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
29028 * exception.c (mono_exception_from_name_domain): New helper function.
29030 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
29031 exception object in the correct domain.
29033 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
29034 formatting + make a copy a the input data.
29036 * loader.c (mono_get_method_from_token): Methods which contain
29037 native code do not have entries in the ImplMap.
29039 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
29040 Thanks to Gonzalo for spotting this.
29042 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
29043 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
29045 * assembly.h (mono_assembly_load_from): Split the second part of
29046 assembly loading into a new public function.
29048 * exception.h (mono_get_exception_bad_image_format): New function.
29050 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
29052 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
29053 Enumerate all modules inside a dynamic assembly. Fixes #51293.
29055 * icall.c: Add new icall for creating dynamic methods.
29057 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
29059 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
29061 * reflection.c (mono_reflection_create_dynamic_method): New icall to
29062 create a dynamic method.
29064 * reflection.c (resolve_object): New helper function.
29066 * reflection.c: Generalize ReflectionMethodBuilder and the functions
29067 which manipulate it so they can also work on dynamic methods.
29069 * reflection.c (reflection_method_builder_to_mono_method): Avoid
29070 creating the MonoReflectionMethodAux structure if it is not needed.
29072 * reflection.h verify.c: Update after changes to object layout.
29074 * reflection.c (method_builder_encode_signature): Fix compilation on
29077 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
29079 * appdomain.h: Added support for context static fields. Added static_data
29080 field to MonoAppContext and renamed thread_static_fields to a more
29081 generic special_static_fields in MonoAppDomain, since it can now contain
29082 context static fields.
29083 * domain.c: Updated hashtable name.
29084 * object.c: Replaced field_is_thread_static() for a more generic
29085 field_is_special_static() which also checks for context static attribute.
29086 In mono_class_vtable(), added support for static context fields.
29087 * threads.c: Changed methods that manage thread static fields to more
29088 generic methods so they can be reused both for thread and context static
29090 * threads.h: Declared some new methods.
29092 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
29094 * reflection.h: Update after changes to the managed types.
29096 * reflection.c (encode_custom_modifiers): New helper function.
29098 * reflection.c (method_encode_signature): Emit custom modifiers.
29100 * reflection.c (field_encode_signature): Emit custom modifiers.
29102 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
29104 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
29106 * icall.c (ves_icall_System_ValueType_Equals): New optimized
29109 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
29112 * object.c (mono_field_get_value_object): New function.
29114 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
29117 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
29119 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
29120 return a preallocated out-of-memory exception instance.
29122 * object.c (out_of_memory): Use the new function.
29124 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
29125 flag is before the custom modifiers. Fixes #49802.
29127 2003-11-16 Martin Baulig <martin@ximian.com>
29129 * class.c (mono_class_is_open_constructed_type): Implemented the
29130 MONO_TYPE_GENERICINST case.
29132 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
29134 * assembly.c (mono_assembly_fill_assembly_name): New function to
29135 fill out the MonoAssemblyName structure.
29136 (mono_assembly_open): Use the new function.
29138 * icall.c (fill_reflection_assembly_name): New helper function.
29140 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
29143 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
29145 2003-11-15 Martin Baulig <martin@ximian.com>
29147 * class.c (mono_class_is_open_constructed_type): New public
29148 function; checks whether a type is an open constructed type,
29149 ie. whether it still contains type parameters.
29150 (mono_class_inflate_generic_type): If we're a type parameter and
29151 the inflated type is also a MONO_TYPE_(M)VAR, return the original
29154 * class.h (MonoGenericInst): Added `guint32 is_open'.
29156 * loader.c (method_from_methodspec): Check whether we're an open
29157 or closed constructed type and set `ginst->is_open'.
29159 * reflection.c (mono_reflection_bind_generic_parameters): Check
29160 whether we're an open or closed constructed type and set
29162 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
29163 from open constructed types.
29165 2003-11-15 Martin Baulig <martin@ximian.com>
29167 * reflection.c (mono_reflection_bind_generic_parameters): If we're
29168 a generic instance (instead of a generic type declaration) with
29169 unbound generic parameters, bind them to our actual types.
29171 2003-11-14 Martin Baulig <martin@ximian.com>
29173 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
29175 * reflection.c (mono_reflection_bind_generic_parameters): If we're
29176 an interface type, populate `res->interfaces' with instantiated
29177 versions of all the interfaces we inherit.
29179 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
29181 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
29182 when MONO_PATH is set but doesn't contain the install dir.
29184 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29187 (ves_icall_Type_GetInterfaces): don't return an interface twice when
29188 it's also implemented in base classes. Fixes bug #50927.
29190 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
29192 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
29193 if this method is called from a finalizer. Fixes #50913.
29195 2003-11-12 Miguel de Icaza <miguel@ximian.com>
29197 * threads.c: Implement VolatileRead/VolatileWrite
29199 * icall.c: Add new icalls for VolatileRead/VolatileWrite
29201 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
29203 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
29204 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
29207 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
29208 from Peter Ross (pro@missioncriticalit.com).
29210 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
29212 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
29214 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
29216 * assembly.c (mono_assembly_load_references): Disable check because it
29217 triggers on older corlibs which lots of people have.
29219 2003-11-12 Jackson Harper <jackson@ximian.com>
29221 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
29222 load corlib.dll if mscorlib.dll is not found.
29223 * assembly.h: Remove corlib name define.
29226 * image.c: Change corlib name to mscorlib.
29228 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
29230 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
29232 2003-11-11 Miguel de Icaza <miguel@ximian.com>
29234 * appdomain.h: Added loader_optimization here to sync with the C#
29235 code, and add disallow_binding_redirects field.
29237 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
29239 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
29241 * reflection.c (mono_image_build_metadata): Fix crash on modules
29244 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
29246 * icall.c (ves_icall_get_method_info): Return callingConvention as
29249 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
29250 namespaces from the EXPORTEDTYPE table as well.
29252 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
29253 from all modules inside the assembly.
29255 2003-11-11 Martin Baulig <martin@ximian.com>
29257 * reflection.c (mono_reflection_bind_generic_parameters): Make
29258 this work for interfaces.
29260 2003-11-11 Martin Baulig <martin@ximian.com>
29262 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
29264 2003-11-11 Martin Baulig <martin@ximian.com>
29266 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
29267 "MonoInflatedMethod" and "MonoInflatedCtor".
29269 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
29271 * reflection.c (resolution_scope_from_image): Use the assembly table
29272 from the manifest module, since other modules don't have it.
29274 * debug-helpers.c (mono_type_full_name): New helper function.
29276 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
29278 * image.c (mono_image_load_file_for_image): New public function which
29279 is a replacement for the load_file_for_image in class.c.
29281 * assembly.c (mono_assembly_load_module): A wrapper for the function
29282 above which does assembly association and reference loading too.
29284 * class.c (mono_class_from_name): Call mono_assembly_load_module.
29286 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29288 * appdomain.c: not all of the attributes for the full assembly name
29289 are required and the order doesn't matter. Fixes bug #50787.
29291 2003-11-10 Dick Porter <dick@ximian.com>
29293 * locales.c: Use platform-endian UTF16
29295 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
29297 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
29299 2003-11-10 Martin Baulig <martin@ximian.com>
29302 (mono_metadata_load_generic_params): Make this actually work.
29304 * reflection.c (mono_reflection_bind_generic_parameters): If our
29305 parent is a generic instance, pass all the `types' to it, no
29306 matter whether it has the same number of type parameters or not.
29308 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
29310 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
29312 * assembly.c (mono_assembly_load_references): Move the image<->assembly
29313 assignment code to this function so it gets called recursively for all
29316 * image.c (load_modules): Remove the assembly assignment since it is
29317 now done by mono_assembly_load_references.
29319 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
29320 Add 'module' argument.
29321 (mono_module_get_types): New helper function.
29322 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
29324 2003-11-08 Martin Baulig <martin@ximian.com>
29326 * class.c (mono_class_inflate_generic_method): Interface method
29327 don't have a header.
29329 * reflection.c (mono_image_get_methodspec_token): Take an
29330 additional `MonoGenericInst *' argument instead of reading it from
29331 the header; this is necessary to support interfaces.
29332 (mono_image_create_token): Pass the `MonoGenericInst *' from the
29333 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
29334 (inflated_method_get_object): Take an additional `MonoGenericInst *'
29337 * reflection.h (MonoReflectionInflatedMethod): Added
29338 `MonoGenericInst *ginst'.
29340 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
29342 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
29344 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
29346 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
29348 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
29351 (reflection_methodbuilder_from_method_builder):
29352 (reflection_methodbuilder_from_ctor_builder): New helper functions to
29353 initialize a ReflectionMethodBuilder structure.
29354 (mono_image_get_methodbuilder_token):
29355 (mono_image_get_ctorbuilder_token): New functions to emit memberref
29356 tokens which point to types in another module inside the same assembly.
29358 * reflection.c: Use the new helper functions.
29360 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
29362 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
29363 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
29365 * reflection.c (resolution_scope_from_image): Emit a moduleref if
29368 * reflection.c (mono_image_build_metadata): Emit metadata only for the
29369 current module. Emit the manifest only for the main module.
29371 * reflection.c (mono_image_create_token): Add assertion when a
29372 memberref needs to be created.
29374 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
29376 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
29377 larger buffer for the custom attribute blob. Fixes #50637.
29379 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29381 * threadpool.c: notify listener on async processing handles after
29382 invoking the async callback. Thanks to Zoltan.
29384 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
29386 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
29387 avoid code duplication.
29389 * reflection.h (MonoDynamicImage): New type which is currently unused,
29390 but will be used through the ref.emit code in place of
29391 MonoDynamicAssembly.
29393 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
29396 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
29397 a MonoDynamicImage instead of just a MonoImage.
29399 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
29400 icalls to ModuleBuilder but keep their semantics, so they will work
29401 with moduleb->assemblyb. This will change later.
29403 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
29405 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
29408 * reflection.c (mono_image_build_metadata): Avoid creation of a default
29409 main module, since it is now done by the managed code.
29411 2003-11-03 Martin Baulig <martin@ximian.com>
29413 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
29414 `ginst->klass' here.
29415 (method_encode_methodspec): Don't use the `ginst->generic_method's
29416 klass if it's a generic instance, use `ginst->klass' in this case.
29418 2003-11-03 Martin Baulig <martin@ximian.com>
29420 * reflection.c (mono_image_get_generic_method_param_info):
29421 Removed, use mono_image_get_generic_param_info() instead.
29422 (mono_image_get_type_info): Write the GenericParam table before
29423 the Method table. This is neccessary because in the GenericParam
29424 table, type parameters of the class (ie. '!0' etc.) must come
29425 before the ones from its generic methods (ie. '!!0' etc).
29427 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
29429 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
29431 2003-11-02 Martin Baulig <martin@ximian.com>
29433 * reflection.c (create_generic_typespec): Take a
29434 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
29435 the generic parameters from it.
29437 2003-11-02 Martin Baulig <martin@ximian.com>
29439 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
29440 instead of a `MonoClassField *' since we just need the type.
29441 (create_generic_typespec): New static function. Creates a
29442 TypeSpec token for a generic type declaration.
29443 (mono_image_get_generic_field_token): New static function.
29444 (mono_image_create_token): If we're a FieldBuilder in a generic
29445 type declaration, call mono_image_get_generic_field_token() to get
29448 2003-11-02 Martin Baulig <martin@ximian.com>
29451 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
29452 `MonoReflectionGenericInst *declaring_type' and
29453 `MonoReflectionGenericInst *reflected_type' fields.
29455 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
29456 `MonoReflectionGenericInst *declaring_type' and a
29457 `MonoReflectionGenericInst *reflected_type' argument instead of a
29458 single `MonoReflectionGenericInst *type' one. Set
29459 `res->declaring_type' and `res->reflected_type' from them.
29460 (mono_reflection_inflate_field): Likewise.
29462 2003-11-02 Martin Baulig <martin@ximian.com>
29464 * class.c (mono_class_setup_vtable): Don't store generic methods
29467 2003-11-02 Martin Baulig <martin@ximian.com>
29469 * reflection.h (MonoReflectionGenericInst): Added
29470 `MonoReflectionType *declaring_type'.
29472 * reflection.c (mono_reflection_bind_generic_parameters): Use
29473 `if (tb->parent)' instead of `klass->parent'.
29475 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
29477 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
29478 with an empty ASSEMBLY table.
29480 * reflection.c (mono_image_build_metadata): Avoid using the same loop
29481 variable in the inner and outer loops.
29483 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
29485 * metadata.h (mono_metadata_make_token): Put parentheses around macro
29488 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
29490 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
29491 icalls. Instead, do everything in managed code. This is needed since
29492 it is hard to restore the original domain etc. in unmanaged code in the
29493 presence of undeniable exceptions.
29495 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
29496 New icalls to push and pop appdomain refs.
29498 2003-10-31 Martin Baulig <martin@ximian.com>
29500 * class.c (inflate_generic_type): Renamed to
29501 mono_class_inflate_generic_type() and made it public.
29503 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
29506 * loader.c (mono_field_from_memberref): Also set the retklass for
29509 * fielder.c (mono_image_get_inflated_field_token): New static
29510 method; creates a metadata token for an inflated field.
29511 (mono_image_create_token, fixup_method): Added support for
29512 "MonoInflatedField".
29513 (fieldbuilder_to_mono_class_field): New static function.
29514 (mono_reflection_inflate_field): New public function.
29517 (MonoReflectionGenericInst): Added `MonoArray *fields'.
29518 (MonoReflectionInflatedField): New typedef.
29520 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
29522 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
29523 for Solaris and other platforms without s6_addr16
29525 2003-10-30 Martin Baulig <martin@ximian.com>
29527 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
29528 argument instead of two.
29529 (mono_class_inflate_generic_signature): Likewise.
29530 (inflate_generic_header): Likewise.
29531 (mono_class_inflate_generic_method): Likewise. In addition, if
29532 `ginst->klass' is set, it becomes the new `method->klass'.
29534 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
29537 * reflection.c (encode_generic_method_sig): Write a 0xa as the
29538 first byte. [FIXME]
29539 (method_encode_methodspec): If we have generic parameters, create
29540 a MethodSpec instead of a MethodRef.
29541 (fixup_method): Added support for "MonoInflatedMethod" and
29542 "MonoInflatedCtor".
29543 (mono_image_create_token): Added support for "MonoInflatedMethod"
29544 and "MonoInflatedCtor".
29545 (inflated_method_get_object): New static function; returns a
29546 managed "System.Reflection.MonoInflatedMethod" object.
29547 (mono_reflection_bind_generic_method_parameters): Return a
29548 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
29549 (mono_reflection_inflate_method_or_ctor): Likewise.
29550 (mono_image_get_generic_method_param_info): Initialize unused
29552 (mono_image_get_generic_param_info): Likewise.
29554 * reflection.h (MonoReflectionInflatedMethod): New public
29555 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
29556 "S.R.MonoInflatedCtor" classes.
29558 * loader.c (method_from_memberref): If we're a TypeSpec and it
29559 resolves to a generic instance, inflate the method.
29561 2003-10-28 Dick Porter <dick@ximian.com>
29563 * object.c (mono_runtime_run_main): Convert command-line arguments
29564 into utf8, falling back to the user's locale encoding to do so.
29566 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
29568 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
29571 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
29573 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
29574 up icalls at method definition time. Partially fixes #33569.
29576 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
29578 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
29579 marshalling of arrays. Fixes #50116.
29581 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
29583 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
29584 points to a vtable in the dying appdomain.
29586 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
29587 listeners into unmanaged code inside the lock.
29589 * object.c (mono_class_vtable): Turn off typed allocation in non-root
29590 domains and add some comments.
29592 2003-10-25 Martin Baulig <martin@ximian.com>
29594 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
29596 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
29598 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
29599 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
29600 currently parsing. Create the generic class and store it in
29601 `generic_inst->klass' before parsing the type arguments. This is
29602 required to support "recursive" definitions; see mcs/tests/gen-23.cs
29604 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
29605 to support recursive typespec entries.
29607 * class.c (mono_class_setup_parent): If our parent is a generic
29608 instance, we may get called before it has its name set.
29609 (mono_class_from_generic): Splitted into
29610 mono_class_create_from_generic() and mono_class_initialize_generic().
29612 2003-10-25 Martin Baulig <martin@ximian.com>
29614 * icall.c (ves_icall_Type_BindGenericParameters): Return a
29615 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
29616 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
29617 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
29619 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
29620 (create_typespec): Likewise.
29621 (mono_reflection_bind_generic_parameters): Return a
29622 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
29623 (mono_reflection_inflate_method_or_ctor): New public function.
29625 * reflection.h (MonoReflectionGenericInst): New typedef.
29627 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
29629 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
29630 inside the domain lock. Fixes #49993.
29632 * object.c (mono_class_vtable): When typed allocation is used,
29633 allocate vtables in the GC heap instead of in the mempool, since the
29634 vtables contain GC descriptors which are used by the collector even
29635 after the domain owning the mempool is unloaded.
29637 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
29639 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
29640 reflect what it does. Also invalidate mempools instead of freeing
29641 them if a define is set.
29643 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
29646 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
29647 hold the finalizable objects in this domain.
29649 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
29652 * appdomain.c (mono_domain_set): New function to set the current
29653 appdomain, but only if it is not being unloaded.
29655 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
29656 appdomain which is being unloaded.
29658 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
29659 unloading of the root appdomain.
29661 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
29662 icall to execute a method in another appdomain. Intended as a
29663 replacement for InternalSetDomain, which can confuse the code
29664 generation in the JIT.
29666 * appdomain.c (mono_domain_is_unloading): New function to determine
29667 whenever an appdomain is unloading.
29669 * appdomain.c (mono_domain_unload): New function to correctly unload
29672 * assembly.c (mono_assembly_load_references): Check that an assembly
29673 does not references itself.
29675 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
29676 domain manually, it asks the finalizer thread to do it, then waits for
29677 the result. Also added a timeout.
29679 * icall.c: Register the new icalls.
29681 * threads.h threads.c: Export the mono_gc_stop_world and
29682 mono_gc_start_world functions.
29684 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
29685 function to fill out the mempool with 0x2a.
29687 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
29689 * reflection.h (MonoReflectionMethodAux): New structure to store
29690 information which is rarely used, thus is not in the MonoMethod
29693 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
29694 store the aux info.
29696 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
29697 and marshalling info into the aux structure.
29699 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
29700 from the aux structure.
29702 * loader.c (mono_method_get_param_names): Retrieve the param names from
29705 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
29707 * exception.h exception.c: Add AppDomainUnloadedException && fix
29710 2003-10-21 Dick Porter <dick@ximian.com>
29713 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
29714 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
29716 2003-10-21 Martin Baulig <martin@ximian.com>
29718 * reflection.c (mono_reflection_bind_generic_parameters):
29719 `klass->parent' is NULL for interfaces.
29721 2003-10-21 Martin Baulig <martin@ximian.com>
29723 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
29725 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
29727 * exception.c (mono_exception_from_name_msg): New helper function for
29728 creating exceptions and initializing their message field.
29730 * exception.c: Simplify functions using the new helper.
29732 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
29735 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
29736 mono_raise_exception, since otherwise gcc doesn't generate the function
29737 epilog for raise_exception, confusing the stack unwinding in the JIT.
29740 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
29741 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
29744 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29746 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
29749 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
29751 * icall.c: Removed GetUninitializedObject method because
29752 AllocateUninitializedClassInstance does the same.
29754 2003-10-18 Martin Baulig <martin@ximian.com>
29756 * class.c (inflate_generic_signature): Renamed to
29757 mono_class_inflate_generic_signature() and made it public.
29758 (my_mono_class_from_generic_parameter): New static function; if we
29759 don't already have the generic parameter's MonoClass, create a
29760 very simple one which is just used internally in the runtime and
29761 not passed back to managed code.
29763 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
29765 * metadata.h (MonoMethodSignature): Moved the
29766 `MonoGenericParam *gen_params' to the MonoMethodHeader.
29767 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
29769 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
29770 ves_icall_MonoMethod_GetGenericArguments(); this is now an
29771 interncall on the MonoMethod class, not on MethodInfo.
29772 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
29773 calling mono_reflection_bind_generic_method_parameters() directly.
29775 * loader.c (mono_method_get_signature): If this is a MethodSpec;
29776 return the already computed `method->signature'.
29777 (method_from_methodspec): New static function to load a method
29778 from a MethodSpec entry.
29779 (mono_get_method_from_token): Call the new method_from_methodspec()
29780 for MethodSpec tokens.
29781 (mono_get_method_from_token): If we're a generic method, load the
29784 * reflection.c (mono_image_get_memberref_token): Allow
29785 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
29787 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
29788 (mono_image_create_token): First check whether it's a generic
29789 method (so we'd need to create a MethodSpec), then do the other
29791 (mono_reflection_bind_generic_method_parameters): Return a
29792 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
29793 called directly from the interncall.
29795 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
29797 * reflection.c (load_public_key): Move loading of the public key
29800 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
29802 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
29805 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
29806 culture, hash_alg and public_key. Fixes #49555.
29808 2003-10-17 Martin Baulig <martin@ximian.com>
29810 * class.h (MonoGenericInst): Moved this declaration here and added
29811 `MonoMethod *generic_method'.
29814 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
29815 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
29817 * metadata.c (mono_metadata_type_equal): Two types of
29818 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
29819 index; ie. don't compare the address of the `MonoGenericParam'
29821 (mono_metadata_load_generic_params): Removed the `MonoMethod
29824 * metadata.h (MonoGenericInst): Moved declaration to class.h.
29825 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
29827 * reflection.c (method_encode_signature): Encode the number of
29828 generic parameters.
29829 (encode_generic_method_sig): New static function.
29830 (method_encode_methodspec): New static function; creates an entry
29831 in the MethodSpec table for a generic method.
29832 (mono_image_get_methodspec_token): New static function.
29833 (mono_image_create_token): Call mono_image_get_methodspec_token()
29834 for generic methods.
29835 (mono_reflection_bind_generic_method_parameters): New public
29836 function. Instantiates a generic method.
29838 2003-10-16 Martin Baulig <martin@ximian.com>
29840 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
29841 *gen_params' here from MonoMethodHeader.
29843 * metadata.c (mono_metadata_parse_method_signature): If we have
29844 generic parameters, initialize `method->gen_params' and then set
29845 the correct `type->data.generic_param' in all the parameters.
29847 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
29849 * threads.c (mono_threads_get_default_stacksize): New function to
29850 return the default stacksize.
29852 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
29853 termination of the finalizer thread, since the previous method had
29854 race conditions. Fixes #49628.
29856 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
29857 as for the other managed threads.
29859 2003-10-16 Martin Baulig <martin@ximian.com>
29861 * class.c (inflate_generic_signature): Copy `generic_param_count'
29864 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
29867 * metadata.c (mono_metadata_parse_method_signature): Actually set
29868 the `method->generic_param_count' here.
29869 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
29871 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
29873 * object.h: Add a new field to TypedRef to simplify the implementation
29874 of the REFANY opcodes in the JIT.
29876 * icall.c: Make use of the new field.
29878 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
29881 2003-10-15 Martin Baulig <martin@ximian.com>
29883 * class.c (mono_class_from_gen_param): Renamed to
29884 mono_class_from_generic_parameter() and moved most of the
29885 functionality from mono_reflection_define_generic_parameter()
29886 here; ie. we create a "real" class here.
29887 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
29888 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
29889 previously been called.
29891 * class.h (MonoGenericParam): Moved the declaration of this struct
29892 here from metadata.h and added `MonoMethod *method'.
29894 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
29897 * loader.c (mono_get_method_from_token): If we have any generic
29898 parameters, call mono_metadata_load_generic_params() to read them
29899 from the MONO_TABLE_GENERICPAR.
29901 * metadata.c (mono_metadata_load_generic_params): Added
29902 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
29904 * metadata.h (MonoMethodSignature): Replaced
29905 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
29906 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
29908 * reflection.c (mono_reflection_define_generic_parameter): Moved
29909 most of the functionality into the new
29910 mono_class_from_generic_parameter(); set the `method' field if
29911 we're a method parameter.
29913 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
29915 * marshal.c (emit_struct_conv): if native size is 0
29918 2003-10-14 Martin Baulig <martin@ximian.com>
29920 * icall.c: The generics API has changed in the spec since it was
29921 added to System.Type; these modifications make it match the spec
29923 (ves_icall_Type_GetGenericParameters): Renamed to
29924 `ves_icall_Type_GetGenericArguments'.
29925 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
29926 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
29927 `ves_icall_MonoType_get_HasGenericArguments'.
29928 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
29929 `ves_icall_MonoType_get_IsGenericParameter'.
29930 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
29931 this is no interncall anymore.
29932 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
29933 `ves_icall_TypeBuilder_get_IsGenericParameter'.
29935 2003-10-14 Martin Baulig <martin@ximian.com>
29937 * reflection.c (mono_reflection_bind_generic_parameters): Also
29938 inflate generic methods if we're reading the class from IL.
29940 2003-10-13 Martin Baulig <martin@ximian.com>
29942 * reflection.c (mono_reflection_define_generic_parameter): This
29943 method isn't called directly from the icall anymore; take a
29944 `MonoReflectionAssemblyBuilder *' so we can use this for type and
29945 method generic parameters.
29946 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
29947 (method_builder_encode_signature): Encode generic parameters.
29948 (mono_image_get_method_info): Write generic params to the
29949 MONO_TABLE_GENERICPARAM table.
29951 * reflection.h (MonoReflectionMethodBuilder): Added
29952 `MonoArray *generic_params'.
29954 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
29956 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
29957 wrapper for mono_reflection_define_generic_parameter().
29958 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
29960 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
29962 * marshal.h: Add missing function to fix build.
29964 * marshal.c (mono_marshal_get_native_wrapper): Add support for
29965 the SetLastError pinvoke attribute.
29967 * marshal.c (mono_marshal_set_last_error): New helper function called
29968 by the generated code.
29970 * marshal.c (mono_mb_emit_branch): New helper function.
29972 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
29974 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
29975 classes as parameters and return values of delegates. Fixes #29256.
29977 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
29979 * locales.c: use gint32 in non HAVE_ICU case
29981 2003-10-11 Martin Baulig <martin@ximian.com>
29983 * mono-debug.c (mono_debug_add_method): Added a workaround for
29986 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
29988 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
29989 delegates passed to native code must use the STDCALL calling
29990 convention. Fixes #35987.
29992 2003-10-10 Martin Baulig <martin@ximian.com>
29994 * class.c (inflate_generic_type): If we're inflating for a generic
29995 type instance (and not for a generic method), return
29996 MONO_TYPE_MVAR unchanged.
29998 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30000 * string-icalls.c: Join ignores null strings in the source array.
30001 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
30002 * threads.c: GetAvailableTheads is slightly more accurate.
30004 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
30006 * threads.h threads.c : add mono_threads_set_default_stacksize
30007 and pass default to CreateThread calls.
30009 2003-10-09 Dick Porter <dick@ximian.com>
30013 * locales.c: Internal calls for constructing CultureInfo and
30014 related objects from libicu (if its available.)
30016 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
30018 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
30020 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30022 * threadpool.c: added an argument to async_invoke_thread that is the
30023 item to process, pass the MonoAsyncResult to the thread start function
30024 when creating a new thread. This way we don't need to acquire any lock
30025 when we're creating a new thread. Readded a semaphore for faster
30026 response times (instead of that Sleep i added).
30028 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
30030 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
30031 get daylight change dates better on Windows, fix handling
30032 of platforms without tm_gmtoff.
30034 2003-10-06 Martin Baulig <martin@ximian.com>
30036 * class.c (inflate_generic_method): Renamed to
30037 mono_class_inflate_generic_method() and made public.
30038 (mono_class_init): Don't inflate the generic methods here.
30039 (mono_class_from_generic): Added `gboolean inflate_methods'
30040 argument. Inflate the methods here.
30042 * loader.c (mono_method_get_param_names): Ignore instances of
30043 generic types for the moment.
30045 * reflection.c (fixup_method): Added support for inflated methods.
30046 (mono_image_create_token): Use mono_image_get_methodref_token()
30047 for inflated methods.
30048 (mono_custom_attrs_from_param): Ignore instances of generic types
30050 (mono_reflection_bind_generic_parameters): New public function.
30051 Moved all the functionality from
30052 ves_icall_Type_BindGenericParameters() here and added support for
30054 (mono_reflection_define_generic_parameter): Initialize
30055 `klass->methods' here.
30057 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
30058 functionality into mono_reflection_define_generic_parameter().
30059 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
30060 TypeBuilder, return that TypeBuilder.
30062 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30064 * appdomain.c: removed mono_delegate_semaphore.
30067 (mono_thread_pool_add): moved hash table creation inside and the thread
30068 creation outside of the critical region.
30069 (mono_thread_pool_finish): removed obsolete code.
30070 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
30071 continue or exit the thread depending on the queue.
30073 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
30075 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
30076 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
30077 handle more bool marshalling options
30079 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
30081 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
30082 arrays of structs. Also add a more descriptive error message when
30083 a structure member is marshalled as LPArray.
30085 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
30087 * marshal.c (mono_marshal_get_native_wrapper): Add support for
30088 marshalling arrays of complex types. Fixes #29098. Also remove an
30089 usused and incomplete function.
30091 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
30093 * gc.c: report heap_size - free_bytes as total memory allocated
30096 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
30098 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
30099 fix timezone handling problems on Windows.
30101 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
30102 asserts when the year is outside the range handled by ms the functions.
30104 * class.c (setup_interface_offsets): If the class is an interface,
30105 fill out its interface_offsets slot.
30107 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30109 * threadpool.c: mark threadpool threads as background.
30111 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
30113 * decimal.c - define DECINLINE to nothing if not using GCC
30115 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
30117 * assembly.c: More refcount fixes.
30119 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30121 * string-icalls.c: if we're not trimming, return the same string.
30122 When not splitting, don't create a new string.
30124 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30127 (mono_image_open): increment the ref_count inside the critical section.
30129 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
30131 * image.c (mono_image_open): Fix reference counting bug.
30133 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
30135 * marshal.c (mono_marshal_type_size) struct alignment changed for
30136 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
30137 64bits. Avoid leak in mono_marshal_get_native_wrapper when
30138 mono_lookup_pinvoke_call throws.
30140 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
30142 * reflection.c (mono_reflection_parse_type): Fix #49114.
30144 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
30145 temporary workaround for cygwin header problem.
30147 * object.c (mono_object_isinst): Synchronize this with the code
30148 generated by the JIT for casts.
30150 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
30152 * reflection.c (encode_type): Fix #38332.
30154 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
30156 * marshal.c (mono_marshal_method_from_wrapper): New function to return
30157 the original method from the wrapper method.
30159 2003-09-25 Martin Baulig <martin@ximian.com>
30161 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
30162 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
30163 (ves_icall_Type_get_IsGenericInstance): New interncall.
30165 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
30167 * object.c: fix cast warning in big endian code.
30169 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
30171 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
30173 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30175 * assembly.c: don't call check_env from mono_assembly_load. It's
30176 already done once in mono_assemblies_init and may cause headaches when
30177 multiple threads are loading assemblies.
30179 2003-09-19 Martin Baulig <martin@ximian.com>
30181 * reflection.c (mono_reflection_define_generic_parameter): Don't
30182 allocate `klass->methods', set `klass->flags' to
30183 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
30185 2003-09-18 Martin Baulig <martin@ximian.com>
30187 * class.c (mono_class_init): Don't create `class->methods' if it's
30188 already initialized.
30190 * metadata.c (mono_metadata_load_generic_params): Make this
30193 * reflection.c (mono_reflection_define_generic_parameter): Set
30194 parent class and interfaces from the constraints.
30196 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
30197 to keep this struct in sync with the declaration in TypeBuilder.cs.
30199 2003-09-17 Martin Baulig <martin@ximian.com>
30201 * metadata.h (MonoType): Replaced the data's `int type_param'
30202 field with `MonoGenericParam *generic_param'.
30203 (MonoGenericParam): Added `MonoClass *klass'.
30205 * class.c (mono_class_from_gen_param): Removed the
30206 `MonoImage *image' and `int type_num' arguments.
30208 * metadata.c (mono_metadata_parse_generic_param): New static
30209 method; creates a MonoGenericParam which just contains the index.
30210 (do_mono_metadata_parse_type): Call
30211 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
30214 * reflection.c (mono_image_typedef_or_ref): Generic type
30215 parameters may be in the same assembly, but never use a typedef
30217 (mono_reflection_define_generic_parameter): We're now creating a
30218 "real" class for the type parameter; it's now safe to call
30219 mono_class_from_mono_type() on the class'es type, it'll do the
30222 2003-09-16 Martin Baulig <martin@ximian.com>
30224 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
30225 `symfile->range_entry_size' and `symfile->class_entry_size' here;
30226 the `symfile' data structure must be fully initialized before it
30227 gets added to the table.
30229 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
30231 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
30233 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
30234 class init trampolines.
30236 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
30238 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
30239 to the built-in profiler to turn off time and allocation profiling
30242 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
30244 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
30247 * debug-helpers.c (mono_method_full_name): Print the wrapper type
30248 in human readable form.
30250 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
30252 * reflection.c icall.c: Fixed warnings.
30254 * image.c (load_class_names): Use a temporary hash table to hold the
30255 namespaces in order to avoid doing many string comparisons.
30257 * image.h: Fix typo.
30259 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
30260 Pass NULL instead of g_direct_equal to the GHashTable constructor
30261 since the NULL case is short-circuited inside g_hash_table_lookup,
30262 leading to better performance.
30264 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
30265 obtain the first custom attribute for a given index. Depends on the
30266 CustomAttribute table being sorted by the parent field.
30268 * reflection.c (mono_custom_attrs_from_index): Use the new function
30269 for better performance.
30271 2003-09-07 Martin Baulig <martin@ximian.com>
30273 * class.c (mono_class_init): If we're a generic instance, inflate
30274 all our methods instead of loading them from the image.
30275 (mono_class_from_generic): Set `class->methods = gklass->methods'.
30277 2003-09-07 Martin Baulig <martin@ximian.com>
30279 * mono-debug-debugger.c: Added support for constructors.
30281 2003-09-06 Martin Baulig <martin@ximian.com>
30283 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
30286 * reflection.c (mono_reflection_setup_generic_class): Call
30287 ensure_runtime_vtable() to create the vtable.
30289 2003-09-05 Martin Baulig <martin@ximian.com>
30291 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
30294 2003-09-04 Martin Baulig <martin@ximian.com>
30296 * reflection.c (mono_reflection_define_generic_parameter): Generic
30297 parameters start with zero.
30299 2003-09-04 Martin Baulig <martin@ximian.com>
30301 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
30303 * reflection.h (MonoReflectionGenericParam): New typedef.
30304 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
30305 the generic parameters from the managed TypeBuilder.
30307 * reflection.c (mono_reflection_define_generic_parameter): New function.
30308 (mono_reflection_create_runtime_class): Encode generic parameters.
30309 (mono_reflection_setup_generic_class): New function; this is
30310 called after adding adding all generic params to the TypeBuilder.
30311 (encode_type): Added MONO_TYPE_VAR.
30313 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
30315 * class.h class.c (mono_class_needs_cctor_run): Moved this method
30318 * assembly.h assembly.c: Moved the AOT loading code into an assembly
30321 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
30323 * reflection.h reflection.c class.h class.c: Delete duplicate
30324 definition of mono_type_get_name () from reflection.c and export the
30327 * class.c: Class loading fixes from Bernie Solomon
30328 (bernard@ugsolutions.com).
30330 * reflection.c: Endianness fixes from Bernie Solomon
30331 (bernard@ugsolutions.com).
30333 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
30335 * assembly.h assembly.c: Define a file format version for AOT
30338 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
30340 * appdomain.h (MonoJitInfo): New field to determine whenever the
30341 code is domain neutral.
30343 2003-08-31 Miguel de Icaza <miguel@ximian.com>
30345 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
30347 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
30349 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
30350 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
30351 Avoid caching the result since strings must be domain specific. Fixes
30354 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
30356 * marshal.c (mono_marshal_init): Make this callable multiple times
30357 since it is hard to find a correct place to call it.
30359 * object.c (mono_runtime_class_init): Execute static constructors in
30360 the correct appdomain.
30362 * image.c (build_guid_table): Handle the case when multiple images have
30365 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30367 * icall.c: added a couple of icalls for System.Web.
30369 2003-08-28 Martin Baulig <martin@ximian.com>
30371 * icall.c (ves_icall_Type_BindGenericParameters): Use
30372 `klass->generic_inst' instead of `&klass->byval_arg' in the
30373 mono_type_get_object() call. The returned type must be
30374 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
30376 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
30380 * object.c (mono_class_proxy_vtable): Make it thread safe.
30382 * pedump.c: Fix warning.
30384 * object.c appdomain.h: Get rid of metadata_section.
30385 It is no longer needed and it was causing deadlocks with domain->lock.
30387 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
30389 2003-08-26 Martin Baulig <martin@ximian.com>
30391 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
30393 2003-08-26 Martin Baulig <martin@ximian.com>
30395 * pedump.c (main): Call mono_metadata_init(),
30396 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
30397 and mono_loader_init().
30399 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
30401 * loader.h: Add missing include to fix build.
30403 * image.h: mono_image_load_references is no more.
30405 * assembly.c: Reworked assembly loading to make it really thread safe.
30406 After these changes, the assembly returned by mono_assembly_open is
30407 fully initialized, i.e. all its references assemblies are loaded.
30409 * assembly.c (mono_image_load_references): Renamed to
30410 mono_assembly_load_references, and made private, since clients no
30411 longer need to call it.
30413 * class.c: Removed calls to mono_assembly_load_references, since it was
30414 a source of deadlocks.
30416 * loader.h loader.c class.h class.c: Protect data structures using a
30417 new lock, the loader lock.
30419 * class.c (mono_class_setup_vtable): Create temporary hash tables and
30420 GPtrArrays only when needed.
30422 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
30423 into empty structures by mcs. Fixes pinvoke7.cs.
30425 * domain.c (mono_init): Call a new initialization function.
30427 * appdomain.c (mono_runtime_init): Call the new initializer function
30428 of the marshal module.
30430 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
30431 inserted into empty structures by mcs. Fixes pinvoke7.cs.
30433 * marshal.h marshal.c: Added locks around the wrapper caches to make
30434 this module thread safe.
30436 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
30437 this argument. Fixes pinvoke1.exe.
30439 2003-08-25 Lluis Sanchez <lluis@ximian.com>
30441 * object.h: Added call_type field to MonoMethodMessage and the corresponding
30442 enumeration of values. Removed fields to store remote call output values in
30443 MonoAsyncResult. Not needed any more.
30444 * object.c: Initialize call_type and async_result fields in mono_message_init.
30445 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
30446 dispatching the message.
30447 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
30448 async call to finish. To do it use a message with EndInvoke call type.
30450 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
30452 * loader.h loader.c (mono_method_hash_marhal_info): New function which
30453 determines whenever a method has marshalling info.
30455 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30457 * assembly.c: fix the build on windows.
30459 2003-08-22 Lluis Sanchez <lluis@ximian.com>
30461 * object.cs: Fixed bug #47785.
30463 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
30465 * string-icalls.c (StringReplace): If their are no occurances of
30466 the old string found return a reference to the supplied
30467 string. This saves some memory and matches MS behavoir.
30469 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30471 * socket-io.c: fixed compilation for systems that define AF_INET6
30472 and don't define SOL_IP/SOL_IPV6.
30474 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
30476 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
30477 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
30479 * rawbuffer.c rawbuffer.h: Make this module thread safe.
30481 * domain.c: Make this module thread safe.
30483 * domain.c (mono_init): Call new initialization function.
30485 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
30486 reference types too. Fixes #38812.
30488 * image.c (mono_image_init): Fixed warnings.
30490 * class.c (mono_class_from_typeref): Handle assembly load failure
30493 * appdomain.c (add_assemblies_to_domain): Handle the case when
30494 the references of an assembly are not yet loaded.
30496 * metadata.c image.c assembly.c: Moved initialization of global
30497 variables to a separate function called at startup since lazy
30498 initialization of these variables is not thread safe.
30500 * image.c assembly.c: Made this module thread safe by adding locks in
30501 the appropriate places.
30503 * domain.c (mono_init): Call the new initialization functions of the
30506 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
30508 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
30509 make a direct call. It is proxy's work to make the call asynchronous.
30510 mono_delegate_end_invoke(): If the targe is a proxy, just collect
30512 * object.cs: mono_method_call_message_new(): read AsyncResult and
30513 state object from parameters list, if this info is requested.
30514 * object.h: Added fields to store remote call output values in
30515 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
30517 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
30519 * object.h: add needed fields to MonoThread.
30520 * threads.c, threads.h: allow registering a function to cleanup data
30521 allocated per thread by the JIT.
30523 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
30525 * loader.h: portability fix by Bernie Solomon
30526 * <bernard@ugsolutions.com>.
30528 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
30530 * reflection.h reflection.c (mono_param_get_objects): Changed this to
30531 return a MonoArray. This simplifies the code and also ensures that
30532 the cache allways contains an object reference as a value.
30534 * icall.c (ves_icall_get_parameter_info): Simplified using the new
30537 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30539 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
30540 fixes a problem with byte ordering when getting the address family for
30543 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
30545 * .cvsignore: Added monosn.
30547 * reflection.h reflection.c loader.c: Added support for parameter
30548 marshalling to dynamically created types. Fixes #47295.
30550 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
30552 * rand.c: remove useless warnings.
30554 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
30556 * class.c: implemented ldtoken for methods and fieldrefs.
30558 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30560 * threadpool.c: when mono_async_invoke was called, no one took care of
30561 monitoring the queue. So if the method invoked took some time and we
30562 got new async invoke requests after 500 ms (the thread created waited
30563 that long in WaitForSingleObject), the new async invoke was not called
30564 until the previous one finished.
30566 This is fixed now. Thanks to Totte for helping with it.
30568 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30570 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
30572 2003-08-11 Martin Baulig <martin@ximian.com>
30574 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
30576 2003-08-06 Martin Baulig <martin@ximian.com>
30578 * mono-debug-debugger.c: Added support for static fields,
30579 properties and methods.
30581 2003-08-06 Martin Baulig <martin@ximian.com>
30583 * mono-debug-debugger.c: Don't store the MonoString's vtable to
30584 make this work for applications with multiple application domains.
30586 2003-08-04 Martin Baulig <martin@ximian.com>
30588 * mono-debug-debugger.c: Completely reworked the type support; the
30589 most important thing is that we're now just using one single
30590 `MonoType' instance per type.
30592 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
30594 * mono-endian.h, mono-endian.c, icall.c: Added icall
30595 ves_icall_System_Double_AssertEndianity to assert double word endianity
30596 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
30598 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
30600 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
30601 support, icalls and fixes.
30603 2003-07-31 Miguel de Icaza <miguel@ximian.com>
30605 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
30606 classes that are a punctuation character in .NET is not the same a
30609 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
30611 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
30613 2003-07-29 Miguel de Icaza <miguel@ximian.com>
30615 * icall.c: Add new MemCopy internalcall.
30616 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
30617 Simplified code; It is not necessary to handle all the cases here,
30618 as the C# code takes care of it. Only handle the case of the name
30619 resource embedded into the assembly.
30621 Changed signature to return the data pointer and the size of the
30624 2003-07-26 Miguel de Icaza <miguel@ximian.com>
30626 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
30627 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
30629 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
30631 * socket-io.c: ignore EINTR error in select.
30633 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
30635 * class.h, class.c: removed unused subclasses field in MonoClass.
30637 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
30639 * icall.c: improve fix of get_base_definition(). If the parent class
30640 doesn't have the mehod, look at the parent of the parent.
30641 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
30642 to check if a parameter is an in or out parameter
30643 (PARAM_ATTRIBUTE_IN is not set by default).
30644 mono_method_return_message_restore(): Use mono_class_value_size to
30645 get the size of a value type. mono_type_stack_size (parameterType)
30646 does not return the correct value if parameterType is byRef.
30647 mono_load_remote_field(), mono_load_remote_field_new(),
30648 mono_store_remote_field(), mono_store_remote_field_new():
30649 raise exception if the remote call returns an exception.
30651 2003-07-28 Martin Baulig <martin@ximian.com>
30653 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
30654 method. This is a wrapper around mono_runtime_invoke() which
30655 boxes the instance object if neccessary.
30657 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
30659 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
30660 metadata.h, row-indexes.h, verify.c: first cut of generics support.
30662 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
30664 * icall.c: disable mcs bug workaround.
30666 2003-07-21 Miguel de Icaza <miguel@ximian.com>
30668 * object.c (mono_runtime_class_init): Take the metadata_section
30669 mutex before obtaining the domain mutex.
30671 * appdomain.h: Added definition of metadata_section mutex here.
30673 * object.c: define metadata_mutex here.
30675 2003-07-24 Ravi Pratap <ravi@ximian.com>
30677 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
30680 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
30682 * reflection.c: Fix bug #46669
30684 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30689 * object.h: fill in the type name for TypeLoadException.
30691 2003-07-23 Ravi Pratap <ravi@ximian.com>
30693 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
30694 relationship between TypeBuilders while compiling corlib) and bug
30695 45993 (Array types returned from the runtime while compiling
30696 corlib were from the loaded corlib).
30698 2003-07-22 Martin Baulig <martin@ximian.com>
30700 * mono-debug-debugger.c: Reworked the type support a bit more;
30701 distinguish between types and classes.
30703 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
30705 * icall.c: add IsArrayImpl icall.
30707 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
30709 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
30710 initializing real_size only once. Also fix bug #46602.
30712 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
30714 * object.c: Renamed mono_metadata_section to metadata_section.
30716 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
30718 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
30719 empty array if the type is an array. Fixed.
30720 ves_icall_MonoMethod_get_base_definition: if the base method
30721 is abstract, get the MethodInfo from the list of methods of
30723 * reflection.c: ParameterInfo.PositionImpl should be zero-based
30724 and it was 1-based. Fixed in mono_param_get_objects.
30726 2003-07-20 Martin Baulig <martin@ximian.com>
30728 * mono-debug.h: Set version number to 31.
30729 (mono_debug_init): Added `MonoDomain *' argument.
30731 * mono-debug-debugger.c: Reworked the type support; explicitly
30732 tell the debugger about builtin types; pass the `klass' address to
30735 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
30737 * image.c: Allow new metadata tables to be loaded without a
30738 warning. Also update the warning message to give the new constant value.
30740 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
30742 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
30743 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
30744 array type representation changes.
30746 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
30748 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
30749 on Environment.Exit () call.
30751 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
30753 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
30754 requires a matching corlib.
30756 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
30758 * Changelog: My editor decided to add a CR to each line. Sorry about that.
30759 Committed again without the CRs.
30761 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
30763 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
30764 getting it from the "this" socket instance. Did not work
30765 if the socket is a subclass of Socket.
30766 Also fixed bug #35371.
30768 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
30770 * metadata.c: fixed size for TypedByRef.
30771 * loader.c: when searching for a method, consider the vararg amrker.
30772 * unicode.c, decimal.c: constify some arrays.
30774 2003-07-15 Dick Porter <dick@ximian.com>
30776 * socket-io.c: Fixed compilation for gcc < 3.2.
30778 Fixed compilation for machines that don't have AF_INET6 (thanks to
30779 Bernie Solomon <bernard@ugsolutions.com> for that part.)
30781 Fixed compile warnings.
30783 Fixed formatting and line endings.
30785 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
30788 * socket-io.c: Added IPv6 support.
30790 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
30792 * class.c (mono_class_is_assignable_from): New function to implement
30793 the is_assignable_from logic. Used by mono_object_isinst,
30794 Type::IsAssignableFrom () and the interpreter.
30796 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
30797 Object, even interfaces.
30799 * object.c (mono_object_isinst): Implement in terms of
30800 is_assignable_from.
30802 * icall.c (ves_icall_type_is_assignable_from): New icall.
30804 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
30806 * domain.c (foreach_domain): fix compiler warning.
30808 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
30810 * image.c (load_metadata_ptrs): use g_strndup because strndup is
30811 not available on all plattforms
30813 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
30815 * image.h image.c: Store the metadata version string in MonoImage.
30816 * icall.c: New icall to retrieve the image version.
30817 * reflection.c (create_dynamic_image): Fill in the image version field
30818 * reflection.c (build_compressed_metadata): Use the image version
30819 from the image structure.
30821 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30823 * appdomain.c: modified comment.
30824 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
30825 That will be its last iteration when mono_gc_cleanup is called from
30826 mono_runtime_cleanup and before the domain is unloaded.
30830 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
30832 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
30835 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
30837 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
30838 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
30839 Bernie Solomon <bernard@ugsolutions.com>.
30841 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
30843 * object.c, object.h: provide mono_object_new_fast() for faster
30844 allocation in some special cases.
30846 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
30848 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
30849 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
30851 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
30853 * threadpool.c: fix leaks.
30855 2003-07-01 Dick Porter <dick@ximian.com>
30857 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
30858 using MonoGHashTables. Fixes threadpool bug posted to list.
30860 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
30862 * image.h, image.c: added support to load an assembly from a byte array.
30863 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
30864 assembly bundle support.
30866 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
30868 * threadpool.c (mono_thread_pool_add): keep a reference to the
30869 AsyncResult to prevent GC
30871 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
30873 * class.c: leak fix.
30875 2003-06-25 Dick Porter <dick@ximian.com>
30877 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
30878 for the async object, the WaitHandle object will close the handle.
30881 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
30883 * class.c: in mono_array_class_get (), lookup from the hash with the
30884 same type we insert: this works around a bug in
30885 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
30886 lluis. The real fix will have to wait for after the release.
30888 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
30890 * icall.c: fix memory leak when getting type members.
30892 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
30894 * reflection.c: added more pubtoken special cases.
30896 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
30898 * class.c: handle field offset correctly when class size
30899 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
30901 2003-06-20 Martin Baulig <martin@ximian.com>
30903 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
30906 2003-06-20 Martin Baulig <martin@ximian.com>
30908 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
30910 2003-06-20 Martin Baulig <martin@ximian.com>
30912 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
30913 just distinguish between variables in registers and variables at
30914 an offset relative to a register.
30916 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30918 * icall.c: #ifdef out latest changes until mcs is fixed.
30920 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
30922 * icall.c: return members in metadata order.
30924 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
30926 * icall.c: avoid infinite loop in GetTimeZoneData.
30928 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
30930 * icall.c: added Marshal.Prelink/All icalls.
30932 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
30934 * object.c, object.h: fix warnings and do some overflow checking
30935 when creating arrays.
30937 2003-06-17 Dick Porter <dick@ximian.com>
30940 * file-io.c: File attributes need to be tweaked slightly when
30941 passed from the managed to the w32 world.
30943 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
30944 * profiler.h profiler-private.h profiler.c: Rework last patch
30945 based on suggestion by Paolo.
30947 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
30949 * profiler.h profiler-private.h profiler.c: Added infrastructure for
30950 instruction level coverage data collection.
30951 * profiler.h profiler.c (: Added new callback function which can be
30952 used by the profiler to limit which functions should have coverage
30954 * profiler.c (mono_profiler_load): Call g_module_build_path to
30955 generate the file name of the profiler library.
30957 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
30959 * profiler.c, profiler.h, profiler-private.h: added basic block
30960 coverage profiling API.
30962 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
30964 * reflection.c (mono_reflection_create_runtime_class): Add support
30965 for events in dynamically generated code.
30967 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
30970 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
30972 * icall.c: when getting timezone info, return reasonable values if we
30973 can't get the actual data.
30975 2003-06-14 Dick Porter <dick@ximian.com>
30977 * threads.c (start_wrapper): Remove the reference to the thread
30978 object in the TLS data, so the thread object can be finalized.
30979 This won't be reached if the thread threw an uncaught exception,
30980 so those thread handles will stay referenced :-( (This is due to
30981 missing support for scanning thread-specific data in the Boehm GC
30982 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
30984 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
30986 * reflection.c: ensure streams and tables are first allocated with
30987 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
30989 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
30991 * icall.c: fixed GetElementType for byrefs (bug# 44792).
30993 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
30995 * reflection.c (mono_reflection_create_runtime_class): Add support for
30996 properties to dynamically created classes.
30997 * reflection.c: Fix a few places where non-MonoObjects were inserted
30998 into the tokens hashtable.
31000 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
31002 * object.c: some support to handle out of memory exceptions.
31004 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
31006 * marshal.c (mono_marshal_get_native_wrapper): support reference
31009 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
31011 * object.h, object.c: more portability stuff from Bernie Solomon.
31012 Unexport mono_object_allocate(). Added mono_object_unbox ().
31013 Set exitcode when an unhandled exception is thrown.
31015 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
31017 * marshal.c (mono_marshal_get_native_wrapper): use custom
31018 marshaler for return types.
31020 2003-06-10 Dick Porter <dick@ximian.com>
31022 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
31023 ip_mreq is available
31025 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
31027 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
31028 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
31029 by Bernie Solomon <bernard@ugsolutions.com>.
31031 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
31033 * gc.c (mono_gc_init): Avoid error message on shutdown when
31034 GC_DONT_GC=1 is used.
31036 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
31037 New icall to return the GUID of a module.
31039 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
31041 * class.c: ensure instance size always includes the parent's size
31042 even whem class size is set explicitly (fixes bug#44294).
31044 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
31046 * profiler.h, profiler.c: made the simple profiler thread-safe,
31047 get more accurate timing info. Allow the loading of an
31048 externally-developed profiler module.
31050 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
31052 * marshal.c (mono_marshal_get_native_wrapper): improved
31053 class/byref arguments.
31054 (mono_marshal_get_native_wrapper): better string marshaling support.
31056 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
31058 * class.c: ensure .pack and .size are handled correctly and
31059 simplified layout of static fields.
31061 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
31064 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
31066 * loader.c (mono_lookup_pinvoke_call): look for modules in the
31067 current directory (fix bug 44008)
31069 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
31071 * marshal.c (mono_marshal_get_native_wrapper): started support for
31073 (mono_delegate_to_ftnptr): consider marshalling specifications
31075 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
31077 * reflection.c, reflection.h: emit custom marshal info.
31079 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31081 * object.c: free the GError.
31082 * icall.c: added CloseEvent_internal.
31084 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
31087 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
31089 * loader.c (mono_method_get_signature): Add support for dynamic
31092 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
31094 * reflection.c: fixed bug #43905.
31096 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
31098 * class.c, domain.c, icall.c, metadata.h, object.h: support for
31099 handling TypedReference and ArgIterator.
31100 * loader.c, loader.h: added function to get signature at call site.
31102 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
31104 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
31105 data readonly. Buglets and warning fixes. Some MethodSpec support.
31107 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
31109 * class.h, class.c, object.c: remove relative numbering support.
31111 2003-05-26 Miguel de Icaza <miguel@ximian.com>
31113 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
31114 free the string, until we get a chance to fix Gtk#
31116 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31118 * marshal.c: revert last patch.
31120 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
31122 * icall.c: updates for new mono_class_vtable() not calling
31123 the type constructor anymore.
31125 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
31127 * object.h, object.c: separate vtable creation from type
31128 initialization. Make running the .cctor thread safe.
31130 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
31132 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
31134 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
31136 * loader.c (mono_get_method): consider calling convention
31138 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
31140 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
31141 to return the invisible global type for a module.
31143 * reflection.c (mono_image_build_metadata): Emit global fields too.
31145 2003-05-20 Peter Williams <peterw@ximian.com>
31147 * loader.c (mono_lookup_internal_call): Add a few newlines.
31149 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
31151 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
31154 * appdomain.c (set_domain_search_path): Recalculate search path when
31155 AppDomainSetup.PrivateBinPath changes.
31157 * object.c (mono_class_compute_gc_descriptor): It turns out some
31158 parts of the class libs (like System.Thread) holds pointers to
31159 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
31160 to treat native int a pointer type here.
31162 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
31164 * appdomain.h, domain.c: add hashtable for jump target resolution.
31166 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
31168 * reflection.h reflection.c icall.c: Added new icalls
31169 GetManifestResourceInfoInternal, GetModulesInternal and support
31172 2003-05-16 Dick Porter <dick@ximian.com>
31176 * file-io.c: Implement System.IO.MonoIO::GetTempPath
31178 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
31180 * object.c: mono_store_remote_field: little fix to previous patch.
31182 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
31184 * class.c: add constructors to array classes.
31185 * icall.c: special case array construction for InternalInvoke (),
31187 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
31189 * class.h class.c reflection.c object.c: Added support for field
31190 defaults in dynamically generated classes.
31192 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
31194 * reflection.c: properly encode charset for ddlimport.
31196 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
31198 * threads.c: allow compiling without GC.
31200 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
31202 * appdomain.h, object.c, object.h, threads.c, threads.h: added
31203 handling of thread static data.
31205 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
31207 * reflection.h, reflection.c: added mono_custom_attrs_free ().
31209 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
31211 * class.c (mono_array_class_get): always set the serializable flags
31212 (mono_array_class_get): always set the SEALED attribute for array types
31214 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
31216 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
31217 attributes (fix for bug 42021).
31219 2003-05-12 Dick Porter <dick@ximian.com>
31221 * gc.c: Don't run finalizers when the finalizer thread is
31222 finishing up, because the default domain has already been
31225 2003-05-11 Miguel de Icaza <miguel@ximian.com>
31227 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
31228 value is null, we should throw an exception. This is slightly
31229 different than the other conventions used for the constructor.
31231 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31233 * socket-io.c: fixed windows build.
31235 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31237 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
31239 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
31241 * object.c (mono_string_new_wrapper): Compatibility fix for MS
31244 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
31246 * class.c (mono_class_layout_fields): Add experimental GC aware
31247 auto layout facility. Requires class library changes to work correctly.
31249 (mono_class_setup_vtable): Avoid overriding explicit interface
31250 method implementations. Fixes iface3.exe test.
31252 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
31254 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
31255 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
31257 * metadata.h: Add new type classification macro which determines
31258 whenever the type holds an object reference.
31260 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
31262 * marshal.c (mono_marshal_get_native_wrapper): cleanups
31264 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
31266 * gc.c (finalizer_thread): Work around a GC bug.
31268 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
31270 * marshal.c (emit_struct_conv): allow unions
31272 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
31274 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
31276 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
31278 2003-05-06 Martin Baulig <martin@ximian.com>
31280 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
31282 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31285 (Select_internal): allow NULLs, don't create arrays if not needed.
31286 Coupled with Socket.cs changes.
31289 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
31290 register a finalizer for it that will close the semaphore handle. This
31291 fixes the leak and make Lupus' test run with > 4080 loops.
31293 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
31295 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
31296 Jerome Laban (bug #42287)
31298 2003-05-02 Martin Baulig <martin@ximian.com>
31300 * debug-mono-symfile.h
31301 (MonoSymbolFile): Moved declaration into mono-debug.h.
31302 (MonoDebugMethodJitInfo): Likewise.
31303 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
31305 (_mono_debug_address_from_il_offset): Take a
31306 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
31309 (MonoDebugDomainData): New struct.
31310 (mono_debug_get_domain_data): New function.
31311 (mono_debug_add_method): Take an additional `MonoDomain *'
31313 (mono_debug_source_location_from_address): Likewise.
31314 (mono_debug_il_offset_from_address): Likewise.
31315 (mono_debug_address_from_il_offset): Likewise.
31317 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
31319 * reflection.c: one more check for null type in custom attrs.
31321 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31323 * reflection.c: avoid warning (comparison is always false due to limited
31324 range of data type).
31326 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31328 * icall.c: throw an exception in Type.GetField if the argument 'name'
31331 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
31333 * reflection.c: fixed handling of enums in named arguments to custom
31334 attributes (bug #42123).
31336 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
31338 * reflection.c: use the right array element type and handle
31339 a null for a Type argument, too.
31341 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
31343 * reflection.c: handle arrays as arguments to custom attributes.
31345 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
31347 * reflection.c: handle a string value in a custom attr
31348 ctor that takes an object.
31350 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
31352 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
31355 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
31357 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
31359 2003-04-27 Martin Baulig <martin@ximian.com>
31361 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
31362 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
31363 MONO_DEBUGGER_EVENT_BREAKPOINT.
31364 (mono_breakpoint_trampoline_code): Removed.
31365 (mono_debugger_event_handler): The last argument is now a
31367 (mono_debugger_insert_breakpoint_full): Removed the
31368 `use_trampoline' argument.
31369 (mono_debugger_method_has_breakpoint): Likewise.
31370 (mono_debugger_trampoline_breakpoint_callback): Renamed to
31371 mono_debugger_breakpoint_callback(); take the method and
31372 breakpoint number as arguments.
31374 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
31376 * metadata.c: fix off by one when loading parameters attributes.
31378 2003-04-24 Martin Baulig <martin@ximian.com>
31380 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
31382 2003-04-24 Martin Baulig <martin@ximian.com>
31384 * mono-debug-debugger.c: Moved all code which interacts with the
31385 Mono Debugger here.
31387 * debug-mono-symfile.c: This code now just deals with the symbol
31388 file itself, the debugger code is now in mono-debug-debugger.c.
31390 2003-04-23 Martin Baulig <martin@ximian.com>
31392 * mono-debug.c (mono_debug_source_location_from_il_offset):
31393 New method; like mono_debug_source_location_from_address(), but
31394 takes an IL offset instead of a machine address.
31396 2003-04-23 Martin Baulig <martin@ximian.com>
31398 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
31399 `line' field; this is now computed by the debugger.
31401 2003-04-23 Martin Baulig <martin@ximian.com>
31403 * mono-debug.[ch]: New files. This is the new debugging interface.
31405 * mono-debug-debugger.[ch]: New files. Moved all code which
31406 interacts with the Mono Debugger here.
31408 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
31410 * domain.c (mono_init): initialize mono_defaults.monitor_class
31412 2003-04-21 Miguel de Icaza <miguel@ximian.com>
31414 * reflection.c (method_encode_code): Add a spicy exception to help
31415 future compiler authors.
31417 2003-04-21 Martin Baulig <martin@ximian.com>
31420 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
31421 Make this work with relative pathnames; g_filename_to_uri() needs
31422 an absolute filename.
31424 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
31426 * icall.c: Track name changes in Object and ValueType.
31428 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
31430 * metadata.c (mono_type_stack_size): size should be a multiple of
31433 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31436 (internal_domain_finalize): moved into mono_domain_finalize. No need
31437 to create another thread because the finalizers will be run in the
31440 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
31441 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
31442 to be run (MS does this too).
31444 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
31446 * object.c (mono_class_compute_gc_descriptor): Update comment.
31448 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
31450 * image.h: Add synchronized wrapper cache.
31452 * image.c (do_mono_image_open): Initialize cache.
31454 * reflection.c (create_dynamic_mono_image): Initialize cache.
31456 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31458 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
31459 ves_icall_System_Buffer_ByteLengthInternal.
31461 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
31463 * reflection.c: setup klass->nested_in earlier. Allow
31464 a dash in the assembly name.
31466 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
31468 * metadata.c (mono_type_to_unmanaged): dont access
31469 type->data.klass for MONO_TYPE_OBJECT
31470 (mono_type_to_unmanaged): consider System.Delegate class
31472 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
31474 * class.c: just setup supertypes in the proper place instead of
31475 initializing the full element class for arrays.
31477 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
31479 * class.c: ensure the element class of arrays is initialized.
31480 Setup the supertype info for array classes, too.
31482 2003-04-14 Miguel de Icaza <miguel@ximian.com>
31484 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
31486 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31488 * Makefile.am: re-added -m option when running cygpath. This way,
31489 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
31491 * mono-config.c: same codepath for locating mono config file for WIN32
31493 * assembly.c: if mono_assembly_setrootdir is called, don't override
31496 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31498 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
31499 MONO_ASSEMBLIES variable.
31501 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
31503 * icall.c: added Assembly::GetNamespaces() icall.
31505 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31507 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
31509 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
31511 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
31512 * object.c: fixed bug in the construction of vtable for proxies
31514 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
31516 * object.c (mono_array_new): Mark mono_array_new as an icall.
31518 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31520 * class.c: fixed test for public method when overriding interfaces.
31523 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
31525 * appdomain.h, domain.c: added mono_domain_foreach() to
31526 be able to access the currently loaded appdomains.
31527 * object.c: make string interning work across sppdomains.
31528 Mark some functions for use as icalls.
31530 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
31532 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
31534 * reflection.h reflection.c: Allocate long living data using
31535 GC_MALLOC_ATOMIC so the collector does not need to scan it.
31537 * reflection.c: Double the allocation size in streams instead of
31538 increasing it, to prevent unneccesary copying on large assemblies.
31540 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
31541 creation if the assembly does not have the Run flag set.
31543 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
31545 * class.h: avoid the C++ keywords in header files (Jerome Laban
31546 spotted and fixed this).
31548 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31551 (mono_unhandled_exception): fill in the arguments for the
31552 UnhandledException event. Only trigger that event for the default
31553 domain (as MS does).
31555 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
31557 * object.c: Improve typed allocation stuff based on suggestions from
31558 Paolo. Also turn it on if the GC library supports it.
31560 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
31562 * object.c object.h class.h: Added experimental typed allocation
31563 facility using the interfaces in gc_gcj.h.
31565 * os/gc_wrapper.h: Added new include files.
31567 2003-04-03 Martin Baulig <martin@ximian.com>
31569 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
31570 which is not yet enabled by default.
31572 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
31574 (mono_gc_lock, mono_gc_unlock): New static functions.
31576 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
31577 functions; stop/start the world for the garbage collector. This
31578 is using the windows API; we need to complete the SuspendThread()/
31579 ResumeThread() implementation in the io-layer to make this work on Unix.
31580 (mono_gc_push_all_stacks): New public function; tells the garbage
31581 collector about the stack pointers from all managed threads.
31583 2003-04-03 Martin Baulig <martin@ximian.com>
31585 * object.h (MonoThread): Added `gpointer stack_ptr'.
31587 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
31589 2003-04-03 Martin Baulig <martin@ximian.com>
31591 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
31593 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
31595 * reflection.c (typebuilder_setup_fields): Initialize field.first and
31598 2003-04-02 Miguel de Icaza <miguel@ximian.com>
31600 * loader.c (mono_lookup_internal_call): Report the corlib that is
31603 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
31605 * icall.c (ves_icall_type_GetTypeCode): fixed check for
31606 System.DBNull (it's class not valuetype).
31608 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
31610 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
31611 if the array method was already assigned a token (fixes bug#40646).
31613 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
31615 * reflection.c (mono_reflection_get_type): Attempt type resolve even
31616 if no assembly is given.
31618 2003-04-01 Miguel de Icaza <miguel@ximian.com>
31620 * metadata.h: Added the new tables.
31622 * row-indexes.h: Added definitions for new tables.
31624 * metadata.c: Add schemas for new tables, and add support for
31625 computing the sizes of them.
31627 * class.c: Update for handling the new type cases.
31629 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
31631 * metadata.h (MONO_TYPE_IS_VOID): new macro
31633 2003-03-31 Martin Baulig <martin@ximian.com>
31635 * threads.h (MonoThreadCallbacks): Added `thread_created'.
31637 * threads.c (mono_thread_new_init): Call `thread_created' in the
31638 mono_thread_callbacks.
31640 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
31642 * loader.h: added marshalbyrefobject_class to mono_defaults
31643 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
31644 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
31645 generation of output parameters.
31646 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
31647 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
31648 contextbound and the target object belongs to the context of the caller.
31649 * object.h: added context and unwrapped_server variables in MonoRealProxy.
31650 * object.c: Implemented support for interfaces and abstract classes
31651 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
31652 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
31654 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
31656 * class.h class.c (mono_class_is_subclass_of): New function.
31658 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
31659 routines for most common case (calls from ArrayList::ToArray).
31661 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
31662 routine so programs which call Environment::Exit() can be profiled.
31664 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
31665 Added MONO_ARCH_SAVE_REGS.
31667 * icall.c (ves_icall_type_is_subtype_of): Use new function.
31669 2003-03-29 Miguel de Icaza <miguel@ximian.com>
31671 * blob.h: Add a couple of new MonoType types definitions.
31673 * tabledefs.h: Add a couple of new call convs.
31675 2003-03-27 Zoltan Varga <vargaz@freemail.h>
31677 * reflection.h (MonoReflectionDynamicAssembly): track changes in
31678 the layout of the class.
31680 * reflection.c (alloc_table): double the size on overflow to avoid
31681 unnecessary copying.
31683 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
31684 avoid filling out metadata tables and blobs. Also set mb->ilgen to
31685 null so it can be garbage collected.
31687 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
31689 * reflection.c (mono_reflection_get_type): Return the resolved type
31690 only if it is in the assembly we searched.
31692 * reflection.c (ensure_runtime_vtable): Initialize method slots.
31694 * class.c (mono_class_setup_vtable): Set the slot of the overriding
31697 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31700 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
31701 the right one is 'file:///blah', but MS allows it.
31703 (mono_assembly_open): allow 'file://blah'
31705 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
31707 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
31709 * socket-io.c: fixes bug #40310.
31711 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
31713 * reflection.c (mono_reflection_parse_type): handle deeply nested
31716 * reflection.c (mono_image_create_token): Use unique token values
31717 since they will be put into a hash table.
31719 * class.c (mono_class_setup_vtable): If a method occurs in more than
31720 one place in the vtable, and it gets overriden, then change the
31721 other occurances too.
31723 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
31724 object as return type.
31726 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
31728 * icall.c: Deleted "ToString" implementation for double and float
31729 because they are full implemented in managed code.
31731 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
31733 * reflection.c, reflection.h: implemented and exported functions
31734 to retrieve info about custom attributes.
31736 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31738 * appdomain.c: moved Uri handling to assembly.c
31739 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
31740 work when using a file Uri in *nix and windows.
31742 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
31743 GetReferencedAssemblies.
31745 2003-03-18 Dick Porter <dick@ximian.com>
31747 * icall.c: Rename a couple of internal calls
31749 * threads.c: Set the thread state to Stopped when a thread exits.
31752 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
31754 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
31757 * object.c (mono_class_vtable): fix warning.
31759 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
31761 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
31763 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
31765 (method_encode_clauses): Create exception info structures in the right
31767 (mono_reflection_setup_internal_class): Initialize supertypes field.
31769 * class.c object.c: Handle interfaces which implement other interfaces
31772 * class.h class.c: Move the supertypes array initialization code into
31773 a separate function so it can be used for dynamic types too. Also call
31774 it earlier, in mono_class_init(), since it can be used before the
31775 type is initialized.
31777 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31781 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
31786 * object.c: remove warnings.
31788 2003-03-13 Martin Baulig <martin@ximian.com>
31790 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
31791 (MonoDebugLexicalBlockEntry): New types.
31793 * debug-mono-symfile.c
31794 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
31796 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31798 * process.c: ret can be any non-zero value accroding to MS doc.
31800 2003-03-07 Miguel de Icaza <miguel@ximian.com>
31802 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
31803 fixing a warning for a miss-used prototype, would have cause
31804 random memory corruption.
31806 2003-03-07 Martin Baulig <martin@ximian.com>
31808 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
31809 getting really annoying ....
31811 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
31813 * reflection.c (fixup_method): added support for array methods.
31815 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
31817 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
31818 (pointed out by Michael Adams).
31820 2003-03-04 Dick Porter <dick@ximian.com>
31822 * icall.c: Temporarily reverted the Double and Single ToString()
31823 change, because it broke nunit.
31825 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
31827 * object.h, threads.h: make include files compatible with C++
31828 (patch by Jerome Laban <jlaban@wanadoo.fr>).
31830 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
31832 * icall.c: Erased ToString helper functions for Double and Single.
31833 Now, that implementations ar all in managed code (Double and Single
31836 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
31838 * appdomain.c: Added method for initializing the default context of
31839 a domain. Added internal call for getting the default context.
31840 * appdomain.h: Added context variable in MonoDomain struct.
31841 * domain.c: mono_domain_set also sets the default context of the domain
31842 * icall.c: Mapped internal method InternalGetDefaultContext.
31843 * object.c: mono_object_get_virtual_method returns always a remoting
31844 wrapper if the object is a transparent proxy.
31845 mono_runtime_invoke_array: when creating an object by calling the
31846 constructor, if the created object is a proxy, then the constructor should
31847 be called using the a remoting wrapper.
31849 2003-03-03 Dick Porter <dick@ximian.com>
31851 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
31852 variable so it compiles on solaris. Problem spotted by
31853 Christopher Taylor <ct@cs.clemson.edu>
31855 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31858 (get_info_from_assembly_name): don't leak value.
31861 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
31864 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
31866 * assembly.c: export mono_image_load_references ().
31867 * class.c: handle function pointers. mono_class_from_name() now
31868 supports nested type names directly.
31870 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
31872 * reflection.h reflection.c: Encode already created dynamic methods
31873 and fields correctly as a DEF instead of a REF.
31875 * reflection.c: Get rid of the force_ref argument to
31876 mono_image_typedef_or_ref since it was wrong in the first place.
31878 * string-icalls.c: add error checking to string constructors according
31881 * reflection.c: Emit types in the order their TypeBuilders were
31882 created. Previously, a new table index was assigned to each type before
31883 the tables were emitted. This was wrong because the signature blob
31884 might already refer to a type by its original table index.
31886 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
31888 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
31891 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31893 * Makefile.am: make assemblies dir have \ instead of / on windows.
31895 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
31897 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
31898 iterate over the NESTEDCLASS table using a linear search since the
31899 table is not guaranteed to be sorted by the secondary key.
31901 * class.c (mono_class_create_from_typedef): fixed up call to
31902 mono_metadata_nesting_typedef.
31904 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
31906 * marshal.c (mono_string_to_byvalstr): clear the memory as
31907 suggested by Jerome Laban <jlaban@wanadoo.fr>
31909 2003-02-26 Dick Porter <dick@ximian.com>
31911 * process.c: Cope with padding in .rsrc blocks
31913 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
31915 * metadata.h: reverted the filter_len change, it breaks reflection
31917 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
31919 * metadata.h: added a new field to store the filter_len
31922 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
31924 * reflection.c: handle custom attributes for types and members
31925 created with Reflection.Emit (bug#38422).
31927 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
31929 * reflection.c: define RTSpecialName automatically for constructors for
31930 compatibility with MS.NET.
31932 * reflection.c (mono_reflection_create_runtime_class): initialize
31933 nested_in field of dynamically created classes.
31935 2003-02-22 Martin Baulig <martin@ximian.com>
31937 * debug-mono-symfile.h: Incremented version number.
31939 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
31941 * object.h icall.c process.c: fix warnings.
31943 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
31945 * appdomain.h appdomain.c:
31946 (mono_domain_try_type_resolve): split the
31947 name_or_tb argument into a name and a tb argument.
31948 (mono_domain_has_type_resolve): new function to check whenever the
31949 application has registered a TypeResolve event handler.
31951 * icall.c reflection.h reflection.c: move the type resolve logic into
31952 mono_reflection_get_type () so it will be invoked when
31953 Assembly::GetType () is called.
31956 (mono_reflection_get_type): renamed to get_type_internal.
31957 (mono_reflection_get_type): fixed type name generation so it works
31958 for nested types too.
31959 (mono_reflection_get_type): call has_type_resolve () to avoid the
31960 costly type name generation if there is no resolve event handler.
31962 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
31964 * class.c, image.c: load exported types from file references.
31966 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
31968 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
31969 used to cache the managed methods used to create proxies and make
31970 remote invocation of methods.
31971 * class.h: Added in MonoVTable a flag to indicate that a class needs
31972 to be remotely created.
31973 * object.c: Modified the method mono_class_vtable(). It now initializes
31974 the remote flag of the vtable. Modified mono_object_new_specific(),
31975 so now it checks the remote flag.
31976 * icall.c: Added a couple of internal methods, one for enabling instance
31977 creation interception for a type, and one for creating objects bypassing
31980 2003-02-18 Martin Baulig <martin@ximian.com>
31982 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
31983 New interncall to get a method's metadata token.
31985 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
31986 New interncall for the debugger.
31988 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
31990 * class.c (mono_class_setup_vtable): allocate supertype array
31992 2003-02-18 Martin Baulig <martin@ximian.com>
31994 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
31996 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31999 (assembly_name_to_aname): jump over unknown properties (i've found
32000 something like: 'type, assembly, version=xxx, custom=null, public...',
32001 so now will ignore custom=null and still get the rest of the values).
32003 2003-02-17 Dick Porter <dick@ximian.com>
32005 * threads.c: Have Thread.Start() wait for a semaphore to signal
32006 that the thread has set up all its local data. This fixes bug
32007 34323, where Abort() raced the new thread's TLS data.
32009 Also removes the handle_store() call from start_wrapper, because
32010 threads are now always created suspended and there is no longer a
32011 race between the parent and child threads to store the info.
32013 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
32015 * image.c: explain the #- heap issue in a message, hopefully
32016 avoiding FAQs on mono-list.
32018 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32021 (GetEntryAssembly): if the domain has not invoked
32022 AppDomain.ExecuteAssembly yet, return the assembly of the default
32025 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
32027 * class.c (mono_ldtoken): make it work in dynamic assemblies.
32029 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
32031 * metadata.c, reflection.c: simple speedup to type hash
32034 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
32036 * image.c, image.h, class.c, assembly.c: move module loading
32037 to MonoImage. When loading metadata, consider alignemnet from
32038 the start of metadata, not from the metadata address in memory.
32040 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
32042 * reflection.c (mono_reflection_get_custom_attrs): Added support for
32043 AssemblyBuilder objects. Factored out custom attribute creation into
32044 a separate function.
32045 (create_custom_attr): new function to create custom attributes.
32047 2003-02-12 Miguel de Icaza <miguel@ximian.com>
32049 * Makefile.am: Got tired of typing the full pathname to pedump.
32050 Until there is another option, am installing this.
32052 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
32054 * class.c (class_compute_field_layout): always set field->parent
32055 (mono_ldtoken): use mono_defaults.fieldhandle_class;
32057 2003-02-11 Dick Porter <dick@ximian.com>
32060 * monitor.c: Rewrote Monitor, making lock much faster and
32061 Pulse/Wait work as specified. Also uses much fewer handles, and only
32062 creates them as needed.
32064 * exception.c: Added SynchronizationLockException
32066 * threads.c: Deleted old Monitor implementation. The new one is
32069 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
32071 * class.c: handled TypedReference type code. Set the correct size for
32072 class data. Setup interface_offsets for interface classes, too.
32074 2003-02-09 Martin Baulig <martin@ximian.com>
32076 * debug-mono-symfile.h: Reflect latest symbol writer changes.
32078 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
32080 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
32081 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
32082 * object.c: fixed mono_object_get_virtual_method () for interfaces.
32083 * verify.c: check for code that runs after the end of the method.
32085 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
32087 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
32088 "System.Math::Round2".
32089 * sysmath.h: Added Floor, Round and Round2 definitions.
32090 * sysmath.c: Modified certain functions that were not 100% compliant
32091 with MS.NET (math precision) and added the implementation of Floor,
32094 2003-02-07 Martin Baulig <martin@ximian.com>
32096 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
32098 2003-02-07 Martin Baulig <martin@ximian.com>
32100 * debug-mono-symfile.c: Reflected latest symwriter changes.
32101 (mono_debug_create_mono_symbol_file): Removed.
32102 (mono_debug_open_mono_symbol_file): Take an argument which
32103 specifies whether to create a dynamic symbol file.
32105 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
32107 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
32109 2003-02-05 Martin Baulig <martin@ximian.com>
32111 * reflection.c (mono_image_build_metadata): Make this public,
32112 protect it against being called multiple times, don't create
32113 resources and don't build the compressed metadata here.
32114 (mono_image_create_pefile): Do this here.
32117 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
32119 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32121 * socket-io.c: fixed bug #36322.
32123 2003-02-06 Piers Haken <piersh@friskit.com>
32127 * debug-mono-symfile.c:
32133 * socket-io.c: warning cleanups
32135 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
32137 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
32138 function. works like remoting invoke, but does a check for the Proxy first.
32140 2003-02-05 Miguel de Icaza <miguel@ximian.com>
32142 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
32144 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
32146 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
32148 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
32149 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
32151 * object.c (mono_store_remote_field_new): used by the new jit
32152 instead of mono_store_remote_field
32153 (mono_load_remote_field_new): used by the new jit
32154 instead of mono_load_remote_field
32156 2003-02-05 Patrik Torstensson
32158 * appdomain.c: changed unload to take the domain id instead
32161 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
32164 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32166 * appdomain.c: don't look for assemblies in ApplicationBase if
32167 PrivateBinPathProbe is set.
32169 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32171 * object.c: make the first argument in main_args contain the absolute
32172 path to the assembly. Fixes bug #37511.
32174 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32176 * icall.c: get correct UTC offset for countries not using daylight
32177 time saving. Fixes bug #30030.
32179 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32181 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
32182 and 1 are the family).
32184 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
32186 * icall.c (ves_icall_InternalExecute): removed wrong assertion
32188 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
32190 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
32192 * reflection.c: added support for SignatureHelper tokens, which is
32193 needed by the Calli opcode.
32195 * reflection.h: track changes to SignatureHelper class.
32197 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
32199 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32201 * appdomain.c: fixed loading assemblies from PrivateBinPath.
32203 2003-02-03 Patrik Torstensson
32204 * appdomain.[c|h], domain.c :
32205 - Added support for getting a domain via domain id
32206 - Support for setting and getting domain from System.AppDomain
32207 (used in cross appdomain channel)
32208 - Added support for get/set for a MonoAppContext on a thread
32209 (Context class in System.Runtime.Remoting.Contexts),
32210 - Removed hack in Get/SetData and ExecuteAssembly.
32212 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
32213 the managed world to get control when a proxy is created.
32215 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
32217 2003-02-03 Miguel de Icaza <miguel@ximian.com>
32220 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
32221 Populate the codebase field as well.
32223 2003-02-02 Martin Baulig <martin@ximian.com>
32225 * debug-mono-symfile.c
32226 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
32227 (mono_debug_symfile_add_method): Allow interncalls.
32229 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32231 * icall.c: throw parse exception if strtod fails or the string is empty.
32233 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
32235 * marshal.c: handle object type separately from defined
32238 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
32240 * marshal.c: handle NATIVE_LPSTR for strings when it's
32241 explicitly specified.
32243 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
32245 * reflection.c, reflection.h, icall.c: setup the reflection
32246 handle cache for ModuleBuilders and AssemblyBuilders.
32248 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
32250 * reflection.c (reflection_methodbuilder_to_mono_method): set
32253 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32255 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
32257 2003-01-29 Dick Porter <dick@ximian.com>
32259 * threads.c: No need for the fake_thread kludge now that Thread
32260 doesn't run a class constructor
32262 2003-01-29 Dick Porter <dick@ximian.com>
32264 * threads.c: Use g_direct_hash instead of the rather bogus
32267 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
32269 * marshal.c (mono_marshal_get_native_wrapper): add check for null
32270 (fix pinvoke12.exe)
32271 (mono_marshal_get_struct_to_ptr): generate valid IL code
32272 (mono_marshal_get_ptr_to_struct): generate valid IL code
32273 (*): correctly set sig->pinvoke, we need to memdup the signature
32276 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
32278 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
32279 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
32281 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
32283 * profiler.c: provide more callers information.
32285 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
32287 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
32289 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
32291 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
32293 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32295 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
32296 exception instead of going into an infinite loop on dates which it
32299 * string-icalls.c (ves_icall_System_String_get_Chars): raise
32300 out-of-range exception if needed.
32302 * class.c (mono_class_setup_vtable): allow a virtual method to provide
32303 an implementation for an interface method and to override an inherited
32304 method at the same time.
32305 Imagine a scenario when a virtual method is used to override a
32306 virtual abstract method in a parent class, and this same method
32307 provides an implementation for an method inherited from an interface.
32308 In this case, the interface resolution code will set im->slot, which
32309 means that the virtual method override pass will skip this method
32310 which means a pointer to the abstract method inherited from the parent
32311 will remain in the vtable of this non-abstract class.
32313 * class.c: (mono_class_setup_vtable): continue search for a real
32314 method if only an abstract method is found.
32316 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
32318 * reflection.c: add size to encoding for ByValStr and ByValArray
32319 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
32321 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32323 * class.c (mono_class_setup_vtable): pass the override info as an
32326 * class.c (mono_class_setup_vtable): set the slot of overriding methods
32329 * reflection.c (ensure_runtime_vtable); add support for method
32332 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32334 * reflection.c (resolution_scope_from_image): Hack to work to work with
32335 dynamic assemblies.
32337 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
32338 added a 'force_ref' argument to force this function to allways return
32339 a TypeRef. This is needed by mono_image_get_memberref_token ().
32341 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32343 * reflection.c (mono_image_get_type_info): interfaces really don't have
32346 * reflection.c (mono_image_basic_init): fill out missing fields of
32349 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
32350 dynamic assemblies. This is required so dynamic assemblies show up in
32351 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
32352 Type::GetType() etc. This is consistent with MS behaviour.
32354 * image.c image.h reflection.c: add newly created classes to the name
32355 cache so mono_class_get () will find them.
32357 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32359 First part of changes to get IKVM.NET running under mono.
32361 * appdomain.h, appdomain.c: added new function
32362 mono_domain_try_type_resolve() which will emit TypeResolve events.
32363 This function will call AppDomain::DoTypeResolve to do the actual work.
32365 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
32366 moved existing code dealing with dynamic tokens to a new function
32367 called mono_reflection_lookup_dynamic_token (). This function will
32368 raise TypeResolve events when appropriate. Since reflection.c is not
32369 part of libmetadata, a new hook function called
32370 mono_lookup_dynamic_token() is added to class.c which will call this.
32372 * assembly.h assembly.c: make the invoke_load_hook function public,
32373 so it can be called for dynamic assemblies.
32375 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
32377 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
32380 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
32381 MonoGHashTable, since it contains pointers to objects which the GC
32384 * assembly.c (search_loaded): remove unused variable.
32386 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
32388 * object.c: fixed issue exposed by gcc-generated IL programs
32389 that use RVA data for pointers.
32391 2003-01-25 Martin Baulig <martin@ximian.com>
32393 * threads.c (start_wrapper): Moved the initialization of
32394 `start_func' above the mono_new_thread_init() call to which we
32395 pass it as argument.
32397 2003-01-24 Martin Baulig <martin@ximian.com>
32399 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
32400 the MonoThread pointer.
32402 2003-01-21 Miguel de Icaza <miguel@ximian.com>
32404 * icall.c: Rename `PowImpl' to Pow.
32406 2003-01-23 Dick Porter <dick@ximian.com>
32408 * threads.c (start_wrapper): Create a Thread object if needed, so
32409 the Main() thread can do the class initialisation in a subthread
32410 that has been set up to allow managed code execution.
32412 Pass the thread ID instead of the MonoThread pointer to the thread
32413 start and attach callbacks. This change is required, because the
32414 jit thread start callback must be called _before_ the Thread
32415 object can be created.
32417 (mono_thread_init): Removed much object creation code that is no
32418 longer needed. No managed code is called from here now.
32420 * object.c (mono_runtime_exec_managed_code): Create a subthread
32421 for Main, and call back to the runtime to use it.
32422 Set the exit code when Main exits.
32424 * gc.c: Make sure domain finalisation happens in a subthread.
32425 Re-enable threaded GC, fixing bug 31333 (again).
32427 * environment.c: System.Environment internall calls (so far just
32428 ExitCode is here, the others are still in icall.c)
32430 * appdomain.c (mono_runtime_cleanup): All threads running managed
32431 code should have finished before mono_runtime_cleanup() is
32432 reached, so no need to clean up threads.
32434 2003-01-22 Martin Baulig <martin@ximian.com>
32436 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
32437 `gpointer func' arguments.
32438 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
32439 but added `MonoThread *thread' argument.
32440 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
32442 * threads.c (mono_new_thread_init): Added `gpointer func' argument
32443 and pass it to the mono_thread_start_cb callback.
32444 (mono_install_thread_callbacks): New public function to install a
32445 set of callbacks which are set by the debugger.
32446 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
32448 2003-01-22 Martin Baulig <martin@ximian.com>
32450 * Makefile.am: Install debug-mono-symfile.h.
32452 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
32454 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
32456 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
32458 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
32459 * class.c (mono_ptr_class_get): correctly set access levels of pointers
32460 (mono_array_class_get): correctly set access levels of arrays
32462 2003-01-20 Patrik Torstensson
32463 * image.h (MonoAssemblyName): changed major, minor, build, revision
32464 from signed to unsigned.
32466 2003-01-20 sean kasun <skasun@azstarnet.com>
32468 * reflection.c (load_cattr_value): Now this handles
32469 MONO_TYPE_SZARRAY. Fixes bug #35629
32471 2003-01-20 Miguel de Icaza <miguel@ximian.com>
32473 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
32476 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32478 * decimal.c: fixed bug #26056.
32480 2003-01-17 Martin Baulig <martin@ximian.com>
32482 * gc.c: Raise an ExecutionEngineException instead of using g_error().
32484 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32487 (mono_get_exception_type_initialization): new function.
32489 * object.c: throw a TypeInitializationException when an exception is
32490 thrown invoking the class constructor.
32492 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32494 * reflection.c: fixed attribute reading.
32496 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32499 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
32500 provided, look for the type in the calling assembly and then in
32501 mscorlib; if the assembly name is provided, only try that one.
32503 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
32505 * object.c: register the vtable before there is a chance it's
32506 queried again recursively.
32508 2003-01-13 Duncan Mak <duncan@ximian.com>
32510 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
32513 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
32515 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
32517 2003-01-11 Martin Baulig <martin@ximian.com>
32519 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
32520 this to 20 for the release.
32522 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
32524 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
32526 * loader.c (mono_method_get_marshal_info): bug fix
32528 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
32529 structures with explicit layout
32531 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
32533 * profiler.c: made the output more readable (and sorted).
32534 Added caller information for the allocation profiler.
32536 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
32538 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
32540 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32542 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
32543 to get value types.
32545 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
32547 * object.c, profiler.h, profiler.c, profiler-private.h:
32548 Added object allocation profiler.
32550 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
32552 * reflection.h, reflection.c: handle global methods.
32553 Compress blob entries.
32555 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
32557 * marshal.c: fix compilation.
32559 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
32561 * loader.c (mono_method_get_marshal_info): impl.
32563 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
32565 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32567 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
32568 for reference types.
32570 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
32572 * loader.c: fixed off by one error in loaded parameter names.
32574 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
32576 * marshal.c (mono_marshal_get_icall_wrapper): like
32577 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
32578 instead of a MonoMethod.
32580 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32582 * decimal.c: fixed bug #36537.
32584 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
32586 * marshal.c: throw a missing method exception if a
32587 P/Invoke method is not found.
32589 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
32591 * icall.c: allow a null this for constructors.
32593 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
32595 * icall.c: raise the proper exceptions if the arguments to the
32596 internal Invoke are incorrect.
32598 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
32600 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
32602 2003-01-03 Martin Baulig <martin@ximian.com>
32604 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
32606 2002-12-31 Martin Baulig <martin@ximian.com>
32608 * debug-mono-symfile.c: Completely rewrote the type section.
32609 Instead of using individual malloc()ed fields, we use one big
32610 continuous memory area and offsets into this area.
32611 See the comments in the source code for details.
32613 2002-12-30 Martin Baulig <martin@ximian.com>
32615 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
32617 2002-12-30 Martin Baulig <martin@ximian.com>
32619 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
32620 line number table in this data blob instead of using an external
32623 2002-12-28 Martin Baulig <martin@ximian.com>
32625 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
32627 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
32629 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
32630 as a boxed return type.
32632 2002-12-21 Miguel de Icaza <miguel@ximian.com>
32635 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
32636 g_build_filename to properly get separators on the filename created.
32638 * object.h: Small change, introduce MonoMarshalByRefObject to
32639 track the layout of that structure in the C# universe as we make
32642 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
32644 * object.c: removed assert to allow static fields on interfaces.
32645 * loader.c: a TypeSpec may be used for any type, not just arrays.
32647 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32649 * class.c, class.h: added mono_class_array_element_size ().
32650 Ignore static methods in interfaces.
32652 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32654 * threads.c: fixed the build under cygwin.
32656 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
32658 * reflection.c: handle nullref constants. Allocate keys for
32659 reflection handles with the GC.
32661 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32663 * threads.c, threads.h: added mono_thread_get_abort_signal()
32664 to get a suitable signal for thread abort.
32666 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32668 * metadata.c: fix handling of ExportedType table.
32670 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32672 * icall.c: added WriteWindowsDebugString internal call.
32674 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32676 * reflection.h: added fields to match C# implementation.
32678 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32680 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
32682 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
32684 * gc.h, gc-internal.h: Rename header for GC internal calls to
32685 gc-internal.h from gc.h as to not clash with Boehm GC having its
32686 header installed as <gc.h> in outside include paths.
32687 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
32688 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
32690 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32692 * icall.c: assign minor, build and revision in FillName.
32694 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
32696 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
32697 Added support for running code generated by Reflection.Emit.
32699 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32701 * appdomain.c: check for NULL argument in LoadFrom.
32703 2002-12-10 Dick Porter <dick@ximian.com>
32705 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
32707 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32709 * appdomain.c: fix buglet when building exe file name. Handle full
32710 assembly name (needed after latest changes to AssemblyName).
32712 (mono_image_close): free some hashtables.
32714 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
32716 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
32717 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
32718 on some systems (redhat 7.3)
32720 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
32722 * threads.c: delete the critical section of a sync block,
32723 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
32725 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
32727 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
32729 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32731 * appdomain.[ch]: handle the assembly preload event to try loading the
32732 assemblies using the paths we have in the current domain.
32734 * assembly.[ch]: created an assembly preload hook that is called to try
32735 loading the assembly by other means that the ones provided here.
32737 * domain.c: initialize the domain search path.
32739 From now on, assemblies (TODO: except corlib and System) are loaded
32740 according to these rules when using mono_assembly_load ():
32742 1. It tries to load the assembly from the ApplicationBase
32743 of the current domain appending .dll and .exe (TODO: have to
32744 try loading from name/name.dll and name/name.exe).
32746 2. It tries the search path specified in PrivateBinPath for the
32747 current domain (if any).
32749 3. Previous behavior.
32751 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
32753 * icall.c: implemented GetInterfaceMap() related icall.
32754 * domain.c, loader.h: load MethodInfo in mono_defaults.
32756 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32758 * gc.c: disable the finalizer thread for now, untill all the issues
32759 with it are resolved.
32761 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32763 * string-icalls.c: handle embedded nulls in string ctor when the
32764 length is specified.
32766 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
32768 * class.c: look for explicit interface implementation in parent
32771 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
32773 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
32775 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
32777 * gc.c: protect handles with a critical section.
32779 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32782 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
32783 parameters. If no assembly specified, try getting the type from all
32784 the assemblies in the current domain, else, load the assembly and get
32787 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32789 * marshal.c: applied patch from Aleksey Demakov that fixes
32790 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
32792 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32794 * icall.c: fixed get_location.
32796 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
32798 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
32799 declarations to make it work with older gcc.
32801 * loader.c (mono_get_method): set signature->pinvoke for native calls
32803 2002-11-20 Dick Porter <dick@ximian.com>
32805 * threads.c (mono_thread_init): Set the main thread's handle
32807 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
32809 * gc.c: allow compilation without GC support. Changed to match the
32812 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32814 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
32816 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
32818 * reflection.c: set a public key token on the core assemblies.
32820 2002-11-18 Dick Porter <dick@ximian.com>
32822 * threads.c: Split out some thread initialisation so that other
32823 files can set the start callback function.
32825 * gc.c: Run finalisers in a separate thread, to avoid stack
32826 overflow. Fixes bug 31333.
32828 * appdomain.c: Set up GC finalisation thread.
32832 * domain.c: Use gc.h macros for GC_malloc
32834 2002-11-15 Dick Porter <dick@ximian.com>
32838 * appdomain.c: Removed mono_runtime_init_with_attach(),
32839 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
32840 merging the extra parameter with the existing function. Removed
32841 unneeded code in mono_thread_attach().
32843 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
32845 * image.c (mono_image_loaded_by_guid): a method to get loaded
32847 (load_metadata_ptrs): we store the guid as string.
32849 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
32851 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
32853 * metadata.c (mono_guid_to_string): imported method form Zoltan
32854 Varga (slightly modified)
32856 * assembly.c (mono_assembly_open): load precompiled code
32858 * loader.h (MonoMethod): we store the method token for use in the
32861 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32863 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
32864 the hook function called when an assembly is loaded.
32866 * domain.c: Modified file.
32867 (mono_domain_assembly_load): removed hash table insertion of assemblies.
32871 2002-11-07 Miguel de Icaza <miguel@ximian.com>
32873 * reflection.c: Map PEFileKind to the value expected by the WinNT
32876 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32878 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
32879 Read until the buffer is filled completely.
32881 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32883 * icall.c: implemented MonoType.InternalGetEvent ().
32885 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32887 * appdomain.c: implemented InitAppDomainSetup. Delayed
32888 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
32889 the entry_assembly.
32891 * assembly.c: base_dir is now an absolute path ending with
32894 * icall.c: modified get_location according to the above changes.
32896 * object.c: init AppDomain.SetupInformation for the default domain after
32897 we have the entry assembly.
32899 * domain.c: when unloading a domain, setup = NULL.
32901 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
32903 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
32905 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
32907 * object.h, object.c: introduced mono_object_get_virtual_method ()
32908 to lookup the method invoked on an object when a callvirt is done on
32910 * icall.c: make MethodInfo::Invoke() always do a virtual call.
32912 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32914 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
32915 current domain when loaded an assembly and failed to load it.
32917 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
32919 2002-10-31 Dick Porter <dick@ximian.com>
32923 * file-io.c: Return the error status in a parameter, as the
32924 GetLastError() value has long since been blown away if we try and
32925 look it up in a subsequent internal call invocation. Delete the
32926 GetLastError() internal call, because it's useless.
32928 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
32930 * class.[ch]: added cast_class to fix bug 29517
32932 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
32934 * marshal.c: create valid IL code in the filter clause:
32935 the new JIT is less forgiving:-)
32937 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32939 * icall.c: removed get_property internal call.
32941 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
32943 * appdomain.h domain.c: Added an ID to appdomains.
32945 * threads.c threads.h icall.c: Implement icall
32946 Thread:GetDomainID(), and remove unused icall
32947 CurrentThreadDomain_internal.
32949 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32951 * icall.c: Don't recurse through the base types in GetConstructor.
32954 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
32956 * mempool.h, mempool.c: added mono_mempool_empty() and
32957 mono_mempool_stats().
32959 2002-10-23 Dick Porter <dick@ximian.com>
32963 * icall.c: Added MonoIO.GetFileType internal call
32965 2002-10-17 Dick Porter <dick@ximian.com>
32967 * appdomain.c (mono_runtime_cleanup): Don't signal the async
32968 delegate semaphore before waiting for all threads to finish,
32969 because new threads can also call async delegates. Fixes bug
32972 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
32973 of 3 seconds, in case another async job is queued. (This part is
32974 needed because the bug fix reintroduced the 3s exit lag.) This
32975 makes the mono_runtime_shutdown flag superfluous.
32977 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
32979 * reflection.c: include ehader size in method section headers.
32980 Really check for suplicated modules entries.
32982 2002-10-17 Martin Baulig <martin@gnome.org>
32984 * debug-mono-symfile.c: Added back support for locals.
32986 2002-10-14 Martin Baulig <martin@gnome.org>
32988 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
32991 2002-10-14 Martin Baulig <martin@gnome.org>
32993 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
32994 mono_class_get() instead of looking in the class cache.
32996 2002-10-13 Martin Baulig <martin@gnome.org>
32998 * debug-mono-symfile.c: Set version number to 28, include the
32999 signature in method names.
33001 2002-10-13 Martin Baulig <martin@gnome.org>
33003 * debug-mono-symfile.h: Set version number to 27.
33005 2002-10-11 Martin Baulig <martin@gnome.org>
33007 * gc.c: Don't register/unregister NULL pointers as disappearing links.
33009 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
33011 * metadata.c, metadata.h: added helper function to allocate signatures.
33013 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33015 * icall.c: added internal call to get the location of machine.config.
33017 2002-10-08 Martin Baulig <martin@gnome.org>
33019 * debug-mono-symfile.c: Ignore classes with a pending init for the
33022 2002-10-03 Dick Porter <dick@ximian.com>
33024 * threads.c: Freebsd pthread_t is a pointer
33026 2002-10-03 Dick Porter <dick@ximian.com>
33028 * socket-io.c: Implemented GetHostName_internal
33030 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33033 (mono_config_parse_file): don't leak the text.
33035 2002-10-02 Martin Baulig <martin@gnome.org>
33037 * debug-mono-symfile.c: Added support for methods.
33039 2002-10-01 Martin Baulig <martin@gnome.org>
33041 * debug-mono-symfile.c: Don't emit methods and line numbers for
33042 the dynamic symbol file, just write the type table. We can easily
33043 have an external helper program which creates a symbol file for an
33046 2002-10-01 Dick Porter <dick@ximian.com>
33048 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
33049 Only add the handle to the cleanup array when we're about to
33050 launch the thread. Bug 31425 deadlocked when the test was run on
33053 2002-10-01 Martin Baulig <martin@gnome.org>
33055 * debug-mono-symfile.c: Added support for properties.
33057 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
33059 * reflection.c: unaligned store fix from Mark Crichton
33060 <crichton@gimp.org>.
33062 2002-09-27 Martin Baulig <martin@gnome.org>
33064 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
33067 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
33069 * assembly.h, assembly.c: use a sane API to hook into the assembly
33070 loading process instead of a useless special-purpouse hack
33071 (ngen needs a hook, too, for example).
33073 2002-09-27 Dick Porter <dick@ximian.com>
33075 * threads.c (mono_thread_init): Call GetCurrentProcess() so
33076 io-layer can set up some process handle info. Not needed on w32,
33077 but doesn't hurt either.
33079 * process.c: Pass the program name in the second parameter to
33080 CreateProcess, so the path is searched. Include the working
33081 directory. Implemented process name, process enumeration, and some
33082 process detail internal calls.
33084 * icall.c: Added internal calls for process lookup, and some
33087 2002-09-26 Martin Baulig <martin@gnome.org>
33089 * assembly.c (mono_install_open_assembly_hook): New global
33090 function to install a function to be invoked each time a new
33091 assembly is loaded.
33092 (mono_assembly_open): Run this callback function if set.
33094 * debug-mono-symfile.c: Put back line numbers for the dynamic
33095 symbol file and also record the .il file as source file. This
33096 allows us to install the temporary symbol file as `file.dbg' just
33097 like a compiler-generated one.
33099 2002-09-26 Nick Zigarovich <nick@chemlab.org>
33101 * Corrected typo in gc.c (BOHEM vs BOEHM).
33103 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33105 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
33106 GetProperties. Also avoid calling g_slist_length in GetProperties and
33109 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
33111 * reflection.c: avoid unaligned stores (bug spotted by
33112 Mark Crichton <crichton@gimp.org>).
33114 2002-09-25 Martin Baulig <martin@gnome.org>
33116 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
33117 instead of guint64 for addresses and added prologue/epilogue info.
33119 2002-09-25 Martin Baulig <martin@gnome.org>
33121 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
33122 store line number info. For the dynamic symbol file, we only need
33123 to provide the JIT generated dynamic line number info for the dynamic
33126 2002-09-25 Martin Baulig <martin@gnome.org>
33128 * debug-mono-symfile.h: Incremented version number.
33130 2002-09-24 Martin Baulig <martin@gnome.org>
33132 * class.c (mono_debugger_class_init_func): New global function
33134 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
33137 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
33138 function. This is called via the mono_debugger_class_init_func
33139 hook to add all types to the dynamic type table.
33140 (ves_icall_MonoDebugger_GetType): New interncall to get a class
33141 from its metadata token.
33143 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
33144 New interncall for the debugger.
33146 2002-09-24 Nick Drochak <ndrochak@gol.com>
33148 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
33149 before using it in case it is null.
33151 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
33153 * metadata.c: allow custom modifiers in local var signatures
33154 (bug spotted by Zoltan Varga).
33156 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
33158 * class.c: deal with the <Module> class that may have a NULL vtable.
33159 Eliminate warnings.
33161 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
33163 * image.c, image.h: more strong name helpers.
33164 * monosn.c: more work: convert pem keys to cryptoapi format.
33166 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
33168 * string-icalls.c: speedup IndexOf.
33170 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
33172 * icall.c: updates from Zoltan.2.Varga@nokia.com.
33174 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
33176 * icall.c: cleanup: use mono_object_domain ().
33178 2002-09-23 Martin Baulig <martin@gnome.org>
33180 * debug-mono-symfile.c: Improved type support.
33182 2002-09-22 Martin Baulig <martin@gnome.org>
33184 * debug-mono-symfile.c: Added support for reference types and strings.
33186 2002-09-22 Martin Baulig <martin@gnome.org>
33188 * debug-mono-symfile.c: Started to work on the type table.
33190 2002-09-21 Martin Baulig <martin@gnome.org>
33192 * debug-mono-symfile.c: Largely reworked the symbol table format.
33193 The symbol table is now incrementally updated each time a new
33194 method is added. We're now also using our own magic and version
33195 so that you don't need to recompile all your classes if the
33196 dynamic table changes.
33197 (mono_debug_update_mono_symbol_file): Removed.
33198 (mono_debug_symfile_add_method): New function to add a method.
33200 2002-09-21 Martin Baulig <martin@gnome.org>
33203 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
33206 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
33207 New interncall to get a method from its metadata token.
33209 2002-09-21 Martin Baulig <martin@gnome.org>
33211 * debug-mono-symfile.c: Create type table.
33213 2002-09-20 Martin Baulig <martin@gnome.org>
33215 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
33217 2002-09-20 Martin Baulig <martin@gnome.org>
33219 * debug-mono-symfile.c: Provide information about params and locals.
33221 2002-09-20 Martin Baulig <martin@gnome.org>
33223 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
33226 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
33227 interncall to get a method from its metadata token.
33229 2002-09-20 Martin Baulig <martin@gnome.org>
33231 * debug-mono-symfile.c: Added a few checks for method->header
33232 being non-NULL. This should never happen, but for the moment
33233 let's use a g_warning() rather than a g_assert().
33235 2002-09-19 Mark Crichton <crichton@gimp.org>
33237 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
33238 even if support for it isn't present. Added an #ifdef to fix this.
33240 * socket-io.c: Added checks back for Solaris support.
33242 2002-09-19 Martin Baulig <martin@gnome.org>
33244 * debug-mono-symfile.c (read_string, write_string): Reflect latest
33245 changes in the symbol file format.
33247 2002-09-18 Martin Baulig <martin@gnome.org>
33249 * debug-mono-symfile.c: Set version number to 21.
33251 2002-09-18 Dick Porter <dick@ximian.com>
33253 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
33254 on netbsd. Fixes bug 30051.
33256 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33259 (set_version_from_string): little fix.
33261 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
33263 * monosn.c, Makefile.am: added strong name utility.
33264 * reflection.h, reflection.c: implemented delayed signing,
33265 locale, version and hash id assembly attributes.
33267 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
33269 * loader.c, metadata.c: load param attributes in signatures.
33271 2002-09-16 Martin Baulig <martin@gnome.org>
33273 * debug-mono-symfile.c: Added string table with all method names.
33275 2002-09-14 Martin Baulig <martin@gnome.org>
33277 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
33278 fast method lookup.
33280 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
33282 * reflection.c: record the public key token of referenced assemblies.
33284 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
33286 * image.c, image.h: added functions to get the strong name and the
33287 public key of an assembly.
33288 * pedump.c: use them.
33290 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
33292 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
33294 2002-09-12 Miguel de Icaza <miguel@ximian.com>
33296 * marshal.c (mono_marshal_get_managed_wrapper): Added
33299 2002-09-11 Martin Baulig <martin@gnome.org>
33301 * gc.c: Call GC_unregister_disappearing_link() on all links when
33302 finalizing them, this is necessary to aviod a crash in boehm's
33305 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
33307 * gc.c: handle GetTarget for finalized objects spotted and fixed by
33310 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
33312 * icall.c: implemented MonoType::Module.
33313 * reflection.c, reflection.h: mono_module_get_object () from
33314 Tomi Pakarinen <tomi.pakarinen@welho.com>.
33316 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
33318 * icall.c: ignore overridden methods in GetMethods ().
33319 Fix for FieldInfo::SetValue().
33320 * object.c: handle float/double in runtime invoke.
33322 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
33324 * object.c: allow a constructor to be called again on an object.
33326 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
33328 * class.h, class.c: move field layout code to it's own function and
33329 export it. Get an interface id earlier. Move fields in MonoClass
33330 so they are more cache friendly and align the bitfields.
33331 * loader.c: temporary handle get_param_names() for a runtime method.
33332 * reflection.c, reflection.h: more code to handle runtime creation of
33335 2002-09-09 Martin Baulig <martin@gnome.org>
33337 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
33338 signature with the pinvoke field being set for the actual call.
33340 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
33342 * icall.c: removed some unused icalls. Start of map of glib charsets
33343 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
33345 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
33347 * debug-helpers.c: break infinite loop (found and fixed by
33348 Holger Arnold <harnold@gmx.de>).
33350 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
33352 * icall.c: target may be null in create_delegate.
33354 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
33356 * marshal.c: handle a boolean return type.
33358 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
33360 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
33362 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
33364 * gc.c: fix weakreferences.
33366 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
33368 * icall.c: added icall to get default codepage.
33370 2002-09-03 Dick Porter <dick@ximian.com>
33373 * threads.c: Use MonoThread instead of MonoObject where
33376 Store running thread objects in a hash table, so that we have all
33377 the info to hand when waiting for them to finish
33378 (means we don't need OpenThread() any more, so mingw builds should
33379 be fully functional again.)
33382 * object.h: Added thread ID to MonoThread
33384 2002-09-03 Martin Baulig <martin@gnome.org>
33386 * icall.c (System.Reflection.Assembly::get_location): New interncall.
33388 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33390 * icall.c: fixed leak in get_temp_path. Thanks lupus.
33392 2002-09-03 Martin Baulig <martin@gnome.org>
33394 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
33395 argument to store the end address of the disassembled instruction.
33397 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
33398 here from debug-symfile.h.
33399 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
33400 JIT into this struct.
33401 (MonoSymbolFile): Added `char *image_file' field.
33402 (MonoDebugGetMethodFunc): Removed.
33403 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
33404 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
33405 (mono_debug_find_method): New method.
33407 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
33408 create a full symbol file.
33409 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
33410 and static symbol files.
33411 (mono_debug_find_method): The symbol file keeps an internal method hash,
33412 call this to get a MonoDebugMethodInfo from a MonoMethod.
33414 * debug-symfile.[ch]: Removed.
33416 2002-08-29 Miguel de Icaza <miguel@ximian.com>
33418 * image.c (do_mono_image_open): Remove linker version check.
33420 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
33422 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
33423 wrappers for instance methods.
33425 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33427 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
33429 2002-08-28 Dick Porter <dick@ximian.com>
33431 * Makefile.am: Export HOST_CC for w32 builds
33433 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
33435 * file-io.c process.c: MonoString are null terminated, no
33436 need for mono_string_to_utf16() anymore.
33438 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
33440 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
33442 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
33444 * icall.c, reflection.h: speedup System.MonoType.
33446 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
33448 * reflection.c: allow null as the value of a string argument in
33449 custom attributes constructors.
33451 2002-08-27 Martin Baulig <martin@gnome.org>
33453 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
33454 `trampoline_address' field.
33456 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
33458 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
33459 check (fixes bug #29486)
33461 2002-08-27 Martin Baulig <martin@gnome.org>
33463 * debug-mono-symfile.c: Changed the file format in a way that allows us
33464 open it read-only and to use a specially malloced area for all the
33465 dynamic data. We can now also generate a symbol file on-the-fly if we're
33466 debugging IL code and there is no MCS generated symbol file for it.
33468 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
33470 * object.c: added a define for a good string and array
33471 creation speedup (not enabled by default because we need to deal with
33474 2002-08-26 Martin Baulig <martin@gnome.org>
33476 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
33477 function to create a dynamic symbol file. This is used by the
33478 debugger to create a symbol file for IL code on-the-fly.
33480 2002-08-26 Martin Baulig <martin@gnome.org>
33482 * loader.c (mono_lookup_pinvoke_call): Include the error message
33483 from g_module_error() in the error message.
33485 2002-08-24 Martin Baulig <martin@gnome.org>
33487 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
33488 function to update the symbol file. The symbol file is mmap()ed
33489 writable, but private. This allows us to install the symbol file
33490 together with the assembly.
33492 2002-08-24 Martin Baulig <martin@gnome.org>
33494 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
33495 but they can read the new symbol file format which mcs is now creating.
33497 * debug-symfile.c (mono_debug_find_source_location): Moved to
33498 debug-mono-symfile.c; this is now operating on the new symbol file.
33500 2002-08-23 Martin Baulig <martin@gnome.org>
33502 * debug-helpers.c (mono_method_desc_from_method): New function to get
33503 a MonoMethodDesc from a MonoMethod.
33505 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
33507 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
33508 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
33510 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
33512 * string-icalls.[ch]: make helper methods static.
33514 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33516 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
33517 types to it and to SetValueInternal.
33519 * object.c: Moved handle_enum label to its proper place. This was the
33522 This time i compiled mcs and gtk-sharp and they both work.
33524 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33526 * icall.c: reverted partially my previous patch until
33527 object.c:set_value handles enums correcly.
33529 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33532 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
33533 (ves_icall_System_Environment_get_MachineName): removed warning when
33534 compiling under cygwin.
33536 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
33538 * object.c: fixed field_get_value() for reference types.
33540 2002-08-22 Dick Porter <dick@ximian.com>
33542 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
33543 Don't free a buffer while it's still needed. Patch from Jonathan
33544 Liger <Jonathan.liger@wanadoo.fr>
33546 2002-08-21 Miguel de Icaza <miguel@ximian.com>
33548 * icall.c (ves_icall_System_Environment_get_Platform): Add new
33551 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
33553 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
33554 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
33556 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
33557 we call unmanaged code which throws exceptions.
33559 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
33561 * appdomain.h: added per-domain entry_assembly.
33562 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
33564 * icall.c: Assembly::GetEntryAssembly icall.
33565 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
33566 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
33568 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
33570 * appdomain.h, gc.c: added mono_domain_finalize ().
33572 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33575 (mono_print_unhandled_exception): changed g_warning by g_printerr
33576 because g_log has a 1024 characters limit (yeah, i got a big stack
33577 trace). Don't print exception name, that should be in ToString
33580 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33582 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
33583 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
33585 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33588 (mono_print_unhandled_exception): after previous commit, i realized
33589 that MS calls ToString on the exception. I changed this function to
33590 do that. This way we get stack_trace for free.
33592 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33595 (mono_print_unhandled_exception): invoke Message property instead of
33596 getting 'message' field from Exception. Don't allocate memory for
33597 'trace' and 'message' if not needed.
33599 2002-08-18 Dick Porter <dick@ximian.com>
33601 * unicode.c: Fix asserts to match Encoder.cs checks
33603 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
33605 * marshal.c: fix unaligned store issue and a few wrong
33606 opcode argument types.
33608 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33610 * icall.c: added GetUninitializedObjectInternal internal call.
33612 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
33614 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
33615 to the right domain.
33617 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
33619 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
33621 * class.c (class_compute_field_layout): set blittable to false for Strings
33623 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
33625 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
33627 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
33628 first chunk of code to create types at runtime. Code to
33629 handle ReflectedType/DeclaringType. Make reflection handles
33632 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
33634 * class.c: set correct name in arrays.
33636 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
33638 * appdomain.c (mono_domain_transfer_object): make it work with
33639 valuetypes. bug fixes.
33641 2002-08-12 Dick Porter <dick@ximian.com>
33643 * object.h: Rename some parameters to avoid c++ keywords (Patch
33644 from Joseph Wenninger <kde@jowenn.at>)
33646 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
33648 * icall.c: added icall to implement Assembly.GetFile*.
33650 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
33652 * reflection.h, reflection.c: code to embed managed resources.
33654 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
33656 * class.c: move all the type size stuff into
33657 class_compute_field_layout().
33659 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
33661 * class.c: ensure enums have always the correct instance size.
33662 * unicode.c: remove wrong assert.
33664 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
33666 * assembly.c: fix mem corruption issue.
33667 * image.h, image.c: added mono_image_get_resource () to access
33669 * icall.c: implemented Assembly.EntryPoint property and some
33670 Managed Resources related internalcalls.
33673 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
33675 * image.c, image.h: impemented mono_image_get_entry_point ().
33676 * appdomain.c: use mono_image_get_entry_point.
33678 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
33680 * reflection.c: support the object type argument when loading
33683 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
33685 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
33686 String as return type.
33688 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
33690 * reflection.c: fix encoding of named args for custom attrs to match
33691 the ms implementation. Read them back when instantiating custom
33694 2002-08-02 Radek Doulik <rodo@ximian.com>
33696 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
33697 by Dietmar as quick fix
33698 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
33699 16 as stack size, used on more places as quick fix before Dietmar
33700 will fix it properly
33702 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
33704 * object.h, object.c: added accessors for fields and properties.
33706 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
33708 * class.c, class.h: made mono_class_get_field_from_name ()
33709 loop on parent types.
33710 Added mono_class_get_property_from_name ().
33712 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
33714 * class.c, class.h: move the code to setup the type vtable in its own
33715 function so that it can be reused also for types created at runtime.
33716 Eliminate the "class" identifier from the header file.
33717 * reflection.c: setup the vtable for enums so that we can create
33718 objects for use in SetConstant ().
33720 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
33722 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
33723 instead of the delegate itself as this pointer (bug #28383)
33725 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
33727 * marshal.c (mono_marshal_get_managed_wrapper): added return type
33730 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
33732 * loader.c: don't set the pinvoke bit on icalls.
33734 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
33736 * debug-helpers.c (mono_method_full_name): only print a number to
33737 indicate wrapper type (so that the output is more readable in traces).
33739 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
33741 * class.c (mono_class_init): include method override patch from Paolo
33743 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
33745 * icall.c: fixed GetTypeCode().
33747 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
33749 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
33750 use real delegate invoke function to make it work with multicast
33751 delegates (fix bug# 28291).
33753 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
33755 * object.c: load constant strings.
33757 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
33759 * reflection.c: no magic numbers.
33760 * tabledefs.h: security action enum.
33762 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
33764 * assembly.c: fix possible memory corruption.
33766 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
33768 * reflection.h, reflection.c: added support for linking resources.
33769 * verify.c: check we have an updated corlib.
33771 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
33773 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
33775 (mono_marshal_string_array): null terminate unmanaged string arrays.
33776 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
33778 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
33780 * icall.c: Type.GetType () can now return also types from the
33783 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
33785 * loader.h, loader.c: stack walking support.
33786 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
33787 GetCallingAssembly.
33789 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
33791 * marshal.c: added optimisations for blittable types
33793 * class.c (mono_array_class_get): do not set blittable attribute on arrays
33794 (mono_class_setup_mono_type): set blittable attribute for single
33797 * marshal.c (mono_string_utf8_to_builder): impl.
33798 (mono_string_builder_to_utf8): impl.
33799 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
33801 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
33803 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
33804 (mono_marshal_get_managed_wrapper): impl. byref types
33806 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33809 (search_method): don't display debug message.
33811 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
33813 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
33815 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
33817 * appdomain.c: set the missing filename when throwing exception.
33819 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
33821 * metadata.c (mono_type_size): code cleanup
33822 (mono_type_stack_size): removed some test code
33824 2002-07-21 Miguel de Icaza <miguel@ximian.com>
33826 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
33827 mono_get_exception_file_not_found now.
33829 * exception.c (mono_exception_from_name_two_strings): New version
33830 that will call a constructor with two string arguments.
33831 (mono_get_exception_file_not_found): New helper routine, used to
33832 report file-not-found errors.
33834 2002-07-20 Dick Porter <dick@ximian.com>
33837 * process.c: Pass file handles to CreateProcess
33841 * file-io.c: Implemented CreatePipe
33843 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
33845 * metadata.c (mono_get_param_info): set alignment for value types
33847 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
33849 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
33850 Constify mono_domain_assembly_open().
33851 * loader.c: handle null namespace in icalls.
33853 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
33855 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
33856 (emit_str_to_ptr_conv): marshal object as structs
33858 * metadata.c (mono_type_to_unmanaged): marshal object as structs
33860 * marshal.c (mono_marshal_get_runtime_invoke): support value types
33862 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
33864 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
33865 (mono_marshal_get_native_wrapper): we an now return value types
33867 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
33869 * verify.c: more checks implemented.
33871 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
33873 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
33875 (mono_marshal_get_native_wrapper): allow byref arguments
33876 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
33877 impl. PtrToStringXXX methods
33878 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
33879 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
33880 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
33881 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
33882 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
33884 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
33886 * reflection.c: fix buglet in parsing an assembly name.
33888 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
33890 * marshal.c (emit_ptr_to_str_conv): first impl.
33892 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
33894 * object.c, class.h: cache the vtable in the class as suggested by
33895 vargaz@freemail.hu (Zoltan Varga).
33897 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
33899 * class.h, loader.c: added mono_field_from_token().
33900 * verify.c: first cut of type checking code.
33902 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
33904 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
33906 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
33908 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
33910 (mono_marshal_get_remoting_invoke): impl.
33911 (mono_delegate_begin_invoke): impl.
33912 (mono_mb_emit_save_args): impl.
33913 (mono_delegate_end_invoke): impl.
33914 (mono_marshal_get_delegate_begin_invoke):
33915 (mono_marshal_get_delegate_end_invoke):
33916 (mono_marshal_get_delegate_invoke): generate a special name for
33917 those methods (including the signature) and associate them whith
33918 the delegate class.
33920 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
33923 (mono_reflection_type_from_name): now it has a MonoImage parameter
33924 which is used as the default image to search the type in. If the image
33925 is NULL or getting the type from it fails, it defaults to corlib.
33927 * icall.c: changed 1 call to mono_reflection_type_from_name to match
33930 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
33932 * reflection.c: update the parameter table index.
33934 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
33936 * domain.c: don't include the mark byte in the string hash.
33938 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
33940 * icall.cs: icall for Type.GetTypeCode ().
33941 * verify: a couple of fixes and disabled local initialization checks.
33943 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
33945 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
33947 * debug-helpers.c (mono_method_full_name): print the type of the
33950 * metadata.c (mono_signature_hash): a hash function for signatures
33951 (mono_signature_hash): better hash algorithm
33953 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
33955 * debug-helpers.c (mono_method_full_name): this can now generate
33956 method names with signatures
33958 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
33959 method dont have this pointers.
33961 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
33963 * reflection.c: fixup typebuilder tokens.
33964 * image.c: fix buglet.
33965 * marshal.h: remove whitespace.
33966 * metadata.h, metadata.c: reinstate code that was removed.
33967 * verify.c: handle catch directives and fix another couple of bugs.
33969 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
33971 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
33972 (mono_marshal_get_native_wrapper): make it comp. with the old code
33973 (mono_marshal_get_native_wrapper): support boolean
33974 (mono_marshal_get_managed_wrapper): support more types
33976 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
33978 * class.c (class_compute_field_layout): compute class->blittable attribute.
33980 2002-07-09 Dick Porter <dick@ximian.com>
33982 * threads.c: Make the thread cleaning up cope with threads that
33985 2002-07-08 Radek Doulik <rodo@ximian.com>
33987 * reflection.c (method_encode_code): use non-translated values to
33988 compute finally_start, this fixes exception handling on ppc, yay!
33990 * decimal.h (struct signscale): fix endianess
33992 2002-07-07 Radek Doulik <rodo@ximian.com>
33994 * reflection.c: swap box_val and not val
33996 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
33998 * reflection.c, reflection.h: handle full assembly info in type name.
33999 Handle Type arguments when loading custom attributes.
34000 * icall.c: updated to use new mono_reflection_type_from_name () method.
34002 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34005 (method_from_memberref): also print assembly name when method not found.
34007 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34010 (ves_icall_TypeGetProperties): fixed bug #27473.
34012 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34014 * reflection.c: display image name and token when cannot find the
34015 .ctor for an attribute.
34017 2002-07-05 Martin Baulig <martin@gnome.org>
34019 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
34021 2002-07-04 Dick Porter <dick@ximian.com>
34023 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
34024 compile on mingw. This will cause mingw builds to not wait for
34025 subthreads to terminate after the main thread does. I've lodged a
34026 bug with the mingw developers for them to wrap OpenThread().
34028 2002-07-03 Dick Porter <dick@ximian.com>
34030 * threads.c: Store thread IDs instead of handles, because
34031 GetCurrentThread() returns a pseudohandle and therefore stores
34032 useless values. mono_thread_cleanup() continues checking the
34033 array of threads until it is empty, to cope with subthreads
34034 spawning new threads after the main thread has finished.
34038 * profiler-private.h: Pass the thread ID to thread profiler
34039 functions, instead of a handle
34041 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
34043 * verify.c: fixes to make it more usable.
34044 * pedump.c: added --verify code to verify IL code in an assembly.
34046 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34048 * reflection.c: turn errors into warnings to allow compiling corlib.
34050 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
34052 * reflection.c: add special cases to compile corlib.
34054 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
34056 * reflection.c: handle properties with only a set method.
34058 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
34060 * opcodes.h: add enum with opcodes in opval order.
34062 2002-07-01 Dick Porter <dick@ximian.com>
34065 * object.c (mono_runtime_run_main): Removed unneeded argument
34067 2002-06-28 Martin Baulig <martin@gnome.org>
34069 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
34071 2002-06-27 Dick Porter <dick@ximian.com>
34073 * threads.c: Store the handle in both the parent thread and in the
34074 subthread, to minimise the time between starting a new thread and
34077 2002-06-26 Dick Porter <dick@ximian.com>
34079 * appdomain.c (mono_runtime_cleanup): Close the socket library
34080 after all the threads have finished, not before
34082 2002-06-26 Martin Baulig <martin@gnome.org>
34084 * debug-symfile.c (mono_debug_find_source_location): Added
34085 `guint32 *line_number' argument. If it's not NULL, store the line number
34086 there and return the file name without the line number.
34088 2002-06-25 Dick Porter <dick@ximian.com>
34092 * process.c: Process forking and other support functions
34094 2002-06-25 Dick Porter <dick@ximian.com>
34096 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
34097 things dont happen when the image is closed.
34098 (mono_image_lookup_resource): Walk the resource section looking
34099 for a particular entry
34101 * cil-coff.h: PE resource section decoding
34103 2002-06-25 Dick Porter <dick@ximian.com>
34107 (mono_assembly_foreach): Accessor functions to walk the list of
34109 (mono_assembly_set_main):
34110 (mono_assembly_get_main): Process methods need to know which
34111 assembly is the "main" one
34113 * object.c (mono_runtime_run_main): Record the main assembly
34115 * debug-helpers.c: Fix typo
34117 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
34119 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
34120 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
34122 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
34124 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
34126 2002-06-21 Miguel de Icaza <miguel@ximian.com>
34128 * image.c (do_mono_image_open): Initialize reference count,
34129 otherwise we leak the MonoImage.
34131 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
34133 * reflection.c: small tweak to handle self-hosting.
34135 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
34137 * reflection.c: fix type name parse code.
34139 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
34141 * reflection.c: break out of the loop.
34142 * image.c: special case corlib.
34144 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34146 * reflection.c: add all the custom attrs at the end to ensure the
34147 ctors have been properly initialized when the attributes are defined
34148 in the current assembly.
34150 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
34152 * reflection.c: handle correctly multiple-nested types.
34154 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
34156 * row-indexes.h: fix typos.
34157 * reflection.c: adjust for typos and fix method_def_or_ref
34158 encoding in MethodImpl table.
34160 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34162 * reflection.c: fix entry point patching (thanks Serge!).
34164 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
34166 * verify.c: add check for System.Exception
34168 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
34170 * image.c, class.c: minifix for code just c&p'ed.
34171 * reflection.c: warning fix.
34172 * object.h, loader.h, domain.c: load also StringBuilder.
34174 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
34176 * marshal.h, marshal.c: some support code to handle complex marshaling.
34178 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34180 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
34181 Better signatures with vtable error dump.
34183 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
34185 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
34187 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
34189 * icall.c (ves_icall_Type_GetField): impl.
34191 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34193 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
34194 to retrieve a marshal description blob for a field or param.
34196 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
34198 * reflection.h, reflection.c: change order of nested type emission
34199 to avoid table corruption. The NestedTypes table is sorted.
34200 * icall.c: change order of GetConstructor results to workaround mcs bug.
34202 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34204 * reflection.h, reflection.c: handle field and param marshal
34207 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
34209 * icall.c, marshal.c marshal.h: more Marshal class implementation.
34211 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
34213 * reflection.c: fix call convention.
34215 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
34217 * reflection.h, reflection.c: mono_image_get_memberref_token()
34218 takes a type instead of a class, now. Added
34219 mono_image_get_array_token() to create tokens for the special
34220 multi-dim array methods.
34222 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
34224 * assembly.c: handle modules (no assembly table). Split
34225 loading references in its own function.
34226 * class.c: handle moduleref resolution scope.
34227 * image.c, image.h: cache module name in image.
34229 2002-06-07 Martin Baulig <martin@gnome.org>
34231 * reflection.c (mono_image_get_type_info): Only add a class layout entry
34232 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
34234 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
34236 * icall.c: more signature fixes that used uint instead of int.
34238 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34240 * reflection.c: fixed signature of field refs.
34242 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34244 * class.c, reflection.c: handle typerefs of nested types
34245 (both on read and when writing files).
34247 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
34249 * icall.c: fix method signatures that tried to workaround the previous
34252 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
34254 * debug-helpers.c: fix typo.
34256 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
34258 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
34259 rewrote the PE/COFF writing code (our programs are understood by the
34262 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
34264 * gc.c, gc.h, icall.c: weakreference support.
34266 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
34268 * Makefile.am, mono-config.c: use $(sysconfdir).
34270 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
34272 * icall.c: changed default precision of Double.ToString() to 15.
34273 Fixed memory leak. Unified with Single.ToString.
34275 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
34277 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
34279 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
34281 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
34282 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
34283 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
34286 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34288 * debug-symfile.c, sysmath.c: yet more compilation fixes.
34290 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34292 * reflection.c, socket-io.c: more compilation fixes.
34294 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
34296 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
34297 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
34298 unicode.c: warning and compiler compatibility fixes.
34300 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
34302 * class.h, metadata.c: fixed warnings/compilation errors.
34304 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
34306 * Makefile.am, mono-config.c, mono-config.h: configuration file
34308 * loader.c, loader.h: make Dll mapping configurable at runtime in the
34309 config file. Export methods to insert and lookup mappings.
34311 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
34313 * reflection.c: handle types and boxed objects in custom attr
34316 2002-05-30 Martin Baulig <martin@gnome.org>
34319 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
34321 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
34323 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
34324 to lookup the implmap row for a P/Invoke method.
34325 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
34326 P/Invoke method from the runtime on an as needed basis.
34328 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
34330 * metadata.c (mono_metadata_parse_signature): impl.
34332 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34334 * class.c: handle .pack directive.
34336 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
34338 * object.c: initialize static fields with RVA data.
34340 2002-05-25 Martin Baulig <martin@gnome.org>
34343 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
34345 2002-05-24 Martin Baulig <martin@gnome.org>
34348 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
34349 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
34350 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
34352 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
34354 * object.c: special case string ctros in invoke.
34355 * gc.c: silly whitespace changes.
34357 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
34359 * threadpool.[ch]: impl. a threadpool that can
34360 be used by mint and mono.
34362 2002-05-22 Martin Baulig <martin@gnome.org>
34364 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
34365 The first argument is now a `MonoReflectionModuleBuilder *', the return
34366 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
34367 `methods' field to get the method builder. The `token' argument is the
34370 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
34371 invalid characters instead of g_assert_not_reached()ing. This seems
34372 to be the behaviour of mscorlib.
34374 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
34376 * object.c (mono_runtime_invoke_array): applied patch from Rachel
34377 Hestilow to fix bug #25104
34379 2002-05-21 Martin Baulig <martin@gnome.org>
34381 * debug-symfile.c (mono_debug_find_source_location): New function.
34382 Looks up an IL offset in the line number table and returns the source
34383 location as a string.
34385 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34388 (mono_double_ToStringImpl): changed %f by %g until we have something
34391 2002-05-21 Nick Drochak <ndrochak@gol.com>
34393 * icall.c : Use different name for Math.Pow's icall. Needed to check
34394 parameters first in C#.
34396 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34398 * icall.c, reflection.h: added icall to get info about an event.
34400 2002-05-20 Radek Doulik <rodo@ximian.com>
34402 * object.c (mono_value_box): don't use memcpy for boxing on BIG
34404 (mono_value_box): don't use memcpy for small sizes on
34405 architectures with unaligned access
34407 2002-05-20 Martin Baulig <martin@gnome.org>
34409 * reflection.c (mono_reflection_setup_internal_class): Don't crash
34410 if `tb->parent == NULL'.
34411 (mono_reflection_create_internal_class): New function. This is
34412 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
34415 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
34418 2002-05-19 Martin Baulig <martin@gnome.org>
34420 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
34421 argument to get the length, don't default to the array length.
34423 2002-05-18 Miguel de Icaza <miguel@ximian.com>
34425 * assembly.c (mono_assembly_setrootdir): New function used to
34426 override the MONO_ASSEMBLIES directory.
34428 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
34430 * icall.c: ValueType_GetHashCode() initialize local var.
34432 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
34434 * reflection.c: sort custom attributes table.
34436 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
34438 * reflection.c: support named args in custom attributes (write support).
34440 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
34442 * reflection.c: fix finally position calculation.
34444 2002-05-15 Radek Doulik <rodo@ximian.com>
34446 * reflection.c: fixed endianess at many places
34448 * icall.c (ves_icall_InitializeArray): comment out debug msg
34450 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
34452 * object.c (mono_unhandled_exception): new function to handle
34453 unhandled exceptions.
34454 (mono_unhandled_exception): call the UnhandledException event.
34455 (mono_runtime_delegate_invoke): impl.
34457 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
34459 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
34460 returns the RVA, not the direct pointer to the data. Handle the case
34461 when the class size is fixed.
34463 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
34465 * reflection.c: fix some endianess issues.
34467 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
34469 * object.c (mono_runtime_invoke): is now able to catch exceptions.
34471 * threads.c (mono_thread_init): added a callback which is invoked
34474 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
34476 * icall.c: make GetHashCode return non-negative values.
34478 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
34480 * object.c, icall.c, gc.c: revert to address-based hashcode.
34482 2002-05-13 Miguel de Icaza <miguel@ximian.com>
34484 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
34486 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34488 * icall.c, class.c: special case <Module>.
34490 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
34492 * icall.c: fix bug in GetNow().
34494 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
34496 * object.c (mono_runtime_class_init): make sure that we call all
34497 static class constructors.
34499 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
34501 * reflection.c: sort methodsemantics table.
34503 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
34505 * reflection.h, reflection.c: honour init locals setting.
34507 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
34509 * icall.c: copied Double ToStringImpl for Single ToStringImpl
34511 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
34513 * reflection.c: support ContructorBuilders in attribute blob creation.
34515 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34517 * reflection.c: some changes to build a binary that can be run
34518 directly in windows.
34520 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
34522 * loader.c: print a big message when an icall can't be found.
34524 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34526 * string-icalls.c: fix bug 24248.
34528 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
34530 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
34531 icall.c, reflection.h: separate assembly loading by pathname and by
34532 assembly name. Use the MONO_PATH env var to search for assemblies.
34534 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
34536 * assembly.c, image.h: add some support for assemblies
34537 with multiple modules.
34538 * class.c, class.h: export mono_class_from_typeref().
34539 * loader.c: remove duplicated code and use mono_class_from_typeref(),
34542 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
34544 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
34545 documentation says (the ECMA one is correct).
34547 2002-05-02 Dick Porter <dick@ximian.com>
34549 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
34550 Don't name the synchronisation mutex.
34552 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
34555 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
34556 Make the prototypes match.
34557 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
34561 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
34562 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
34563 all systems have tm.tm_zone, so use strftime() with %Z to print
34564 the timezone abreviation into a temp string.
34566 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
34567 rather than mono_array_addr() on a MonoString on Big Endian
34570 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
34572 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
34575 2002-04-30 Dick Porter <dick@ximian.com>
34577 * socket-io.c: Cope with SOCKET being an integer rather than a
34580 * threads.c: Added Thread_free_internal, to deal with thread
34581 handle cleanup. Moved calls to handle_store() and handle_remove()
34582 to start_wrapper(), so each can only be called once. Allocate
34583 synchronisation blocks with GC_malloc(), and use GC finalisation
34584 to close the handles.
34586 * icall.c: added System.Threading.Thread::Thread_free_internal
34588 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
34590 * icall.c: support Environment.Exit, CommandLineArgs().
34592 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
34594 * object.c, object.h: added mono_runtime_run_main () and
34595 mono_runtime_get_main_args () for use in System.Environment.
34597 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
34599 * gc.c: fix thinko, enable actual finalization since the jit is now
34602 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34604 * gc.c, object.c: take into account that an object may be offset wrt the address
34605 returned by GC_malloc().
34607 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
34609 * image.c: handle files without entries in the assembly table (modules).
34611 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
34613 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
34614 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
34615 allowed to be null when it's System.Object class setup.
34617 2002-04-27 Martin Baulig <martin@gnome.org>
34619 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
34620 if `tb->parent == NULL' rather than crashing.
34622 2002-04-28 Nick Drochak <ndrochak@gol.com>
34624 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
34625 calling acos() where asin() should have been called.
34627 2002-04-26 Martin Baulig <martin@gnome.org>
34629 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
34630 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
34631 there's a subdirectory called `System', but we don't want to read that
34632 subdirectory as an assembly.
34634 2002-04-25 Martin Baulig <martin@gnome.org>
34636 * debug-symfile.c: Reflect latest MonoString changes.
34638 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
34640 * rand.c, rand.h: instance method icalls need to have an explicit
34641 this pointer as first argument in the C implementation.
34643 2002-04-25 Nick Drochak <ndrochak@gol.com>
34645 * icall.c: Fix typo in map for GetNonZeroBytes
34647 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
34649 * string-icalls.c : String does now passes unit tests without any
34650 errors, the following changes has been made:
34652 Implemented replace methods.
34653 Renaming of methods to (try) follow the standard.
34654 Fixed compare ordinal
34655 Made all memory allocated directly to function instead of via icall function.
34656 Small performance fix in is_in_array function
34658 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
34660 c (mono_string_Internal_ctor_charp_int_int):
34661 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
34662 sindex < 0, throw ArgumentOutOfRangeException instead of
34663 ArgumentNullException.
34665 Added new check for length == 0, however
34666 I need to make it return String.Empty from the C code.
34668 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
34669 that calculate the length for us here.
34671 (mono_string_Internal_ctor_sbytep_int_int): Replaced
34672 mono_string_new_utf16 with mono_string_new, since value is utf8.
34674 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34676 * object.c: register the object for finalization if needed.
34677 Allocate one more char in the string for the terminating 0 char.
34679 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
34681 * class.c, class.h, image.c: check if a type implemenst a destructor.
34682 Use the proper key for array class lookups.
34683 * icall.c: register the icalls in the System.GC class.
34684 * gc.c, gc.h: GC-related functions and icalls.
34686 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34690 * unicode.c: free some strings gotten from mono_string_to_utf8 and
34691 changed a couple of free () by g_free ().
34693 * decimal.c: one-liner in the comments for decimal2string ().
34695 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
34697 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
34699 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
34701 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
34702 * object.c (mono_runtime_invoke_array) : handle null in params
34704 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
34706 * string-icalls.c: fixed bug in split (one off bug)
34708 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
34710 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
34711 * icalls.c: added String::Equals as internal method
34713 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
34715 * threads.c: fixed bug in the double interlocked functions
34717 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
34719 * threads.c: implemented all of the new interlocked icalls.
34720 * string-icalls.c: fix a bug in insert.
34721 * icalls.c: added the icalls for interlocked, removed old string functions.
34723 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
34725 * loader.c: fix off-by-one error when reading argument names.
34727 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34729 * profiler.c: win32 counter implementation (untested).
34730 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
34731 (the latter needs testing and more complete impl. from win32 folks).
34733 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
34735 * object.c: mono_array_new_full workaround mono_array_class_get
34738 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
34740 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
34741 * object.h (mono_string_chars): Changed casting type.
34743 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
34745 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
34746 method signatures to use gunichar2 instead of gint16.
34748 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
34750 * object.h, object.c: domain-specific versions of mono_object_new and
34753 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
34755 * object.c: changed String layout
34757 * string-icalls.c (mono_string_Internal_ctor_chara): added
34758 internal string constructors.
34760 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
34762 * threads.c: pass 'this' to the thread start routine.
34764 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34766 * string-icalls.c: fix IndexOf and LastIndexOf. Now
34767 InternalCompareStr don't call twice mono_string_cmp_char for the last
34768 character. Improved performance in mono_string_cmp_char.
34770 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
34772 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
34773 code into its own library: libmonoruntime.
34775 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
34777 * object.h, object.c: changed array format so that szarrays do not
34778 require a bounds structure.
34779 * icall.c, appdomain.c: support for new szarray format.
34781 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
34783 * metadata.c: compare also the retuns type when comparing signatures:
34784 we didn't do this as an optimization since really overloaded methods
34785 must differ also in the arguments, but this doesn't work with
34786 low-level IL code (or when using explicit conversion operators: see
34787 bug#23498 for an example).
34789 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
34791 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
34793 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
34795 * icall.c: make MonoType::GetElementType its own icall.
34797 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34799 * icall.c: remove MonoMethod_get_Name().
34800 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
34803 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
34805 * string-icalls.c: optimized a few methods.
34807 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
34809 * icall.c: added all new string internal calls
34810 * string-icalls.c: added, new string internal call implementation.
34811 * object.c: added mono_string_new_size for allocating a string a size
34813 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
34815 * object.c (mono_object_isinst): use the same code as in the
34816 optimized x86 version.
34818 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34820 * profiler.c: TSC-based timer code (faster and more accurate).
34821 Not hooked up in configure, yet (set USE_X86TSC to 1).
34823 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
34825 * profiler.c, profiler.h: track time spent compiling methods.
34826 * threads.c: track thread creation/destruction.
34828 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
34830 * profiler.c, profiler.h, profiler-private.h: profiling interface
34831 and sample implementation. Moved here so that it can be used also by
34834 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
34836 * reflection.c, reflection.h: keep types and other handles separate in
34837 the hash tables for referred tokens. Add guid for modules.
34839 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
34841 * assembly.c: fix bugs found with valgrind.
34842 * metadata.h, metadata.c: added mono_metadata_guid_heap().
34844 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
34846 * threads: added icall support for getting current domain for
34849 2002-04-13 Martin Baulig <martin@gnome.org>
34851 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
34852 (MonoDebugVarInfo): Added `index' field for register based addresses.
34853 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
34854 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
34855 `MonoDebugVarInfo *params' and `guint32 this_offset' with
34856 `MonoDebugVarInfo *this_var'.
34858 * debug-symfile.c (relocate_variable): New static function to write
34859 a location description for a local variable or method parameter.
34861 2002-04-12 Martin Baulig <martin@gnome.org>
34863 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
34864 stack offset and begin/end scope address of a local variable.
34865 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
34866 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
34867 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
34869 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
34870 Added new relocation types for start/end scope of a local variable.
34872 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34874 * object.h: add mono_object_domain() macro.
34875 * reflection.c: handle typespecs.
34876 * icall.c: MonoMethod::get_Name() implementation.
34878 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34880 * icall.c: String::GetHashCode() icall implementation.
34882 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34884 * icall.c: String::IndexOfAny icall.
34885 * object.c, object.h: make array->max_length more useful.
34886 Intrduced mono_object_class() and mono_string_length() macros.
34888 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34890 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
34891 instead of g_unichar_isdigit.
34893 2002-04-11 Nick Drochak <ndrochak@gol.com>
34895 * icall.c: Implement a simple Double.ToString().
34897 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
34899 * appdomain.h: only io-layer.h is supposed to be included.
34900 * icall.c: explicitly import environ. Fix warning.
34902 2002-04-10 Nick Drochak <ndrochak@gol.com>
34904 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
34905 return true even if it's not Daylight Savings time.
34906 Only return false for the case where the function isn't
34907 implemented for a plaform (read Windows).
34909 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34911 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
34914 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
34916 * mempool.c (mono_mempool_alloc): only use g_malloc when
34917 absolutely necessary.
34919 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
34921 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
34923 * class.c (mono_class_vtable): use domain mempool to allocate vtable
34924 (mono_class_proxy_vtable): use domain mempool
34926 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
34928 * appdomain.h, appdomain.c: split initialization that requires the
34929 execution engine support into mono_runtime_init().
34931 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
34933 * class.c (mono_class_init): don't include vtable inside MonoClass
34934 to save some memory, gather some statistics.
34935 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
34937 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
34939 * icall.c: internalcall implementation for ValueType.Equals().
34941 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
34943 * object.c (mono_message_init): moved
34944 (mono_runtime_exec_main): new arch. independent impl.
34945 (mono_runtime_invoke_array): new method - like
34946 mono_runtime_invoke, but you can pass an array of objects.
34947 (mono_remoting_invoke): new arch. independent impl.
34948 (mono_message_invoke): new arch. independent impl.
34949 (mono_runtime_class_init): new arch. independent impl.
34950 (mono_runtime_object_init): new arch. independent impl.
34952 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34954 * metadata.c, object.c, reflection.c: documented the exported
34957 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
34959 * icall.c: simpler code to pass the assembly builder data to corlib.
34960 Implement GetNestedTypes() internalcall.
34962 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
34964 * class.c: warn if a type can't be loaded.
34966 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
34968 * image.h: typedef MonoImageOpenStatus
34969 * types.h: removed unused file
34971 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
34973 * icall.c: Enum_ToObject accepts enum value arguments.
34975 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
34977 * class.c: move initialization of properties, events and nested
34978 classes, so that they happen for interfaces, too.
34980 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
34982 * icall.c: cleanup some ugly casts in Array_SetValue*.
34984 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
34986 * icall.c: the values array fro enums is of the correct type, now.
34987 Implement (correctly) getFullName instead of assQualifiedName for
34989 * reflection.h, reflection.c: added mono_type_get_name ().
34991 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
34993 * assembly.c, image.h: for each MonoImage, record from wich assembly
34995 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
34996 Make Type.Assembly work.
34998 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
35000 * debug-symfile.h: use char* instead of gpointer to avoid
35003 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
35005 * icall.c (ves_icall_InternalExecute): impl. FielSetter
35006 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
35008 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
35010 * icall.c (mono_message_init): impl. (code cleanup)
35011 (ves_icall_InternalExecute): impl. FieldGetter
35013 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
35014 defined we call all (non-static)methods through the vtable.
35016 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
35018 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
35019 finalizer even though the memory is still referenced (and the chunk of
35020 memory is not freed).
35022 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
35024 * assembly.c: fix brokeness.
35026 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
35028 * class.c: kill some warnings. Check explicit interface method
35029 implementation also without considering the namespace.
35030 Load also literal strings in static class data.
35032 2002-03-29 Miguel de Icaza <miguel@ximian.com>
35034 * assembly.c (default_assembly_name_resolver): Kill memory leak.
35035 (default_assembly_name_resolver): Make the resolver take the
35036 "base" directory where the assembly was originally defined, so we
35037 can load DLLs that are in the same directory as the assembly that
35038 is being referenced.
35040 2002-03-28 Dick Porter <dick@ximian.com>
35046 * unicode.c: Warning cleanups
35048 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
35050 * object.h, reflection.h: use the correct type instead of MonoObject.
35052 2002-03-28 Martin Baulig <martin@gnome.org>
35054 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
35055 (mono_debug_update_symbol_file): Initialize classes if necessary.
35057 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
35059 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
35060 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
35062 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
35064 * assembly.h: fix function prototype.
35065 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
35066 * mono-endian.h: use const cast.
35068 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
35070 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
35072 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
35074 * loader.c: don't assert when a typeref can't be loaded, give
35075 a chance to the runtime to trow an exception instead.
35076 * loader.h: fix warning.
35078 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
35080 * class.c (mono_class_proxy_vtable): added proxy support
35082 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
35084 * icall.c: removed last of PAL calls, added System.Environment
35085 * file-io.h, file-io.c: MonoIO implementation
35086 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
35088 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
35090 * appdomain.c: do not use the byte marker in ldstr table lookup.
35091 * debug-helpers.c: allow two ':' to separate class and method name.
35092 * object.c: allocate arrays bounds with the GC, too.
35093 * verify: add a few more checks.
35095 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
35097 * reflection.c: output also literal strings. Allocate parameter data
35098 with GC_malloc() (thanks, Martin, for catching this!).
35100 2002-03-26 Martin Baulig <martin@gnome.org>
35102 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
35103 include the `this' offset in the `param_offsets'.
35105 2002-03-25 Martin Baulig <martin@gnome.org>
35107 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
35108 mono_debug_get_class() function to get the classes. Added new
35109 relocation types for arrays and strings.
35110 (mono_debug_get_class): New static function to search in all
35111 referenced assemblies for a metadata token.
35113 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
35115 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
35117 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
35118 hold gc-allocated objects. Make the string heap a stream like the
35119 others. Removed duplicated code when writing stream info.
35120 Added asserts to catch possible buffer overflows. Set the sorted map
35121 for tables that need sorting. Added some documentation.
35123 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
35125 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
35126 for interned strings and vtables.
35128 2002-03-24 Martin Baulig <martin@gnome.org>
35130 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
35131 it in the array since it was created with g_slist_prepend().
35133 2002-03-24 Martin Baulig <martin@gnome.org>
35135 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
35136 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
35137 (mono_debug_method_from_token): Renamed to
35138 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
35139 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
35141 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
35144 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
35146 2002-03-24 Martin Baulig <martin@gnome.org>
35148 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
35149 (mono_debug_method_from_token): New func.
35151 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
35152 New interncall, calls mono_debug_local_type_from_signature().
35153 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
35154 calls mono_debug_method_from_token().
35156 2002-03-23 Martin Baulig <martin@gnome.org>
35158 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
35159 specifies the number of bytes to be converted, not the array size.
35160 Return the number of chars, not the number of bytes.
35161 (ves_icall_iconv_get_chars): The `byteCount' argument
35162 specifies the number of bytes to be converted, not the array size.
35164 2002-03-23 Martin Baulig <martin@gnome.org>
35166 * reflection.h (MonoReflectionSigHelper): New type.
35168 * reflection.c (mono_reflection_sighelper_get_signature_local),
35169 (mono_reflection_sighelper_get_signature_local): New functions.
35171 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
35172 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
35175 2002-03-23 Martin Baulig <martin@gnome.org>
35177 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
35178 is_writeable is set.
35179 (mono_raw_buffer_update): New function to write the modified map
35182 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
35184 * debug-symfile.c (mono_debug_update_symbol_file): Call
35185 mono_raw_buffer_update() when done writing.
35187 2002-03-23 Martin Baulig <martin@gnome.org>
35189 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
35191 * debug-symfile.c: Added support for arguments and local variables.
35193 2002-03-23 Dick Porter <dick@ximian.com>
35195 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
35196 protected by ifdefs, hence breaking the w32 build.
35198 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35200 * object.c: implement is_interned() the right way.
35202 2002-03-21 Martin Baulig <martin@gnome.org>
35204 * debug-symfile.[ch]: New files to handle debugging information
35205 files. There's also support to dynamically update these symbol
35206 files to include machine dependent information.
35208 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
35210 * threads.c (mono_thread_create): new function to create thread
35213 2002-03-20 Martin Baulig <martin@gnome.org>
35215 * icall.c (ves_icall_InternalInvoke): Create a new object if the
35216 method is a constructor.
35217 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
35218 points to ves_icall_InternalInvoke().
35220 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
35222 * file-io.c: Flush shouldn't throw exceptions.
35224 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
35226 * file-io.c: FileStream flush support; FileSetLength now
35227 restores file pointer.
35229 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
35231 * class.c: set image for pointer classes.
35233 2002/03/19 Nick Drochak <ndrochak@gol.com>
35235 * sysmath.c: Forgot one.
35237 2002-03-18 Miguel de Icaza <miguel@ximian.com>
35239 * sysmath.c: Avoid redefining existing names.
35241 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
35243 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
35244 handled by runtime as icall rather than dllimport from libm.so
35245 * file-io.c, file-io.h: fixed handle argument type.
35247 2002-03-18 Dick Porter <dick@ximian.com>
35249 * reflection.c (mono_image_get_type_info): rename interface to
35250 iface, because of "#define interface struct" on windows.
35252 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
35254 * class.c, class.h: rename and export mono_ptr_class_get().
35255 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
35256 * reflection.c, reflection.h, icall.c: better/saner type name
35257 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
35260 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
35262 * class.c (mono_class_init): removed hardcoded GHC_SLOT
35264 * icall.c (ves_icall_InternalInvoke): impl.
35266 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
35268 * reflection.c: output the interface map table, too.
35270 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
35272 * class.c (class_compute_field_layout): separate computation of
35273 static field layout
35275 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
35277 * icall.c: added System.Buffer support.
35278 * file-io.c: moved file icalls from PAL to FileStream.
35280 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
35282 * icall.c (ves_icall_System_Object_GetHashCode): impl.
35284 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
35286 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
35288 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
35290 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
35292 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
35294 * debug-helpers.{c,h}: moved here from monograph some useful functions
35295 to locate a method by name/signature in a class or image. Included
35296 also a small and flexible IL disassembler.
35298 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
35300 * reflection.c: fixup tokens in methods with small header size, too.
35302 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
35304 * object.c (mono_string_to_utf8): remove assert(!error), instead
35307 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
35309 * icall.c: update to the new mono_Array_class_get interface.
35311 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
35313 * appdomain.c, object.c: Boehm-GC enable.
35314 * icall.c: make get_data_chunk() support split data requests.
35315 Ensure a class is initialized in more cases. Return only the first
35316 property found in GetProperties() or the compiler gets confused.
35317 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
35318 * reflection.h, reflection.c: add fixup mechanism for field and method
35319 tokens. Initialize assembly->typeref in a single place. Output
35320 properties after events. Support custom attributes for events, too.
35321 Typo fix for paramter custom attrs.
35323 2002-03-07 Martin Baulig <martin@gnome.org>
35325 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
35327 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
35329 * class.c (mono_array_class_get): fix. for multi. dim. arrays
35331 2002-03-06 Martin Baulig <martin@gnome.org>
35333 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
35334 non-zero lower bounds. See testcases #F10-#F13.
35336 2002-03-05 Martin Baulig <martin@gnome.org>
35338 * exception.c (mono_get_exception_argument_out_of_range): New exception.
35340 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
35341 ves_icall_System_Array_GetValue(), only calculate the absolute array position
35343 (ves_icall_System_Array_SetValue): Likewise.
35344 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
35345 as argument and does the actual work. This function is used when copying a
35346 multi-dimensional array.
35347 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
35348 now do all the widening conversions of value types.
35349 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
35351 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35353 * class.c: remove some magic numbers and use the smbolic names,
35354 instead. Added init_events() to load event info at class init time.
35355 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
35356 and mono_metadata_methods_from_event().
35357 * reflection.h, reflection.c: added support for writing out the evnets
35358 related information.
35360 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
35362 * reflection.h, icall.c: use a different method (GetInterfaces)
35363 to gather interface info and add isbyref, isprimitive and
35364 ispointer to the ves_icall_get_type_info() return value.
35366 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
35368 * class.h: stared adding support for events.
35369 * icall.c: split find_members implementation. Added debug icall to get
35370 the address of an object.
35371 * reflection.c: handle TypeBuilders in mono_type_get_object().
35373 2002-03-01 Martin Baulig <martin@gnome.org>
35375 * icall.c (ves_icall_System_Array_GetLength): This must throw an
35376 ArgumentOutOfRangeException(), not an ArgumentException().
35377 (ves_icall_System_Array_GetLowerBound): Likewise.
35378 (ves_icall_System_Array_GetValue): Improved argument checking.
35379 (ves_icall_System_Array_SetValue): Improved argument checking.
35381 2002-03-01 Martin Baulig <martin@gnome.org>
35383 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
35384 called with invalid arguments rather than just dying with g_assert().
35385 (ves_icall_System_Array_SetValue): Likewise.
35386 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
35387 raise a NotImplementedException instead.
35388 (ves_icall_System_Array_GetLength): Added argument checking.
35389 (ves_icall_System_Array_GetLowerBound): Added argument checking.
35391 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
35393 * object.h (mono_assert): new macros mono_assert and
35394 mono_assert_not_reached
35396 2002-02-28 Martin Baulig <martin@gnome.org>
35398 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
35399 and "System::String::IsInterned" to "System::String::_IsInterned".
35401 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
35403 * icall.c: remove hacks for typebuilder. Added icall to create a
35404 modified type from a tybebuilder.
35405 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
35406 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
35407 to create a backing MonoClass for a TypeBuilder.
35409 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
35411 * class.c, class.h: more refactoring of class init.
35412 Export mono_class_setup_mono_type() and mono_class_setup_parent().
35414 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
35416 * marshal.c, marshal.h: start of marshaling interface.
35418 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
35420 * icall.c: fix order in assembly qualified name icall.
35422 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
35424 * class.c: do not free str, since we store it in the hash table.
35425 * reflection.h: add label field to MonoILExceptionInfo.
35426 * reflection.c: handle references to more than one assembly. Handle
35427 case when there isn't a module created in the assembly.
35429 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
35431 * class.c: Fix typo. Start refactoring of class init code.
35433 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
35435 * appdomain.c: exit with 1 on error.
35436 * class.c: we already have the name in MonoClassField.
35437 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
35438 MonoStreamHeader instead of an offset of image->raw_metadata.
35440 2002-02-26 Miguel de Icaza <miguel@ximian.com>
35442 * appdomain.c (mono_init): Be even more descriptive about the error.
35444 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
35446 * appdomain.c: give the user an informative message when corlib can't
35449 2002-02-26 Martin Baulig <martin@gnome.org>
35451 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
35452 New icall to get the time zone data.
35454 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
35456 * reflection.c: set virtual and raw size of section correctly.
35457 * threads.c: transfer domain information to newly created threads.
35459 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
35461 * class.c: when instancing a class in a domain, load the default
35462 vaules for static fields from the constant table. Fix System.Enum to
35464 * icall.c: implement Object::GetType() internalcall. Implemented
35465 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
35466 Fixed checking of binding flags in find_members().
35467 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
35468 * reflection.c: handle enumerations when writing to the constant
35469 table. Use a different object cache for types.
35472 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
35474 * object.c (mono_object_isinst): fix for arrays
35476 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
35478 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
35480 * object.c: don't use mprotect () and fix intern pool hash table
35481 lookup for big endian systems.
35483 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
35485 * icall.c: change type_is_subtype_of () signature.
35487 2002-02-21 Mark Crichton <crichton@gimp.org>
35489 * rand.c, rand.h: Added random number generator for
35490 System.Security.Cryptography classes.
35492 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
35494 * icall.c: Added System.Security.Cryptography calls.
35496 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
35498 * class.c, icall.c, metadata.c: better support for pointer types.
35499 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
35500 * reflection.c: Add support for getting custom attrs for properties
35501 and simplify some code.
35503 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
35505 * icall.c: change getToken () and add custom attribute GetBlob()helper
35507 * reflection.h: add custom attrs array to the reflection builder structures.
35508 * reflection.c: encode and emit custom attributes for all the relevant
35509 reflection objects. Cache fieldref and methodref tokens. Change
35510 mono_image_create_token() interface to take a MonoDynamicAssembly.
35511 More complete custom attributes decoder. Load custom attributes for
35512 Assembly, Field, Method and Constructor objects, too. Make the
35513 returned array an Attribute[] one, not object[]. Added
35514 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
35515 custom attribute constructor.
35517 2002-02-20 Dick Porter <dick@ximian.com>
35521 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
35522 problem code out for now).
35524 2002-02-19 Radek Doulik <rodo@ximian.com>
35526 * object.c (mono_ldstr): use hash table to avoid multiple swapping
35528 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
35530 * icall.c: register the GetCustomAttributes method.
35531 * object.c, object.h: add mono_string_new_len ().
35532 * reflection.h, reflection.c: added mono_runtime_invoke(),
35533 mono_install_runtime_invoke(). Added
35534 mono_reflection_get_custom_attrs () to load custom attributes and
35535 create the attribute objects.
35537 2002-02-19 Dick Porter <dick@ximian.com>
35538 * threads-dummy-types.c:
35539 * threads-dummy-types.h:
35542 * threads-pthread-types.c:
35543 * threads-pthread-types.h:
35544 * threads-pthread.c:
35545 * threads-pthread.h: Deleted obsolete files
35547 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
35549 * class.c (mono_class_vtable): runtime init the class when we
35550 allocate static class data.
35552 * icall.c (ves_icall_System_Array_SetValue): check for null values.
35554 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
35555 and String - but we will need generic marshalling support in the
35557 (mono_init): set the domain name in a ms compatible way
35559 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
35562 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
35564 * object.c (mono_array_clone): use alloca() instead of g_malloc
35567 * appdomain.c (mono_domain_unload): impl.
35569 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
35571 * appdomain.c, object.c: fix intern pool implementation.
35572 * class.c: fix alignment code.
35574 2002-02-16 Radek Doulik <rodo@ximian.com>
35576 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
35577 and s2 > s1, just copy lower bytes to be compatible with little
35578 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
35579 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
35581 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
35582 force big_endian to be 1 for big endian machines
35583 (ves_icall_iconv_new_decoder): ditto
35585 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
35587 * socket-io.c (convert_sockopt_level_and_name): If the system
35588 doesn't define SOL_IP or SOL_TCP, get them by hand using
35589 getprotobyname() and caching the values (because this could be a
35591 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
35592 Use the appropriate struct when the system does support it. Ie,
35593 not all systems have struct ip_mreqn so use struct ip_mreq when
35596 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
35598 * reflection.c: handle finally clauses.
35600 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
35602 * socket-io.c: use g_snprintf() instead of snprintf.
35604 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
35606 * reflection.c (mono_param_get_objects): Cast second argument to
35607 mono_method_get_param_names to a const char** to silence the
35610 * appdomain.c (mono_domain_assembly_open): Put parens around the
35611 truth statement in the for-loop.
35613 * unicode.c (iconv_convert): Got rid of a compiler warning about
35614 int i being unused when the system has a new iconv.
35615 (iconv_get_length): Same.
35617 * image.c (load_class_names): Cast the second argument to
35618 g_hash_table_insert() to char* to hush compiler warnings about the
35620 (mono_image_open): Same here.
35622 * socket-io.c: Don't conditionally include sys/filio.h or
35623 sys/sockio.h here anymore since we now get them from
35624 io-layer/io-layer.h
35625 (inet_pton): If the system doesn't support inet_aton, implement
35626 using inet_addr and also #define INADDR_NONE if it isn't defined
35629 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
35631 * metadata.c, metadata.h: added function to get packing and size info
35633 * reflection.h, reflection.c: handle field RVA data. Save info about
35634 the table layout if needed. Assign typedef indexes to all the types
35635 before dumping the info about them to avoid forward reference problems.
35637 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
35639 * socket-io.c (convert_sockopt_level_and_name): ifdef
35640 SO_ACCEPTCONN because it is not defined on my system (old debian)
35642 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
35644 * opcode.c: use stddef.h to get NULL.
35646 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
35648 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
35649 for FIONBIO, FIONREAD and SIOCATMARK.
35650 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
35651 define INADDR_NONE and besides, inet_addr() is deprecated and
35652 should not be used. Use inet_pton() instead - it also has the
35653 added bonus that it can easily handle IPv6 addresses as well.
35654 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
35656 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
35658 * decimal.c: remove _MSC_VER conditional.
35660 2002-02-13 Dick Porter <dick@ximian.com>
35663 * icall.c: Internal calls for Blocking, Select, Shutdown,
35664 GetSocketOption and SetSocketOption
35666 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35668 * assembly.cs: better resolver: use it instead of some kludgy
35671 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
35673 * reflection.c: the best way to speed-up the compiler is to avoid
35676 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
35678 * class.c (mono_class_vtable): changed the object layout
35679 (obj->vtable->class).
35680 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
35682 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35684 * assembly.c: look for assemblies in the assembly dir, too.
35686 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
35688 * class.c: fix thinko in mono_class_from_type().
35690 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
35692 * exception.h, exception.c: added TypeLoadException.
35693 * object.h, object.c: added mono_array_clone ().
35694 * icall.c: handle throwOnError in AssemblyGetType().
35695 Added Array.Clone().
35696 * opcode.h, opcode.c: use a single value for the opcode val.
35697 Compile fix for non-gcc compilers.
35699 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
35701 * opcodes.c, opcodes.h: export interesting info about opcodes.
35703 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
35705 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
35708 * class.c (class_compute_field_layout): set element_class for enums
35709 (mono_class_create_from_typedef): set element_class for normal classes
35711 * icall.c (ves_icall_System_Enum_get_value): impl.
35713 * class.c (mono_class_create_from_typedef): do not set valuetype
35714 flag for System.ValueType and System.Enum
35716 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
35718 * unicode.c (iconv_convert): fix big endian problem.
35720 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
35722 * class.c: add asserts if we are ever going to scribble over memory.
35723 * socket-io.c: not all systems have AF_IRDA defined.
35725 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
35727 * class.c (class_compute_field_layout): do not consider static
35728 fields to compute alignment
35730 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
35732 * appdomain.c (mono_appdomain_get): impl.
35733 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
35735 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
35737 * icall.c: ignore "file://" prefix when loading an assembly.
35739 2002-01-23 Dick Porter <dick@ximian.com>
35743 * Makefile.am: Added socket support
35745 2002-01-23 Miguel de Icaza <miguel@ximian.com>
35747 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
35748 code back. This should return the assemblies that are loaded by
35749 the runtime on behalf of an application domain.
35751 The current implementation is still broken, it just returns every
35752 assembly loaded, but until we get real applications domain this
35755 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
35757 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
35760 2002-01-23 Miguel de Icaza <miguel@ximian.com>
35762 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
35763 the mono_class_from_name lookup.
35764 (ves_icall_get_parameter_info): ditto.
35765 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
35767 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
35769 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
35771 * class.c: load also nested classes on class init.
35772 System.ValueType instance methods gets passed boxed
35773 values, unless methods in derived classed that get a pointer to the
35775 * icall.c: use better name parsing code in GetType().
35776 * image.c, image.h: add mono_image_loaded ().
35777 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
35778 * reflection.c, reflection.h: added mono_reflection_parse_type().
35780 2002-01-22 Veronica De Santis <veron78@interfree.it>
35782 * icall.c : Added mapping of internal calls for Manual and Auto reset events
35783 * threads.c : Added the implementation of internal calls for events
35784 * threads.h : Added prototypes of internal calls for events
35786 2002-01-21 Radek Doulik <rodo@ximian.com>
35788 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
35790 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
35792 * class.c (mono_class_init): set min_align to 1 (instead of 0)
35793 (mono_class_value_size): use min_align
35795 2002-01-20 Dick Porter <dick@ximian.com>
35798 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
35799 so it compiles on w32.
35801 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
35803 * metadata.c (mono_type_stack_size): impl.
35805 * class.c (mono_class_get_field): impl. memberref token
35807 2002-01-16 Veronica De Santis <veron78@@interfree.it>
35809 * icall.h : Added the internal calls mapping for CreateMutex_internal
35810 and ReleaseMutex_internal.
35811 * threads.h : Added the prototype of mutexes internal calls.
35812 * threads.c : Added the implementations of mutexes internal calls.
35814 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
35816 * metaparse.h: removed unused file.
35817 * reflection.c, reflection.h: added stream_data_align () function
35818 to align data in streams and keep stream aligned. Add support for
35819 exception support in method headers.
35821 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
35823 * unicode.c: make iconv_convert () return the number of bytess written
35824 in the output buffer.
35826 2002-01-15 Dick Porter <dick@ximian.com>
35827 * threads.c: Make the runtime's idea of infinite timeouts coincide
35828 with the class library's
35830 Fix a particularly egregious bug in mono_thread_cleanup(). That
35831 code was so utterly bogus it must have been written on a Monday.
35833 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
35835 * reflection.h: add subtypes field to TypeBuilder.
35836 * reflection.c: encode constants for literal fields.
35837 Handle subtypes. Fix user string token (and add a zero byte)
35840 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
35842 * class.c (mono_class_init): bug fix: assign slot numbers for
35845 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
35847 * reflection.c: don't try to output a code RVA for abstract methods.
35848 Small fixes for method header format. Output parameter info to the
35849 ParamDef table. Save method overriding info to MethodImpl table.
35850 Fix property support. Allow typedef.extends to be a type in the
35852 * verify.c: fix off-by-one error.
35854 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
35856 * class.c: fix mono_class_from_mono_type () for szarray types.
35857 Remove unused cache check in mono_class_from_type_spec().
35858 * icall.c: *type_from_name () functions handle simple arrays and byref.
35859 * reflection.c: handle byref and szarray types. Handle methods without
35860 body (gets P/Invoke compilation working). Handle types and fields in
35862 * reflection.h: add rank to MonoTypeInfo.
35864 2002-01-10 Dick Porter <dick@ximian.com>
35866 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
35869 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
35871 * icall.c: initialize class in type_from_handle ().
35872 Loop also in parent classes for get_method ().
35873 * reflection.c: properly encode class and valuetype types.
35874 Start on encoding TypeBuilder types. Handle fieldrefs.
35875 Use correct length when registering a user string.
35876 Handle ConstructorBuilder and MonoMethod in get_token ().
35877 Make mono_type_get_object () aware of cached types.
35878 * object.c: back out change to mono_string_new ().
35880 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
35881 * object.c: mono_string_new should return a NULL when the string
35882 passed in is NULL -- not try to deference it.
35884 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
35886 * icall.c: hack to make IsSubType work for TypeBuilders.
35887 * reflection.c: emit constructors before methods.
35888 Retrieve param names in mono_param_get_objects().
35890 2002/01/05 Nick Drochak <ndrochak@gol.com>
35892 * Makefile.am: fix list of headers and sources so automake 1.5
35893 doesn't complain. Removed \# at end of list.
35895 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
35897 * reflection.c: get token for a method ref. Set return type of
35898 constructor to void.
35899 * loader.c: debug message.
35900 * class.c: typo fix.
35902 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
35904 * icall.c: fix array init with rank > 1. FindMembers
35905 loops in parent class as well.
35906 * image.c: do not insert nested types in name cache.
35907 * reflection.c: warning fix.
35908 * reflection.h: add override method (for interface impl).
35910 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
35912 * metadata.c: fix customattr decoding.
35914 2001-12-21 Miguel de Icaza <miguel@ximian.com>
35916 * rawbuffer.cs: Added native Win32 implementation, avoids using
35917 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
35919 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
35921 * class.c: make the low-level routines handle the cache.
35923 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
35925 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
35927 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
35929 * class.c: fix mono_array_element_size() for objects.
35930 * class.h, class.c: add properties to MonoClass and load them
35932 * icall.c: check with isinst() when assigning a value to an array
35933 instead of requiring the classes to match exactly.
35934 Implemented icall for System.Type::GetType().
35935 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
35936 enums. Handle bindingflags when looking for methods and fields.
35937 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
35938 and mono_metadata_methods_from_property().
35939 * reflection.h, reflection.c: added structures for propreties,
35940 parameters and enums. Implemented mono_property_get_object() and
35941 mono_param_get_objects().
35943 2001-12-18 Dick Porter <dick@ximian.com>
35945 * file-io.c: Use mono_string_to_utf16() instead of
35946 mono_string_chars()
35948 * object.c: Added mono_string_to_utf16(), which copies the non
35949 NULL-terminated MonoString into a new double-null-terminated
35952 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
35954 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
35956 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
35958 * file-io.c: raise exceptions if handle is invalid.
35960 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
35962 * assembly.c: yet another check for mscorlib.
35963 * class.c, class.h: load nesting info for classes.
35964 * icall.c: many new functions to support the Reflection classes.
35965 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
35966 * reflection.h, reflection.c: mono_image_create_token(),
35967 mono_assembly_get_object(), mono_type_get_object(),
35968 mono_method_get_object(), mono_field_get_object(): methods to return
35969 objects that parallel the C representation of assemblies, types,
35972 2001-12-11 Dick Porter <dick@ximian.com>
35975 * file-io.c: Internal calls for file IO.
35977 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
35979 * tabledefs.h: missing FileAttributes.
35980 * verify.h, verify.c: use is_valid_string () to simplify and check for
35981 valid strings more correctly. Fix warnings and speeling.
35982 Check more tables: Filed, File, ModuleRef, StandAloneSig.
35983 Check code: branches, maxstack, method calls.
35985 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
35987 * object.c (mono_object_allocate): removed static, so that the jit
35988 can allocate value types.
35990 * icall.c (ves_icall_System_DateTime_GetNow): impl.
35992 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
35994 * class.c: init enum types right away and register the
35995 token->MonoClass map in mono_class_create_from_typedef ().
35996 * verify.h, verify.c: first cut of the verifier.
35997 * pedump.c: add --verify switch to verify metadata tables.
35998 * tabledefs.h: add some missing enums.
36000 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
36002 * class.c (mono_install_runtime_class_init): impl.
36003 (mono_class_init): renamed mono_class_metadata_init to
36004 mono_class_init, also removed the metadata_inited flag
36006 * object.c (mono_object_isinst): use faster algorithm
36008 2001-11-30 Radek Doulik <rodo@ximian.com>
36010 * mono-endian.h: reverted last change
36011 added function prototypes
36013 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
36014 add mono-endian.c back
36016 * mono-endian.c: returned back, as Paolo pointed out, it's needed
36017 for unaligned access, I've mistaked it with endianess. I am
36019 (mono_read16): fix reverted endianess
36020 (mono_read64): ditto
36021 (mono_read32): ditto
36023 2001-11-30 Dick Porter <dick@ximian.com>
36025 * exception.c: Implement mono_exception_from_name()
36027 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
36029 * metadata.h, metadata.c: remove params_size and locals_size and their
36030 calculation from the metadata code: they are only usefult to the
36033 2001-11-29 Radek Doulik <rodo@ximian.com>
36035 * object.c (mono_ldstr): swap bytes here, it's probably not the
36036 best place, but works for me now, I'll redo it once I know mono
36037 better, also note that I add PROT_WRITE and don't reset back, also
36038 note that it's only affects big endians, so x86 should be OK
36040 * mono-endian.h (read16): use just glib macros for both endians
36042 * mono-endian.c: removed as glib macros are used in in
36043 mono-endian.h so we don't need to care about endianess for read
36044 macros as glib does that for us already
36046 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
36048 * class.h, class.h: take minimum alignment into consideration so
36049 that the fields of a class remain aligned also when in an array.
36051 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
36053 * loader.h, loader.c: add mono_method_get_param_names().
36054 * class.c: 0-init class fields.
36056 2001-11-26 Dick Porter <dick@ximian.com>
36060 * threads.c: New file that handles System.Threading on all platforms
36063 * object.h: Remove the synchronisation struct from MonoObject,
36064 replace it with a pointer that gets initialised on demand
36066 * Makefile.am: Replace all the system-specific threading code with
36067 a single file that uses the new wrapper library
36069 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
36071 * class.c, class.h: add mono_install_trampoline() so that the runtime
36072 can register a function to create a trampoline: removes the ugly
36073 requirement that a runtime needed to export arch_create_jit_trampoline.
36074 * object.h, object.c: added mono_install_handler() so that the runtime
36075 can install an handler for exceptions generated in C code (with
36076 mono_raise_exception()). Added C struct for System.Delegate.
36077 * pedump.c: removed arch_create_jit_trampoline.
36078 * reflection.c: some cleanups to allow registering user strings and
36079 later getting a token for methodrefs and fieldrefs before the assembly
36081 * row-indexes.h: updates and fixes from the new ECMA specs.
36083 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
36085 * class.h, class.c: add enum_basetype field to MonoClass.
36086 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
36087 to get index in the constant table reated to a field, param or
36089 * reflection.h, reflection.c: handle constructors. Set public-key and
36090 version number of the built assembly to 0.
36091 * row-indexes.h: update from new ECMA spec.
36093 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
36095 * class.h, class.c: add a max_interface_id to MonoClass.
36096 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
36097 since it's used to do that. Added mono_type_type_from_obj().
36098 Make GetType() return NULL instead of segfaulting if the type was not
36099 found. Handle simple arrays in assQualifiedName.
36100 * object.h: add a struct to represent an Exception.
36101 * reflection.c: output call convention in method signature.
36102 Add code to support P/Invoke methods and fixed offsets for fields.
36104 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
36106 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
36108 * icall.c: use mono_array_addr instead of array->vector: fixes the
36109 reflection image writing.
36110 * reflection.c: init call convention byte to 0 in method signature.
36111 Encode the property signature. Don't output property-related methods
36112 twice. Really process the properties for a type (don't cast a field to
36113 a property, my mom always told me that).
36114 Fix 64 bit issues in pointer alignment in a different and more
36117 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
36119 * loader.h: Removed type class from MonoDefaults, added monotype
36121 * loader.c: Loaded MonoType, removed loading of Type
36123 * icall.c (my_mono_new_object): Now returns a System.MonoType,
36124 and fills in System.Type._impl with a RuntimeTypeHandle rather
36125 than the actual MonoClass *
36127 (ves_icall_type_from_handle): change from type_class to
36130 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
36133 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
36136 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
36138 (ves_icall_System_Reflection_Assembly_GetType): implemented
36140 (ves_icall_System_MonoType_assQualifiedName): implemented
36142 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
36144 2001-11-09 Miguel de Icaza <miguel@ximian.com>
36146 * assembly.c (mono_assembly_open): Implement a cache for the
36149 (mono_assembly_close): only destroy the assembly when the last
36152 2001-11-09 Dick Porter <dick@ximian.com>
36154 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
36156 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
36158 * class.c (mono_class_metadata_init): bug fix: compute the right slot
36160 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
36162 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
36163 from Martin Weindel.
36164 * object.h: add mono_string_chars ().
36166 2001-11-07 Miguel de Icaza <miguel@ximian.com>
36168 * reflection.c (build_compressed_metadata): Eliminates warnings
36169 and uses 64-bit clean code.
36171 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
36172 (mono_type_equal): Change signature to eliminate warnings.
36174 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
36176 * icall.c, loader.c: remove the internalcall array constructors.
36177 Changes to match the new MonoArray structure.
36178 * object.h, object.c: an array object doesn't allocate an extra
36179 vector. Add mono_array_new_full () to create jagged arrays easily.
36181 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
36183 * metadata.h, metadata.c: add mono_metadata_field_info () to
36184 retreive all the info about a field from vairous tables.
36185 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
36186 * class.h, class.c: augment MonoClassField with more info.
36187 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
36188 policy and load a field's RVA if needed.
36190 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
36192 * class.c (mono_class_metadata_init): create a trampoline for all
36193 virtual functions instead of actually compiling them.
36195 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
36197 * class.h, class.c: include name in MonoClassField.
36198 * class.c: fix fundamental type of System.Object and System.String.
36199 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
36201 * icall.c: remove internalcalls for the Reflection stuff that is now
36203 * loader.c: mono_field_from_memberref () implementation.
36204 * mono-endian.c: thinko (s/struct/union/g).
36205 * object.c, object.h: make the mono_string_* prototypes actually use
36206 MonoString instead of MonoObject.
36207 * reflection.c, reflection.h: updates for changes in the reflection
36208 code in corlib: we use C structures that map to the actual C# classes.
36209 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
36210 fat method header if needed and use the info from the ILGenerator for
36211 methods. Handle fields in types. Misc fixes.
36213 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
36215 * class.c (mono_class_metadata_init): bug fix: always allocate
36216 space for static class data
36218 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
36220 * class.c (mono_compute_relative_numbering): use relative
36221 numbering to support fast runtime type checks.
36223 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
36225 * class.c (mono_class_create_from_typeref): added debugging output
36226 to print class name when MonoDummy is returned instead of real class
36228 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
36230 * class.c (mono_class_metadata_init): interface offset table now
36231 contains pointers into the vtable - this is more efficient for the jit
36233 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
36235 * class.c (mono_class_metadata_init): use a temporary vtable (the
36236 old algorithm only worked for the interpreter, but not for the jit)
36238 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
36240 * loader.c (method_from_memberref): use mono_class_get to get the
36241 class of an array instead of using System.Array directly.
36242 (mono_get_method): also add MEMBERREF methods to the method cache
36243 which usefull for arrays.
36245 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
36247 * pedump.c (arch_compile_method): added to compute vtable entry
36249 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
36250 number of interfaces.
36252 * class.h: merged MonoArrayClass into MonoClass
36254 * class.c (mono_class_create_from_typedef): compute the vtable size and
36255 allocate space to include the vtable inside MonoClass
36256 (mono_class_metadata_init): initialize the vtable
36258 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
36260 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
36261 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
36262 * image.c: endian fixes by Laurent Rioux.
36263 * object.h, object.c: rename MonoStringObject to MonoString and
36264 MonoArrayObject to MonoArray. Change some function names to conform to
36265 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
36266 guint16* as first argument, so don't use char*.
36267 Provide macros to do the interesting things on arrays in a portable way.
36268 * threads-pthread.c: updates for the API changes and #include <sched.h>
36269 (required for sched_yield()).
36270 * icall.c: updates for the API changes above.
36271 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
36272 platforms that need them.
36274 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
36276 * class.c: set the correct type for all the fundamental
36277 type when loading the class.
36279 2001-10-05 Dick Porter <dick@ximian.com>
36281 * threads-pthread.c (pthread_mutex_timedlock): Simple
36282 compatibility version for C libraries that lack this call.
36284 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
36286 * class.c: MonoTypes stored in MonoClass are stored as
36287 fundamental MonoTypes when the class represents a
36288 fundamental type (System.Int32, ...).
36289 The TypeHandle return by ldtoken is a MonoType*.
36290 * icall.c: ves_icall_get_data_chunk () write out all the
36291 PE/COFF stuff. Implement ves_icall_define_method (),
36292 ves_icall_set_method_body (), ves_icall_type_from_handle ().
36293 * image.c: properly skip unknown streams.
36294 * loader.h, loader.c: add type_class to mono_defaults.
36295 * metadata.c, metadata.h: export compute_size () as
36296 mono_metadata_compute_size () with a better interface.
36297 Typo and C&P fixes.
36298 * pedump.c: don't try to print the entry point RVA if there is no entry point.
36299 * reflection.c, reflection.h: many cleanups, fixes, output method
36300 signatures and headers, typedef and typeref info, compress the metadata
36301 tables, output all the heap streams, cli header etc.
36302 * row-indexes.h: typo fixes.
36304 2001-10-04 Dick Porter <dick@ximian.com>
36306 * object.h: Add a synchronisation mutex struct to MonoObject
36308 * object.c (mono_new_object): Initialise the object
36309 synchronisation mutexes
36311 * icall.c: System.Threading.Monitor internal calls
36313 * threads-pthread.h:
36314 * threads-pthread.c: System.Threading.Monitor internal calls
36316 * threads-types.h: New file, includes the system-specific thread
36319 * threads-pthread-types.h:
36320 * threads-pthread-types.c: New files, handle pthread-specific
36321 synchronisation types
36323 * threads-dummy-types.h:
36324 * threads-dummy-types.c: New files of dummy support for
36325 thread-specific types
36329 * pedump.c: include mono-endian.h not endian.h
36331 * Makefile.am: More threads files.
36332 Name mono-endian.h not endian.h
36334 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
36336 * Makefile.am, reflection.h, reflection.c: move here the reflection related
36337 stuff and implement a few more bits.
36338 * icall.c: a field needs to be dereferenced twice. Do not use the same
36339 name for two variables in the same scope.
36340 * image.c, image.h: cleanups.
36342 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
36344 * class.c (mono_class_metadata_init): bug fix: compute the right size
36346 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
36348 * icall.c: implemented some of the Reflection internalcalls.
36349 * image.c, image.h: start writing out the PE/COFF image.
36350 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
36351 that does the reverse than decode_blob_size ().
36352 * object.c: use mono_metadata_encode_value (). Move here
36353 temporary implementation of mono_string_to_utf8 ().
36354 * rawbuffer.c: make malloc_map static.
36356 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
36358 * metadata.c: fix type comparison for arrays.
36359 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
36360 Added a couple of new classes to monodefaults.
36361 * icall.c: added a couple of Reflection-related internalcalls.
36362 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
36363 Added a byval_arg MonoType to MonoClass.
36365 2001-09-28 Dick Porter <dick@ximian.com>
36368 * threads-pthread.h:
36369 * threads-pthread.c: Implemented internal calls for
36370 LocalDataStoreSlot operations. Applied mutexes around all shared
36371 data. Reworked the thread creation and Start() operations to
36372 avoid a race condition.
36375 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
36377 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
36379 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
36381 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
36383 * class.c, loader.c: warn and return NULL instead of erroring out.
36384 * icall.c: added System.AppDomain::getCurDomain().
36385 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
36387 2001-09-25 Dick Porter <dick@ximian.com>
36389 * threads-pthread.h:
36390 * threads-pthread.c: Implemented timed thread joining and added
36391 System.Threading.Thread::Join_internal internal call
36393 * icall.c: Added System.Threading.Thread::Join_internal internal call
36396 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
36398 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
36400 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
36401 mono_string_intern () to implement the semantics of the ldstr opcode
36402 and the interning of System.Strings.
36403 * icall.c: provide hooks to make String::IsIntern and String::Intern
36406 2001-09-23 Dick Porter <dick@ximian.com>
36409 * threads-dummy.h: New files of dummy threading routines
36411 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
36412 support code based on system specifics
36414 Rename PTHREAD_LIBS to THREAD_LIBS
36416 2001-09-23 Dick Porter <dick@ximian.com>
36418 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
36419 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
36421 (mono_thread_init): Set up a Thread object instance to return when
36422 the main thread calls Thread.CurrentThread
36423 (mono_thread_cleanup): Wait for all subthreads to exit
36425 * icall.c: New internal calls for System.Threading.Thread::Sleep
36426 (including Schedule) and CurrentThread
36428 * threads.h: New file, to insulate thread-specific stuff from the
36431 2001-09-21 Dick Porter <dick@ximian.com>
36433 * threads-pthread.h:
36434 * threads-pthread.c: New file, for handling pthreads-style
36435 threading support. Start() now starts a new thread and executes
36436 the ThreadStart delegate instance.
36438 * icall.c: Added the internalcall for
36439 System.Threading.Thread::Start_internal
36441 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
36443 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
36445 * loader.c: work around the different signatures for delegates
36446 constructors csc generates in compiled code vs the ones compiled in mscorlib.
36448 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
36450 * class.h, class.c: add mono_class_get_field_from_name ().
36451 * *: Fix C comments and other ANSI C issues.
36453 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
36455 * endian.h, assembly.c: fix some endianness issues.
36457 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
36459 * loader.h, load.c: add delegate_class to mono_defaults.
36460 Handle runtime provided methods in mono_get_method ().
36462 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
36464 * loader.c (mono_get_method): use pinvoke for internal call
36466 * icall.c: use pinvoke for internal call
36468 * loader.c (method_from_memberref): set the method name
36470 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
36472 * metadata.c: help the compiler generate better code for
36473 mono_class_from_mono_type ().
36475 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
36477 * class.c (mono_class_metadata_init): delayed computing of the
36478 class size to mono_class_metadata_init ()
36480 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
36482 * class.c, class.h: add an interfaces member to MonoClass.
36483 * image.c, image.h: add assembly_name field to MonoImage
36484 from the assembly table.
36485 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
36487 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
36489 * class.c: Handle Array in mono_class_from_mono_type ().
36490 * metadata.c, pedump.c: some endian fixes.
36492 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
36494 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
36495 * metadata.c: fix small problem introduced with the latest commit.
36497 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
36499 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
36500 We don't need a MonoMetadata pointer anymore to compare signatures in
36501 mono_metadata_signature_equal (), update callers.
36502 Reduced memory usage an number of allocations for MonoMethodHeader and
36503 MonoMethodSignature.
36505 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
36507 * metadata.c: added compare for szarray.
36509 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
36511 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
36512 and add a couple more types to it and mono_defaults. Give an hint on
36513 classes that need implementing in our corlib and are referenced
36516 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
36518 * class.h, class.c: keep track if a class is also an Enum.
36519 * loader.c: Implement a couple more types for use in libffi
36520 marshalling. Gives better diagnostics when failing to dlopen
36521 a library. Set method->klass for P/Invoke methods, too.
36523 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
36525 * class.c, class.h: add a MonoType this_arg to MonoClass that
36526 represents a pointer to an object of the class' type that
36527 can be used by the interpreter and later the type cache.
36528 Add best guess alignment info for valuetype objects.
36530 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
36532 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
36533 into MonoType: one less level of indirection and allocation and
36534 simplifies quite a bit of code. Added cache for MonoTypes that are
36535 used frequently, so that we don't need to allocate them all the time.
36537 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
36539 * class.c (mono_class_create_from_typedef): System.Enum is also a
36540 value type, although it does not derive from System.ValueType
36541 (maybe a bug in the ms compiler?)
36543 * metadata.c (mono_type_size): return the right size for value types
36545 * loader.c (mono_get_method): only initialize method header if not abstract
36547 * class.c (mono_class_from_mono_type): use mono_default values.
36549 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
36551 * *: use MonoClass pointers instead of <type_tokens>
36553 * class.h: new flag: metadata_inited.
36555 * class.c (mono_class_metadata_init): impl.
36556 (mono_class_instance_size): impl.
36557 (mono_class_data_size): impl.
36559 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
36561 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
36562 MonoClass now has the name and name_space fields.
36563 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
36564 mono_get_method () takes and optional MonoClass as argument.
36565 Removed mono_typedef_from_name() and added mono_class_token_from_name()
36566 instead that takes advantage of a map from class names to typedef
36567 tokens in MonoImage.
36569 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
36571 * metadata.c: zero is not a valid alignment boundary.
36572 Merge MONO_TYPE_VOID in default decoding code.
36574 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
36576 * image.h: merged MonoMetadata into MonoImage
36578 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
36579 identify the type of elements.
36581 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
36583 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
36584 * cil-coff.h: split MonoMSDOSHeader and add size info.
36585 * image.c: add some consistency checks.
36586 * metadata.c: fix row size computation: one programmer
36587 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
36588 add explanation for the locator routine.
36589 Fix decoding of size in method header.
36591 2001-08-20 Miguel de Icaza <miguel@ximian.com>
36593 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
36594 (g_concat_dir_and_file): Bring g_concat_dir_and_file
36595 function from gnome-libs. This uses the right path separator
36596 based on the OS, and also works around a bug in some systems where
36597 a double slash is not allowed.
36598 (default_assembly_name_resolver): Use g_concat_dir_and_file
36599 (mono_assembly_open): ditto.
36601 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
36603 * metadata.c (mono_metadata_signature_equal): impl.
36605 * *: void is now a realy MonoType (instead of using NULL)
36607 * metadata.c (do_mono_metadata_parse_type): use
36608 mono_metadata_parse_type to parse void value.
36610 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
36612 * metadata.c, metadata.h: in the signature and method header store
36613 only the space required for holding the loca vars and incoming arguments.
36615 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
36617 * metadata.c (do_mono_metadata_parse_type): treat void like any
36618 other type (instead of assigning NULL);
36620 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
36622 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
36624 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
36626 * image.c (do_mono_image_open): added a cache for arrays.
36628 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
36630 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
36631 decode a single column from a row in a metadata table and changes
36632 to take advantage of it in the typedef locator (gives a nice speed up).
36633 Store offset info for function params.
36635 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
36637 * image.h (MONO_IMAGE_IS_CORLIB): removed
36639 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
36641 * assembly.c: how could mono_assembly_close () had ever worked?
36642 * metadata.c, metadata.h: provide offset info for local vars.
36643 Implement mono_type_size () to take care of alignment as well
36644 as size (it was mono_field_type_size in cli/class.c before).
36646 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
36648 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
36650 * assembly.h (CORLIB_NAME): set to corlib.dll
36652 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
36654 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
36656 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
36657 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
36658 tokentype.h: massive namespace cleanup.
36660 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
36662 * metadata.h, metadata.c: decode exception clauses when parsing method header.
36664 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
36666 * metadata.c (mono_metadata_free_type): added check for type !=
36667 NULL (void) before calling mono_metadata_free_type()
36669 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
36671 * metadata.h, row_indexes.h: added header with enumerations to use
36672 to index in the columns from tables in metadata and to decode coded
36673 tokens: we should start using this instead of embedding magic numbers
36676 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
36678 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
36679 Move metadata_t info from cli_image_info_t to MonoImage, where
36680 it's easily accessible. Changed all the uses accordingly.
36681 Added the method and class caches to MonoImage.
36682 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
36683 and mono_metadata_decode_value () signature to be more consistent
36684 with the other parse functions (and simplify code). Taken advantage
36685 of zero-length array allocation with GCC. Removed reduntant (and
36686 wrong) MonoFieldType struct and use MonoParam instead. Changed
36687 mono_metadata_parse_field_type () to use common code for parsing.
36688 Added mono_metadata_typedef_from_field () and
36689 mono_metadata_typedef_from_method () to lookup a typedef index from a
36690 field or method token.
36691 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
36693 2001-07-23 Miguel de Icaza <miguel@ximian.com>
36695 * metadata.c (mono_metadata_parse_field_type): Implement.
36696 (do_mono_metadata_parse_type): Split engine from
36697 mono_metadata_parse_type, so that we can create smaller structures
36698 for things that just have one pointer to the MonoType (look at
36701 2001-07-20 Miguel de Icaza <miguel@ximian.com>
36703 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
36704 as Jan Gray found out, it is incorrect.
36706 2001-07-18 Miguel de Icaza <miguel@ximian.com>
36708 * assembly.c: Implement asssembly loading. This loads an image
36709 and loads all the referenced assemblies. Come to think of it, we
36710 could always do lazy loading of the assemblies.
36712 * image.c (mono_image_open): Keep loaded images in a hashtable.
36714 * image.h (MonoImage): Add reference count.
36716 2001-07-17 Miguel de Icaza <miguel@ximian.com>
36718 * assembly.c (mono_assembly_open): Keep track of the file name in
36719 case the assembly has no ASSEMBLY table.
36721 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
36724 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
36726 * metadata.c, metadata.h: decode local vars in method header
36727 parse function. Change callers accordingly.
36729 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
36731 * metadata.h, cil-coff.h: protect against multiple inclusion.
36732 Added some new structures to hold information decoded from metadata:
36733 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
36734 and relevant decoding/free functions.
36735 * metadata.c: implement decoding functions. Add warning for out of bounds
36736 index in mono_metadata_locate(). Implement mono_get_method () to retreive
36737 all the info about a method signature and invocation. Remove check on
36738 uninitialized local var in parse_mh() and fix memory leak.
36740 2001-07-12 Miguel de Icaza <miguel@ximian.com>
36742 * metadata.h: More macros.
36744 * tokentype.h: New file.
36746 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
36748 * assembly.c: added a consistency check and initialize
36749 some structures with g_new0().
36750 * metadata.c: fixed a couple more bugs in table size computation
36751 and add other checks for out-of bound access to metadata.
36753 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
36755 * metatada.c: fix bugs computing table sizes. Spew a
36756 warning when index in string heap is out of bounds.
36758 2001-07-04 Miguel de Icaza <miguel@ximian.com>
36760 * metadata.h: Add a couple of macros to manipulate tokens.
36762 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
36764 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
36765 cli_section_tables).
36767 2001-07-01 Miguel de Icaza <miguel@ximian.com>
36769 * metadata.c (mono_metadata_user_string): New function, provides
36770 access to the UserString heap.
36772 2001-06-27 Miguel de Icaza <miguel@ximian.com>
36774 * metadata.c: Add inline documentation.
36776 2001-06-26 Miguel de Icaza <miguel@ximian.com>
36778 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
36781 2001-06-22 Miguel de Icaza <miguel@ximian.com>
36783 * typeattr.h: New file, TypeAttribute flags.
36785 2001-06-21 Miguel de Icaza <miguel@ximian.com>
36787 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
36788 mono_assembly_ensure_section): Section loading code.
36789 (load_section_tables): Load the sections.
36791 * mono/metadata/metadata.c (mono_metadata_locate_token,
36792 mono_metadata_locate): Functions to locate the information
36793 definition given a token or a table and an index.
36794 (mono_metadata_compute_table_bases): New.
36795 (compute_size): New function to compute the sizes of the various
36798 * mono/metadata/metadata.h: Finish listing the different index
36801 * mono/metadata/pedump.c: Improve to dump new information.
36803 2001-06-19 Miguel de Icaza <miguel@ximian.com>
36805 * mono/metadata/metadata.c: Entered all the tables matching
36808 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2