1 2010-03-26 Andreas Färber <andreas.faerber@web.de>
3 * null-gc.c (mono_gc_invoke_with_gc_lock): Fix function name.
5 Code is contributed under MIT/X11 license.
7 Fri Mar 26 11:33:17 CET 2010 Paolo Molaro <lupus@ximian.com>
9 * object.c, threads.c, threads-types.h, threads.h: make the
10 managed thread local storage references precisely tracked.
12 2010-03-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
14 * threadpool.[ch]: reworked the threadpool:
15 -Threadpool threads use a work-stealing queue. Adding a work
16 item from a threadpool thread will queue it in the thread
17 local queue without locking (in most cases).
18 -epoll events are coalesced before being added to the IO
20 -Dynamically change the number of active threads
21 -Changed the global queue to be more GC friendly
23 * class-internals.h: add 2 new performance counters for the number of
24 threads in the threadpool and the IO threadpool.
26 * object-internals.h: new field in MonoAsyncResult.
27 * icall-def.h: new internal call for queueing work items.
29 * Makefile.am: add 2 new files.
31 * appdomain.c: bump up corlib version.
33 * mono-wsq.[ch]: an implementation of a work-stealing queue.
35 * mono-perfcounters-def.h:
36 * mono-perfcounters.c: added 2 new performance counters.
38 2010-03-26 Mark Probst <mark.probst@gmail.com>
40 * sgen-gc.c: More FIXME/TODO updates.
42 2010-03-25 Mark Probst <mark.probst@gmail.com>
44 * gc-internal.h, sgen-gc.c, sgen-gc.h, boehm-gc.c, null-gc.c: New
45 function mono_gc_invoke_with_gc_lock() which invokes a function
46 with the guarantee that no collection will occur during its execution.
48 2010-03-25 Mark Probst <mark.probst@gmail.com>
50 * sgen-gc.c: Update a few comments.
52 2010-03-24 Rodrigo Kumpera <rkumpera@novell.com>
54 * reflection.c: Add support for new v4 type
55 System.Reflection.MonoAssembly that is the concrete version
56 of Assembly which is abstract unver v4.
58 2010-03-24 U-anarquia\miguel <miguel@anarquia>
60 * reflection.c (mono_reflection_get_custom_attrs_info): Protect
61 code that uses System.Reflection.Emit in DISABLE_REFLECTION_EMIT.
63 Expose a few macros that are needed for SR but not SRE to the
64 world (previous inside the SRE ifdef)
66 2010-03-24 Mark Probst <mark.probst@gmail.com>
68 * sgen-gc.c (gc_register_current_thread): We need
69 stack_start_limit as well in the non-attribute pthread case.
71 2010-03-23 Rodrigo Kumpera <rkumpera@novell.com>
73 * threads.c: Fix windows build.
75 2010-03-22 Rodrigo Kumpera <rkumpera@novell.com>
77 * thread-types.h: Add mono_thread_resume_interruption.
79 * threads.c: Add mono_thread_resume_interruption, this
80 function should be called after the last protected handler
81 found at interruption time has finished.
83 2010-03-22 Rodrigo Kumpera <rkumpera@novell.com>
85 * threads.c (ves_icall_System_Threading_Thread_ResetAbort):
86 Check MonoInternalThread's ::state instead of ::abort_exc
87 since the later can be lazily created.
89 This is specially problematic when running a finally block
90 under AbortRequested state. ResetAbort must work, but the
91 abort_exc object has not been created because interruption
94 2010-03-22 Geoff Norton <gnorton@novell.com>
96 * locales.c: Its possible for CFStringGetCStringPtr
97 to return null and not convert encodings. Use
98 CFStringGetCString instead.
100 Mon Mar 22 18:06:38 CET 2010 Paolo Molaro <lupus@ximian.com>
102 * class-internals.h, class.c, object.c: introduce compressed
103 interface bitmaps (for now only under small config): this saves
104 about 600 KB of runtime memory on gmcs bootstraps or monodevelop
107 Mon Mar 22 16:03:34 CET 2010 Paolo Molaro <lupus@ximian.com>
109 * mono-debug.c: don't try to get the method header, it causes a
110 deadlock and it is not used for anything anymore.
112 2010-03-22 Zoltan Varga <vargaz@gmail.com>
114 * loader.c (mono_method_get_marshal_info): Fix the handling of dynamic methods
115 broken by the last change.
117 2010-03-21 Andreas Färber <andreas.faerber@web.de>
119 * socket-io.c: Don't depend on AF_SNA, AF_DECnet,
122 Code is contributed under MIT/X11 license.
124 2010-03-20 Sanjoy Das <sanjoy@playingwithpointers.com>
126 * sgen-gc.c (mono_gc_get_write_barrier): Handle non-aligned
129 Code is contributed under MIT/X11 license.
131 2010-03-19 Martin Baulig <martin@ximian.com>
133 * mono-debug.c (MonoDebugWrapperData): Replace `cil_code' with a
134 dummy field, containing an empty string.
135 (mono_debug_add_method): Don't call mono_disasm_code() for wrappers.
138 Fri Mar 19 17:26:43 CET 2010 Paolo Molaro <lupus@ximian.com>
140 * class.c: setup_interface_offsets() refactor to not call
141 mono_class_get_implemented_interfaces () more times than needed and
142 to reduce the runtime memory requirements to be O(num_interfaces)
143 instead of O(max_interface_id).
145 2010-03-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
147 * mono-mlist.[ch]: add mono_mlist_set_next ().
149 2010-03-16 Rodrigo Kumpera <rkumpera@novell.com>
151 * domain-internals.h: Add MonoTryBlockHoleJitInfo struct and
152 associated changes to support holes in the protected range of a
155 * domain.c: Add mono_jit_info_get_try_block_hole_table_info, which
156 retrieves the holes table from a given MonoJitInfo.
158 Tue Mar 16 13:11:15 CET 2010 Paolo Molaro <lupus@ximian.com>
160 * object.h, object-internals.h, object.c, icall.c, gc-internal.h,
161 debug-helpers.c, cominterop.c, process.c, sgen-gc.c, socket-io.c:
162 hide the contents of the MonoString and MonoArray structs from the
163 public API. Change the accessor macros to accessors functions where
164 needed. Adjusted the array API to allow for pointer-sized lengths and
165 starting positions, so 64 bit arrays can be optionally provided in an
166 API compatible way if needed on 64 bit systems.
168 Tue Mar 16 10:18:07 CET 2010 Paolo Molaro <lupus@ximian.com>
170 * class-internals.h, class.c, loader.c, marshal.c, metadata.c,
171 reflection.c: the MonoMethodNormal struct is now unused, so remove it.
173 Mon Mar 15 18:28:00 CET 2010 Paolo Molaro <lupus@ximian.com>
175 * class-internals.h: remove the method header from MonoMethod since
176 from now on it will be transient. We have a header pointer for method
177 wrappers, since in that case we need to keep track of it. For this
178 reason, all the Reflection.Emit generated methods use MonoMethodWrapper
179 structs now. The same happens with MonoMethodInflated.
180 * class.c: reset the sre_method flag for inflated method structures:
181 this makes the code that cares look at the header in the MonoMethodInflated
183 * loader.c: lookup the method header in the appropriate field now that
184 it is removed from MonoMethod.
185 * metadata-internals.h: add a flag to the method header to know if it
186 can be freed inside mono_metadata_free_mh ().
187 * method-builder.c: updates after moving the header field from
188 MonoMethod to MonoMethodWrapper.
189 * reflection.c: MonoMethods generated from Reflection.Emit use
190 MonoMethodWrapper structs if they need a method header now (later take
191 advantage of this and remove all the current unsafe uses of method_aux_hash).
192 * metadata.c: make method header parsing not leak when verification
193 fails. Alloc it with g_malloc() and free it in mono_metadata_free_mh().
194 These changes save a few hundred KB of runtime memory in a mcs
195 bootstrap or a monodevelop startup.
197 2010-03-12 Rodrigo Kumpera <rkumpera@novell.com>
199 * verify.c: Improve error message.
201 2010-03-12 Jb Evain <jbevain@novell.com>
203 * reflection.c (add_exported_type): populate the exported
204 table with the type's nested type.
206 2010-03-10 Mark Probst <mark.probst@gmail.com>
208 * sgen-gc.c (STRING_SIZE): Semi-revert r153342. I'm an idiot who
209 can't read parentheses.
211 2010-03-10 Mark Probst <mark.probst@gmail.com>
213 * threads.c (thread_cleanup): Add a guard to dereferencing
214 "thread" to avoid an unlikely race condition.
216 2010-03-09 Sebastien Pouliot <sebastien@ximian.com>
218 * assembly.c: Fix crash in moon-unit when aname->culture is NULL
219 instead of an empty string.
221 2010-03-09 Zoltan Varga <vargaz@gmail.com>
223 * object-internals.h (_G_BOOLEAN_EXPR): Fix the definition of this to explicitly
224 convert to a boolean, recent gcc versions compile this differently.
226 2010-03-09 Zoltan Varga <vargaz@gmail.com>
228 * sgen-gc.c (safe_object_get_size): Avoid a function call so this can really be
231 2010-03-09 Mark Probst <mark.probst@gmail.com>
233 * sgen-gc.c (STRING_SIZE): Off by one.
235 2010-03-09 Mark Probst <mark.probst@gmail.com>
237 * sgen-archdep.h: Fix the signal context register access for
240 2010-03-09 Zoltan Varga <vargaz@gmail.com>
242 * sgen-gray.c: Get rid of the unused 'start' field in GrayQueueSection.
244 2010-03-08 Rodrigo Kumpera <rkumpera@novell.com>
246 * verify.c: Store the initial basic block returned by mono_basic_block_split
247 so we can release the whole list and not just the first one.
249 Mon Mar 8 17:30:44 CET 2010 Paolo Molaro <lupus@ximian.com>
251 * verify.c, debug-helpers.c, profiler.c, loader.c,
252 mono-basic-block.c, mono-debug.c, reflection.c: prepare to make
253 MonoMethodHeader a transient entity.
255 2010-03-08 Zoltan Varga <vargaz@gmail.com>
257 * sgen-gc.c (scan_needed_big_objects): Call drain_gray_stack () to avoid
258 uncontrolled growth of the gray stack.
260 * sgen-gray.c: Rewrite this so it behaves like a stack, not a queue, so recently
261 added items are removed first, improving cache locality. Avoid freeing queue
262 segments in the fast path, use the list of segments as the free list, truncate
263 it to its max size at the start of collection.
265 Mon Mar 8 10:13:52 CET 2010 Paolo Molaro <lupus@ximian.com>
267 * metadata-internals.h: more memory savings, both with small config and without.
270 Sat Mar 6 19:12:12 CET 2010 Paolo Molaro <lupus@ximian.com>
272 * appdomain.c, domain-internals.h, domain.c, object.c:
273 make class_vtable_hash into an array to reduce memory usage.
275 Sat Mar 6 18:16:35 CET 2010 Paolo Molaro <lupus@ximian.com>
277 * mempool.c, class-internals.h, class.c, icall.c, metadata.c,
278 object-internals.h, object.c, reflection.c, threadpool.c:
279 reduce resource usage when the small config is selected.
280 In particular, up to 64K of methods/fields/properties/events
281 are allowed and "other" methods in events are ignored.
283 Fri Mar 5 19:05:47 CET 2010 Paolo Molaro <lupus@ximian.com>
285 * threads.c: reduce resource usage when compiled for a small config.
287 2010-03-05 Mark Probst <mark.probst@gmail.com>
289 * sgen-gc.c: Also collect number of degraded-alloced objects with
292 2010-03-04 Geoff Norton <gnorton@novell.com>
294 * assembly.c: Only support OSX bundling if the bundle is
297 2010-03-04 Geoff Norton <gnorton@novell.com>
299 * loader.c: The marshal specs are freed at the end of the call
300 but it explicitly frees the strings as well as the container,
301 so we need to dup them too to avoid referencing free'd memory.
303 2010-03-04 Geoff Norton <gnorton@novell.com>
306 * icall.c: Add a new private internal icall to construct
307 an object from its type without running the ctor.
309 Thu Mar 4 15:37:09 CET 2010 Paolo Molaro <lupus@ximian.com>
311 * profiler.c: allow multiple profiler engines to be loaded
314 Wed Mar 3 20:19:45 CET 2010 Paolo Molaro <lupus@ximian.com>
316 * profiler-private.h, profiler.c, profiler.h, sgen-gc.c: introduce
317 profiler event to track object moves.
319 Wed Mar 3 19:20:39 CET 2010 Paolo Molaro <lupus@ximian.com>
321 * object.c, profiler.c, profiler.h, string-icalls.c:
322 remove the reduntant MONO_PROFILE_STRING_ALLOC profiler event.
324 2010-03-03 Miguel de Icaza <miguel@novell.com>
326 * decimal.c (mono_double2decimal): Add support for reducing the
327 scale of a decimal. It turns the 0.6000000000000 into 0.6 as
330 2010-03-03 Rodrigo Kumpera <rkumpera@novell.com>
333 * icall.c: Implement System.MonoType::get_core_clr_security_level icall.
335 2010-03-03 Marek Habersack <mhabersack@novell.com>
337 * mono-config.c (mono_config_parse_assembly_bindings): added -
338 parses assembly binding redirections from appdomain's config
341 * metadata-internals.h: added definition of a new function -
342 mono_config_parse_assembly_bindings - to support parsing assembly
343 binding redirections defined in appdomain's config file.
345 * domain-internals.h: added two new fields to _MonoDomain - a list
346 of assembly bindings and a flag to parse the config file only
349 * assembly.c (assembly_binding_maps_name): empty culture name and
350 NULL culture name are considered equal.
351 (mono_assembly_apply_binding): added support for domain specific
352 assembly binding redirections, read from the appdomain's
353 configuration file. Fixes bug #580185
355 Wed Mar 3 11:46:06 CET 2010 Paolo Molaro <lupus@ximian.com>
357 * appdomain.c, domain.c, icall.c, image.c, marshal.c, object.c,
358 reflection.c, socket-io.c, threadpool.c, threads.c: removed 1.1/1.0
361 2010-03-02 Rodrigo Kumpera <rkumpera@novell.com>
363 * reflection.c (mono_image_get_memberref_token): Extract mono_image_add_memberef_row
364 from this function. The new function receive the parent token instead of a type.
366 * reflection.c (mono_image_get_methodref_token_for_methodbuilder):
367 * reflection.c (mono_image_get_ctorbuilder_token): Use new function to encode
368 typebuilders. This make it possible to properly encode generic type builders since
369 their unmanaged type don't have generics data while unfinished.
373 2010-03-02 Mark Probst <mark.probst@gmail.com>
375 * sgen-gc.c, sgen-protocol.c, sgen-protocol.h: New facility for
376 writing binary log files (can be enabled by #define'ing
377 BINARY_PROTOCOL) for better debugging of timing-dependent bugs or
378 bugs in longer running programs.
380 Mon Mar 1 19:35:32 CET 2010 Paolo Molaro <lupus@ximian.com>
382 * metadata.c: added some API documentation.
384 2010-03-01 Robert Jordan <robertj@gmx.net>
386 * filewatcher.h: Include glib.h to fix the MSVC build.
388 2010-03-01 Zoltan Varga <vargaz@gmail.com>
390 * class-internals.h (MonoClass): Get rid of the reflection_info field, add
391 a GC handle instead. This is a bit slower to access, but avoids burdening the
392 GC with 100s of individual roots.
394 * reflection.c (mono_class_get_ref_info):
395 (mono_class_set_ref_info):
396 (mono_class_free_ref_info): New internal helper fuctions.
398 * reflection.c appdomain.c icall.c class.c: Use the new helper functions instead
399 of accessing klass->reflection_info directly.
401 * sgen-gc.c (alloc_complex_descriptor): Fix the computation of the number of
404 * gc.c (alloc_handle): Create a GC descriptor for the 'entries' array, free
407 2010-02-28 Zoltan Varga <vargaz@gmail.com>
409 * marshal.c (get_runtime_invoke_type): Avoid sharing byref with I, as the latter
410 needs an indirection.
412 2010-02-26 Zoltan Varga <vargaz@gmail.com>
414 * generic-sharing.c: Removed, moved its contents to mini/mini-generic-sharing.c,
415 so all generic sharing code is in one place.
417 * class.c (get_implicit_generic_array_interfaces): Fix the last change so
418 we don't call setup_interface_offsets () for unfinished types.
420 2010-02-26 Zoltan Varga <vargaz@gmail.com>
422 * class.c (mono_class_generic_sharing_enabled): Move this to
425 * image.c: Add an unload hook which is called before an image is unloaded.
427 * generic-sharing.c: Use the unload hook to unregister per-image data, to avoid
428 metadata.c having to depend on generic sharing.
430 Fri Feb 26 19:23:18 CET 2010 Paolo Molaro <lupus@ximian.com>
432 * class.c: reduce size of ridiculously large cache.
434 2010-02-26 Martin Baulig <martin@ximian.com>
437 (MONO_DEBUGGER_MINOR_VERSION): Bump to 5.
439 * threads.c (mono_thread_internal_reset_abort): New method; resets
440 the abort, but doesn't throw any exception if no abort was requested.
442 2010-02-26 Zoltan Varga <vargaz@gmail.com>
444 * class.c (get_implicit_generic_array_interfaces): Call
445 mono_class_setup_interface_offsets () before accessing
446 eclass->interface_offsets_count. This only shows up on platforms without IMT for
449 Thu Feb 25 12:12:44 CET 2010 Paolo Molaro <lupus@ximian.com>
451 * environment.c, environment.h, icall.c: make the GetOSVersionString()
454 Thu Feb 25 11:37:50 CET 2010 Paolo Molaro <lupus@ximian.com>
456 * metadata.c, metadata.h: make MONO_TYPE_IS* functional without
457 direct access to the MonoType fields.
459 2010-02-25 Zoltan Varga <vargaz@gmail.com>
461 * threads.h: Move some internal functions which were added to this header by
462 mistake to threads-types.h.
464 * class.c (mono_class_init): Get rid of mono_setup_vtable_in_class_init.
466 Wed Feb 24 17:45:27 CET 2010 Paolo Molaro <lupus@ximian.com>
468 * class-internals.h, class.h, object.h: make MonoRemoteClass
469 and mono_remote_class() internal.
471 Wed Feb 24 17:05:18 CET 2010 Paolo Molaro <lupus@ximian.com>
473 * metadata-internals.h, class-internals.h, metadata.h: make the
474 MonoType guts internal as well.
476 Wed Feb 24 16:02:42 CET 2010 Paolo Molaro <lupus@ximian.com>
478 * reflection.h: the MonoTypeNameParse guts are internal now.
479 * assembly.c, assembly.h, image.h: the MonoAssemblyName guts
480 are internal now, provide accessors as needed.
481 * metadata.h, metadata-internals.h: the MonoMethodSignature
482 guts are internal now.
483 * Makefile.am: mempool.h is an internal header now.
484 * *.h, *.c: remove glib.h usage from the public headers.
486 2010-02-24 Atsushi Enomoto <atsushi@ximian.com>
488 * culture-info-table.h : regenerated.
490 2010-02-22 Rodrigo Kumpera <rkumpera@novell.com>
492 * metadata.c: Add mono_method_get_header_summary which returns minimal
493 information about the header of a method. This is the information used
494 by the inline oracle to reject methods.
496 This method doesn't decode local variables and doesn't cache it's result,
497 so it should cause a minimal reduction in memory usage.
499 * metadata-internals.h: Add MonoMethodHeaderSummary structure and
500 mono_method_get_header_summary.
502 2010-02-22 Jeffrey Stedfast <fejj@novell.com>
504 * threads.c (mono_thread_exit): Make sure that the main thread is
505 non-null before dereferencing it.
507 2010-02-21 Geoff Norton <gnorton@novell.com>
509 * Makefile.am: Add CoreFoundation linkage on darwin to properly get the current
511 * locaes.c: When running on darwin, try to get the local from CoreFoundation
512 before falling back to the posix lookup.
514 2010-02-19 Zoltan Varga <vargaz@gmail.com>
516 * threads.c (mono_thread_suspend_all_other_threads): Ignore threads which have
517 the DONT_MANAGE flag set.
519 2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
521 * domain.c: Remove old v1 version strings. Let the runtime
522 default to 2.0 instead of failing because it can't find a
523 working 1.0 instalation.
525 2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
527 * domain.c: Add v4 RC version string.
529 2010-02-19 Rodrigo Kumpera <rkumpera@novell.com>
531 * mono-basic-block.c (mono_opcode_value_and_size): Use pointer variant
532 of overflow checking function.
534 2010-02-18 Rodrigo Kumpera <rkumpera@novell.com>
536 * reflection.c (mono_reflection_method_on_tb_inst_get_handle): Handle non
539 * reflection.c (mono_reflection_get_custom_attrs_info): Handle compiler context
540 cases for ParameterInfo.
544 2010-02-18 Zoltan Varga <vargaz@gmail.com>
546 * class.c (mono_class_get_cctor): Fix support for dynamic classes, which doesn't
547 have has_cctor set. Fixes #575946.
549 2010-02-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
551 * appdomain.c: display a warning if the parsing the config file
553 Skip the BOM in UTF-8 files.
554 Copy the AppDomainSetup before setting the privateBinPath so that the
555 correct configuration file is read.
557 2010-02-15 Zoltan Varga <vargaz@gmail.com>
559 * object.c: Instead of using one vtable trampoline, allow the JIT to use one
560 vtable trampoline per vtable slot index. Not used yet.
562 2010-02-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
565 * icall.c: add internal call that returns the system page size.
567 2010-02-13 Zoltan Varga <vargaz@gmail.com>
569 * debug-helpers.c (mono_method_desc_search_in_image): Handle short names like
570 'int' for system classes.
572 Fri Feb 12 18:36:02 CET 2010 Paolo Molaro <lupus@ximian.com>
574 * icall.c, icall-def.h: new icall to check for sufficient
577 2010-02-12 Mark Probst <mark.probst@gmail.com>
579 * reflection.c (ensure_complete_type): Check that reflection_info
580 is set, too. Fixes crash of corlib testsuite with -O=-all.
582 2010-02-11 Rodrigo Kumpera <rkumpera@novell.com>
585 * tabledefs.h: Add NoOptimization flag.
587 2010-02-10 Mark Probst <mark.probst@gmail.com>
589 * sgen-gc.c: Don't consider it a missing remset if the target
590 object is pinned - we might have done the store but not added the
593 2010-02-10 Mark Probst <mark.probst@gmail.com>
595 * sgen-gc.c: When checking for missing remsets, don't assert on
596 the first one, but print them all and then assert.
598 2010-02-10 Mark Probst <mark.probst@gmail.com>
600 * sgen-gc.c (find_in_remset_loc): Handle the small bitmap case.
602 2010-02-09 Miguel de Icaza <miguel@novell.com>
604 * console-unix.c: On OSX Control-Y is assigned to
605 VDSUSP (non-Posix), the
606 suspend-program-next-time-it-tries-to-read-input command (this is
607 different than C-z, which suspends immediately).
609 Do the same thing that bash does and ignore this setting,
610 making our repl/getline support pasting.
612 2010-02-10 Mark Probst <mark.probst@gmail.com>
614 * sgen-gc.c: Simple plausibility check for scan_starts.
616 2010-02-10 Mark Probst <mark.probst@gmail.com>
618 * sgen-gc.c: Round up when calculating the number of scan starts.
620 2010-02-10 Rodrigo Kumpera <rkumpera@novell.com>
622 * reflection.c: Export mono_get_object_from_blob.
624 * object-internals.h: Ditto.
626 * icall.c: New icall property_info_get_default_value to get the default
627 value of a property. Since using this is not common, no caching is done.
629 * icall-def.h: Add new icall.
631 2010-02-10 Rodrigo Kumpera <rkumpera@novell.com>
633 * class.c: Add mono_class_get_property_default_value.
635 * class-internal.h: Export mono_class_get_property_default_value.
637 2010-02-10 Rodrigo Kumpera <rkumpera@novell.com>
639 * reflection.c (mono_image_get_property_info): Encode the default value of a property.
641 Wed Feb 10 14:48:45 CET 2010 Paolo Molaro <lupus@ximian.com>
643 * sgen-gc.c: introduced critical regions to allow some lockless
644 operations and increase scalability.
646 2010-02-10 Geoff Norton <gnorton@novell.com>
648 * reflection.c: Support building with DISABLE_REFLECTION
650 2010-02-09 Gonzalo Paniagua Javier <gonzalo@novell.com>
652 * threadpool.c: Fixes for SetMinThreads and SetMaxThreads.
655 * exception.c: fix typo in comment.
657 2010-02-09 Rodrigo Kumpera <rkumpera@novell.com>
659 * icall.c (param_info_get_type_modifiers): Handle the case when the member object is a
660 property. This happens which instances returned by PropertyInfo::GetIndexParameters ().
662 * reflection.c (mono_reflection_get_custom_attrs_info): Ditto.
664 * object-internals.h: Export mono_class_is_reflection_method_or_constructor as part of
669 2010-02-09 Mark Probst <mark.probst@gmail.com>
671 * threads.c: Removed two assertions that were too strict. Added a
672 clarifying comment. Fixes #577090.
674 2010-02-08 Zoltan Varga <vargaz@gmail.com>
676 * domain.c (mono_jit_info_table_find): Avoid looking in the root domain, since
677 the caller has no way of knowing the domain which owns the returned MonoJitInfo.
679 * appdomain.c (create_exceptions): Call mono_thread_push/popappdomain_ref ().
681 * verify.c (mono_type_get_stack_name): Fix a warning.
683 2010-02-07 Zoltan Varga <vargaz@gmail.com>
685 * marshal.c (mono_marshal_get_wrapper_info): Rename from
686 mono_marshal_wrapper_info_from_wrapper.
688 * marshal.c (mono_marshal_set_wrapper_info): Rename from
689 mono_marshal_method_set_wrapper_data, and export.
691 * boehm-gc.c sgen-gc.c null-gc.c: Get rid of mono_gc_get_allocator_type, store
692 the allocator type in a AllocatorWrapperInfo structure instead, which is accesible
693 by calling mono_marshal_get_wrapper_info ().
695 * sgen-gc.c (mono_gc_get_managed_allocator): Add a specialized allocator for
696 small objects which does no size checks.
698 2010-02-05 Rodrigo Kumpera <rkumpera@novell.com>
700 * icall-def.h: Rename get_MetadataToken to GetMetadataToken.
702 2010-02-04 Rodrigo Kumpera <rkumpera@novell.com>
704 * verify.c (mono_method_verify): Use the new basic block formation pass
705 to avoid verifying dead basic blocks. This is the same behavior as the
708 2010-02-04 Rodrigo Kumpera <rkumpera@novell.com>
710 * mono-basic-block.c:
711 * mono-basic-block.h: New implementation of a basic block formation pass.
712 The formation pass does static liveness analysis as well to detect dead
715 2010-02-04 Zoltan Varga <vargaz@gmail.com>
717 * marshal.c (mono_marshal_get_native_wrapper): Emit a null check for the
718 'this' argument in icalls.
720 2010-02-02 Zoltan Varga <vargaz@gmail.com>
722 * reflection.c (resolve_object): Handle MonoArrayMethod. Fixes #575955.
724 2010-02-01 Mark Probst <mark.probst@gmail.com>
726 * object.c, domain.c: When using SGen, we must register
727 vtable->type as a root if it's not a MonoType, because then it
730 2010-02-01 Mark Probst <mark.probst@gmail.com>
732 * sgen-gc.c: Reset to_space_bumper to to_space_section->next_data
733 at the start of nursery collections, because we might have had
734 degraded allocations which changed next_data.
736 2010-01-30 Zoltan Varga <vargaz@gmail.com>
738 * marshal.c (mono_marshal_get_managed_wrapper): Avoid constructing the
739 custom attr so this function works in cross-compiling mode.
741 2010-01-29 Zoltan Varga <vargaz@gmail.com>
743 * class.c (make_generic_param_class): Initialize interface offsets since we
744 set klass->inited. Fixes #574819.
746 2010-01-28 Zoltan Varga <vargaz@gmail.com>
748 * domain.c (mono_domain_free): Send the END_UNLOAD profiler event before
749 calling the JIT domain cleanup hook.
751 2010-01-28 Rodrigo Kumpera <rkumpera@novell.com>
753 * pedump.c (main): Properly set the verifier mode when running the metadata
756 2010-01-28 Rodrigo Kumpera <rkumpera@novell.com>
758 * verify.c (verify_class_for_overlapping_reference_fields): Properly verify
759 overlapping fields now that we're called before has_references is set.
761 * pedump.c (dump_verify_info): Clear any loader error before verifying another
762 method. Otherwise all sort of weird stuff happens.
764 2010-01-27 Zoltan Varga <vargaz@gmail.com>
766 * object.c (mono_field_get_value_object): Handle nullable types correctly.
769 2010-01-25 Zoltan Varga <vargaz@gmail.com>
771 * icall.c (ves_icall_System_Array_SetValueImpl): Handle nullable types correctly.
774 2010-01-23 Mark Probst <mark.probst@gmail.com>
776 * sgen-pinning.c (evacuate_pin_staging_area): Don't assume
777 pin_staging_area_index is greater than 0.
779 2010-01-22 Miguel de Icaza (miguel@novell.com)
781 * loader.c: Since we do nothing with the error returned, pass NULL
784 2010-01-21 Rodrigo Kumpera <rkumpera@novell.com>
786 * reflection.c (typebuilder_setup_fields): Pretend field setup already
787 happened before starting to encode the actual fields. This avoid ciclic
788 dependencies and eventual crashes.
792 2010-01-21 Mark Probst <mark.probst@gmail.com>
794 * sgen-gc.c, gc-internal.h, object.c: Make string allocation
795 atomic and remove the half-constructed hack in SGen.
797 2010-01-21 Rodrigo Kumpera <rkumpera@novell.com>
799 * metadata-verify.c (parse_generic_inst): Fail a type signature if it
800 has a recursive reference to itself.
804 2010-01-21 Rodrigo Kumpera <rkumpera@novell.com>
806 * loader.c (mono_method_signature): Fix error message.
808 2010-01-21 Mark Probst <mark.probst@gmail.com>
810 * sgen-gc.c: Reuse to-space sections between nursery collections.
812 2010-01-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
814 * icall.c: don't raise AppDomain.TypeResolve when the type is loaded
815 from the current assembly or mscorlib. Fixes bug #322957.
817 2010-01-20 Zoltan Varga <vargaz@gmail.com>
819 * marshal.c: Calculate the target class of the delegete invoke wrappers using
820 get_wrapper_target_class.
822 2010-01-19 Mark Probst <mark.probst@gmail.com>
824 * sgen-gc.c: Fix warnings.
826 2010-01-19 Rodrigo Kumpera <rkumpera@novell.com>
828 * verify.c (store_local): Better error message.
830 2010-01-19 Rodrigo Kumpera <rkumpera@novell.com>
832 * object.c (mono_object_get_virtual_method): Handle generic interfaces with variant
835 2010-01-19 Rodrigo Kumpera <rkumpera@novell.com>
837 * icall.c (ves_icall_Remoting_RemotingServices_GetVirtualMethod): This
838 function is generics variance aware.
840 2010-01-19 Sebastien Pouliot <sebastien@ximian.com>
842 * security-core-clr.c (mono_security_core_clr_can_access_internals):
843 Handle the case where 'basedir' can be NULL (e.g. SRE assemblies)
845 2010-01-19 Sylvain Dupont <duposyl@gmail.com>
847 * cominterop.c marshal.c: Added support for marshalling in, in/byref,
848 in/out, in/out/byref parameters of type SAFEARRAY[VARIANT].
850 Code is contributed under MIT/X11 license.
852 2010-01-19 Rodrigo Kumpera <rkumpera@novell.com>
854 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Handle inflated generic methods
857 2010-01-19 Zoltan Varga <vargaz@gmail.com>
859 * marshal.c (mono_marshal_wrapper_info_from_wrapper): New helper function to
860 return a point to a wrapper specific info structure describing the wrapper.
861 (mono_marshal_get_array_address): Store the rank+elem_size in the wrapper info.
863 2010-01-18 Mark Probst <mark.probst@gmail.com>
865 * sgen-gc.c: Make minor collection section allowance adaptive,
866 depending on the amount of memory reclaimed in the last major
867 collection. If more memory was reclaimed (i.e. more garbage
868 produced), do the next collection earlier.
870 2010-01-18 Rodrigo Kumpera <rkumpera@novell.com>
872 * metadata-verify.c (parse_type): Fail a type signature if it has a recursive reference
875 * metadata-verify.c (mono_verifier_verify_typespec_signature): Change signature to take
876 the token as parameter.
878 * verify-internals.h: Ditto.
880 * metadata.c (mono_type_create_from_typespec): Pass token to verifier.
884 2010-01-18 Mark Probst <mark.probst@gmail.com>
886 * sgen-gc.c: Make store_remset_buffer_index long.
888 2010-01-18 Rodrigo Kumpera <rkumpera@novell.com>
890 * class.c (mono_class_from_typeref): Fail loading of self-referencing typeref tokens.
894 2010-01-18 Zoltan Varga <vargaz@gmail.com>
896 * sgen-gc.c (mono_gc_base_init): Add 'conservative_stack_mark' option to turn
897 off precise marking if it is available.
898 (mono_gc_get_bitmap_for_descr): Fix the handling of run length descriptors.
900 2010-01-17 Zoltan Varga <vargaz@gmail.com>
902 * sgen-gc.c (mono_gc_conservatively_scan_area): Resurrect this.
904 * sgen-pinning.c (evacuate_pin_staging_area): Don't assert if there are no
907 * sgen-gc.c (create_allocator): Add the missing n > MONO_ARRAY_MAX_INDEX check
908 to the array allocator.
910 2010-01-16 Zoltan Varga <vargaz@gmail.com>
912 * generic-sharing.c (instantiate_other_info): Don't create ftnptr's from the
913 result of mono_compile_method (), it already includes an ftnptr.
915 2010-01-16 Zoltan Varga <vargaz@gmail.com>
917 * metadata.c (get_image_set): Remove an assert which can happen in normal use.
919 2010-01-15 Zoltan Varga <vargaz@gmail.com>
921 * metadata.c (mono_metadata_str_hash): New helper function to compute a stable
922 hash value which doesn't depend on glib/eglib versions.
923 (mono_metadata_type_hash): Use it.
925 * object.c (mono_method_get_imt_slot): Ditto.
927 2010-01-14 Rodrigo Kumpera <rkumpera@novell.com>
929 * class.c (mono_type_has_exceptions): Check the generic instance. It can fail
930 independently of the GTD.
932 * class.c (mono_class_setup_fields): Fail if field has negative offset.
934 * class.c (mono_class_setup_fields): Fail if valuetype has zero size. Add sizeof(MonoObject)
935 to the upper limit since instance_size includes this amount.
937 * class.c (mono_class_layout_fields): Check if the types of the static fields have failed.
941 2010-01-14 Zoltan Varga <vargaz@gmail.com>
943 * object.c (build_imt_slots): Compute the vtable slot correctly for interfaces
946 * object.c (build_imt_slots): Avoid asserting when static methods are
947 encountered in an interface.
949 2010-01-13 Mark Probst <mark.probst@gmail.com>
951 * sgen-gc.c (to_space_expand): Fix assertion.
953 Wed Jan 13 15:42:28 CET 2010 Paolo Molaro <lupus@ximian.com>
955 * string-icalls.c: missing declaration fixes.
956 * sgen-gc.c: portability fixes.
958 2010-01-12 Rodrigo Kumpera <rkumpera@novell.com>
960 * class.c (mono_class_get_implemented_interfaces): Now take a MonoError argument.
966 * class-internals.h: Adjust for new signature of mono_class_get_implemented_interfaces.
968 2010-01-12 Rodrigo Kumpera <rkumpera@novell.com>
970 * class.c (mono_class_setup_interfaces): Now take a MonoError argument and
971 it can fail loading the type.
973 * class.c: Add mono_class_inflate_generic_class_checked.
977 * class-internals.h: Adjust for new signature of mono_class_setup_interfaces.
979 2010-01-11 Zoltan Varga <vargaz@gmail.com>
981 * loader.c (mono_method_signature_checked): New internal function taking an
984 * socket-io.c (AI_ADDRCONFIG): Applied patch from John Lightsey (jd@cpanel.net).
985 Fixes build on rh 7.3.
987 2010-01-10 Aaron Bockover <abockover@novell.com>
989 * assembly.c (mono_set_rootdir): Support finding the mono paths on OS X
990 at runtime in the same way as on Windows, which yields a relocatable
991 Mono. Uses dyld's _NSGetExecutablePath and realpath to resolve the path
992 of the running mono process.
994 On TARGET_ARM, fallback () will always be executed.
996 2010-01-08 Rodrigo Kumpera <rkumpera@novell.com>
998 * icall.c (ves_icall_Type_GetInterfaceMapData): This function is generics variance aware.
1000 2010-01-08 Rodrigo Kumpera <rkumpera@novell.com>
1002 * class.c (mono_class_is_assignable_from_slow): Support variant
1005 * class.c (mono_class_implement_interface_slow): Support types with
1006 variant generic arguments.
1008 2010-01-08 Rodrigo Kumpera <rkumpera@novell.com>
1010 * verify.c: Remove some code duplication.
1012 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1014 * object.c: Update docs.
1016 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1018 * object.c (add_imt_builder_entry): Improve DEBUG_IMT spew.
1020 * object.c (build_imt_slots): Interfaces with variant generic arguments use the
1021 fallback trampoline as well.
1023 * class.c (mono_class_interface_offset_with_variance): Add new non_exact_match
1024 out argument that is set to TRUE if the match was direct.
1026 * class.c (mono_class_is_assignable_from): Delegates require variance testing as well.
1028 * class-internal.h: Update prototype of mono_class_interface_offset_with_variance.
1030 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1032 * class.c: Add mono_class_interface_offset_with_variance function that does same
1033 as mono_class_interface_offset but takes variance into account.
1035 * class-internal.h: Export mono_class_interface_offset_with_variance.
1037 * object.c: Fix and improve DEBUG_IMT. Added an assert for IMT thunk building.
1039 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1043 * class.c: Add some FIXME for due to variant generic arguments.
1045 object.c (mono_object_isinst_mbyref): Interfaces with variant generic arguments
1046 can't use the simple bitfield check, so call mono_class_is_assignable_from if
1047 the bitfield check fails.
1049 2010-01-07 Rodrigo Kumpera <rkumpera@novell.com>
1051 * class.c (mono_class_is_assignable_from): Rework the generics variance code
1052 to be easier to read and fix bugs in the case a non generic type implements a variant
1055 * class.c (mono_class_has_variant_generic_params): Make non static.
1057 * class-internals.h: Export mono_class_has_variant_generic_params as part of
1060 2010-01-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
1062 * assembly.c: fix MONO_PATH debug output.
1064 2010-01-06 Atsushi Enomoto <atsushi@ximian.com>
1066 * culture-info-table.h : regenerated.
1068 2010-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1070 * verify.c (mono_verifier_verify_class): Properly check for broken parent. Ignore
1071 types that are meant to not have a parent.
1073 2010-01-04 Zoltan Varga <vargaz@gmail.com>
1075 * marshal.c (mono_marshal_get_runtime_invoke): Make a copy of the signature
1076 from the image mempool, so it is not leaked.
1078 2010-01-04 Zoltan Varga <vargaz@gmail.com>
1080 * metadata-internals.h (_MonoImage): Remove unused generic_class_cache field.
1082 2010-01-04 Sebastien Pouliot <sebastien@ximian.com>
1084 * verify.c (verify_valuetype_layout_with_target): Fix case
1085 that can lead to infinite recursion. Fix bug #567861
1087 2010-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1089 * pedump.c: Run code verifier even if image verification fails
1090 due to a failed type we. This allows more errors to be shown.
1092 2010-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1094 * class.c (count_virtual_methods): Remove the assert and now
1097 * class.c (setup_interface_offsets): This can fail now.
1099 * class.c (mono_class_setup_vtable_general): Check for parent vtable
1100 errors. Check setup_interface_offsets errors.
1102 * class.c (setup_interface_offsets): Simplify the return error logic
1103 and remove class_init_ok.
1107 2010-01-04 Rodrigo Kumpera <rkumpera@novell.com>
1109 * class.c (mono_class_init): Do class verification at the beginning. Add
1110 some asserts to avoid tripping into invalid memory.
1112 * object.c (compute_class_bitmap): Replace a g_assert_not_reached with a
1113 g_error and a decent message.
1115 * verify.c (mono_verifier_verify_class): Verify for invalid super type.
1119 2010-01-03 Zoltan Varga <vargaz@gmail.com>
1121 * mempool-internals.h (g_list_prepend_mempool): Define this and related functions
1122 as inline functions instead of defining them in mempool.c.
1124 * metadata-internals.h (MonoImageSet): New structure representing a set of
1125 MonoImages, which own a collection of generic instances.
1127 * metadata.c: Get rid of the global generic caches, instead assign each generic
1128 instance to the image set which consists of all the images referenced by the
1129 instance. This greatly speeds up mono_metadata_clean_for_image (), and allows
1130 the memory used by generic instances to be allocated from a per image-set mempool
1133 2010-01-03 Zoltan Varga <vargaz@gmail.com>
1135 * marshal.c (mono_marshal_get_runtime_invoke): Fix a memory leak.
1137 2010-01-03 Zoltan Varga <vargaz@gmail.com>
1139 * appdomain.c (zero_static_data): Fix a warning.
1141 * locales.c (construct_culture_from_specific_name): Applied patch from
1142 José Antonio Sánchez Lázaro <jasl@darcysoft.es>. Fix a crash if a culture was
1143 not found. Fixes #567900.
1145 2009-12-31 Sebastien Pouliot <sebastien@ximian.com>
1147 * loader.c (mono_method_get_signature_full): Remove two asserts.
1148 Return NULL instead so that the verifier can handle both cases
1151 2009-12-30 Rodrigo Kumpera <rkumpera@novell.com>
1153 * class.c (mono_class_setup_methods): Use checked version of mono_class_inflate_generic_method_full
1154 so we can properly fail types instead of crashing.
1158 2009-12-30 Rodrigo Kumpera <rkumpera@novell.com>
1160 * reflection.c (reflection_methodbuilder_to_mono_method): Assert in case of a broken
1163 2009-12-30 Rodrigo Kumpera <rkumpera@novell.com>
1165 * marshal.c (mono_mb_emit_restore_result): Properly handle generic enums.
1167 2009-12-26 Zoltan Varga <vargaz@gmail.com>
1169 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait): Don't close the
1170 wait handle if the wait is interrupted, since it is still in mon->wait_list, and
1171 we can't remove it from it since we don't hold the lock.
1172 (mon_new): Free the orphaned events here when a mon structure is added to the
1173 freelist. Fixes #561239. Thanks to Mike Rieker <wmrieker@nii.net> for tracking
1176 2009-12-26 Rodrigo Kumpera <rkumpera@novell.com>
1178 * verify.c (init_stack_with_value_at_exception_boundary): Do stack overflow checking here
1179 as max stack might be zero.
1183 2009-12-26 Rodrigo Kumpera <rkumpera@novell.com>
1185 Rework all uses of mono_class_setup_methods to accept that it can fail now.
1187 * class.c (mono_class_setup_methods): This function now can fail the class. Do so for generic
1188 instances if the GTD did.
1190 * class.c (mono_class_setup_properties): Ditto.
1192 * class.c (mono_class_setup_events): Ditto.
1194 * class.c (mono_class_setup_vtable): Fail early if the type is already broken.
1196 * class.c (mono_class_setup_vtable_general): Add a few more missing broken type checks. Sanitize
1199 * class.c (mono_class_init): Fail if GTD did.
1202 * generic-sharing.c:
1206 * verify.c: Properly handle failure of mono_class_setup_methods.
1208 2009-12-26 Rodrigo Kumpera <rkumpera@novell.com>
1210 * class-internals.c: Add mono_class_inflate_generic_method_full_checked and make
1211 mono_class_inflate_generic_method_full internal.
1213 * class.c (inflate_generic_context): Now takes a MonoError argument.
1215 * class.c (mono_class_inflate_generic_method_full): Now calls the _checked and abort on
1218 2009-12-26 Zoltan Varga <vargaz@gmail.com>
1220 * generic-sharing.c (instantiate_other_info): Avoid creating jump trampolines since
1221 they cannot be patched. Partly fixes #564408.
1223 2009-12-24 Mark Probst <mark.probst@gmail.com>
1225 * metadata-internals.h, reflection.c: Use the
1226 MonoDynamicImage.handleref hash table only with unmanaged keys,
1227 and add a managed hash table handleref_managed for managed keys.
1229 2009-12-24 Mark Probst <mark.probst@gmail.com>
1231 * sgen-gc.c: Unset to-space bumper between collections. It might
1232 become invalid due to degraded allocations.
1234 2009-12-21 Rodrigo Kumpera <rkumpera@novell.com>
1236 * loader.c (mono_method_get_signature_full): Check if the returned signature is compatible
1237 with the one from the original method.
1239 * metadata-verify.c (mono_verifier_is_sig_compatible): New function to verify signature
1242 * verify-internals.h: Add new function to the internal API.
1244 2009-12-18 Dimitar Dobrev <dpldobrev@yahoo.com>
1246 * culture-info-tables.h: regenerated it to include the Georgian culture.
1248 2009-12-18 Zoltan Varga <vargaz@gmail.com>
1250 * sgen-gc.c: Include mono/utils/memcheck.h.
1252 * reflection.c (mono_reflection_get_type_internal_dynamic): Use assembly->domain
1253 instead of the current domain, since the two might not match if this is called
1256 * metadata-internals.h (MonoDynamicAssembly): Add a 'domain' field to specify the
1257 domain which created this assembly.
1259 2009-12-18 Zoltan Varga <vargaz@gmail.com>
1261 * debug-helpers.c (dis_one): Avoid a glib assert on empty strings.
1263 2009-12-17 Mark Probst <mark.probst@gmail.com>
1265 * sgen-gc.c: Managed implementation of the specialized generic
1266 store write barrier.
1268 2009-12-17 Rodrigo Kumpera <rkumpera@novell.com>
1270 * icall.c (ves_icall_Type_GetMethodsByName): Don't pin virtual methods if they are newslot.
1271 A private virtual newslot method is used to implement an interface method without exposing
1272 it to users. When querying for public instance methods, such method would hide a public one
1277 2009-12-17 Zoltan Varga <vargaz@gmail.com>
1279 * reflection.c (resolve_object): Fix the encoding of unmanaged calling
1282 2009-12-16 Rodrigo Kumpera <rkumpera@novell.com>
1284 * reflection.c (mono_type_get_object): Guard against NULL generic param owner.
1286 2009-12-16 Rodrigo Kumpera <rkumpera@novell.com>
1288 * class-internals.h (MonoDynamicGenericClass): Kill property and event related fields
1289 as they are no longer used.
1291 * metadata.c (free_generic_class_dependents): Remove reference to previous fields
1293 * reflection.c (mono_reflection_generic_class_initialize): Ditto.
1295 2009-12-16 Rodrigo Kumpera <rkumpera@novell.com>
1297 * reflection.c (mono_type_get_object): If the type is VAR or MVAR check
1298 if the owner class has not been finished before returning reflection_info.
1302 2009-12-16 Zoltan Varga <vargaz@gmail.com>
1304 * reflection.c (mono_custom_attrs_from_param): Avoid a crash if a dynamic
1305 param doesn't have custom attributes. Fixes #565117.
1307 * class.c (mono_bounded_array_class_get): Make these classes PUBLIC. Fixes
1310 2009-12-15 Rodrigo Kumpera <rkumpera@novell.com>
1312 * class.c (mono_class_setup_fields): Fail valuetypes that are bigger than 1Mb.
1314 2009-12-15 Rodrigo Kumpera <rkumpera@novell.com>
1316 * pedump.c: Add partial-md mode that doesn't perform full metadata verification. It does the
1317 same amount done by a core-clr enabled runtime.
1319 2009-12-15 Marek Habersack <mhabersack@novell.com>
1321 * appdomain.c (mono_make_shadow_copy): make sure access mode of
1322 the target files is reset to writable by owner and readable by
1323 everyone else to prevent problems when updating shadow copies of
1324 files whose source is read-only. Fixes bug #556884
1326 2009-12-15 Mark Probst <mark.probst@gmail.com>
1328 * class.c (mono_generic_class_get_class): Allocate the generic
1329 class via malloc again, so that it can be freed when any one of
1330 the images of its constituent types is closed.
1332 * metadata.c: When closing an image, don't free generic insts and
1333 generic classes right away, but put them into a list for later
1336 * image.c, metadata-internals.h: Store the free list and in the
1337 second pass of closing an image, free it.
1339 2009-12-14 Rodrigo Kumpera <rkumpera@novell.com>
1341 * reflection.c (mono_generic_class_get_object): Assert if this is ever called.
1343 * reflection.c (mono_reflection_register_with_runtime): Only register dynamic
1346 * reflection.c (resolve_object): Call ensure_complete_type on the inflated field.
1348 2009-12-14 Rodrigo Kumpera <rkumpera@novell.com>
1350 * reflection.c (mono_reflection_type_get_handle): Properly fail in case of a broken
1353 * reflection.c (mono_reflection_register_with_runtime): Throws in case a bad user type
1356 2009-12-14 Miguel de Icaza <miguel@novell.com>
1358 * verify.c (mono_method_verify): The Unused opcodes produce an
1359 InvalidProgramException on .NET
1361 2009-12-14 Sebastien Pouliot <sebastien@ximian.com>
1363 * loader.c (mono_method_get_header): Move assert after the verifier
1364 has been called on the method header.
1366 2009-12-12 Rodrigo Kumpera <rkumpera@novell.com>
1368 * object-internals.h: Remove useless field from MonoReflectionGenericClass.
1370 * appdomain.c: Bump corlib version.
1372 2009-12-12 Rodrigo Kumpera <rkumpera@novell.com>
1374 To properly support user types, MonoGenericClass has to be used for regular, non SRE,
1375 types as well since otherwise generic instances would not return UT as arguments but
1376 their undelying system type.
1378 * object-internals.h: Change field types of MonoGenericClass and *OnTypeBuilderInst
1379 to reflect the fact that they can have now multiple different types.
1381 * reflection.c (mono_image_get_field_on_inst_token): Handle MonoField.
1383 * reflection.c (mono_image_get_ctor_on_inst_token): Handle MonoCMethod.
1385 * reflection.c (mono_image_get_method_on_inst_token): Handle MonoMethod.
1387 * reflection.c (mono_reflection_register_with_runtime): Init super types
1388 if the image is not dynamic.
1390 * reflection.c (mono_reflection_bind_generic_parameters): In case of a MonoGenericClass,
1391 check if the generic type definition is a TypeBuilder.
1393 * reflection.c (mono_reflection_generic_class_initialize): If the generic type definition
1394 doesn't belong to a dynamic image, skip initialization.
1396 * reflection.c (resolve_object): Properly handle *OnTypeBuilderInst types where their
1397 base definition is not a dynamic type.
1399 2009-12-11 Marek Habersack <mhabersack@novell.com>
1401 * object.c (mono_ldstr, mono_ldstr_metadata_sig): added calls to
1402 mono_profiler_string_allocation
1404 * string-icalls.c (ves_icall_System_String_InternalAllocateStr):
1405 if string profiling is enabled, call
1406 mono_profiler_string_allocation
1408 * profiler.h: added two MonoProfileFlags -
1409 MONO_PROFILE_IOMAP_EVENTS and MONO_PROFILE_STRING_ALLOC as well as
1410 installation functions for the hooks below.
1412 * profiler-private.h, profiler.c: added two hooks:
1413 mono_profiler_string_allocation called whenever a string is
1414 allocated by InternalAllocateStr and mono_profiler_iomap called
1415 whenever IOMAP code performs an adjustement on a file path.
1417 Fri Dec 11 18:24:04 CET 2009 Paolo Molaro <lupus@ximian.com>
1419 * boehm-gc.c: fixed race condition while getting the target of a
1420 disappearing link (bug #522233).
1422 2009-12-10 Rodrigo Kumpera <rkumpera@novell.com>
1424 * class.c (mono_type_get_full): Produce warning instead of simply swallowing
1427 2009-12-10 Rodrigo Kumpera <rkumpera@novell.com>
1429 * reflection.c: Add mono_reflection_register_with_runtime icall to
1430 allow a MonoGenericClass to register itself as the managed mirror of
1431 a given generic instance.
1432 This is a temporary workaround until all MGC instantiation happens in
1435 * object-internals.h: Ditto.
1437 * icall-def.h: Ditto.
1439 2009-12-10 Mark Probst <mark.probst@gmail.com>
1441 * sgen-gc.c (find_in_remsets): Also search the generic store
1444 2009-12-10 Mark Probst <mark.probst@gmail.com>
1446 * sgen-gc.c: Don't access class names in debugging code when
1447 unloading a domain, because they might not be valid anymore.
1449 2009-12-10 Mark Probst <mark.probst@gmail.com>
1451 * domain.c, domain-internals.h: New function mono_domain_unset().
1453 * appdomain.c (unload_thread_main): Detach the thread again at the
1456 * threads.c: When a thread exists or is detached, unset its domain
1457 so that it's NULL when, for example, a pthread destructor runs.
1459 * sgen-gc.c: Assert that there is no domain set after a thread is
1462 2009-12-10 Mark Probst <mark.probst@gmail.com>
1464 * class.c (mono_generic_class_get_class),
1465 metadata.c (free_generic_class): Allocate generic MonoClass's from
1466 the image mempool, not via malloc. The problem with malloc is
1467 that when unloading a domain those classes are freed before
1468 clearing the heap and SGen needs the classes. Rewriting the
1469 unloading code to do the free later would be more work and there's
1470 no point in using malloc anyway.
1472 2009-12-09 Sebastien Pouliot <sebastien@ximian.com>
1474 * loader.c (mono_method_signature): Always call mono_loader_unlock
1477 2009-12-09 Rodrigo Kumpera <rkumpera@novell.com>
1479 * metadata-verify.c: Add mono_verifier_verify_string_signature to check
1482 * verify-internals.h: Add new function to the internal API.
1484 * verify.c (do_ldstr): Call into mono_verifier_verify_string_signature to
1485 check if it's a valid string.
1487 * object.c (mono_ldstr): Ditto.
1491 2009-12-09 Rodrigo Kumpera <rkumpera@novell.com>
1493 * icall.c (ves_icall_GetCurrentMethod): Drop all generic arguments
1494 from a method before returning it. This is the expected behavior.
1496 2009-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1498 * reflection.c (inflate_method): Handle the case of a regular system type.
1500 2009-12-08 Mark Probst <mark.probst@gmail.com>
1502 * sgen-gc.c, sgen-pinning-stats.c, sgen-gray.c: More statistics
1505 * mempool.c, mempool-internals.h: New function
1506 mono_mempool_get_bytes_allocated().
1508 * Makefile.am: sgen-pinning-stats.c added.
1510 2009-12-08 Mark Probst <mark.probst@gmail.com>
1512 * sgen-gc.c (create_allocator): Only use the fast path if the
1513 object size is within the small object size limit.
1515 2009-12-07 Mark Probst <mark.probst@gmail.com>
1517 * sgen-gc.c: Make sure section->data is aligned to 8 bytes by
1518 possibly adding padding to sizeof (GCMemSection).
1520 2009-12-07 Mark Probst <mark.probst@gmail.com>
1522 * sgen-gc.c (mono_gc_wbarrier_nostore): Skip the remset if the
1523 reference is not in the nursery.
1525 2009-12-07 Rodrigo Kumpera <rkumpera@novell.com>
1527 * class.c (mono_class_from_typeref): Bounds check idx against the
1530 2009-12-07 Mark Probst <mark.probst@gmail.com>
1532 * sgen-gc.c, sgen-pinning.c: When pinning, make only one pass
1533 through the potential roots, then sort the results and find the
1534 pinned objects from there.
1536 * Makefile.am: sgen-pinning.c added.
1538 2009-12-07 Mark Probst <mark.probst@gmail.com>
1540 * sgen-gc.c: Record generic stores in specialized remset buffers.
1542 2009-12-06 Mark Probst <mark.probst@gmail.com>
1544 * sgen-gc.c: Make pinned chunks the same size as major heap
1545 sections, and align them as well, so that we can check whether an
1546 object is in a pinned chunk or a major section in constant time.
1548 2009-12-06 Mark Probst <mark.probst@gmail.com>
1550 * sgen-gc.c (build_nursery_fragments): Don't leak fragments.
1552 2009-12-06 Mark Probst <mark.probst@gmail.com>
1554 * sgen-gc.c: Make all major heap sections the same size (currently
1555 128k) and allocate them on aligned addresses. Small heap sections
1556 give us better granularity with pinned objects - we can free up
1559 2009-12-06 Mark Probst <mark.probst@gmail.com>
1561 * string-icalls.c (ves_icall_System_String_GetLOSLimit): Debug
1564 2009-12-05 Zoltan Varga <vargaz@gmail.com>
1566 Applied patch from Laurent Etiemble (laurent.etiemble@gmail.com).
1568 * mono/metadata/assembly.c: When opening an assembly image, pass the real
1569 names in addition to the runtime generated one.
1571 * mono/metadata/image.h: Add a function to take the real name of the assembly
1574 * mono/metadata/image.c: If a real name has been passed to load an assembly,
1575 use it instead of the runtime generated one.
1577 Code is contributed under MIT/X11 license.
1579 2009-12-05 Zoltan Varga <vargaz@gmail.com>
1581 * marshal.c (emit_marshal_vtype): Do the klass == date_time_class checks
1582 before the other checks to prevent problems if the DateTime class is blittable.
1583 Hopefully fixes #559600.
1585 2009-12-05 Mark Probst <mark.probst@gmail.com>
1587 * string-icalls.c, string-icalls.h, icall-def.h: New icall that
1588 returns the largest string length that will not be put into the
1591 * sgen-gc.c, gc-internal.h: New function that returns the largest
1592 object size that will not be put into the LOS.
1594 * appdomain.c: Bump corlib version.
1596 2009-12-05 Zoltan Varga <vargaz@gmail.com>
1598 * class-internals.h: Add MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
1600 * generic-sharing.c: Handle MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
1602 2009-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1604 * reflection.c (inflate_method): Fix signature.
1606 * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Reflect change
1609 2009-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1611 * reflection.c (inflate_method): Make this method work with TypeBuilder as well.
1613 2009-12-03 Mark Probst <mark.probst@gmail.com>
1615 * sgen-gc.c: Abstract to-space handling.
1617 2009-12-03 Rodrigo Kumpera <rkumpera@novell.com>
1619 * loader.c (find_method_in_class): Ignore methods with broken signatures.
1623 2009-12-03 Mark Probst <mark.probst@gmail.com>
1625 * sgen-gc.c: Only add references from outside the nursery to
1626 within the nursery to the global remset list.
1628 2009-12-03 Mark Probst <mark.probst@gmail.com>
1630 * appdomain.c (create_exceptions): Set the domain temporarily if
1631 necessary to avoid cross-domain references.
1633 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1635 * verify.c (get_stack_type): Return that the type is invalid instead of
1638 * verify.c (mono_method_verify): Verify that all locals and arguments
1639 have valid stack types.
1643 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1645 * verify.c (mono_method_verify): Bounds check the filter offset. Make all
1646 bounds checking overflow aware.
1650 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1652 * verify.c (do_invoke_method): Check for invalid method signatures.
1656 2009-12-02 Jb Evain <jbevain@novell.com>
1658 * appdomain.c (MONO_CORLIB_VERSION): bump.
1659 * icall-def.h (get_base_definition): renamed to get_base_method
1660 and add a boolean argument indicating we want the original
1661 method definition, or the immediate base method.
1662 * icall.c: apply the get_base_definition to get_base_method change.
1664 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1666 * class.c (mono_class_setup_fields): Fail an enum without an instance field.
1670 Wed Dec 2 16:35:49 CET 2009 Paolo Molaro <lupus@ximian.com>
1672 * class.c: remove asserts for invalid type token in
1673 mono_class_name_from_token(), mono_assembly_name_from_token() and
1674 mono_class_create_from_typedef () (fixes bug #553318).
1676 Wed Dec 2 15:48:19 CET 2009 Paolo Molaro <lupus@ximian.com>
1678 * metadata.c, class.c, loader.c: remove assert after bsearch() for
1679 incorrect assemblies (bug #553322).
1681 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1683 * metadata.c (mono_metadata_inflate_generic_inst): Add MonoError parameter.
1685 * metadata-internals.h: Change signature of mono_metadata_inflate_generic_inst.
1687 * class.c (inflate_generic_type): Use new version of mono_metadata_inflate_generic_inst.
1689 * class.c (inflate_generic_context): Ditto.
1691 * loader.c (method_from_methodspec): Ditto.
1695 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1697 * class.c (mono_type_retrieve_from_typespec): Use MonoError machinery to report errors.
1699 * class.c (mono_class_create_from_typespec): Ditto.
1701 * class.c (mono_class_get_full): Fix for change on the above 2 functions.
1703 * class.c (mono_type_get_full): Fix for change on the above 2 functions.
1707 2009-12-02 Rodrigo Kumpera <rkumpera@novell.com>
1709 * verify.c (mono_class_has_default_constructor): Check fror broken signatures.
1711 * verify.c (verify_delegate_compatibility): Ditto.
1713 * verify.c (do_newobj): Ditto.
1717 2009-12-02 Mark Probst <mark.probst@gmail.com>
1719 * sgen-gc.c: Use a gray queue instead of requiring that gray
1720 objects are in a contiguous region.
1722 * sgen-gray.c: The gray queue implementation.
1724 * Makefile.am: sgen-gray.c added.
1726 2009-12-02 Mark Probst <mark.probst@gmail.com>
1728 * appdomain.c: When unloading a domain, zero its static data and
1729 perform a minor collection when using SGen. That will get rid of
1730 all the remsets pointing into that domain's static data.
1732 * sgen-gc.c: Allow remsets into static data. By doing this we
1733 need less checks so we're more efficient.
1735 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
1737 * verify.c (mono_method_verify): Check for catch clauses with broken
1742 2009-12-01 Jb Evain <jbevain@novell.com>
1744 * class.c (make_generic_param_class): set the namespace of
1745 the generic parameter class from its owner, if available.
1747 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
1749 * verify.c (code_bounds_check): Do proper overflow checking.
1751 * verify.c (mono_method_verify): The number of switch entries is
1752 an unsigned int. Properly bounds check it.
1756 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
1758 * metadata.c: Kill mono_metadata_get_param_attrs_checked. Add
1759 mono_metadata_method_has_param_attrs which only checks if a given param
1760 list has a non zero flags entry.
1762 * metadata.c (mono_metadata_get_param_attrs): Add param_count parameter
1763 to inform how many params should we expect to decode.
1765 * loader.c (mono_method_signature): Use mono_metadata_method_has_param_attrs
1766 as it's faster than mono_metadata_get_param_attrs.
1768 * metadata-internals.h: Fix mono_metadata_get_param_attrs signature and
1769 add mono_metadata_method_has_param_attrs.
1771 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
1773 * class.c (mono_class_setup_vtable_general): Check for mono_method_get_vtable_slot
1776 * class.c (mono_method_get_vtable_slot): Don't assert if the computed method slot
1777 is -1 but its class is broken.
1781 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
1783 * metadata.c: Introduce mono_metadata_get_param_attrs_checked which checks
1784 for parameter overflow.
1786 * metadata.c (mono_metadata_parse_method_signature_full): Use checked version
1787 of mono_metadata_get_param_attrs.
1789 * metadata-internals.h: Add mono_metadata_get_param_attrs_checked to the internal
1792 * loader.c (mono_method_signature): Use checked version of mono_metadata_get_param_attrs.
1794 2009-12-01 Rodrigo Kumpera <rkumpera@novell.com>
1796 * class.c (mono_class_setup_fields): Check for fields with broken types.
1800 2009-11-28 Rodrigo Kumpera <rkumpera@novell.com>
1802 * reflection.c (ensure_generic_class_runtime_vtable): Split this function in 2
1803 so we can avoid calling ensure_runtime_vtable multiple times for the GTD during
1804 its TypeBuilder::CreateType ().
1806 * reflection.c (ensure_generic_class_runtime_vtable): Avoid initializing interfaces
1809 * reflection.c: Every time we change the interface array, set interfaces_packed to NULL
1810 to make setup_interface_offsets happy.
1812 * reflection.c (remove_instantiations_of_and_ensure_contents): Fix instances again as corlib
1813 compilation now works.
1815 2009-11-28 Zoltan Varga <vargaz@gmail.com>
1817 * appdomain.c (create_exceptions): New helper function extracted from
1818 mono_runtime_init () to precreate objects used during exception handling.
1819 (mono_runtime_init): Call it.
1820 (mono_domain_create_appdomain_internal): Ditto. Fixes #555264.
1822 2009-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1824 * reflection.c (remove_instantiations_of_and_ensure_contents): Temp hack to fix corlib
1825 compilation until the proper one is found.
1827 2009-11-27 Zoltan Varga <vargaz@gmail.com>
1829 * class.c (mono_class_setup_vtable_general): Cache the result of
1830 get_virtual_methods () since it can be slow because of the metadata
1833 * metadata-internals.h (_MonoImage): Change 'method_cache' to a GHashTable
1834 from a MonoValueHashTable for now, since the later is based on an earlier
1835 version of hpj's internal probing code and seems to have serious collision
1838 * loader.c (mono_get_method_full): Update after the change above.
1840 2009-11-26 Zoltan Varga <vargaz@gmail.com>
1842 * class-internals.h (MonoCachedClassInfo): Add 'is_generic_container' field.
1844 2009-11-26 Rodrigo Kumpera <rkumpera@novell.com>
1846 * reflection.c (get_field_on_inst_generic_type): Try to fallback using the field from
1847 the GTD instead of the DGC instead of crashing.
1849 * reflection.c (ensure_generic_class_runtime_vtable): Only reinflate stuff that is
1850 required. Inflate fields if needed.
1852 * reflection.c (remove_instantiations_of): Ensure generic instances are properly
1855 2009-11-26 Rodrigo Kumpera <rkumpera@novell.com>
1857 * class.c (check_interface_method_override): Check for NULL signatures and fail
1860 * debug-helpers.c (mono_signature_get_desc): Return a fixed string for NULL signatures.
1864 2009-11-26 Zoltan Varga <vargaz@gmail.com>
1866 * class.c (mono_class_get_virtual_methods): Call decode_row_col to obtain
1867 the MONO_METHOD_FLAGS column instead of decoding the whole row.
1869 2009-11-25 Rodrigo Kumpera <rkumpera@novell.com>
1871 * loader.c (field_from_memberref): Resolve the class first then the field
1872 signature. Remove a lot of duplicated code and make sure we don't pass valid
1873 values to mono_loader_set_error_field_load.
1877 2009-11-25 Rodrigo Kumpera <rkumpera@novell.com>
1879 * class.c (inflate_generic_type): Change code to use new signature of
1880 mono_error_set_bad_image.
1884 2009-11-25 Sebastien Pouliot <sebastien@ximian.com>
1886 * verify.c (mono_method_verify): Don't free ctx.params items if
1887 we aborted while inflating the ctx.locals. Complete previous fix
1889 2009-11-25 Sebastien Pouliot <sebastien@ximian.com>
1891 * verify.c (mono_method_verify): Use the uninflated type name,
1892 when the inflated is null, to report errors. Also take care when
1893 freeing, not to free everything since, in case of an error, some
1894 stuff would be copies (i.e. not allocated by the function itself)
1897 2009-11-24 Rodrigo Kumpera <rkumpera@novell.com>
1899 * verify.c (stack_push, stack_pop, stack_pop_safe): Assert if we underflow
1900 or overflow. The caller must have done this check explicitly. This guard us
1901 from accessing invalid memory.
1903 * verify.c (do_push_static_field): Check for stack overflow.
1907 2009-11-24 Rodrigo Kumpera <rkumpera@novell.com>
1909 * loader.c (find_method_in_class): Don't crash if the signature cannot
1912 * metadata.c (mono_metadata_parse_generic_param): Return NULL instead
1913 of asserting for the case of invalid params.
1917 2009-11-24 Sebastien Pouliot <sebastien@ximian.com>
1919 * image.c (mono_image_load_module): Fix crash when a bad assembly
1920 has no module at all (fix bug #553412) and also replace the
1921 g_assert with a return NULL (documented return value for failure)
1923 2009-11-23 Zoltan Varga <vargaz@gmail.com>
1925 * debug-helpers.c (mono_type_get_desc): Handle typedbyref.
1927 2009-11-23 Miguel de Icaza <miguel@novell.com>
1929 * file-io.c: Change FindFirst/FindNext/FindClose API to return the
1930 file attribute to managed code and avoid doing the mask/attribute
1933 2009-11-22 Miguel de Icaza <miguel@novell.com>
1935 * file-io.c: Surface a smart FindFirst/FindNext/FindClose API to
1938 * icall-def.h: New entry points.
1940 2009-11-19 Mark Probst <mark.probst@gmail.com>
1942 * process.c: Don't put references to managed objects into a
1945 2009-11-18 Sebastien Pouliot <sebastien@ximian.com>
1947 * class.c (can_access_internals): Allow CoreCLR to participate in
1948 allowing (or not) [InternalsVisibleTo] between assemblies.
1949 * security-core-clr.c|h: Make sure that only trusted code (a
1950 superset of platform code) can access the internals of platform
1953 Mon Nov 16 16:28:11 CET 2009 Paolo Molaro <lupus@ximian.com>
1955 * reflection.c: use the correct base class to get the virtual method
1956 "get_UnderlyingSystemType" and speed up the icall. Fixes bug #555013.
1958 2009-11-16 Sebastien Pouliot <sebastien@ximian.com>
1960 * security-core-clr.c (get_caller_no_reflection_related):
1961 [Mono]Type.InvokeMember is outside System.Reflection[.Emit] but
1962 it's still reflection and must be filtered correctly.
1964 2009-11-16 Mark Probst <mark.probst@gmail.com>
1966 * object.c (compute_class_bitmap): Fix for large bitmaps.
1968 2009-11-15 Zoltan Varga <vargaz@gmail.com>
1970 (mono_gc_get_suspend_signal): Fix the build with a system libgc.
1972 * boehm-gc.c (mono_gc_base_init): Applied patch from DKoushik K. Dutta (
1973 koush@koushikdutta.com). Disable GC_no_dls on android.
1975 2009-11-12 Mark Probst <mark.probst@gmail.com>
1977 * sgen-gc.c (find_tlab_next_from_address): Handle the case where
1978 tlab_next points outside the TLAB because the allocator was
1981 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
1983 * reflection.c (mono_image_module_basic_init): Handle exceptions correctly.
1985 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
1987 * object-internals.h: Change signature for mono_string_to_utf8_image.
1989 * object.c (mono_string_to_utf8_image): Change signature to take a MonoError
1992 * reflection.c: Take care of mono_string_to_utf8_image change and avoid raising
1993 exceptions due to mono_string_to_utf8.
1995 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
1997 * object-internals.h: Change signature for mono_string_to_utf8_mp.
1999 * object.c (mono_remote_class): Make sure all resources are released before
2000 raising an exception.
2002 * object.c (mono_print_unhandled_exception): Avoid raising an exception.
2004 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
2006 * mono-perfcounters.c (network_get_impl): Change variable initialization
2007 ordering to fix potential memory leak in case of exceptions.
2009 * mono-perfcounters.c (mono_perfcounter_create): Properly handle badly
2012 2009-11-09 Rodrigo Kumpera <rkumpera@novell.com>
2014 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): Change
2015 variable initialization ordering to fix potential memory leak in case
2018 2009-11-09 Zoltan Varga <vargaz@gmail.com>
2020 * icall.c (mono_ArgIterator_Setup): Remove the MONO_ARCH_REGPARMS stuff, its not
2023 2009-11-07 Rodrigo Kumpera <rkumpera@novell.com>
2025 * appdomain.c: Fix shadow path code to better deal with exceptions.
2027 2009-11-07 Rodrigo Kumpera <rkumpera@novell.com>
2029 * appdomain.c: Use checked version of mono_string_to_utf8 to avoid raising an
2030 exception in the middle of the runtime code.
2032 2009-11-07 Rodrigo Kumpera <rkumpera@novell.com>
2034 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): Don't
2035 leak memory with broken envvar value.
2037 2009-11-06 Mark Probst <mark.probst@gmail.com>
2039 * reflection.c (mono_reflection_setup_internal_class): Because
2040 nested classes are not added to the name cache, we must put them
2041 in the reflection_info_unregister_classes list.
2043 2009-11-05 Sebastien Pouliot <sebastien@ximian.com>
2045 * class.c: When CoreCLR is enabled don't call mono_init_com_types
2046 if MONO_CLASS_IS_IMPORT return true unless the type reside in
2047 platform (trusted) code. Instead we return a TypeLoadException to
2048 be thrown later. This is the exception thrown by Silverlight 2 if
2049 a type, inside application (user) code is marked with [ComImport]
2051 2009-11-05 Zoltan Varga <vargaz@gmail.com>
2053 * icall.c (ves_icall_System_Diagnostics_Debugger_IsAttached_internal): Call
2054 mono_is_debugger_attached () too.
2056 * mono-debug.c (mono_is_debugger_attached): New helper function.
2057 (mono_set_is_debugger_attached): Ditto.
2059 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2061 * object-internals.h: Add mono_string_to_utf8_checked.
2063 * object.c: Implement mono_string_to_utf8_checked.
2065 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2067 * class.c: Add missing check for load errors after every
2068 call to mono_class_setup_fields
2072 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2074 metadata-verify.c (verify_tables_schema): Fix the error message.
2076 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2078 * metadata.c: Change event table schema to use TDOR for event type
2079 as this is what it's meant to be.
2081 * metadata.c (mono_metadata_compute_size): Change MONO_TABLE_ASSEMBLYPROCESSOR
2082 to MONO_TABLE_ASSEMBLYREFPROCESSOR, which is table that has a MONO_MT_TABLE_IDX
2085 * metadata.c (mono_metadata_compute_size): Trim MT_TABLE_IDX of code that no
2086 longer makes sense: remove MONO_TABLE_EVENT and remove checks for non-existent
2087 rows in MONO_TABLE_GENERICPARAM.
2091 2009-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2093 * class.c (mono_image_add_to_name_cache): Assert on duplicate
2096 * reflection.c (mono_reflection_setup_internal_class): Avoid
2097 registering a gc root the same MonoClass multiple times.
2098 Don't register nested types on the global scope as they should
2099 not be available there.
2101 2009-11-05 Rolf Bjarne Kvinge <RKvinge@novell.com>
2103 * culture-info-tables.h: regenerated.
2105 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
2107 * debug-helpers.c: avoid g_strdup() in mono_type_full_name().
2109 2009-11-04 Sebastien Pouliot <sebastien@ximian.com>
2111 * string-icalls.c|h: Remove string internal calls that are not
2112 used anymore by the class libraries.
2113 * icall.c: Remove System_Reflection_FieldInfo_internal_from_handle
2114 which is not used in the class librairies.
2115 * icall-def.h: Update tables.
2117 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
2119 * class.h: Move mono_class_inflate_generic_type_checked...
2121 * class-internals.h: to here and make it internal. We don't want to
2122 further expose MonoGenericContext.
2124 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
2126 * verify.c (mono_method_verify): Improve error message.
2128 2009-11-04 Rodrigo Kumpera <rkumpera@novell.com>
2130 * reflection.c (fieldref_encode_signature): If field_image is NULL then
2131 the token is already properly encoded. Fixs 4.0 build.
2133 2009-11-04 Rolf Bjarne Kvinge <RKvinge@novell.com>
2135 * locales.c (construct_number_format): Check if the number index is
2136 valid before trying to use it, if not, just return.
2138 2009-11-04 Zoltan Varga <vargaz@gmail.com>
2140 * marshal.c (mono_marshal_get_runtime_invoke): Don't reset abort exceptions,
2141 since that loses the abort state. Fixes #539394.
2143 2009-11-03 Zoltan Varga <vargaz@gmail.com>
2145 * marshal.c (mono_marshal_get_native_wrapper): For icall wrappers, add an
2146 explicit this argument to the call signature.
2147 (mono_marshal_get_icall_wrapper): Ditto.
2149 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2151 * reflection.c (fieldref_encode_signature): Add new field_image parameter
2152 to indicate which assembly to use when resolving a custom-mod.
2154 Fixes handling of volatile fields used across assemblies as reported in #551513.
2156 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2158 * loader.c: Improve error messages.
2160 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2162 * class.c (mono_class_setup_methods): Only give a slot for virtual methods
2163 of interfaces. Fixes IKVM.
2165 * class.c (mono_class_setup_vtable_general): Improve debug spew.
2167 2009-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2169 * verify.c (verifier_inflate_type): Return the inflated type on success.
2171 2009-11-02 Zoltan Varga <vargaz@gmail.com>
2173 * debug-mono-symfile.c (check_line): Fix the handling of IL offset 0.
2175 * threads.c (mono_thread_attach): Call the profiler thread start callback.
2177 * object-internals.h (_MonoThreadInternal): Add a 'flags' field.
2179 * threads.c (build_wait_tids): Ignore threads which have the DONT_MANAGE
2182 * profiler.c: Add new profiler callbacks for runtime invoke.
2184 * object.c (mono_runtime_invoke): Call the runtime invoke callbacks.
2186 2009-11-01 Mark Probst <mark.probst@gmail.com>
2188 * sgen-gc.c: Keep track of the reason for a major collection and
2189 write it to the heap-dump file.
2191 2009-10-31 Miguel de Icaza <miguel@novell.com>
2193 * threads.c: refactor the code that initializes the
2194 thread_start_args into a reusable function and use this in the two
2195 methods that start up threads.
2197 2009-10-31 Zoltan Varga <vargaz@gmail.com>
2199 * appdomain.c (mono_domain_try_unload): Applied patch from Romain Tartière.
2200 Fix returning when WaitForSingleObjectEx returns WAIT_IO_COMPLETION.
2202 2009-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
2204 * mono-perfcounters.c: add the "_Total" instance for CPU counters.
2205 Until now, we only had the per-cpu(core) counters.
2207 2009-10-28 Mark Probst <mark.probst@gmail.com>
2209 * gc-internal.h, boehm-gc, sgen-gc.c, null-gc: Add
2210 mono_gc_get_suspend_signal(), which returns the suspend signal
2211 number used by the GC.
2213 2009-10-25 Zoltan Varga <vargaz@gmail.com>
2215 * threads.c (start_wrapper): Avoid an assert if thread_start_args () is NULL.
2217 * threads.c (start_wrapper): Call mono_profiler_thread_start () later after
2218 signalling start_notify.
2220 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
2222 * appdomain.c: do not test the st_mode field for shadow-copies.
2225 2009-10-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
2227 * threadpool.[ch]: added hooks for thread start/finish and item
2228 processing begin/end. For monotouch use only.
2230 2009-10-24 Zoltan Varga <vargaz@gmail.com>
2232 * threads.c (mono_thread_get_name): New helper function.
2234 * reflection.c (resolve_object): Set handle_class for strings too.
2235 (mono_reflection_create_custom_attr_data_args): New helper function to decode
2236 a cattr blob into a set of arrays and structures without creating the custom
2237 attributes themselves.
2238 (create_custom_attr_data): Simplify using create_custom_attr_data_args.
2240 * mono-debug.c (mono_debug_il_offset_from_address): New helper function.
2242 * debug-mono-symfile.c (mono_debug_symfile_get_line_numbers): New helper
2245 2009-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2247 * verify.c: Replace calls to mono_class_inflate_generic_type with
2248 mono_class_inflate_generic_type_checked. Fixes #480005.
2250 2009-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2252 * class.c (mono_class_inflate_generic_type_with_mempool): Clear the error
2253 object since not all paths lead to callees initing it.
2255 2009-10-23 Alp Toker <alp@nuanti.com>
2257 Fix embedding API breakage from r144688. mono-compiler.h is an internal
2258 header and should not be shipped:
2260 * class.h: Back out MONO_DEPRECATED change. Currently depends on config.h
2261 which is specific to the mono build. Not going to work.
2263 2009-10-23 Sebastien Pouliot <sebastien@ximian.com>
2265 * security-manager.c: Report if core-clr is active from
2266 ves_icall_System_Security_SecurityManager_get_SecurityEnabled
2267 to allow Moonlight BCL to behave appropriately (both in browser
2268 and outside, e.g. smcs)
2270 2009-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
2272 * mono-config.c: ignore UTF-8 BOM and report parser errors.
2275 2009-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2277 * class.c: fix typo.
2279 2009-10-22 Rodrigo Kumpera <rkumpera@novell.com>
2281 * class-internals.h: Change signature of mono_class_inflate_generic_type_with_mempool to take
2282 a MonoError parameter.
2284 * class.h: Mark mono_class_inflate_generic_type deprecated, add new mono_class_inflate_generic_type_checked
2285 version that can does proper error handling.
2287 * class.c (inflate_generic_type): Add a MonoError parameter. Don't assert on error, use new mono error machinery.
2289 * class.c (mono_class_inflate_generic_type_with_mempool): Add new MonoError parameter.
2291 * class.c, generics-sharing.c: Changes to handle mono_class_inflate_generic_type_with_mempool new signature.
2293 2009-10-20 Zoltan Varga <vargaz@gmail.com>
2295 * debug-helpers.c (dis_one): Fix the disassembly of empty strings when
2296 NO_UNALIGNED_ACCESS is defined.
2298 2009-10-22 Zoltan Varga <vargaz@gmail.com>
2300 * marshal.c (mono_string_builder_to_utf16): Applied patch from
2301 Hib Eris <hib@hiberis.nl>. Return empty string for empty string builders.
2304 2009-10-22 Mark Probst <mark.probst@gmail.com>
2306 * sgen-gc.c: Shorten sections whenever possible.
2308 2009-10-22 Mark Probst <mark.probst@gmail.com>
2310 * sgen-gc.c: Use our portable semaphore #defines.
2312 2009-10-22 Mark Probst <mark.probst@gmail.com>
2314 * sgen-gc.c: A debug option for dumping the heap layout to a file
2315 after each collection.
2317 2009-10-21 Mark Probst <mark.probst@gmail.com>
2319 * sgen-gc.c: Make managed write barriers atomic via
2322 2009-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2324 * verify.c (verify_delegate_compatibility): Properly verify delegate creation of static
2325 methods. Fixes #543021.
2327 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
2329 * socket-io.[ch]: fix VS build.
2331 2009-10-21 Gonzalo Paniagua Javier <gonzalo@novell.com>
2334 * socket-io.[ch]: implemented SendFile.
2336 2009-10-20 Zoltan Varga <vargaz@gmail.com>
2338 * class.c (mono_class_create_from_typedef): Initialize class->element_class
2339 before the interfaces to avoid crashes later if class initialization fails.
2342 * marshal.c (emit_marshal_vtype): Implement byref marshalling of DateTime.
2345 2009-10-20 Marek Safar <marek.safar@gmail.com>
2347 * domain.c: Bump 4.0 version.
2349 2009-10-19 Sebastien Pouliot <sebastien@ximian.com>
2351 * assembly.c (mono_assembly_load_reference): Fix leak when 'status'
2352 code is known. (parse_public_key) Remove duplicate (unneeded) NULL
2353 check since 'pubkey' can't be NULL at this stage
2354 * icall.c (ves_icall_System_Array_FastCopy): Add comment about
2355 the check. (ves_icall_Type_GetInterfaceMapData) Remove duplicate
2356 initialization of 'iter'
2358 2009-10-16 Bill Holmes <billholmes54@gmail.com>
2360 * cominterop.c : Search the interface parts of vtable to find
2361 method matches. Fixes 547030.
2363 Code is contributed under MIT/X11 license.
2365 2009-10-15 Gonzalo Paniagua Javier <gonzalo@novell.com>
2367 * marshal.c: BeginInvoke cannot be called on multicast delegates with
2368 multiple targets. Fixes bug #574426.
2370 2009-10-14 Massimiliano Mantione <massi@ximian.com>
2372 * profiler.h: Put here the definition of
2373 MONO_PROFILER_MAX_STAT_CALL_CHAIN_DEPTH
2374 (and fix the build...).
2376 2009-10-14 Massimiliano Mantione <massi@ximian.com>
2378 * profiler.c, profiler.h, profiler-private.h:
2379 Added support for different ways of getting call chains in stat mode.
2381 2009-10-12 Mark Probst <mark.probst@gmail.com>
2383 * object.c, object-internals.h: New function for computing the
2384 size of an array, factored out of mono_array_new_full(). Use
2385 SGen's functions for allocating arrays and vectors.
2387 * sgen-gc.c, gc-internal.h: Special functions for allocating
2388 arrays and vectors without race conditions. A managed array
2391 * boehm-gc.c, null-gc.c: Don't provide a managed array allocator.
2393 2009-10-12 Mark Probst <mark.probst@gmail.com>
2395 * object.c, object.h, icall.c: Write barriers do the copying now,
2396 as well, so no need for an additional memcpy.
2398 * sgen-gc.c: Lock when storing remsets. Do the memory
2399 copying/moving in the write barriers.
2401 * null-gc.c, boehm-gc.c: Write barriers must copy here, too.
2403 * reflection.c: Added an assert.
2405 2009-10-12 Mark Probst <mark.probst@gmail.com>
2407 * threads.c, process.c: A few missing write barriers.
2409 2009-10-12 Joel W. Reed <joelwreed@gmail.com>
2411 * mono-perfcounters.c, mono-perfcounters-def.h: Add
2412 network performance counters for bytes sent per second, bytes
2413 received per second, and bytes total per second.
2415 Code is contributed under MIT/X11 license.
2417 2009-10-09 Mark Probst <mark.probst@gmail.com>
2419 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
2422 2009-10-09 Mark Probst <mark.probst@gmail.com>
2424 * threads.c, object-internals.h, object.c: Move code for
2425 transferring an object to a different domain (via
2426 serialization/remoting) to object.c.
2428 * object.c (call_unhandled_exception_delegate): If the exception
2429 is in a different domain than the delegate, transfer the exception
2432 2009-10-07 Zoltan Varga <vargaz@gmail.com>
2434 * marshal.c (emit_marshal_vtype): Emit marshalling of DateTime to OLE DATE.
2437 2009-10-06 Zoltan Varga <vargaz@gmail.com>
2439 * domain.c (DEFAULT_RUNTIME_VERSION): Change this to v2.0.
2441 2009-10-06 Mark Probst <mark.probst@gmail.com>
2443 * object.c (mono_method_return_message_restore): Handle the case
2444 where the argument is an instance of a generic type. Fixes
2447 2009-10-06 Mark Probst <mark.probst@gmail.com>
2449 * object.c (set_value): Write barrier fix - we must pass the
2450 count, not the size.
2452 2009-10-05 Zoltan Varga <vargaz@gmail.com>
2454 * domain.c (mono_init_internal): Print a useful error message when encountering
2455 an old mscorlib, instead of crashing. Fixes #544307.
2457 2009-10-04 Zoltan Varga <vargaz@gmail.com>
2459 * appdomain.c (copy_app_domain_setup): Fix a warning.
2461 * debug-helpers.c (dis_one): Ditto.
2463 2009-10-04 Mark Probst <mark.probst@gmail.com>
2465 * domain-internals.h, appdomain.c: The AppDomainSetup is copied
2466 into the new domain, instead of referencing the original one.
2468 * marshal.c, marshal.h: Make mono_marshal_xdomain_copy_value()
2471 * appdomain.c: Corlib version bump.
2473 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2475 * threadpool.c: one more...
2477 2009-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2479 * threadpool.c: forgot a LeaveCriticalSection when telling the idle
2480 threads to die because we're shutting down. delgate5.exe works again.
2482 2009-10-01 Bill Holmes <billholmes54@gmail.com>
2484 * cominterop.c (mono_marshal_free_ccw_entry): Updating the
2485 ccw_interface_hash table when a ccw is finalized.
2487 Code is contributed under MIT/X11 license.
2489 2009-09-30 Mark Probst <mark.probst@gmail.com>
2491 * assembly.c, domain.c, image.c, metadata-internals.h: Split
2492 domain and image unloading into two steps. We must do this
2493 because clearing the domain in SGen requires the class metadata to
2494 be intact, but we need to free the mono_g_hash_tables in case a
2495 collection occurs during domain unloading and the roots would trip
2498 2009-09-30 Mark Probst <mark.probst@gmail.com>
2500 * object-internals.h: Remove serialized culture fields from
2503 * icall-def.h, thread-types.h, threads.c: Remove serialized
2506 * appdomain.c: Corlib version bump.
2508 2009-09-30 Zoltan Varga <vargaz@gmail.com>
2510 * marshal.c (emit_marshal_object): Emit out marshalling of stringbuilders.
2513 2009-09-30 Mark Probst <mark.probst@gmail.com>
2515 * sgen-gc.c: Try to shorten the new section after a major
2516 allocation to avoid ever-growing sections.
2518 2009-10-13 Martin Baulig <martin@ximian.com>
2520 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
2521 `MONO_DEBUGGER_EVENT_TRAMPOLINE' into
2522 `MONO_DEBUGGER_EVENT_OLD_TRAMPOLINE' and added a new
2523 `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
2525 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 4.
2527 2009-09-29 Gonzalo Paniagua Javier <gonzalo@novell.com>
2529 * threadpool.c: fixed the order in which 'completed' and the wait
2530 handle, if any, are set. Fixes bug #542933 and delegate2.exe
2531 No need to use the wait_handle field of ASyncCall. Make sure the
2532 threadpool is active when adding a job or queueing an idle thread.
2534 2009-09-29 Zoltan Varga <vargaz@gmail.com>
2536 * object.c (mono_unhandled_exception): Fix a crash if there is no main thread.
2538 * threads.c (build_wait_tids): Fix a crash if there is no main thread, like
2539 when using --compile-all.
2541 2009-09-27 Mark Probst <mark.probst@gmail.com>
2543 * metadata.c (free_generic_class): Unregister the field_objects
2544 roots if we're using SGen.
2546 2009-09-27 Mark Probst <mark.probst@gmail.com>
2548 * reflection.c (mono_dynamic_image_free): Deregister the GC root
2549 for GenericParamTableEntry.gparam.
2551 2009-09-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
2553 * marshal.c: don't create the handle when calling. It is created later
2556 2009-09-26 Mark Probst <mark.probst@gmail.com>
2558 * sgen-gc.c: Warning fixes.
2560 2009-09-26 Mark Probst <mark.probst@gmail.com>
2562 * sgen-gc.c: New debug option "xdomain-checks", which scans the
2563 whole heap for cross-domain references before each collection.
2565 * sgen-scan-object.h: The scan action can now use SCAN to scan the
2568 * threadpool-internals.h, threadpool.c: New function
2569 mono_thread_pool_is_queue_array() for checking whether a given
2570 array is used as a (cross-domain) queue by the thread pool code.
2572 2009-09-26 Mark Probst <mark.probst@gmail.com>
2574 * sgen-gc.c: New function mono_gc_scan_for_specific_ref() which
2575 searches the whole heap for objects containing a specific
2576 reference. Only for debugging.
2578 2009-09-26 Mark Probst <mark.probst@gmail.com>
2580 * appdomain.c (MONO_CORLIB_VERSION): Bumped.
2582 * icall-def.h, threads.c, threads-types.h: New icalls for copying
2583 byte arrays between domains.
2585 2009-09-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
2588 * class-internals.h:
2589 * mono-perfcounters-def.h:
2590 * mono-perfcounters.c:
2591 -There is a list of idle threads
2592 -Each of those idle threads wait on their own WaitHandle instead
2593 of all of them using the same semaphore. When a new work item is
2594 added, the job is assigned directly to an idle thread or a newly
2595 created one if possible and then the handle for that thread is
2596 signaled. Compare that to the current approach where all the
2597 threads in the pool compete to dequeue a job from the same
2599 -New struct ThreadPool that brings together the bunch of static
2600 variable for each threadpool (IO and regular).
2601 -New performance counters: # of items added and its rate per
2602 threadpool. The rate will be used later, perhaps together with
2603 other perf. counters, to decide when idle threads should exit.
2605 2009-09-25 Jonathan Chambers <joncham@gmail.com>
2607 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal):
2608 Fix typo on Windows build.
2609 (ves_icall_System_Net_Sockets_Socket_Accept_internal): Fix typo on Windows build.
2611 Code is contributed under MIT/X11 license.
2613 2009-09-25 Mark Probst <mark.probst@gmail.com>
2615 * object-internals.h: The Thread class is split up into Thread and
2616 InternalThread now. We have exactly one InternalThread per
2617 thread, and at most one Thread per appdomain per thread. Most
2618 data is stored in InternalThread. All InternalThread objects live
2621 * class-internals.h: Add internal_thread_class to MonoDefaults.
2623 * appdomain.c (mono_domain_unload), attach.c (receiver_thread),
2624 domain.c, gc.c, icall-def.h, monitor.c, object.c, sgen-gc.c,
2625 socket-io.c, threadpool.c, thread-types.h, threads.c: Changes
2626 resulting from the split of the Thread class.
2628 * gc-internal.h: Prototype for new function for checking whether a
2629 thread is the finalizer thread.
2631 * appdomain.c: Corlib version bump.
2633 2009-09-25 Rolf Bjarne Kvinge <RKvinge@novell.com>
2635 * appdomain.c|h: Add a mono_domain_try_unload method which is
2636 equivalent to mono_domain_unload, except that it returns an exception
2637 instead of throwing it. Make mono_domain_unload use the
2638 mono_domain_try_unload method to avoid code-duplication.
2640 2009-09-25 Zoltan Varga <vargaz@gmail.com>
2642 * debug-helpers.c (dis_one): Avoid unaligned accesses on platforms where that is
2645 2009-09-24 Zoltan Varga <vargaz@gmail.com>
2647 * marshal.c (emit_ptr_to_object_conv): Generate an exception instead of
2648 aborting when a conversion is not implemented.
2650 2009-09-23 Miguel de Icaza <miguel@novell.com>
2652 * verify.c: when comparing culture strings, use g_ascii_strcmp
2654 * assembly.c (mono_public_tokens_are_equal): Change g_strcasecmp
2655 when comparing public key tokens to use memcmp on 16 bytes. I do
2656 not believe this ever worked as advertised in the past.
2658 The standard Public Key is 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00
2659 which would have always failed earlier.
2661 2009-06-25 Miguel de Icaza <miguel@novell.com>
2663 * gc.c: Raise a NullArgumentException if the object passed is
2666 2009-09-22 Zoltan Varga <vargaz@gmail.com>
2668 * image.c (mono_image_close): Atomically decrement the reference count and
2669 remove the image from the hash tables, to prevent another thread from seeing a
2670 dying MonoImage. Fixes #541194.
2672 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2674 * threadpool.c: actually use the minimum number of 'completion ports'
2675 (for us is just a potential worker thread).
2677 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2679 * threadpool.c: remove ares_htable. It does not make sense any more
2680 since the same objects are now stored in GC-tracked arrays while they are
2683 2009-09-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
2685 * threadpool.c: increase the minimum length of the queues to 128.
2688 2009-09-21 Zoltan Varga <vargaz@gmail.com>
2690 * marshal.c (mono_marshal_get_string_ctor_signature): New internal function to
2691 return the modified signature used by string ctors.
2693 2009-09-20 Zoltan Varga <vargaz@gmail.com>
2695 * marshal.c (mono_marshal_get_runtime_invoke_dynamic): New internal function
2696 to return a runtime-invoke wrapper which uses DYN_CALL to call the wrapped
2697 method, to be used by full-aot.
2699 2009-09-18 Rodrigo Kumpera <rkumpera@novell.com>
2701 Since the runtime supports lazy initialization of a type's vtable and this can cause a type
2702 to fail, we need to ensure that the vtable is properly initialized at spots were the type must
2703 be known to be good.
2705 * class.c (mono_class_init): Fail array types if their element type fails initialization
2708 * object.c (mono_class_create_runtime_vtable): Fail array types if their element type fails
2709 initialization, additionally we request the element_type vtable to be initialized as well.
2711 This is fine and should not increase the working set in any meaningful way since it's reasonable
2712 to assume that most code will create an array and eventually populate it, which will require the
2713 type's vtable to be initialized.
2715 * loader.c (field_from_memberref): Add a comment for a possibly useless mono_class_init call.
2717 2009-09-17 Atsushi Enomoto <atsushi@ximian.com>
2719 * normalization-tables.h : regenerated.
2721 2009-09-16 Zoltan Varga <vargaz@gmail.com>
2723 * mono-debug.c (mono_debug_add_method): Increase the size of the buffer,
2724 a leb128 encoding can take up to 5 bytes.
2726 2009-09-15 Rodrigo Kumpera <rkumpera@novell.com>
2728 * class.c (verify_class_overrides): Remove useless argument.
2730 * class.c (mono_class_setup_vtable_general): Move the overrides check to happen
2731 before interface enumeration as this is no longer required.
2733 2009-09-15 Rodrigo Kumpera <rkumpera@novell.com>
2735 * class.c: New function mono_class_is_assignable_from_slow that is safe to be
2736 used under mono_class_init context. This functions avoid any code path that
2737 calls mono_class_init, which leads it to be slow as some things like the interface
2738 bitmap are not available.
2740 * class.c (verify_class_overrides): Use mono_class_is_assignable_from_slow instead
2741 of it's own broken version. Fixes the verifier part of #538588.
2743 * class-internals.h: Export mono_class_is_assignable_from_slow as part of the internal
2746 2009-09-15 Mark Probst <mark.probst@gmail.com>
2748 * class.c (mono_class_init): Always set an exception in a class if
2749 vtable setup fails. Fixes #538577.
2751 * generic-sharing.c: Raise an exception if mono_class_vtable()
2754 2009-09-13 Zoltan Varga <vargaz@gmail.com>
2756 * marshal.c (mono_marshal_get_runtime_invoke): Don't share instance
2757 methods of vtypes, as they could be incorrectly shared with static methods
2758 taking an IntPtr argument.
2760 2009-09-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
2764 * class-internals.h: renamed waithandle_class to
2765 manualresetevent_class.
2766 * marshal.c: propagate the exception if a remoting BeginInvoke call
2769 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
2771 * object.c: Properly handle vtable failures.
2773 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
2775 * socket-io.c: Assert on vtable failure.
2777 * mono-mlist.c: Assert on vtable failure.
2779 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
2781 * marshal.c: Assert on vtable failure.
2783 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
2785 * icall.c: Properly handle vtable failures.
2787 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
2789 * debug-helpers.c (mono_class_describe_statics): Properly handle vtable failures.
2791 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
2793 * cominterop.c (ves_icall_System_ComObject_CreateRCW): Property handle vtable failures.
2795 * console-unix.c (do_console_cancel_event): Same.
2797 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
2799 * class-internals.h: Add mono_class_vtable_full function that allows control
2800 if an exception should be raised or not.
2802 * object.c (mono_class_vtable): Call into mono_class_vtable_full. Fix this function
2803 to do what its documentation say, that is to return NULL and set exception_type on
2806 * object.c (mono_class_create_runtime_vtable): Add new raise_on_error parameter
2807 and change the code to honor it.
2809 2009-09-11 Rodrigo Kumpera <rkumpera@novell.com>
2811 * verify.c: Fix typo in error message.
2813 2009-09-10 Sebastien Pouliot <sebastien@ximian.com>
2815 * security-core-clr.c: Fix default_platform_check so it can run
2816 the runtime coreclr tests (without an infinite recursion when
2817 throwing an exception).
2819 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
2821 object.c (mono_delegate_ctor_with_method): Guard against null method.
2823 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
2825 * marshal.c (mono_marshal_get_xappdomain_dispatch): Add an assert
2826 that should be replaced with error handling later.
2828 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
2830 * marshal.c (mono_delegate_end_invoke): Fix warning.
2832 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
2834 * loader.c (mono_field_from_token): Properly handle invalid
2837 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
2839 * pedump.c (verify_image_file): Skip types that can't be
2842 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
2844 * verify.c: Look for recursive valuetypes only against the
2845 type been initialized as this is a lot simpler and works.
2847 2009-09-10 Rodrigo Kumpera <rkumpera@novell.com>
2849 * verify.c: Ensure that fields are properly loaded before
2852 2009-09-10 Bill Holmes <billholmes54@gmail.com>
2854 * object.c (mono_object_get_virtual_method) : Call
2855 mono_cominterop_get_invoke if the object is a COM object.
2857 Code is contributed under MIT/X11 license.
2859 2009-09-09 Rodrigo Kumpera <rkumpera@novell.com>
2861 * verify.c: Check for recursive valuetype definitions.
2863 2009-09-08 Rodrigo Kumpera <rkumpera@novell.com>
2865 Use inheritance-aware interface offsets. Inherited types use the same offsets
2866 of their parents. This reduce offset duplication in case more than one type in
2867 the inheritance tree explicitly implements the same interface.
2869 This also removes a source of vtable bubbles found in #532409. An abstract type
2870 isn't required to provide abstract methods to all interfaces it implements, which
2871 resulted in a bubble with the previous scheme as the child would get a non-full
2872 vtable from its parent. We fail all concrete types with vtable bubbles, so this
2875 This change causes an increase of 1.7% in vtable memory usage for IronPython pystone but
2876 it's expected to not cause any significant increase beyond that.
2878 * class.c (setup_interface_offsets): Compute super class iface offsets
2879 first to force sharing.
2881 * class.c: Add VTABLE_SELECTOR macro to the vtable debug macros to help
2882 dumping only the relevant ones.
2884 * class.c (mono_class_setup_vtable_general): Give newslot, non final, virtual
2885 methods a new slot regardless if they belong to an interface or not. This allows
2886 an inherited type to override the iface method separately from the class one.
2888 2009-09-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
2890 * threadpool.c: make the Sleep() alertable to prevent delays exiting
2891 applications that take less than 2s to execute.
2894 2009-09-04 Zoltan Varga <vargaz@gmail.com>
2896 * object-internals.h (MonoRuntimeCallbacks): Add a 'get_runtime_build_info' callback.
2898 * object.c (mono_get_runtime_callbacks): New helper function to return
2899 the runtime callbacks.
2901 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Use the result of
2902 mono_get_runtime_build_info () as the display name.
2904 2009-09-03 Zoltan Varga <vargaz@gmail.com>
2906 * marshal.c (emit_marshal_array): Call conv.ovf.i on the array parameter
2907 argument, since NEWARR expects a native int. Fixes #481559.
2909 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
2911 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Guard
2912 against broken SRE methods.
2914 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
2916 * class.c (mono_type_get_full): Don't call mono_metadata_free_type on
2917 a NULL variable. Abort early on failure.
2919 2009-09-03 Rodrigo Kumpera <rkumpera@novell.com>
2921 * class.c (can_access_type): Fail visibility test for non nested
2922 types with nested visibility.
2924 2009-09-02 Sebastien Pouliot <sebastien@ximian.com>
2926 * assembly.c (parse_public_key): Avoid allocating (and not
2927 freeing) the public key array when it's not requested by the
2929 * threads.c (mono_thread_manage, mono_thread_create_internal,
2930 ves_icall_System_Threading_Thread_Thread_internal): Free
2931 allocated memory on error.
2933 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
2935 * icall.c, icall-def.h: Remove some dead code from early SRE changes.
2937 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
2939 * class.c (mono_class_setup_fields): Remove duplicated local variable
2941 Rename gklass to gtd to reflect the fact that it points to the generic
2943 Remove the duplicated call to mono_class_setup_fields on gtd and move
2944 the error check to the beginning.
2946 2009-09-02 Rodrigo Kumpera <rkumpera@novell.com>
2948 * marshal.c (mono_array_to_lparray): Do DISABLE_COM properly.
2949 Remove cruft of the previous patch.
2951 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
2953 * metadata-verify.c (verify_method_table): Check for abstract + final.
2956 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
2958 * verify.c (verify_class_fields): Check for duplicate fields.
2960 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
2962 * metadata-verify.c: Verify the typeref table for duplicates.
2964 2009-09-01 Rodrigo Kumpera <rkumpera@novell.com>
2966 This reverts r140936 and properly handles interfaces with static methods. The
2967 right fix is to ensure vtables without bubles which is an easier to verify
2968 constraint. We should avoid such special cases as of the reverted patch as those
2969 only make the runtime more brittle.
2971 * class.c (mono_class_setup_vtable_general): Revert previous change that handle
2972 static methods on interfaces.
2974 * class.c (setup_interface_offsets): Use the number of virtual methods when
2975 calculating interface offsets instead of the number of methods. This way we
2976 avoid bubles on the layout.
2978 2009-08-31 Rodrigo Kumpera <rkumpera@novell.com>
2980 * metadata-verify.c (verify_metadata_header): Some very smart
2981 obfuscators like to add extra stream headers. Ignore them.
2983 2009-08-30 Zoltan Varga <vargaz@gmail.com>
2985 * class.c (mono_class_setup_vtable_general): Verify interfaces with static
2988 2009-08-29 Rodrigo Kumpera <rkumpera@novell.com>
2990 * metadata-verify.c: Verify for duplicated types.
2992 2009-08-28 Rodrigo Kumpera <rkumpera@novell.com>
2994 * metadata-verify.c (verify_typedef_table): Verify for nested types
2995 without an entry on the nested class table.
2997 2009-08-28 Zoltan Varga <vargaz@gmail.com>
2999 * cominterop.c (cominterop_get_ccw): Applied patch from tom hindle
3000 <tom_hindle@sil.org>. Add locking around hash table accesses.
3002 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3004 * verify.c (mono_verifier_verify_class): Verify all interface if
3005 really are interfaces. Fixes #534184.
3007 2009-08-27 Rodrigo Kumpera <rkumpera@novell.com>
3009 * pedump.c: Initialize all types during metadata validation so we report
3010 errors only detected as part of class initialization.
3012 2009-08-26 Rodrigo Kumpera <rkumpera@novell.com>
3014 * metadata-verify.c (verify_method_table): PInvoke requires method to
3015 be static. Fixes #534189
3017 2009-08-26 Zoltan Varga <vargaz@gmail.com>
3019 * threads.c (mono_thread_suspend_all_other_threads): Handle 'threads_starting_ip'
3022 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3024 * class.c (mono_class_setup_vtable_general): Verify the resulting vtable
3025 for holes or bad methods. Fixes #525314.
3027 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3029 * class.c (setup_interface_offsets): Don't allocate slot
3030 for the same interface multiple times. This creates bubbles
3031 that waster space and make vtable verification harder.
3033 The same interface get a slot multiple times since we need
3034 to get the closure of all implemented interfaces, which means
3035 the same interface is reported multiple times.
3037 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3039 * verify.c (mono_verifier_verify_class): Don't check the fields
3040 of generic instances since the context on which they got expanded
3041 might lead to false positives.
3043 Such thing happens when a generic type is inflated in the context
3044 of a generic method and the inflated type of a field turns into a
3045 generic method argument, which causes the checking code to think
3046 it's an invalid class when it's not.
3048 2009-08-25 Rodrigo Kumpera <rkumpera@novell.com>
3050 * verify.c (mono_type_is_valid_in_context): Verify if type
3051 is NULL and remove duplicate test.
3053 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3055 * verify.c (mono_verifier_verify_class): Check fields for
3056 invalid generic arguments.
3058 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3060 * class.c (verify_class_overrides): Verify if for static
3061 and non virtual methods.
3063 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3065 * icaa.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor):
3066 Check for errors after retrieving the vtable.
3068 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3070 * class.c (mono_class_setup_vtable_general): Verify
3071 if method overrides are valid before processing them.
3073 2009-08-24 Rodrigo Kumpera <rkumpera@novell.com>
3075 * marshal.c (mono_array_to_lparray): Fix minimal build with
3076 cominterop disabled.
3078 * marshal.c (mono_free_lparray): Same.
3080 2009-08-21 Mark Probst <mark.probst@gmail.com>
3082 * threadpool.c (mono_thread_pool_init): Use mono_object_hash() as
3083 the hash function for the ares_htable.
3085 2009-08-20 Rodrigo Kumpera <rkumpera@novell.com>
3087 * metadata-verify.c (verify_assembly_table): Accept 0x10 as a valid
3088 bit for assembly flags. MS is ok with it but there is no spec anywhere
3091 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3093 * class.c (mono_class_create_from_typedef): Emit profiler events
3096 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3098 * icall.c (ves_icall_Type_GetMethodsByName): Don't leak loader errors.
3099 Release memory on failure.
3101 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3103 * class-internals.h: Add mono_metadata_load_generic_param_constraints_full
3104 to the internal API.
3106 * metadata.c (get_constraints): Use a single-linked table as we don't
3107 traverse it backward. Fail and return FALSE if only of the contraint types
3110 * metadata.c (mono_metadata_load_generic_param_constraints_full): Identical
3111 to mono_metadata_load_generic_param_constraints except for having a return value.
3112 This has to be done since the later is part of the public API.
3114 * class.c (mono_class_create_from_typedef): Properly check the loading of constrains
3117 * loader.c (mono_get_method_from_token): Properly check the loading of constraints
3118 and fail the method.
3120 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3122 * metadata-verify.c (is_valid_method_header): Add work-around to deal
3123 with MS broken behavior of emmitting EH section sizes without the
3126 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3128 * metadata.c (mono_type_create_from_typespec): Don't allocate image
3129 memory until we're sure that we'll need it. This avoids leaking for
3130 broken types or duplicated instantiation.
3132 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3134 * metadata-verify.c (is_valid_method_header): Fix stupid formating
3137 2009-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3139 * metadata-verify.c (is_valid_method_header): Fix number of clauses
3140 and expected size calculation.
3142 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3144 * class.c (mono_class_get_field_idx): Add fixme for broken
3145 behavior for types with multiple fields with the same name.
3146 I would rather fix it, but have no idea on how to generate
3147 such artifact for testing.
3149 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3151 * verify.c (verifier_load_field): We should allow references to
3152 fields to be made using the generic type definition. It's up to
3153 the loader system to fail invalid ops.
3155 * verify.c (get_boxable_mono_type): Only uninstantiated GTDs
3158 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3160 * class.c: Fix usage of mono_metadata_interfaces_from_typedef_full.
3162 * metadata-internals.h: Fix declaration of
3163 mono_metadata_interfaces_from_typedef_full.
3165 * metadata.c (mono_metadata_interfaces_from_typedef_full): Add extra
3166 heap_alloc_result parameter that controls if the result should be
3169 * metadata.c (mono_metadata_interfaces_from_typedef): Let the resulting
3170 array be g_malloc'd and properly document this public API function.
3172 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3174 * cil-coff.h: Fix METHOD_HEADER_FORMAT_MASK to be 2 bits and
3175 remove METHOD_HEADER_TINY_FORMAT1.
3177 * reflection.c: Remove reference to METHOD_HEADER_TINY_FORMAT1.
3179 * metadata.c (mono_metadata_parse_mh_full): Kill tiny format1.
3181 Both spec and MS uses only 2 bits to enumerate the kind of header.
3182 So given that 0x6 and 0x2 are equal under a 2 bits mask, tiny format1
3183 is superfluous, only used for tiny headers with odd code lengths.
3185 This change also make sure that mono doesn't wronly interpret bit 2
3186 of fat header flags, which is currently reserved.
3188 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3190 * metadata.c (do_mono_metadata_parse_type): Do error
3191 checking for element types. Don't abort if presented
3192 with a broken type kind.
3194 2009-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3196 * metadata.c (mono_metadata_parse_method_signature_full):
3197 Gracefully fail bad vararg signatures.
3199 2009-08-18 Christian Hergert <chris@dronelabs.com>
3202 * class.c: Fix warnings for uninitialized variables.
3204 2009-08-18 Christian Hergert <chris@dronelabs.com>
3206 * icall.c: Fix _NSGetEnviron method declaration warning.
3208 2009-08-18 Christian Hergert <chris@dronelabs.com>
3211 * reflection.c: Make bitwise checks explicit.
3213 2009-08-18 Christian Hergert <chris@dronelabs.com>
3216 * marshal.c: Fix printf warnings.
3218 2009-08-18 Zoltan Varga <vargaz@gmail.com>
3220 * reflection.c (encode_cattr_value): Fix a warning.
3222 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3224 * metadata.c (mono_metadata_parse_array_full): Fix memory leak
3227 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3229 * loader.c (mono_method_signature): Don't assert on broken
3230 signature. Print a more useful error message.
3232 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3234 * loader.c (mono_method_get_marshal_info): Assert if
3235 signature is invalid. Bounds check stores to the
3238 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3240 * loader.c (field_from_memberref): Fix warning.
3242 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3244 * loader.c (mono_method_get_param_names): Check if signature
3245 is null. Don't store beyond the size of the name array.
3247 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3249 * loader.c (mono_get_method_constrained): Check if signature
3252 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3254 * loader.c (mono_loader_set_error_bad_image): Improve
3257 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3259 * loader.c (mono_get_method_full): Convert an assertion
3260 into a loader error.
3262 2009-08-17 Rodrigo Kumpera <rkumpera@novell.com>
3264 * class-internals.h, class.c: Better naming and documentation.
3266 2009-08-17 Zoltan Varga <vargaz@gmail.com>
3268 * boehm-gc.c (mono_gc_add_weak_track_handle): Don't do any work if
3271 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3273 * loader.c (mono_method_get_signature_full): Fail gracefully if signature
3276 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3278 * loader.c (mono_loader_error_prepare_exception): Handle missing field
3279 errors with no class set.
3281 * loader.c (field_from_memberref): If the field signature is of the wrong
3282 type fail with a MissingFieldException instead of a BadImageException as
3283 this is the behavior observed on MS.
3285 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3287 * loader.c (field_from_memberref): Don't crash if either the field
3288 signature or the typespec class are invalid.
3290 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3292 * verify.c (verifier_load_field): Don't allow field related
3293 ops to reference fields on generic type definition.
3295 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3297 * metadata-verify.c: Add new warning level for errors specified
3298 by ECMA 335 but that MS ignores.
3300 * metadata-verify.c (verify_method_table): Make compiler controled
3301 visibility + (rt)specialname error a warning as MS ignores this. Ignoring
3302 this check is safe because the end result will only be some visibility
3303 exceptions been thrown.
3305 2009-08-14 Rodrigo Kumpera <rkumpera@novell.com>
3307 * verify.c (get_boxable_mono_type): Don't allow the
3308 use of the generic type definition on boxed type positions.
3312 2009-08-14 Mark Probst <mark.probst@gmail.com>
3314 * threadpool.c: Make sure no cross-domain references remain in
3315 ares_htable or the arrays that are thrown away when resizing.
3317 2009-08-14 Mark Probst <mark.probst@gmail.com>
3319 * appdomain.c, metadata-internals.h, image.c: In MonoImage add a
3320 list of classes for which we have to unregister reflection_info
3321 with the GC and which are not in the namespace cache.
3323 * reflection.c (mono_reflection_initialize_generic_parameter): Add
3324 the class to the list.
3326 2009-08-14 Mark Probst <mark.probst@gmail.com>
3328 * domain.c (mono_domain_free): Unregister the GC roots in
3331 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
3333 * reflection.c (mono_reflection_type_get_handle): Fix typo.
3335 2009-08-12 Rodrigo Kumpera <rkumpera@novell.com>
3337 * class.c: Add mono_class_get_field_from_name_full which does
3338 the same as mono_class_get_field_from_name but does check field
3341 * class-internals.h: Export mono_class_get_field_from_name_full as
3342 part of the internal API.
3344 * loader.c (field_from_memberref): Search fields by name and signature
3345 as it's valid to have two fields with same name but different types.
3349 2009-08-10 Rodrigo Kumpera <rkumpera@novell.com>
3351 * icall-def.h: Add a bunch of temporary icalls to MonoGenericClass.
3353 * reflection.c (mono_reflection_type_get_handle): Handle MonoGenericClass.
3355 * reflection.c (encode_cattr_value): Use mono_reflection_type_get_handle to encode
3358 2009-08-13 Zoltan Varga <vargaz@gmail.com>
3360 * gc.c (GCHandle_CheckCurrentDomain): Moved this here from icall.c.
3362 * boehm-gc.c (mono_gc_add_weak_track_handle): Handle nulls.
3364 2009-08-12 Mark Probst <mark.probst@gmail.com>
3366 * sgen-gc.c, sgen-scan-object.h: Object scanning code factored out
3367 to sgen-scan-object.h, which can be included and parameterized via
3370 * Makefile.am: sgen-scan-object.h added.
3372 2009-08-12 Mark Probst <mark.probst@gmail.com>
3374 * gc.c: #define GC_dont_gc if we're compiling with SGen.
3376 2009-08-12 Mark Probst <mark.probst@gmail.com>
3378 * domain.c (mono_domain_free): Free a domain's mono_g_hash_tables
3379 before clearing a domain in the GC.
3381 2009-08-12 Mark Probst <mark.probst@gmail.com>
3383 * exception.c (mono_exception_from_name_domain): Actually create
3384 the exception in the specified domain.
3386 * appdomain.c (mono_domain_create_appdomain_internal): Create the
3387 OutOfMemoryException a bit later so that the domain is inialized
3388 "enough" that it works.
3390 2009-08-12 Mark Probst <mark.probst@gmail.com>
3392 * threads.c (thread_cleanup): Clean up the cached_culture_info
3393 array to prevent cross-domain references.
3395 Tue Aug 11 14:38:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
3397 * metadata.c: more documentation for MonoType accessors.
3399 2009-08-11 Raja R Harinath <harinath@hurrynot.org>
3401 Fix incorrect size definitions where the tail array isn't a list
3403 * class-internals.h (MONO_SIZEOF_MARSHAL_TYPE): Use offsetof to
3405 * domain-internals.h (MONO_SIZEOF_JIT_INFO): Likewise.
3406 * metadata.h (MONO_SIZEOF_TYPE): Likewise.
3407 * reflection.h (MONO_SIZEOF_CUSTOM_ATTR_INFO): Likewise.
3409 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3412 * reflection.c: MONO_SIZEOF_CUSTOM_ATTR_INFO.
3414 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3418 * metadata-internals.h:
3420 * reflection.c: use MONO_SIZEOF_METHOD_HEADER.
3422 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3429 * reflection.c: #define for sizeof in MonoType and
3430 MonoMethodSignature.
3432 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3435 * domain-internals.h: add and use #define's instead of sizeof()
3436 for MonoJitInfo and MonoJitInfoTable.
3438 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3441 * class.h: use #define instead of sizeof() for MonoRemoteClass.
3443 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
3448 * class-internals.h:
3449 * generic-sharing.c:
3450 * marshal.c: use a #define instead of sizeof() for a few
3451 structures that use a zero-length array.
3453 2009-08-06 Rodrigo Kumpera <rkumpera@novell.com>
3455 * object-internals.h (MonoReflectionMethodOnTypeBuilderInst): Add new fields
3456 to handle inflated generic methods.
3458 * appdomain.c: Bump corlib version.
3460 * reflection.c (mono_image_get_method_on_inst_token): Handle generic method
3463 * reflection.c (fixup_method): Same
3465 * reflection.c (resolve_object): Same.
3467 * reflection.c (inflate_method): Replace a g_assert_not_reached with a
3468 g_error and a decent message.
3470 2009-08-06 Massimiliano Mantione <massi@ximian.com>
3472 * bohem-gc.c (mono_gc_add_weak_track_handle): Get the domain
3473 from the object because it could not yet be available globally
3474 (it happens if the profiler tries to create a gchandle on the
3475 MonoThread object of a thread that is still registering itself
3478 2009-08-04 Rodrigo Kumpera <rkumpera@novell.com>
3480 * reflection.c (mono_generic_class_get_object): Initialized the
3481 managed type arguments array.
3483 * object-internals.h (MonoReflectionGenericClass): Add type_arguments field.
3485 * appdomain.c: Bump corlib version.
3487 2009-08-04 Zoltan Varga <vargaz@gmail.com>
3489 * threads.c (thread_cleanup): Free serialized_ui_culture_info. Fixes
3492 2009-08-03 Zoltan Varga <vargaz@gmail.com>
3494 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
3495 Avoid a crash if synch_cs is not set.
3497 * threads.c (ves_icall_System_Threading_Thread_Thread_free_internal):
3498 Handle the case when the handle is 0.
3500 * appdomain.c: Bump corlib version.
3502 2009-08-02 Zoltan Varga <vargaz@gmail.com>
3504 * reflection.c (mono_type_get_object): Fix a warning.
3506 2009-08-01 Mark Probst <mark.probst@gmail.com>
3508 * sgen-gc.c (mono_gc_wbarrier_value_copy): Don't compute the GC
3509 descriptor here. We assume it's already been computed.
3511 * generic-sharing.c (instantiate_other_info): Compute the GC
3512 descriptor for info type MONO_RGCTX_INFO_KLASS.
3514 2009-08-01 Mark Probst <mark.probst@gmail.com>
3516 * reflection.c (mono_type_get_object): MonoDomain is an unmanaged
3517 type, so don't use MONO_OBJECT_SETREF to set a field.
3519 2009-08-01 Mark Probst <mark.probst@gmail.com>
3521 * gc.c: We were missing one case where invoking a finalizer would
3522 not reset the domain. Also, in the finalizer thread loop, assert
3523 that we're in the root domain.
3525 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
3527 * icall.c (ves_icall_MonoType_GetArrayRank): Throw ArgumentException
3528 if the type is not an array.
3530 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
3532 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Return the
3533 method bound to the declaring type of the method. Raise an exception
3534 if the type is not a generic param.
3536 2009-07-31 Rodrigo Kumpera <rkumpera@novell.com>
3538 * class.c (print_unimplemented_interface_method_info): Print the
3541 * class.c (mono_class_setup_vtable_general): When dealing with a
3542 generic instance first check if the generic type definition is
3545 2009-02-11 Tom Hindke <tom_hindle@sil.org>
3547 * marshal.c (mono_array_to_lparray): Implemented so managed object types are converted to native types.
3549 * marshal.c: Added new method mono_free_lparray to free memory allocated by mono_array_to_lparray
3551 * marshal.c (emit_marshal_array): call emit mono_free_lparray where approprate.
3553 * marshal.c (conv_to_icall): added MONO_MARSHAL_FREE_LPARRAY case
3555 * metadata.h (MonoMarshalConv enum): added MONO_MARSHAL_FREE_LPARRAY
3557 Code is contributed under MIT/X11 license
3559 2009-08-30 Rodrigo Kumpera <rkumpera@novell.com>
3561 * verify.c: Fix naming of stelem and ldelem.
3563 2009-07-30 Mark Probst <mark.probst@gmail.com>
3565 * generic-sharing.c: Replace the templates lock with the loader
3566 lock because of very hard to resolve deadlock issues.
3568 2009-07-30 Zoltan Varga <vargaz@gmail.com>
3570 * icall.c (ves_icall_Type_GetMethodsByName): Use
3571 mono_class_get_vtable_size () instead of accessing klass->vtable_size
3572 directly. Fixes #525338.
3574 * class.c (mono_class_get_vtable_size): New helper function.
3576 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle_type): Fix the second argument, its a MonoType* not a MonoClass*. Check whenever
3577 the field belongs to the type. Fixes #525733.
3579 2009-07-30 Mark Probst <mark.probst@gmail.com>
3581 * sgen-gc.c: When we stop a thread and its stack top is not within
3582 its allocated stack (because it's in an altstack signal handler),
3583 restart it and stop it again, until it is.
3585 2009-07-30 Mark Probst <mark.probst@gmail.com>
3587 * sgen-gc.c: Take a thread's stack top and registers from the
3588 sigcontext in the suspend signal handler.
3590 * sgen-gc.h, sgen-archdep.h, Makefile.am: Move arch-dependent
3591 stuff to sgen-archdep.h.
3593 * gc.c, gc-internal.h: Remove the get_ip_from_sigctx installer and
3594 caller, because have code in sgen-archdep.h to acquire that data.
3596 2009-07-29 Massimiliano Mantione <massi@ximian.com>
3598 * profiler.c, profiler.h, profiler-private.h:
3599 Added support for keeping track of code chunks and buffers.
3601 2009-07-29 Rodrigo Kumpera <rkumpera@novell.com>
3603 * metadata-verify.c: Fix endianness problems on decoding functions.
3604 Based on a patch by Ulrich Weigand <uweigand@de.ibm.com>
3606 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
3608 * icall.c (ves_icall_Type_make_array_type): Handle the new encoding
3609 schema for vectors and one dimension SZARRAY.
3611 2009-07-28 Rodrigo Kumpera <rkumpera@novell.com>
3613 * reflection.c (mono_reflection_type_get_handle): Handle the new encoding
3614 schema for vectors and one dimension SZARRAY.
3616 2009-07-27 Mark Probst <mark.probst@gmail.com>
3618 * icall-def.h, thread-types.h, threads.c: New separate icalls for
3619 Interlocked.(Compare)Exchange with object arguments, which invoke
3622 2009-07-26 Miguel de Icaza <miguel@novell.com>
3624 * icall.c (ves_icall_Type_GetNestedType): Throw an exception when
3625 passed invalid arguments. Fixes another crasher in the
3626 Silverlight test suite.
3628 * class.c (mono_class_array_element_size): Return 0 for the size
3629 of the class; This fixes the crasher exposed by :
3631 typeof (void).MakeArrayType ();
3633 * icall.c (ves_icall_MonoType_GetEvent): Do not dereference method
3634 if there is no method to dereference. Put all the code that
3635 depends on this inside the if (method) block.
3637 This fixes the crasher exposed by Microsoft's Silvelright CLR test
3638 suite ./Reflection/Emit/TypeBuilder/TypeBuilderGetEvent.exe
3640 With this change, we pass the test.
3642 * reflection.c (mono_reflection_sighelper_get_signature_local):
3643 Only dereference the assembly if it has been set. Fixes a
3644 crasher exposed by #525328
3646 2009-07-25 Mark Probst <mark.probst@gmail.com>
3648 * sgen-gc.c, object.h, null-gc.c, boehm-gc.c, marshal.c: Really
3649 don't perform the store in mono_gc_wbarrier_generic_nostore().
3650 Remove the second argument (value), which is not needed.
3652 2009-07-24 Zoltan Varga <vargaz@gmail.com>
3654 * null-gc.c (mono_gc_wbarrier_generic_nostore): Define this to fix
3657 * boehm-gc.c: Ditto.
3659 2009-07-24 Mark Probst <mark.probst@gmail.com>
3661 * sgen-gc.c, marshal.c, object.h: Make the managed write barrier
3662 not perform the store itself. Introduce
3663 mono_gc_wbarrier_generic_nostore(), which is the same as
3664 mono_gc_wbarrier_generic_store(), except it doesn't perform the
3667 2009-07-24 Mark Probst <mark.probst@gmail.com>
3669 * icall.c (ves_icall_System_Array_SetGenericValueImpl):
3670 mono_gc_wbarrier_value_copy() doesn't perform the copy itself, so
3671 we still need the memcpy().
3673 2009-07-22 Mark Probst <mark.probst@gmail.com>
3675 * sgen-gc.c: Align array bounds calculation to mono_array_size_t
3676 so that big arrays are handled correctly. Always use
3677 safe_object_get_size() to calculate array object sizes, which
3678 takes bounds into account.
3680 2009-07-22 Mark Probst <mark.probst@gmail.com>
3682 * sgen-gc.c (mono_gc_wbarrier_value_copy): Make sure the class's
3683 GC descriptor is computed before we use it.
3685 2009-07-22 Mark Probst <mark.probst@gmail.com>
3687 * icall.c (ves_icall_System_Array_SetGenericValueImpl): Use a
3688 write barrier if necessary.
3690 2009-07-22 Mark Probst <mark.probst@gmail.com>
3692 * icall-def.h, icall.c, thread-types.h: New separate icall for
3693 VolatileWrite(object&,object) that uses a write barrier.
3695 * console-unix.c, file-io.c, icall.c, threads.c: Use write
3696 barriers in icalls which write to "ref" or "out" arguments.
3698 2009-07-21 Zoltan Varga <vargaz@gmail.com>
3700 * marshal.c (mono_marshal_get_runtime_invoke): Do the work done in the exception
3701 handler in a separate icall, to reduce the size of the wrappers.
3703 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
3705 * metadata-verify.c (is_valid_typespec_blob): Fix error message.
3707 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
3709 * metadata-verify.c (parse_field): Allow byref field.
3711 * metadata-verify.c (parse_locals_signature): Allow byref locals.
3713 * metadata-verify.c (is_valid_typespec_blob): Allow byref typespec.
3715 2009-07-20 Rodrigo Kumpera <rkumpera@novell.com>
3717 * verify.c (do_cast): Fail for any non reference type that isn't boxed.
3720 2009-07-20 Robert Jordan <robertj@gmx.net>
3722 * cominterop.c (cominterop_get_managed_wrapper_adjusted):
3723 Fix invalid IL in valuetype handling (STOBJ must push the
3724 corresponding class). Fixes bug #523149.
3726 Code is contributed under MIT/X11 license.
3728 2009-07-20 Geoff Norton <gnorton@novell.com>
3730 * gc.c: Use proper semaphores where available on posix and darwin.
3732 2009-07-19 Geoff Norton <gnorton@novell.com>
3734 * gc.c: Unnamed posix semaphores are broken on darwin-arm too.
3736 2009-07-19 Rodrigo Kumpera <rkumpera@novell.com>
3738 * refletion.c (is_sre_usertype): Change name to is_usertype and
3739 invert it's result so it returns true if the type is an user type
3740 and not the opposite.
3742 * reflection.c (is_*_type): Change all of those to use new macro
3743 check_corlib_type_cached that cached the type lookup so we don't
3744 need to do string comparisons all the type. Changed the signature
3745 to take a MonoClass instead.
3747 * reflection.c: Change mono_image_create_token and resolve_object
3748 to use is_sre_* functions.
3750 2009-07-18 Mark Probst <mark.probst@gmail.com>
3752 * sgen-gc.c: Check for writes to the stack in the managed
3755 2009-07-18 Mark Probst <mark.probst@gmail.com>
3757 * sgen-gc.c: When a thread is unregistered, don't free its remsets
3758 but put them on a list which is processed with the other thread's
3761 2009-07-18 Mark Probst <mark.probst@gmail.com>
3763 * sgen-gc.c: Fix and enable the internal allocator instead of
3764 using malloc/free (which causes deadlocks).
3766 2009-07-16 Rodrigo Kumpera <rkumpera@novell.com>
3768 * refletion.c: Fix builds with SRE disabled by adding a minimal
3769 implementation of mono_reflection_type_get_handle.
3771 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
3773 * refletion.c: Make mono_reflection_type_get_handle non static.
3775 * object-internals.h: Export mono_reflection_type_get_handle.
3777 * icall.c (ves_icall_MonoGenericClass_InflateType): Resolve the
3778 unmanaged handle using mono_reflection_type_get_handle.
3780 2009-07-15 Rodrigo Kumpera <rkumpera@novell.com>
3782 * refletion.c: Replace all reads of MonoReflectionType::type with
3783 calls to mono_reflection_type_get_handle. Only the functions that
3784 deal with constructing TypeBuilder::type have not been changed
3785 because they have to deal with NULL values.
3787 This is a first step into supporting reflection types that don't
3788 map directly into their unmanaged counterpart.
3790 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
3792 * metadata-verify.c (parse_locals_signature): Don't complain
3793 on signature with zero locals since MS generates it and doesn't
3796 2009-07-14 Rodrigo Kumpera <rkumpera@novell.com>
3798 * reflection.c (mono_image_get_array_token): Resolve return
3799 type using mono_reflection_type_get_handle.
3801 * reflection.c (mono_image_get_array_token): Resolve array method
3802 parent type using mono_reflection_type_get_handle.
3804 2009-07-14 Zoltan Varga <vargaz@gmail.com>
3806 * reflection.c (mono_image_basic_init): Applied patch from
3807 <Dax@daxxfiles.net>. Set the public key token from the assembly
3808 builder. Fixes #518909.
3810 * appdomain.c: Bump corlib version.
3812 2009-07-13 Zoltan Varga <vargaz@gmail.com>
3814 * class.c (mono_class_needs_cctor_run): Make this return false if
3815 the class has no cctor.
3817 2009-07-13 Mark Probst <mark.probst@gmail.com>
3819 * sgen-gc.c: When the minor GC needs to allocate a new section,
3820 invoke the major GC afterwards.
3822 2009-07-14 Bill Holmes <billholmes54@gmail.com>
3824 * process.c (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal) :
3825 Applying the window_style field to the SHELLEXECUTEINFO struct.
3827 Code is contributed under MIT/X11 license.
3829 2009-07-13 Mark Probst <mark.probst@gmail.com>
3831 * sgen-gc.c: Fix the race condition in the unmanaged allocator by
3832 locking earlier. Fix it in the managed allocator by making sure
3833 that no thread is stopped there before the GC runs. If we do stop
3834 a thread there, we restart it and let it run a but, until it stops
3837 * gc-internal.h, gc.c: Function for getting the IP from a signal
3838 context via a function registered by mini.
3840 2009-07-11 Zoltan Varga <vargaz@gmail.com>
3842 * object-internals.h (MonoIntPtr): New structure describing a boxed
3845 * object.c (mono_runtime_invoke_array): Handle ptr arguments and
3846 returns. Fixes #519953.
3848 * marshal.c (mono_marshal_get_runtime_invoke): Handle pointer returns.
3850 2009-07-09 Mark Probst <mark.probst@gmail.com>
3852 * class-internals.h, generic-sharing.c: New RGCTX info type for
3853 getting a remoting invoke with check wrapper.
3855 2009-07-07 Geoff Norton <gnorton@novell.com>
3857 * icall-def.h: Fix the enable-minimal build.
3859 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
3861 * object-internals.h: Add MonoReflectionDerivedType.
3863 * reflection.c: Implement support for PointerType.
3864 Fixed tons of warnings.
3866 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
3868 * object-internals.h: Add MonoReflectionByRefType.
3870 * reflection.c: Implement support for ByRefType.
3872 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
3874 * icall-def.h: Add System.Reflection.Emit.DerivedType::create_unmanaged_type.
3876 * object-internals.h: Add MonoReflectionArrayType and
3877 mono_reflection_create_unmanaged_type.
3879 * reflection.c: Implement support for ArrayType.
3881 2009-07-07 Rodrigo Kumpera <rkumpera@novell.com>
3883 * metadata-verify.c (is_valid_method_header): Parse EH block
3886 2009-07-03 Mark Probst <mark.probst@gmail.com>
3888 * sgen-gc.c (finish_gray_stack): Set the to_space pointer after
3889 processing the disappearing links, and process disappearing links
3890 in a loop until no new objects are copied.
3892 2009-07-03 Mark Probst <mark.probst@gmail.com>
3894 * object.c (handle_enum): Invoke the write barrier when copying
3895 value type instances.
3897 * sgen-gc.c: Register remsets for unmanaged write barriers only
3898 when the address written to is actually on the heap. This makes
3899 set_value() in object.c work without requiring that the result be
3902 2009-07-02 Rodrigo Kumpera <rkumpera@novell.com>
3904 The runtime wrappers are all bound to a given type that must
3905 exist in the same image. For regular images we use the <Module>
3906 type, which is required to exist for all images.
3908 The <Module> type can't be used for dynamic images because it
3909 might not exist at the time the wrapper is required, so we create
3910 a synthetic type to use instead.
3912 The current code works because of the 2 stage setup of MonoClass,
3913 but once this is gone it will no longer work.
3915 * icall-def.h: Add ModuleBuilder::set_wrappers_type.
3917 * metadata-internals.h (MonoDynamicImage): Add wrappers_type.
3919 * object-internals.h: Export mono_image_set_wrappers_type icall
3920 as part of the internal API.
3922 * marshal.c (get_wrapper_target_class): If the image is dynamic,
3923 use MonoDynamicImage::wrappers_type instead of the <Module> type.
3925 reflection.c: Add mono_image_set_wrappers_type qhixh sets the dynamic
3926 image wrappers_type to the provided value.
3928 2009-07-01 Rodrigo Kumpera <rkumpera@novell.com>
3930 * appdomain.c (deregister_reflection_info_roots): No need
3931 to use the image lock here.
3933 2009-07-02 Mark Probst <mark.probst@gmail.com>
3935 * sgen-gc.c (collect_nursery): Also scan from write-barrier roots.
3937 2009-06-29 Zoltan Varga <vargaz@gmail.com>
3939 * threads.c: Store the thread start argument in a hash table instead of
3940 registering it as a root, as libgc doesn't support unregistering roots
3941 under windows, leading to 'too many root sets' errors when many threads
3944 * gc.c (mono_gc_run_finalize): Avoid finalizing dynamic methods during
3945 shutdown, they can still be referenced by the other dying objects.
3948 2009-06-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
3950 * socket-io.c: DontLinger does not allow LingerOptions.
3952 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
3954 * metadata-verify.c: The spec doesn't mention that it's possible to add
3955 custom attribute to a generic parameter. Fixed.
3957 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
3959 * class.c (inflate_generic_type): Don't crash while trying to output a message
3960 on why we're aborting.
3962 2009-06-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
3964 * socket-io.c: DontLinger can take an int or a boolean too.
3966 Fri Jun 26 17:00:04 CEST 2009 Paolo Molaro <lupus@ximian.com>
3968 * gc.c: check for a null argument to SuppressFinalize () and
3969 ReRegisterForFinalize ().
3971 2009-06-26 Rodrigo Kumpera <rkumpera@novell.com>
3973 * loader.c (method_from_methodspec): Call into the verifier to check
3976 * metadata-verify.c: Addmono_verifier_verify_methodspec_signature.
3978 * verify-internals.h: Export mono_verifier_verify_methodspec_signature as
3979 part of the internal API.
3981 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
3983 * metadata.c (mono_type_create_from_typespec): Call into the verifier to check
3986 * metadata-verify.c: Add mono_verifier_verify_typespec_signature.
3988 * verify-internals.h: Export mono_verifier_verify_typespec_signature as
3989 part of the internal API.
3991 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
3993 * metadata.c (mono_metadata_parse_mh_full): Call into the verifier to check
3996 * metadata-verify.c: Add mono_verifier_verify_standalone_signature. Fix
3999 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
4000 part of the internal API.
4002 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4004 * metadata-verify.c: Use is_valid_blob_object to verify blob validity
4005 when doing basic verification.
4007 This check must be done since the runtime peeks into signatures in much
4008 more places than it does decoding so it makes sense to ensure that all
4009 pointers to blob objects are well formed.
4011 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4013 * metadata-verify.c (is_valid_blob_object): Add extra minsize argument.
4014 Use proper overflow dectection. Fix usage of it.
4016 2009-06-25 Rodrigo Kumpera <rkumpera@novell.com>
4018 * loader.c (field_from_memberref): Call into the verifier to check
4021 * loader.c (mono_method_get_signature_full): Same.
4023 * loader.c (method_from_memberref): Same.
4025 * metadata-verify.c: Add mono_verifier_verify_memberref_signature.
4027 * verify-internals.h: Export mono_verifier_verify_memberref_signature as
4028 part of the internal API.
4030 2009-06-25 Mark Probst <mark.probst@gmail.com>
4032 * threadpool.c (mono_thread_pool_add): If the domain is unloading
4033 or unloaded, still return an AsyncResult, but don't add it to the
4036 2009-06-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
4038 * threads.c: fix missing colon when DEBUG is defined.
4040 2009-06-25 Mark Probst <mark.probst@gmail.com>
4042 * threadpool.c: Don't add new calls to a threadpool if the domain
4043 of the call is unloading or unloaded. When dequeuing a job, null
4044 the reference in the queue.
4046 2009-06-25 Mark Probst <mark.probst@gmail.com>
4048 * sgen-gc.c (null_link_in_range): Add the dislink for the old
4049 generation if an object was moved.
4051 2009-06-25 Sylvain Dupont <duposyl@gmail.com>
4053 * cominterop.h cominterop.c marshal.c: Added support for marshalling out
4054 parameters of type SAFEARRAY[VARIANT].
4056 * reflection.c (encode_marshal_blob): Properly generate element type
4057 (SafeArraySubType marshal attribute option).
4059 Code is contributed under MIT/X11 license.
4061 Thu Jun 25 15:48:09 CEST 2009 Paolo Molaro <lupus@ximian.com>
4063 * reflection.c: in mono_method_clear_object () really ensure all the
4064 objects are removed.
4066 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4068 * loader.c (mono_method_signature): Call into the verifier to check
4069 the method signature.
4071 * metadata-verify.c (verify_method_table): Move signature verification
4072 to verify_method_table_full.
4074 * metadata-verify.c: Add mono_verifier_verify_method_signature.
4076 * verify-internals.h: Export mono_verifier_verify_method_signature as
4077 part of the internal API.
4079 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4081 * loader.c (mono_method_get_header): Call into the verifier to
4082 check the method header.
4084 * metadata-verify.c: Add mono_verifier_verify_method_header.
4086 * verify-internals.h: Export mono_verifier_verify_method_header as
4087 part of the internal API.
4089 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4091 * class.c (mono_class_find_enum_basetype): Call into the verifier to
4092 check the field signature. Replace an assert with an explicit check.
4094 * class.c (mono_class_setup_fields): Call into the verifier to check
4095 the field signature.
4097 * metadata-verify.c: Add mono_verifier_verify_field_signature.
4099 * verify-internals.h: Export mono_verifier_verify_field_signature as
4100 part of the internal API.
4102 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4104 * class.c (mono_class_find_enum_basetype): Simplify this function
4105 by moving code outside of the loop and not decoding static fields.
4107 2009-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4109 * metadata-verify.c (verify_typedef_table): Check the extends
4110 token here. Move to here a flags check from verify_typedef_table_full.
4112 2009-06-24 Zoltan Varga <vargaz@gmail.com>
4114 * metadata-verify.c (is_valid_method_header): Fix a warning.
4116 * metadata-internals.h (MonoImage): Remove the unused
4117 static_rgctx_invoke_wrapper_cache.
4119 * image.c marshal.c: Ditto.
4121 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
4123 * image.c (do_mono_image_load): Enable table data verification.
4125 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
4127 * metadata-verify.c (is_valid_constant): Fix nullref check.
4129 2009-06-23 Rodrigo Kumpera <rkumpera@novell.com>
4131 * metadata-verify.c (is_valid_constant): Fix string bounds check.
4133 2009-06-22 Mark Probst <mark.probst@gmail.com>
4135 * sgen-gc.c: Managed allocation with pthreads TLS.
4137 * threads.c, threads-types.h: Functions for the JIT to tell the
4138 runtime whether it supports the MONO_TLS opcode.
4140 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
4142 * metadata-verify.c (verify_param_table): Fix a crash for assemblies
4145 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
4147 * metadata-verify.c (is_valid_constant): Fix the string length check.
4148 Use safe overflow checking. Add decent error messages.
4150 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
4152 * metadata-verify.c: Move remaininh blob checks to the offline
4155 2009-06-22 Rodrigo Kumpera <rkumpera@novell.com>
4157 * metadata-verify.c: Move more blob checks to the offline verification
4160 2009-06-22 Bill Holmes <billholmes54@gmail.com>
4162 * object-internals.h : Adding interrupt_on_stop field.
4164 * threads.c (mono_thread_request_interruption) : On Windows exit the
4165 thread if interrupt_on_stop is set.
4167 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
4168 Removing old interrupt logic and setting the interrupt_on_stop for the
4169 thread when calling accept.
4171 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Receive_internal) :
4172 setting the interrupt_on_stop for the thread when calling accept.
4174 Contributed under MIT/X11 license.
4176 2009-06-20 Martin Baulig <martin@ximian.com>
4178 * mono-debug.h (MONO_DEBUGGER_MINOR_VERSION): Bump to 3.
4180 2009-06-21 Zoltan Varga <vargaz@gmail.com>
4182 * appdomain.c (mono_try_assembly_resolve): Don't call managed code when
4183 running in no-exec mode.
4185 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4187 * metadata-verify.c (verify_method_table): Move header
4188 checking to verify_method_table_full.
4190 * metata-verify.c (mono_verifier_verify_full_table_data):
4191 Call verify_method_table_full.
4193 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4195 * metadata-verify.c (verify_field_table): Move signature
4196 checking to verify_field_table_full.
4198 * metata-verify.c (mono_verifier_verify_full_table_data):
4199 Call verify_field_table_full.
4201 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4203 * metadata-verify.c (verify_typedef_table): Move remaining
4204 stuff to verify_typedef_table_full.
4206 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4208 * metadata-verify.c: Kill is_corlib from VerifyContext.
4209 It is only used by the offline mode.
4210 So we better remove it from the runtime path.
4212 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4214 * metadata-verify.c: Add new mono_verifier_verify_full_table_data
4215 function that perform the offline metadata verification steps.
4217 * metadata-verify.c (verify_typedef_table): Move some checks to
4218 verify_typedef_table_full and make it been called by new function
4219 mono_verifier_verify_full_table_data.
4221 * pedump.c: Call mono_verifier_verify_full_table_data.
4223 * verify-internals.h: Export mono_verifier_verify_full_table_data as
4224 part of the internal API.
4226 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4228 * metadata-verify.c (typedef_is_system_object): Fix System.Object
4231 * metadata-verify.c (verify_implmap_table): Fix implmap invalid
4232 flags bits. SupportLastError was confused as bit 7 instead of 6.
4234 * metadata-verify.c (verify_implmap_table): Fix import scope verification
4235 to check against the module ref table instead of module.
4237 * metadata-verify.c (verify_implmap_table): Fix corlib check.
4239 * pedump.c: Call mono_image_load_names.
4241 2009-06-19 Rodrigo Kumpera <rkumpera@novell.com>
4243 * image.c: Extract mono_image_load_names from do_mono_image_load.
4245 * metadata-internals.h: Export mono_image_load_names as part of
4248 2009-06-19 Zoltan Varga <vargaz@gmail.com>
4250 * metadata.c (mono_metadata_cleanup): Free the generic method cache
4251 first, as it could reference data in the other caches.
4253 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
4255 * metadata-verify.c: Finished with method header verification.
4257 2009-06-18 Rodrigo Kumpera <rkumpera@novell.com>
4259 * metadata-verify.c: Added more header verification code.
4260 Now only EH clauses are missing.
4262 2009-06-17 Zoltan Varga <vargaz@gmail.com>
4264 * marshal.c (get_runtime_invoke_type): Don't share primitive types
4267 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
4269 * metadata-verify.c: Initial method header verification.
4271 2009-06-16 Rodrigo Kumpera <rkumpera@novell.com>
4273 * metadata-verify.c (verify_import_table): The IAT contents
4274 might end been patched by the windows DL when running with
4277 2009-06-15 Rodrigo Kumpera <rkumpera@novell.com>
4279 * class.c (mono_class_from_typeref): If the enclosing type is not
4280 found return null instead of crashing. Fixes #508487.
4282 2009-06-15 Atsushi Enomoto <atsushi@ximian.com>
4284 * normalization-tables.h : updated to the latest unicode charcter
4286 * appdomain.c : bump corlib version.
4288 2009-06-14 Zoltan Varga <vargaz@gmail.com>
4290 * class.c (mono_class_from_name): Fix support for assembly references
4291 in the EXPORTEDTYPE table. Fixes #511704.
4293 2009-06-13 Geoff Norton <gnorton@novell.com>
4295 * domain.c: Ensure that mono_domain_assembly_open actually opens the
4296 assembly in the target domain.
4298 2009-06-12 Robert Jordan <robertj@gmx.net>
4300 * cominterop.c (cominterop_get_ccw): Increment mspec's SizeParamIndex
4301 because "this" of the managed signature has become an
4302 ordinary parameter in the unmanaged signature.
4304 2009-06-12 Zoltan Varga <vargaz@gmail.com>
4306 * class-internals.h (struct _MonoGenericContainer): Add an 'image'
4307 field for owner-less generic containers.
4309 * reflection.c (mono_reflection_initialize_generic_parameter): Set the
4310 image field of the owner-less generic containers created here.
4312 * metadata.c (mono_metadata_load_generic_params): Ditto, the
4313 contain is ownerless until the caller sets its owner.
4315 * metadata.c (type_in_image): Handle owner-less generic containers
4318 2009-06-11 Zoltan Varga <vargaz@gmail.com>
4320 * image.c (mono_image_close): Support debug_assembly_unload for
4323 2009-06-11 Andrés G. Aragoneses <aaragoneses@novell.com>
4325 * class.c: Fix some typos in comments.
4327 2009-06-11 Zoltan Varga <vargaz@gmail.com>
4329 * reflection.c (add_custom_modifiers): Avoid reading invalid memory.
4331 * threads.c (mono_thread_execute_interruption): Avoid creating the
4332 abort exception object while holding the synch_cs lock.
4334 2009-06-10 Rodrigo Kumpera <rkumpera@novell.com>
4336 * metadata-verify.c: Verify basic cattr content.
4338 2009-06-10 Zoltan Varga <vargaz@gmail.com>
4340 * reflection.c (add_exported_type): Don't set the FORWARDER flag on
4343 * reflection.c (mono_image_fill_export_table_from_type_forwarders): Add
4344 support for nested types. Fixes #511704.
4346 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
4348 * metadata-verify.c: Verify methodspec signatures.
4350 2009-06-09 Rodrigo Kumpera <rkumpera@novell.com>
4352 * metadata-verify.c: Verify typespec signatures.
4354 2009-06-09 Zoltan Varga <vargaz@gmail.com>
4356 * metadata.c (free_inflated_method): Call
4357 mono_marshal_free_inflated_wrappers (), which was missed earlier.
4359 2009-06-08 Miguel de Icaza <miguel@novell.com>
4361 * mono-config.c: Small change to report the PPC64/ILP32 model.
4363 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
4365 * metadata-verify.c (parse_type): Check szarray.
4367 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
4369 * metadata-verify.c (parse_type): Check fnptr.
4371 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
4373 * metadata-verify.c (parse_type): Check generic instances.
4375 2009-06-05 Rodrigo Kumpera <rkumpera@novell.com>
4377 * metadata-verify.c (parse_type): Check array shape.
4379 2009-06-05 Robert Jordan <robertj@gmx.net>
4381 * class.c (mono_class_create_from_typedef): Check only for
4382 mscorlib's System.Array.
4384 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
4386 * metadata-verify.c (parse_type): Check pointer, class/valuetype
4389 * metadata-verify.c (parse_field): Check the signature.
4391 2009-06-04 Rodrigo Kumpera <rkumpera@novell.com>
4393 * metadata-verify.c: Implement locals signature check.
4395 2009-06-04 Marek Safar <marek.safar@gmail.com>
4397 * domain.c: Add .NET 4.0 Beta 1 version.
4399 2009-06-04 Bill Holmes <billholmes54@gmail.com>
4401 * cominterop.c (cominterop_ccw_queryinterface): Fix for bug 499566.
4402 For QueryInterface on CCWs consider the base class
4405 Code is contributed under MIT/X11 license.
4407 2009-06-04 Zoltan Varga <vargaz@gmail.com>
4409 * wrapper-types.h: Delete STATIC_RGCTX_INVOKE.
4411 * marshal.c (mono_marshal_ret_static_rgctx_invoke): Remove, no longer
4414 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
4415 adding a static-rgctx invoke wrapper, it is done by the runtime trampolines.
4417 * generic-sharing.c (inflate_other_data): Ditto.
4419 2009-06-03 Rodrigo Kumpera <rkumpera@novell.com>
4421 * metadata-verify.c: Implement property signature check.
4423 2009-06-04 Mark Probst <mark.probst@gmail.com>
4425 * sgen-gc.h: Register saving support for PPC.
4427 2009-06-04 Mark Probst <mark.probst@gmail.com>
4429 * sgen-gc.c: Fixed a pthread TLS screwup.
4431 2009-06-04 Mark Probst <mark.probst@gmail.com>
4433 * sgen-gc.c: Do TLS using pthread API if __thread keyword is not
4436 2009-06-04 Mark Probst <mark.probst@gmail.com>
4438 * sgen-gc.c: Disable TLA and managed allocation if the __thread
4439 keyword is not supported.
4441 2009-06-04 Zoltan Varga <vargaz@gmail.com>
4443 * marshal.c metadata.c: Applied patch from Ulrich Weigand
4444 <uweigand@de.ibm.com>: Free the wrappers of inflated generic methods when
4445 the inflated method is freed. Fixes #508389.
4447 The code is contributed under the MIT/X11 license.
4449 2009-06-03 Zoltan Varga <vargaz@gmail.com>
4451 * marshal.c (get_wrapper_target_class): New helper function.
4452 (mono_marshal_get_runtime_invoke): Place runtime-invoke wrappers into
4453 the <Module> class of the image. Fixes #509049.
4455 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4457 * threads.c (ves_icall_System_Threading_Thread_Sleep_internal):
4458 Check if the thread was interrupted and proccess it straight away.
4459 Makes abortion much more responsive.
4461 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4463 * threads.c (mono_thread_execute_interruption): Use atomic cas with
4464 MonoThread::interruption_requested to match it's counterpart.
4466 Fixes a hang in abort-stress-1 on a 2 core x86.
4468 * threads.c (ves_icall_System_Threading_Thread_GetAbortExceptionState):
4471 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4473 Change MonoImage::name_cache to be protected by the image lock
4474 instead of the loader lock.
4476 * appdomain.c (deregister_reflection_info_roots): Protect access
4479 * class.c (mono_image_init_name_cache): Change from the loader lock
4480 to the image lock. Check if the cache wasn't already created.
4482 * class.c: Change from the loader to the image lock.
4484 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Fix
4485 the code to hold the image lock while iterating over name_cache and
4486 not go into mono_array_new holding it.
4488 * metadata-internals.h: Add a comment about this change.
4490 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4492 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
4493 Under the 2.0 profile raise the loader error.
4497 2009-06-01 Rodrigo Kumpera <rkumpera@novell.com>
4499 * marshal.c (mono_marshal_get_runtime_invoke): Emit the right kind
4500 of ldind opcode for generic instances so we don't fail for direct wrappers.
4501 This only affect direct calls.
4503 2009-05-31 Zoltan Varga <vargaz@gmail.com>
4505 * reflection.c (create_dynamic_mono_image): Fix warnings.
4507 * generic-sharing.c (other_info_equal): Ditto.
4509 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
4511 * metadata-verify.c: Implement field signature check.
4513 2009-05-29 Rodrigo Kumpera <rkumpera@novell.com>
4515 * metadata-verify.c: Implement standalone signature check.
4517 2009-05-28 Rodrigo Kumpera <rkumpera@novell.com>
4519 * metadata-verify.c: Implement methodref signature check.
4521 2009-05-28 Zoltan Varga <vargaz@gmail.com>
4523 * object-internals.h (MonoRuntimeCallbacks): New structure containing
4524 callbacks supplied by the runtime.
4526 * object.c (mono_install_callbacks): New internal function to install
4529 * object.c (mono_create_ftnptr): Move the implementation of this to
4532 * object.c (mono_get_addr_from_ftnptr): Ditto.
4534 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
4536 * metadata-verify.c (parse_return_type): Proper byref check.
4537 * metadata-verify.c (is_valid_method_signature): Check for zero arity
4538 generic signatures and method params.
4540 2009-05-27 Rodrigo Kumpera <rkumpera@novell.com>
4542 * metadata-verify.c (decode_signature_header): Fix bounds check.
4544 * metadata-verify.c (parse_custom_mods): Check custom mods.
4546 * metadata-verify.c (parse_type): Do initial basic verification
4549 * metadata-verify.c (is_valid_method_signature): Parse the generic
4552 2009-05-26 Rodrigo Kumpera <rkumpera@novell.com>
4554 * icall.c (ves_icall_Type_GetMethodsByName): Virtual methods should be
4555 discarded based on their most specific definition so we set the method_slots
4556 array before checking if the method is acceptable or not.
4560 2009-05-26 Mark Probst <mark.probst@gmail.com>
4562 * icall.c: Free the old array when resizing a mono_ptr_array.
4564 2009-05-26 Mark Probst <mark.probst@gmail.com>
4566 * reflection.c (create_dynamic_mono_image): Use mono_object_hash()
4567 for the hashes whose keys are managed objects.
4569 2009-05-26 Mark Probst <mark.probst@gmail.com>
4571 * object-internals.h, threads.c: Set the execution context on
4572 thread start here, not in corlib.
4574 * appdomain.c: Bump corlib version.
4576 2009-05-27 Martin Baulig <martin@ximian.com>
4578 * mono-debug.c (mono_debug_init): Use `MONO_DEBUG_FORMAT_DEBUGGER'
4579 if `_mono_debug_using_mono_debugger' is set to make things work
4580 properly when embedding Mono.
4582 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
4584 * class.c (mono_class_setup_fields): Don't mark simd types as having
4585 16 bytes alignment as the whole runtime doesn't support.
4587 2009-05-25 Rodrigo Kumpera <rkumpera@novell.com>
4589 * metadata-verify.c (safe_read): Use endian safe read macros.
4591 2009-05-25 Zoltan Varga <vargaz@gmail.com>
4593 * object.c (mono_create_ftnptr): Don't allocate from the code mempool since
4594 it is read-only when using full aot.
4596 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
4598 * metadata-verify.c (is_valid_method_signature): Verify parts
4599 of the return type. Provide an error message in case of failure.
4601 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
4603 * metadata-verify.c (is_valid_method_signature): Verify the call conv.
4605 2009-05-22 Rodrigo Kumpera <rkumpera@novell.com>
4607 * metadata-verify.c: Include the size prefix in the bounds check.
4609 2009-05-22 Miguel de Icaza <miguel@novell.com>
4611 * icall.c: Remove warnings.
4613 * mono-config.c: Allow for CONFIG_CPU to be set in config.h and
4614 prevent auto-detection based on GCC defines.
4618 * metadata-verify.c: Do not include signal.h
4620 * generic-sharing.c, marshal.c: Add returns to avoid some warning
4621 messages. Not sure why the g_assert_not_reached is not enough to
4625 * appdomain.c: Remove code that is not used when
4626 DISABLE_SHADOW_COPY is set.
4628 * image.c: use g_getenv
4630 2009-05-21 Miguel de Icaza <miguel@novell.com>
4632 * reflection.c: Remove code that it not used with
4633 DISABLE_REFLECTION_EMIT is defined.
4635 2009-05-21 Zoltan Varga <vargaz@gmail.com>
4637 * marshal.c (mono_marshal_get_runtime_invoke): Share more runtime
4640 2009-05-20 Miguel de Icaza <miguel@novell.com>
4643 (ves_icall_System_Net_Sockets_Socket_Available_internal): Remove
4644 the ifdef here and instead put that on io-layer
4646 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4648 * metadata-verify.c: Verify the generic param constraint table.
4650 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4652 * metadata-verify.c (verify_generic_param_table): Fix
4653 thinko on the valid flags bits for generic params.
4655 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4657 * metadata-verify.c: Verify the methodspec table.
4659 2009-05-19 Rodrigo Kumpera <rkumpera@novell.com>
4661 * metadata-verify.c: Verify the generic param table.
4663 2009-05-19 Mark Probst <mark.probst@gmail.com>
4665 * sgen-gc.c: Store and use the count with REMSET_VTYPE.
4667 2009-05-19 Mark Probst <mark.probst@gmail.com>
4669 * sgen-gc.c: Use generation enum more consistently and use the
4670 correct generation in mono_gc_register_for_finalization().
4672 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
4674 * metadata-verify.c: Verify the nested class table.
4676 2009-05-18 Rodrigo Kumpera <rkumpera@novell.com>
4678 * metadata-verify.c: Verify the manifest resource table.
4680 2009-05-17 Zoltan Varga <vargaz@gmail.com>
4682 * debug-helpers.c (dis_one): Add little-endian support for ldstr.
4684 2009-05-16 Zoltan Varga <vargaz@gmail.com>
4686 * class.c (mono_class_get_vtable_entry): Avoid adding static-rgctx
4687 wrappers, this is now done in the JIT.
4689 * class.c (mono_set_generic_sharing_supported): New internal function.
4690 (mono_class_generic_sharing_enabled): Move the #ifdef stuff to the JIT.
4692 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4694 * metadata-verify.c: Verify the exported type table.
4696 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4698 * pedump.c (main): Fake an assembly for netmodules to make the verifier happy.
4700 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4702 * metadata-verify.c: Verify the file table.
4704 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4706 * metadata-verify.c (verify_assembly_table): Fix an error message.
4708 * metadata-verify.c: Verify the assemblyref table.
4710 2009-05-15 Rodrigo Kumpera <rkumpera@novell.com>
4712 * metadata-verify.c (verify_assembly_table): Fix the valid
4713 bits mask for flags.
4715 2009-05-15 Zoltan Varga <vargaz@gmail.com>
4717 * debug-helpers.c (mono_method_full_name): Print generic parameters of
4718 generic methods as well.
4720 2009-05-15 Geoff Norton <gnorton@novell.com>
4722 * gc.c: MachO/Darwin supports and uses semaphores fine for this
4723 use-case and is significantly more performant than the wapi layer.
4725 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
4727 * metadata-verify.c: Verify the assembly table.
4729 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
4731 * metadata-verify.c: Fix rows limit check.
4733 2009-05-13 Rodrigo Kumpera <rkumpera@novell.com>
4735 * metadata-verify.c: Verify the fieldrva table.
4737 2009-05-13 Mark Probst <mark.probst@gmail.com>
4739 * sgen.c: Speed up weak links and finalizers by grouping them by
4742 2009-05-13 Mark Probst <mark.probst@gmail.com>
4744 * marshal.c (delegate_hash_table_add): When overwriting an entry,
4745 free the old GCHandle (only applies to SGen).
4747 2009-05-13 Zoltan Varga <vargaz@gmail.com>
4749 * loader.c (mono_get_method_from_token): Avoid the expensive call to
4750 mono_metadata_load_generic_params () for non-generic methods.
4752 2009-05-12 Mark Probst <mark.probst@gmail.com>
4754 * monitor.c, monitor.h (mono_monitor_get_object_monitor_weak_link):
4755 New function for returning a monitor's weak link if it has one.
4757 * sgen-gc.c: Remove an object's monitor's weak link (if it has
4758 one) when clearing a domain. These can still be around because
4759 the object might not have been collected.
4761 2009-05-12 Zoltan Varga <vargaz@gmail.com>
4763 * gc.c: Fix a warning.
4765 2009-05-12 Kornél Pál <kornelpal@gmail.com>
4767 * gc.c (mono_gc_init): Set gc_thread on creation. This avoids the
4768 prevous wait that resulted in a deadlock on Windows when initializing
4769 the runtime form DllMain. Also results in improved startup time.
4770 (finalizer_thread): Get rid of thread_started_event.
4771 * threads.c, threads-types.h (mono_thread_create_internal): Return the
4772 resulting MonoThread.
4774 Contributed under MIT/X11 license.
4776 2009-05-11 Rodrigo Kumpera <rkumpera@novell.com>
4778 * metadata-verify.c: Verify the implmap table.
4779 Don't require that #US and #Strings be present.
4781 2009-05-11 Sebastien Pouliot <sebastien@ximian.com>
4783 * security-core-clr.c: Delegate checks are done at creation time,
4784 not a invocation time. Fix exception for Telerik Silverlight demo
4786 2009-05-11 Mark Probst <mark.probst@gmail.com>
4788 * sgen-gc.c (need_remove_object_for_domain): Remove the special
4789 case for the Thread class.
4791 * threads.c: Do clean-up of abort exception/state in
4792 thread_cleanup() instead of Thread.free_internal(). Also clean up
4793 current_appcontext. The reason we have to do that is because
4794 those references might point into another domain and if that
4795 domain is unloaded before the thread is finalized, they point to
4798 2009-05-10 Andreas Faerber <andreas.faerber@web.de>
4800 * null-gc.c (mono_gc_weak_link_add, mono_gc_clear_domain): Fix
4803 Contributed unter MIT/X11 license.
4805 2009-05-09 Miguel de Icaza <miguel@novell.com>
4807 * verify.c, metadata-verifier.c: Add support for disabling the
4808 verifier in some builds.
4810 [ Sorry, my previous commit accidentally commited some work in
4813 2009-05-08 Zoltan Varga <vargaz@gmail.com>
4815 * class.c (mono_class_setup_fields): Set class->field.first for
4818 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
4820 * metadata-verify.c: Verify the typespec table.
4822 2009-05-07 Rodrigo Kumpera <rkumpera@novell.com>
4824 * metadata-verify.c: Verify the module table.
4826 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4828 * metadata-verify.c: Verify the methodimpl table.
4830 2009-05-06 Rodrigo Kumpera <rkumpera@novell.com>
4832 * metadata-verify.c: Verify the property table.
4834 2009-05-06 Zoltan Varga <vargaz@gmail.com>
4836 * debug-helpers.c (mono_method_desc_match): Add support for generic
4839 2009-05-05 Rodrigo Kumpera <rkumpera@novell.com>
4841 * metadata-verify.c: Verify the propertymap table.
4843 2009-05-04 Rodrigo Kumpera <rkumpera@novell.com>
4845 * metadata-verify.c: Verify the event table.
4847 * metadata-verify.c (search_sorted_table): Fix offset
4850 2009-05-02 Zoltan Varga <vargaz@gmail.com>
4852 * domain-internals.h (struct _MonoJitInfo): Add a 'from_llvm' flag.
4854 2009-05-01 Mark Probst <mark.probst@gmail.com>
4856 * gc.c (mono_gc_run_finalize): Don't set the domain too late,
4857 because mono_delegate_free_ftnptr() needs it.
4859 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
4861 * metadata-verify.c: Verify the eventmap table.
4863 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
4865 * metadata-verify.c: Verify the standalonesig table.
4867 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
4869 * metadata-verify.c: Verify the field layout table.
4871 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
4873 * class.c (mono_type_get_name_recurse): Don't crash
4874 for ownerless generic params.
4876 * debug-helpers.c (mono_type_get_desc): Correct the format
4877 for ownerless generic params.
4879 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
4881 * metadata-verify.c: Verify the class layout table.
4883 2009-04-30 Rodrigo Kumpera <rkumpera@novell.com>
4885 * metadata-verify.c: Verify the decl security table.
4887 2009-04-30 Mark Probst <mark.probst@gmail.com>
4889 * domain.c (mono_domain_set_internal_with_options): Don't do
4890 anything if the old domain is the same as the old one. Fixes
4893 2009-04-30 Mark Probst <mark.probst@gmail.com>
4895 * appdomain.c: Deregister the reflection_info roots when unloading
4898 * sgen-gc.c, domain.c, gc-internal.h: mono_gc_clear_domain() nulls
4899 memory allocated by a domain and frees its disappearing links.
4901 * boehm-gc.c, null-gc.c: Empty implementation of
4902 mono_gc_clear_domain().
4904 2009-04-30 Mark Probst <mark.probst@gmail.com>
4906 * appdomain.c (clear_cached_vtable): Free the static fields memory
4909 2009-04-30 Mark Probst <mark.probst@gmail.com>
4911 * gc.c: Set the correct domain when invoking finalizers.
4913 * appdomain.c: Set the correct domain when creating threads.
4915 2009-04-30 Mark Probst <mark.probst@gmail.com>
4917 * sgen-gc.c: Fix skip size for vectors.
4919 2009-05-03 Martin Baulig <martin@ximian.com>
4921 * mono-debug-debugger.c
4922 (mono_debugger_check_breakpoints): Check class init handlers even
4923 if we don't have any method load handers.
4925 2009-04-30 Zoltan Varga <vargaz@gmail.com>
4927 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid
4928 returning refonly assemblies if refonly is FALSE. Fixes #499013.
4930 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
4932 * metadata-verify.c: Verify the field marshal table.
4934 2009-04-29 Rodrigo Kumpera <rkumpera@novell.com>
4936 * metadata-verify.c: Verify the custom attribute table.
4938 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
4940 * metadata-verify.c: Verify the constant table.
4942 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
4944 * metadata-verify.c: Verify the memberef table.
4946 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
4948 * metadata-verify.c (get_coded_index_token): Remove
4951 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
4953 * metadata-verify.c: Verify the interfaceimpl table.
4955 2009-04-28 Rodrigo Kumpera <rkumpera@novell.com>
4957 * verify.c: Improve error message.
4959 * debug-helpers.c (mono_type_get_desc): Harden the code that
4960 deals with VAR and MVAR.
4962 2009-04-28 Zoltan Varga <vargaz@gmail.com>
4964 * image.c (mono_image_fixup_vtable): Avoid casting an lvalue. Fixes
4967 2009-04-23 Tom Hindle <tom_hindle@sil.org>
4969 * cominterop.c (ves_icall_System_Runtime_InteropServices_Marshal_ReleaseComObjectInternal):
4970 changed to match .Net behaviour of not aborting on additional calls to ReleaseComObject.
4972 2009-04-28 Sebastien Pouliot <sebastien@ximian.com>
4974 * security-core-clr.c: Avoid redundant checks for platform code,
4975 e.g. check for method and for class (very common) and check
4976 for class and outer class (less common)...
4978 2009-04-27 Zoltan Varga <vargaz@gmail.com>
4980 * reflection.c: Avoid returning random cattrs for synthetic methods.
4983 2009-04-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
4985 * assembly.c: assemblies in the GAC should never be shadow-copied.
4987 2009-04-26 Mark Probst <mark.probst@gmail.com>
4989 * domain.c, domain-internals.h: Disable
4990 track_resurrection_{objects,handles}_hash in MonoDomain if using
4993 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
4995 * metadata-verify.c: Verify the param table.
4997 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
4999 * metadata-verify.c (verify_typedef_table): Range check FieldList and
5002 * metadata-verify.c (verify_method_table): Proper check the ParamList
5005 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
5007 * metadata-verify.c (verify_method_table): Check for runtime
5008 implemented functions such as delegate .ctors. Remove spurious
5011 2009-04-24 Rodrigo Kumpera <rkumpera@novell.com>
5013 * pedump.c: Proper initialize the runtime forcing the 2.0 profile.
5015 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
5017 Don't allocate MonoGenericInfo for ownerless generic params.
5018 * class-internals.h (MonoGenericParam::info): Move field to ...
5019 (MonoGenericParamFull): ... this. New struct.
5020 (MonoGenericContainer::type_params): Change type to
5021 MonoGenericParamFull.
5022 (MonoGenericParam, MonoGenericContainer): Update accessors.
5023 * metadata.c (mono_metadata_parse_generic_param): Don't initialize
5024 'info' field for ownerless generic param.
5025 (mono_metadata_load_generic_params): Update to changes.
5026 * reflection.c (mono_reflection_create_generic_class): Likewise.
5027 (reflection_methodbuilder_to_mono_method): Likewise.
5028 (mono_reflection_initialize_generic_parameter): Likewise.
5030 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
5032 Don't use MonoGenericParamInfo for ownerless generic params.
5033 * class.c (get_anon_gparam_class, set_anon_gparam_class): New. Don't
5034 use ParamInfo class at all.
5035 (mono_class_from_generic_parameter): Use them.
5036 (make_generic_param_class): Fix a couple of instances where 'pinfo
5037 == NULL' wasn't handle.
5039 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
5041 * class.c (make_generic_param_class): Carve out of ...
5042 (mono_class_from_generic_parameter): ... here.
5044 2009-04-24 Raja R Harinath <harinath@hurrynot.org>
5046 Simplify mono_class_from_generic_parameter
5047 * class-internals.h (MonoGenericParamInfo::token): New field.
5048 * metadata.c (mono_metadata_load_generic_params): Initialize it
5050 * class.c (mono_class_from_generic_parameter): Use it instead of
5051 searching through metadata.
5053 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5055 * metadata-verify.c: Add verification of the method table.
5057 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5059 * icall.c (ves_icall_Type_GetMethodsByName): Fix memleak for the
5060 Delegate::Invoke optimization.
5062 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5064 * appdomain.c (mono_domain_create_appdomain_internal): Free the
5065 string returned by get_shadow_assembly_location_base.
5067 * appdomain.c (get_shadow_assembly_location_base): Add a comment
5068 about caller's ownership.
5070 2009-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5072 * reflection.c: Add mono_reflection_cleanup_domain to cleanup
5073 reflection memory on domain unload.
5075 * domain.c (mono_domain_free): Don't free refobject_hash, let the
5076 reflection cleanup code do it.
5078 * domain-internals.h: Add mono_reflection_cleanup_domain.
5080 This fixes a memory leak for managed mirrors of reflection objects
5083 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
5085 * metadata-verify.c: Implement more verification of the field table.
5087 2009-04-22 Rodrigo Kumpera <rkumpera@novell.com>
5089 * pedump.c (main): Init mono with mscorlib so it defaults to 2.0 and
5090 doesn't try to parse the input assembly, which can be broken.
5092 2009-04-23 Mark Probst <mark.probst@gmail.com>
5094 * boehm-gc.c, gc-internal.h, gc.c, monitor.c, null-gc.c,
5095 sgen-gc.c: Implement track resurrection in weak GC handles in SGen
5096 by using the lowest bit in the link to store whether the link is
5097 tracked. Move the track_resurrection hashes into boehm-gc.c.
5099 2009-04-22 Miguel de Icaza <miguel@novell.com>
5101 * Makefile.am: Split the console support in platform specific code
5102 and put together a framework for making this easy in the future so
5103 that we can start splitting code instead of having a mess of PLATFORM_WIN32
5105 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
5107 * pedump.c: Fix a warning.
5109 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
5111 * verify.c (mono_delegate_type_equal): Compare valuetypes using
5112 mono_class_from_mono_type to avoid bad interactions with the dual representation
5113 of the generic type definition.
5115 2009-04-21 Rodrigo Kumpera <rkumpera@novell.com>
5117 * verify.c (do_invoke_method): Use mono_class_from_mono_type to
5118 get the MonoClass for the call context type as it might be a generic
5123 2009-04-21 Mark Probst <mark.probst@gmail.com>
5125 * object-internals.h: The Thread object has no execution_context
5128 * threads.c, threadpool.c, threads-types.h: Accessor functions for
5129 the execution context.
5131 * appdomain.c: Bump corlib version.
5133 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5135 * verify.c (do_newobj): Improve error message.
5137 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5139 * verify.c (verify_clause_relationship): Only mask as an error if the exception clause
5140 is nested in the filter block.
5142 * verify.c (verify_clause_relationship): The disjoint check must verify if the exception
5143 block is not fully nested.
5147 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5149 * verify.c (verify_type_compatibility_full): Compare MonoClass and
5150 not MonoType to check for equality of valuetypes as the generic type
5151 definition allows for two different encodings: the generic type definition
5152 class or a generic instance over the GTD arguments.
5156 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5158 * verify.c (dump_stack_value): Fix compilation with extra debug turned on.
5160 * verify.c (do_initobj): Improve error message.
5162 2009-04-20 Rodrigo Kumpera <rkumpera@novell.com>
5164 * metadata-verify.c: Enable pe verification as the issue with #496453
5165 is that the authenticode data directory have a different unspecified
5166 format. Ignore it for now.
5168 * pedump.c: Run the metadata verifier together with the IL verifier.
5172 2009-04-20 Rolf Bjarne Kvinge <RKvinge@novell.com>
5174 * metadata-verify.c: Temporarily disable pe verification due to #496453.
5176 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
5178 * class.c (can_access_type): Check visibility against
5179 the element type for pointers and arrays.
5183 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
5185 * metadata-verify.c: Fix cli and table verification to use information
5186 from the MonoImage. A lot of duplicated code got killed.
5188 2009-04-17 Rodrigo Kumpera <rkumpera@novell.com>
5191 This patch starts to integrate the metadata verifier with the runtime code.
5193 This patch causes major regression in functionality for the metadata verifier
5194 as cli and table verification are disabled since they require to be ported to
5195 use MonoImage information.
5197 * image.c (do_mono_image_load): Split the code in this function
5198 into mono_image_load_pe_data and mono_image_load_cli_data.
5199 Add care_about_pecoff parameter to not load pecoff data.
5200 Call into the metadata verifier for pecoff and cli verification.
5202 * image.c (mono_image_open_raw): New function that doesn't perform
5203 any parsing of the image contents.
5205 The reason for the 3 new functions is to give pedump better control
5206 into the interaction with the verifier.
5208 * metadata-internals.h: Add new functions from image.c as part of the
5211 * metadata-verify.c: Split mono_image_verify into mono_verifier_verify_pe_data,
5212 mono_verifier_verify_cli_data and mono_verifier_verify_table_data. Prepare
5213 to make those functions work together with the runtime.
5215 * verify.c: Add mono_verifier_is_enabled_for_image function that returns
5216 true if the image needs to be verified.
5218 * verify-internals.h: Export new functions from metadata-verify.c and verify.c.
5220 * pedump.c: Use new metadata verifier API.
5222 2009-04-19 Zoltan Varga <vargaz@gmail.com>
5224 * object.c (mono_install_vtable_trampoline): Make this receive a
5225 trampoline creation function instead of trampoline, allowing the JIT
5226 to use a different trampoline for each vtable.
5228 2009-04-18 Mark Probst <mark.probst@gmail.com>
5230 * object.c (mono_raise_exception): Don't reset the thread abort
5231 exception state here.
5233 2009-04-18 Mark Probst <mark.probst@gmail.com>
5235 * icall-def.h: New icall for getting the thread abort exception
5238 * object.c, thread.c, object-internals.h: A thread's abort
5239 exception state is now a GC handle. To get the object it stands
5240 for, we must move it into the current app domain, if it's
5241 different than the one where it originated from.
5243 * appdomain.c: Bump corlib version.
5245 * domain.c, domain-internals.h: New function for setting the
5246 domain and migrate the thread abort exception or not.
5248 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5250 * metadata-verify.c: Add initial verification of the
5253 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5255 * metadata-verify.c: Add a macro to conditionally enable
5256 dumping of verification information. Add make_coded_token
5257 and search_sorted_table to enable search sorted tables
5258 by a given coded token.
5260 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5262 * metadata-verify.c: Add array mapping from table index
5263 to description offset. Add get_col_offset and get_col_size
5266 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5268 * metadata-verify.c: Add remaining table descriptions offsets.
5269 Add remaining coded index descriptions.
5271 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5273 * metadata-verify.c: Fixed constant table description.
5274 Fixed calculation of HasCustomAttribute coded index size.
5275 Fixed calculation of size for many table indexes.
5277 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5279 * pedump.c (dump_metadata): Dump table offset instead
5280 of useless pointer in memory.
5282 2009-04-16 Rodrigo Kumpera <rkumpera@novell.com>
5284 * metadata-verify.c (verify_typedef_table): Add tests for MethodList.
5286 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5288 * metadata-verify.c (verify_typedef_table): Add tests for FieldList and
5289 a missing of for interface types.
5291 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5293 * metadata-verify.c (verify_pe_optional_header): Add comment of why
5294 the code is commented.
5296 * metadata-verify.c (verify_resources_table): Remove spurious printf
5297 and don't fail if there are unmanaged resources. Gmcs generates a useless
5298 one for all assemblies - I bet it's some MS compatibility junk.
5300 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5302 * metadata-verify.c (verify_typedef_table): Verify the extends field.
5304 * metadata-verify.c (mono_image_verify): Add a is_corlib.
5306 * verify-internals.h: Same.
5308 * pedump.c: Fix for mono_image_verify new signature.
5310 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5312 * metadata-verify.c (verify_typedef_table): Verify for some invalid
5315 2009-04-15 Rodrigo Kumpera <rkumpera@novell.com>
5317 * metadata-verify.c (verify_module_table): Ignore the generation field.
5319 2009-04-15 Martin Baulig <martin@ximian.com>
5321 * debug-mono-symfile.c
5322 (mono_debug_symfile_lookup_location): Don't print a warning for
5323 unknown extended opcodes if they're within 0x40 and 0x7f.
5325 2009-04-15 Zoltan Varga <vargaz@gmail.com>
5327 * marshal.c (mono_marshal_get_runtime_invoke_sig): Don't share runtime
5328 invoke signatures returning an enum. Fixes #494847.
5330 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
5332 * metadata-verify.c: Initial code to verify the typedef table.
5334 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
5336 * verify.c (mono_method_verify): Don't fail if an unconditional branch
5337 with non empty stack happens before the beginning of a try block.
5341 2009-04-14 Rodrigo Kumpera <rkumpera@novell.com>
5343 * metadata-verify.c: Verify typename and typenamespace fields of
5346 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
5348 * metadata-verify.c: Initial code to verify the typeref table.
5350 2009-04-13 Rodrigo Kumpera <rkumpera@novell.com>
5352 * verify.c (verify_delegate_compatibility): Fix error message.
5354 2009-04-14 Sebastien Pouliot <sebastien@ximian.com>
5356 * security-core-clr.c: Fix typo
5358 2009-04-14 Zoltan Varga <vargaz@gmail.com>
5360 * marshal.c (delegate_hash_table_add): Make delegate_target_locations
5361 a MonoGHashTable to keep its values alive.
5362 (emit_marshal_boolean): Fix a warning.
5364 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
5366 * socket-io.c: don't return IPv4/IPv6 addresses if the machine does
5367 not have any interface configured for IPv4/IPv6.
5369 2009-04-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
5371 * assembly.c: fix typo in error message.
5373 2009-04-14 Zoltan Varga <vargaz@gmail.com>
5375 * marshal.c (mono_delegate_to_ftnptr): Use mono_gc_alloc_fixed () for
5376 allocating the location holding the this argument to prevent
5377 'too many root sets' errors.
5379 * object.c (mono_class_create_runtime_vtable): Set field->offset to -1
5380 to mark fields as special static.
5381 (mono_field_static_get_value): Handle special static fields.
5382 (mono_field_static_set_value): Ditto.
5384 * class-internals.h (struct _MonoClassField): Document this.
5386 2009-04-13 Bill Holmes <billholmes54@gmail.com>
5388 * cominterop.c (mono_cominterop_emit_marshal_com_interface): Assigning
5389 the argument a value of null for the MARSHAL_ACTION_MANAGED_CONV_OUT
5390 case. This will handle when managed code returns null to native code.
5392 Code is contributed under MIT/X11 license.
5394 2009-04-13 Bill Holmes <billholmes54@gmail.com>
5396 * object.c (build_imt_slots): Changing a free to a g_free to match
5397 the g_malloc0 in add_imt_builder_entry that allocated this memory.
5399 Code is contributed under MIT/X11 license.
5401 2009-04-13 Bill Holmes <billholmes54@gmail.com>
5403 * marshal.c (emit_marshal_boolean): Adding code to ensure that
5404 the correct TRUE value is passed through the marshaling layer.
5406 Code is contributed under MIT/X11 license.
5408 2009-04-13 Zoltan Varga <vargaz@gmail.com>
5410 * marshal.c (mono_marshal_emit_managed_wrapper): Handle closed delegates
5411 correctly. Fixes #492330.
5413 * marshal.c: Fix the embedding of object pointers into JITted code in
5414 the native-to-managed wrappers by allocating some GC tracked memory, and
5415 embedding the address of that.
5417 2009-04-11 Zoltan Varga <vargaz@gmail.com>
5419 * object.c (mono_class_create_runtime_vtable): Avoid putting MonoMethod
5420 pointers into the vtable.
5422 2009-04-09 Rodrigo Kumpera <rkumpera@novell.com>
5424 * verify.c (mono_delegate_type_equal): Proper check MONO_TYPE_CLASS.
5426 * verify.c (verify_ldftn_delegate): Improve error message.
5428 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
5430 * reflection.c (my_mono_class_from_mono_type): Remove.
5432 2009-04-09 Raja R Harinath <harinath@hurrynot.org>
5434 Prepare to reduce memory usage of owner-less generic parameters (1/n)
5435 * class-internals.h (MonoGenericParam): Carve out pklass, name, flags
5436 and constraints fields into ...
5437 (MonoGenericParamInfo): ... this.
5438 (mono_generic_param_info, mono_generic_container_get_param_info):
5440 * class.c, debug-helpers.c, icall.c: Update to changes.
5441 * metadata.c, reflection.c, verify.c: Likewise.
5443 2009-04-09 Zoltan Varga <vargaz@gmail.com>
5445 * debug-helpers.c (dis_one): Fix decoding of strings in dynamic images.
5447 * marshal.c (get_runtime_invoke_type): Share enums with their base types.
5449 * marshal.c (get_runtime_invoke_type): Share pointers with ints and
5450 booleans with sbytes.
5452 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
5454 * class.c (can_access_instantiation): Verify accesibility of element types
5455 for arrays and pointers.
5457 * class.c (can_access_type): Return true if the target class is VAR or MVAR.
5459 * class.c (mono_method_can_access_method_full): Fix typos in the documentation.
5463 2009-04-08 Rodrigo Kumpera <rkumpera@novell.com>
5465 * verify.c (do_invoke_method): Improve error messages.
5467 2009-04-08 Bill Holmes <billholmes54@gmail.com>
5469 * verify.c: Fixing the MSVC build.
5471 Code is contributed under MIT/X11 license.
5473 2009-04-08 Sebastien Pouliot <sebastien@ximian.com>
5475 * security-core-clr.c: Simplify get_reflection_caller not to call
5476 mono_method_get_last_managed (another stack walk) and adjust the
5477 callers to handle a (should not happen) NULL return value.
5479 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
5481 Add accessors to some MonoGenericParam fields
5482 * class-internals.h (mono_generic_param_owner): New accessor.
5483 (mono_generic_param_num): Likewise.
5484 (mono_type_get_generic_param_owner): New helper.
5485 (mono_type_get_generic_param_num): New helper.
5486 * class.c, icall.c, metadata.c, reflection.c, verify.c: Use them.
5488 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
5490 * class-internals.h (mono_generic_container_get_param): New wrapper.
5491 * class.c, icall.c, metadata.c, verify.c: Use it.
5493 2009-04-08 Raja R Harinath <harinath@hurrynot.org>
5496 * verify.c (mono_type_is_valid_type_in_context): Rewrite to use
5497 the standard case/loop. In particular, don't complain about
5498 references to generic type definitions.
5500 2009-04-07 Zoltan Varga <vargaz@gmail.com>
5502 * debug-helpers.c (dis_one): Decode string arguments.
5504 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
5506 * pedump.c (dump_verify_info): Dump type name correctly.
5508 2009-04-07 Rodrigo Kumpera <rkumpera@novell.com>
5510 * verify.c (mono_method_verify): Don't init code slots for exception boundaries if they
5511 are larger than code size.
5513 This can happen in valid code if the try/catch block is not followed by any instruction
5514 and do a backward branch on the leave instruction.
5518 2009-04-06 Sebastien Pouliot <sebastien@ximian.com>
5520 * security-core-clr.c: Fix typo while comparing second method names
5521 in can_avoid_corlib_reflection_delegate_optimization
5523 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
5525 * verify.c (do_throw): Don't allow an unboxed generic param ar argument.
5529 2009-04-06 Rodrigo Kumpera <rkumpera@novell.com>
5531 * metadata.c (do_mono_metadata_parse_type): Fail if we are decoding
5532 a MVAR using a class context.
5536 2009-04-06 Zoltan Varga <vargaz@gmail.com>
5538 * object.c (mono_class_compute_gc_descriptor): Make this non-static.
5540 * domain-internals.h (struct _MonoJitInfo): Add a 'gc_info' field.
5542 * gc-internal.h (MonoGCCallbacks): New stucture containing the callback
5543 functions supplied by the JIT for the SGEN GC.
5545 * sgen-gc.c: Call the callbacks supplied by the JIT to do stack marking.
5547 2009-04-06 Massimiliano Mantione <massi@ximian.com>
5549 monitor.c (mono_monitor_try_enter_internal):
5550 Added calls to profile monitor contentions.
5551 Also duplicated a small piece of code (the "get the monitor" logic)
5552 from the fast path to the slow path, and changed the relevant goto
5553 statements, so that monitor acquisition events can be emitted from the
5554 slow path (this is by Paolo Molaro).
5556 2009-04-06 Massimiliano Mantione <massi@ximian.com>
5558 * profiler.c, profiler.h, profiler-private.h:
5559 Added support for profiling monitor contentions.
5561 2009-04-03 Rodrigo Kumpera <rkumpera@novell.com>
5563 * metadata-verify.c: Verify the modules table.
5565 2009-04-02 Rodrigo Kumpera <rkumpera@novell.com>
5567 * verify.c (mono_generic_param_is_constraint_compatible): Inflate the candidate
5568 using the context of the method been verifier and not of the method been called.
5570 * verify.c: Add verifier_inflate_type and mono_type_is_valid_type_in_context to
5571 safely inflate generic types.
5573 2009-04-02 Sebastien Pouliot <sebastien@ximian.com>
5575 * security-core-clr.c: Change the strategy for checking the
5576 "reflection using delegates optimization" to avoid unneeded
5577 attributes in multiple class libraries.
5579 2009-04-02 Mark Probst <mark.probst@gmail.com>
5581 * sgen-gc.c: Remove object element in the disappearing link struct
5582 by storing the object pointer in the link.
5584 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
5586 * pedump.c (dump_verify_info): Don't crash if signature decoding fails.
5588 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
5590 * verify.c (verifier_load_field): Fail if the field parent could not be loaded.
5592 * verify.c (mono_method_verify): Do proper bounds checking of exception
5595 2009-03-31 Rodrigo Kumpera <rkumpera@novell.com>
5597 * loader.c (mono_field_from_token): Don't crash if the field parent could
5600 2009-03-31 Mark Probst <mark.probst@gmail.com>
5602 * sgen-gc.c: Execute critical finalizers after ordinary
5605 * class-internals.h, domain.c: Add CriticalFinalizerObject to
5608 2009-03-31 Jb Evain <jbevain@novell.com>
5610 * verify.c (do_ldstr): don't check if a string is in the user strings
5611 heap if the current image is dynamic.
5613 2009-03-31 Mark Probst <mark.probst@gmail.com>
5615 * sgen-gc.c: Wait until the last finalizer has executed when
5616 returning from WaitForPendingFinalizers.
5618 2009-03-31 Martin Baulig <martin@ximian.com>
5620 * mono-debug-debugger.h (MonoDebuggerEvent): Add
5621 `MONO_DEBUGGER_EVENT_CREATE_APPDOMAIN' and
5622 `MONO_DEBUGGER_EVENT_UNLOAD_APPDOMAIN'.
5623 (mono_debugger_event_create_appdomain): New function.
5624 (mono_debugger_event_unload_appdomain): New function.
5626 * appdomain.c (mono_domain_create_appdomain_internal): Call
5627 mono_debugger_event_create_appdomain().
5629 2009-03-31 Martin Baulig <martin@ximian.com>
5631 * mono-debug-debugger.c
5632 (mono_debugger_register_class_init_callback): Also register the
5633 class init callback if the class is already initialized to make
5634 things work with shadow copied assemblies.
5636 2009-03-31 Sebastien Pouliot <sebastien@ximian.com>
5638 * security-core-clr.c
5639 (mono_security_core_clr_ensure_reflection_access_field): Let
5640 critical code access the field (just like we do for methods). Use
5641 check_field_access helper.
5642 (mono_security_core_clr_ensure_reflection_access_method): Use
5643 check_field_access helper.
5645 2009-03-31 Mark Probst <mark.probst@gmail.com>
5647 * sgen-gc.c: Remove data (callback) element from FinalizeEntry and
5648 call the run-finalize function directly.
5650 * gc.c, gc-internal.h: Make run_finalize() non-static.
5652 2009-03-31 Mark Probst <mark.probst@gmail.com>
5654 * sgen-gc.c: Use a separate struct for disappearing links.
5656 2009-03-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
5658 * socket-io.c: don't fail if the SocketOptionsFlag has Partial or
5659 * MaxIOVectorLength enabled, just ignore them.
5662 2009-03-30 Rodrigo Kumpera <rkumpera@novell.com>
5664 * metadata-verify.c: Fix eglib build.
5666 2009-03-30 Zoltan Varga <vargaz@gmail.com>
5668 * threads-types.h: Fix the win32 build.
5670 2009-03-28 Sebastien Pouliot <sebastien@ximian.com>
5672 * class.c: move coreclr inheritance/override checks to
5674 * security-core.clr.c|h: add code from class.c with additional
5675 documentation. Fix override check when the method is not critical.
5677 2009-03-28 Zoltan Varga <vargaz@gmail.com>
5679 * debug-helpers.c (mono_method_desc_match): Make '*' match anything.
5680 (match_class): Ditto.
5682 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
5684 * metadata-verify.c: Rename bounds_check_offset to bounds_check_datadir.
5686 * metadata-verify.c: Implement table layout row size calculation. Verify
5687 the total size of the tables.
5689 2009-03-27 Rodrigo Kumpera <rkumpera@novell.com>
5691 * metadata-verify.c: Verify heap sizes and size to decode row counts.
5693 2009-03-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
5696 * console-io.[ch]: added new mono_console_init() to make sure that
5697 file descriptors 0, 1 and 2 are opened.
5700 2009-03-27 Sebastien Pouliot <sebastien@ximian.com>
5702 * appdomain.h: Export a new callback type and a new function to
5703 set this callback. This allow a mono host to provide it's own
5704 definition for "platform code".
5705 * metadata-internals.h: Add a core_clr_platform_code flag on
5706 _MonoImage to (cache and) know if it is representing platform
5708 * image.c (do_mono_image_open): Set core_clr_platform_code flag
5709 on platform code images.
5710 * security-core-clr.c|h
5711 (mono_security_set_core_clr_platform_callback): Allow the host
5712 to provide it's own platform check definition.
5713 (mono_security_core_clr_determine_platform_image): Detect if an
5714 image is platform code (using the specified callback).
5715 (mono_security_core_clr_is_platform_image): Return cached value
5718 2009-03-27 Zoltan Varga <vargaz@gmail.com>
5720 * threads.c (mono_create_thread): New helper function to wrap CreateThread
5721 which has different parameter types for the 'tid' argument in windows and
5724 * appdomain.c attach.c threads.c: Use the new helper.
5726 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
5728 * metadata-verify.c: Verify valid table bits.
5730 2009-03-26 Rodrigo Kumpera <rkumpera@novell.com>
5732 * metadata-verify.c (verify_metadata_header): Store size in the size field.
5734 * metadata-verify.c: Add initial table schema verification.
5736 2009-03-26 Zoltan Varga <vargaz@gmail.com>
5738 * icall.c (ves_icall_get_parameter_info): Add a 'member' argument, used to
5739 obtain the refclass argument needed by mono_param_get_objects (). Fixes
5742 * reflection.c (mono_param_get_objects_internal): Add a 'refclass' argument.
5744 * appdomain.c (MONO_CORLIB_VERSION): Bump this.
5746 2009-03-26 Sebastien Pouliot <sebastien@ximian.com>
5748 * security-core-clr.c: Add/update documentation
5750 2009-03-26 Zoltan Varga <vargaz@gmail.com>
5752 * marshal.c (emit_marshal_object): Generate code to throw an exception
5753 instead of throwing it. Fixes #488670.
5755 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
5757 * appdomain.c: Bump MONO_CORLIB_VERSION to 73.
5758 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Add
5759 an extra 'throwOnBindFailure' parameter to the icall. Remove FIXME
5760 and add a call to mono_security_core_clr_ensure_delegate_creation
5761 to do the extra checks required by CoreCLR.
5762 * security-core-clr.c|h: Add function to check delegate creation,
5763 both in the binding and accessibility, under CoreCLR.
5765 2009-03-25 Sebastien Pouliot <sebastien@ximian.com>
5767 * reflection.c (mono_reflection_create_dynamic_method): when
5768 coreclr is enabled make sure that every resolved object are
5769 checked (e.g. field and method access).
5770 * security-core-clr.c|h: Add function to check objects resolved
5771 when a dynamic method is created.
5773 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
5775 * metadata-verify.c: Cache directory rva translations.
5777 * metadata-verify.c: Add cli-header and streams verification.
5779 2009-03-24 Rodrigo Kumpera <rkumpera@novell.com>
5781 * image.c (load_metadata_ptrs): We decode MonoImage::md_version_minor at
5782 the wrong offset (8 instead of 6).
5784 2009-03-23 Zoltan Varga <vargaz@gmail.com>
5786 * marshal.c (mono_delegate_to_ftnptr): For delegates wrapping pinvoke
5787 methods, return the native function address itself. Fixes
5790 2009-03-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
5792 * console-io.c: some of the values for control characters might not be
5795 2009-03-21 Sebastien Pouliot <sebastien@ximian.com>
5797 * exception.c|h: Add helpers to create [Field|Method]AccessException
5798 * icall.c: Add required coreclr check calls for field reflection.
5799 Move the existing (method) check logic into security-core-clr.c
5800 * security-core-clr.c: Add functions to check if the access of a
5801 field or method is allowed when reflecting under coreclr. This is
5802 mostly done using a stack walk to find the "real" caller: i.e. the
5803 code that is calling the reflection
5805 2009-03-20 Zoltan Varga <vargaz@gmail.com>
5807 * gc-internal.h: Change location of gc_wrapper.h
5809 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
5811 * class.c: Simplification to coreclr checks for overrides that
5812 makes it easier to set breakpoints.
5814 2009-03-20 Sebastien Pouliot <sebastien@ximian.com>
5816 * security-core-clr.c|h: (mono_security_core_clr_class_level,
5817 mono_security_core_clr_method_level): Avoid potential
5818 MonoCustomAttrInfo allocation for transparent assemblies (e.g.
5819 user/application code) and make it easier to set breakpoints
5821 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
5823 * metadata-verify.c: Reject cli header tables that mono don't handle.
5825 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
5827 * pedump.c: Fix CLI header dumping.
5829 2009-03-19 Rodrigo Kumpera <rkumpera@novell.com>
5831 * metadata-verify.c: More CLI header verification.
5833 2009-03-19 Zoltan Varga <vargaz@gmail.com>
5835 * locales.c (get_current_locale_name): Use g_malloc instead of malloc.
5837 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
5839 * metadata-verify.c: Initial verification of the CLI header.
5841 2009-03-18 Rodrigo Kumpera <rkumpera@novell.com>
5843 * metadata-verify.c (verify_resources_table): Fix verification of zero
5844 sized resource section and id entries count.
5846 2009-03-18 Zoltan Varga <vargaz@gmail.com>
5848 * icall.c: Handle user types in many Type icalls. Fixes #486303.
5850 2009-03-17 Jb Evain <jbevain@novell.com>
5852 * profiler.c: call mono_gc_base_init from mono_profiler_load.
5854 2009-03-17 Zoltan Varga <vargaz@gmail.com>
5856 * sgen-gc.c (mono_gc_make_descr_for_object): Fix 64 bit support.
5857 (mono_gc_make_descr_for_array): Ditto.
5859 2009-03-17 Sebastien Pouliot <sebastien@ximian.com>
5861 * verify.c (mono_verifier_is_class_full_trust): Add support for
5862 CoreCLR security mode where trusted assemblies are defined as
5865 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
5867 * metadata-verify.c: Add minimal PECOFF resource verification.
5869 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
5871 * metadata-verify.c: Be less restrictive with some coff fields.
5873 2009-03-16 Rodrigo Kumpera <rkumpera@novell.com>
5875 * verify.c (init_stack_with_value_at_exception_boundary): Init generic
5876 params as boxed values on stack. Fixes #485706.
5878 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
5880 * console-io.c: the termios values may vary in different flavors of unix.
5882 2009-03-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
5884 * console-io.[ch]: return the entire set of control characters when
5885 initializing the terminal.
5886 * appdomain.c: bump corlib version.
5888 Mon Mar 16 11:11:26 CET 2009 Paolo Molaro <lupus@ximian.com>
5890 * mono-perfcounters.c: added support for in-process custom
5891 performance counters.
5893 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
5895 * metadata-verify.c: Small cleanup and add comment for IAT directory entry.
5897 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
5899 * metadata-verify.c: Verify the data pointed by the import table.
5901 2009-03-13 Rodrigo Kumpera <rkumpera@novell.com>
5903 * metadata-verify.c (load_data_directories): Store data
5906 * metadata-verify.c: Verify the import table.
5908 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
5910 * metadata-verify.c: Verify data directories.
5912 2009-03-12 Rodrigo Kumpera <rkumpera@novell.com>
5914 * metadata-verify.c: Check section header flags.
5916 2009-03-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
5918 * appdomain.c: if the assembly name is a shadow-copied file, return
5919 TRUE from mono_is_shadow_copy_enabled but don't actually do anything
5920 in mono_make_shadow_copy.
5921 * icall.c: if the assembly name is a shadow-copied file, replace it
5922 with the original assembly path.
5924 Bug #484244 fixed. NUnit tests for corlib can be run without
5927 2009-03-12 Zoltan Varga <vargaz@gmail.com>
5929 * sgen-gc.c (add_to_global_remset): Fix the handling of root global remset
5930 entries when the table is reallocated.
5932 * icall.c: Allocate the memory used by the mono_ptr_array macros using
5933 mono_gc_alloc_fixed () since it contains GC refs.
5935 2009-03-10 Zoltan Varga <vargaz@gmail.com>
5937 * reflection.c (ensure_complete_type): New helper function to call
5938 type resolve handlers for unfinished dynamic types.
5939 (resolve_object): Call it for MonoClassFields. Fixes #483852.
5941 2009-03-09 Zoltan Varga <vargaz@gmail.com>
5943 * reflection.c (mono_custom_attrs_has_attr): Handle interfaces. Fixes
5946 2009-03-08 Rodrigo Kumpera <rkumpera@novell.com>
5948 * appdomain.c (get_shadow_assembly_location): Fix memleak.
5950 2009-03-08 Zoltan Varga <vargaz@gmail.com>
5952 * domain-internals.h (struct _MonoDomain): Add new hash tables mapping
5953 between GCHandles of type WeakTrackResurrection and the objects they
5956 * gc.c: Partly implement the sematics of GCHandles of type
5957 WeakTrackResurrection: these handles should only be cleared after the
5958 finalizer of the object they are pointing to has ran.
5960 2009-03-06 Mark Probst <mark.probst@gmail.com>
5962 * icall.c: Partially revert r126631 because using the jump
5963 trampolines for generic shared methods makes it superfluous.
5965 2009-03-06 Zoltan Varga <vargaz@gmail.com>
5967 * threads.c (handle_store): Create the 'threads' hash table with the proper
5968 MONO_HASH_VALUE_GC type.
5970 2009-03-05 Zoltan Varga <vargaz@gmail.com>
5972 * domain-internals.h (struct _MonoDomain): Move 'typeof_void' before
5975 * domain.c (mono_domain_create): Register the fields between FIRST_GC_TRACKED
5976 and LAST_GC_TRACKED as a GC root.
5978 * gc-internal.h: Fix the comment of mono_gc_alloc_fixed.
5980 * object.c (mono_class_create_runtime_vtable): Create a GC descriptor for
5981 the static data even if it consists of 1 reference.
5983 * boehm-gc.c (mono_gc_alloc_fixed): Allocate using GC_MALLOC_EXPLICITLY_TYPED
5984 if there is a GC descriptor.
5986 * reflection.c (ALLOC_REFENTRY): Allocate ReflectedEntry-es using malloc
5987 instead of through the GC since they contain no object references.
5989 2009-03-05 Mark Probst <mark.probst@gmail.com>
5991 * generic-sharing.c (instantiate_other_info): Always return a jump
5992 trampoline for method code.
5994 2009-03-05 Marek Habersack <mhabersack@novell.com>
5996 * culture-info-tables.h: generated to include the en-tt culture.
5998 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
6000 * domain-internals.h (MonoDomain): Add two fields to cache invoke wrappers to
6001 capture the thread context.
6003 * object.c (mono_async_result_new): Cache the invoke wrappers to
6004 ExecutionContext::Capture.
6006 2009-03-04 Rodrigo Kumpera <rkumpera@novell.com>
6008 * marshal.h: Add a prototype for what mono_compile_method returns
6009 for invoke wrappers.
6011 * gc.c: Use the new prototype declaration.
6013 2009-03-04 Geoff Norton <gnorton@novell.com>
6015 * boehm-gc.c: Add some MONO_LOG tracing for the GC
6017 * mono-gc.h: Expose mono_gc_invoke_finalizers in the embedding api.
6019 2009-03-04 Martin Baulig <martin@ximian.com>
6022 (mono_debugger_runtime_invoke): Removed.
6024 * mono-debug-debugger.c
6025 (mono_runtime_invoke): Moved into ../mini/debug-mini.c.
6027 2009-03-02 Martin Baulig <martin@ximian.com>
6030 (mono_debugger_unhandled_exception): Removed.
6031 (mono_debugger_handle_exception): Removed.
6032 (mono_debugger_throw_exception): Removed.
6035 (mono_debug_debugger_version): Bump to 5.
6037 * mono-debug-debugger.c: Moved the exception handling code to
6038 ../mini/debug-mini.c
6040 2009-03-03 Zoltan Varga <vargaz@gmail.com>
6042 * domain-internals.h (struct _MonoDomain): Add a separate lock for the
6043 finalize_objects_hash.
6045 * gc.c: Use the separate lock to access the finalize_objects_hash field.
6047 * domain-internals.h (struct _MonoDomain): Add finalize_runtime_invoke
6050 * metadata-internals.h (struct _MonoImage): Add runtime_invoke_vcall_cache
6053 * image.c (mono_image_close): Free it.
6055 * marshal.c (mono_marshal_get_runtime_invoke): Add a 'virtual' argument
6056 allowing a creation of a wrapper which invokes its method using a CALLVIRT
6057 on the this argument.
6059 * gc.c (run_finalize): Optimize the calling of the finalizers.
6061 2009-03-03 Martin Baulig <martin@ximian.com>
6063 * mono-debug.h (MONO_DEBUGGER_MAJOR_VERSION): Bump to 81 because
6064 of the `MonoGenericInst' changes.
6066 2009-03-03 Rodrigo Kumpera <rkumpera@novell.com>
6068 * icall.c (ves_icall_MonoType_GetGenericArguments): Use
6069 mono_array_class_get_cached to reduce locking contention. Extract
6072 * icall.c (ves_icall_Type_GetFields_internal): Avoid allocating
6073 intermediary managed arrays. Use caching version of mono_array_new
6074 to allocate the result array.
6076 * icall.c (ves_icall_Type_GetEvents_internal): Same.
6078 * icall.c (ves_icall_Type_GetNestedTypes): Same.
6080 * locales.c (create_names_array_idx): Use mono_array_new_cached
6081 to reduce locking contention.
6083 2009-03-03 Zoltan Varga <vargaz@gmail.com>
6085 * object.c (mono_method_add_generic_virtual_invocation): Put back the
6086 thunk builder code for the non-interface case.
6088 2009-03-02 Zoltan Varga <vargaz@gmail.com>
6090 * object.c (get_generic_virtual_entries): New helper function to collect
6091 the virtual generic method instances which need to be added to an IMT
6093 (mono_method_add_generic_virtual_invocation): Add a 'vtable' argument.
6094 Instead of creating a new IMT thunk, reset the vtable slot to the
6095 trampoline, the thunk will be created the next time the trampoline is called.
6096 (build_imt_slots): Add support for virtual generic methods in interfaces by
6097 adding to the IMT thunk all the methods registered using
6098 mono_method_add_generic_virtual_invocation ().
6100 * object-internals.h (_MonoImtBuilderEntry): Add a 'has_target_code' field.
6101 (struct _MonoIMTCheckItem): Ditto.
6103 * object.c (mono_method_add_generic_virtual_invocation): Take a
6104 MonoMethod argument instead of a MonoGenericInst. Fix the construction of
6105 the IMT thunk to include all items.
6107 * object.c (mono_class_create_runtime_vtable): Add a missing
6108 mono_loader_unlock ().
6110 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
6112 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6114 * object-internals.h (MonoReflectionEvent): Add cached_add_event.
6116 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
6118 * object-internals.h: Rename _MonoReflectionEvent to
6119 MonoReflectionMonoEvent so it reflects the right managed type.
6120 Add a MonoReflectionEvent that correctly represents System.EventInfo.
6123 * reflection.c: Adjust code to use the new MonoReflectionMonoEvent
6126 2009-03-02 Rodrigo Kumpera <rkumpera@novell.com>
6128 * icall.c (ves_icall_Type_GetMethodsByName): Avoid allocating
6129 intermediary managed arrays. Use caching version of mono_array_new
6130 to allocate the result array.
6132 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
6134 * reflection.c: Use cached version of mono_array_new alongside
6135 the mono_reflection_get_custom_attrs_by_type call path.
6137 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
6139 * icall.c (ves_icall_Type_GetInterfaces): Avoid allocating
6140 intermediary managed arrays. Use caching version of mono_array_new
6141 to allocate the result array.
6143 * icall.c (ves_icall_Type_GetConstructors_internal): Same.
6145 2009-03-01 Rodrigo Kumpera <rkumpera@novell.com>
6147 * icall.c: Add small implementation of a growable stack bound array.
6149 * icall.c (ves_icall_System_Enum_get_hashcode): Fix warning.
6151 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid allocating
6152 intermediary managed arrays. Use caching version of mono_array_new
6153 to allocate the result array.
6155 2009-02-27 Rodrigo Kumpera <rkumpera@novell.com>
6157 * icall.c: New icall ves_icall_System_Enum_compare_value_to that
6158 helps Enum::CompareTo to be implemented without reboxing all enums
6159 to their underlying type.
6160 2009-02-27 Zoltan Varga <vargaz@gmail.com>
6162 * domain.c (SET_APPDOMAIN): Avoid calling TlsSetValue () on some platforms,
6163 since it acquires a global lock leading to scalability problems.
6165 * profiler.c: Make the stat profiler work with multiple appdomains, this
6166 currently only works when no appdomains are unloaded.
6168 2009-02-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
6170 * appdomain.c: make the check to avoid copying when the assembly is
6171 already shadow copied actually work.
6173 2009-02-26 Zoltan Varga <vargaz@gmail.com>
6175 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
6177 * object-internals.h (struct _MonoReflectionGenericClass): Sync with
6178 changes to the managed side.
6180 2009-02-25 Zoltan Varga <vargaz@gmail.com>
6182 * metadata-internals.h (struct _MonoImage): Add a new cache for szarray
6183 classes + a separate lock for it, as it is used frequently at runtime, not
6184 just during metadata loading/JIT compilation.
6186 * class.c (mono_bounded_array_class_get): Use the separate cache + lock
6189 * object-internals.h (mono_class_from_name_cached): New macro to cache
6190 the results of the lookup locally without having to declare a static
6191 variable to hold it.
6192 (mono_class_get_field_from_name_cached): Ditto.
6193 (mono_array_class_get_cached): Ditto.
6195 * threadpool.c threads.c locales.c icall.c reflection.c socket-io.c: Use
6198 * object.c (mono_get_delegate_invoke): Call setup_methods () to avoid the
6199 slower search in metadata.
6201 * pedump.c: Fix a warning.
6203 2009-02-23 Zoltan Varga <vargaz@gmail.com>
6205 * reflection.c (encode_locals): Add checks for user types.
6206 (method_encode_clauses): Ditto.
6207 (method_encode_code): Ditto.
6208 (mono_image_create_token): Ditto.
6210 * object-internals.h: Change the type of more fields from MonoReflectionType*
6213 2009-02-22 Zoltan Varga <vargaz@gmail.com>
6215 * threads.c (mono_thread_suspend_all_other_threads): Handle the case when
6216 the a thread does not suspend within 100ms.
6218 * monitor.c (mono_monitor_try_enter_internal): Handle SuspendRequested
6219 in addition to StopRequested as well.
6221 * mono-debug.c: Call _mono_debug_get_image () while holding the debug lock.
6223 * debug-mono-symfile.c (mono_debug_symfile_lookup_method): Actually
6224 search the method_hash before inserting a new entry, to avoid crashes when
6225 the same method is inserted multiple times, causing the old
6226 MonoDebugMethodInfo structure to be freed by the value dtor function.
6228 2009-02-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
6230 * socket-io.c: support SO_MAXCONN, SO_USELOOPBACK and
6231 SO_EXLUSIVEADDRUSE where available.
6233 2009-02-21 Zoltan Varga <vargaz@gmail.com>
6235 * marshal.c (mono_marshal_get_runtime_invoke): Fix _another_ bug sharing
6236 runtime invoke wrappers, this time it is string ctor wrappers, which
6237 pass a dummy string as 'this' instead of their obj argument. Fixes
6240 2009-02-21 Jb Evain <jbevain@novell.com>
6242 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
6243 only get create_culture once.
6245 2009-02-20 Zoltan Varga <vargaz@gmail.com>
6247 * reflection.c (mono_reflection_setup_internal_class): Move the user type
6248 check before the locking.
6250 * reflection.c (mono_reflection_setup_internal_class): Check for user types.
6251 (mono_reflection_create_runtime_class): Ditto.
6252 (mono_reflection_sighelper_get_signature_local): Ditto.
6253 (mono_reflection_sighelper_get_signature_field): Ditto.
6255 * object-internals.h (CHECK_MONOTYPE): New macro to check that a Type object
6256 is a System.MonoType object or similar.
6257 (monotype_cast): New helper function to cast a MonoObject to a
6258 MonoReflectionType object.
6260 * object-internals.h: Change MonoReflectionType* members in structures to
6261 MonoObject* members to force the usage of the monotype_cast () function.
6263 * reflection.c icall.c: Use monotype_cast () for accessing Type members of
6264 structures/arrays. This causes us to assert instead of crashing when
6265 instances of user defined subclasses of System.Type are encountered.
6267 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
6271 * icall.c: add new GetUnmanagedResourcePtr that returns a pointer to a
6272 win32 resource loaded from a PE file.
6274 * image.c: fix mono_image_lookup_resource.
6276 2009-02-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
6280 * threads.c: added internal call for WaitHandle.SignalAndWait.
6282 2009-02-19 Bill Holmes <billholmes54@gmail.com>
6284 * cominterop.c : Adding cominterop_type_from_handle and
6285 registering it as an icall. Replacing all references
6286 to type_from_handle.
6288 Code is contributed under MIT/X11 license.
6290 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
6292 * Makefile.am: Add lock-tracer.h and lock-trace.c.
6294 * appdomain.c: Call the tracer init function.
6296 * domain-internals.h: Enable the tracer for the domain locks.
6298 * image.c: Enable the tracer for image locks.
6300 * loader.c: Enable the trace for the loader lock.
6303 * lock-tracer.c: Initial implementation of the lock trace utility.
6304 The tracer requires a compile time define to be enabled and a env var
6305 to be enabled at runtime.
6307 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
6309 * domain.c (mono_domain_code_foreach): Improve documentation.
6311 2009-02-19 Rodrigo Kumpera <rkumpera@novell.com>
6314 * generic-sharing.c:
6316 * reflection.c: Adjust locking order to the new semantics where the loader lock
6319 2009-02-18 Rodrigo Kumpera <rkumpera@novell.com>
6321 * domain.c: Add mono_domain_code_* functions that perform locking
6322 around the domain codeman.
6324 * domain-internals.h: Export those functions.
6326 * object.c: Use new functions instead of acquiring the domain lock.
6328 2009-02-19 Zoltan Varga <vargaz@gmail.com>
6330 * marshal.c (mono_ftnptr_to_delegate): Convert a NULL ftnptr to a null
6331 delegate. Fixes #477396.
6333 2009-02-18 Zoltan Varga <vargaz@gmail.com>
6335 * reflection.c (create_custom_attr): Get rid of alloca.
6337 2009-02-18 Bill Holmes <billholmes54@gmail.com>
6339 * cominterop.c (cominterop_get_managed_wrapper_adjusted) :
6340 Adding exception handling for all CCW calls.
6342 Code is contributed under MIT/X11 license.
6344 2009-02-18 Zoltan Varga <vargaz@gmail.com>
6346 * reflection.c (mono_reflection_init): Remove the unused reflection mutex.
6348 * marshal.c (emit_marshal_boolean): Add null checks to the new
6349 native->managed marshalling code. Fixes #476247.
6351 2009-02-17 Zoltan Varga <vargaz@gmail.com>
6353 * class.c (mono_class_get_vtable_entry): Move the addition of
6354 static rgctx invoke wrappers for vtable methods here, this simplifies
6355 a lot of code and causes fewer rgctx wrappers to be created.
6357 * marshal.c (mono_marshal_get_static_rgctx_invoke): Change the
6358 name of the statistics to begin with an uppercase.
6360 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
6362 * reflection.c: Revert previous change as it breaks the build.
6364 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
6366 * verify.c: Properly handle SZARRAY element type.
6370 2009-02-17 Rodrigo Kumpera <rkumpera@novell.com>
6372 * reflection.c (mono_image_create_method_token): Correctly encode
6373 MethodDef MemberRefParent token.
6377 2009-02-17 Zoltan Varga <vargaz@gmail.com>
6379 * image.c (mono_image_close): Delete the critical section before
6380 freeing the memory holding it.
6382 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6384 * verify.c (mono_method_verify): rethrow opcode doesn not fall through.
6387 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6389 * pedump.c (main): Call mono_marshal_init so pedump
6392 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6394 * loader.c (method_from_memberref): Properly fix #474271 and
6395 don't break the runtime bad.
6397 2009-02-16 Zoltan Varga <vargaz@gmail.com>
6399 * domain.c (mono_domain_alloc): Add locking so the caller doesn't have to.
6400 (mono_domain_alloc0): Ditto.
6402 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6404 * loader.c (method_from_memberref): Don't abort if the array
6405 method is not found. A regular loader failure is more informative
6410 2009-02-16 Rodrigo Kumpera <rkumpera@novell.com>
6412 *loader.c: Guard MonoImage::method_cache/methodref_cache
6413 using the image lock instead of the loader lock.
6415 * metadata.h: Add comments about which fields are protected by
6418 2009-02-16 Zoltan Varga <vargaz@gmail.com>
6420 * appdomain.c (mono_set_private_bin_path_from_config): Fix a warning.
6422 * generic-sharing.c (mono_method_construct_object_context): Remove the
6423 wrapper_type == NONE assert, it is not needed.
6425 2009-02-15 Zoltan Varga <vargaz@gmail.com>
6427 * reflection.c (clear_cached_object): New helper function.
6428 (mono_method_clear_object): New function to clear the cached reflection
6429 objects for a dynamic method.
6431 * object.c (mono_runtime_free_method): Call mono_method_clear_object ().
6432 Partly fixes # 463323.
6434 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
6438 * reflection.c: Remove all explicit uses of MonoImage::property_hash.
6440 2009-02-14 Rodrigo Kumpera <rkumpera@novell.com>
6442 * image.c: Add mono_image_property_(lookup,insert,remove) functions that
6443 take the image lock instead of the loader lock.
6445 * metadata-internals.h: Export new functions.
6447 2009-02-12 Miguel de Icaza <miguel@novell.com>
6449 * domain.c (app_config_parse): Remove another use of stat that is
6450 not necessary as g_file_get_contents already does the presence
6453 2009-02-13 Zoltan Varga <vargaz@gmail.com>
6455 * cominterop.c icall-def.h: Fix the DISABLE_COM build.
6457 * marshal.c: Move the bstr handling code to cominterop.c.
6459 * marshal.c: Remove some COM interop code missed previously.
6461 2009-02-12 Miguel de Icaza <miguel@novell.com>
6463 More Paolo patches from the Wii port:
6465 * security.c: Remove ves_icall_System_Environment_get_UserName
6468 * icall.c: And put ves_icall_System_Environment_get_UserName
6471 * appdomain.c (mono_set_private_bin_path_from_config): Remove
6472 redundant call to stat that was only used to test for the file
6473 existence. Patch from Paolo.
6475 * gc.c (run_finalize): If COM is disabled, do not link in
6476 mono_marshal_free_ccw.
6478 * generic-sharing.c: Use alloca.h here as well.
6480 2009-02-13 Rodrigo Kumpera <rkumpera@novell.com>
6482 * reflection.c (mono_reflection_lookup_dynamic_token): Do the locking properly.
6484 2009-02-13 Zoltan Varga <vargaz@gmail.com>
6486 * cominterop.c cominterop.h: New files.
6488 * marshal.c: Move the COM interop related code to cominterop.c. Make a few
6489 function/typedefs which are needed by cominterop.c global.
6491 2009-02-12 Mark Probst <mark.probst@gmail.com>
6493 * generic-sharing.c: Don't take the loader lock to guard image
6496 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6498 * reflection.c (mono_reflection_lookup_dynamic_token): This function might be
6499 called without the loader lock which is required to guard MonoImage:tokens.
6501 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6507 * reflection.c: Don't take the loader lock to alloc memory from the image mempool.
6509 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6511 * metadata.c: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
6512 Rework the code to use regular mono_image_alloc/0.
6514 * loader.c: Rework the code to use regular mono_image_alloc/0.
6516 * metadata-internals.h: Remove mono_image_alloc_lock and mono_image_alloc0_lock.
6518 2009-02-12 Bill Holmes <billholmes54@gmail.com>
6520 * object-internals.h : Fixing a typo in the
6521 MonoReflectionComVisibleAttribute struct.
6523 * marshal.c (cominterop_com_visible): Check the implemented
6524 interfaces for ComImport.
6526 * marshal.c (cominterop_get_native_wrapper_adjusted): For COM calls
6527 assume that bools should be treated as VARIANTBOOLs.
6529 * marshal.c (emit_marshal_boolean): Adding cases for
6530 MARSHAL_ACTION_MANAGED_CONV_IN and MARSHAL_ACTION_MANAGED_CONV_OUT.
6532 * marshal.c (mono_marshal_emit_managed_wrapper): Adding calls to
6533 emit_marshal MARSHAL_ACTION_MANAGED_CONV_IN and OUT for bools.
6535 * marshal.c (cominterop_get_ccw): For COM calls assume that bools
6536 should be treated as VARIANTBOOLs.
6538 Code is contributed under MIT/X11 license.
6540 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6542 * image.c (mono_image_alloc, mono_image_alloc0, mono_image_strdup): Guard mempool
6543 allocation with the image lock.
6545 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6547 This patch is the last of a series to remove explicit reference of MonoImage::mempool
6548 and use mono_image_alloc set of functions instead. This time we finish with reflection.c
6550 * object.c: Add mono_string_to_utf8_image.
6552 * object-internals.h: Export mono_string_to_utf8_image.
6554 * reflection.c: Rework all explicit references to the the image mempool to go thought
6555 the mono_image_alloc set of functions.
6557 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6559 This patch is the third of a series to remove explicit reference of MonoImage::mempool
6560 and use mono_image_alloc set of functions instead. This time we finish with marshal.c
6561 and generics-sharing.c.
6563 * generics-sharing.c (set_other_info_templates): Take a MonoImage instead of a MonoMemPool
6564 as first argument. Note that this function remains broken as it doesn't perform locking around the
6567 * generics-sharing.c (rgctx_template_set_other_slot): Pass the image and not the mempool.
6569 * image.c: Add g_slist_append_image.
6571 * metadata.c (mono_metadata_field_info_with_mempool): Remove the mempool argument and use
6572 the supplied image for allocation. Move code into mono_metadata_field_info_full.
6574 * metadata.c (mono_metadata_parse_marshal_spec_full): Take a MonoImage instead of a MonoMemPool.
6575 Fix all related code to do the same.
6577 * marshal.c (mono_marshal_load_type_info): Pass the image instead of the mempool.
6579 * metadata-internals.h: Fix the signatures.
6581 2009-02-12 Rodrigo Kumpera <rkumpera@novell.com>
6583 This patch is the second of a series to remove explicit reference of MonoImage::mempool
6584 and use mono_image_alloc set of functions instead. This time we rework mono_metadata_type_dup
6585 and similar to work using MonoImage.
6587 * class.c (mono_mempool_dup): Rename to mono_image_memdup and take a MonoImage instead of a
6590 * class.c (mono_dup_array_type): Take a MonoImage instead of a MonoMemPool as first argument.
6592 * class.c (mono_metadata_signature_deep_dup): Same.
6594 * class.c (inflate_generic_type): Same.
6596 * class.c (mono_class_inflate_generic_type_with_mempool): Same.
6598 * metadata.c (mono_metadata_signature_dup_full): Same.
6600 * metadata.c: Add mono_metadata_signature_dup_mempool and extract common functionality from
6601 mono_metadata_signature_dup_full.
6603 * metadata.c (mono_metadata_type_dup): Same.
6605 * marshal.c: Pass the image to calls to mono_metadata_type_dup.
6607 * reflection.c: Same.
6609 * generic-sharing.c: Pass the image to calls to mono_class_inflate_generic_type_with_mempool.
6611 * metadata-internals.h: Fix the signatures.
6613 * class-internals.h: Same.
6615 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
6617 This patch is the first of a series to remove explicit reference of MonoImage::mempool
6618 and use mono_image_alloc set of functions instead.
6620 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy):
6621 Rename to mono_class_inflate_generic_type_no_copy and take a MonoImage instead
6624 * class.c (mono_class_setup_fields): Adapt to mono_class_inflate_generic_type_no_copy.
6626 * class.c (g_list_prepend_mempool): Removed.
6628 * class.c (mono_class_get_nested_types): Use g_list_prepend_image instead of g_list_prepend_mempool.
6630 * image.c: Add g_list_prepend_image.
6632 * metadata-internals.h (struct MonoImage): Fix comment. Export g_list_prepend_image as internal.
6634 * reflection.c (mono_reflection_create_runtime_class): Use g_list_prepend_image instead of g_list_prepend_mempool.
6637 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
6639 * metadata-internals.h (struct MonoImage): Add lock field. Export mono_image_lock and
6642 * image.c (mono_image_init): Init the lock field.
6644 * image.c (mono_image_init): Cleanup the lock field.
6646 * image.c: Add mono_image_(un)lock functions.
6648 2009-02-11 Mark Probst <mark.probst@gmail.com>
6650 * class.c, class-internals.h: mono_method_get_context_general()
6651 combines the functionality of mono_method_get_context() and
6652 mini_method_get_context().
6654 * generic-sharing.c, domain-internals.h:
6655 mono_method_construct_object_context() and
6656 mono_domain_lookup_shared_generic() moved from mini.
6658 * icall.c (ves_icall_InternalInvoke): Handle the case where the
6659 method doesn't have the correct instantiation because it's shared
6660 generic code. Fixes #473999.
6662 2009-02-11 Zoltan Varga <vargaz@gmail.com>
6664 * loader.c (mono_method_get_wrapper_data): Handle inflated methods as well.
6666 * loader.c (mono_loader_lock): Add a comment pointing to the locking document.
6668 2009-02-11 Rodrigo Kumpera <rkumpera@novell.com>
6670 * metadata.c: Make mono_image_alloc_lock and mono_image_alloc0_lock non static.
6672 * metadata-internals.h: Export mono_image_alloc_lock and mono_image_alloc0_lock.
6674 * loader.c (mono_get_method_full): Drop the loader lock while constructing the method
6675 and recheck the cache for dups after it.
6677 * loader.c (mono_get_method_from_token): Use _lock version of mono_image_alloc0.
6679 Fixes one of the deadlocks found in #473150.
6681 2009-02-11 Bill Holmes <billholmes54@gmail.com>
6683 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal):
6684 For Win32, add additional break conditions for accept.
6686 Code is contributed under MIT/X11 license.
6688 2009-02-10 Zoltan Varga <vargaz@gmail.com>
6690 * marshal.c (mono_marshal_get_native_func_wrapper): Use get_cache to
6691 lazily initialize the native wrapper cache.
6692 (mono_marshal_get_native_wrapper): Put aot-ed native wrappers into a separate
6693 cache, since they are different from the normal wrappers.
6695 * image.c (mono_image_init): Initialize native_wrapper_cache lazily as well.
6697 * metadata-internals.h (struct _MonoImage): Add a new wrapper for
6698 AOT compiled native wrappers.
6700 2009-02-09 Geoff Norton <gnorton@novell.com>
6703 * security-core-clr.c: Allow enabling core-clr from the embedding
6706 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
6708 * socket-io.c: when requesting all the local ips, if there are no
6709 interfaces up and running, MS returns 127.0.0.1.
6711 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
6713 * mono-perfcounters-def.h: processor time is an inverse time.
6716 2009-02-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
6718 * socket-io.c: an empty host name returns the list of local IPs.
6719 Fixes bug #386637 part 1/2.
6721 2009-02-07 Zoltan Varga <vargaz@gmail.com>
6723 * verify.c (mono_class_interface_implements_interface): Call
6724 mono_class_setup_interfaces ().
6725 (merge_stacks): Ditto.
6727 2009-02-06 Zoltan Varga <vargaz@gmail.com>
6729 * class.c (mono_class_setup_interfaces): New function to lazily initalize
6731 (mono_generic_class_get_class): Don't initalize klass->interfaces.
6732 (mono_generic_class_get_class): Ditto.
6734 2009-02-06 U-QUACK\miguel <miguel@quack>
6736 * icall-defs.h: Include also the Encrypt/Decrypt string methods as
6737 they live in security.c
6739 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Integrated
6740 another bit from Paolo's code.
6742 2009-02-06 Zoltan Varga <vargaz@gmail.com>
6744 * object.c (build_imt_slots): Add a small optimization to avoid inflating
6745 methods which will be discarded by add_imt_builder_entry ().
6747 * marshal.c (get_runtime_invoke_type): Avoid sharing enum types since they
6750 * loader.c: Add a statistics for the size of the memberref signature cache.
6752 * loader.c (find_cached_memberref_sig): New helper function.
6753 (cache_memberref_sig): Ditto.
6755 * loader.c: Cache the result of parsing memberref signatures, since otherwise
6756 they will be parsed again for every generic instantiation, leading to unbounded
6759 2009-02-05 Zoltan Varga <vargaz@gmail.com>
6761 * loader.c (mono_get_method_from_token): Avoid creating class for the generic
6762 parameters of generic methods.
6764 * class.c (mono_class_inflate_generic_method_full): Set is_mb_open again
6765 after the original method is copied to the inflated method.
6766 (mono_class_get_vtable_entry): Handle rgctx invoke wrappers more efficiently.
6768 * class-internals.h (struct _MonoMethodInflated): Move the is_mb_open
6769 field to MonoMethod since it only consumes 1 bit there, and 4/8 bytes here.
6771 * class.c metadata.c: Update after the changes above.
6773 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
6775 * metadata-verify.c: Simplified error handling and added
6776 section table validation.
6778 2009-02-05 Zoltan Varga <vargaz@gmail.com>
6780 * class-internals.h (MonoClassExt): New structure containing rarely used
6781 fields of MonoClass.
6782 (struct _MonoClass): Move rarely used fields to MonoClassExt, accessed
6783 through a new 'ext' field.
6785 * class.c (mono_class_alloc_ext): New helper function to allocate
6788 * class.c metadata.c reflection.c: Update after MonoClass structure changes.
6790 2009-02-05 Mark Probst <mark.probst@gmail.com>
6792 * object.c (mono_object_get_virtual_method): Properly inflate
6793 generic methods. Fixes #472692.
6795 2009-02-05 Rodrigo Kumpera <rkumpera@novell.com>
6797 * class.c (mono_class_create_from_typedef): The CLR supports SystemF
6798 recursive types such as List<T>:Cons<T,List<T>> so when doing the lookup
6799 for the parent type, the created type must be ready to be used on a generic
6801 We fill this_arg/byval_arg if the parent is a generic instance to make sure
6802 we won't have duplicated entries in generic_inst_cache.
6806 2009-02-05 Miguel De Icaza <miguel@novell.com>
6808 * threadpool.c (socket_io_add_poll): Remove the BSD6 define and
6809 replace with plain BSD per the comments on the bug MONO77637.
6811 2009-02-05 Zoltan Varga <vargaz@gmail.com>
6813 * class.c (mono_class_get_generic_class): New accessor function.
6814 (mono_class_get_generic_container): Ditto.
6816 * class-internals.h (struct _MonoClass): Add 'is_generic' and 'is_inflated'
6817 fields, similar to the ones in MonoMethod.
6819 * class.c (mono_generic_class_get_class): Set klass->is_inflated.
6820 (mono_class_create_from_typedef): Set klass->is_generic if needed.
6822 * reflection.c (mono_reflection_create_generic_class): Set klass->is_generic.
6824 * class-internals.h (struct _MonoClass): Remove enum_basetype, it contains
6825 the same information as element_class->byval_arg.
6827 * class.c reflection.c: Remove references to class->byval_arg.
6829 * class.c marshal.c: Use mono_class_enum_basetype () instead of accessing
6830 klass->enum_basetype directly.
6832 * verify.c metadata.c object.c icall.c reflection.c: Use
6833 mono_class_enum_basetype () instead of accessing klass->enum_basetype
6836 2009-02-04 Miguel de Icaza <miguel@novell.com>
6838 * icall-def.h: Remove internal calls for sockets when
6839 DISABLE_SOCKET is defined, file system writing features when the
6840 OS only support reading and not writing data and Policy support if
6841 the Policy is disabled.
6843 * image.c (do_mono_image_open): Apply Paolo's patches for using
6844 mono_file_map_ APIs here.
6846 * assembly.c: Add support for platforms to avoid prefix
6849 2009-02-04 Zoltan Varga <vargaz@gmail.com>
6851 * generic-sharing.c (mono_method_fill_runtime_generic_context): Fix a
6854 * class.c (mono_class_inflate_generic_class): New helper function.
6856 * class.c: Use mono_class_inflate_generic_class in a few places. Add
6857 statistics for inflated methods/classes.
6859 * loader.c (inflate_generic_header): Use mono_class_inflate_generic_class.
6861 * icall.c (ves_icall_Type_GetMethodsByName): Optimize the case when
6862 the call is made from Delegate.CreateDelegate () for the invoke method of
6865 * loader.c: Add a statistics for the memory occupied by inflated signatures.
6867 * metadata.c (mono_metadata_signature_size): New helper function.
6869 * class.c (mono_class_get_method_from_name_flags): Add an optimization for
6872 * metadata.c (inflated_method_in_image): Avoid calling
6873 mono_method_signature () if the method does not already have a signature.
6875 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
6877 * verify.c (is_compatible_boxed_valuetype): When checking if the boxed
6878 valuetype is compatible with target type, check by inheritance as a
6879 VT is not really compatible with System.ValueType, for example.
6881 * verify.c (do_invoke_method): Improve error message.
6883 * verify.c (do_box_value): If boxing a nullable, use the type argument
6886 * verify.c (do_newobj): Improve error message.
6890 2009-02-03 Miguel de Icaza <miguel@novell.com>
6892 * appdomain.c: Add support for DISABLE_SOCKETS and DISABLE_SHADOW_COPY
6894 2009-02-03 Mark Probst <mark.probst@gmail.com>
6896 * generic-sharing.c: Don't hold domain lock when calling
6897 instantiate_other_info(). Fixes #471958.
6899 * domain-internals.h, loader.c: Describe locking policy of domain
6900 lock vs loader lock.
6902 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
6904 * verify.c (mono_delegate_signature_equal): Make it possible to check
6905 first-arg-bound delegates to static method.
6907 * verify.c (verify_delegate_compatibility): Correctly verify delegates to
6908 static methods with the first arg bound.
6912 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
6914 * verify.c: Added stack_slot_full_name to provide decent and more meanfull
6917 * verify.c (is_compatible_boxed_valuetype): Be less restrictive when not
6918 under strict mode. Any type, when boxed can be seen as a reference type.
6922 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
6924 * object.h: The lower bound of an array is a signed integer value.
6925 Introduce mono_array_lower_bound_t typedef. It should be used instead of
6926 gint32 as under MONO_BIG_ARRAYS it will be a gint64.
6928 * icall.c: Cast MonoArrayBounds::length to a signed value so correctly
6929 calculate the upper bound.
6933 2009-02-02 Miguel de Icaza <miguel@novell.com>
6935 From Paolo's work, refactored, cleared up:
6937 * threadpool.c, icall.c: ifdef code that requires a working socket
6940 * metadata.c (mono_metadata_field_info): Do not attempt to return
6941 a value from a function declared as void.
6943 * console-io.c: Use MONO_NULL_TTYDRIVER to remove the tty driver
6944 from the console stack.
6946 * assembly.c: use strrchr instead of rindex.
6948 * class.c, object.c, marshal.c, icall.c, reflection.c: include
6949 alloca.h on systems that have it.
6951 * environment.c: Avoid code that uses stuff from
6954 * appdomain.c: Include sys/time.h.
6956 * console-io.c: include sys/ioctl.h if it is available.
6958 2009-02-03 Zoltan Varga <vargaz@gmail.com>
6960 * method-builder.h (_MonoMethodBuilder): Add a 'skip_visibility' flag.
6962 * method-builder.c (mono_mb_create_method): Set method->skip_visibility from
6965 * marshal.c: Set mb->skip_visibility instead of setting it on the method
6966 after it was created and cached, as the later is not thread safe.
6968 2009-02-02 Zoltan Varga <vargaz@gmail.com>
6970 * mono-debug.c (mono_debug_print_stack_frame): Avoid crashes when this is
6971 called while the debugging module is not initialized. Fixes #471669.
6973 2009-02-02 Rodrigo Kumpera <rkumpera@novell.com>
6975 * icall.c (type_from_name): Ignore reflection frames to find out the real caller.
6979 2009-02-02 Mark Probst <mark.probst@gmail.com>
6981 * generic-sharing.c (lookup_or_register_other_info): Make sure the
6982 loader lock is not taken while the templates lock is held. Fixes
6985 2009-02-02 Mark Probst <mark.probst@gmail.com>
6987 * metadata.c (type_in_image): Added a check to fix a monodis
6990 2009-02-02 Zoltan Varga <vargaz@gmail.com>
6992 * marshal.c (mono_marshal_get_runtime_invoke): Add support for byref
6995 * object.c (mono_runtime_invoke_array): Ditto.
6997 * marshal.c (mono_marshal_free_dynamic_wrappers): New function for
6998 freeing wrappers of dynamic methods.
7000 * loader.c (mono_free_method): Call it. Fixes #463323.
7002 * marshal.c (mono_marshal_get_runtime_invoke): Disable sharing for
7003 methods taking vtype/byref arguments, to fix yet another bug caused by
7004 the sharing of runtime invoke wrappers. Partly fixes #471259.
7006 2009-02-01 Zoltan Varga <vargaz@gmail.com>
7008 * debug-mono-symfile.c (check_line): Return NULL instead of returning
7009 <first file in file table>:1 when the IL offset does not have an associated
7012 2009-01-31 Zoltan Varga <vargaz@gmail.com>
7014 * mono-debug.c (mono_debug_lookup_locals): New function to return local
7015 variable info for a method.
7017 * debug-mono-symfile.c (mono_debug_symfile_lookup_locals): Ditto.
7019 2009-01-30 Jb Evain <jbevain@novell.com>
7021 * pedump.c: reuse code from monodis to make sure pedump honors
7022 MONO_PATH, which is needed to verify net_2_1 assemblies.
7024 2009-01-29 Zoltan Varga <vargaz@gmail.com>
7026 * mono-debug.c (mono_debug_print_stack_frame): Print the IL offset even when
7027 there is no line number info.
7029 2009-01-29 Raja R Harinath <harinath@hurrynot.org>
7031 Avoid some MonoType allocations
7032 * reflection.c (mono_reflection_initialize_generic_parameter):
7033 Reuse MonoType from param->pklass rather than allocating one.
7034 (mono_dynamic_image_free): Update to changes.
7036 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
7038 Rearrange some code to improve consistency
7039 * reflection.c (mono_reflection_setup_generic_class): Move body ...
7040 (mono_reflection_initialize_generic_parameter): ... here.
7042 2009-01-28 Zoltan Varga <vargaz@gmail.com>
7044 * generic-sharing.c (has_constraints): Enable gshared for methods/classes
7045 with type constraints as an experiment.
7047 * boehm-gc.c (on_gc_notification): Update mono_stats.
7049 2009-01-28 Raja R Harinath <harinath@hurrynot.org>
7051 Avoid some allocations
7052 * class-internals.h (_MonoGenericInst::type_argv): Convert from
7053 pointer to tail array to avoid extra allocation.
7054 * metadata.c (free_generic_inst): Update to changes.
7055 (mono_metadata_get_generic_inst): Likewise. Use alloca instead of
7058 2009-01-27 Zoltan Varga <vargaz@gmail.com>
7060 * icall.c (ves_icall_System_Type_EqualsInternal): For user-defined types,
7061 return TRUE if the two type objects are the same.
7063 2009-01-26 Zoltan Varga <vargaz@gmail.com>
7065 * marshal.c (mono_marshal_load_type_info): Fill out info->min_align.
7066 (mono_class_native_size): Use klass->marshal_info->min_align instead of
7067 klass->min_align, since klass->min_align contains the managed alignment,
7068 while the native alignment can be different, like for longs on x86.
7071 * class-internals.h (MonoMarshalType): Add a min_align field.
7073 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
7075 * assembly.c (mono_assembly_try_decode_skip_verification): Add a hack to check
7078 2009-01-26 Zoltan Varga <vargaz@gmail.com>
7080 * domain-internals.h (struct _MonoJitInfo): Add a 'from_aot' field plus
7081 some comments about the usage of the used_regs field.
7083 * marshal.c (emit_marshal_ptr): Allow pointers to blittable structures.
7086 2009-01-24 Gonzalo Paniagua Javier <gonzalo@novell.com>
7088 * appdomain.c: return NULL instead of throwing FileNotFoundException
7089 when LoadAssembly() fails.
7091 2009-01-23 Mark Probst <mark.probst@gmail.com>
7093 * metadata.c (mono_metadata_generic_param_equal): Only compare the
7094 image if the owner is NULL. Fixes the AOT failures.
7096 2009-01-23 Zoltan Varga <vargaz@gmail.com>
7098 * metadata.c (mono_metadata_load_generic_params): Initialize the
7099 MonoGenericParam structure using memset so the image field is initialized
7102 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
7104 * appdomain.c (mono_domain_unload): Change the InterlockedIncrement to
7107 2009-01-21 Zoltan Varga <vargaz@gmail.com>
7109 * class.c (mono_class_setup_vtable_general): In the generic instance
7110 optimization, set method->slot for abstract virtual methods. Fixes part of
7113 2009-01-21 Rodrigo Kumpera <rkumpera@novell.com>
7115 * domain-internals.h: Add new appdomain state MONO_APPDOMAIN_UNLOADING_START
7116 which signals that the unloading has started but all appdomain services must
7119 * appdomain.c (mono_domain_unload): The initial state for unloading now
7120 is unloading_start and we switch to unloading after the managed call to
7121 AppDomain::DomainUnload has finished.
7123 The new unloading state has to be created because managed code in the
7124 DomainUnload event can depend on things like the threadpool still working.
7125 The domain must remain fully functional while the event executes.
7127 This shown as an issue due to Process::WaitForExit, which waits for
7128 async reads of stdout and stderr to complete. Since those are processed
7129 in the threadpool the code deadlocks because the DomainUnload callback
7130 waits for the async read finished event, which should have been set by a
7131 threadpool job but has been discarded due to the domain been in unload
7134 2009-01-21 Mark Probst <mark.probst@gmail.com>
7136 * metadata.c (mono_metadata_generic_param_equal): Owner as well as
7139 2009-01-21 Mark Probst <mark.probst@gmail.com>
7141 * reflection.c (resolve_object): For fields, inflate the class and
7142 then get the field in the inflated class.
7144 2009-01-20 Mark Probst <mark.probst@gmail.com>
7146 * object-internals.h (struct _MonoException): Added a comment
7147 explaining the new use of trace_ips.
7149 2009-01-20 Mark Probst <mark.probst@gmail.com>
7151 * generic-sharing.c (inflate_other_data): Inflate array methods
7154 * loader.c, class-internals.h: Rename search_in_array_class() to
7155 mono_method_search_in_array_class() and make it non-static.
7157 2009-01-19 Zoltan Varga <vargaz@gmail.com>
7159 * metadata.c (inflated_signature_in_image): Call signature_in_image as well.
7160 Hopefully fixes #458168.
7162 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
7164 * object.c (mono_raise_exception): Remove call to InterlockedIncrement
7165 as it is performed elsewhere.
7167 Code is contributed under MIT/X11 license
7169 2009-01-19 Christian Hergert <christian.hergert@gmail.com>
7171 * mono-perfcounters-def.h: Add counters for asp.net requests total and
7173 * object.c (mono_raise_exception): Increment the exceptions total
7174 counter when an exception is thrown.
7175 * class-internals.h: Add a location for storing the total number of
7176 asp.net requests served.
7177 * mono-perfcounters.c: Implement update support for asp.net counters
7178 from the class libraries. Implement read support for asp.net counters
7179 and exceptions total counter.
7181 2009-01-19 Zoltan Varga <vargaz@gmail.com>
7183 * loader.c (search_in_array_class): Call mono_class_setup_methods () before
7184 accessing klass->methods. Fixes #467385.
7186 2009-01-18 Zoltan Varga <vargaz@gmail.com>
7188 * marshal.c (emit_marshal_custom): Avoid calling MarshalNativeToManaged
7189 for byval arguments without an [Out] attribute. Fixes #467212.
7191 * attach.c: Applied patch from Koushik Dutta (koush@koushikdutta.com).
7192 Fix compilation under android.
7194 * sgen-gc.c: Instead of scanning gray objects after all roots have been
7195 processed, scan them directly after they are copied, to achieve better locality
7198 * socket-io.c: Applied patch from Koushik Dutta
7199 (koush@koushikdutta.com). Disable IPV6 when running under android.
7201 2009-01-18 Zoltan Varga <vargaz@gmail.com>
7203 * icall.c (ves_icall_InternalExecute): Add write barriers.
7205 * marshal.c (mono_marshal_get_write_barrier): Remove, this is now done in
7208 * sgen-gc.c: Implement write barriers in IL code.
7210 2009-01-17 Geoff Norton <gnorton@novell.com>
7212 * image.c: Avoid trying to walk the reference table of dynamic assemblies.
7214 2009-01-17 Geoff Norton <gnorton@novell.com>
7216 * image.c: When unloading the image->references table, there can be gaps
7217 in it. Ensure that we iterate every entry to avoid leaking assembly references
7218 when unloading an appdomain.
7220 2009-01-16 Zoltan Varga <vargaz@gmail.com>
7222 * sgen-gc.c: Add support for allocating a nursery at an aligned address, to
7223 speed up ptr-in-nursery checks.
7225 * threads.c (mono_threads_abort_appdomain_threads): Abort threads outside the
7226 threads_lock () to prevent deadlocks.
7228 * sgen-gc.c gc-internal.h: Add a new root type root-with-wbarrier, which
7229 does not need to be scanned during minor collections, since writes to it
7230 must use write barriers.
7232 2009-01-15 Rodrigo Kumpera <rkumpera@novell.com>
7234 * metadata-verify.c: Add pe nt header verification.
7236 2009-01-15 Zoltan Varga <vargaz@gmail.com>
7238 * gc.c: Fix a few warnings when using SGEN.
7240 2009-01-14 Rodrigo Kumpera <rkumpera@novell.com>
7242 * metadata-verify.c: Add pe optional header verification.
7244 2009-01-15 Zoltan Varga <vargaz@gmail.com>
7246 * sgen-gc.c: Add support for user defined marker functions, used by
7247 MonoGHashTable to avoid registering a GC root for every hash node.
7249 2009-01-14 Zoltan Varga <vargaz@gmail.com>
7251 * sgen-gc.c: Fix warnings. Optimize copy_object () a bit. Split pinned/
7252 non-pinned roots into separate hashes to avoid having to traverse them
7253 in functions which are only interested in one kind.
7255 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
7257 * metadata-verify.c: Add pe header machine field verification.
7259 2009-01-13 Rodrigo Kumpera <rkumpera@novell.com>
7261 * metadata-verify.c: Add pe header size verification.
7263 2009-01-14 Zoltan Varga <vargaz@gmail.com>
7265 * reflection.c (ALLOC_REFENTRY): Don't allocate the ReflectionEntry structures
7266 using the GC, they don't contain references.
7268 * domain.c (mono_domain_create): Create ldstr_table using MONO_HASH_KEY_VALUE_GC.
7270 2009-01-13 Geoff Norton <gnorton@novell.com>
7272 * appdomain.c|h: Expose mono_domain_unload to the embedding api so that
7273 AppDomains created on the native side can be cleaned up on the native side.
7275 2009-01-13 Geoff Norton <gnorton@novell.com>
7277 * appdomain.c: Ensure that we call mono_context_init for the embedding api
7278 as well as the managed api.
7280 2009-01-13 Geoff Norton <gnorton@novell.com>
7282 * appdomain.h|c: New API for creating a MonoDomain in the embedding api
7283 with a MonoAppDomain initialized against it.
7285 2009-01-13 Zoltan Varga <vargaz@gmail.com>
7287 * reflection.c (MOVING_GC_REGISTER): Fix a warning.
7289 * reflection.c (mono_image_get_generic_param_info): Use MOVING_GC_REGISTER.
7291 * marshal.c: Avoid setting the exception clauses after a method has been entered
7292 into the wrapper caches. Fixes #465700.
7294 * method-builder.c (mono_mb_set_clauses): New function to set the clauses of the
7296 (mono_mb_create_method): Set the clauses from the method builder.
7298 2009-01-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
7300 * threadpool.c: include sys/socket.h. Fixes compilation on FreeBSD.
7301 Patch from Makoto Kishimoto.
7303 2009-01-13 Zoltan Varga <vargaz@gmail.com>
7305 * sgen-gc.c (mono_gc_make_descr_from_bitmap): Handle large bitmaps by
7306 encoding them as ROOT_DESC_COMPLEX.
7307 (precisely_scan_objects_from): Implement support for ROOT_DESC_COMPLEX.
7309 2009-01-12 Zoltan Varga <vargaz@gmail.com>
7311 * sgen-gc.c (scan_from_remsets): Clear the global remset of pointers which
7312 no longer point to the nursery.
7314 * sgen-gc.c: Add a few comments/FIXMEs.
7316 * sgen-gc.c: Implement scanning of the alloc_pinned objects.
7318 * marshal.c (mono_marshal_get_synchronized_wrapper): Make the
7319 initialization of the various _method variables thread safe. Fixes
7322 2009-01-12 Mark Probst <mark.probst@gmail.com>
7324 * domain.c, domain-internals.h: Remove the shared_generics_hash
7325 and its lookup functions.
7327 2009-01-12 Bill Holmes <billholmes54@gmail.com>
7329 * socket-io.c: Fixing the MSVC build.
7331 Code is contributed under MIT/X11 license.
7333 2009-01-12 Rodrigo Kumpera <rkumpera@novell.com>
7335 * metadata-verify.c: Add pe header watermark verification.
7337 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
7339 * metadata-verify.c: Add lfanew verification.
7341 2009-01-12 Jb Evain <jbevain@novell.com>
7343 * tabldefs.h: rename METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE to
7344 METHOD_ATTRIBUTE_STRICT to match the ECMA terminology.
7346 2009-01-10 Zoltan Varga <vargaz@gmail.com>
7348 * socket-io.c: Fix the build.
7350 * environment.c: Fix an #ifdef.
7352 2009-01-09 Zoltan Varga <vargaz@gmail.com>
7354 * threadpool.c (async_invoke_thread): Handle the wait function returning
7355 WAIT_IO_COMPLETION as well.
7356 (async_invoke_io_thread): Ditto.
7358 2009-01-09 Bill Holmes <billholmes54@gmail.com>
7360 * threads.c: Fixing the Windows build.
7362 Code is contributed under MIT/X11 license.
7364 2009-01-09 Zoltan Varga <vargaz@gmail.com>
7366 * threads.c (signal_thread_state_change): Call wapi_interrupt_thread () to
7368 (mono_thread_execute_interruption): Call wapi_clear_interruption () to enable
7369 the thread to wait again.
7371 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
7373 * metadata-verify.c: Initial skeleton of the metadata verifier.
7375 * pedump.c: Add support for the metadata verifier.
7377 * verify-internal.h: Export the whole assembly metadata verifier function.
7379 2009-01-09 Rodrigo Kumpera <rkumpera@novell.com>
7381 * gc.c (mono_gc_init): Fix the comments about deadlock on windows.
7383 2009-01-09 Zoltan Varga <vargaz@gmail.com>
7385 * Makefile.am: Upgrade dtrace-prelink.sh location.
7387 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
7389 * gc.c (mono_gc_init): Wait for finalizer thread to init on windows as
7390 well. Otherwise the shutdown deadlock that happens on unix will can happen
7392 If the main thread code finishes too fast it's possible that the finalizer
7393 thread won't have executed yet, won't record itself as the finalizer thread
7394 and the shutdown sequence will wait on it forever.
7396 2009-01-08 Rodrigo Kumpera <rkumpera@novell.com>
7398 * threads.c (mono_thread_current): Make THREAD_DEBUG work on windows
7401 2009-01-08 Miguel de Icaza <miguel@novell.com>
7403 * appdomain.c: Initialize the mono_strtod_mutex here, thanks to
7404 Robert Jordan for pointing this out.
7406 2009-01-08 Christian Prochnow <cproch@seculogix.de>
7409 * icall-def.h: added internal calls ves_icall_System_IO_DriveInfo_GetDiskFreeSpace,
7410 ves_icall_System_IO_DriveInfo_GetDriveType.
7412 2009-01-07 Miguel de Icaza <miguel@novell.com>
7414 * icall.c: Wrap calls to mono_strtod in CriticalSection
7415 invocations when using eglib, to work around #464316.
7417 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
7419 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Double check the
7420 return value of GetCurrentDirectory to never access unitialized memory.
7422 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
7424 * file-io.c (ves_icall_System_IO_MonoIO_GetCurrentDirectory): Properly check the
7425 return value of GetCurrentDirectory and expand the buffer if needed.
7429 2009-10-07 Tom Hindle <tom_hindle@sil.org>
7431 * marshal.c (GetIUnknownForObjectInternal, GetIUnknownForObjectInternal) :
7432 Adding a call to mono_init_com_types.
7434 Code is contributed under MIT/X11 license.
7436 2009-01-07 Geoff Norton <gnorton@novell.com>
7438 * socket-io.c: ioctlsocket(FIONREAD) returns the size of the UDP header as well on
7439 darwin. Use getsockopt SO_NREAD instead to get the right values for TCP and UDP.
7440 ai_canonname can be null in some cases on darwin, where the runtime assumes it will
7441 be the value of the ip buffer.
7443 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
7445 * verify.c (mono_class_interface_implements_interface): Verify parents as we can't rely on
7446 interfaces_packed here.
7448 Fixes part of #463294.
7450 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
7452 * verify.c (is_array_type_compatible): Ignore bounds and sizes when checking array compatibility.
7454 Fixes part of #463294.
7456 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
7458 * verify.c (stack_slot_is_complex_type_not_reference_type): Check if the type
7459 is a boxed complex as well.
7461 Fixes part of #463294.
7463 2009-01-06 Rodrigo Kumpera <rkumpera@novell.com>
7465 * reflection.c (mono_image_get_methodref_token): Add an extra create_typespec parameter to
7466 control if a methodspec should be created for the generic method definition from external assemblies.
7467 Caching of methodspec is done using the handleref hash table.
7471 2009-01-05 Rodrigo Kumpera <rkumpera@novell.com>
7473 * loader.c (find_method): When searching the interfaces of a class
7474 check the transitive closure of implemented interfaces.
7478 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
7480 * class.c (get_implicit_generic_array_interfaces): Improve debugging code.
7482 2009-01-03 Rodrigo Kumpera <rkumpera@novell.com>
7484 * class.c (get_implicit_generic_array_interfaces): Extract valuetype
7485 interfaces calculation to fill_valuetype_array_derived_types.
7487 * class.c (get_implicit_generic_array_interfaces): Valuetypes need IList /
7488 ICollection / IEnumerator interfaces for their extra twin type - sbyte for byte
7491 * class.c (get_implicit_generic_array_interfaces): InternalEnumerator gets
7492 interfaces for valuetypes if needed.
7494 * class.c (fill_valuetype_array_derived_types): Enums should have interfaces
7495 for their basetype as well. Types are array expanded if rank is > 0.
7499 2008-12-30 Bill Holmes <billholmes54@gmail.com>
7501 * socket-io.h : Changing the signature of
7502 ves_icall_System_Net_Sockets_Socket_Accept_internal to pass
7505 * icall-def.h : Changing the signature of
7506 System.Net.Sockets.Socket.Accept_internal to pass the blocking state.
7508 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Accept_internal) :
7509 For Windows only. Avoid blocking when calling accept by
7510 querying for a connection via select. The loop also queries
7511 the thread state every 1000 micro seconds for the thread
7512 stop state. This will avoid the process hanging on shutdown
7513 when using a TcpChannel that is never connected to.
7515 Code is contributed under MIT/X11 license.
7517 2008-12-30 Marek Safar <marek.safar@gmail.com>
7519 * tabledefs.h: Add METHOD_ATTRIBUTE_CHECK_ACCESS_ON_OVERRIDE.
7521 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
7523 * class.c (get_implicit_generic_array_interfaces): Extract common
7524 code to a helper function making it a lot easier on the eyes.
7526 2008-12-26 Rodrigo Kumpera <rkumpera@novell.com>
7528 * class.c (get_implicit_generic_array_interfaces): If the internal
7529 enumerator is an interface inflate System.Object instead of itself.
7533 2008-12-24 Rodrigo Kumpera <rkumpera@novell.com>
7535 * object.c (mono_runtime_invoke_array): Don't assert with
7536 byref nullable types.
7538 * marshal.c (mono_marshal_get_runtime_invoke): To handle
7539 byref nullables we unbox the object and store it on the
7541 We can't use the boxed object since it is the T of Nullable<T>
7542 and the boxed representation of a nullable it's underlying type
7544 We could cheat and create a boxed nullable and use the same
7545 machinery of other byref VTs but this feels like a hack and
7546 using the stack has the bonus of reducing heap pressure.
7550 2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
7552 * marshal.c (mono_marshal_emit_managed_wrapper): Handle char
7557 2008-12-19 Bill Holmes <billholmes54@gmail.com>
7559 * icall-def.h : Adding an internal call definition for
7560 System.Environment.internalBroadcastSettingChange.
7562 * icall.c : Adding a Windows only implementation to broadcast a
7563 WM_SETTINGCHANGE when an environment variable has changed.
7565 Code is contributed under MIT/X11 license.
7567 2008-12-19 Mark Probst <mark.probst@gmail.com>
7569 * class.c, class-internals.h: Made
7570 mono_class_has_parent_and_ignore_generics() non-static.
7572 Thu Dec 18 16:35:22 CET 2008 Paolo Molaro <lupus@ximian.com>
7574 * image.c: deal with the mmap failing when loading an image.
7576 2008-12-17 Geoff Norton <gnorton@novell.com>
7578 * threadpool.c: Ensure that the io_queue_lock is initialized
7579 in all circumstances, as we always attempt to cleanup against it.
7581 2008-12-17 Miguel de Icaza <miguel@novell.com>
7583 * icall.c (ves_icall_System_Environment_get_Platform): For
7584 compatibility reasons for existing client code we will keep
7585 returning 4 for a while.
7587 For how long will depend on the documentation being updated, and
7588 for us to give client code a chance to be updated.
7590 This reverts the original decison on #433108 since we did not
7591 catch roughly 33 instances of the broken code in our own source
7592 code base, we did not catch failures on the buildbots, and QA did
7593 not bring this as a problem.
7595 Only today I found some customer's code breaking due to our own
7596 class libraries not being fully updated and tracked it down to
7597 this change. I am reverting it because if we could not even get
7598 our story straight in our own code base, how can we hope that our
7599 end user code be fixed?
7601 As of this morning, our Wiki page that documents how to detect
7602 Unix had not been fixed.
7604 2008-12-16 Zoltan Varga <vargaz@gmail.com>
7606 * metadata.c (inflated_method_in_image): Add a workaround for #458168.
7608 * class.c (mono_class_get_fields): Handle loading errors.
7610 2008-12-12 Mark Mason <mmason@upwardaccess.com>
7612 * 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.
7614 2008-12-12 Gonzalo Paniagua Javier <gonzalo@novell.com>
7616 * mono-perfcounters.c: avoid warning.
7618 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
7620 * reflection.c (ensure_runtime_vtable): Work on generic instances and
7621 make sure all interfaces have MonoClass::interface_id set.
7623 * reflection.c (ensure_generic_class_runtime_vtable): Ensure the
7624 method table is property set.
7626 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
7628 * class.c: New function mono_class_setup_interface_id that setup
7629 MonoClass::interface_id if needed.
7631 * class-internals.h: Export new function.
7633 2008-12-12 Rodrigo Kumpera <rkumpera@novell.com>
7635 * class.c: Add code to sanity check the vtable after setup_vtable_general
7638 2008-12-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
7640 * icall.c: make Assembly.GetExecutingAssembly work properly when
7641 reflection is used to invoke the method.
7644 2008-12-11 Mark Probst <mark.probst@gmail.com>
7646 * metadata/generic-sharing.c: Look for constraints in all type
7647 arguments, not just the first one.
7649 2008-12-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
7651 * appdomain.c: return the correct CodeBase for an Assembly instance
7652 that was loaded from the shadow-copy directories.
7655 2008-12-10 Zoltan Varga <vargaz@gmail.com>
7657 * sgen-gc.c (build_nursery_fragments): Clear nursery_next/nursery_frag_real_end.
7659 * sgen-gc.c (check_object): New debugging helper function.
7661 * object.c: Fix calls to mono_value_copy_array ().
7663 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
7665 * class.c (mono_class_setup_fields): If working on an inflated class
7666 first check if the generic definition did init with success.
7670 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
7672 pedump.c (main): Fix a warning.
7674 2008-12-10 Bill Holmes <billholmes54@gmail.com>
7676 * object-internals.h : Adding a definition for
7677 MonoReflectionComVisibleAttribute.
7679 * marshal.c (cominterop_com_visible) : Method added to check the
7680 ComVisible attribute of a class.
7682 * marshal.c (cominterop_raise_hr_exception, cominterop_get_interface) :
7683 cominterop_raise_hr_exception added to consolidate common code
7684 to raise hr exceptions.
7686 * marshal.c (cominterop_can_support_dispatch) : Method added to determine
7687 if a managed class should support IDispatch.
7690 (cominterop_get_idispatch_for_objec, cominterop_ccw_queryinterfacet) :
7691 Added additional checks for managed object when getting
7692 an IDispatch interface.
7694 Code is contributed under MIT/X11 license.
7696 2008-12-10 Rodrigo Kumpera <rkumpera@novell.com>
7698 pedump.c (main): Handle mono_get_method () returning NULL.
7700 2008-12-09 Zoltan Varga <vargaz@gmail.com>
7702 * marshal.h: Fix a warning.
7704 2008-12-09 Bill Holmes <billholmes54@gmail.com>
7706 * marshal.c : Adding cominterop_release_all_rcws to release all
7707 runtime callable wrappers held by the runtime.
7709 * marshal.h : Adding declaration for cominterop_release_all_rcws.
7711 Code is contributed under MIT/X11 license.
7713 2008-12-09 Zoltan Varga <vargaz@gmail.com>
7715 * metadata.c (mono_image_alloc_lock): New helper function.
7716 (mono_image_alloc0_lock): Ditto.
7718 * metadata.c: Use the alloc_lock () helper functions for allocating
7719 memory from the image mempool.
7721 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
7723 * class.c (mono_class_from_generic_parameter): Document it's
7724 locking behavior. Fix double checked locking here, we stored in
7725 param->pklass a partially initialized MonoClass and no membar was used.
7727 2008-12-05 Marek Habersack <mhabersack@novell.com>
7729 * sysmath.c (ves_icall_System_Math_Round2): if round (3) and rint
7730 (3) functions are present in the C library use them to do the
7731 job. If they are absent, make sure that the sum of int_part and
7732 dec_part is rounded before returning. This is necessary due to the
7733 division of dec_part by the power of 10 before the final addition
7734 is performed - if the result is not rounded in some cases it will
7735 yield invalid results.
7737 2008-12-04 Zoltan Varga <vargaz@gmail.com>
7739 * marshal.c (mono_marshal_emit_native_wrapper): Add AOT support for pinvoke
7740 wrappers by emitting the function address using a CEE_MONO_ICALL_ADDR
7741 instruction instead of a pointer constant.
7743 2008-12-03 Zoltan Varga <vargaz@gmail.com>
7745 * loader.c (mono_method_get_header): Do most of the work outside the
7746 loader lock, to avoid assembly load hook deadlocks.
7748 * metadata.c (mono_metadata_parse_mh_full): Use finer-grained locking.
7749 (mono_metadata_parse_type_full): Ditto.
7751 2008-12-02 Rodrigo Kumpera <rkumpera@novell.com>
7753 * mempool.c (mono_backtrace): Take the number of allocated bytes as argument.
7754 Make the stack depth fixed. Ensure proper argument passing to the backtrace
7755 funtions. Finally, use a lock to produce well ordered output.
7757 The lock looks silly, as all calls to the corlib mempool should be guarded
7758 with the loader lock, but for some reason this fact doesn't help.
7760 * mempool.c (mono_mempool_alloc0): Add support for TRACE_ALLOCATIONS.
7762 2008-12-02 Mark Probst <mark.probst@gmail.com>
7764 * socket-io.c: 64 bit big-endian fixes.
7766 2008-12-01 Rodrigo Kumpera <rkumpera@novell.com>
7768 * verify.c (is_compatible_boxed_valuetype): Rewrite function to work properly with
7769 targets that require strict compatibility between the types.
7771 * verify.c (verify_stack_type_compatibility_full): Boxed values are not compatible
7772 to unboxed types. All cases that this is true are checked by is_compatible_boxed_valuetype.
7773 Kill the strict argument and create a new one valuetype_must_be_boxed.
7775 * verify.c (verify_delegate_compatibility): Use verify_stack_type_compatibility_full to
7776 state that all valuetypes must be boxed.
7780 2008-11-29 Kornél Pál <kornelpal@gmail.com>
7782 * coree.c (MonoFixupExe): Use sizeof(IMAGE_BASE_RELOCATION) instead of
7783 IMAGE_SIZEOF_BASE_RELOCATION as newer Vista SDKs no longer define the latter.
7785 Contributed under MIT/X11 license.
7787 2008-11-28 Rodrigo Kumpera <rkumpera@novell.com>
7789 * class.c (mono_class_setup_fields): Don't copy MonoType::attrs as
7790 the inflate_generic_type machinery should handle it.
7792 This avoids a crash when the field's flags is zero and it's type is
7794 What happens is that mono_metadata_parse_type_full will see that opt_attrs
7795 is zero and will return one of the cached built-in primitive types. Since
7796 those types live in read-only memory, the code that copies it crashes.
7798 2008-11-28 Mark Probst <mark.probst@gmail.com>
7800 * object.c: Don't put function descriptors into generalized IMT
7803 2008-11-28 Mark Probst <mark.probst@gmail.com>
7805 * class.c: Enable generic code sharing on PPC64.
7807 2008-11-27 Mark Probst <mark.probst@gmail.com>
7809 * mempool.c, mempool-internals.h: Added g_slist_append_mempool()
7812 * generic-sharing.c: Allocate the method template slists from the
7813 image mempool so it doesn't leak.
7815 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
7817 * class.c (generic_array_methods): Release the linked list.
7819 2008-11-27 Mark Probst <mark.probst@gmail.com>
7821 * marshal.c (mono_string_builder_to_utf8): Fixed a wrong
7822 invocation to g_utf16_to_utf8().
7824 2008-11-26 Mark Probst <mark.probst@gmail.com>
7826 * icall.c (mono_ArgIterator_IntGetNextArg): Handle sub-word sized
7827 arguments on big endian archs.
7829 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
7831 * reflection.c: (_mono_reflection_parse_type) skip leading spaces in
7832 the type name (test added in corlib).
7834 2008-11-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
7836 * pedump.c: initialize perf. counters. Fixes a segv.
7838 2008-11-25 Martin Baulig <martin@ximian.com>
7840 * mono-debug-debugger.c
7841 (mono_debugger_runtime_invoke): Return the exception object if an
7842 exception was thrown. Visual Studio displays the exception object
7843 in the locals window.
7845 2008-11-24 Mark Probst <mark.probst@gmail.com>
7847 * mini-trampolines.c (mono_delegate_trampoline): Don't return a
7850 2008-11-24 Mark Probst <mark.probst@gmail.com>
7852 * marshal.c (mono_type_native_stack_size): MONO_TYPE_I and
7853 MONO_TYPE_U are sizeof (gpointer), too.
7855 2008-11-24 Mark Probst <mark.probst@gmail.com>
7857 * marshal.c (mono_type_native_stack_size): Fixed size and
7858 alignment for reference types.
7860 2008-11-23 Mark Probst <mark.probst@gmail.com>
7862 * class.c (mono_class_generic_sharing_enabled): Disable generic
7863 code sharing for PPC64.
7865 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
7867 * icall.c (mono_method_get_equivalent_method): Make sure
7868 method->klass->methods is inited before looping over it.
7870 2008-11-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
7872 * object.c: when calling ExecuteAssembly in a newly created domain,
7873 the configuration file and application base are already set up.
7874 Bug #446353 take 2 fixed.
7876 2008-11-20 Zoltan Varga <vargaz@gmail.com>
7878 * marshal.c: Add support for MONO_TYPE_GENERICINST to some functions.
7879 Fixes #444715. Fix a warning.
7881 2008-11-18 Gonzalo Paniagua Javier <gonzalo@novell.com>
7883 * appdomain.c: write the full path of the assembly to the .ini file
7884 created when "shadow-copying"
7887 2008-11-18 Zoltan Varga <vargaz@gmail.com>
7889 * debug-helpers.c (mono_method_full_name): Stringify wrapper types even
7890 if signature==FALSE.
7892 2008-11-17 Bill Holmes <billholmes54@gmail.com>
7894 * marshal.h : Fix the cygwin build.
7895 marshal.c:12442: undefined reference to `_IID_IMarshal'
7897 Code is contributed under MIT/X11 license.
7899 2008-11-17 Bill Holmes <billholmes54@gmail.com>
7901 * marshal.h : cominterop_ccw_getfreethreadedmarshaler added to return the
7902 free threaded marshaler when QueryInterface is called on a COM callable
7903 wrapper requesting the IMarshal interface.
7905 Code is contributed under MIT/X11 license.
7907 2008-11-14 Zoltan Varga <vargaz@gmail.com>
7909 * domain-internals.h (MonoDomain): Update MONO_DOMAIN_LAST_GC_TRACKED.
7911 * reflection.c (mono_type_get_object): Special case the very common
7914 * domain-internals.h (struct _MonoDomain): Add 'typeof_void' field to
7917 2008-11-13 Bill Holmes <billholmes54@gmail.com>
7919 * process.h : Adding method declaration for
7920 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
7922 * process.c : Adding implementation for
7923 ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
7925 * icall-def.h : Registering ICALL Processs.WaitForInputIdle_internal
7926 to ves_icall_System_Diagnostics_Process_WaitForInputIdle_internal.
7928 Code is contributed under MIT/X11 license.
7930 2008-11-10 Rodrigo Kumpera <rkumpera@novell.com>
7932 * appdomain.c (unload_thread_main): Clean up threadpool by
7933 calling mono_thread_pool_remove_domain_jobs.
7935 * domain-internals.h (struct _MonoDomain): Add new fields to
7936 help coordinate the cleanup of the threadpool.
7938 * threadpool.c (mono_thread_pool_remove_domain_jobs): New fuction
7939 that cleans up the threadpool of all jobs associated with an appdomain.
7940 It does that by cleaning up the queues and making sure all active
7941 threads are accounted.
7943 * threadpool.c (async_invoke_io_thread): Ignore job if its domain is
7944 unloaded or in the process of. Take this is such way that there is
7945 no race condition between another thread starting the unload and the
7946 current thread acknowledging it.
7948 * threadpool.c (async_invoke_thread): Same.
7950 * threadpool.c (start_io_thread_or_queue): Increment threadpool_jobs before
7951 firing the new thread.
7953 * threadpool.c (start_tpthread): Same.
7955 * theadpool.c (append_job): Increment threadpool_jobs before queueing.
7957 * threadpool.h: Add mono_thread_pool_remove_domain_jobs.
7959 2008-11-06 Jonathan Chambers <joncham@gmail.com>
7961 * file-io.c (ves_icall_System_IO_MonoIO_DuplicateHandle):
7962 Add support for DuplicateHandle.
7964 * file-io.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
7965 Add support for DuplicateHandle.
7967 * icall-def.h (ves_icall_System_IO_MonoIO_DuplicateHandle):
7968 Add support for DuplicateHandle.
7970 Code is contributed under MIT/X11 license.
7972 2008-11-06 Mark Probst <mark.probst@gmail.com>
7974 * class-internals.h: Make min_align into a whole byte.
7976 * class.c: Set min_align for SIMD types to 16.
7978 2008-11-05 Geoff Norton <gnorton@novell.com>
7980 * attach.c: Default the attacher to enabled for all cases including
7983 Wed Nov 5 16:33:41 CET 2008 Paolo Molaro <lupus@ximian.com>
7985 * monitor.c, class-internals.h, wrapper-types.h: revert incorrect
7988 2008-11-04 Mark Probst <mark.probst@gmail.com>
7990 * monitor.c, monitor.h: New function for querying offsets of
7991 members of MonoThreadsSync.
7993 2008-11-04 Zoltan Varga <vargaz@gmail.com>
7995 * marshal.c (mono_marshal_get_runtime_invoke): Use runtime_invoke_direct_cache
7996 to speed up this function and to avoid the boundless memory growth caused by
7997 the signature_dup () calls.
7999 2008-11-02 Zoltan Varga <vargaz@gmail.com>
8001 * monitor.c (mono_monitor_get_fast_enter_method): Add a proper type for the
8004 * class-internals.h (struct _MonoMethod): Increase the size of 'wrapper_type'
8007 * wrapper-types.h: Add MONO_WRAPPER_MONITOR_FAST_ENTER/EXIT.
8009 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
8012 * domain-internals.h: made mono_set_private_bin_path_from_config()
8014 * object.c: call the above function after setting the configuration
8015 file path for the root domain.
8018 2008-10-31 Gonzalo Paniagua Javier <gonzalo@novell.com>
8020 * assembly.c: when the assembly is loaded from an absolute path, end
8021 basedir with a directory separator.
8024 2008-10-30 Mark Probst <mark.probst@gmail.com>
8026 * monitor.c (mono_monitor_get_fast_enter_method): If
8027 CompareExchange is not available, don't create the fastpath
8028 instead of asserting. (The method is missing in the 1.1 profile.)
8030 2008-10-30 Mark Probst <mark.probst@gmail.com>
8032 * marshal.c, marshal.h: Rename signature_no_pinvoke() and make it non-static.
8034 * monitor.c, monitor.h: Code for generating Monitor.Enter and
8035 Monitor.Exit IL fastpaths.
8037 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
8039 * class.c (mono_class_create_from_typedef): Added Vector2ul.
8041 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
8043 * class.c (mono_class_create_from_typedef): Added Vector2l.
8045 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
8047 * class.c (mono_class_create_from_typedef): Added Vector2d.
8049 2008-10-27 Gonzalo Paniagua Javier <gonzalo@novell.com>
8051 * appdomain.c: translate \ into / for cache_path.
8052 * domain-internals.h: new mono_is_shadow_copy_enabled().
8053 * icall.c: (fill_reflection_assembly_name) do the same path
8054 manipulations that get_code_base does.
8055 (get_code_base) use mono_is_shadow_copy_enabled.
8057 2008-10-26 Gonzalo Paniagua Javier <gonzalo@novell.com>
8059 * appdomain.c: shadow-copied assemblies go to CachePath +
8060 ApplicationName when both are set. DynamicBase has nothing to do with
8064 2008-10-26 Zoltan Varga <vargaz@gmail.com>
8066 * reflection.c (encode_locals): Use a cache to avoid duplicate entries in the
8067 STANDALONESIG table.
8069 * metadata-internals.h (struct _MonoDynamicImage): Add cache for
8070 standalone signatures.
8072 * marshal.c (mono_marshal_get_runtime_invoke): Rewrite the signature
8073 comparison code: instead of comparing the signatures using a custom
8074 equals function, transform them to a common signature and compare that. This
8075 works better with AOT.
8077 2008-10-25 Zoltan Varga <vargaz@gmail.com>
8079 * Reapply r116521 with (!mono_debug_using_mono_debugger ()) checks.
8081 * class.c (mono_class_init): Remove unneccesary mono_class_setup_properties ()
8082 call for generic instances.
8083 (mono_class_setup_properties): Call setup_properties () before accessing
8086 * class.c (mono_class_get_virtual_methods): New helper function to iterate
8087 over the virtual methods of a class using metadata if possible, avoiding the
8088 creation of MonoMethod's for non-virtual methods.
8090 * class.c (mono_class_setup_vtable_general): Rewrite this to use
8091 get_virtual_methods () to iterate over the virtual methods of classes.
8093 2008-10-25 Martin Baulig <martin@ximian.com>
8095 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_DEAD): New #define.
8097 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
8099 * class.c (mono_class_create_from_typedef): Added Vector4i.
8101 2008-10-24 Mark Probst <mark.probst@gmail.com>
8103 * marshal.c (mono_marshal_get_synchronized_wrapper): Emit
8104 ldtoken+GetTypeFromHandle instead of i4+icall so that the JIT
8105 special-casing applies to eliminate the call completely.
8107 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
8109 * class.c (mono_class_create_from_typedef): Added Vector8s.
8111 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
8113 * class.c (mono_class_create_from_typedef): Added Vector16sb.
8115 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
8117 * icall.c: get rid of annoying warning.
8119 2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
8121 * threadpool.c: in 1.x, if you change the background status of the
8122 threadpool thread, it's not reset.
8123 Remove unnecessary calls to SetState.
8125 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
8127 * threadpool.c: asynchronously create a set of idle threads upon first
8128 use of the threadpool. SetMinThreads will now start the appropriate
8129 number of idle threads if they are not already running. The default is
8130 1 threadpool thread per CPU. Increased the maximum number of threads
8133 2008-10-22 Martin Baulig <martin@ximian.com>
8135 Revert r116521 from Zoltan, it breaks the debugger:
8137 * class.c (mono_class_get_virtual_methods): New helper function to iterate
8138 over the virtual methods of a class using metadata if possible, avoiding the
8139 creation of MonoMethod's for non-virtual methods.
8141 * class.c (mono_class_setup_vtable_general): Rewrite this to use
8142 get_virtual_methods () to iterate over the virtual methods of classes.
8144 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
8146 * threads.c: when creating a threadpool thread, set its state to
8148 * threadpool.c: reset the background state of a threadpool thread
8149 after finishing each work item
8152 2008-10-22 Zoltan Varga <vargaz@gmail.com>
8154 * class.c (mono_class_get_vtable_entry): Add an optimization for szarrays.
8156 * class.c (mono_class_setup_vtable_general): Add an optimized version for
8157 generic instances which works by inflating the methods in the container
8160 * class.c (mono_class_inflate_generic_type_with_mempool_no_copy): New
8161 variant which doesn't make a copy if no inflation was done.
8162 (mono_class_setup_fields): Use it.
8164 * metadata.c (mono_metadata_get_shared_type): New helper function to
8165 return a shared instance of a given MonoType.
8167 * class.c (mono_class_inflate_generic_type_with_mempool): Avoid making
8168 a copy of most non-generic types.
8170 Wed Oct 22 18:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
8172 * threadpool.c: remove one more GetSystemInfo () call.
8174 Wed Oct 22 17:45:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
8176 * mono-perfcounters.c, icall-def.h, environment.c, environment.h:
8177 use the code in mono-proclib.h to get processor information.
8179 2008-10-22 Gonzalo Paniagua Javier <gonzalo@novell.com>
8181 * appdomain.c: fixed the logic that determines whether assemblies in a
8182 directory are "shadow-copied" or not. Bug #433483 fixed.
8184 2008-10-22 Zoltan Varga <vargaz@gmail.com>
8186 * process.c (ves_icall_System_Diagnostics_Process_GetProcessData): Fix a
8189 2008-10-21 Zoltan Varga <vargaz@gmail.com>
8191 * marshal.c (runtime_invoke_signature_equal): Don't shared wrappers
8194 * class.c debug-helpers.c object.c class-internals.h marshal.c icall.c
8195 reflection.c: Use mono_field_get_name () for accessing a field's name.
8197 * class-internals.h (MONO_CLASS_HAS_STATIC_METADATA): Move this here from
8200 * class.c (mono_field_get_rva): Fix crash if this is called on a dynamic
8203 * loader.c (find_method_in_class): Reenable the metadata optimization by
8204 not using it for generic instances.
8206 * class-internals.h (MonoFieldDefaultValue): Extract the rarely used
8207 data/def_type fields from MonoClassField into a separate structure.
8208 (struct MonoClassField): Remove data/def_type fields.
8209 (struct _MonoClass): Add a 'field_def_values' array to store the default
8210 values/RVA for fields.
8212 * class.c reflection.c: Update after the changes.
8214 * object.c (mono_class_create_runtime_vtable): Use mono_field_get_data ()
8215 for accessing field->data.
8217 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_InitializeArray): Ditto.
8219 * loader.c (find_method_in_class): Revert the last change for now as
8220 it breaks Mono.C5 unit tests.
8222 * class-internals.h (struct _MonoDynamicGenericClass): Add fields
8223 'field_generic_types' and 'field_objects' which contain the information
8224 previously stored in MonoInflatedField.
8225 (MonoInflatedField): Delete.
8226 (struct _MonoClassField): Delete 'generic_info' field.
8228 * reflection.c: Store the information which was previously in
8229 field->generic_info in MonoDynamicGenericClass instead.
8231 * metadata.c (free_generic_class): Update after MonoDynamicGenericClass/
8232 MonoClassField changes.
8234 Tue Oct 21 17:07:55 CEST 2008 Paolo Molaro <lupus@ximian.com>
8236 * marshal.c, method-builder.c: get rid of wrapper_hash and instead
8237 store the value inside the data array of the MonoMethodWrapper.
8238 This saves memory, is faster and fixes the lifetime issues (methods
8239 were never removed from the hash previously). May also fix bug#436996.
8241 2008-10-21 Zoltan Varga <vargaz@gmail.com>
8243 * reflection.c (mono_image_get_fieldref_token): For fields of non-dynamic
8244 generic instances, compute the type from the generic definition instead of
8245 looking in field->generic_info.
8247 * class.c (mono_class_setup_fields): Don't create a MonoInflatedField
8248 for inflated fields, the only user was get_fieldref_token () which no
8251 * class.c (mono_class_init): Revert the last change as it seems to cause
8254 * class-internals.h (struct _MonoClassField): Reorder fields to save 4
8255 bytes on 64 bit platforms.
8257 * object.c (mono_class_create_runtime_vtable): Fix a warning.
8259 * object.c (mono_class_create_runtime_vtable): Don't initalize
8260 field->data/field->def_type here, it is done lazily by
8261 mono_class_get_field_default_value ().
8263 * icall.c (ves_icall_get_enum_info): Call
8264 mono_class_get_field_default_value () instead of directly accessing
8265 field->data and field->def_type.
8267 * object.c (get_default_field_value): Ditto.
8269 * class.c (mono_field_get_data): Ditto.
8271 * class.c (mono_class_init): Remove unneccesary mono_class_setup_methods ()
8272 call for generic instances.
8274 * loader.c (find_method_in_class): If klass != from_class, then inflate
8275 the method with the context of from_class, since the caller assumes this.
8277 2008-10-20 Zoltan Varga <vargaz@gmail.com>
8279 * class.c (mono_method_get_vtable_index): Use mono_method_get_vtable_slot ()
8280 for accessing method->slot.
8282 2008-10-20 Cedric Vivier <cedricv@neonux.com>
8284 * icall-def.h, icall.c: Add icall for Debugger.IsAttached.
8286 2008-10-19 Zoltan Varga <vargaz@gmail.com>
8288 * class.c (mono_method_get_vtable_index): Use
8289 mono_method_get_vtable_slot () for accessing method->slot.
8291 * object.c (build_imt_slots): Use mono_class_get_method_by_index () for
8292 accessing klass->methods.
8294 * class.c (mono_method_get_vtable_slot): New helper function.
8295 (mono_class_get_vtable_entry): Ditto.
8296 (mono_class_setup_vtable_general): Use mono_method_get_vtable_slot () for
8297 accessing method->slot.
8299 * generic-sharing.c (mono_class_get_method_generic): Pass the declaring
8300 method to get_inflated_method ().
8302 * class.c (mono_class_get_inflated_method): New helper method to obtain
8303 a method of an inflated class without calling setup_methods ().
8304 (mono_class_get_cctor): Use get_inflated_method.
8306 * generic-sharing.c (mono_class_get_method_generic): Ditto.
8308 * marshal.c image.c: Lazily create all the marshal caches.
8310 * image.c (mono_image_init): Move initialization of runtime_invoke
8311 caches to marshal.c.
8313 * marshal.c (get_cache): New helper function to lazily initialize a
8315 (mono_marshal_get_runtime_invoke): Share more runtime invoke wrappers.
8317 * debug-helpers.c (mono_method_full_name): Include generic arguments.
8319 Fri Oct 17 10:51:32 CEST 2008 Paolo Molaro <lupus@ximian.com>
8321 * loader.c: fixed check for interface type.
8323 Thu Oct 16 20:59:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
8325 * appdomain.c: check for NULL setup before it's referenced.
8328 Thu Oct 16 16:12:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
8330 * class.c: remove the unused old vtable setup code.
8332 Thu Oct 16 12:53:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
8334 * class.c: don't depend on interface order in
8335 setup_interface_offsets (bug #435777).
8336 * reflection.c: sort the InterfaceImpl table (patch from
8337 Jb Evain <jbevain@novell.com>).
8339 2008-10-13 Zoltan Varga <vargaz@gmail.com>
8341 * assembly.c (mono_assembly_open_full): Avoid loading images while holding
8342 the low level assemblies lock.
8344 Mon Oct 13 16:35:26 CEST 2008 Paolo Molaro <lupus@ximian.com>
8346 * domain-internals.h, domain.c, icall.c, image.c, marshal.c,
8347 object.c, reflection.c, socket-io.c, threads.c: introduced
8348 mono_framework_version () to return the major framewrok version,
8349 changed the code that was using more complex patterns to use it.
8350 Return the correct value for PlatformID for OSX.
8352 Mon Oct 13 14:38:01 CEST 2008 Paolo Molaro <lupus@ximian.com>
8354 * icall-def.h, process.h, process.c: added an icall to get info about
8355 processes using mono-proclib.
8357 Mon Oct 13 11:14:44 CEST 2008 Paolo Molaro <lupus@ximian.com>
8359 * mono-perfcounters.c: use the mono-proclib functions to
8360 access process information.
8362 Mon Oct 13 11:00:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
8364 * domain.c, assembly.c, debug-mono-symfile.c, debug-mono-symfile.h,
8365 monosn.c, Makefile.am, pedump.c, image.c, metadata-internals.h,
8366 reflection.c: remove rawbuffer usage: mmap support is more sanely
8367 provided by utils/mono-mmap.
8369 Sat Oct 11 19:46:19 CEST 2008 Paolo Molaro <lupus@ximian.com>
8371 * gc.c: use posix semaphores when possible so that
8372 mono_gc_finalize_notify() is signal safe.
8374 2008-10-11 Zoltan Varga <vargaz@gmail.com>
8376 * reflection.c: Implement DISABLE_REFLECTION_EMIT, remove some
8377 #ifdef DISABLE_REFLECTION_SAVE stuff, only the exported functions need to
8378 be #ifdef-ed out, the linker will remove the rest.
8380 * marshal.c: Implement DISABLE_COM.
8382 * reflection.c: Implement DISABLE_REFLECTION_EMIT_SAVE.
8384 2008-10-11 Miguel de Icaza <miguel@novell.com>
8386 * locales.c (string_invariant_compare_char): Optimization: do not
8387 call g_unichar_type unless we actually need the information.
8389 2008-10-10 Mark Probst <mark.probst@gmail.com>
8391 * object.c, class-internals.h: Also create remoting trampolines
8392 for generic methods. Pass the domain to the remoting trampoline
8393 creation function, too.
8395 2008-10-10 Zoltan Varga <vargaz@gmail.com>
8397 * class.c (mono_class_init): Fix+re-enable the finalize optimization.
8399 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
8401 * class.c (mono_class_create_from_typedef): Vector4u was renamed to
8404 2008-10-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
8407 * locales.c: remove the use of g_strdown. Fixes bug #322313.
8409 Fri Oct 10 17:01:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
8411 * assembly.c: in mono_assembly_load_friends() take the assemblies lock
8412 for the least possible amount of time (extending the fix in r113458).
8414 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
8416 * class.c (mono_class_create_from_typedef): Retrofit to new type names.
8418 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
8420 * class.c (mono_class_create_from_typedef): Added Vector8u and Vector16u
8421 as possible simd intrinsic types.
8422 Optimized the test to check for the common prefix first.
8424 Thu Oct 9 17:38:24 CEST 2008 Paolo Molaro <lupus@ximian.com>
8426 * class.c: back out part of a broken optimization committed on
8427 May 23th (bug #433908).
8429 2008-10-09 Mark Probst <mark.probst@gmail.com>
8431 * profiler.c (simple_shutdown): Don't call mono_thread_attach() on
8432 Win32. Should fix #432388 for most cases until we have the new
8435 2008-10-08 Zoltan Varga <vargaz@gmail.com>
8437 * metadata.c (mono_metadata_generic_context_hash): Call generic_inst_hash
8438 instead of using inst->id so the hash is stable for AOT.
8440 2008-10-07 Gonzalo Paniagua Javier <gonzalo@novell.com>
8443 * icall.c: create a .ini file for shadow-copied assemblies that
8444 contains the location of the original assembly. Use this to return the
8445 proper CodeBase for shadow-copied assemblies. Fixes bug #323606.
8446 Also fix the number of '/' for windows when returning the CodeBase.
8449 2008-10-07 Bill Holmes <billholmes54@gmail.com>
8451 * marshal.c (cominterop_get_ccw) : Fixing a copy paste error from r115126.
8453 Code is contributed under MIT/X11 license.
8455 2008-10-07 Bill Holmes <billholmes54@gmail.com>
8457 * marshal.c (cominterop_get_native_wrapper) : Adding a call to mono_class_setup_vtable
8458 if if the class vtable needs initialized.
8460 Code is contributed under MIT/X11 license.
8462 2008-10-07 Bill Holmes <billholmes54@gmail.com>
8464 * marshal.c (cominterop_get_native_wrapper_adjusted, cominterop_get_ccw) :
8465 Adding default MonoMarshalSpecs for COM methods. OBJECT->STRUCT,
8466 STRING->BSTR, and CLASS->INTERFACE.
8468 Code is contributed under MIT/X11 license.
8470 2008-10-07 Marek Habersack <mhabersack@novell.com>
8472 * sysmath.h: changed the declaration of the
8473 ves_icall_System_Math_Round2 icall by adding an extra
8474 away_from_zero parameter.
8476 * sysmath.c (ves_icall_System_Math_Round2): added support for
8477 away from zero rounding. The icall now takes an extra boolean
8478 parameter to signal that away from zero operation is requested.
8480 2008-10-06 Zoltan Varga <vargaz@gmail.com>
8482 * marshal.c (mono_marshal_get_delegate_begin_invoke): Put the wrapper in
8483 the delegate klass so it can work with full-aot.
8484 (mono_marshal_get_delegate_end_invoke): Ditto.
8485 (mono_marshal_get_delegate_invoke): Ditto.
8487 Mon Oct 6 16:10:02 CEST 2008 Paolo Molaro <lupus@ximian.com>
8489 * gc.c, attach.h, attach.c: remove a bad pattern:
8490 add_finalizer_callback () is not implemented correctly, it can't
8491 without adding more overhead to the finalizer loop and it's not
8492 even needed, since we know exactly what we need to call, so there is
8493 no need to do so through an expensive function pointer.
8495 2008-10-04 Zoltan Varga <vargaz@gmail.com>
8497 * gc.c: Define a dummy version of mono_gc_add_finalizer_thread_callback ()
8499 * attach.c (mono_attach_init): Remove the #ifdef.
8501 2008-10-04 Andreas Färber <andreas.faerber@web.de>
8503 * attach.c (mono_attach_init): Don't use
8504 mono_gc_add_finalizer_thread_callback when compiling without GC.
8507 Code is contributed under MIT/X11 license.
8509 2008-10-03 Zoltan Varga <vargaz@gmail.com>
8511 * class.c (mono_class_create_from_typedef): Remove the
8512 #ifndef DISABLE_SIMD stuff.
8514 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
8516 * class-internals.h (MonoClass): Added simd_type bit field.
8518 * class.c (mono_class_create_from_typedef): Check if type is a simd
8521 2008-10-03 Mark Probst <mark.probst@gmail.com>
8523 * object.c (mono_method_add_generic_virtual_invocation): Only add
8524 instantiations to the thunk whose count is at least as large as
8527 2008-10-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
8529 * icall.c: changed the Type of the exception thrown when trying to
8530 invoke a constructor on an abstract class. Part of the fix for bug
8533 2008-10-02 Mark Probst <mark.probst@gmail.com>
8535 * class.c, class-internals.h (mono_method_get_vtable_index): New
8536 function which returns the index into the vtable and properly
8537 handles inflated virtual generic methods.
8539 2008-10-01 Mark Probst <mark.probst@gmail.com>
8541 * object.c, domain.c, object-internals.h, domain-internals.h:
8542 Generalize IMT thunk machinery to also handle thunks for virtual
8543 generic method invokes. When a virtual generic method is invoked
8544 more than a number of times we insert it into the thunk so that it
8545 can be called without lookup in unmanaged code.
8547 * generic-sharing.c, class-internals.h: Fetching a
8548 MonoGenericInst* for a method from an (M)RGCTX.
8550 2008-10-01 Zoltan Varga <vargaz@gmail.com>
8552 * marshal.c (emit_marshal_string): Applied a variant of a patch by
8553 tom hindle <tom_hindle@sil.org>. Fix byref native-to-managed string
8554 marshalling. Fixes #431304.
8556 2008-10-01 Bill Holmes <billholmes54@gmail.com>
8558 * marshal.c (emit_marshal_variant) : Change the attribute checks to
8559 handle when ref is specified without In or Out.
8561 Code is contributed under MIT/X11 license.
8563 2008-09-30 Mark Probst <mark.probst@gmail.com>
8565 * loader.c (mono_get_method_constrained): Don't expand method with
8566 the class's context, because it's already a method of that class.
8568 2008-09-30 Atsushi Enomoto <atsushi@ximian.com>
8570 * attach.c : should be correct build fix.
8572 2008-09-29 Zoltan Varga <vargaz@gmail.com>
8574 * attach.c: Fix the previous change.
8576 2008-09-29 Atsushi Enomoto <atsushi@ximian.com>
8578 * attach.c : quick w32 build fix.
8580 2008-09-27 Miguel de Icaza <miguel@novell.com>
8582 * Turn off MONO_GENERIC_SHARING=all and go back to corlib as it
8583 crashes MonoDevelop: #430455.
8585 2008-09-27 Zoltan Varga <vargaz@gmail.com>
8587 * domain-internals.h (struct _MonoDomain): Move most fields used only by
8588 the JIT do MonoJitDomainInfo in ../mini/mini.h.
8590 * domain.c: Remove initialization/cleanup of the removed fields.
8592 2008-09-27 Mark Probst <mark.probst@gmail.com>
8594 * class.c (mono_class_generic_sharing_enabled): Enable generic
8595 code sharing for PPC.
8597 2008-09-26 Bill Holmes <billholmes54@gmail.com>
8599 * attach.c : Fixing the Windows builds.
8601 Code is contributed under MIT/X11 license.
8603 2008-09-25 Zoltan Varga <vargaz@gmail.com>
8605 * class.c (mono_class_generic_sharing_enabled): Experimentally change
8606 the default generic sharing mode to 'all'.
8608 2008-09-25 Mark Probst <mark.probst@gmail.com>
8610 * generic-sharing.c, class-internals.h: New function for checking
8611 whether a method needs a static RGCTX invoke wrapper. A few
8612 funtions moved from mini/generic-sharing.c.
8614 * icall.c: New function used.
8616 2008-09-25 Mark Probst <mark.probst@gmail.com>
8618 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
8619 Static RGCTX invoke wrapping applies to value type methods, too.
8621 * class.c (mono_class_setup_vtable_general): In generic-shared
8622 value types, wrap methods with a static RGCTX invoke wrapper.
8624 2008-09-25 Zoltan Varga <vargaz@gmail.com>
8626 * attach.c (ipc_connect): Use AF_UNIX instead of AF_FILE to fix the
8629 2008-09-24 Zoltan Varga <vargaz@gmail.com>
8631 * gc.c (mono_gc_add_finalizer_thread_callback): New function to
8632 register a callback which is called when the finalizer thread is woken
8634 (finalizer_thread): Call the callback if it exists.
8636 * attach.h attach.c: New files, implementing the attach mechanism.
8638 * appdomain.c: Init/cleanup the attach mechanism on startup/shutdown.
8640 * object.c (mono_object_get_virtual_method): Fix an assertion introduced
8641 by the previous change.
8643 Tue Sep 23 15:24:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
8645 * class.c, domain-internals.h, domain.c, generic-sharing.c, image.c,
8646 loader.c, marshal.c, metadata-internals.h, metadata.c,
8647 method-builder.c, object.c, reflection.c: introduced specific functions
8648 to allocate from the domain and image mempools and cleaned up most of
8649 the code to use them (still missing a few in reflection.c).
8650 Keep the loader bytes counter updated.
8652 Mon Sep 22 17:33:12 CEST 2008 Paolo Molaro <lupus@ximian.com>
8654 * domain.c, monitor.c, boehm-gc.c, gc.c: update some of the GC and
8655 loader-related counters.
8657 Mon Sep 22 17:29:54 CEST 2008 Paolo Molaro <lupus@ximian.com>
8659 * mono-perfcounters-def.h, mono-perfcounters.c, class-internals.h:
8660 added more MS-compatible counters.
8662 2008-09-22 Zoltan Varga <vargaz@gmail.com>
8664 * class.c (mono_class_setup_fields): Call setup_fields before accessing
8665 class->blittable. Fixes #428217.
8667 2008-09-21 Zoltan Varga <vargaz@gmail.com>
8669 * reflection.c (mono_image_get_field_on_inst_token): Call
8670 field_encode_signature () since that handles custom modifiers too.
8673 2008-09-20 Zoltan Varga <vargaz@gmail.com>
8675 * reflection.c (add_custom_modifiers): New helper function to merge custom
8676 modifiers stored in objects to a MonoType.
8677 (fieldref_encode_signature): Encode custom modifiers.
8678 (mono_image_get_generic_field_token): Call add_custom_modifiers ().
8679 (fieldbuilder_to_mono_class_field): Ditto. Fixes #424663.
8681 2008-09-19 Kornél Pál <kornelpal@gmail.com>
8683 * coree.c (_CorValidateImage): Some 64-bit IL only images have entry point
8684 calling _CorDllMain imported from mscoree.dll. Set entry point RVA to 0 for
8685 64-bit IL only images because imports are not resolved for IL only images.
8686 Special thanks to Bill Holmes for finding this bug and testing the patch.
8687 Also fail for 64-bit images marked as CLI_FLAGS_32BITREQUIRED.
8689 Contributed under MIT/X11 license.
8691 2008-09-19 Miguel de Icaza <miguel@novell.com>
8693 * mono-config.c (dllmap_start): Add support for the bits keyword
8694 on dllentry and dllmap to easily detect 32 vs 64 bit systems.
8696 2008-09-19 Mark Probst <mark.probst@gmail.com>
8698 * reflection.c (inflate_mono_method): When the class the method is
8699 to be inflated for is itself not inflated, just return the method.
8701 Fri Sep 19 11:51:36 CEST 2008 Paolo Molaro <lupus@ximian.com>
8703 * mono-perfcounters.c: use more user friendly process instance names.
8705 2008-09-18 Bill Holmes <billholmes54@gmail.com>
8707 * marshal.c (emit_marshal_variant) : Change the attribute checks to
8708 handle "[in] ref" and "[in][out] ref" cases.
8710 * marshal.c (cominterop_get_ccw) : The wrong signature was being passed
8711 to mono_mb_create_method. This was causing problems calling native to
8712 managed passing Variants by value.
8714 Code is contributed under MIT/X11 license.
8716 2008-09-18 Zoltan Varga <vargaz@gmail.com>
8718 * class.c (can_access_internals): Call mono_assembly_load_friends ()
8719 before accessing the friend_assembly_names field.
8721 * assembly.c (mono_assembly_load_friends): Make this callable multiple
8723 (mono_assembly_load_from_full): Avoid calling load_friends (), it is
8724 called lazily when it is needed.
8726 * metadata-internals.h (struct _MonoAssembly): Add
8727 'friend_assembly_names_inited' flag.
8729 Thu Sep 18 18:18:47 CEST 2008 Paolo Molaro <lupus@ximian.com>
8731 * mono-perfcounters-def.h: fix the types of a few counters.
8732 * mono-perfcounters.c: implemented the instance names getter
8735 2008-09-18 Atsushi Enomoot <atsushi@ximian.com>
8737 * culture-info-table.h : regenerated.
8739 2008-09-17 Robert Jordan <robertj@gmx.net>
8741 * marshal.c (mono_marshal_get_ldflda_wrapper): Add support for
8742 context bound objects. Fixes #415577.
8744 Code is contributed under MIT/X11 license.
8746 Tue Sep 16 21:03:58 CEST 2008 Paolo Molaro <lupus@ximian.com>
8748 * icall-def.h, threads-types.h, threads.c: fixed SpinWait()
8749 implementation (bug #423582).
8751 2008-09-16 Zoltan Varga <vargaz@gmail.com>
8753 * object.c (mono_object_get_virtual_method): Handle the case method->slot
8754 is not set. Fixes #426309.
8756 2008-09-16 Jb Evain <jbevain@novell.com>
8758 * class.c (mono_class_from_name): fix the exported type look up
8759 when the type is defined in a referenced assembly.
8761 2008-09-16 Jb Evain <jbevain@novell.com>
8763 * reflection.c (mono_image_fill_export_table_from_type_forwarders):
8764 increment the next index counter on each iteration to make that work
8765 for more than one type forwarder. Unmanaged part to fix #422929.
8767 2008-09-15 Mark Probst <mark.probst@gmail.com>
8769 * object-internals.h: enum ComInterfaceType in
8770 MonoInterfaceTypeAttribute is guint32, not guint16.
8772 2008-09-12 Mark Probst <mark.probst@gmail.com>
8774 * cil-coff.h, image.c, reflection.c: Endianness fixes in image
8777 2008-09-11 Mark Probst <mark.probst@gmail.com>
8779 * icall.c: Boolean arguments to a runtime invoke are MonoBoolean,
8782 2008-09-11 Mark Probst <mark.probst@gmail.com>
8784 * debug-mono-symfile.c (mono_debug_symfile_lookup_location):
8785 Endianness fixes for MonoSymbolFileOffsetTable.
8787 2008-09-10 Bill Holmes <billholmes54@gmail.com>
8789 * process.c (complete_path) : Removing quotes from the
8790 input path. The glib file routines do not handle file paths
8791 that have quotes around them.
8793 Code is contributed under MIT/X11 license.
8795 2008-09-10 Bill Holmes <billholmes54@gmail.com>
8797 * socket-io.h : Adding a comment to provide locations where
8798 changes to MonoSocketAsyncResult need to be synced.
8800 Code is contributed under MIT/X11 license.
8802 2008-09-10 Zoltan Varga <vargaz@gmail.com>
8804 * marshal.c (emit_marshal_custom): Call NativeToManaged for non-out
8805 parameters as well. Fixes #425001.
8807 2008-09-08 Miguel de Icaza <miguel@novell.com>
8809 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Fix
8812 2008-09-07 Miguel de Icaza <miguel@novell.com>
8814 * console-io.c: Add support for tracking the window size if it
8817 The setup is very simple: the TtySetup function will now return a
8818 pointer to a location in memory that tracks the current console
8819 size. The managed code checks its current value every time its
8820 queried against the last value set, and updates accordingly.
8822 With this setup we can work with multiple consoles, and we do not
8823 require to poke into managed code from a signal handler.
8825 Additionally, the environment for COLUMNS and LINES is now handled
8828 (ves_icall_System_ConsoleDriver_GetTtySize): This is now gone.
8830 2008-09-07 Mark Probst <mark.probst@gmail.com>
8832 * marshal.c (mono_type_native_stack_size): Treat
8833 MONO_TYPE_TYPEDBYREF like MONO_TYPE_VALUETYPE.
8835 2008-09-04 Jb Evain <jbevain@novell.com>
8837 * class.c (mono_class_is_assignable_from): fix assignability of nullables
8840 2008-09-03 Rodrigo Kumpera <rkumpera@novell.com>
8842 * verify.c (verify_type_compatibility_full): Revert change
8843 to allow converting a native int to unmanaged pointer be verifiable
8844 under non-strict mode.
8845 It turns out that "(IntPtr)null" is indeed unverifiable, go figure.
8847 * verify.c: Added some TODOs.
8849 2008-09-02 Bill Holmes <billholmes54@gmail.com>
8851 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi,
8852 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni) :
8853 Changed to use GlobalAlloc for the memory returned on Windows platforms.
8855 Code is contributed under MIT/X11 license.
8857 2008-09-02 Jb Evain <jbevain@novell.com>
8859 * object.c (mono_ldstr_metdata_sig): renamed to mono_ldstr_metadata_sig.
8861 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
8863 reflection.c (typebuilder_setup_fields): Handle classes with
8866 2008-09-01 Rodrigo Kumpera <rkumpera@novell.com>
8868 class.c (mono_class_setup_events): Add memory barrier due to
8869 double checked locking.
8871 class.c (mono_class_setup_properties): Same.
8873 2008-08-31 Zoltan Varga <vargaz@gmail.com>
8875 * class.c (mono_class_is_assignable_from): Fix the build.
8877 * class.c (mono_class_is_assignable_from): Call mono_class_setup_vtable ()
8878 before accessing klass->interface_bitmap. Fixes #421744.
8880 2008-08-28 Zoltan Varga <vargaz@gmail.com>
8882 * appdomain.c (mono_runtime_set_no_exec): New internal function setting
8883 the runtime into no-exec mode, useful when running the AOT compiler.
8885 * appdomain.c gc.c object.c: Avoid executing managed code when running
8888 * rawbuffer.c (mono_raw_buffer_load_mmap): Disable this on the iphone.
8890 * reflection.c (_mono_reflection_get_type_from_info): Handle the
8891 special case when the mono_assembly_loaded () returns NULL because the
8892 search hook is not installed.
8894 2008-08-25 Zoltan Varga <vargaz@gmail.com>
8896 * marshal.c: Applied patch from tom hindle (tom_hindle@sil.org) to fix
8897 crashes in bstr marshalling on linux.
8899 2008-08-24 Zoltan Varga <vargaz@gmail.com>
8901 * debug-helpers.c (mono_type_get_desc): Fix printing of generic instances
8902 with more than one parameter.
8904 2008-08-24 Miguel de Icaza <miguel@novell.com>
8906 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup): Disable
8907 start/stop flow control as well when turning off ICANON (allows
8908 C-s and C-q to be read by Console.ReadKey).
8910 2008-08-24 Zoltan Varga <vargaz@gmail.com>
8912 * class.c (mono_class_init): Move the initialization of nested classes
8913 into mono_class_get_nested_types (). Fixes #418433.
8915 * class-internals.h (struct _MonoClass): Add a new 'nested_classes_inited'
8918 * class.c reflection.c icall.c: Use mono_class_get_nested_types () for
8919 iterating tough the nested classes of a class.
8921 2008-08-23 Zoltan Varga <vargaz@gmail.com>
8923 * class.c (mono_class_generic_sharing_enabled): Enable generic sharing
8926 2008-08-22 Miguel de Icaza <miguel@novell.com>
8928 * console-io.c (sigcont_handler): Support signal chaining for
8931 (console_set_signal_handlers): Use best practices with sigaction,
8932 clear the structure before using it.
8934 2008-08-22 Robert Jordan <robertj@gmx.net>
8936 * console-io.c (ves_icall_System_ConsoleDriver_TtySetup):
8937 Fix the Windows build.
8939 2008-08-22 Zoltan Varga <vargaz@gmail.com>
8941 * class.c (mono_class_generic_sharing_enabled): Make the default
8942 sharing mode 'corlib'.
8944 2008-08-21 Zoltan Varga <vargaz@gmail.com>
8946 * console-io.c (console_set_signal_handlers): Fix a warning.
8948 * marshal.c (mono_marshal_get_synchronized_wrapper): Call the wrapper
8949 method normally, the JIT will take care of avoiding recursion.
8951 2008-08-20 Bill Holmes <billholmes54@gmail.com>
8953 * console-io.c : Fixing builds for platforms that do not have <termios.h>.
8955 Code is contributed under MIT/X11 license.
8957 2008-08-20 Miguel de Icaza <miguel@novell.com>
8959 * console-io.c (sigcont_handler): We need to restore the entire
8960 termios state, not only the original settings, as things like echo
8961 can be controlled after this (Booish exposes this issue with its
8962 own ReadLine implementation).
8964 Additionally, we need to set the terminal back into keypad_xmit
8967 (ves_icall_System_ConsoleDriver_TtySetup): Take the keypad xmit
8968 string as a paramter as well. Otherwise we get different
8971 2008-08-20 Zoltan Varga <vargaz@gmail.com>
8973 * marshal.c (emit_marshal_object): Avoid managed-to-native marshalling of
8974 delegates with byref out parameter passing. Fixes #351520.
8976 * debug-helpers.c (mono_context_get_desc): New helper function to stringify
8978 (mono_type_get_desc): Add the type arguments for GENERICINST.
8979 (mono_method_full_name): Stringify the class name using mono_type_full_name
8980 so it picks up generic arguments.
8982 2008-08-19 Gert Driesen <drieseng@users.sourceforge.net>
8984 * console-io.c: Removed debug output.
8986 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
8988 reflection.c (mono_reflection_create_runtime_class): Alloc
8989 the nested classes linked list using the dynamic image mempool.
8990 Fixes leak in corlib compilation.
8992 2008-08-19 Miguel de Icaza <miguel@novell.com>
8994 * console-io.c: Fix incredibly annoying behavior on the console
8995 after resuming execution after control-z. This affected every
8996 console application.
8998 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
9000 * mempool-internals.h: Header for mono private mempool functions. The first
9001 two function are for allocating glib linked lists using pools.
9003 * mempool.c: Added g_list_prepend_mempool and g_slist_prepend_mempool.
9005 * Makefile.am: Added mempool-internals.h.
9007 2008-08-16 Zoltan Varga <vargaz@gmail.com>
9009 * domain.c (mono_domain_create): Call the JIT domain hook if installed.
9010 (mono_domain_free): Ditto.
9012 * domain-internals.h (struct _MonoDomain): Add 'runtime_info' field, this could
9013 be used by the JIT to store its domain-specific information, instead of putting
9014 it directly into MonoDomain.
9016 * domain.c (mono_install_create_domain_hook): New helper function to install
9017 a hook which initializes domain->runtime_info.
9019 * domain.c (mono_install_free_domain_hook): Ditto.
9021 2008-08-15 Zoltan Varga <vargaz@gmail.com>
9023 * marshal.c (mono_delegate_end_invoke): Raise an exception instead of
9024 asserting if the ares parameter is null.
9026 * mono-perfcounters.c: Fix warnings.
9028 * marshal.c (mono_marshal_get_delegate_begin_invoke): Don't set save_lmf, it
9029 is not needed, don't check for interruptions either.
9030 (mono_marshal_get_delegate_end_invoke): Ditto.
9032 2008-08-15 Marek Habersack <mhabersack@novell.com>
9034 * mono-perfcounters.c (predef_readonly_counter): added support for
9035 reading the ASP.NET Requests Queued counter from another process.
9037 2008-08-12 Zoltan Varga <vargaz@gmail.com>
9039 * metadata-internals.h: Move the 'aot_module' field from MonoAssembly to
9040 MonoImage to simplify the AOT code.
9042 2008-08-10 Zoltan Varga <vargaz@gmail.com>
9044 * marshal.c (emit_marshal_object): Implement native-to-managed StringBuilder
9045 marshalling. Fixes #416078.
9047 2008-08-08 Zoltan Varga <vargaz@gmail.com>
9049 * marshal.c (mono_marshal_get_native_wrapper): Add an 'aot' argument, when
9050 it is set, looking up the icall address is deferred to the JIT, since
9051 in embedded scenarios, the icall might not be registered in the runtime
9052 doing the AOT compilation. Backported from the 2.0 branch.
9054 2008-08-08 Zoltan Varga <vargaz@gmail.com>
9056 * marshal.c (mono_remoting_wrapper): Handle nullable types correctly.
9059 2008-08-05 Marek Habersack <mhabersack@novell.com>
9061 * Makefile.am: added support for cross-compilation.
9063 2008-08-04 Zoltan Varga <vargaz@gmail.com>
9065 * socket-io.c (get_socket_assembly): Make 'moonlight' variable static.
9067 Fri Aug 1 18:47:48 CEST 2008 Paolo Molaro <lupus@ximian.com>
9069 * mono-perfcounters.c: jitted methods and jitted bytes counters.
9071 Fri Aug 1 16:07:09 CEST 2008 Paolo Molaro <lupus@ximian.com>
9073 * class-internals.h, icall-def.h, mono-perfcounters-def.h,
9074 mono-perfcounters.c: performance counters implementation.
9076 2008-07-31 Zoltan Varga <vargaz@gmail.com>
9078 * metadata-internals.h (struct _MonoAssembly): Change the type of 'aot_module'
9079 to gpointer, letting the AOT code decide what to store in it.
9081 2008-07-31 Bill Holmes <billholmes54@gmail.com>
9083 * marshal.c (cominterop_get_native_wrapper) : Adding a call to
9084 mono_class_setup_methods if the methods are not initialized.
9086 Code is contributed under MIT/X11 license.
9088 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
9090 * verify.c: Remove some debug code I commited by accident.
9092 * verify.c (mono_method_is_valid_in_context): Change the return value
9093 to make possible to distinguish between invalid and unverifiable.
9095 * verify.c (verifier_load_method): Don't return NULL for unverifiable
9098 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
9100 * verify.c (mono_generic_param_is_constraint_compatible): Inflate type
9101 constraints. Fixes regression in gtest-253.
9103 2008-07-30 Rodrigo Kumpera <rkumpera@novell.com>
9105 * verify.c (mono_verifier_verify_class): Don't allow generic types
9106 with explicit layout.
9108 * verify.c (mono_method_verify): Check locals and argument types.
9110 2008-07-29 Zoltan Varga <vargaz@gmail.com>
9112 * monitor.c (mono_monitor_try_enter_internal): Allow nterruption of the
9113 wait if the thread is in StopRequested state.
9115 * class.c (mono_class_from_name): Refactor the module searching code into
9116 a separate function so it can be reused in the AOT case too.
9118 2008-07-28 Rodrigo Kumpera <rkumpera@novell.com>
9120 * verify.c (mono_type_is_valid_in_context): Improve the error message.
9121 Check both the type and it's generic type definition for loader errors.
9123 * verify.c (mono_method_is_valid_in_context): Don't generate another
9124 error when a type errors occur, this leads to the wrong exception been
9127 2008-07-28 Dick Porter <dick@ximian.com>
9131 (ves_icall_System_Diagnostics_Process_ProcessHandle_duplicate):
9132 New internal calls to duplicate and close a process handle.
9134 2008-07-27 Andreas Färber <andreas.faerber@web.de>
9136 * object.c (CHECK_ADD_OVERFLOW_UN): Add missing bracket. Fixes #412499.
9138 2008-07-27 Zoltan Varga <vargaz@gmail.com>
9140 * appdomain.c (unload_thread_main): Attach the unload thread to the runtime.
9142 2008-07-27 Robert Jordan <robertj@gmx.net>
9144 * class.c (mono_class_init): Don't compute class.has_finalize for
9145 valuetypes. Fixes #412477.
9147 2008-07-25 Rodrigo Kumpera <rkumpera@novell.com>
9149 * verify.c: Implement constraint equivalence checking.
9150 This is required when a generic parameter is used as
9151 argument to a constrained one.
9155 2008-07-24 Zoltan Varga <vargaz@gmail.com>
9157 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
9159 * domain-internals.h (struct _MonoDomain): Add 'method_code_hash' field.
9161 * object-internals.h (struct _MonoDelegate): Add 'method_code' field,
9162 synch with managed object layout.
9164 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
9166 * verify.c (do_branch_op): Handle valuetypes and generic
9169 * verify.c (do_cmp_op): Same.
9173 2008-07-24 Mark Probst <mark.probst@gmail.com>
9175 * generic-sharing.c: Fix memory leaks.
9177 * class.c, class-internals.h: Make
9178 mono_class_inflate_generic_type_with_mempool() non-static.
9180 2008-07-24 Rodrigo Kumpera <rkumpera@novell.com>
9182 * pedump.c (dump_verify_info): Dump full class name.
9184 2008-07-24 Mark Probst <mark.probst@gmail.com>
9186 * generic-sharing.c: Removed some old code that didn't do anything.
9188 2008-07-24 Massimiliano Mantione <massi@ximian.com>
9189 * profiler.c: Added runtime_initialized_event,
9190 mono_profiler_install_runtime_initialized and
9191 mono_profiler_runtime_initialized. This new hook tells the profiler
9192 when the runtime is sufficiently initialized to be able to call
9193 mono_thread_attach on the root appdomain.
9194 * profiler.h, profiler-private.h: Likewise.
9196 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
9198 * verify.c (do_cast): Do boxing for generic arguments as well.
9200 * class.c (is_nesting_type): Drop generic instantiations before
9201 checking for nesting.
9203 * class.c (can_access_instantiation): Allow access to generic
9206 2008-07-23 Rodrigo Kumpera <rkumpera@novell.com>
9208 * verify.c (verify_class_for_overlapping_reference_fields):
9209 On some cases, the field size might be zero, guard against that.
9210 Fix the explicit layout check to work as expected.
9212 2008-07-23 Zoltan Varga <vargaz@gmail.com>
9214 * threads.c (ves_icall_System_Threading_Thread_Abort): Avoid calling
9215 mono_thread_resume () during shutdown, since the thread we want to abort
9218 2008-07-22 Zoltan Varga <vargaz@gmail.com>
9220 * mono-debug-debugger.c (mono_debugger_check_breakpoints): Fix a
9223 * debug-mono-symfile.c: Fix a warning.
9225 * mono-perfcounters.c (get_cpu_times): Fix a warning.
9227 * object.c (mono_class_vtable): Check if exception_type is set, and return
9228 NULL as defined by the function comments.
9230 2008-07-22 Mark Probst <mark.probst@gmail.com>
9232 * mempool.c: Use malloc for every single mempool allocation if the
9233 configure option is set. This makes it easier to track mempool
9234 allocations with tools like Valgrind.
9236 2008-07-22 Jb Evain <jbevain@novell.com>
9238 * reflection.c (create_dynamic_mono_image): emit the same
9239 metadata version that SL2 does when creating a SL2 image.
9241 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
9244 * icall.c: New icall System.Enum:get_hashcode. This function
9245 avoids the overhead of boxing the enum to the underlying type.
9247 2008-07-21 Mark Probst <mark.probst@gmail.com>
9249 * reflection.c (mono_method_get_object): Don't let static RGCTX
9250 invoke wrappers get into MonoReflectionMethods.
9252 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
9254 * object-internals.h:
9255 * object.c: New mono_runtime_class_init_full function
9256 that makes throwing the exception optinal.
9258 * class-internals.h: New exception type MONO_EXCEPTION_OBJECT_SUPPLIED
9259 for the case where the exception object is supplied.
9261 2008-07-16 Kornél Pál <kornelpal@gmail.com>
9263 * coree.h: Define __ImageBase as _image_base__ on cygwin that fixes build with
9266 Contributed under MIT/X11 license.
9268 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
9270 * string-icalls.c (ves_icall_System_String_InternalSplit):
9271 Optimize array allocation by caching the MonoClass of the
9274 * icall.c (ves_icall_Type_GetMethodsByName): Same.
9276 * reflection.c (mono_param_get_objects): Same.
9278 2008-07-16 Rodrigo Kumpera <rkumpera@novell.com>
9281 * icall.c: New ves_icall_MonoGenericClass_InflateType icall.
9282 It inflates the given type using the class context.
9284 2008-07-15 Rodrigo Kumpera <rkumpera@novell.com>
9286 * object.c (mono_class_try_get_vtable): New function. Tries to fetch
9287 the vtable if it already exists.
9289 * object-internals.h: Add mono_class_try_get_vtable as part of the
9292 * reflection.c (mono_type_get_object): Use the MonoObject from the
9293 vtable when possible. Reduces locking contention on reflection heavy
9296 2008-07-15 Zoltan Varga <vargaz@gmail.com>
9298 * decimal.c (my_g_bit_nth_msf): Implement this directly without calling
9299 g_bit_nth_msf () since that macro is not implemented in eglib.
9301 2008-07-13 Zoltan Varga <vargaz@gmail.com>
9303 * class.c (mono_class_generic_sharing_enabled): Always disable generic sharing
9304 on platforms which do not support it.
9306 2008-07-12 Zoltan Varga <vargaz@gmail.com>
9308 * marshal.c (mono_signature_to_name): Encode sig->hasthis as well.
9310 2008-07-11 Martin Baulig <martin@ximian.com>
9312 * mono-debug-debugger.h
9313 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_INTERRUPTION_REQUEST'.
9315 * mono-debug-debugger.c
9316 (_mono_debugger_interruption_request): New global volatile variable.
9317 (mono_debugger_check_interruption): New public function.
9320 (mono_thread_current_check_pending_interrupt): Call
9321 mono_debugger_check_interruption().
9322 (mono_thread_interruption_checkpoint_request): Likewise.
9324 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9326 * verify.c: Add more type checks for loaded types. Verify the result
9327 handle from ldtoken.
9329 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9331 * loader.c (field_from_memberref): Don't crash if the field
9334 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9336 * verify.c: Verify if type and method instantiations
9337 don't have invalid VAR or MVAR arguments.
9339 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9341 * verify.c: Fix double free of function pointer list.
9343 2008-07-11 Rodrigo Kumpera <rkumpera@novell.com>
9345 * object.c (mono_string_to_utf8): Comment the new code as it
9348 2008-07-08 Rodrigo Kumpera <rkumpera@novell.com>
9350 * object.c (mono_string_to_utf8): Avoid allocating a temp array.
9352 2008-07-07 Bill Holmes <billholmes54@gmail.com>
9354 * threads.c : Thread.Interrupt changes to ensure that ThreadInterruptedException
9355 is not throw too many times.
9357 Code is contributed under MIT/X11 license.
9359 2008-07-07 Zoltan Varga <vargaz@gmail.com>
9361 * mono-debug.c (mono_debug_find_method): Allow this to be called even when
9362 debugging is turned off.
9364 2008-07-06 Zoltan Varga <vargaz@gmail.com>
9366 * generic-sharing.c (mono_method_lookup_rgctx): Fix a warning.
9368 2008-07-04 Mark Probst <mark.probst@gmail.com>
9370 * class-internals.h, class.c: Added new generic sharing option:
9371 Share only stuff in System.Collections.Generic, which is now the
9374 2008-07-04 Mark Probst <mark.probst@gmail.com>
9376 * generic-sharing.c, class-internals.h: New function for getting a
9377 generic method in a generic class given the corresponding method
9378 for a different instantiation of the class. Partly refactored
9379 from mini-trampolines.c.
9381 * class.c: Make sure generic methods have a class_inst if they are
9382 part of a generic class.
9384 * metadata.c (mono_type_stack_size_internal): Handle type
9387 2008-07-04 Mark Probst <mark.probst@gmail.com>
9389 * domain-internals.h: New field (has_this) in MonoGenericJitInfo.
9390 Signifies whether information on the this/vtable/mrgctx variable
9393 2008-07-04 Mark Probst <mark.probst@gmail.com>
9395 * object.c, object-internals.h, icall.c: New function
9396 mono_delegate_ctor_with_method(), which does the same as
9397 mono_delegate_ctor(), but takes an explicit method argument
9398 instead of taking the method from the jit info.
9400 * marshal.c: When creating a delegate with an inflated method take
9401 the "this" argument as the target class for the castclass.
9403 2008-07-03 Mark Probst <mark.probst@gmail.com>
9405 * domain.c (mono_jit_info_table_find): Fixed a bug that caused
9406 mono_jit_info_table_find() to perform very badly in some cases.
9408 2008-07-02 Zoltan Varga <vargaz@gmail.com>
9410 * icall.c (type_from_typename): Handle 'string'.
9412 * marshal.c (mono_marshal_get_runtime_invoke): Don't insert runtime invoke
9413 wrappers into the wrapper_hash, since the key is not a MonoMethod.
9415 2008-07-01 Zoltan Varga <vargaz@gmail.com>
9417 * icall.c (mono_get_jit_icall_info): New function to return the jit icall hash table.
9419 * *-gc.c (mono_gc_get_managed_allocator_types): New function to return the
9420 number of available managed allocator types.
9422 * marshal.c (mono_marshal_init): Register Thread:ResetAbort as an icall ().
9423 (mono_marshal_get_runtime_invoke): Call ResetAbort as an icall.
9425 2008-06-30 Zoltan Varga <vargaz@gmail.com>
9427 * domain-internals.h (struct _MonoDomain): Add 'jit_code_hash_lock' field,
9428 which is a low level lock protecting just the 'jit_code_hash' hash table.
9430 * domain.c: Initialize+cleanup jit_code_hash_lock.
9432 2008-06-30 Kornél Pál <kornelpal@gmail.com>
9434 * coree.c (mono_load_coree): Set coree_module_handle global variable only
9435 after initialization.
9437 * coree.h: Make MonoFixupExe internal.
9439 Contributed under MIT/X11 license.
9441 2008-06-30 Kornél Pál <kornelpal@gmail.com>
9443 * coree.c (_CorValidateImage): Retain IMAGE_DIRECTORY_ENTRY_SECURITY
9444 because that is platform independent. Check NumberOfRvaAndSizes in PE32
9446 (MonoLoadImage): New wrapper function around LoadLibrary to ensure that the
9447 image being loaded is a CLI image and _CorValidateImage gets called.
9449 * coree.h: Add MonoLoadImage.
9451 * image.c (mono_image_open_full): Load CLI images using MonoLoadImage
9452 instead of LoadLibrary.
9454 Contributed under MIT/X11 license.
9456 2008-06-29 Rodrigo Kumpera <rkumpera@novell.com>
9458 * icall.c (ves_icall_System_ValueType_Equals): Avoid allocating objects
9459 for any primitive type.
9461 2008-06-29 Zoltan Varga <vargaz@gmail.com>
9463 * object.c (mono_array_new_specific): Optimize this and the other allocation
9466 * object.c (mono_class_create_runtime_vtable): Use typed allocation in other
9467 domains too if mono_dont_free_domains is set.
9469 * domain-internals.h (mono_dont_free_domains): New internal option controlling
9470 whenever to free appdomain data after it has been unloaded.
9472 * domain.c (mono_domain_free): Don't free appdomain data if the option is set.
9474 2008-06-28 Zoltan Varga <vargaz@gmail.com>
9476 * icall.c (ves_icall_System_Enum_get_underlying_type): New icall.
9477 (mono_method_get_equivalent_method): Fix a warning.
9479 * object.c (mono_message_init): Avoid looking up array types for each call.
9481 2008-06-27 Zoltan Varga <vargaz@gmail.com>
9483 * object.c (mono_message_invoke): Avoid looking up the object[] type for each
9486 * icall.c (ves_icall_System_ValueType_Equals): Optimize the comparison of enums
9489 * class.c (mono_class_get_fields): Avoid calling setup_fields_locking () for
9492 * icall.c (ves_icall_System_ValueType_Equals): Avoid traversing all the static
9495 2008-06-26 Rodrigo Kumpera <rkumpera@novell.com>
9497 * object.c (mono_value_box): Fix boxing of nullables.
9499 2008-06-26 Kornél Pál <kornelpal@gmail.com>
9501 * assembly.c (mono_set_rootdir): Use __ImageBase instead of
9502 mono_module_handle that is defined by the linker; no initialization required.
9503 * coree.h: Remove mono_module_handle, add __ImageBase, update
9504 mono_image_open_from_module_handle.
9505 * coree.c (_CorValidateImage): Convert platform independent PE32 images to
9506 PE32+ on 64-bit Windows that makes the OS able to load CIL images as modules.
9507 (MonoFixupCorEE): Export Address Table RVAs are 32-bit unsigned integers so
9508 memory has to be allocated for trampolines (x64) or procedure labels (IA64) up
9509 to 4 GB away from image base address. IA64 version is not tested but was very
9510 easy to implement and should work if we ever need it.
9511 * domain.c (mono_init_internal): Avoid system error message boxes.
9512 * image.c (mono_image_open_from_module_handle): Replace ref_count argument
9513 with has_entry_point. Handle do_mono_image_load fauilre correctly.
9514 (mono_image_open_full, mono_image_close): Use has_entry_point instead of
9515 coff_attributes that is a more reliable way to detect if _CorDllMain was called.
9516 * metadata-internals.h: Add has_entry_point to _MonoImage on Windows.
9518 Contributed under MIT/X11 license.
9520 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
9522 * class.c, class-internals.h: Export mono_class_get_generic_type_definition
9523 as part of the private mono API.
9525 * loader.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandleInternalType):
9526 Do proper argument checking for methods that belong to generic classes.
9527 Do proper type resolution for GMFH/2.
9530 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
9532 * verify.c (do_switch): Fix a memory corruption bug with
9533 the jump index is out of bound.
9535 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
9537 * verify.c: Disable debug code.
9539 2008-06-25 Rodrigo Kumpera <rkumpera@novell.com>
9541 * reflection.c (mono_image_get_methodbuilder_token): Use
9542 mono_image_get_methodspec_token_for_generic_method_definition
9543 instead of mono_image_get_memberref_token. We cache more memberef
9546 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
9548 * verify.c: Inflate exception clause types.
9551 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
9553 * reflection.c (mono_image_get_methodbuilder_token): Don't leak
9556 * reflection.c (mono_image_get_ctorbuilder_token): Same.
9558 * reflection.c (mono_image_create_method_token): Same.
9560 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
9562 * reflection.c: Added mono_image_get_methodref_token_for_methodbuilder.
9563 It does the same as mono_image_get_methodref_token but works on
9566 * reflection.c: Use mono_image_get_methodspec_token_for_generic_method_definition
9567 and always generate a methodspec. This follows the old behavior and fixes
9568 the regressions in System.Core.
9570 2008-06-24 Zoltan Varga <vargaz@gmail.com>
9572 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Collect exceptions for classes where
9573 don't event mono_class_get () succeeds. Fixes #402182.
9575 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
9577 * metadata-internals.h: Added MonoDynamicImage::methodspec
9578 hashtable to store methodspec tokens created for MethodBuilders.
9580 * reflection.c (mono_image_get_methodbuilder_token): Encode generic
9581 MethodBuilders as open instantiations if a methodspec was requested.
9583 * reflection.c (fixup_method): Skip MethodBuilder with methodspec tokens.
9585 * reflection.c (create_dynamic_mono_image): Create the methodspec hashtable.
9587 * reflection.c (mono_dynamic_image_free): Release the methodspec hashtable.
9591 2008-06-20 Rodrigo Kumpera <rkumpera@novell.com>
9593 * loader.c (method_from_methodspec): Avoid crashing if the
9594 method lookup fails.
9596 2008-06-20 Dick Porter <dick@ximian.com>
9598 * socket-io.c (get_socket_assembly): Cope with Moonlight network
9599 classes being in a different assembly. Fixes bug 399184.
9601 2008-06-20 Zoltan Varga <vargaz@gmail.com>
9603 * loader.c (mono_loader_init): Make this callable multiple times.
9604 (mono_dllmap_insert): Call mono_loader_init () so this works even before
9605 the runtime is initialized. Fixes #401755.
9607 2008-06-19 Dick Porter <dick@ximian.com>
9609 * socket-io.c (convert_socketflags): Ignore SocketFlags.Partial.
9612 2008-06-19 Dick Porter <dick@ximian.com>
9615 * icall-def.h: Implement Socket generic Send() and Receive()
9616 methods. Fixes bug 395168.
9618 2008-06-19 Kornél Pál <kornelpal@gmail.com>
9620 * icall-def.h, icall.c: Add ves_icall_System_Reflection_Module_GetHINSTANCE.
9622 Contributed under MIT/X11 license.
9624 2008-06-18 Martin Baulig <martin@ximian.com>
9626 * mono-debug.h (MONO_DEBUGGER_VERSION): Split into
9627 `MONO_DEBUGGER_MAJOR_VERSION' and `MONO_DEBUGGER_MINOR_VERSION';
9628 set to 80.0. The debugger <-> runtime interface is now frozen as
9632 (mono_debug_debugger_version): Bump to 4.
9634 2008-06-18 Martin Baulig <martin@ximian.com>
9636 * debug-mono-symfile.c
9637 (load_symfile): Don't check the minor version.
9639 * debug-mono-symfile.h: Bump the version number to 50.0.
9641 2008-06-18 Martin Baulig <martin@ximian.com>
9643 * debug-mono-symfile.c
9644 (load_symfile): Treat `MONO_SYMBOL_FILE_MINOR_VERSION' as a
9645 minimum required version.
9647 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
9649 * reflection.c (mono_custom_attrs_from_property): Fix support for
9650 retriveving cattrs of dynamic inflated generic types.
9652 * reflection.c (mono_custom_attrs_from_event): Same.
9654 * reflection.c (mono_custom_attrs_from_field): Same;
9656 * reflection.c (typebuilder_setup_events): Same cattrs of events.
9658 * loader.c (-mono_metadata_get_corresponding_field_from_generic_type_definition):
9659 Moved to metadata.c.
9661 * metadata.c: New functions to retrive the equivalent field, event
9662 of property from the generic type definition.
9664 * metadata-internals.h: Added new functions from metadata.c.
9666 2008-06-17 Rodrigo Kumpera <rkumpera@novell.com>
9668 * reflection.c (mono_custom_attrs_from_builders): Mark MonoCustomAttrInfo
9669 to cached in a mempool is used.
9671 * metadata.c (free_generic_class): In some situations field generic_info type
9672 is not properly dup'ed and leads to double free'ing.
9676 2008-06-17 Mark Probst <mark.probst@gmail.com>
9678 * marshal.c (mono_marshal_get_static_rgctx_invoke): Also handle
9679 this arguments (will be needed later for generic methods).
9682 2008-06-17 Mark Probst <mark.probst@gmail.com>
9684 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal):
9685 Create a static RGCTX invoke wrapper for methods which require it.
9687 2008-06-17 Mark Probst <mark.probst@gmail.com>
9689 * object.c, class-internals.h: New function for checking whether
9690 an individual field is special static.
9692 2008-06-15 Zoltan Varga <vargaz@gmail.com>
9694 * metadata.c (mono_metadata_get_generic_param_row): Use bsearch instead of
9695 linear search since the table is sorted.
9697 * gc.c (mono_gc_cleanup): Abort the finalizer thread more gracefully.
9700 2008-06-14 Zoltan Varga <vargaz@gmail.com>
9702 * appdomain.c (unload_thread_main): Applied patch from Tim Howard
9703 (timh@ict.om.org). Remove the timeouts when waiting for appdomains to unload.
9705 * gc.c (mono_domain_finalize): Allow an infinite timeout.
9707 * threads.c (mono_threads_abort_appdomain_threads): Ditto.
9709 * threads.c (mono_thread_request_interruption): Get rid of locking, use
9710 InterlockedCompareExchange to query and modify
9711 thread->interruption_requested.
9713 * object-internals.h (struct _MonoThread): Change interruption_requested
9714 to a gint32 so it can be modified by atomic operations. Add
9715 'critical_region_level' from the managed side, change small_id to a guint32,
9716 add new set of 'unused' fields.
9718 * appdomain.c: Bump corlib version.
9720 2008-06-13 Zoltan Varga <vargaz@gmail.com>
9722 * class.c (mono_class_from_name): Search modules as well. Fixes
9725 2008-06-13 Mark Probst <mark.probst@gmail.com>
9727 * generic-sharing.c: Code for maintaining the MRGCTX and MRGCTX
9728 templates. Templates are generalized with an additional type_argc
9729 argument. RGCTX templates have type_argc==0, MRGCTX templates
9732 * domain-internals.h, domain.c: New hash table for looking up
9735 * metadata.c, metadata-internals.h: Rename hash and equal
9736 functions for MonoGenericInst's and make them public.
9738 * class-internals.h: New data structures for the MRGCTX. Macros
9739 for distinguishing slots in the RGCTX and the MRGCTX.
9741 2008-06-13 Mark Probst <mark.probst@gmail.com>
9743 * object.c (mono_method_get_imt_slot): Put the same methods of
9744 different instantiations of the same generic interface in the same
9745 IMT slots, to make generic sharing simpler.
9747 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
9749 * metadata-internals.h: Added mono_metadata_field_info_with_mempool.
9751 * metadata.c (mono_metadata_field_info_with_mempool): Added.
9752 This function works just like mono_metadata_field_info, but
9753 accept a mempool as argument to be used allocating memory.
9755 * marshal.c (mono_marshal_load_type_info): Use new function
9756 to load marshal data into image mempool.
9758 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
9760 * class.c (mono_class_inflate_generic_type_with_mempool):
9761 This function allows to inflate a generic type using
9764 * class.c (inflate_generic_type): Take a mempool as argument
9765 and use it to do type dup'ing.
9767 * class.c (mono_class_setup_fields): Field type for generic
9768 generic classes are allocated from the image mempool.
9770 * metadata.c (free_generic_class): Inflated field type is
9771 now allocated in the image mempool.
9773 2008-06-12 Rodrigo Kumpera <rkumpera@novell.com>
9775 * threads.c (thread_cleanup): Free MonoThread::name.
9777 2008-06-12 Marek Habersack <mhabersack@novell.com>
9779 * appdomain.c (ensure_directory_exists): avoid unnecessary
9780 mkdir(2) calls when the shadow directory already exists.
9781 (mono_make_shadow_copy): copy also satellite assemblies from the
9782 private bin directories.
9784 2008-06-11 Zoltan Varga <vargaz@gmail.com>
9786 * threads.c (mono_thread_get_stack_bounds): Align the stack in all cases.
9788 * threads.c (mono_thread_get_stack_bounds): Align the stack address to
9789 a page boundary. Fixes #396219.
9791 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
9793 * marshal.c (mono_marshal_load_type_info): Add a memory barrier
9794 due to double-checked locking.
9796 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
9798 * assembly.c (build_assembly_name): Release memory on failure.
9800 * assembly.c (mono_assembly_name_parse_full): Release memory on failure.
9802 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
9804 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Release
9807 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
9809 * icall.c (ves_icall_System_Reflection_AssemblyName_ParseName): Release
9812 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
9814 * loader.c (field_from_memberref): Check if field signature type is equal
9815 to the non-inflated type of the field. Fixes #398980.
9817 2008-06-11 Zoltan Varga <vargaz@gmail.com>
9819 * assembly.c (mono_assembly_load_from_full): Call
9820 mono_assembly_load_friends () outside the assemblies lock, since it can
9821 acquire the loader lock. Fixes #323696.
9823 * reflection.c (resolve_object): Inflate the inst with the context for
9824 FieldOnTypeBuilderInst. Fixes #399010.
9826 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
9828 * reflection.c (mono_image_get_field_on_inst_token): Don't
9829 inflate the field to encode it's signature. If it's a
9830 VAR or MVAR it should stay that way in the signature.
9833 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
9835 * reflection.c (resolve_object): Release memory of inflated types.
9837 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
9839 * loader.c (mono_method_get_signature_full): Remove assert about
9840 loading a methodspec to a generic method. We have such methods, such as
9841 System.Threading.Interlocked::CompareExchange<T>.
9842 This assert was removed since it crashes the verifier when it checks
9843 methods calling CompareExchange<T>.
9845 2008-06-10 Marek Safar <marek.safar@gmail.com>
9847 * icall.c (ves_icall_MonoMethod_GetGenericArguments): Creates an instance
9848 of Type array and not MonoType.
9850 2008-06-10 Marek Habersack <mhabersack@novell.com>
9852 * profiler.c: fix a segfault on shutdown. Patch from Paolo Molaro
9855 2008-06-10 Martin Baulig <martin@ximian.com>
9857 * debug-mono-symfile.h
9858 (MONO_SYMBOL_FILE_MINOR_VERSION): Bump to 6. There were no
9859 changes to the file format, but we were generating incorrect
9860 source file indices in the line number table due to a bug, which
9861 made backtraces report an incorrect source file.
9863 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
9865 * mono-debug.c: Moved mono_debug_free_method_jit_info from
9866 mini/debug-mini.c to here.
9868 * mono-debug.c (il_offset_from_address): Free memory from find_method.
9870 * mono-debug.h: Export mono_debug_free_method_jit_info, users should
9871 use it to release structs returned by mono_debug_find_method.
9873 2008-06-10 Zoltan Varga <vargaz@gmail.com>
9875 * class.c (mono_class_setup_vtable): Call setup_methods even for interfaces
9876 since it needs to set method->slot for all interface methods.
9878 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
9880 * class-internals.h: Forgot to add.
9882 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
9884 * class-internals.h: Added MONO_PROP_DYNAMIC_CATTR.
9886 * reflection.c (lookup_custom_attr): Added a MonoImage argument.
9887 Lookup the custom attributes from property_hash.
9889 * reflection.c (mono_save_custom_attrs): Save the custom attributes
9890 in property_hash. Allocate all data using the image mempool.
9892 * reflection.c: Removed dynamic_custom_attrs. Changed all checks
9893 for dynamic_custom_attrs to checks if the image is dynamic.
9895 2008-06-09 Zoltan Varga <vargaz@gmail.com>
9897 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Free the
9900 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Avoid calling
9901 runtime functions while holding the domain assemblies lock.
9903 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
9905 * verify.c: Reapplied the last bit of the reverted changes.
9907 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
9909 * verify.c: Reapplied more of the reverted changes.
9911 2008-06-09 Martin Baulig <martin@ximian.com>
9913 * debug-mono-symfile.c (load_symfile): Check the major version
9914 first; if it's wrong, don't print the minor version in the error message.
9916 2008-06-09 Zoltan Varga <vargaz@gmail.com>
9918 * appdomain.c (set_domain_search_path): Make this use the domain assemblies
9919 lock instead of the domain lock to avoid deadlocks, since the thread might
9920 already hold the loader lock.
9922 * threads.c (start_wrapper): Call mono_monitor_init_tls ().
9923 (mono_thread_attach): Ditto.
9925 * monitor.c: Use a TLS variable for holding the current thread id instead
9926 of calling pthread_self ().
9927 (mono_monitor_init_tls): New internal function to initialize the TLS
9929 (mono_monitor_try_enter_internal): Put the owner == id check after the
9932 * object-internals.h (_G_BOOLEAN_EXPR): Redefine this glib macro to avoid
9933 missed optimizations when using gcc-4.3.
9935 2008-06-08 Rodrigo Kumpera <rkumpera@novell.com>
9937 * reflection.c (mono_dynamic_image_free): Free the memory
9938 used by MonoGenericParam in MonoDynamicImage::gen_param.
9940 * reflection.c (mono_reflection_setup_generic_class): Allocate
9941 container from mempool.
9943 * reflection.c (mono_reflection_initialize_generic_parameter): Allocate
9944 container from mempool.
9946 2008-06-07 Zoltan Varga <vargaz@gmail.com>
9948 * threads.c (mono_set_pending_exception): New internal function to set the
9949 pending exception of the current thread.
9950 (mono_thread_get_and_clear_pending_exception): Check for
9951 thread->pending_exception as well.
9953 * object-internals.h (struct _MonoThread): Add 'pending_exception' field.
9955 * boehm-gc.c (mono_gc_base_init): Set GC_no_dls before calling GC_init () since
9956 it can trigger a collection.
9958 2008-06-06 Martin Baulig <martin@ximian.com>
9960 Merged the `debugger-kahalo' branch.
9963 (MONO_DEBUGGER_VERSION): Bumped to 72.
9965 * debug-mono-symfile.h
9966 (MonoSymbolFileMethodIndexEntry): Removed.
9967 (MonoSymbolFileMethodEntry): New public typedef.
9968 (MonoSymbolFileOffsetTable): Added `_is_aspx_source'.
9969 (MonoSymbolFileSourceEntry): Remove everything except `index' and
9971 (MonoSymbolFileMethodEntry): Removed.
9972 (MonoSymbolFileLexicalBlockEntry): Removed.
9973 (MonoSymbolFileLineNumberEntry): Removed.
9974 (MonoDebugLexicalBlockEntry): Removed.
9975 (MonoDebugMethodInfo): Replaced `entry' by `guint32 entry_offset';
9976 removed `num_il_offsets' and `il_offsets'.
9977 (MonoSymbolFile): Replace `version' with `major_version' and
9979 (MONO_SYMBOL_FILE_VERSION): Replace with
9980 `MONO_SYMBOL_FILE_MAJOR_VERSION' and
9981 `MONO_SYMBOL_FILE_MINOR_VERSION'.
9983 * debug-mono-symfile.c
9984 (mono_debug_symfile_lookup_location): Add support for the new line
9985 number table format.
9987 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
9989 * metadata.c (free_generic_class): Release the inflated
9990 MonoClass of dynamic generic classes if it's not a generic
9993 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
9995 * verify.c: Reapplied more of the reverted changes.
9997 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
9999 * reflection.c (lookup_custom_attr): Clean the cached flag or
10000 nobody will free it. Fixes a memleak in MonoCustomAttrs::IsDefinedInternal
10003 2008-06-07 Rodrigo Kumpera <rkumpera@novell.com>
10005 * verify.c: Reapplied a small part of the reverted changes.
10007 2008-06-07 Zoltan Varga <vargaz@gmail.com>
10009 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
10011 * monitor.c (mono_monitor_try_enter_internal): Add NULL check which was
10012 previously in managed code.
10013 (mono_monitor_exit): Ditto.
10014 (ves_icall_System_Threading_Monitor_Monitor_exit): Removed, not needed anymore.
10016 * icall-def.h: Rename the Enter/Exit icalls to simply Enter/Exit to match
10017 the managed definition.
10019 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
10021 * verify.c: Revert changes to see if it helps with weird buildbot crashes.
10023 2008-06-06 Zoltan Varga <vargaz@gmail.com>
10025 * monitor.c: Redefine GetCurrentThreadId () with a macro on !win32.
10027 * monitor.c: Add some micro optimizations.
10029 * icall.c (type_from_typename): Handle 'bool'.
10031 2008-06-06 Rodrigo Kumpera <rkumpera@novell.com>
10033 * verify.c: Implement constructor verification per P III 1.8.1.4.
10036 2008-06-06 Zoltan Varga <vargaz@gmail.com>
10038 * assembly.c (mono_assembly_loaded_full): Avoid calling the search hooks while
10039 holding the assemblies lock here too.
10041 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
10043 * verify.c: Kill stack_top function.
10045 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
10047 * verify.c: Kill stack_get function.
10049 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
10051 * verify.c (mono_method_verify): Last change broke the build. Fixed.
10053 2008-06-05 Rodrigo Kumpera <rkumpera@novell.com>
10055 * verify.c (verify_type_compatibility_full): Make SZARRAY checks
10058 * verify.c (mono_method_verify): Inflate params and locals to avoid
10059 mismatch when checking for compatibility.
10061 2008-06-05 Jonathan Chambers <joncham@gmail.com>
10063 * metadata.c (mono_string_from_bstr): Fix BSTR marshalling.
10064 Length prefix should be size in bytes. Fix bug #339530.
10066 * metadata.c (mono_string_to_bstr): Fix BSTR marshalling.
10067 Length prefix should be size in bytes. Fix bug #339530.
10069 Code is contributed under MIT/X11 license.
10071 2008-06-05 Bill Holmes <billholmes54@gmail.com>
10073 * decimal.c: Adding MSVC implementation to my_g_bit_nth_msf.
10075 Contributed under MIT/X11 license.
10077 2008-06-05 Martin Baulig <martin@ximian.com>
10079 * mono-debug-debugger.c
10080 (mono_debugger_check_breakpoints): Reflect latest runtime changes.
10082 2008-06-05 Zoltan Varga <vargaz@gmail.com>
10084 * assembly.c (mono_assembly_load_from_full): Avoid calling the search hooks
10085 while holding the assemblies lock to prevent deadlocks. Handle the case
10086 where the search hook returns NULL but the assembly was still loaded.
10089 * appdomain.c (set_domain_search_path): Acquire the domain lock since we
10090 modify domain state.
10092 2008-06-05 Andreas Färber <andreas.faerber@web.de>
10094 * boehm-gc.c: Add DTrace probes gc-{begin,end}.
10095 * Makefile.am (pedump_LDADD): Post-process object files and
10096 add dtrace-generated object file, if necessary.
10098 Code is contributed under MIT/X11 license.
10100 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
10102 * reflection.c (mono_dynamic_image_free): Free MonoDynamicImage::public_key.
10104 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
10106 * class.c (mono_type_get_full): Add a work-around for generic type definitions.
10108 2008-06-04 Mark Probst <mark.probst@gmail.com>
10110 * threads.c: Try to free everything from the delayed free table
10111 when shutting down threads, and set the variable to NULL after the
10112 table is freed so that calling
10113 mono_thread_hazardous_try_free_all() when shutting down the root
10114 domain doesn't crash.
10116 2008-06-04 Rodrigo Kumpera <rkumpera@novell.com>
10118 * class.c (mono_type_retrieve_from_typespec): Add an argument to inform
10119 the caller if resulting type was inflated.
10121 * class.c (mono_class_create_from_typespec): Free the MonoType if it
10124 * class.c (mono_type_get_full): Free the MonoType if it was inflated.
10127 2008-06-04 Zoltan Varga <vargaz@gmail.com>
10129 * decimal.c (rescale128): Rework the code a bit so it no longer crashes the
10130 class library tests.
10132 * icall.c (ves_icall_InternalInvoke): Applied patch from Andy Hume
10133 (andyhume32@yahoo.co.uk). Add more useful exception messages. Fixes
10136 2008-06-04 Mark Probst <mark.probst@gmail.com>
10138 * domain.c, domain-internals.h: The JIT infos are now freed by the
10139 JIT info table code. They are freed immediately if there only a
10140 single JIT info table in circulation. If there is more, the free
10141 is delayed via a queue.
10143 * threads.c, threads-types.h: New hazard pointer function for
10144 freeing all freeable delayed items in one sitting.
10146 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10148 * reflection.c (typebuilder_setup_fields): Use mempool for allocations.
10150 * reflection.c (typebuilder_setup_properties): Same.
10152 * reflection.c (typebuilder_setup_events): Same.
10154 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10156 * reflection.c (mono_custom_attrs_from_builders): Receive a MonoMemPool
10157 and use it for allocating memory.
10159 * reflection.c (mono_marshal_spec_from_builder): Same.
10161 * reflection.c: Change code to use new signatures.
10163 * metadata.c (mono_metadata_type_dup): Add a FIXME note.
10165 2008-06-03 Zoltan Varga <vargaz@gmail.com>
10167 * decimal.c (rescale128): Put back one line which was accidently commented
10170 * decimal.c (rescale128): Disable the code added by the last patch, as it seems
10173 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10175 * reflection.c (mono_reflection_generic_class_initialize): Name must
10176 be always malloc'ed so we can free it later on. Do this for field, property
10179 * metadata.c (free_generic_class): Free field, property and event names.
10181 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10183 * reflection.c (fieldbuilder_to_mono_class_field): Use mono_metadata_type_dup
10184 instead of g_memdup.
10186 * reflection.c (typebuilder_setup_fields): Same.
10188 2008-06-03 Zoltan Varga <vargaz@gmail.com>
10190 * decimal.c (rescale128): Optimize this function a bit more.
10192 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10194 * metadata.c (free_generic_class): Release some memory from
10195 SRE generic classes.
10197 2008-06-03 Rodrigo Kumpera <rkumpera@novell.com>
10199 * reflection.c (mono_image_get_generic_field_token): No reference
10200 to name is kept, free it.
10202 * reflection.c (mono_reflection_generic_class_initialize): Free
10203 more memory of the inflated field.
10205 2008-06-03 Zoltan Varga <vargaz@gmail.com>
10207 * decimal.c (mono_decimalDiv): Moved equality checks here from managed
10210 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
10212 * reflection.c (mono_dynamic_image_free): Release memory used by
10213 MonoDynamicImage::array_methods elements.
10215 * reflection.c (assembly_add_win32_resources): Release memory after
10218 2008-06-02 Zoltan Varga <vargaz@gmail.com>
10220 * decimal.c (log2_32): Use an optimized version for this function too.
10222 * decimal.c (log2_64): Fix this on 32 bit machines.
10224 2008-06-02 Rodrigo Kumpera <rkumpera@novell.com>
10226 * class.c (mono_dup_array_type): Implement allocation using a mempool.
10228 * class.c (mono_metadata_signature_deep_dup): Same.
10230 * metadata.c (mono_metadata_signature_dup_full): Added, allow dup'ng with
10233 * metadata.c (mono_metadata_signature_dup): Delegate to the _full version.
10235 * metadata.c (mono_metadata_type_dup): Remove asserts and FIXME.
10237 * metadata-internals.h: Added mono_metadata_signature_dup_full.
10239 * class-internals.h: Update signatures to take a MonoMemPool.
10241 2008-06-02 Dick Porter <dick@ximian.com>
10243 * icall.c (ves_icall_System_ComponentModel_Win32Exception_W32ErrorMessage):
10245 System.ComponentModel.Win32Exception.W32ErrorMessage, using the
10246 FormatMessage API to get the error text. Fixes bug 321827.
10248 2008-06-02 Zoltan Varga <vargaz@gmail.com>
10250 * decimal.c: Add some micro optimizations to make decimal operations faster.
10252 2008-06-01 Rodrigo Kumpera <rkumpera@novell.com>
10254 * reflection.c (method_encode_clauses): Take a mempool
10255 as parameter and use it to allocate the clause array.
10257 * reflection.c (mono_image_get_field_on_inst_token): Free
10258 the inflated type after encoding it.
10260 * reflection.c (mono_dynamic_image_free): Free each element
10261 of MonoDynamicImage::gen_params.
10263 * reflection.c (reflection_methodbuilder_to_mono_method):
10264 Allocate the generic param array from the mempool.
10265 Allocate signature params from the mempool.
10267 * reflection.c (mono_reflection_generic_class_initialize):
10268 Free inflated fields after been used.
10270 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
10272 * icall.c: Reapply the memory leak fixes as they no
10273 longer make mono crash.
10275 2008-05-30 Rodrigo Kumpera <rkumpera@novell.com>
10277 * reflection.c (mono_type_get_object): Don't store the suplied
10278 MonoType with type_hash. A caller which pass a type that
10279 was mono_metadata_type_dup'ed cannot free it reliably, as type_hash
10280 might end with a pointer to freed memory.
10281 The solution is to use byval_arg or this_arg from the associated
10282 MonoClass of the supplied type.
10284 2008-05-29 Zoltan Varga <vargaz@gmail.com>
10286 * icall.c: Revert the rest of the last change as it breaks the build too.
10288 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
10290 * icall.c: Revert a leak fix as it's breaking the build.
10292 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
10294 * appdomain.c (mono_make_shadow_copy): Fix another leak of dir_name.
10296 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
10298 * appdomain.c (mono_make_shadow_copy): We leaked dir_name.
10300 2008-05-29 Rodrigo Kumpera <rkumpera@novell.com>
10302 * icall.c: Fix some memory leaks.
10304 2008-05-29 Dick Porter <dick@ximian.com>
10306 * threadpool.c (mono_thread_pool_remove_socket): Always remove the
10307 async socket operations from the pending list when a socket
10308 closes. Leaving it until the threadpool services the event
10309 exposes a race condition when a socket descriptor is reused.
10312 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10314 * object.c: Fix negative index check for array alocation.
10316 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10318 * icall.c, marshal.c: Delegate wrappers should skip visibility.
10319 This check is performed by the verifier for IL created delegates
10320 and by Delegate::CreateDelegate for programatically created ones.
10323 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10325 * sockey-io.c (ves_icall_System_Net_Sockets_Socket_Select_internal):
10326 Fix code to use mono_array_size_t instead of int.
10328 Based on patch by Luis F. Ortiz.
10329 Contributed under X11 license.
10330 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10332 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10334 * icall.c: Added ves_icall_System_Array_GetLongLength and
10335 ves_icall_System_Array_CreateInstanceImpl64. Both allow handling big
10338 * icall.h: Export both new functions.
10340 Based on patch by Luis F. Ortiz.
10341 Contributed under X11 license.
10342 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10344 2008-05-28 Martin Baulig <martin@ximian.com>
10346 The debugger now requires exactly r103463.
10348 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 71.
10349 This version is not supported by the debugger, wait for 72.
10351 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10353 * object.h: Changed array related functions to use
10354 mono_array_size_t instead of guint32. Forgot to commit this file.
10356 Patch by Luis F. Ortiz.
10357 Contributed under X11 license.
10358 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10361 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
10363 * object.h: Don't use G_MAXINT32 or G_MAXUINT32 as old glibs
10364 don't define it. Use the number literal instead.
10366 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
10368 * icall.c: Changed array related functions to use
10369 mono_array_size_t instead of guint32.
10371 * icall.c (ves_icall_System_Array_GetLength): Check for length
10372 overflow under MONO_BIG_ARRAYS.
10374 Based on patch by Luis F. Ortiz.
10375 Contributed under X11 license.
10376 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10378 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
10380 * object.c: Add 64bits bounds check for arrays under MONO_BIG_ARRAYS.
10382 Based on patch by Luis F. Ortiz.
10383 Contributed under X11 license.
10384 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10386 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
10388 * object.c, object.h: Changed array related functions to use
10389 mono_array_size_t instead of guint32.
10391 Patch by Luis F. Ortiz.
10392 Contributed under X11 license.
10393 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10395 2008-05-27 Rodrigo Kumpera <rkumpera@novell.com>
10397 * object.h: Introduced mono_array_size_t typedef. This must be used
10398 in all places an array length is expected. This is 64bits wide if
10399 MONO_BIG_ARRAYS is enabled.
10401 Patch by Luis F. Ortiz.
10402 Contributed under X11 license.
10403 http://lists.ximian.com/pipermail/mono-devel-list/2008-May/027995.html
10405 2008-05-27 Zoltan Varga <vargaz@gmail.com>
10407 * security-manager.c class.c: Set the class exception info by calling
10408 mono_class_set_failure ().
10410 * class.c (mono_class_get_exception_data): New accessor function.
10411 (mono_class_set_failure): Store exception_data in the property hash.
10413 * class-internals.h (struct _MonoClass): Store 'exception_data' outside
10414 the struct as a property.
10416 * loader.c (mono_get_method_full): Store the lookup result for method
10417 tokens in method_cache, the others in methodref_cache to decrease the memory
10418 usage of hash tables.
10420 * image.c (mono_image_close): Destroy method_cache and methodref_cache.
10421 (mono_image_init): method_cache is lazy inited now.
10423 * metadata-internals.h (struct _MonoImage): Change method_cache to
10424 a MonoValueHashTable, add a separate methodref_cache.
10426 2008-05-27 Eyal Alaluf <eyala@mainsoft.com>
10428 * number-formatter.h: Fix tables to avoid arithemtic overflow in
10429 Double.ToString as exposed by Bug #383531.
10431 2008-05-26 Zoltan Varga <vargaz@gmail.com>
10433 * number-formatter.h: Make some tables static.
10435 * class.c (mono_method_set_generic_container): New accessor function.
10436 (mono_method_get_generic_container): Ditto.
10438 * class-internals.h (struct _MonoMethod): Remove rarely used
10439 'generic_container' field, store it in the property hash instead. Add
10440 'is_generic' boolean field instead.
10442 * image.c (mono_image_init): Initialize property_hash.
10443 (mono_image_close): Destroy property_hash.
10445 * metadata-internals.h (struct _MonoImage): Add 'property_hash' hash table to
10446 hold rarely used fields of runtime structures belonging to this image.
10448 * class.c loader.c verify.c icall.c reflection.c: Use the new accessor functions
10449 to get/set method->generic_container.
10451 * loader.c (mono_get_method_from_token): Avoid loading the method header for
10454 2008-05-25 Zoltan Varga <vargaz@gmail.com>
10456 * class.c (mono_class_inflate_generic_method_full): Don't increase
10457 mono_stats.inflated_method_count for methods found in the cache.
10459 * threads.c (mono_thread_request_interruption): Add a comment about
10462 2008-05-24 Zoltan Varga <vargaz@gmail.com>
10464 * class.c (setup_interface_offsets): Use sizeof (guint16) when allocating the
10465 interface_offsets_packed table.
10467 * class.c (mono_class_init): Remove some dead code.
10469 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Call
10470 mono_class_setup_vtable () when CAS is active to detect security problems.
10472 2008-05-23 Rodrigo Kumpera <rkumpera@novell.com>
10474 * verify.c (mono_delegate_type_equal): Handle VAR, MVAR and GENERICINST.
10476 * verify.c (mono_delegate_signature_equal): Don't compar number of generic
10477 parameters as it's irrelevant for delegate checking.
10479 2008-05-23 Zoltan Varga <vargaz@gmail.com>
10481 * class-internals.h class.c: Correct the name of the 'mono_no_setup_vtable_in_class_init' variable.
10483 * class.c (mono_class_init): Control the creation of a generic vtable using
10484 a global which is true by default, but set to false by the runtime startup code.
10486 * class.c (mono_class_init): Avoid constructing a generic vtable in most cases.
10487 Disabled for now since it breaks the embedding API.
10488 Move the setup of class->methods for arrays to mono_class_setup_methods ().
10489 (mono_class_setup_methods): Add a memory barrier.
10491 * object.c (mono_class_create_runtime_vtable): Add code to handle the case
10492 when mono_class_init () doesn't compute the generic vtable.
10494 2008-05-23 Massimiliano Mantione <massi@ximian.com>
10495 * profiler.c: Added mono_profiler_install_statistical_call_chain,
10496 mono_profiler_stat_get_call_chain_depth and mono_profiler_stat_call_chain
10497 to support call chains (backtrace) in the stat profiler.
10498 * profiler.c, profiler-private.h: Likewise.
10500 2008-05-22 Mark Probst <mark.probst@gmail.com>
10502 * generic-sharing.c: Init generic class when a method of it is
10503 requested via a runtime generic context.
10505 2008-05-22 Zoltan Varga <vargaz@gmail.com>
10507 * class.c (mono_class_init): Add a comment about trying to avoid calling this.
10509 * reflection.c (mono_type_get_object): Add a FIXME.
10511 * loader.c (find_method_in_class): Use mono_class_get_method_by_index ().
10513 * class.c (mono_class_get_method_by_index): New helper function, returning an
10514 entry in the class->methods array.
10516 2008-05-21 Zoltan Varga <vargaz@gmail.com>
10518 * class.c (mono_class_init): Only do the array optimization for szarrays.
10519 Avoid creating a generic vtable for generic instances as well.
10520 (mono_class_get_method_from_name_flags): Don't search in the metadata for
10523 2008-05-21 Rodrigo Kumpera <rkumpera@novell.com>
10525 * loader.c (mono_get_method_constrained): Inflate the signature
10526 with class context. Fix #325283.
10528 2008-05-21 Zoltan Varga <vargaz@gmail.com>
10530 * object.c (mono_class_create_runtime_vtable): Add a comment.
10532 * class.c (get_implicit_generic_array_interfaces): Call mono_class_init ()
10534 (setup_interface_offsets): Handle the case when this is called twice for arrays.
10535 (mono_class_setup_vtable_general): Add an assert.
10536 (mono_class_init): Avoid creating a generic vtable for arrays.
10538 * class.c (mono_generic_class_get_class): Don't call setup_interface_offsets ()
10539 here, let mono_class_init () do that.
10541 * class.c (mono_class_init): Avoid calling mono_class_setup_methods () for
10542 interfaces in mscorlib.
10544 * class.c (mono_class_setup_vtable): Avoid calling setup_methods () for
10545 interfaces. Add some comments.
10546 (mono_class_init): Call mono_class_setup_methods () here since it is no
10547 longer called by mono_class_setup_vtable ().
10549 * object.c (mono_class_proxy_vtable): Null out entries in pvt->vtable which are
10550 not set in class->vtable.
10551 (mono_class_create_runtime_vtable): Reenable the disabled code.
10553 * object.c (mono_class_create_runtime_vtable): Disable the last change for
10554 now as it causes some test failures.
10556 * object.c (mono_class_create_runtime_vtable): Avoid creating a generic vtable
10557 if using the vtable trampoline. Also remove some strange code which put the
10558 generic methods themselves into the vtable slots. Remove the AOT init_vtable
10559 stuff as it is no longer needed.
10561 2008-05-19 Rodrigo Kumpera <rkumpera@novell.com>
10563 * pedump.c: Give make --verify all option check code as well.
10564 Using --verify code won't check for metadata now.
10566 2008-05-19 Martin Baulig <martin@ximian.com>
10568 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 70.
10571 (_mono_debug_using_mono_debugger): New global variable; it's set
10572 directly by the debugger, so mono_debug_using_mono_debugger() also
10573 works after attaching.
10575 2008-05-18 Rodrigo Kumpera <rkumpera@novell.com>
10577 * object.c (mono_class_create_runtime_vtable): Use memory barriers
10578 as we do double checked locking on MonoClass::runtime_info and
10579 MonoClassRuntimeInfo::domain_vtables.
10581 2008-05-18 Zoltan Varga <vargaz@gmail.com>
10583 * debug-helpers.c (print_field_value): Fix a warning.
10585 2008-05-16 Zoltan Varga <vargaz@gmail.com>
10587 * object.c (mono_object_get_virtual_method): Fix a crash if method->slot is not
10588 set in the AOT case.
10590 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
10592 * class.c (mono_class_setup_vtable_general): Use memory barriers
10593 as we do double checked locking on MonoClass::vtable.
10595 2008-05-16 Rodrigo Kumpera <rkumpera@novell.com>
10597 * reflection.c (resolve_object): Inflate only if the generic context
10598 is not null. Fixes #389886.
10600 2008-05-15 Jonathan Chambers <joncham@gmail.com>
10602 * metadata.c (emit_marshal_string): Free return strings using mono_marshal_free
10605 Code is contributed under MIT/X11 license.
10607 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
10609 * class.c: Revert unrelated change.
10611 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
10613 * verify.c (check_is_valid_type_for_field_ops): Type on stack can be
10614 a generic instantiation, use mono_class_from_mono_type instead of playing
10615 with MonoType directly.
10617 2008-05-14 Rodrigo Kumpera <rkumpera@novell.com>
10619 * class.c: Added mono_class_has_parent_and_ignore_generics. Visibility
10620 checks must ignore generic instantiations, so mono_class_has_parent is not
10621 suitable. Fixes #390128.
10623 2008-05-14 Zoltan Varga <vargaz@gmail.com>
10625 * reflection.c (mono_image_create_token): Add a 'register_token' argument, and use
10626 it to avoid registering tokens during metadata generation. Fixes #390023.
10628 2008-05-14 Kornél Pál <kornelpal@gmail.com>
10630 * coree.c: Rename dwOldProtect to OldProtect that makes naming convention
10633 Contributed under MIT/X11 license.
10635 2008-05-14 Kornél Pál <kornelpal@gmail.com>
10637 * domain.c (mono_init_internal): Enable LoadLibrary support. Load EXE image
10638 even when get_runtimes_from_exe didn't load it that allows mono_fixup_exe_image
10639 to fixup the EXE image.
10640 (mono_cleanup): Use mono_close_exe_image.
10641 (mono_close_exe_image): New function.
10642 * image.c: Include "marshal.h".
10643 (mono_image_open_from_module_handle): Add ref_count argument. Return the image.
10644 (mono_image_open_full, mono_image_close): Fix LoadLibrary/FreeLibrary reference
10645 counting when the image is loaded outside of mono_image_open_full. Set status
10646 based on GetLastError.
10647 * coree.c: Include required headers. Add init_from_coree.
10648 (_CorDllMain): Support fix in mono_image_open_full, mono_image_close. Call
10649 mono_assembly_open only when the image has vtfixups. Set init_from_coree.
10650 (_CorExeMain): Set init_from_coree.
10651 (CorExitProcess): Only call ExitProcess for now.
10652 (CorBindToRuntimeEx): New stub implementation.
10653 (CorBindToRuntime): New function.
10654 (MonoFixupCorEE): Fixup CorBindToRuntime and CorBindToRuntimeEx.
10655 (MonoFixupExe): ILONLY executables require no fixups.
10656 (mono_set_act_ctx): New function to set activation context.
10657 (mono_load_coree): Use init_from_coree. Call mono_set_act_ctx.
10658 * coree.h: Move STATUS_SUCCESS and STATUS_INVALID_IMAGE_FORMAT to header.
10659 Declare mono_module_handle, coree_module_handle, mono_get_module_file_name,
10660 mono_load_coree, mono_fixup_exe_image and mono_image_open_from_module_handle
10662 * domain-internals.h: Add mono_close_exe_image.
10664 Contributed under MIT/X11 license.
10666 2008-05-13 Rodrigo Kumpera <rkumpera@novell.com>
10668 * metadata.c (mono_metadata_compute_size): Correctly calculate field
10669 size for generic param and event tables. Fixes #388977.
10671 2008-05-13 Zoltan Varga <vargaz@gmail.com>
10673 * loader.c (mono_method_signature): Use memory barriers because of the double
10674 checked locking pattern.
10676 * threads.c (remove_and_abort_threads): Stop and wait for threads which are
10677 aborting or aborted as well. Fixes #376391.
10679 * threads.c (mono_thread_execute_interruption): Avoid depending on no longer
10680 existing runtime state in the Suspend handler during shutdown.
10682 2008-05-12 Zoltan Varga <vargaz@gmail.com>
10684 * threads.c (mono_thread_request_interruption): Add some FIXMEs.
10686 * threads.c (mono_thread_suspend_all_other_threads): Add support for threads
10687 which are starting up or shutting down.
10689 * threads.c (mono_threads_set_shutting_down): Don't return a value since
10690 this function never returns if the runtime is already shutting down.
10692 * icall.c (ves_icall_System_Environment_Exit): Update after
10693 mono_threads_set_shutting_down () signature change.
10695 2008-05-09 Rodrigo Kumpera <rkumpera@novell.com>
10697 * class.c: Added can_access_instantiation to verify if the instantiation
10698 is visible. Fix access check for nested types as they returned TRUE
10699 before doing type and generic instantiation visibility checks.
10701 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
10703 * reflection.c (mono_reflection_create_generic_class): The created type
10704 must have a different container from its TypeBuilder. Otherwise they
10705 will end sharing generic arguments, which is wrong.
10707 Due to the sharing, making a generic instance of the created type using
10708 the TypeBuider generic arguments resulted in the generic type definition
10709 been returned, which is wrong as well.
10711 As a bonus the code was leaking the type_params array. This memory should
10712 be allocated from the image mempool.
10714 This fixes bug #354047.
10716 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
10718 * metadata-internals.h: Move MONO_SECMAN_FLAG macros from mini/declsec.h
10719 to here as they are now used in assembly.c new code.
10720 Added a skipverification flag to MonoAssembly.
10721 New internal function mono_assembly_has_skip_verification.
10723 * assembly.c: New function mono_assembly_has_skip_verification. It checks
10724 if an assembly has a version 2.0 SkipVerification security attribute. Fixes
10727 2008-05-07 Zoltan Varga <vargaz@gmail.com>
10729 * object.c (mono_object_get_virtual_method): Inflate the resulting method if
10730 needed. Fixes #387034.
10732 * class.c (mono_class_inflate_generic_type): Avoid a crash if context is NULL.
10734 2008-05-06 Miguel de Icaza <miguel@novell.com>
10736 * assembly.c (mono_assembly_load_reference): Prevent crash while
10737 disassembling Silverlight 2.0 executables while we still do not
10738 have GACed libraries.
10740 2008-05-07 Zoltan Varga <vargaz@gmail.com>
10742 * reflection.c: Special case generic type definitions as well. Fixes #383444.
10744 2008-05-06 Zoltan Varga <vargaz@gmail.com>
10746 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Fix handling
10747 of the dynamic case. Fixes #387404.
10749 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
10751 *verify.c (mono_verifier_is_class_full_trust): If under
10752 verify_all and the verifier mode was not set, only
10753 gac and corlib types are fulltrust. This makes --verify-all
10754 usable to detect unverifiable code, which is the expected
10757 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
10759 * verify.h: Ops, commited the header with debug
10762 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
10764 * verify.c (merge_stack): Use the new value on unverifiable
10767 * verify.c (verify_type_compatibility_full): Comparison
10768 of nullable types can't use mono_class_is_assignable_from.
10770 * verify.c, verify.h: Added MONO_VERIFY_REPORT_ALL_ERRORS
10771 that makes all verification errors be reported.
10773 * pedump.c: Pass MONO_VERIFY_REPORT_ALL_ERRORS to
10774 mono_method_verify.
10776 2008-05-05 Robert Jordan <robertj@gmx.net>
10778 * marshal.c (mono_marshal_get_thunk_invoke_wrapper):
10779 support for value types. See #386415.
10781 * object.c: comments.
10783 Code is contributed under MIT/X11 license.
10785 2008-05-05 Martin Baulig <martin@ximian.com>
10787 * debug-mono-symfile.h
10788 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): Removed; dropped support
10789 for old pre-terrania symbol files.
10791 2008-05-05 Andreas Färber <andreas.faerber@web.de>
10793 * mono-config.c: Add ppc64 architecture.
10795 Code is contributed under MIT/X11 license.
10797 2008-05-05 Andreas Färber <andreas.faerber@web.de>
10799 * object.c (mono_create_ftnptr, mono_get_addr_from_ftnptr):
10800 PPC64 uses function descriptors as well.
10802 Code is contributed under MIT/X11 license.
10804 2008-05-04 Zoltan Varga <vargaz@gmail.com>
10806 * object.c (compute_class_bitmap): Ignore literal static fields.
10808 * sgen-gc.c (mono_gc_base_init): Print some help when the MONO_GC_DEBUG env
10809 var has an invalid format.
10810 (describe_ptr): Add some sanity checks for the vtable.
10811 (add_nursery_frag): Clear unused nursery fragments.
10812 (major_collection): Clear all remaining nursery fragments.
10814 2008-05-03 Robert Jordan <robertj@gmx.net>
10816 * image.c, metadata-internals.h: add thunk_invoke_cache.
10818 * marshal.c, marshal.h: implement
10819 mono_marshal_get_thunk_invoke_wrapper ().
10821 * object.c, object.h: implement mono_method_get_unmanaged_thunk ().
10823 Code is contributed under MIT/X11 license.
10825 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
10827 * verify.c (do_leave): Empty the stack.
10829 2008-05-02 Rodrigo Kumpera <rkumpera@novell.com>
10831 * class.c (mono_class_is_assignable_from): Variance
10832 doesn't work between reference and value types. For example,
10833 given type C<T+>, C<int32> is not assignable to C<object>.
10834 Break the argument checking loop on first error.
10836 2008-05-02 Atsushi Enomoto <atsushi@ximian.com>
10838 * icall.c : base64_to_byte_array() needs some more strict
10839 check for sequence of '=' characters. Patch by Santa
10840 Marta (http://deee.g.hatena.ne.jp/santamarta).
10842 Contributed under MIT/X11 license.
10843 (see http://www.lingr.com/room/mono-jp/archives/2008/04/20)
10845 2008-05-02 Jonathan Chambers <joncham@gmail.com>
10847 * domain.c: Disable LoadLibrary support to fix Win32 build.
10849 Code is contributed under MIT/X11 license.
10851 2008-05-02 Zoltan Varga <vargaz@gmail.com>
10853 * sgen-gc.c: Add support for clearing nursery memory when a tlab is allocated,
10854 to help with cache behaviour.
10856 2008-05-01 Miguel de Icaza <miguel@novell.com>
10858 * appdomain.c (mono_domain_from_appdomain): Add new accessor
10861 2008-05-01 Zoltan Varga <vargaz@gmail.com>
10863 * sgen-gc.c: Implement thread-local allocation and a managed allocation routine.
10865 2008-05-01 Dick Porter <dick@ximian.com>
10867 * process.c (process_get_fileversion): Only pass 16 bits of
10868 language ID to VerLanguageName. Fixes bug 381204.
10870 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
10872 * verify.c (mono_method_verify): Fix the comparison
10873 operator for code bounds check.
10875 2008-04-30 Rodrigo Kumpera <rkumpera@novell.com>
10877 * verify.c (mono_method_verify): Check the bounds of
10878 all access of the code array.
10880 2008-04-29 Kornél Pál <kornelpal@gmail.com>
10882 * appdomain.c: Use HAVE_SYS_UTIME_H that fixes MSVC build.
10884 2008-04-28 Zoltan Varga <vargaz@gmail.com>
10886 * image.c (mono_image_strong_name_position): Fix return value when the rva is
10889 2008-04-28 Kornél Pál <kornelpal@gmail.com>
10891 * loader.c (mono_get_method_from_token, mono_method_signature): Add
10892 support for METHOD_IMPL_ATTRIBUTE_NATIVE.
10893 * domain.c (mono_init_internal): Load and fixup mscoree.dll on startup and
10894 fixup main EXE images when using mono.exe for mixed-mode assembly support.
10895 * domain-internals.h: Add MonoLoadFunc, mono_install_runtime_load and
10897 * appdomain.c: Add mono_install_runtime_load, mono_runtime_load to support
10898 runtime initialization from metadata.
10899 * assembly.c: Remove obsolete ceGetModuleFileNameA.
10900 (mono_set_rootdir): Use mono_get_module_file_name.
10901 (mono_assembly_load_from_full): Call mono_image_fixup_vtable for module
10903 * cil-coff.h: Add MonoVTableFixup. Update mono_cli_rva_image_map signature.
10904 * metadata-internals.h: Add is_module_handle to _MonoImage on Windows.
10905 * image.c (mono_cli_rva_image_map): Use MonoImage instead of
10906 MonoCLIImageInfo. Add support for module handles.
10907 (load_cli_header): Update mono_cli_rva_image_map signature.
10908 (load_metadata_ptrs): Update mono_cli_rva_image_map signature.
10909 (mono_image_strong_name_position): Use mono_cli_rva_image_map.
10910 (mono_image_rva_map): Add support for module handles.
10911 (mono_image_ensure_section_idx): Add support for module handles.
10912 (mono_image_close): Add support for module handles.
10913 (do_load_header): Add support for module handles.
10914 (mono_image_open_from_module_handle): New function for internal use.
10915 (mono_image_open_full): Load normal images using LoadLibrary on Windows.
10916 (mono_image_load_module): Call mono_image_fixup_vtable for module handles.
10917 (mono_image_load_file_for_image): Call mono_image_fixup_vtable for module
10919 (mono_image_fixup_vtable): New function for mixed-mode assembly support.
10920 * image.h: Add mono_image_fixup_vtable.
10921 * coree.c: New file for mscoree.dll functions and mixed-mode assembly
10923 * coree.h: New file.
10924 * marshal.c (mono_marshal_get_native_wrapper): Throw exception for
10925 unsupported native code.
10926 (mono_marshal_set_callconv_from_modopt): New function splitted from
10927 mono_marshal_get_managed_wrapper.
10928 (mono_marshal_get_managed_wrapper): Use
10929 mono_marshal_set_callconv_from_modopt.
10930 (mono_marshal_get_vtfixup_ftnptr): New function for mixed-mode assembly support.
10931 * marshal.h: Add mono_marshal_get_vtfixup_ftnptr.
10932 * gc.c (mono_gc_init): Don't wait for the finalizer thread on Windows because
10933 that results in a deadlock when the runtime is loaded in _CorDllMain.
10934 * Makefile.am: Add coree.c and coree.h.
10936 Contributed under MIT/X11 license.
10938 2008-04-28 Mark Probst <mark.probst@gmail.com>
10940 * generic-sharing.c: Search for type arguments in array element
10943 2008-04-28 Mark Probst <mark.probst@gmail.com>
10945 * class-internals.h, generic-sharing.c: New, small runtime generic context.
10947 * metadata-internals.h, domain.c, image.c: Less bookkeeping is required for the new RGCTX.
10949 * object.c: Don't setup the RGCTX when the vtable is created,
10950 because we're setting it up lazily now.
10952 2008-04-26 Zoltan Varga <vargaz@gmail.com>
10954 * sgen-gc.c: Make the 'desc' variables an mword instead of a guint32 to fix
10957 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
10959 * verify.c (verify_class_for_overlapping_reference_fields):
10960 If class is under fulltrust allow reference types to overllap
10961 if they have the same RVA.
10963 2008-04-24 Rodrigo Kumpera <rkumpera@novell.com>
10965 * pedump.c: Added new flag valid-only, that makes the verifier
10966 behaves just like --security=validil. It won't fail type load
10967 due to unverifiable restrictions.
10969 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
10971 * class-internals.h (struct MonoMethod): Added a verification_success
10972 field to cache verifier executions. Reduced MonoMethod:slot size by
10975 2008-04-23 Zoltan Varga <vargaz@gmail.com>
10977 * sgen-gc.c (OBJ_RUN_LEN_SIZE): Make this and other macros take a 'desc' argument
10978 instead of a 'vt' argument to save an indirection and to allow these to be used
10980 (scan_vtype): New helper function to scan an area using a gc descriptor.
10981 (mono_gc_wbarrier_value_copy): Implement this.
10982 (handle_remset): Add support for REMSET_VTYPE.
10983 (find_in_remset_loc): Ditto.
10984 (mono_gc_base_init): Allow some debugging options to be controlled through the
10985 use of the MONO_GC_DEBUG env variable.
10986 (mono_gc_alloc_obj): Add support the 'collect-before-allocs' debug option.
10987 (collect_nursery): Add support for the 'check-at-minor-collection' debug option.
10989 2008-04-23 Martin Baulig <martin@ximian.com>
10991 * domain.c (mono_domain_create): Move the call to
10992 mono_debug_domain_create() down, after allocating the domain id.
10994 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
10996 verify.c (verify_class_for_overlapping_reference_fields): Skip
10997 static fields while verifying for overlapping fields as they
10998 don't matter at all.
11000 2008-04-23 Marek Habersack <mhabersack@novell.com>
11002 * domain-internals.h: added a declaration of
11003 mono_make_shadow_copy.
11005 * assembly.c (mono_assembly_open_full): shadow copying of
11006 assemblies moved to here, so that all the assemblies within the
11007 application domain's private binary directories can be
11008 processed. Fixes bug #380546
11010 * appdomain.c (mono_make_shadow_copy): make_shadow_copy renamed to
11011 mono_make_shadow_copy and made non-static. The decision whether
11012 to shadow-copy an assembly is made based on its location - it's
11013 copied if it's in one of the private application domain binary
11014 directories and its different to the target file in the shadow
11015 directory. Fixes bug #380546
11017 2008-04-22 Zoltan Varga <vargaz@gmail.com>
11019 * reflection.c (fixup_method): Handle {Method|Constructor}OnTypeBuilderInst.
11021 * object-internals.h: Add MonoReflection{Method|Constructor}OnTypeBuilderInst
11024 * reflection.c (mono_image_create_token): Handle
11025 Method/ConstructorOnTypeBuilderInst.
11026 (resolve_object): Ditto.
11027 (inflate_mono_method): Receive the inflated class instead of a MonoGenericClass
11028 so it can be called from resolve_object. Also handle the case when the inflated
11029 class already has its methods setup.
11031 2008-04-21 Martin Baulig <martin@ximian.com>
11033 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 69.
11035 2008-04-20 Geoff Norton <gnorton@novell.com>
11037 * icall.c: Fix the _NSGetEnviron define to prevent an impropoer
11038 pointer dereference.
11040 2008-04-15 Marek Habersack <mhabersack@novell.com>
11042 * appdomain.c (try_load_from): if IOMAP is in effect, call the
11043 portability API to look up the assembly file. Fixes behavior in
11044 situations when the application has a bin/ directory, but the
11045 assembly search patch refers to Bin/ (and thus the requested file
11046 name is Bin/SomeLibrary.dll). Fixes bug #379888
11048 2008-04-15 Rodrigo Kumpera <rkumpera@novell.com>
11050 verify.c (mono_type_is_generic_argument): Extracted this check
11051 from a dozen places to here.
11053 verify.c: Fixed all issues related to boxing generic arguments
11054 and their constraints.
11056 2008-04-14 Rodrigo Kumpera <rkumpera@novell.com>
11058 verify.c (mono_class_interface_implements_interface): Fix win32 build.
11060 2008-04-14 Zoltan Varga <vargaz@gmail.com>
11062 * reflection.c (mono_custom_attrs_construct): Fix crash when the cattr type
11063 isn't finished yet. Fixes #363447.
11065 2008-04-13 Zoltan Varga <vargaz@gmail.com>
11067 * class.c (mono_bounded_array_class_get): Fix the name of bounded array types.
11070 2008-04-13 Jb Evain <jbevain@novell.com>
11072 * domain.c: update the 2.1 profile versions.
11073 Merged from the Moonlight 2 branch.
11075 2008-04-12 Zoltan Varga <vargaz@gmail.com>
11077 * assembly.c (mono_assembly_load_from_full): Do the check for loading other
11078 mscorlibs for the non-refonly case as well.
11080 * image.c (do_mono_image_load): Remove the mscorlib check, it is already done
11081 in mono_assembly_load_from_full (). Fixes #378924.
11083 2008-04-11 Geoff Norton <gnorton@novell.com>
11085 * icall.c: The global extern environ doesn't exist on Mac. We
11086 need to call NSGetEnviron instead.
11088 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11090 verify.c: Add generic method constraint verification.
11092 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11094 class.c (mono_class_inflate_generic_method_full): Add a long
11095 explanation to the is_mb_open hack. Remove the FIXME.
11097 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11099 * verify.c (mono_method_verify): Mark all unknown opcodes
11100 as invalid. Mark jmp as unverifiable.
11102 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11104 * verify.c: Add code to do type constraint verification on class instances.
11106 * verify.c (mono_verifier_verify_class): Use the type constraint
11109 2008-04-10 Rodrigo Kumpera <rkumpera@novell.com>
11111 * class.c (mono_class_get_field_default_value): Don't pass cindex
11112 as hint to mono_metadata_get_constant_index. The local is not initialized
11113 and should contain garbage most of the time. This could only work
11114 with a lot of luck.
11116 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
11118 * tokentype.h: Add MONO_TOKEN_GENERIC_PARAM.
11120 2008-04-09 Rodrigo Kumpera <rkumpera@novell.com>
11122 * class-internals.h: Add generic_param_token to MonoClass::sizes union.
11124 * class.c (mono_class_from_generic_parameter): Save the token of the
11125 generic param in MonoClass::sizes.generic_param_token.
11127 * reflection.c (mono_custom_attrs_from_class): If the class type is
11128 VAR or MVAR retrieve the attributes of the generic param.
11130 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
11132 * class.c (mono_class_init): Do class verification if the verifier
11135 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
11137 * verify-internal.h: Added mono_verifier_verify_class.
11139 * verify.c: Added mono_verifier_verify_class. It checks for
11140 classes with explicit layout that have overlapping reference fields.
11142 * pedump.c: Init the verifier state prior to verification. Fixed
11143 command line arguments.
11145 2008-04-08 Rodrigo Kumpera <rkumpera@novell.com>
11147 * Makefile.am: Added verify-internals.h, hopefully fix the build.
11149 2008-04-08 Zoltan Varga <vargaz@gmail.com>
11151 * verify-internals.h: Fix a warning.
11153 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
11155 * verify-internals.h: New header with the verifier configuration
11156 extracted from mini.c.
11158 * verify.c: Implemented the new functions exported by verify-internals.h.
11160 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
11162 * verify.c: Add proper verification of ckfinite.
11164 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
11166 * verify.c (do_conversion): Improved error message to something
11169 * verify.c (check_is_valid_type_for_field_ops): Fix to work
11170 with primitive types.
11172 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
11174 * verify.c: Added tail prefix checking. Marked icall
11177 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
11179 * verify.c: Fix the detection of branches to the middle
11182 2008-04-03 Rodrigo Kumpera <rkumpera@novell.com>
11184 * verify.c: Implemented verification of volatile. and
11185 unaligned. prefix. Check if a type is valid after retrieving it.
11187 2008-04-01 Dick Porter <dick@ximian.com>
11189 * process.c (process_get_fileversion): If there's no string block,
11190 set the file language to en_US. Fixes the other new part of bug
11193 2008-03-29 Rodrigo Kumpera <rkumpera@novell.com>
11195 * class.c: New functions mono_method_can_access_field_full and
11196 mono_method_can_access_method_full. They perform type visibility
11197 and type site check.
11199 * class-internal.h: Added exported functions.
11201 * verify.c: Use new functions to implement proper visibility checks.
11203 2008-03-29 Zoltan Varga <vargaz@gmail.com>
11205 * mono-config.h: Add missing G_BEGIN_DECLS/G_END_DECLS. Fixes #375188.
11207 2008-03-28 Dick Porter <dick@ximian.com>
11209 * process.c (process_get_fileversion): Use the first language ID
11210 we see, rather than insisting on an invariant language. Fixes bug
11213 2008-03-28 Zoltan Varga <vargaz@gmail.com>
11215 * reflection.c (calc_section_size): Use add_stream_zero to align the size of
11216 the streams to fix reading of invalid memory later.
11218 * metadata.h (MonoType): Use 'MonoTypeEnum' instead of int for the 'type' field
11221 2008-03-26 Zoltan Varga <vargaz@gmail.com>
11223 * marshal.c (signature_dup): Use mono_metadata_signature_alloc ().
11224 (cominterop_method_signature): Ditto. Fix the size passed to memcpy.
11226 2008-03-26 Massimiliano Mantione <massi@ximian.com>
11227 * threads.h: Added MonoThreadManageCallback type and
11228 mono_thread_set_manage_callback prototype
11229 * object-internals.h: In _MonoThread, renamed unused6 to manage_callback
11230 (used to store the mono_thread_manage callback).
11231 * threads.c: Added mono_thread_set_manage_callback, and handle
11232 "MonoThread->manage_callback" in build_wait_tids.
11234 2008-03-26 Dick Porter <dick@ximian.com>
11236 * process.c (process_get_fileversion): Set FileVersionInfo strings
11237 to Empty when the resource doesn't have the particular info.
11240 2008-03-25 Rodrigo Kumpera <rkumpera@novell.com>
11242 * verify.c (mono_method_verify): Proper prefix validation.
11244 2008-03-25 Zoltan Varga <vargaz@gmail.com>
11246 * icall.c (ves_icall_InternalInvoke): Return exceptions thrown by the icall
11247 itself in a separate argument instead of throwing them. Fixes #373448.
11249 * appdomain.c: Bump corlib version.
11251 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
11253 * verify.c: Implemented readonly prefix and verify controled mutability pointers.
11255 2008-03-20 Kornél Pál <kornelpal@gmail.com>
11257 * file-io.c, filewatcher.c, threadpool.c, threads.c: Removed Windows
11260 2008-03-20 Mark Probst <mark.probst@gmail.com>
11262 * generic-sharing.c, class-internals.h: Code for putting
11263 reflection types into the runtime generic context.
11265 2008-03-19 Rodrigo Kumpera <rkumpera@novell.com>
11267 * icall.c (ves_icall_get_method_info): Return correct values for the call convention.
11271 2008-03-17 Rodrigo Kumpera <rkumpera@novell.com>
11273 * verify.c (VerifyContext): Added instruction prefix data to the struct.
11275 * verify.c (is_compatible_boxed_valuetype): Don't check if the type is a valuetype, been boxed is enough.
11277 * verify.c (do_invoke): Support constrained callvirt form. Grouped similar checks together.
11279 * verify.c (do_cast): Let the result value keep the boxed status.
11281 * verify.c (mono_method_verify): Add proper support for prefixed and implement contrained.
11283 2008-03-17 Jb Evain <jbevain@novell.com>
11285 * reflection.c: when running on a 2.0 runtime, emit
11286 unconditionally the #~ header version as 2.0, and the
11287 CLI header version as 2.5, for symmetry's sake with csc.
11289 2008-03-16 Zoltan Varga <vargaz@gmail.com>
11291 * class.c: Remove the unused cache_interface_offsets stuff.
11293 * class.c loader.c domain.c verify.c metadata.c debug-helpers.c threadpool.c
11294 profiler.c: Fix warnings.
11296 2008-03-16 Mark Probst <mark.probst@gmail.com>
11298 * generic-sharing.c, class-internals.h: Support for putting
11299 methods into the runtime generic context.
11301 2008-03-16 Zoltan Varga <vargaz@gmail.com>
11303 * class.c (mono_class_setup_fields): Ignore calls made to this function for
11304 classes which are generic instances of not-yet finished typebuilders. Fixes
11307 * reflection.c (fixup_method): Add support for FieldOnTypeBuilderInst.
11309 2008-03-15 Zoltan Varga <vargaz@gmail.com>
11311 * metadata-internals.h (MonoDynamicImage): Add 'generic_def_objects' hash table.
11313 * class-internals.h (MonoMethodInflated): Remove the rarely used reflection_info
11314 field, replace it with a hash table in MonoDynamicImage.
11316 * reflection.c (inflate_mono_method): Access the generic definition object from
11317 image->generic_def_objects instead of imethod->reflection_info.
11319 * reflection.c (mono_reflection_bind_generic_method_parameters): Ditto.
11321 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition): Ditto.
11323 * image.c (mono_image_close): Move the dynamic image freeing code to a separate
11324 function in reflection.c so it is easier to keep in sync with the dynamic image
11327 * reflection.c (mono_dynamic_image_free): New internal function, extracted from
11328 mono_image_close ().
11330 2008-03-15 Mark Probst <mark.probst@gmail.com>
11332 * class.c (mono_class_generic_sharing_enabled): Disable generic
11333 sharing for all architectures except AMD64 and x86 to fix build.
11335 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
11337 * verify.c: Use the generic definition MonoGenericContext when available.
11338 Remove code for checking generics instance compatibility in favor of
11339 mono_class_is_assignable_from.
11341 2008-03-14 Mark Probst <mark.probst@gmail.com>
11343 * marshal.c, marshal.h, metadata-internals.h, image.c,
11344 wrapper-types.h: New wrapper for invoking a shared static method
11345 without having to pass the runtime generic context argument.
11347 2008-03-14 Rodrigo Kumpera <rkumpera@novell.com>
11349 * icall-def.h: Add missing function PerformanceCounterCategory::GetInstanceNames.
11351 2008-03-14 Zoltan Varga <vargaz@gmail.com>
11353 * reflection.c (mono_image_get_field_on_inst_token): Add caching.
11355 * reflection.c (mono_image_get_field_on_inst_token): New helper function to
11356 create a token from a FieldOnTypeBuilderInst.
11357 (mono_image_create_token): Handle FieldOnTypeBuilderInst.
11358 (resolve_object): Ditto.
11360 * object-internals.h (MonoReflectionFieldOnTypeBuilderInst): New structure
11361 mirroring System.Reflection.Emit.FieldOnTypeBuilderInst.
11363 2008-03-14 Martin Baulig <martin@ximian.com>
11365 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 68.
11367 * debug-mono-symfile.h
11368 (MONO_SYMBOL_FILE_VERSION): Bump to 41.
11369 (MONO_SYMBOL_FILE_COMPATIBILITY_VERSION): New #define.
11371 2008-03-10 Martin Baulig <martin@ximian.com>
11373 * debug-mono-symfile.h
11374 (MonoSymbolFileMethodAddress): Removed `num_lexical_blocks' and
11375 `lexical_block_table_offset'.
11376 (MonoDebugMethodInfo): Removed `num_lexical_blocks' and
11378 (MonoSymbolFile): Added `version'.
11381 (MonoDebugLexicalBlockEntry): Removed.
11382 (MonoDebugMethodJitInfo): Removed `num_lexical_blocks' and
11385 * mono-debug.c (mono_debug_add_method): Don't compute lexical
11386 blocks here; the debugger now does this internally.
11388 2008-02-27 Martin Baulig <martin@ximian.com>
11390 * object.c (mono_runtime_exec_main): Call
11391 `mono_debugger_event (MONO_DEBUGGER_EVENT_REACHED_MAIN)' and
11392 `mono_debugger_event (MONO_DEBUGGER_EVENT_MAIN_EXITED)' here.
11394 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
11396 * verify.c (verify_type_compatibility_full): Allow native int to be converted
11397 to native pointer in non-strict mode. Required to "(IntPtr)null" work.
11399 2008-03-12 Rodrigo Kumpera <rkumpera@novell.com>
11401 * verify.c (verify_ldftn_delegate): Accept a sealed type when using
11402 ldftn with a virtual method.
11404 2008-03-13 Geoff Norton <gnorton@novell.com>
11406 * decimal.c: Only include memory.h if the platform has it.
11408 Wed Mar 12 12:11:06 CET 2008 Paolo Molaro <lupus@ximian.com>
11410 * assembly.c, class.c, metadata-internals.h: make sure public key
11411 tokesns are compared in a case-insensitive way. Also, all
11412 the lookups in the GAC use a lowercase public key token
11413 (gaacutil already does the lowercasing on install). Fixes
11416 2008-03-11 Rodrigo Kumpera <rkumpera@novell.com>
11418 * verify.c (mono_delegate_signature_equal): Do proper variance check on arguments
11421 Tue Mar 11 17:41:38 CET 2008 Paolo Molaro <lupus@ximian.com>
11423 * image.c: when someone loads a mscorlib from a file, return the
11424 currently loaded mscorlib (fixes bug #369253).
11426 Tue Mar 11 16:47:32 CET 2008 Paolo Molaro <lupus@ximian.com>
11428 * class.c: handle types with no parents by forcing them to have
11429 System.Object as a parent and marking them as broken (this currently
11430 allows the first part of bug #369173 to work as well, likely because
11431 we don't check for typeload exceptions everywhere yet).
11433 Tue Mar 11 15:23:54 CET 2008 Paolo Molaro <lupus@ximian.com>
11435 * class.c: more complete check that types belong to corlib
11436 (fixes second part of bug #369173).
11438 2007-03-10 Bill Holmes <billholmes54@gmail.com>
11440 * generic-sharing.c: Including glib.h for the MSVC builds to define
11441 "inline" to "__inline" before including mono-membar.h.
11443 * mono-perfcounters.c: Adding HAVE_SYS_TIME_H check for MSVC builds.
11444 Rename "Unknown" to "CatTypeUnknown" to avoid name collisions for
11447 Contributed under MIT/X11 license.
11449 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
11451 * verify.c (do_invoke_method): Remove return type validation.
11453 * verify.c (do_ret): Do return type validation at return site instead of
11456 2008-03-10 Rodrigo Kumpera <rkumpera@novell.com>
11458 * verify.c (do_invoke_method): Mark callvirt to static methods unverifiable.
11460 * verify.c: Some todos cleaned and improved a few error messages.
11462 2008-03-08 Zoltan Varga <vargaz@gmail.com>
11464 * class.c (mono_class_setup_mono_type): Improve the test for corlib.
11466 2008-03-07 Zoltan Varga <vargaz@gmail.com>
11468 * class.c (mono_class_setup_mono_type): Handle types whose name clashes with
11469 system types correctly.
11471 * exception.h exception.c (mono_exception_from_token_two_strings): New helper
11474 2008-03-06 Zoltan Varga <vargaz@gmail.com>
11476 * assembly.c (build_assembly_name): Fix a warning.
11478 Thu Mar 6 19:43:41 CET 2008 Paolo Molaro <lupus@ximian.com>
11480 * marshal.c: ldfld_remote and stfld_remote needs just one wrapper as
11481 the called function takes an object type argument. Fixes storing or
11482 valuetypes across remoting as well as reducing memory usage.
11483 * image.c, metadata-internals.h: remove now unused ldfld_remote and
11484 stfld_remote wrapper caches.
11486 2008-03-06 Zoltan Varga <vargaz@gmail.com>
11488 * icall.c (mono_lookup_internal_call): Update the exception message when an icall
11491 * reflection.c (mono_image_register_token): New helper function to save
11492 a token->object mapping.
11494 * icall.c (ves_icall_ModuleBuilder_RegisterToken): New icall to access it from
11497 * reflection.c (_mono_reflection_parse_type): Distinguish between vectors and
11498 one dimension arrays. Fixes #367670.
11499 (mono_reflection_get_type_internal): Ditto.
11501 Tue Mar 4 19:04:02 CET 2008 Paolo Molaro <lupus@ximian.com>
11503 * marshal.c: mono_load_remote_field_new() always returns object.
11504 so use the proper signature (fixes bug #366445).
11506 2008-03-04 Zoltan Varga <vargaz@gmail.com>
11508 * class-internals.h (MonoMethod): Remove unused uses_this flag,
11509 add an 'inline_failure' flag instead.
11511 2008-03-04 Mark Probst <mark.probst@gmail.com>
11513 * domain-internals.h, domain.c: Replaced MonoGenericSharingContext
11514 with a new structure, MonoGenericJitInfo, in the MonoJitInfo. It
11515 contains the location of "this", used for exception handling.
11517 2008-03-04 Zoltan Varga <vargaz@gmail.com>
11519 * class.c (mono_class_layout_fields): Set the min alignment of small structs to
11520 their size on all platforms for perf reasons.
11522 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11524 * reflection.h: Move mono_reflection_is_valid_dynamic_token to
11527 * object-internal.h: Same.
11529 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11531 * reflection.h: Fix the build I just broke.
11533 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11535 * reflection.c (mono_reflection_is_valid_dynamic_token): New function,
11536 Test if a token is valid, this remove explicit usage of
11537 MonoDynamicImage::tokens from the verifier code.
11539 * reflection.h: Added mono_reflection_is_valid_dynamic_token.
11541 * verify.c (token_bounds_check): Use mono_reflection_is_valid_dynamic_token
11542 instead of direct access to MonoDynamicImage::tokens.
11544 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11546 * verify.c (token_bounds_check): Fix the build I just broke.
11548 2008-03-03 Rodrigo Kumpera <rkumpera@novell.com>
11550 * verify.c (token_bounds_check): Fix bounds check for dynamic images.
11552 * verify.c (verifier_load_method): Fixed the errors message.
11554 * verify.c (mono_method_verify): Fixed a debug message.
11556 Thu Feb 28 19:49:45 CET 2008 Paolo Molaro <lupus@ximian.com>
11558 * icall-def.h, domain.c, mono-perfcounters-def.h, mono-perfcounters.c,
11559 mono-perfcounters.h, class-internals.h: support for predefined
11560 writable counters, query of categories and counters, bugfixes.
11562 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
11564 * verify.c (do_refanytype): Verify the refanytype opcode.
11566 * verify.c (mono_method_verify): Use do_refanytype.
11568 2008-02-28 Rodrigo Kumpera <rkumpera@novell.com>
11570 * verify.c (do_mkrefany): Verify the mkrefany opcode.
11572 * verify.c (mono_method_verify): Use do_mkrefany.
11574 Wed Feb 27 19:49:16 CET 2008 Paolo Molaro <lupus@ximian.com>
11576 * Makefile.am, icall-def.h, icall.c, mono-perfcounters-def.h,
11577 mono-perfcounters.c, mono-perfcounters.h: basic performance counter
11580 2008-02-27 Zoltan Varga <vargaz@gmail.com>
11582 * marshal.c (mono_marshal_get_synchronized_wrapper): Fix the code which throws
11583 the type load exception.
11585 2008-02-27 Rodrigo Kumpera <rkumpera@novell.com>
11587 * verify.c: Added a few FIXME for method signatures
11589 * verify.c (do_invoke_method): Use mono_method_get_signature_full instead
11590 of mono_method_get_signature and get vararg call working. Removed unused
11591 checks for return value.
11593 * verify.c (do_refanyval): Verify the refanyval opcode.
11595 * verify.c (mono_method_verify): Implemented verification of arglist and
11598 2008-02-27 Zoltan Varga <vargaz@gmail.com>
11600 * class.c (mono_class_setup_methods): Move the check for synchronized methods on
11601 vtypes to marshal.c.
11603 * marshal.c (mono_marshal_get_synchronized_wrapper): Do the vtype check here so
11604 it works for AOT as well.
11606 Tue Feb 26 17:46:32 CET 2008 Paolo Molaro <lupus@ximian.com>
11608 * monitor.c, threads.c, threadpool.c: replace the use of GetTickCount ()
11609 with mono_msec_ticks () which is monotonic and doesn't cause bugs when
11610 the system time is adjusted.
11612 Tue Feb 26 17:40:10 CET 2008 Paolo Molaro <lupus@ximian.com>
11614 * icall.c, icall-def.h: use the new time functions (fixes the
11615 non-monotonic behaviour of TickCount).
11617 2008-02-26 Zoltan Varga <vargaz@gmail.com>
11619 * reflection.c (mono_custom_attrs_from_builders): Revert the last change as
11620 it breaks the build.
11622 * reflection.c (mono_custom_attrs_from_builders): Assert instead of a crash if the
11623 cattr is not finished yet.
11625 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
11627 * verify.c: Proper token validation for field, method and type.
11629 2008-02-25 Rodrigo Kumpera <rkumpera@novell.com>
11631 * loader.c (field_from_memberref): Generate a loader error if the type is not found.
11633 * loader.c (method_from_memberref): Generate type load error instead of method missing
11634 if the type is not found.
11636 2008-02-23 Zoltan Varga <vargaz@gmail.com>
11638 * marshal.c (mono_marshal_emit_managed_wrapper): Avoid generating invalid IL if
11639 some of the conversions caused the generation of a marshal directive exception.
11641 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
11643 verify.c: Report which exception should be thrown by the JIT.
11644 Added a lot of FIXME notes.
11646 2008-02-22 Mark Probst <mark.probst@gmail.com>
11648 * generic-sharing.c: Runtime generic context slots are not
11649 instantiated on init anymore. Instead, provide function to do the
11650 instantiating on demand.
11652 * class-internals.h: Added vtable to runtime generic context.
11653 Macros for encoding direct and indirect slot offsets in one
11656 2008-02-21 Mark Probst <mark.probst@gmail.com>
11658 * object.c, generic-sharing.c: Moved some generic sharing code
11659 from object.c to generic-sharing.c.
11661 * generic-sharing.c: Added support for extensible runtime generic
11664 * metadata-internals.h: Two new hash tables in MonoImage for
11665 extensible runtime generic context support.
11667 * domain.c: Unregister generic vtables upon domain unloading.
11669 * image.c: Destroy new hash tables upon image unloading.
11671 * metadata.c: Unregister generic subclasses upon image unloading.
11673 * class-internals.h: New data structure for runtime generic
11674 context template. New fields in the runtime generic context for
11677 * Makefile.am: Added generic-sharing.c.
11679 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
11681 icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): If
11682 there is a pending loader exception, raise it.
11684 icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
11687 icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken):
11692 2008-02-20 Zoltan Varga <vargaz@gmail.com>
11694 * icall.c (ves_icall_Type_GetPacking): Handle dynamic types.
11696 * assembly.c (mono_assembly_load_from_full): Fix a leak in the previous patch.
11698 * assembly.c (mono_assembly_load_from_full): Return the non-refonly corlib for
11699 ref-only requests for compatibility with MS.
11701 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
11703 * reflection.c (mono_custom_attrs_from_method): Don't silently
11704 return an empty list for generic method instances.
11705 (mono_custom_attrs_from_param): Likewise.
11707 2008-02-20 Rodrigo Kumpera <rkumpera@novell.com>
11708 Raja R Harinath <harinath@hurrynot.org>
11711 * class-internals.h (struct _MonoMethodInflated.is_mb_open): Add.
11712 * class.c (mono_class_inflate_generic_method_full): Initialize it
11713 when a fully-open method is instantiated.
11714 * metadata.c (inflated_method_equal, inflated_method_hash): Update
11716 * reflection.c (inflate_mono_method): Don't create a temporary context.
11718 2008-02-20 Raja R Harinath <harinath@hurrynot.org>
11720 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
11721 Compute correct value, to prepare for imethod->reflection_info going away.
11723 2008-02-19 Zoltan Varga <vargaz@gmail.com>
11725 * class.c (mono_class_setup_vtable_general): Ignore static methods in interfaces.
11727 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
11729 * verify.c: Implement skip visibility flag.
11731 2008-02-18 Rodrigo Kumpera <rkumpera@novell.com>
11733 * verify.h: Added MONO_VERIFY_SKIP_VISIBILITY and struct MonoVerifyInfoExtended
11734 which contains an extra field to tell the kind of exception that should be thrown.
11736 * verify.c: Use MonoVerifyInfoExtended instead of MonoVerifyInfo.
11738 2008-02-17 Raja R Harinath <harinath@hurrynot.org>
11740 * loader.c (mono_method_get_param_names): Initialize 'klass' after
11741 'method' is updated.
11743 2008-02-11 Zoltan Varga <vargaz@gmail.com>
11745 * class.c (mono_class_layout_fields): Set class->min_align for classes using
11746 explicit layout as well. Fixes #360375.
11748 2008-02-11 Geoff Norton <gnorton@novell.com>
11750 * loader.c: Guard and dereference against inflated generic methods
11752 2008-02-10 Gert Driesen <drieseng@users.sourceforge.net>
11754 * class.c: Include Retargetable spec in assembly name.
11755 * assembly.c: Always include PublicKeyToken spec in assembly name
11756 (with value "null" if assembly is not signed), and include
11758 * icall-def.h: Added icall for Assembly.get_fullname.
11759 * icall.c: Added icall returning the fullname of an assembly.
11761 2008-02-09 Zoltan Varga <vargaz@gmail.com>
11763 * class.c (mono_class_setup_vtable_general): Add a missing call to
11764 mono_class_setup_methods () which is needed in the AOT case.
11766 2008-02-08 Rodrigo Kumpera <rkumpera@novell.com>
11768 * verify.c (mono_type_get_stack_name): Added. Return the name for the
11769 stack type of the given MonoType.
11771 * verify.c (verify_type_compatibility_full): Handle the void type.
11773 * verify.c (is_compatible_boxed_valuetype): Changed to fit the
11774 way stack merging works.
11776 * verify.c (store_local): Improved verification message.
11778 * verify.c (do_branch_op): If the merging is invalid, the method
11779 is unverifiable and not invalid. Improved error message.
11781 * verify.c (merge_stacks): Properly merge a boxed valuetype and
11782 a reference type diferent than System.Object. Improved error
11785 2008-02-07 Rodrigo Kumpera <rkumpera@novell.com>
11787 * verify.c (mono_type_is_enum_type): Added. Test if a type is an enum.
11789 * verify.c (mono_type_get_underlying_type_any): Added. Return the underlying
11790 type of an enum even if the argument is byref.
11792 * verify.c: Replace all explicit uses of enumtype and enum_basetype
11793 to calls to mono_type_is_enum_type and mono_type_get_underlying_type_any.
11795 * verify.c: Check for an enum in all cases of MONO_TYPE_GENERICINST.
11797 *verify.c (verify_type_compatibility_full): Make enum types
11798 compatible with their base types.
11800 * verify.c (is_compatible_boxed_valuetype): Added. Check if both
11801 types are compatible for the special case of a boxed valuetype and
11804 * verify.c (verify_stack_type_compatibility): The function
11805 is_compatible_boxed_valuetype was extracted from here.
11807 * verify.c (push_arg): Only set ctx->has_this_store if the method
11810 * verify.c (do_ldelem): Fixed a typo in an error message and added
11811 strict check for mixing int32 and native int as the array type
11814 * verify.c (merge_stacks): Consider boxed valuetypes in the
11815 compatibility checks.
11817 2008-02-07 Massimiliano Mantione <massi@ximian.com>
11818 * profiler.h: (MonoGCEvent): Added start-stop the world events.
11820 2008-02-06 Massimiliano Mantione <massi@ximian.com>
11821 *class.c: use_new_interface_vtable_code: renamed the env var to have
11822 a "MONO_" prefix, and fix the logic to enable it by default.
11824 2008-02-06 Massimiliano Mantione <massi@ximian.com>
11826 mono_class_setup_vtable_general: rewrote the way in which interface
11827 methods are added to vtables. Makes bug-77127.exe pass, and hopefully
11828 makes the code more maintainable.
11829 For now the old code is still there, and can be activated setting
11830 the env var "USE_NEW_INTERFACE_VTABLE_CODE".
11832 2008-02-06 Rodrigo Kumpera <rkumpera@novell.com>
11834 * verify.c: guarded some debug functions around and #ifdef.
11836 * verify.c (merge_stacks): implement proper PIII 1.8.1.3 stack state merging.
11838 2008-02-06 Zoltan Varga <vargaz@gmail.com>
11840 * marshal.c (mono_marshal_get_runtime_invoke): Revert the direct_wrapper
11841 changes for now since they seem to break too many things.
11843 2008-02-05 Mark Probst <mark.probst@gmail.com>
11845 * marshal.c, marshal.h (mono_marshal_find_bitfield_offset,
11846 mono_marshal_find_nonzero_bit_offset): Added macro and function
11847 for finding the byte- and bit-offset of a bitfield within a
11850 2008-02-05 Zoltan Varga <vargaz@gmail.com>
11852 * marshal.c (mono_marshal_get_ptr_to_struct): Make the signature non-pinvoke.
11853 (mono_marshal_get_struct_to_ptr): Ditto.
11855 * marshal.c (mono_marshal_get_runtime_invoke): Fix the signature of
11858 2008-02-03 Zoltan Varga <vargaz@gmail.com>
11860 * marshal.c (mono_marshal_get_runtime_invoke): Fix sharing of runtime wrappers
11861 between methods for non-corlib types.
11863 2008-02-02 Geoff Norton <gnorton@novell.com>
11865 * loader.c (mono_method_get_param_names): Populate the parameter name for
11866 generic parameters as well. (Fixes #342536)
11868 2008-01-31 Rodrigo Kumpera <rkumpera@novell.com>
11870 * verify.c (is_valid_bool_arg): Allow boxed values and null literals as well.
11872 * verify.c (do_invoke_method): Fix for calling with byref structs.
11874 * verify.c (do_cast): push a boxed value type based on the type token and not
11877 2008-01-31 William Holmes <billholmes54@gmail.com>
11879 * process.c (process_module_string_read): Check the size returned form
11880 VerQueryValue to avoid out of memory exception.
11882 2008-01-30 Zoltan Varga <vargaz@gmail.com>
11884 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
11885 Handle properly modules which are not in the moduleref table. Fixes
11888 2008-01-29 Zoltan Varga <vargaz@gmail.com>
11890 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Remove
11891 the dynamic case which is now in managed code.
11892 (ves_icall_System_Reflection_Assembly_GetTypes): Ditto.
11894 * marshal.c (mono_string_to_bstr): Fix a warning.
11895 (init_com_provider_ms): Ditto.
11897 * appdomain.c (ves_icall_System_AppDomain_createDomain): Add some FIXMEs.
11899 * exception.c (mono_get_exception_out_of_memory): New helper function.
11901 2008-01-28 Jonathan Chambers <joncham@gmail.com>
11903 * marshal.c: Add support for BSTR marshalling
11904 using other COM systems.
11906 Code is contributed under MIT/X11 license.
11908 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
11910 * object.c (mono_runtime_invoke_array): reverted previous
11911 commit as it breaks the build.
11913 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
11915 * object.c (mono_runtime_invoke_array): Verify arguments for
11916 invalid types. Fixes #348522.
11918 2008-01-28 Rodrigo Kumpera <rkumpera@novell.com>
11920 * verify.c: added IL_CODE_CALL_NONFINAL_VIRTUAL to track calls to
11921 non-final virtual calls using call.
11923 * verify.c (do_invoke): fixed some TODOs.
11925 * verify.c (push_arg): set has_this_store for "ldarga 0".
11927 2008-01-27 Zoltan Varga <vargaz@gmail.com>
11929 * reflection.c (reflection_methodbuilder_to_mono_method): Allow DynamicMethods
11930 which belong to an inflated class. Fixes #356531.
11932 2008-01-26 Robert Jordan <robertj@gmx.net>
11934 * file-io.c: Implement and use wrappers for GetFileAttribute|Ex ()
11935 which resort to FindFirstFile when a certain error condition
11936 (ERROR_SHARING_VIOLATION) occured. Fixes bug #325212.
11937 Code is contributed under MIT/X11 license.
11939 2008-01-24 Jonathan Chambers <joncham@gmail.com>
11941 * marshal.c (emit_marshal_string): Fix out string marshalling
11942 to use specified encoding. Fixes #323900.
11944 Code is contributed under MIT/X11 license.
11946 2008-01-24 Raja R Harinath <harinath@hurrynot.org>
11948 * class.c (mono_class_inflate_generic_method_full): Don't modify
11949 iresult->context after cache check.
11951 2008-01-23 Zoltan Varga <vargaz@gmail.com>
11953 * class.c (mono_class_inflate_generic_method_full): Change the
11954 struct assignments to memcpy for better visibility and add some comments.
11956 2008-01-23 Dick Porter <dick@ximian.com>
11958 * threads.c (mono_threads_set_shutting_down): Simplify shutdown
11959 procedure, and make it work on windows.
11961 2008-01-22 Zoltan Varga <vargaz@gmail.com>
11963 * object-internals.h (MonoReflectionGenericClass): Make the 'generic_type' field
11964 a MonoReflectionTypeBuilder since it is always of that type.
11966 * reflection.c (mono_type_get_object): Remove an unneccesary check.
11968 * reflection.c (mono_generic_class_get_object): Simplify this a bit.
11970 * reflection.c (mono_reflection_bind_generic_parameters): Ditto.
11972 * icall.c (ves_icall_MonoGenericClass_GetParentType): Ditto.
11974 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Ditto.
11976 * reflection.c (mono_reflection_create_runtime_class): Remove already created
11977 instantiations from the type cache.
11979 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
11981 * verify.c (do_ldstr): fixed token verification. previous code was 100% broken.
11983 * verify.c (do_unbox_value): push a controled mutability managed pointer.
11985 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
11987 * verify.c (do_ldstr): added, verifies if the #US token is valid.
11989 * verify.c (mono_method_verify): removed old TODO
11991 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
11993 * verify.c (do_newobj): add visibility check.
11995 2008-01-21 Rodrigo Kumpera <rkumpera@novell.com>
11997 * verify.c (do_load_function_ptr): add visibility check.
11999 2008-01-21 Massimiliano Mantione <massi@ximian.com>
12001 mono_generic_class_get_class: hook profiler events.
12002 mono_field_get_offset: added to support heap-shot in the new profiler.
12003 *class.h: exported mono_field_get_offset.
12005 mono_reflection_setup_internal_class: hook profiler events.
12007 2008-01-20 Zoltan Varga <vargaz@gmail.com>
12009 * marshal.c (mono_marshal_emit_native_wrapper): Add a 'check_exceptions'
12010 argument here too and use it to avoid checking for pending exceptions if
12013 2008-01-20 Gert Driesen <drieseng@users.sourceforge.net>
12015 * assembly.c (build_assembly_name): add arg for passing the assembly
12016 flags. Do not consider a PublicKey with value "null" valid.
12017 (mono_assembly_name_parse_full): added boolean argument that will be
12018 set if the assembly name contains a PublicKeyToken spec. Added support
12019 for the Retargetable spec for which only Yes or No are allowed as valid
12020 value. Consider assembly name invalid if Retargetable spec is set, but
12021 either version, culture or public key (token) are not specified.
12022 * metadata-internals.h: sync signature of mono_assembly_name_parse_full
12023 with implementation in assembly.c.
12024 * icall.c (fill_reflection_assembly_name): also copy assembly flags
12025 from MonoAssemblyName.
12026 (ves_icall_System_Reflection_AssemblyName_ParseName): use newly
12027 introduced argument for mono_assembly_name_parse_full to know if the
12028 assembly name has a PublicKeyToken spec, and if it has instruct
12029 fill_reflection_assembly_name to use default value for keyToken (if
12030 PublicKeyToken is null).
12032 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
12034 * verify.c (mono_method_verify): fixed ovf ops with
12035 float values. They are unverifiable now.
12037 2008-01-18 Rodrigo Kumpera <rkumpera@novell.com>
12039 * class.c (set_failure_from_loader_error): add BadImageException to the
12040 list of exceptions that can cause a type to fail to load.
12042 * class.c (mono_class_get_exception_for_failure): same.
12044 2008-01-17 Rodrigo Kumpera <rkumpera@novell.com>
12046 * verify.c (in_any_exception_block): added, check if offset
12047 is part of any exception handling clause.
12049 * verify.c (get_stack_type): added VAR and MVAR types.
12051 * verify.c (do_stobj): better error messages.
12053 * verify.c (do_cpobj): added, check cpobj.
12055 * verify.c (do_initobj): added, check initobj.
12057 * verify.c (do_sizeof): added, check sizeof.
12059 * verify.c (do_localloc): added, check localloc.
12061 * verify.c: adde proper verification for cpobj, initobj, sizeof and localloc.
12063 2008-01-17 Zoltan Varga <vargaz@gmail.com>
12065 * method-builder.c (mono_mb_emit_native_call): Get rid of the unused
12066 save_lmf/restore_lmf opcodes.
12068 * threads.c (mono_threads_install_notify_pending_exc): New function to
12069 install a callback notifying the JIT there is a pending exception on a thread.
12070 (mono_thread_request_interruption): Call the new callback.
12071 (mono_thread_get_and_clear_pending_exception): New function to return the
12072 exception pending on a thread.
12074 * marshal.c (mono_marshal_get_icall_wrapper): Add a check_exceptions argument
12075 to turn off checking for pending exceptions.
12076 (mono_marshal_get_native_wrapper): Ditto.
12078 2008-01-16 Zoltan Varga <vargaz@gmail.com>
12080 * threads-types.h: Get rid of the unnecessary extern declarations.
12082 2008-01-16 Gert Driesen <drieseng@users.sourceforge.net>
12084 * icall.c (ves_icall_Type_GetField): if NonPublic flag is set, only
12085 return field from parent class if not private.
12086 (ves_icall_Type_GetFields_internal): if NonPublic flag is set, only
12087 returns fields from parent class if they are not private.
12088 (method_nonpublic): added function to determine if a given method
12089 should be considered non-public. Returns false for private methods
12090 on parent class, and internal methods from parent on the 1.0 profile.
12091 (ves_icall_Type_GetMethodsByName): if NonPublic flag is set, then
12092 use method_nonpublic function to determine whether method should be
12094 (property_accessor_public): use newly introduced method_nonpublic
12095 function to determine whether accessor is non-public.
12096 (ves_icall_MonoType_GetEvent): If NonPublic flag is set, only return
12097 event from parent class if not private. Only return static event if
12098 Static flag is set, and only return static event from parent class if
12099 FlattenHierarchy flag is set.
12100 (ves_icall_Type_GetEvents_internal): If NonPublic flag is set, only
12101 include non-private events from parent class.
12103 2008-01-16 Zoltan Varga <vargaz@gmail.com>
12105 * icall.c (ves_icall_System_NumberFormatter_GetFormatterTables): Fix a
12108 2008-01-16 Wade Berrier <wberrier@novell.com>
12110 * security.c: Add assembly.h header to appease some warnings
12112 2008-01-16 Dick Porter <dick@ximian.com>
12114 * process.c (process_module_string_read): Remove trailing null
12115 when saving string.
12117 2008-01-16 Mark Probst <mark.probst@gmail.com>
12119 * class-internals.h: A new data structure describing the layout of
12120 a runtime generic context (MonoRuntimeGenericContextTemplate).
12122 * metadata-internals.h: Added a hash table to MonoDomain that maps
12123 from open generic classes to their runtime generic context
12126 * object.c: Building of the runtime generic context, including
12127 proper handling of generic type arguments of superclasses.
12128 Building of the runtime generic context according to the template.
12130 2008-01-15 Zoltan Varga <vargaz@gmail.com>
12132 * class.c (mono_class_setup_fields): Set field.count for generic instances.
12135 * image.c (do_mono_image_open): Pass TRUE as last_exists to
12136 mono_portability_find_file (). Fixes #325466.
12137 (mono_image_get_public_key): Fix a warning.
12139 2008-01-14 Zoltan Varga <vargaz@gmail.com>
12141 * class.c (mono_class_from_name): Fix comments for NULL-ness of image parameter.
12143 (mono_class_from_name_case): Ditto.
12145 2008-01-13 Eyal Alaluf <eyala@mainsoft.com>
12147 * icall-def.h number-formatter.h icall.c: Implemented a cross app-domain
12148 common storage for the tables used in the System/NumberFormatter class.
12150 2008-01-13 Zoltan Varga <vargaz@gmail.com>
12152 * marshal.c (mono_marshal_get_runtime_invoke): Fix a typo.
12154 2008-01-11 Rodrigo Kumpera <rkumpera@novell.com>
12156 * verify.c (get_boxable_mono_type): check if the token is valid.
12158 * verify.c (set_stack_value): changed to add an error if an
12159 invalid type is set on stack. Changed all callers due to signature change.
12161 * verify.c (do_stobj): implement stobj validation.
12163 2008-01-11 Zoltan Varga <vargaz@gmail.com>
12165 * reflection.c (reflection_methodbuilder_to_mono_method): No need to
12166 set container->is_method, it was set earlier.
12168 * metadata.c (type_in_image): Handle MVARs which belong to not finished
12171 * reflection.c (mono_reflection_initialize_generic_parameter): Set
12172 is_method of the generic container to TRUE for methods.
12174 2008-01-10 Zoltan Varga <vargaz@gmail.com>
12176 * metadata.c (type_in_image): Handle type parameters properly.
12178 * class-internals.h (MonoGenericParam): Add an 'image' argument to track
12179 memory ownership of this structure.
12181 2008-01-10 Rodrigo Kumpera <rkumpera@novell.com>
12183 * verify.c (get_boxable_mono_type): make typedref types been just
12184 unverifiable. check for void type.
12186 * verify.c (do_unbox_any): added, verify opcode unbox.any.
12188 * verify.c (do_load_function_ptr): accept method spec tokens.
12190 2008-01-10 Zoltan Varga <vargaz@gmail.com>
12192 * marshal.c (mono_class_native_size): Always set *align even if this is called
12195 2008-01-09 Zoltan Varga <vargaz@gmail.com>
12197 * verify.c (mono_verify_corlib): Remove this as it was not used and was
12200 2008-01-09 Rodrigo Kumpera <rkumpera@novell.com>
12202 * verify.c: removed some old unused tables. A huge bunch of small fixes
12203 to things found while testing the verifier with mono basic.
12205 * verify.c (dump_stack_value): dump null literal flag to.
12207 * verify.c (verify_type_compatibility_full): fix comparison
12208 for types that have a generic super type.
12210 * verify.c (verify_stack_type_compatibility): fix compatibility
12211 between null literals and reference types. fix compatibility between
12212 boxed valuetypes and object. fix corner case test for enums.
12214 * verify.c (do_cmp_op): proper verification of cgt.un in case
12215 of reference types.
12217 * verify.c (do_invoke_method): fix error message.
12219 * verify.c (do_store_indirect
12221 * verify.c (check_is_valid_type_for_field_ops): proper verification
12222 of managed pointers to valuetypes and boxed valuetypes. proper verification
12225 * verify.c (do_unbox_value): expect valuetypes to be always boxed. don't
12226 allow token to be a reference type.
12228 * verify.c (do_cast): proper handling of boxes valuetypes.
12230 * verify.c (do_stelem): proper handling of storing a boxed valuetype
12233 * verify.c (mono_method_verify): pass the opcode to do_cmp_op
12234 to handle cgt.un properly. Implement add/mul/sub ovf opcodes.
12235 fixed the decoding of unbox_any
12237 2008-01-08 Zoltan Varga <vargaz@gmail.com>
12239 * boehm-gc.c (mono_gc_deregister_root): Fix the size passed to libgc.
12241 2008-01-08 Rodrigo Kumpera <rkumpera@novell.com>
12243 * verify.c (do_newobj): do delegate verification.
12245 * verify.c (verify_delegate_compatibility): perform delegate
12248 * verify.c (verify_ldftn_delegate): perform tests related to
12251 * verify.c (mono_delegate_signature_equal): perform the
12252 slightly diferent signature comparison required by delegates.
12254 * metadata.c (mono_metadata_type_equal_full): added and exported
12255 as MONO_INTERNAL. This is a version of mono_metadata_type_equal that
12256 allows signature only comparison.
12258 * metadata-internal.h (mono_metadata_type_equal_full): added and exported
12261 2008-01-07 Rodrigo Kumpera <rkumpera@novell.com>
12263 * verify.c: added a bunch of stack_slot_* functions to
12264 make access to stack slot type easier. This is required to
12265 allow optional flags, like null literal, boxed value and
12267 All access paths to IlStackDesc::stype have been changed
12268 to use these new funcions.
12269 Removed a bunch of unused functions and cleared all warnings.
12270 This patch introduces the usage of the this pointer and
12273 2008-01-07 Zoltan Varga <vargaz@gmail.com>
12275 * boehm-gc.c (mono_gc_deregister_root): Fix win32 build.
12277 2008-01-06 Zoltan Varga <vargaz@gmail.com>
12279 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Change signature to
12280 match managed version.
12282 * appdomain.c: Bump corlib version.
12284 * appdomain.c (ves_icall_System_AppDomain_ExecuteAssembly): Check for a null
12287 2008-01-06 Gert Driesen <drieseng@users.sourceforge.net>
12289 * icall.c (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies)
12290 Set public key token to zero-length byte array if assembly is not
12293 2008-01-05 Zoltan Varga <vargaz@gmail.com>
12295 * icall.c (ves_icall_System_Array_SetValueImpl): Use a write barrier when
12296 writing a vtype array elem.
12298 2007-01-05 Gert Driesen <drieseng@users.sourceforge.net>
12300 * assembly.c (build_assembly_name): return FALSE if length of token is
12301 not 16 (if not "null").
12302 (mono_assembly_name_parse_full): return FALSE if value of version,
12303 culture, token or key is 0.
12304 * icall.c (fill_reflection_assembly_name): add boolean arguments to
12305 specify whether public key and public key token must be set to default
12306 value (zero-length byte array) if not available. Set versioncompat to
12307 SameMachine. If public key is available or the default is set, then
12308 set PublicKey flag.
12309 (ves_icall_System_Reflection_Assembly_FillName): if no public key
12310 is available, use empty byte array as default value. On the 2.0
12311 profile, use default value for public key token if not set.
12312 (ves_icall_System_Reflection_InternalGetAssemblyName): on the 1.0
12313 profile, use default value for public key if not set. On the 2.0
12314 profile, use default value for public key token if not set.
12315 (ves_icall_System_Reflection_AssemblyName_ParseName): do not set
12316 default values for public key and public key token.
12318 2008-01-05 Zoltan Varga <vargaz@gmail.com>
12320 * object-internals.h (MonoReflectionAssemblyName): Add 'processor_architecture'
12321 field to keep it in synch with the managed object.
12323 * marshal.c (emit_marshal_object): Add support for byref marshalling of
12324 delegates. Fixes #351520.
12326 * sgen-gc.c (conservatively_pin_objects_from): Tell valgrind that the pin queue
12327 contains defined memory.
12329 * sgen-gc.c: Fix 64 bit warnings. Fix some typos. Update GC stats in mono_stats.
12331 * sgen-gc.c (build_nursery_fragments): Handle half-constructed objects correctly.
12333 * sgen-gc.c (check_consistency): New helper function to do a consistency check
12334 of the GC data structures.
12336 * gc-internal.h: Moved the REGISTER/UNREGISTER macros here from os/gc_wrapper.h.
12338 * *.c: Include metadata/gc-internal.h instead of os/gc_wrapper.h.
12340 * object.c (mono_array_full_copy): Fix detection of whenever to use a write
12342 (mono_array_clone_in_domain): Ditto.
12343 (mono_array_clone_in_domain): Ditto.
12345 * threads.c (start_wrapper): Register the thread start argument as a GC root.
12346 (cache_culture): Use a write barrier.
12348 * icall.c (ves_icall_System_Array_SetValueImpl): Call a write barrier.
12349 (ves_icall_get_property_info): Ditto.
12351 * object.h (MONO_STRUCT_SETREF): New macro.
12353 * class-internals.h (MonoStats): Add some GC statistics.
12355 * boehm-gc.c null-gc.c: Define mono_gc_deregister_root ().
12357 2008-01-04 Andreas Faerber <andreas.faerber@web.de>
12359 * exception.c (mono_exception_from_name_two_strings):
12360 Break from loop after method is found.
12362 2008-01-04 Dick Porter <dick@ximian.com>
12364 * process.c (process_module_string_read): Rename variable to
12365 reflect correct usage, after fixing bug 345972.
12367 2008-01-03 Rodrigo Kumpera <rkumpera@novell.com>
12369 * verify.c (mono_type_create_fnptr_from_mono_method):
12370 created a MonoType function pointer instance to be used during
12371 verification. The verifier releases this memory at end.
12373 * verify.c (mono_method_is_constructor): extracted repeated
12374 checks for constructor into a single class.
12376 * verify.c (do_push_field): use new extracted method
12377 for constructor check.
12379 * verify.c (do_newobj): same.
12381 * verify.c (do_ldftn): renamed to do_load_function_ptr
12382 and make it verify ldvirtftn too.
12384 * verify.c (mono_method_verify: proper verification
12385 of ldvirtftn. release created MonoMethod instances.
12387 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
12389 * verify.c (token_bounds_check): added.
12391 * verify.c (do_ldftn): added.
12393 * verify.c (mono_method_verify): proper verificartion of ldftn.
12395 2007-12-31 Rodrigo Kumpera <rkumpera@novell.com>
12397 * metadata.c (mono_metadata_decode_row): Assert if index is bigger
12398 than the table row count. It's the resposibility of the caller to
12399 make the bounds check and raise the correct error.
12401 * metadata.c (mono_metadata_decode_row_col): Same.
12403 * loader.c (mono_get_method_from_token): perform bounds check
12404 on token for methoddef table.
12406 2007-12-29 Miguel de Icaza <miguel@novell.com>
12409 (ves_icall_System_CurrentSystemTimeZone_GetTimeZoneData): Turn the
12410 assert into a negative result, the managed code already coped with
12413 Some folks on Windows reported this error.
12415 2007-12-28 Gert Driesen <drieseng@users.sourceforge.net>
12417 * appdomain.c: Bump corlib version.
12419 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies): Use
12420 CultureInfo.CreateCulture to create CultureInfo for name.
12421 (fill_reflection_assembly_name): Use CultureInfo.CreateCulture to
12422 create CultureInfo for name. Fixes bug #347174.
12424 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
12426 * verify.c: added IL_CODE_FLAG_STACK_INITED and IL_CODE_STACK_MERGED
12429 * verify.c (is_valid_branch_instruction): allow branching to the
12430 first instruction of the protected block.
12432 * verify.c (is_valid_cmp_branch_instruction): same.
12434 * verify.c (stack_init): use IL_CODE_FLAG_STACK_INITED flag to
12435 avoid double initialization.
12437 * verify.c (merge_stacks): use IL_CODE_STACK_MERGED to
12438 detect which cases the eval stack should just be copied.
12440 * verify.c (mono_method_verify): check if the eval stack
12441 is empty when entering a protected block.
12443 2007-12-27 Rodrigo Kumpera <rkumpera@novell.com>
12445 * verify.c: added is_clause_in_range, is_clause_inside_range,
12446 is_clause_nested and verify_clause_relationship. They perform
12447 the verifications stated in P1 12.4.2.7.
12449 * verify.c (mono_method_verify): remove some unused variables,
12450 add the new exception clause checks, add instruction border
12451 checks for protected block start/end, improved some error
12452 messages and fixed a bug in the way invalid instruction access
12455 2007-12-26 Zoltan Varga <vargaz@gmail.com>
12457 * boehm-gc.c (mono_gc_register_thread): Use the new GC_register_my_thread () routine
12458 from GC 7.0 if available.
12460 * object.c: Remove an unused define.
12462 * object.c (mono_class_compute_gc_descriptor): Fix a warning.
12464 * boehm-gc.c (mono_gc_make_descr_for_array): Implement.
12466 * null-gc.c (mono_gc_make_descr_for_array): Implement.
12468 * object.c (mono_class_compute_gc_descriptor): Remove an #ifdef SGEN_GC.
12470 * gc-internal.h: Change the signature of mono_gc_make_descr_for_string ()
12471 to take the same arguments as the other make_descr functions.
12473 * boehm-gc.c null-gc.c: Add implementation for make_descr functions.
12475 * objects.c: Get rid of the MAKE_DESCRIPTOR macros, call make_descr functions
12478 * boehm-gc.c (mono_gc_base_init): Moved the setting of GC_stackbottom here from
12481 * object.c (mono_class_compute_gc_descriptor): Move the GC_init_gcj_malloc ()
12482 call to boehm-gc.c.
12484 * boehm-gc.c (mono_gc_register_root): Fix a warning.
12486 * null-gc.c (mono_gc_register_root): Fix a warning.
12488 * reflection.c (ALLOC_REFENTRY): Use mono_gc_alloc_fixed for boehm as well.
12490 * boehm-gc.c (mono_gc_register_root): Moved definition here from gc_wrapper.h.
12491 (mono_gc_base_init): Call GC_init ().
12493 * null-gc.c: Define mono_gc_register_root () as a no-op.
12495 * domain.c appdomain.c: Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
12497 2007-12-24 Rodrigo Kumpera <rkumpera@novell.com>
12499 * verify.c: add prototype for merge_stacks at top
12501 * verify.c (do_switch): added.
12503 * verify.c (merge_stacks): on some cases the stack merging
12504 was not happening properly. Unequal stack sizes at merge
12505 points should be invalid.
12507 * verify.c (mono_method_verify): added more debug info on stack state.
12508 verify switch properly.
12510 2007-12-24 Zoltan Varga <vargaz@gmail.com>
12512 * method-builder.h: New file, moved the mono_mb_ declarations here from
12515 * boehm-gc.c marshal.c: Include method-builder.h.
12517 * marshal.c: Use mono_mb_emit_branch_label () in a few places.
12519 * marshal.c: Remove some code which is now in method-builder.c.
12521 2007-12-23 Zoltan Varga <vargaz@gmail.com>
12523 * method-builder.c: New file, extraction of the method builder functionality
12526 * marshal.c: Move the mb functions into method-builder.c.
12528 * marshal.h marshal.c: Export some mono_mb_... functions.
12530 * marshal.c: Use mono_mb_get_label () and mono_mb_patch_branch () in all places.
12532 * loader.c (field_from_memberref): Remove the dynamic case, it is handled in
12535 * class.c (mono_class_get_full): Check the token type in the dynamic case.
12537 * loader.c (mono_field_from_token): Ditto.
12539 * loader.c (mono_get_method_from_token): Change the check so it checks memberref
12542 * loader.c (mono_get_method_from_token): Check the token type in the dynamic case.
12545 * class-internals.h: Add new loader error type MONO_EXCEPTION_BAD_IMAGE plus
12546 a helper function for setting it.
12548 * loader.c (mono_loader_error_prepare_exception): Handle MONO_EXCEPTION_BAD_IMAGE.
12551 * assembly.c: Significally simplify code now that referenced assemblies are
12552 loaded lazily. Get rid of the 'loading' hashtables. Hopefully fixes #347629.
12554 * threads.h: Don't include the internal threads-types.h header file. Fixes
12557 2007-12-21 Rodrigo Kumpera <rkumpera@novell.com>
12559 * verify.c: added enum value IL_CODE_FLAG_WAS_TARGET, to represent
12560 instructions that were target of branches or are at protected block boundaries.
12562 * verify.c (in_same_block): handle filter clauses.
12564 * verify.c (is_valid_branch_instruction): added. checks the target of
12565 instructions br or brtrue/false.
12567 * verify.c (is_valid_cmp_branch_instruction): added. checks the target of
12568 binary branch instructions such as beq and bge.
12570 * verify.c (init_stack_with_value): renamed to init_stack_with_value_at_exception_boundary
12571 and made it pin the instruction as been part of the exception block.
12573 * verify.c (do_boolean_branch_op): use is_valid_branch_instruction instead
12576 * verify.c (do_branch_op): use is_valid_cmp_branch_instruction instead
12579 * verify.c (do_ret): ret from a protected block is unverifiable and
12582 * verify.c (do_static_branch): verify br and br.s instructions.
12584 * verify.c (merge_stacks): add extra param to support detection
12585 of branches in the middle of instructions.
12587 * verify.c (mono_method_verify): verify branches and exception blocks
12588 that target the middle of instructions. Proper verification of br and br.s.
12590 2007-12-21 Zoltan Varga <vargaz@gmail.com>
12592 * reflection.c (reflection_methodbuilder_from_ctor_builder): Initialize
12593 skip_visibility field.
12594 (reflection_methodbuilder_from_dynamic_method): Ditto.
12596 * object.c (mono_class_compute_gc_descriptor): Remove more unused icall
12597 registrations. Fixes #348193.
12599 * threads.h: Move the internal mono_thread_get_pending_exception () to
12600 threads-types.h and rename it to mono_thread_get_undeniable_exception ().
12602 2007-12-20 Zoltan Varga <vargaz@gmail.com>
12604 * object.c (mono_class_compute_gc_descriptor): Remove unused GC_gcj_fast_malloc
12605 icall registration. Fixes #348193.
12607 * marshal.c (mono_marshal_get_runtime_invoke): Put all runtime invoke wrappers
12608 for corlib classes into object. Fixes #349621.
12610 2007-12-20 Gert Driesen <drieseng@users.sourceforge.net>
12612 * icall.c (property_accessor_nonpublic): new function to determine
12613 whether an accessor allows a property to be considered non-public.
12614 Returns false for private accessor(s) from parent class, and internal
12615 accessor(s) from parent on 2.0 profile (and higher).
12616 (ves_icall_Type_GetPropertiesByName): Use newly introduced function
12617 to determine whether property should be included if NonPublic flag
12618 is set. Fixes bug #349078.
12620 2007-12-20 Rodrigo Kumpera <rkumpera@novell.com>
12622 * verify.c (init_stack_with_value): added.
12624 * verify.c (mono_method_verify): extracted common
12625 code for exception initialization into init_stack_with_value.
12627 * verify.c (mono_method_verify): initialize the exception
12628 for handler clauses as well.
12630 * verify.c (mono_method_verify): fix the exception clause
12631 ordering rules, it should use handler end offset and not
12634 Thu Dec 20 12:27:24 CET 2007 Paolo Molaro <lupus@ximian.com>
12636 * rawbuffer.c: remove useless warning.
12638 Thu Dec 20 12:10:38 CET 2007 Paolo Molaro <lupus@ximian.com>
12640 * threads.h, threads-types.h: move functions to the correct header
12641 (fixes bug#349952).
12643 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
12645 * verify.c (mono_method_verify): proper verification
12646 of exception handling clauses ranges and fallthru in
12647 and out of protected blocks.
12649 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
12651 * verify.c (mono_method_verify): fixed compilation issue.
12653 2007-12-19 Rodrigo Kumpera <rkumpera@novell.com>
12655 * verify.c (mono_method_verify): a printf slipped in, changed
12656 to use verifier debug macro.
12658 2007-12-18 Rodrigo Kumpera <rkumpera@novell.com>
12660 * verify.c (is_correct_leave): check for filter clauses.
12662 * verify.c (do_filter): added.
12664 * verify.c (mono_method_verify): property verification of leave.
12667 2007-12-18 Mark Probst <mark.probst@gmail.com>
12669 * threads.c: Disable calls to _wapi_thread_signal_self() to fix
12670 Win32 build, until we figure out how to do the proper thing on
12673 2007-12-17 Zoltan Varga <vargaz@gmail.com>
12675 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Fix a crash introduced
12676 by the previous patch.
12678 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Avoid calling
12679 the assembly resolve handler for refonly assemblies.
12681 2007-12-17 Mark Probst <mark.probst@gmail.com>
12683 * threads.c, thread-types.h, icall.c: New shutdown safeguards.
12684 Make sure only one thread is allowed to commence shutdown, and
12685 don't allow new threads to be started once shutdown is in
12688 2007-12-14 Rodrigo Kumpera <rkumpera@novell.com>
12690 * verify.c (is_correct_endfilter): added.
12692 * verify.c (is_unverifiable_endfilter): added.
12694 * verify.c (do_endfilter): added.
12696 * verify.c (mono_method_verify): property verification of endfilter
12697 and fixed a corner case or endfinally.
12699 2007-12-13 Rodrigo Kumpera <rkumpera@novell.com>
12701 * verify.h: new flags to support fail fast of unverifiable code and
12702 do non-strict verification. Non-strict verification is required to
12703 have MS runtime compatibility. There are a huge amount of unverifiable
12704 code that it accepts as verifiable. The strict mode verifies the code
12706 Non-strict mode will be required in cases where code needs to be
12707 accepted as verifiable but fails under strict mode.
12709 * pedump.c: added support to fail fast and non-strict verification.
12711 * verify.c: added support for both fail fast and non-strict verification.
12713 2007-12-12 Rodrigo Kumpera <rkumpera@novell.com>
12715 * verify.c (is_correct_endfinally): added.
12717 * verify.c (mono_method_verify): property verification of endfinally.
12719 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
12721 * verify.c (in_any_block): check for filter clauses.
12723 * verify.c (is_correct_rethrow): added.
12725 * verify.c (mono_method_verify): property verification of rethrow.
12727 * metadata.h: added MONO_OFFSET_IN_FILTER macro.
12729 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
12731 * verify.c (do_throw): added.
12733 * verify.c (mono_method_verify): property verification of throw
12735 2007-12-11 Zoltan Varga <vargaz@gmail.com>
12737 * assembly.c (mono_assembly_load_reference): Try an assembly resolve for ref-only
12738 assemblies. Fixes #346425.
12740 2007-12-10 Zoltan Varga <vargaz@gmail.com>
12742 * reflection.c (mono_reflection_get_token): Call mono_image_create_token () for
12745 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Fix a warning.
12747 * class.c (mono_lookup_dynamic_token_class): Add a 'valid token' argument to
12748 prevent asserts when this is called with a token which might not be valid.
12750 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Call
12751 lookup_dynamic_token_class with valid_token == FALSE.
12753 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
12755 * icall.c (ves_icall_System_Reflection_Module_ResolveStringToken): Ditto.
12757 * icall.c (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
12759 2007-12-10 Mark Probst <mark.probst@gmail.com>
12761 * gc.c: Don't delay threadpool thread finalization unless Mono is
12764 Mon Dec 10 11:06:23 CET 2007 Paolo Molaro <lupus@ximian.com>
12766 * threads.c: turn an assert into a non-fatal warning.
12768 2007-12-09 Robert Jordan <robertj@gmx.net>
12770 * icall.c (GetVirtualMethod): Add missing argument validation.
12772 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
12774 * verify.c (do_cast): added.
12776 * verify.c (mono_method_verify): property verification of castclass and isinst.
12779 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
12781 * verify.c (mono_type_from_opcode): added opcodes for stelem.X.
12783 * verify.c (do_stelem): added.
12785 * verify.c (mono_method_verify): property verification of stelem.X.
12787 2007-12-07 Mark Probst <mark.probst@gmail.com>
12789 * class.c, class-internals.h: Introduce an environment variable
12790 (MONO_GENERIC_SHARING) through which the extent of generic code
12791 sharing can be controlled (share all classes, share only corlib
12792 classes, or share nothing).
12794 * object.c: Only create runtime generic context for classes for
12795 which sharing is enabled.
12797 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
12799 * verify.c (do_ldelem): refactor it to work with ldelem.any.
12801 * verify.c (mono_method_verify): property verification of ldelem.any.
12803 2007-12-06 Rodrigo Kumpera <rkumpera@novell.com>
12805 * verify.c (get_indirect_op_mono_type): renamed to mono_type_from_opcode,
12806 added ldelem.X opcodes.
12808 * verify.c (do_ldelema): fixed possible invalid usage of MonoType.
12810 * verify.c: proper verification of ldelem.X
12812 2007-12-06 Zoltan Varga <vargaz@gmail.com>
12814 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): Allow interface cctors to be called too.
12816 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
12818 * verify.c (mono_method_verify): null literal requires special handling,
12819 the value pushed on stack need to be flagged as so.
12821 * verify.c (do_ldelema): Verify ldelema properly.
12823 2007-12-05 Rodrigo Kumpera <rkumpera@novell.com>
12825 * verify.c: Verify ldlen properly.
12827 2007-12-05 Zoltan Varga <vargaz@gmail.com>
12829 * icall.c (ves_icall_MonoField_GetValueInternal): Check that the field belongs
12830 to the target object's type. Fixes #346160.
12832 2007-12-05 Dick Porter <dick@ximian.com>
12834 * threadpool.c (socket_io_add_poll): Asynchronous connect() on
12835 Solaris needs the same workaround as BSD-derived systems. Fixes
12836 bug 323524, patch by Burkhard Linke
12837 <burkhard.linke@CeBiTec.Uni-Bielefeld.DE>
12839 2007-12-04 Gert Driesen <drieseng@users.sourceforge.net>
12841 * process.c: When ProcessStartInfo.ErrorDialog is true, pass window
12842 handle to use when error dialog is shown; otherwise, update mask
12843 to show no error dialog when an error occurs.
12845 2007-12-03 Zoltan Varga <vargaz@gmail.com>
12847 * icall.c (ves_icall_MonoField_GetRawConstantValue): New icall.
12849 * class.c (mono_class_get_field_default_value): New helper function to initialize
12850 field->def_type and field->data.
12852 2007-11-30 Zoltan Varga <vargaz@gmail.com>
12854 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Use the delegate trampoline instead of
12857 * object.c (mono_runtime_create_delegate_trampoline): New helper function.
12859 * marshal.c: Avoid depending on delegate->method_info being set.
12861 * object.c (mono_delegate_ctor): Avoid initializing delegate->method_info.
12863 * object.c (mono_delegate_ctor): Set delegate->method.
12865 * object-internals.h (struct _MonoDelegate): Add 'method' field.
12867 * appdomain.c: Bump corlib version.
12869 2007-11-27 Raja R Harinath <harinath@gmail.com>
12871 * metadata.c (mono_generic_inst_equal_full): Short-circuit
12872 equality check if we're comparing canonicalized MonoGenericInsts.
12874 2007-11-23 Zoltan Varga <vargaz@gmail.com>
12876 * class.c (generic_array_methods): Call mono_class_setup_methods () before
12877 accessing class->methods.
12879 2007-11-22 Dick Porter <dick@ximian.com>
12881 * threads.c: Ensure that the synch_cs is set before trying to use
12884 Thu Nov 22 12:34:04 CET 2007 Paolo Molaro <lupus@ximian.com>
12886 * profiler.c: r89126 broke the statistial profiler, unbreak.
12888 2007-11-22 Martin Baulig <martin@ximian.com>
12890 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 66.
12893 (mono_debug_debugger_version): Bump to 3.
12894 (mono_debug_init): Hook `mono_debugger_class_loaded_methods_func'
12895 -> mono_debugger_class_initialized().
12897 * mono-debug-debugger.c
12898 (mono_debugger_add_type): Renamed into mono_debugger_class_initialized().
12901 (mono_debugger_start_class_init_func): Removed.
12902 (mono_debugger_class_loaded_methods_func): Added.
12903 (mono_class_setup_methods): Call it here.
12905 2007-11-22 Martin Baulig <martin@ximian.com>
12908 (mono_debug_add_delegate_trampoline): New public method.
12909 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_DELEGATE_TRAMPOLINE'.
12912 (MonoSymbolTable): Added `global_data_table'.
12913 (MonoDebuggerTypeKind): Removed.
12915 2007-11-21 Zoltan Varga <vargaz@gmail.com>
12917 * marshal.c (mono_marshal_get_generic_array_helper): Skip visibility checks for
12920 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
12922 Tue Nov 20 23:10:41 CET 2007 Paolo Molaro <lupus@ximian.com>
12924 * object.c: some fields don't have a valid rva: ignore them (bug #343083).
12926 2007-11-20 Martin Baulig <martin@ximian.com>
12928 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 65.
12930 * mono-debug-debugger.c
12931 (mono_debugger_insert_method_breakpoint): Moved here from debug-mini.c
12932 (mono_debugger_remove_breakpoint): Likewise.
12933 (mono_debugger_check_breakpoints): Likewise.
12934 (mono_debugger_register_class_init_callback): New public method.
12935 (mono_debugger_remove_class_init_callback): Likewise.
12936 (mono_debugger_add_type): Likewise.
12938 * mono-debug-debugger.h
12939 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_CLASS_INITIALIZED'.
12941 Tue Nov 20 20:54:12 CET 2007 Paolo Molaro <lupus@ximian.com>
12943 * class.c: more interface implementations needed for the
12944 array enumerator (fixes bug #341112).
12946 2007-11-18 Gert Driesen <drieseng@users.sourceforge.net>
12948 * icall.c: Renamed arguments for ves_icall_System_Enum_ToObject to
12949 fix ParamName of ArgumentNullExceptions.
12951 2007-11-17 Miguel de Icaza <miguel@novell.com>
12953 * reflection.c (mono_reflection_encode_sighelper): Generate the
12954 modopts and modreqs. I have a useless test that crashes monodis,
12955 but that shows the code working.
12957 2007-11-17 Zoltan Varga <vargaz@gmail.com>
12959 * boehm-gc.c (create_allocator): Fix size calculation for the string allocator.
12960 (mono_gc_get_managed_allocator): Enable the string allocator on amd64.
12962 2007-11-15 Dick Porter <dick@ximian.com>
12964 * threads.c (ves_icall_System_Threading_Thread_Join_internal):
12965 When joining a thread, it's the thread that's calling Join that
12966 gets WaitSleepJoin state not the target. Fixes the standalone
12967 test case in bug 334740, and hopefully the whole bug too.
12969 2007-11-15 Dick Porter <dick@ximian.com>
12971 * process.c: Read file version info from the files pointed at by
12972 process modules, not the current process. Fixes bug 315969.
12974 Use windows typedef names in some places to fix warnings on the
12977 2007-11-15 Mark Probst <mark.probst@gmail.com>
12979 * image.c, metadata-internals.h: Added a generic_class_cache hash
12980 to MonoImage for looking up generic classes when sharing generics.
12982 Thu Nov 15 16:11:30 CET 2007 Paolo Molaro <lupus@ximian.com>
12984 * sgen-gc.c: warning cleanups.
12986 2007-11-15 Zoltan Varga <vargaz@gmail.com>
12988 * icall.c (ves_icall_Type_GetPropertiesByName): Implement proper hiding of
12989 inherited properties.
12991 2007-11-14 Mark Probst <mark.probst@gmail.com>
12993 * object.c, class-internals.h: Added more information to the
12994 runtime generic context.
12996 2007-11-13 Zoltan Varga <vargaz@gmail.com>
12998 * marshal.c (mono_marshal_get_delegate_invoke): Take a delegate as argument
12999 instead of just the target method. Generalize the abstract method handling to
13000 handle any non-static method.
13002 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
13003 mono_marshal_get_delegate_invoke () signature change.
13005 2007-11-13 Mark Probst <mark.probst@gmail.com>
13007 * class.c, class-internals.h: Made
13008 mono_type_get_basic_type_from_generic () public. Fixed member
13009 access check for shared generics.
13011 * loader.c: Don't insert field into field cache if it's part of a
13012 non-inflated generic class.
13014 * domain.c, domain-internals.h: The generic sharing context is now
13015 part of the jit info data structure. Added two accessor
13018 2007-11-12 Zoltan Varga <vargaz@gmail.com>
13020 * marshal.c (mono_marshal_get_runtime_invoke): Create a non-shared wrapper for
13021 the array Get/Set/Address methods, since the JIT inlines them.
13023 * metadata-internals.h (MonoImage): Add 'runtime_invoke_direct_cache'.
13025 * image.c (mono_image_close): Free runtime_invoke_direct_cache.
13026 (mono_image_init): Initialize runtime_invoke_direct_cache.
13028 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): Update after
13029 mono_marshal_get_delegate_invoke signature change.
13031 * marshal.c (mono_marshal_get_delegate_invoke): Receive the target_method as
13032 an additional argument. Add support for invoking abstract methods.
13034 * metadata-internals.h (MonoImage): Add 'delegate_abstract_invoke_cache'.
13036 * image.c (mono_image_close): Free delegate_abstract_invoke_cache.
13038 2007-11-09 Mark Probst <mark.probst@gmail.com>
13040 * class.c: Do field layout for open generic classes as well.
13042 2007-11-09 Mark Probst <mark.probst@gmail.com>
13044 * gc.c, gc-internal.h: Don't finalize threadpool threads with
13045 other objects, because the threadpool is still around. Put them
13046 in a list instead and after finalizing all other objects in the
13047 root domain shut down the thread pool and then finalize the
13048 threads. Fixes bug #337383.
13050 * threads.c, thread-types.h: New mono_thread_create_internal()
13051 function for marking a thread with the threadpool flag before it
13052 started. Set synch_cs to NULL after freeing it.
13054 * threadpool.c: Mark threadpool threads before they start.
13056 Thu Nov 8 15:31:21 CET 2007 Paolo Molaro <lupus@ximian.com>
13058 * reflection.h, reflection.c: don't export random functions
13059 and lazy load dbnull and missing objects.
13061 2007-11-07 Jonathan Chambers <joncham@gmail.com>
13063 * class.c: Initialize COM types if COM interfaces
13064 are present (not just COM classes).
13066 Code is contributed under MIT/X11 license.
13068 2007-11-07 Massimiliano Mantione <massi@ximian.com>
13070 create_dynamic_mono_image: hook module profiler events (dynamic case).
13071 mono_image_basic_init: hook assembly profiler events (dynamic case).
13073 2007-11-07 Massimiliano Mantione <massi@ximian.com>
13075 simple_appdomain_unload: completely terminate the profiler
13076 instead of only processing the statistical samples.
13077 simple_shutdown: make sure this is really called exactly once,
13078 even in multithreaded applications, and always listen to
13080 * gc.c (mono_domain_finalize): don't call mono_profiler_appdomain_event
13081 here, the "[un]load" functions will do it.
13082 Fixes bugs #333791 and #325261.
13084 2007-11-07 Geoff Norton <gnorton@novell.com>
13086 * socket-io.c: Use the configure defines for HAVE_SOCKADDR_IN(6)_SIN_LEN
13087 rather than depend on __APPLE__.
13089 2007-11-07 Mark Probst <mark.probst@gmail.com>
13091 * icall.c: Safety checks in InitializeArray. Fixes bug #324535.
13093 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
13095 * object.c: Fix mono_string_to_utf8 to handle NULL values inside the
13096 UTF16 MonoString. Fix the crash from bug #335488
13098 2007-11-06 Sebastien Pouliot <sebastien@ximian.com>
13100 * marshal.c: Correct (for non-Win32 OS) length != size in
13101 mono_string_from_bstr. Fix #339530.
13103 2007-11-06 Geoff Norton <gnorton@novell.com>
13105 * socket-io.c: Apple requires sin(6)_len to be set for getnameinfo
13108 2007-11-05 Kornél Pál <kornelpal@gmail.com>
13110 * process.c: Added run-time GetProcessId API detection for Windows.
13112 2007-11-04 Miguel de Icaza <miguel@novell.com>
13114 * reflection.c (mono_param_get_objects): If a parameter has the
13115 attribute [System.Runtime.InteropServices.Optional] we should
13116 set the DefaultValue of the ParameterInfo to be
13117 System.Reflection.Missing instead of DBNull.
13121 (mono_get_reflection_missing_object): New method,
13122 returns the System.Reflection.Missing.Value singleton instance.
13124 2007-11-03 Atsushi Enomoto <atsushi@ximian.com>
13126 * culture-info-table.h : regenerated.
13128 2007-11-02 Jonathan Chambers <joncham@gmail.com>
13130 * icall.c: Use GetEnvironmentStrings on windows
13131 so we are using the same environment block as
13132 GetEnvironmentVariable/SetEnvironmentVariable. Fixes
13135 Code is contributed under MIT/X11 license.
13137 2007-10-31 Martin Baulig <martin@ximian.com>
13139 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 64.
13141 * mono-debug-debugger.h
13142 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_TRAMPOLINE'.
13144 2007-10-30 Zoltan Varga <vargaz@gmail.com>
13146 * reflection.c (mono_custom_attrs_from_class): Add support for dynamic inflated
13149 2007-10-30 Atsushi Enomoto <atsushi@ximian.com>
13151 * culture-info-table.h : regenerated.
13153 2007-10-30 Robert Jordan <robertj@gmx.net>
13155 * icall-def.h, icall.c:
13156 Add ves_icall_Remoting_RemotingServices_GetVirtualMethod ().
13158 Code is contributed under MIT/X11 license.
13160 2007-10-29 Zoltan Varga <vargaz@gmail.com>
13162 * class.c (mono_class_setup_vtable): Find the inflated methods in the
13163 inflated class instead of inflating them again.
13165 * class.c (mono_class_setup_vtable): Inflate the override methods in the
13168 * class.c (mono_generic_class_get_class): Set klass->property.count as well.
13169 Call setup_supertypes () after klass->parent is set.
13170 (mono_class_setup_properties): Enable this to work on dynamic generic classes.
13172 * reflection.c (mono_type_get_object): Only return a MonoGenericClass object
13173 for inflated instances of not yet created dynamic generic classes.
13174 (ctorbuilder_to_mono_method): Handle the case when this is called multiple
13175 times from inflated_method.
13176 (methodbuilder_to_mono_method): Ditto.
13178 Mon Oct 29 21:02:53 CET 2007 Paolo Molaro <lupus@ximian.com>
13180 * gc.c: code cleanup and removed old untested option of not creating the
13183 2007-10-29 Zoltan Varga <vargaz@gmail.com>
13185 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Avoid
13186 creating a jump trampoline for dynamic methods.
13188 2007-10-29 Rodrigo Kumpera <rkumpera@novell.com>
13190 * reflection.c (mono_image_create_token): Correctly encode methods and constructors of
13191 generic TypeBuilders when called from another method of the same type (bug #335131).
13194 2007-10-27 Zoltan Varga <vargaz@gmail.com>
13196 * reflection.c (methodbuilder_to_mono_method): Revert the last change as it
13197 doesn't seem to work perfectly.
13199 * reflection.c (ctorbuilder_to_mono_method): Handle the case when this is
13200 called multiple times.
13201 (methodbuilder_to_mono_method): Ditto.
13202 (resolve_object): Inflate FieldBuilder's.
13204 Fri Oct 26 19:38:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
13206 * string-icalls.c, string-icalls.h, appdomain.c: patch from
13207 Tyler Larson <mono-devel@tlarson.com> to fix the handling of
13208 RemoveEmptyEntries in the string.Split implementation (bug #322375).
13210 2007-10-26 Dick Porter <dick@ximian.com>
13212 * appdomain.c (MONO_CORLIB_VERSION): Bump version because of
13213 Thread initialisation changes
13215 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
13217 * verify.c: fix compatibility check between arrays and System.Array
13219 2007-10-26 Zoltan Varga <vargaz@gmail.com>
13221 * reflection.c (mono_reflection_get_custom_attrs_info): Handle MonoGenericClass
13222 too. Fixes #336999.
13224 2007-10-25 Zoltan Varga <vargaz@gmail.com>
13226 * object.c (mono_value_box): Use typed allocation here.
13228 2007-10-23 Zoltan Varga <vargaz@gmail.com>
13230 * icall.c (ves_icall_System_Delegate_CreateDelegate_internal): Create a jump
13231 trampoline instead of compiling the method right away.
13233 * class-internals.h object.c: Add a JIT callback to create a jump trampoline.
13235 2007-10-21 Zoltan Varga <vargaz@gmail.com>
13237 * class.c (mono_generic_class_get_class): Avoid setting klass->size_inited and
13238 related fields for dynamic classes. Fixes #334493.
13240 2007-10-20 Zoltan Varga <vargaz@gmail.com>
13242 * class.c (mono_generic_class_get_class): Set klass->field.count as well.
13244 * class.c (mono_class_layout_fields): Use 1 instead of TRUE for consistency.
13246 * class.c (mono_class_layout_fields): Set size_inited for generic classes as well.
13247 (mono_class_setup_vtable): Obtain overrides for dynamic generic classes correctly.
13249 * class.c (mono_class_setup_methods): Handle dynamic inflated classes correctly.
13251 * reflection.c (create_generic_typespec): Initialize klass->generic_container
13253 (reflection_methodbuilder_to_mono_method): Set container->is_method to TRUE.
13255 2007-10-18 Jonathan Chambers <joncham@gmail.com>
13257 * marshal.c: Use correct key when removing item
13260 Code is contributed under MIT/X11 license.
13262 2007-10-17 William Holmes <billholmes54@gmail.com>
13264 *marshal.c: Adding a case to marshal booleans to U1
13266 Code is contributed under MIT/X11 license.
13268 2007-10-18 Zoltan Varga <vargaz@gmail.com>
13270 * class.c (mono_class_from_name): Search the modules compromising dynamic
13271 assemblies. Fixes #331601.
13273 2007-10-16 Zoltan Varga <vargaz@gmail.com>
13275 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Throw an
13276 exception if the type name contains an assembly component. Fixes #334203.
13278 * reflection.c (mono_reflection_get_type_with_rootimage): Search all the
13279 modules inside dynamic assemblies. Fixes #334200.
13281 * reflection.c: Set image->public_key and image->public_key_length;
13283 * metadata-internals.h (MonoDynamicImage): Add public_key and public_key_len
13286 * image.c (mono_image_get_public_key): Handle dynamic assemblies. Fixes #334173.
13288 2007-10-16 Mark Probst <mark.probst@gmail.com>
13290 * metadata.c: Implemented correct comparing of generic classes.
13291 An inflated generic class can be equal to a non-inflated one if it
13292 is inflated with generic type variables as type arguments. Fixes
13295 2007-10-15 Dick Porter <dick@ximian.com>
13297 * monitor.c (mono_monitor_try_enter_internal): Set thread state to
13298 WaitSleepJoin while it is waiting to acquire a lock. Fixes bug
13301 * threads.c: Turn the thread synch_lock into a CRITICAL_SECTION,
13302 instead of a monitor lock. This means that monitor_try_enter and
13303 co can set the thread state safely.
13304 (ves_icall_System_Threading_Thread_Interrupt_internal): Always set
13305 thread_interrupt_requested, so interrupt actually works.
13307 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal,
13308 ves_icall_System_Net_Sockets_Socket_Select_internal): Use thread
13309 state accessor function
13311 2007-10-15 Martin Baulig <martin@ximian.com>
13314 (MONO_DEBUGGER_VERSION): Bump to 63 to make it impossible to use
13315 the debugger with the current runtime.
13317 Mon Oct 15 10:20:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
13319 * object.c, object-internals.h: added the ability to set a single
13320 trampoline for all the slots in a vtable.
13322 Fri Oct 12 17:50:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13324 * marshal.c: deal with a possible race condition during multicast
13325 delegate invocation.
13327 Fri Oct 12 13:31:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13329 * class.c: ensure value type methods don't have the synchronized
13332 Fri Oct 12 08:10:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
13334 * string-icalls.c, string-icalls.h: reverted unapproved patch that
13337 2007-10-11 Joel Reed <joelwreed@comcast.com>
13339 * string-icalls.c, string-icalls.h: modify System_String_InternalSplit
13340 to take an options parameter so that empty entries can be removed during
13341 the split procedure. Patch from: Tyler Larson <mono-devel@tlarson.com>
13343 Thu Oct 11 20:16:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
13345 * marshal.c: make sure we don't store the signature from a dynamic
13346 method into the runtime invoke cache (bug #327189).
13348 Thu Oct 11 18:22:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
13350 * marshal.c: make sure the wrapper methods are properly initialized.
13352 2007-10-11 Mark Probst <mark.probst@gmail.com>
13354 * metadata.c, metadata-internals.h: Generalized
13355 mono_type_stack_size() to mono_type_stack_size_internal() which
13356 takes an additional argument specifying whether it allows open
13359 2007-10-10 Rodrigo Kumpera <rkumpera@novell.com>
13361 * verify.c (do_invoke_method): handle typedbyref params
13362 correctly and check for unverifiable return values.
13364 * verify.c (do_newobj): fix a warning.
13366 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
13368 * verify.c: don't tread typedbyref as allways unverifable,
13369 so uses, like (ld/st)loc.0 are valid. verify for the cases
13370 that it matters, like boxing related operations.
13372 2007-10-09 Rodrigo Kumpera <rkumpera@novell.com>
13374 * verify.c: add verification of the newobj opcode. verification
13375 of delegate instantation still missing due ldftn and virldftn not
13376 pushing the function type on stack
13378 2007-10-08 Mark Probst <mark.probst@gmail.com>
13380 * class-internals.h: Runtime generic context data structure
13383 * object.c: Initialization of runtime generic context at runtime
13384 vtable creation time.
13386 2007-10-08 Massimiliano Mantione <massi@ximian.com>
13387 * class.c (mono_class_create_from_typedef,
13388 mono_class_from_generic_parameter, mono_ptr_class_get,
13389 mono_fnptr_class_get, mono_bounded_array_class_get)
13390 * domain.c (mono_domain_create, mono_domain_free)
13391 * assembly.c (mono_assembly_load_from_full, mono_assembly_close)
13392 * image.c (do_mono_image_load, mono_image_close):
13393 Hooked up load-unload profiler events.
13395 Mon Oct 8 11:38:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
13397 * domain.c: track statistics about the actual amount of native code
13400 Sat Oct 6 10:01:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
13402 * class.c: the valuetype enumerators don't have the additional
13403 supertypes interfaces.
13405 Fri Oct 5 20:33:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
13407 * class.c: need more interfaces setup for the IEnumerator<T>
13408 object created for arrays (tests/ienumerator-interfaces.2.cs).
13410 2007-10-05 Zoltan Varga <vargaz@gmail.com>
13412 * class.c (mono_ldtoken): Handle methodspec tokens as well. Fixes #331097.
13414 2007-10-05 Alp Toker <alp@atoker.com>
13416 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
13417 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
13420 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
13422 * verify.c (verify_type_compatibility_full): verification of
13423 compatibility improved, validates correctly non-strict checks between
13424 native int and I4 types different than (unsigned)int32.
13426 * verify.c (do_store_indirect): added, do all verification of
13429 * verify.c (get_load_indirect_mono_type): renamed to
13430 get_indirect_op_mono_type, as it now returns the MonoType for
13431 ldind.X and stind.X opcodes.
13433 2007-10-04 Rodrigo Kumpera <rkumpera@novell.com>
13435 * reflection.c: Fix the encoding of generic type definition for
13438 * reflection.c (mono_image_typedef_or_ref_full: do the same thing as
13439 mono_image_typedef_or_ref but allows to specify if typespec lookups should
13440 be made. Typespec check is done prior to typeref cache lookup.
13442 * reflection.c (mono_image_typedef_or_ref): now just delegate to
13443 mono_image_typedef_or_ref_full.
13445 * reflection.c (encode_generic_class): encode the generic class
13446 directly instead of calling encode_type.
13448 * reflection.c (encode_type): encode the generic type definition
13449 MonoClass as a generic instantiation.
13451 * reflection.c (create_typespec): cache typespec tokens in
13452 the assembly->typespec cache. Don't create typespec for a generic
13453 instance MonoClass. Create typespec for the generic type defintion.
13455 * reflection.c (create_generic_typespec): encode the generic
13456 class directly instead of calling encode_type.
13458 * reflection.c (mono_image_create_token): encode the generic
13459 type definition not using a typespec for MonoType instances.
13462 2007-10-04 Raja R Harinath <rharinath@novell.com>
13465 * class.c (mono_image_init_name_cache): Don't return nested
13466 'protected internal' classes.
13467 (mono_class_from_name_case): Likewise.
13469 2007-10-04 Atsushi Enomoto <atsushi@ximian.com>
13471 * icall-def.h, icall.c : get_bundled_machine_config() is now the
13472 common function used by both DefaultConfig in System.dll and
13473 InternalConfigurationHost in System.Configuration.dll.
13475 Wed Oct 3 17:26:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
13477 * class.c: automatically add to vectors only a few essential explicit
13478 generic interfaces. The rest of the interfaces that arrays should
13479 provide are currently implicitly added (but still not lazily, see the
13480 design in the discussion of bug#325495 for the details of what is
13481 needed for that). Additionally, implicit interfaces are assigned the
13482 same vtable slot as the explicit interfaces (as they are compatible):
13483 this enables huge memory savings since we don't need to instantiate
13484 as many memthods and as large vtables anymore. Also, Since
13485 GetEnumerator<T> returns an instance of a type that is required to
13486 support a similarly large set of interfaces as arrays, we add
13487 implicit interfaces and interface offset sharing support to those
13488 types, too. This change adds all the required interfaces so that
13489 the anonarray.cs test case in the bug report works (we don't add
13490 all the interfaces to arrays of arrays 3-level deep and more because
13491 of the memory requirements explained in the bug and since they are much
13492 less common: the lazy-loading support will enabled them to work, too).
13494 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
13496 * verify.c (merge_stacks): major clean up, all type compatibility
13497 checks are done by verify_type_compatibility. This fix my earlier lack
13498 of understanding of the CLR type system and merge_stacks no longer looks
13501 * verify.c: fixed some bad spelling.
13503 2007-10-02 Rodrigo Kumpera <rkumpera@novell.com>
13505 * verify.c (mono_type_from_stack_slot): added. returns the MonoType for
13506 a given stack slock.
13508 * verify.c: killed verify_type_compat in favor of verify_type_compatibility and
13509 verify_type_compatibility_full. This removed a near indentical function and fixed
13510 handling of Int32 and IntPtr across all opcodes.
13512 Tue Oct 2 15:24:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
13514 * class.c: only vectors have the additional generic interfaces.
13516 2007-10-01 Jonathan Chambers <joncham@gmail.com>
13518 * mono-config.c: Use g_strcasecmp instead of
13519 strcasecmp like everywhere else to fix
13520 compilation with MSVC.
13522 Code is contributed under MIT/X11 license.
13524 Mon Oct 1 14:39:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
13526 * object.c, object-internals.h: refactored the IMT code to enable
13527 building a single slot at a time and lazily creating the IMT trampolines
13530 2007-09-29 Zoltan Varga <vargaz@gmail.com>
13532 * loader.c (inflate_generic_signature): Allocate inflated signatures from the heap.
13534 * metadata.c (mono_metadata_free_inflated_signature): Free the signature itself too.
13537 2007-09-29 Raja R Harinath <harinath@gmail.com>
13539 * loader.c (method_from_methodspec): Rearrange to avoid
13540 un-necessary exposition. Don't assert out if the method's
13541 declaring type is a generic type definition.
13543 2007-09-28 Martin Baulig <martin@ximian.com>
13545 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 61.
13547 Fri Sep 28 20:15:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
13549 * class-internals.h: optimize field layout of MonoClass to
13550 requires less cachelines at runtime and save a few bytes on 64 bit
13553 2007-09-28 Jb Evain <jbevain@novell.com>
13555 * reflection.c: when encoding type names in custom attributes,
13556 if the type is a closed generic type, its generic arguments
13557 have to be serialized as AssemblyQualifiedName, so that when
13558 they are deserialized, it's possible to re-create them properly.
13562 Fri Sep 28 19:19:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
13564 * object.c, class-internals.h: added delegate-creation counter.
13566 Fri Sep 28 18:07:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
13568 * class.c: cleanup of the code that synthetizes interfaces for
13569 arrays in 2.0: saves quit a bit of corlib mempool memory.
13570 Code to fix bug #325495 ifdeffed out for now until the issues
13571 with memory usage and O(n^2) behaviour are fixed.
13573 Fri Sep 28 17:19:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
13575 * marshal.c: when possible, do not duplicate the name of the methods
13576 in the method builder and in the generated MonoMethod.
13578 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
13579 * verify.c: added support for type checking ldind_* opcodes.
13581 2007-09-27 Rodrigo Kumpera <rkumpera@novell.com>
13583 * class-internals.h (struct _MonoGenericClass): new field is_tb_open
13584 which is used to distinguish the fully open instantiation of a TypeBuilder
13585 with the rest. This temporary hack is required to restore the property that
13586 the fully open instantiation is the same type of the generic type definition.
13588 * class-internals.h (mono_generic_class_is_generic_type_definition):
13589 new function as part of the internal API.
13591 * class.c (inflate_generic_type): return NULL when the generic inst is
13592 fully open. The fully open generic type is now the same as the generic type
13593 definition for non TypeBuilder types.
13595 * class.c (mono_generic_class_get_class): removed assert since it is
13596 no longer valid, gklass->cached_class can point to the generic type definition.
13598 * class.c (mono_generic_class_is_generic_type_definition): new.
13600 * metadata.c (mono_generic_class_hash): added is_tb_open field
13601 to the hash calculation.
13603 * metadata.c (free_generic_class): if the generic class is associated
13604 with the generic type definition, its field will come from the mempool and
13607 * metadata.c (mono_metadata_is_type_builder_generic_type_definition):
13608 new, this function identifies the corner case of a TypeBuilder fully open
13611 * metadata.c (mono_metadata_lookup_generic_class): use is_tb_open
13612 for lookup. Set gclass->cached_class to be the container class in case of
13613 the fully open instantiation of non TypeBuilder types.
13615 * metadata.c (_mono_metadata_generic_class_equal): use is_tb_open
13616 to compare generic classes.
13618 * reflection.c (method_encode_methodspec): remove assert that
13619 no longer is valid.
13621 * reflection.c (mono_reflection_generic_class_initialize): add
13622 an aditional assert to ensure the proper type is used.
13624 2007-09-26 Rodrigo Kumpera <rkumpera@novell.com>
13626 * verify.c: disabled all debug spew by default, define MONO_VERIFIER_DEBUG
13629 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
13631 * verify.c (push_arg): Fixed support for ldarga
13632 * verify.c (set_stack_value): Removed superfluous parameter, fixed the
13633 MonoType used as first arg in case of instance calls.
13635 2007-09-25 Rodrigo Kumpera <rkumpera@novell.com>
13637 * verify.c: Support for verifying VAR and MVAR types,
13639 2007-09-25 Zoltan Varga <vargaz@gmail.com>
13641 * icall.c (ves_icall_get_property_info): Set the reflected type of the
13642 accessors correctly.
13644 Tue Sep 25 14:56:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
13646 * threads.c: support OSX and other systems in
13647 mono_thread_get_stack_bounds (bug #328026).
13649 2007-09-25 Martin Baulig <martin@ximian.com>
13652 (MonoDebugVarInfo): Replace `MonoClass *klass' with `MonoType *type'.
13654 2007-09-24 Martin Baulig <martin@ximian.com>
13657 (MonoDebugClassEntry): Moved the definition of this struct into
13658 mono-debug.c to make it private.
13661 (MonoDebugClassEntry): Removed `symfile_id'; since we now use one
13662 type table per symbol file, we don't need to store the symfile id
13665 2007-09-24 Martin Baulig <martin@ximian.com>
13667 Create one type table per symbol file, since a `MonoClass *' gets
13668 invalid when its image is unloaded.
13670 * mono-debug.h (MonoSymbolTable): Removed `type_table'.
13671 (MonoDebugHandle): Added `type_table'.
13673 Mon Sep 24 17:25:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
13675 * mempool.c, mempool.h: added mono_mempool_new_size () API
13676 to be able to specify a smaller initial size for the pool.
13677 Adjusted the code to slowly increase pool size before using
13678 the previous default size.
13679 * image.c: use a small initial size for image mempools.
13681 2007-09-23 Zoltan Varga <vargaz@gmail.com>
13683 * marshal.c (emit_marshal_array): Generate valid IL for byref array case.
13686 * icall.c (ves_icall_System_Reflection_Assembly_get_ManifestModuleInternal):
13687 Rename this to ves_icall_System_Reflection_Assembly_GetManifestModuleInternal.
13689 2007-09-22 Zoltan Varga <vargaz@gmail.com>
13691 * metadata.c (mono_type_create_from_typespec): Remove an invalid
13692 free. Fixes #327438.
13694 2007-09-21 Raja R Harinath <harinath@gmail.com>
13696 * metadata.c (type_in_image) <MONO_TYPE_SZARRAY>: Handle arrays of
13697 generic instantiations, etc.
13698 <MONO_TYPE_ARRAY>: Likewise.
13700 2007-09-21 Martin Baulig <martin@ximian.com>
13702 * mono-debug.h (MonoSymbolFilePriv, MonoDebugHandlePriv): Removed;
13703 these structs were never defined.
13704 (MonoDebugHandle): Removed the `_priv' field, it was never used.
13706 2007-09-21 Martin Baulig <martin@ximian.com>
13708 * mono-debug.h (MonoDebugVarInfo): Add `MonoClass *klass'.
13710 Fri Sep 21 14:39:45 CEST 2007 Paolo Molaro <lupus@ximian.com>
13712 * image.c: removed the guid hash tables: we can get the same info
13713 without the additional memory usage hit (partially fixes also bug #327052).
13715 2007-09-10 Massimiliano Mantione <massi@ximian.com>
13717 * profiler.h, profiler-private.h, profiler.c: add a new profiler
13718 event to handle unloading methods. After the event is called, the
13719 corresponding MonoMethod* must be considered invalid.
13720 * loader.c (mono_free_method): call the new mono_profiler_method_free
13723 2007-09-20 Mark Probst <mark.probst@gmail.com>
13725 * domain-internals.h: New flag in MonoJitInfo which marks shared
13726 generic methods. New hash table (shared_generics_hash) in
13727 MonoDomain to keep track of shared generic methods. Prototypes
13728 for functions to register and lookup shared generic methods.
13730 * domain.c: Support for registering and looking up shared generic
13731 methods via a hash table (shared_generics_hash) in MonoDomain.
13733 * class-internals.h: New exception to signal failure of shared
13734 compilation of a generic method. New counters for generics
13735 sharing in MonoStats.
13737 Thu Sep 20 16:59:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
13739 * image.c, metadata-internals.h: don't keep a file descriptor open
13740 for loaded assemblies (bug#325988).
13742 2007-09-19 Raja R Harinath <rharinath@novell.com>
13744 * metadata.c (signature_in_image): New. Carve out of type_in_image.
13745 (ginst_in_image, gclass_in_image): Simplify. Change signature to
13746 use the corresponding datatypes.
13747 (type_in_image): Update to changes.
13748 (CleanForImageUserData): Simplify.
13749 (steal_gclass_in_image): Carved out of old 'gclass_in_image'.
13750 Avoid quadratic behaviour in handling the "stolen" list by
13751 separating the filter predicate out, and by prepending the stolen
13752 items rather than appending them.
13753 (steal_ginst_in_image): Likewise.
13754 (mono_metadata_clean_for_image): Update to changes.
13756 2007-09-19 Martin Baulig <martin@ximian.com>
13758 * domain.c (mono_cleanup): Call mono_debug_cleanup() here.
13760 2007-09-19 Martin Baulig <martin@ximian.com>
13762 * mono-debug.c (mono_debug_cleanup): Don't call
13763 mono_debugger_cleanup(); this is now called earlier from mini_cleanup().
13765 2007-09-19 Raja R Harinath <harinath@gmail.com>
13767 Fix crash on 'make run-test' in mcs/errors
13768 * metadata.c (type_in_image): New. Carve out of ginst_in_image.
13769 Avoid more potential allocations in mono_class_from_mono_type.
13770 (ginst_in_image): Update to changes.
13771 (gclass_in_image): Rearrange slightly.
13773 2007-09-18 Zoltan Varga <vargaz@gmail.com>
13775 * class.c (mono_class_init): Move the code that sets up class->methods to
13776 mono_class_setup_methods () for inflated generic classes too. Ditto for properties.
13778 * metadata.c (mono_metadata_get_inflated_signature): New function to return a
13779 canonical instance of an inflated generic signature.
13780 (mono_type_create_from_typespec): Remove an invalid free.
13782 * loader.c (mono_method_get_signature_full): Use mono_metadata_get_inflated_signature.
13784 2007-09-18 Marek Habersack <mhabersack@novell.com>
13786 * domain-internals.h: added a declaration of the
13787 mono_assembly_load_full_nosearch internal function.
13789 * assembly.c (mono_assembly_load_with_partial_name): use
13790 mono_try_assembly_resolve return value properly.
13791 (mono_assembly_load_full_nosearch): copied the function body from
13792 mono_assembly_load_full, without the code to invoke assembly
13794 (mono_assembly_load_full): calls the above new function and if the
13795 assembly is not resolved, invokes the search hooks.
13797 * appdomain.c (mono_runtime_init): restore the global postload
13798 assembly search handlers.
13800 2007-09-18 Zoltan Varga <vargaz@gmail.com>
13802 * class.c (mono_class_init): Make sure class->methods and class->properties
13803 are never NULL in the generics case.
13805 * metadata.c (free_generic_class): Enable this again, skip the dynamic case.
13807 2007-09-17 Zoltan Varga <vargaz@gmail.com>
13809 * metadata.c (free_generic_class): Disable some code to fix the build.
13811 * domain.c (mono_cleanup): Fix a crash introduced by a previous patch.
13813 * marshal.c (mono_marshal_get_xappdomain_dispatch): Allocate a piece of data
13814 from the image mempool.
13816 * metadata.c (free_generic_class): Free more data from the inflated class.
13818 * class.c (mono_class_from_generic_parameter): Allocate memory from the mempool.
13820 * metadata.c (mono_metadata_parse_generic_param): Allocate memory from the image
13822 (mono_type_create_from_typespec): Ditto.
13824 * domain.c (get_runtimes_from_exe): Add an out parameter to return the opened
13825 MonoImage to the caller.
13826 (mono_init_internal): Save the opened image in a global variable.
13827 (mono_cleanup): Close the image opened in get_runtimes_from_exe.
13829 * reflection.c (resolve_object): Fix a leak.
13831 * metadata.c: Fix the freeing of data in the generics caches.
13833 * metadata.c (free_generic_inst): Comment this out to fix the build.
13834 (free_generic_class): Ditto.
13836 * metadata.c: Free cached generic methods, instantinations and classes when
13837 they are removed from the caches.
13838 (mono_metadata_free_type): Free the type itself.
13840 * class.c: Free the result of mono_class_inflate_generic_type () in a few
13843 Mon Sep 17 16:14:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
13845 * boehm-gc.c: restrict managed allocs to __thread supporting
13848 2007-09-16 Zoltan Varga <vargaz@gmail.com>
13850 * class.c (mono_class_inflate_generic_type): Add a comment describing memory ownership.
13851 (mono_generic_class_get_class): Fix a leak.
13853 * metadata.c (do_mono_metadata_parse_type): Remove an unneccesary call to
13854 mono_metadata_free_type ().
13855 (mono_metadata_inflate_generic_inst): Fix a leak.
13857 2007-09-14 Zoltan Varga <vargaz@gmail.com>
13859 * mono-debug.c (free_header_data): Fix a leak missed earlier.
13861 * metadata.c (mono_metadata_parse_array_full): Allocate memory from the image
13864 * mono-debug.c (mono_debug_close_image): Fix call to
13865 g_hash_table_remove ().
13867 Fri Sep 14 19:36:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
13869 * icall-def.h: redirect all the string ctor to the managed
13870 CreateString () methods.
13871 * string-icalls.c, string-icalls.h: removed dead code for string
13874 2007-09-14 Zoltan Varga <vargaz@gmail.com>
13876 * mono-debug.c: Fix memory leaks.
13878 2007-09-14 Jonathan Chambers <joncham@gmail.com>
13880 * threads-types.h: Implement mono_hazard_pointer_set and
13881 mono_hazard_pointer_clear macros using do/while(0) to fix
13882 compilation with MSVC.
13884 Code is contributed under MIT/X11 license.
13886 2007-09-14 Zoltan Varga <vargaz@gmail.com>
13888 * gc.c (ves_icall_System_GCHandle_GetAddrOfPinnedObject): Use a return value of
13889 -2 to communicate to managed code that the handle is not pinned. Fixes #82848.
13891 Fri Sep 14 14:04:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
13893 * icall-def.h, string-icalls.c: get rid of old, no longer used, string
13896 Fri Sep 14 11:41:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
13898 * boehm-gc.c, gc-internal.h, object.c: allow strings to be
13899 managed-code allocated as well.
13901 2007-09-13 Zoltan Varga <vargaz@gmail.com>
13903 * class.c (mono_class_is_assignable_from): Add support for generic variance.
13905 Thu Sep 13 11:55:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
13907 * boehm-gc.c: fixed the build after the AOT changes.
13909 2007-09-13 Zoltan Varga <vargaz@gmail.com>
13911 * wrapper-types.h: Add an ALLOC wrapper type.
13913 * gc-internals.h boehm-gc.c null-gc.c sgen-gc.c: Add functions needed by AOT to
13914 reference managed allocator methods.
13916 2007-09-12 Marek Safar <marek.safar@gmail.com>
13918 * icall.c (ves_icall_MonoType_GetGenericArguments): Create an instance
13919 of Type array and not MonoType, a fix suggested by Hari.
13921 2007-09-12 Jonathan Chambers <joncham@gmail.com>
13923 * domain-internals.h, domain.c : Remove delegate_invoke_impl_with_target_hash
13924 and delegate_invoke_impl_no_target_hash from _MonoDomain struct.
13926 Code is contributed under MIT/X11 license.
13928 2007-09-10 Massimiliano Mantione <massi@ximian.com>
13930 * domain.c, object.c, mono-config.c, object-internals.h: Fixed #82416.
13932 2007-09-12 Marek Habersack <mhabersack@novell.com>
13934 * image.c (do_mono_image_open): if assembly file fails to open and
13935 MONO_IOMAP is in effect, try to find the path in a
13936 case-insensitive way.
13938 * appdomain.c (mono_runtime_init): do not install postload hooks -
13939 tests show that MS.NET doesn't use anything of that sort to
13940 trigger the AppDomain.AssemblyResolve event.
13941 (mono_try_assembly_resolve): renamed from try_assembly_resolve and
13943 (mono_runtime_init): init portability helpers here.
13945 * assembly.c (mono_assembly_load_with_partial_name): if other
13946 attempts fail, trigger the AppDomain.AssemblyResolve event handler
13947 to resolve the assembly.
13949 * domain-internals.h: added mono_try_assembly_resolve and marked
13952 2007-09-11 Jb Evain <jbevain@novell.com>
13954 * object-internals.h (MonoReflectionDynamicMethod): add
13955 a `MonoReflectionType *owner` field. The owner is used
13957 (mono_reflection_create_dynamic_method): use the owner of the dynamic
13958 method as the class declaring the dynamic method.
13959 (reflection_methodbuilder_from_dynamic_method): copy the owner of the
13960 dynamic method to the declaring type of the methodbuilder.
13962 2007-09-11 Mark Probst <mark.probst@gmail.com>
13964 * icall.c (ves_icall_InternalInvoke): Enforce CoreCLR security
13965 rules for calling methods via reflection.
13967 2007-09-11 Zoltan Varga <vargaz@gmail.com>
13969 * reflection.c (resolve_object): Add support for MonoGenericClass.
13970 Inflate MonoType's.
13972 Tue Sep 11 16:08:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
13974 * gc-internal.h, boehm-gc.c, null-gc.c, sgen-gc.c: allow the GC to
13975 provide a managed method that does fast allocations without needing
13976 a managed->unmanaged transition. Boehm GC implementation currently
13977 enabled for ptrfree objects on sane architectures.
13979 Tue Sep 11 16:00:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
13981 * marshal.c, marshal.h: exported a couple of useful functions and
13982 added mono_mb_get_label () to easily handle backward branches.
13984 2007-09-10 Zoltan Varga <vargaz@gmail.com>
13986 * reflection.c (resolve_object): Inflate generic methods. Fixes #82782.
13988 2007-09-10 Massimiliano Mantione <massi@ximian.com>
13990 * loader.c (find_method): Fixed the regression introduced while
13993 2007-09-09 Zoltan Varga <vargaz@gmail.com>
13995 * class.c (mono_lookup_dynamic_token_class): Pass along the context here as
13998 * class.c loader.c metadata.c object.c class-internals.h object-internals.h
13999 icall.c reflection.c: Pass a MonoGenericContext argument to
14000 mono_lookup_dynamic_token ().
14002 * reflection.c (resolve_object): Handle GenericTypeParameterBuilder. Fixes
14005 2007-09-09 Robert Jordan <robertj@gmx.net>
14007 * object.c (mono_class_proxy_vtable): Don't create remoting trampolines
14008 for generic methods.
14010 * object.c (mono_object_get_virtual_method): Handle generic methods.
14013 Code is contributed under MIT/X11 license.
14015 Sat Sep 8 18:16:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
14017 * image.c: fix locking in mono_image_load_file_for_image ().
14019 Thu Sep 6 19:48:00 CEST 2007 Paolo Molaro <lupus@ximian.com>
14021 * reflection.c, icall.c, icall-def.h: the methodinfos name field is
14022 used only as a cache: added an icall to fill it.
14024 2007-09-16 Rodrigo Kumpera <rkumpera@novell.com>
14026 * reflection.h: exposed mono_reflection_free_type_info
14027 * reflection.c (mono_reflection_get_type_internal): type_args is always freed
14028 since mono_reflection_bind_generic_parameters makes a copy of it.
14029 * reflection.c (free_type_info): subinfos should be freed.
14030 * reflection.c (free_type_info): renamed to mono_reflection_free_type_info and
14032 * icall.c (type_from_name and ves_icall_System_Reflection_Assembly_InternalGetType):
14033 replaced explicit cleanup of MonoTypeNameParse struct with a call to mono_reflection_free_type_info,
14034 this fixes #82695 and #81726.
14037 2007-09-03 Atsushi Enomoto <atsushi@ximian.com>
14039 * process.h, process.c: added support for user profile/info in
14040 ProcessStartInfo. For now only Windows works.
14042 Fri Aug 31 17:30:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
14044 * metadata.c: consider the generic arguments when comparing
14045 signatures (bug #82614).
14047 Thu Aug 30 18:34:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14049 * cil-coff.h, image.c: updated assembly loader to cope with the
14050 PE32+ 64 bit file format.
14052 Thu Aug 30 16:47:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14054 * assembly.c, class.c, domain.c, loader.c: remove useless
14055 inclusion of cil-coff.h.
14057 2007-08-29 Jonathan Chambers <joncham@gmail.com>
14059 * marshal.c (cominterop_get_ccw): Walk up interface hierarchy
14060 if interface is marked with CoClassAttribute.
14062 Code is contributed under MIT/X11 license.
14064 Wed Aug 29 19:27:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
14066 * sgen-gc.c: ensure no object from the to space is copied again or finalized
14067 if it's seen twice in major collections.
14069 Wed Aug 29 18:46:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
14071 * sgen-gc.c: big objects are not copied to the gray area, but they
14072 need to be considered for scanning, too, if they are brought alive
14073 by an object ready for finalizations or a survived one.
14075 Wed Aug 29 18:43:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
14077 * sgen-gc.c: properly account the number of disappearing links when
14078 they are nullified.
14080 Wed Aug 29 18:37:37 CEST 2007 Paolo Molaro <lupus@ximian.com>
14082 * sgen-gc.c: share the code to scan the registered roots between the
14083 different types of collections.
14085 2007-08-28 Zoltan Varga <vargaz@gmail.com>
14087 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor): New icall.
14089 2007-08-28 Zoltan Varga <vargaz@gmail.com>
14091 * object.c (mono_class_proxy_vtable): Use max_interface_id instead of
14092 class->max_interface_id in a one place. Fixes transparentproxy.exe test on ia64.
14094 2007-08-28 Mark Probst <mark.probst@gmail.com>
14096 * security-manager.c (mono_security_manager_get_methods):
14097 LinkDemandSecurityException now has 2 arguments instead of 3.
14099 2007-08-27 Zoltan Varga <vargaz@gmail.com>
14101 * class.c (mono_class_layout_fields): Only do the struct alignment hack on
14102 platforms which need it.
14104 Mon Aug 27 18:29:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14106 * sgen-gc.c: unregister thread data structures with a pthread_key_t
14109 Mon Aug 27 18:27:35 CEST 2007 Paolo Molaro <lupus@ximian.com>
14111 * threads.c: free the thread static data on thread exit.
14113 Mon Aug 27 10:55:54 CEST 2007 Paolo Molaro <lupus@ximian.com>
14115 * class.c: walk the hierarchy to find the generic definition for
14116 a class (fixes runtime part of bug #82498).
14118 2007-08-24 Zoltan Varga <vargaz@gmail.com>
14120 * assembly.c (mono_assembly_close): Move the closing of the referenced assemblies to
14123 * image.c (mono_image_close): Here. Hopefully fixes #82510.
14125 2007-08-24 Mark Probst <mark.probst@gmail.com>
14127 * monodiet.c (handle_cattrs): Fixed a custom attr leak.
14129 2007-08-24 Robert Jordan <robertj@gmx.net>
14131 * appdomain.c: don't perform the ':'->';' substitution on Win32.
14133 2007-08-24 Jb Evain <jbevain@novell.com>
14135 * class.c (mono_type_get_name_recurse): fix AssemblyQualifiedName
14138 2007-08-24 Mark Probst <mark.probst@gmail.com>
14140 * threads.c: Make sure a thread gets cleaned up only once. Fixes
14143 2007-08-24 Zoltan Varga <vargaz@gmail.com>
14145 * assembly.c: Fix a warning.
14147 2007-08-23 Marek Habersack <mhabersack@novell.com>
14149 * appdomain.c: parse the <runtime> section looking for the probing
14150 element with the 'privatePath' attribute, which sets additional
14151 directories in which the runtime should look for assemblies.
14153 2007-08-23 Robert Jordan <robertj@gmx.net>
14155 * marshal.c (Marshal_ReAllocHGlobal) : Fix GlobalReAlloc's flags.
14158 2007-08-23 Martin Baulig <martin@ximian.com>
14160 * mono-debug.[ch]: Rename mono_debug_init_corlib() into
14161 _mono_debug_init_corlib() and remove it from the header file.
14163 2007-08-23 Martin Baulig <martin@ximian.com>
14165 * mono-debug-debugger.c
14166 (mono_debugger_unhandled_exception): Ignore `ThreadAbortException';
14167 don't notify the debugger about it.
14169 * mono-debug-debugger.h
14170 (MonoDebuggerEvent): Removed `THREAD_ABORT'.
14172 2007-08-23 Robert Jordan <robertj@gmx.net>
14174 * icall-def.h, process.*: implemented Get|SetPriorityClass icalls.
14175 Code is contributed under MIT/X11 license.
14177 Wed Aug 22 18:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14179 * sgen-gc.h, sgen-gc.c: abstracted most of the OS-specific code.
14181 2007-08-22 Martin Baulig <martin@ximian.com>
14183 * mono-debug.c: Store debugging info on a per-domain basis and
14184 free it on domain unload. Add support for unloading symbol files.
14187 (MonoDebugList): New typedef.
14189 - add `data_tables and `type_table'.
14190 - replace 'symbol_files' and `num_symbol_files' with a
14192 (mono_debug_data_table): Removed.
14193 (mono_debug_list_add): New public function.
14194 (mono_debug_list_remove): New public function.
14195 (mono_debug_init_1): Renamed into mono_debug_init_corlib().
14196 (mono_debug_init_2_memory): Renamed into
14197 mono_debug_open_image_from_memory().
14198 (mono_debug_close_image): New public function.
14199 (mono_debug_domain_create): Likewise.
14200 (mono_debug_domain_unload): Likewise.
14201 (MONO_DEBUGGER_VERSION): Bump to 60.
14203 * mono-debug-debugger.h
14204 (MonoDebuggerEvent):
14205 - remove `RELOAD_SYMTABS' and `METHOD_COMPILED'.
14206 - rename `ADD_MODULE' into `LOAD_MODULE'; add `UNLOAD_MODULE'.
14207 - add `DOMAIN_CREATE' and `DOMAIN_UNLOAD'.
14208 - rename `THREAD_CREATED' and `THREAD_EXITED' into
14209 `GC_THREAD_CREATED' and `GC_THREAD_EXITED'.
14210 - re-add `THREAD_CREATED' and `THREAD_EXITED'; with different
14212 (mono_debugger_add_symbol_file): Removed.
14213 (mono_debugger_add_type): Removed.
14214 (mono_debugger_lookup_type): Removed.
14215 (mono_debugger_lookup_assembly): Removed.
14218 (mono_domain_create): Call mono_debug_domain_create().
14219 (mono_init_internal): Call mono_debug_init_corlib().
14222 (mono_assembly_close): Call mono_debug_close_image().
14224 Wed Aug 22 17:26:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
14226 * sgen-gc.c: use the mono-mmap facilitites instead of hard-coding the
14229 Wed Aug 22 17:17:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
14231 * sgen-gc.c: ensure section->pin_queue_end is initialized
14232 correctly when non pinning objects in the section have been found.
14234 2007-08-22 Marek Habersack <mhabersack@novell.com>
14236 * appdomain.c (set_domain_search_path): cope with PrivateBinPath
14237 containing a list of directories separated by ':'. MSDN docs say
14238 the directories should be separated with ';'. Part of a bugfix for
14241 2007-08-21 Rodrigo Kumpera <rkumpera@novell.com>
14243 * class.c (mono_type_retrieve_from_typespec) : fixed the return type
14244 it should MonoType and not MonoClass.
14246 2007-08-21 Atsushi Enomoto <atsushi@ximian.com>
14248 * culture-info-table.h : regenerated.
14250 2007-08-20 William Holmes <billholmes54@gmail.com>
14252 *file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile
14253 to call ReplaceFile Kernel32 on windows or in io-layer.
14254 *file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
14255 *icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile
14256 as an internal call.
14258 Code is contributed under MIT/X11 license.
14260 2007-08-20 Jb Evain <jbevain@novell.com>
14262 * class-internals: add definitions for MONO_EXCEPTION_METHOD_ACCESS
14263 and MONO_EXCEPTION_FIELD_ACCESS.
14265 * debug-helpers.[c|h]: new mono_field_full_name function.
14267 2007-08-20 Mark Probst <mark.probst@gmail.com>
14269 * class.c: Removed class_security_level() and moved it to
14270 security-core-clr.c.
14272 * security-core-clr.c, security-core-clr.h: class_security_level()
14273 is now public and renamed to mono_security_core_clr_class_level().
14274 It also looks for security attributes in the classes a class is
14277 2007-08-20 Mark Probst <mark.probst@gmail.com>
14279 * security-core-clr.c, security-core-clr.h: CoreCLR security
14282 * Makefile.am: Added security-core-clr.[ch].
14284 * security-manager.c, security-manager.h: Functions and enum for
14285 setting and getting the security mode.
14287 * class.c: CoreCLR security checks.
14289 Mon Aug 20 12:38:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
14291 * icall-def.h, process.c, process.h: implemented icall to get
14292 user/system processor times.
14294 2007-08-17 Mark Probst <mark.probst@gmail.com>
14296 * domain.c, threads.c, class-internals.h, domain-internals.h: New
14297 reader-lock-free jit_info_table.
14299 2007-08-17 Zoltan Varga <vargaz@gmail.com>
14301 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_CUSTOM.
14303 * marshal.c (mono_marshal_type_size): Ditto. Fixes #82465 and #82466.
14305 * object-internals.h (MonoException): Add missing _data member.
14307 2007-08-08 Massimiliano Mantione <massi@ximian.com>
14309 * loader.c (find_method, find_method_in_class): Fixed bug #81466,
14310 checking that only methods with matching qname or fqname are picked
14311 from implemented interfaces.
14313 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
14315 * verify.c (do_newarr):added, do type verification of
14316 newarr ops, push the right value on the eval stack.
14317 * verify.c (mono_method_verify): use do_newarr
14320 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
14322 * verify.c (do_ldobj_value, do_unbox_value and do_box_value):
14323 factored the common code into get_boxable_mono_type, which
14324 is now using mono_type_get_full, this fixed byref related tests.
14326 2007-08-16 Rodrigo Kumpera <rkumpera@novell.com>
14328 * class.c: added mono_type_get_full, this function has the same
14329 behavior of mono_class_get_full but the returned MonoType has
14330 all metadata of the associated token in case of a typespec token.
14331 * class.c: added mono_type_retrieve_from_typespec, used by
14332 mono_type_get_full to retrieve the token type.
14333 * class.c (mono_class_create_from_typespec): changed to use
14334 mono_type_retrieve_from_typespec.
14335 * class.c (mono_ldtoken): changed to use mono_type_get_full
14336 for MONO_TOKEN_TYPE_(DEF|REF|SPEC).
14337 * class-internals.h: exported mono_type_get_full for internal use.
14339 2007-08-16 Jb Evain <jbevain@novell.com>
14341 * domain.c (supported_runtimes): add entry for
14342 the 'moonlight' runtime version.
14344 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
14346 * verify.c (mono_method_verify): small typo sliped in.
14348 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
14350 * verify.c (do_unbox_value): added, do type verification of
14352 * verify.c (mono_method_verify): use do_unbox_value
14355 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
14357 * verify.c (dump_stack_value): fixed typo, was printing string
14358 instead of object on stack.
14359 * verify.c (do_box_value): moved the byref check up as it leads
14360 to invalid code and should be done earlier.
14361 * verify.c: improved error messages for and ldobj
14363 2007-08-15 William Holmes <billholmes54@gmail.com>
14365 * marshal.c (emit_marshal_custom): Omit the call to
14366 marshal_native_to_managed when calling native to managed
14367 and the argument is specified as an out argument.
14369 Code is contributed under MIT/X11 license.
14371 2007-08-15 Rodrigo Kumpera <rkumpera@novell.com>
14373 * verify.c: fixed the type checks for generics, function pointers and vectors.
14374 Added type verification for ldobj and ldtoken. The verifier
14375 would segfault if header or signature of a method contained references
14376 to non-existant types.
14378 2007-08-15 Jonathan Chambers <joncham@gmail.com>
14380 * marshal.c (cominterop_get_ccw): Patch from
14381 Bill Holmes to no walk up interface hierarchy.
14382 All parent methods should be present in the interface for COM.
14384 Code is contributed under MIT/X11 license.
14386 2007-08-15 Jonathan Chambers <joncham@gmail.com>
14388 * marshal.c (emit_marshal_com_interface): Patch from
14389 Bill Holmes to handle COM Interfaces as return values
14390 for native->managed calls.
14392 Code is contributed under MIT/X11 license.
14394 2007-08-14 Jonathan Chambers <joncham@gmail.com>
14396 * marshal.c (cominterop_get_idispatch_for_object): Implement
14397 for runtime callable wrappers.
14399 Code is contributed under MIT/X11 license.
14401 2007-08-13 Rodrigo Kumpera <rkumpera@novell.com>
14403 * pedump.c (main): changed from mono_init to mono_init_from_assembly
14404 so 2.0 types are accessible
14407 2007-08-13 Miguel de Icaza <miguel@novell.com>
14409 * domain.c (mono_init_internal): Call mono_assembly_load_friends
14410 once we load mscorlib. Due to the order in which we initialize,
14411 the mono_assembly_load_full routine that loads mscorlib did not
14412 load friends. We now load it once we load the
14413 mono_defaults.internals_visible_class class.
14415 * assembly.c: Expose the mono_load_friend_assemblies method.
14417 2007-08-11 Rodrigo Kumpera <rkumpera@novell.com>
14419 * verify.c: improved the handling of boxing, better
14420 type checking for unary ops and conversion. Fix bug
14421 regarding managed pointer compatibility checking
14423 2007-08-11 Zoltan Varga <vargaz@gmail.com>
14425 * icall.c (ves_icall_System_Array_SetGenericValueImpl): New icall.
14427 * threads.c threads-types.h: Export mono_thread_get_stack_bounds.
14429 2007-08-09 Raja R Harinath <rharinath@novell.com>
14431 * reflection.c (dup_type): Remove.
14432 * class.c (dup_type): Remove.
14433 (mono_metadata_signature_deep_dup): Use 'mono_metadata_type_dup'
14434 instead of the dodgy 'dup_type'.
14435 (inflate_generic_type): Likewise. Fix the VAR/MVAR cases to
14436 handle the case where 'dup_type' needed the second argument.
14438 2007-08-08 Zoltan Varga <vargaz@gmail.com>
14440 * domain.c: Fix a warning.
14442 2007-08-08 Massimiliano Mantione <massi@ximian.com>
14444 * class.c (mono_class_setup_vtable_general): Fixed bug #77127,
14445 checking that methods with the same fqname are not overridden
14446 with a method from an ancestor.
14448 2007-08-07 Zoltan Varga <vargaz@gmail.com>
14450 * threads.c (free_thread_static_data_helper): Avoid a crash if
14451 thread->static_data is not yet set.
14453 2007-08-07 Jonathan Chambers <joncham@gmail.com>
14455 * marshal.c: Use correct image when emitting
14456 native wrapper for COM calls.
14458 Code is contributed under MIT/X11 license.
14460 2007-08-07 Atsushi Enomoto <atsushi@ximian.com>
14462 * icall-def.h, security.c, security.h :
14463 added icall wrapper to ProtectedMemory.[Unprotect|Protect]Data().
14465 2007-08-07 Martin Baulig <martin@ximian.com>
14467 * mono-debug-debugger.h
14468 (MonoDebuggerEvent): Add `MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD'.
14470 * domain.c (mono_domain_free): Call
14471 `mono_debugger_event (MONO_DEBUGGER_EVENT_DOMAIN_UNLOAD)'.
14473 2007-08-06 Rodrigo Kumpera <rkumpera@novell.com>
14475 * verify.c (check_underflow, check_overflow): error message now returns IL offset
14476 * verify.c (in_same_block): code should test if either offset is inside the clauses
14477 * verify.c (mono_method_verify): push the exception into the eval stack of exception
14480 2007-08-03 Zoltan Varga <vargaz@gmail.com>
14482 * image.c (mono_image_close): Fix a leak.
14484 * object.c (mono_runtime_invoke_array): Avoid using alloca.
14486 * icall.c (ves_icall_FieldInfo_SetValueInternal): Ditto.
14488 Fri Aug 3 19:54:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
14490 * domain.c, threads.c, threads-types.h: fix memory retention issue
14491 with thread static variables not being cleared on domain unload.
14492 Reuse thread static slots after domain unload.
14494 2007-08-03 Zoltan Varga <vargaz@gmail.com>
14496 * object.c (mono_runtime_invoke_array): Handle the case when the receiver is a
14499 * marshal.c (mono_marshal_get_runtime_invoke): Revert the previous change, it is
14500 now done in mono_runtime_invoke_array.
14502 * marshal.c (mono_marshal_get_runtime_invoke): Handle the case when the
14503 receiver is a nullable type.
14505 * class.c (mono_class_is_assignable_from): Handle the case when klass is a
14508 2007-08-03 Jonathan Chambers <joncham@gmail.com>
14510 * marshal.c: Implement COM Objects as return type for
14511 managed->unmanaged calls. Added Release calls for COM Object
14512 out/return values in managed->unmanaged calls.
14514 Code is contributed under MIT/X11 license.
14516 Fri Aug 3 17:00:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
14518 * threads.h, threads-type.h: move the hazard pointer declarations
14519 to the private header.
14521 Fri Aug 3 13:13:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
14523 * file-io.c, appdomain.c: memory leak fixes.
14525 2007-08-02 Dick Porter <dick@ximian.com>
14528 (ves_icall_System_Net_Sockets_Socket_Socket_internal): Move the
14529 SO_REUSEADDR setting into io-layer/sockets.c.
14531 2007-08-01 Zoltan Varga <vargaz@gmail.com>
14533 * icall.c (ves_icall_Type_GetMethodsByName): Return the members inherited
14534 from Object when called on a generic parameter. Fixes #82211.
14536 2007-08-01 Dick Porter <dick@ximian.com>
14538 * file-io.c (convert_share): Test FileShare values bit-by-bit.
14539 Fixes bug 79250 yet again.
14541 2007-07-30 Martin Baulig <martin@ximian.com>
14543 Merged the `debugger-dublin' branch.
14546 (MonoDebugDataTable): New typedef.
14547 (MonoDebugMethodAddressList): New typedef.
14548 (MonoDebugWrapperData): Removed.
14549 (MonoDebugSymbolTable): Removed `current_data_table',
14550 `current_data_table_size', `current_data_table_offset'.
14551 (MonoDebugDataItemType): Moved into mono-debug.c.
14552 (MonoDebugMethodJitInfo): Remove `address'.
14553 (mono_debug_data_table): New global variable.
14554 (mono_debug_lookup_method_addresses): New public function.
14555 (mono_debug_find_method): Take a `MonoMethod *', not a
14556 `MonoDebugMethodInfo *'.
14558 * mono-debug.c: Drop support for the old symbol tables.
14560 2007-06-28 Martin Baulig <martin@ximian.com>
14562 * mono-debug.c (mono_debug_debugger_version): New public variable.
14564 2007-07-31 William Holmes <billholmes54@gmail.com>
14566 * metadata.c Changed mono_type_create_from_typespec to not insert
14567 the type into the hash map until after
14568 do_mono_metadata_parse_type has completed.
14570 Code is contributed under MIT/X11 license.
14572 2007-07-31 Zoltan Varga <vargaz@gmail.com>
14574 * icall.c (ves_icall_Type_GetMethodsByName): Avoid a crash when called on a
14575 generic parameter. Fixes #82211.
14577 2007-07-27 Jb Evain <jbevain@novell.com>
14579 * pedump.c (dump_metadata, dump_metadata_header): dump
14580 versions contained in the metadata header.
14582 Fri Jul 27 17:07:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
14584 * threads.c: register small_id_table with the GC.
14586 2007-07-27 Mark Probst <mark.probst@gmail.com>
14588 * threads.c, threads.h, class-internals.h, object-internals.h:
14589 Hazard pointers, to be used by lock-free parallel algorithms.
14591 2007-07-26 Dick Porter <dick@ximian.com>
14593 * appdomain.c (mono_runtime_cleanup): Invoke io-layer cleanup
14594 routine on non-windows platforms, as I've not managed to think of
14595 a non-kludgy way of doing this. Finishes off bug 78739.
14597 Wed Jul 25 18:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
14599 * object.c: properly setup interface_bitmap in proxy vtables.
14601 2007-07-25 Marek Habersack <mhabersack@novell.com>
14603 * appdomain.c (get_shadow_assembly_location): do not use TickCount
14604 to create unique shadow copy target directories, use the domain's
14605 serial number instead. Each domain gets a unique target directory
14608 * domain.c (mono_domain_create): added code to increment domain
14609 shadow copy serial number and cache the value in the current
14612 * domain-internals.h (struct _MonoDomain): added a new field -
14613 shadow_serial to hold the serial number used in generation of
14614 shadow-copy directories. This is to make sure that the directory
14615 name is unique for each and every domain created. We avoid a race
14616 condition with overriding assemblies already in use by other app
14619 2007-07-24 Rodrigo Kumpera <rkumpera@novell.com>
14621 * class.c (mono_bounded_array_class_get): fixed memory leak when
14622 binding generic parameters.
14624 2007-07-24 Raja R Harinath <rharinath@novell.com>
14626 * metadata.c (do_mono_metadata_parse_generic_class): Use
14627 mono_metadata_lookup_generic_class. Don't g_assert on a metadata
14630 Tue Jul 24 15:15:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
14632 * loader.c, class-internals.h, reflection.c: removed the per-method
14633 generics hashtable: we use the global one through the call of
14634 mono_class_inflate_generic_method ().
14636 Mon Jul 23 19:43:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
14638 * class.c, metadata.c, class-internals.h: introduce yet another
14639 generics global cache for inflated methods (fixes 98% of the perf
14640 issue in bug #81806).
14642 2007-07-23 Raja R Harinath <rharinath@novell.com>
14644 Fix #81035 -- avoid allocating MonoGenericInsts willy-nilly
14645 * metadata.c (mono_metadata_lookup_generic_inst): Kill.
14646 (mono_metadata_get_generic_inst): New. Given a list of MonoType*,
14647 return a MonoGenericInst containing (a copy) of those types.
14648 (mono_metadata_inflate_generic_inst): Update to changes.
14649 (mono_metadata_parse_generic_inst): Likewise.
14650 (mono_get_shared_generic_inst): Likewise.
14651 * reflection.c (mono_class_bind_generic_parameters): Likewise.
14652 (mono_reflection_bind_generic_method_parameters): Likewise.
14653 * metadata-internals.h: Likewise.
14654 * icall.c (free_generic_context): Kill.
14655 (init_generic_context_from_args): Use mono_metadata_get_generic_inst.
14657 * reflection.c (reflection_methodbuilder_to_mono_method): Use
14658 mono_metadata_type_dup.
14659 * marshal.c (mono_mb_create_method): Likewise.
14661 * metadata.c (mono_metadata_type_dup): Rename from
14662 mono_metadata_type_dup_mp. Take an optional mempool instead of a
14663 MonoImage. Handle a few more cases, esp. when no mempool is given.
14664 * marshal.c, metadata-internals.h: Update to changes.
14666 Mon Jul 23 11:43:31 CEST 2007 Paolo Molaro <lupus@ximian.com>
14668 * class.c: fixed a small leak for array classes and removed warning.
14670 2007-07-22 Zoltan Varga <vargaz@gmail.com>
14672 * loader.c (mono_method_get_param_token): Make this work on generic methods.
14673 Return 0x8000000 for return parameters. Fixes #82161.
14675 2007-07-21 Marek Habersack <grendello@gmail.com>
14677 * appdomain.c (get_shadow_assembly_location): append the current
14678 ticks value to the path. Avoids overwriting the same assemblies by
14679 several threads at the same time.
14681 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
14682 and Raja R Harinath <rharinath@novell.com>
14684 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
14686 (ves_icall_MonoMethod_GetGenericMethodDefinition): Update
14687 property for testing if a method is a generic method definition.
14689 2007-07-20 Atsushi Enomoto <atsushi@ximian.com>
14691 * domain-internals.h : added 2.0 member fields to MonoAppDomainSetup.
14693 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14695 * verify.c: used function from private branch, reverted to the one in class.h
14697 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14699 * verify.c: a typo slipped in and the code wont compile
14701 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14703 * verify.c: now all code use IS_MANAGED_POINTER and UNMASK_TYPE macros.
14704 disabled box instruction as it is doing the wrong thing
14705 improved stack dump messages, now it is easier to debug type related issues
14708 2007-07-19 Juraj Skripsky <js@hotfeet.ch>
14710 * icall.c (ves_icall_System_MonoType_getFullName): Fix a leak.
14712 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14714 * verify.c: changed MONO_TYPE_TYPEDBYREF stack type from
14715 TYPE_COMPLEX to TYPE_PTR, it did not make any sense to be
14716 grouped with class and valuetype. This change will simply
14717 the code as it should be handled just like unmanaged pointers.
14719 2007-07-19 Mark Probst <mark.probst@gmail.com>
14721 * class.c (concat_two_strings_with_zero): Fixed a silly bug.
14723 2007-07-19 Rodrigo Kumpera <rkumpera@novell.com>
14725 * verify.c: several stack merge issues fixed, reference comparisons now
14726 check the type size. strict type check now works correctly.
14727 added more uses of IS_MANAGED_POINTER macro.
14728 fixed issues pointed by running the test suite against .net.
14731 2007-07-19 Mark Probst <mark.probst@gmail.com>
14733 * class.c, loader.c, class-internals.h: Removed the
14734 MonoLoaderErrorKind enum and replaced it with the MONO_EXCEPTION_
14737 * icall.c: Better error checking in some internal reflection
14740 2007-07-18 William Holmes <billholmes54@gmail.com>
14742 * filewatcher.c : removed unused variable 'filename' in
14743 ves_icall_System_IO_FSW_SupportsFSW
14745 Mon Jul 16 19:36:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
14747 * reflection.c, class.c, icall.c, loader.c: mono_get_inflated_method () is
14750 2007-07-15 Zoltan Varga <vargaz@gmail.com>
14752 * icall.c (ves_icall_System_Reflection_FieldInfo_GetTypeModifiers): New icall.
14754 * icall.c (ves_icall_System_Reflection_Module_ResolveSignature): New icall.
14756 2007-07-14 Zoltan Varga <vargaz@gmail.com>
14758 * icall.c (ves_icall_System_Reflection_Module_ResolveMethodToken):
14759 Implement generics support.
14760 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
14762 * icall.c (ves_icall_System_Reflection_Module_ResolveTypeToken): Add new
14763 type_args and method_args arguments.
14764 (ves_icall_System_Reflection_Module_ResolveMethodToken): Ditto.
14765 (ves_icall_System_Reflection_Module_ResolveFieldToken): Ditto.
14766 (ves_icall_System_Reflection_Module_ResolveMemberToken): Ditto.
14768 2007-07-13 Rodrigo Kumpera <rkumpera@novell.com>
14770 * reflection.c: patch from Thong Nguyen to fix atribute resolution.
14771 It adds a rootimage parameter to mono_reflection_get_type_internal,
14772 adds new function mono_reflection_get_type_with_rootimage and use
14773 the rootimage to resolve the types instead of the current image
14775 2007-07-13 Rolf Bjarne Kvinge <RKvinge@novell.com>
14777 * culture-info-table.h: Forgot to update after r78304.
14779 2007-07-13 Raja R Harinath <rharinath@novell.com>
14781 * class.c (mono_class_is_open_constructed_type)
14782 <MONO_TYPE_GENERICINST>: Don't recompute a computed field.
14784 2007-07-12 Rodrigo Kumpera <rkumpera@novell.com>
14786 * class.c (mono_bounded_array_class_get): method fails if used with
14787 an incomplete TypeBuilder enum (no basetype field), fixed it by
14788 avoiding calculating the size for such array as it cannot be instantiated.
14791 2007-07-12 Raja R Harinath <rharinath@novell.com>
14793 * class-internals.h (_MonoGenericInst::is_reference): Remove bogus
14795 * metadata.c, reflection.c: Update to changes.
14797 2007-07-11 Rodrigo Kumpera <rkumpera@novell.com>
14799 * class.c, class-internal.h: added mono_type_is_valid_enum_basetype and
14800 mono_class_is_valid_enum, they are used to valide a enum when loading.
14801 * reflection.c: used new functions to throw TypeLoadException when and
14802 invalid enum is build with TypeBuilder. Fixes #82018
14804 Wed Jul 11 14:47:07 CEST 2007 Paolo Molaro <lupus@ximian.com>
14806 * object.c: forgot commit of mono_class_setup_methods () to access
14808 * object-internals.h: added a few more handy fields to
14811 2007-07-11 Zoltan Varga <vargaz@gmail.com>
14813 * object.c (build_imt): Call mono_class_setup_methods () before accessing
14816 Tue Jul 10 16:49:01 CEST 2007 Paolo Molaro <lupus@ximian.com>
14818 * class-internals.h, object-internals.h, object.c: IMT-based
14819 interface invocation core from Massimiliano Mantione
14820 (massi@ximian.com) with a reworked arch-specific interface,
14821 bsearch implementation and a few bugfixes and memory savings by me.
14823 2007-07-10 Rodrigo Kumpera <rkumpera@novell.com>
14825 * class.c (mono_class_create_from_typedef): mono would segfault if
14826 an enum did not have a __value field. It now throws a TypeLoadException
14827 for such cases. Fix bug #82022
14829 2007-07-10 Zoltan Varga <vargaz@gmail.com>
14831 * marshal.c (mono_marshal_string_to_utf16_copy): Fix allocation size.
14833 2007-07-09 Mark Probst <mark.probst@gmail.com>
14835 * class.c (mono_class_init): If a class is already inited but has
14836 an exception_type set, return FALSE, not TRUE. Fixes: 82050.
14838 2007-07-09 Mark Probst <mark.probst@gmail.com>
14840 * class.c: Properly handle the case of an unimplemented interface
14841 method. Fixes: 81673.
14843 Mon Jul 9 16:21:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
14845 * class-internals.h, object.c: cleanup patch from massi: use
14846 MonoVTable->interface_bitmap since the vtable interfaces offset array
14849 2007-07-10 Zoltan Varga <vargaz@gmail.com>
14851 * icall-def.h icall.c: Remove Module:get_MDStreamVersion icall and add a new
14852 GetMDStreamVersion icall instead.
14854 Mon Jul 9 11:34:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
14856 * filewatcher.c: patch from Thong Nguyen <tum@veridicus.com> to
14857 not use mono_dl_build_path() with a full library name: makes
14858 fallbacks to libgaim and libfam work.
14860 2007-07-06 William Holmes <billholmes54@gmail.com>
14862 * assembly.c: Added a continue statement in probe_for_partial_name when
14863 parse_assembly_directory_name fails. Fixes : 82002
14865 2007-07-06 Rodrigo Kumpera <rkumpera@novell.com>
14867 * verify.c (check_unmanaged_pointer_type): renamed to check_unverifiable_type
14868 and added a verification for TYPEDBYREF.
14869 * verify.c (verify_stack_type_compatibility): fix handling of byref types,
14870 make native int interchangeable with int32 and some small cleanup and formating.
14871 * verify.c (push_arg): only ldarg on invalid argument is valid (but not verifiable) and
14872 handle byref of byref.
14873 * verify.c (push_local): handle byref of byref.
14874 * verify.c (do_binop): invalid mix of values is unverifiable
14875 * verify.c (do_invoke_method): fixed the handling of bad params on stack and
14876 added visibility checks
14877 * verify.c (field related method): added visibility checks
14878 * verify.c (do_push_field): cannot take the address of a temporary valuetype field
14880 2007-07-06 Zoltan Varga <vargaz@gmail.com>
14882 * marshal.c (mono_marshal_string_to_utf16_copy): Null terminate the
14885 2007-07-05 Zoltan Varga <vargaz@gmail.com>
14887 * profiler.c (mono_profiler_load): Fix an off-by-one error.
14889 * marshal.c (emit_marshal_string): When returning a string from managed code,
14890 allways make a copy even for unicode strings. Fixes #81990.
14892 Wed Jul 4 11:53:57 CEST 2007 Paolo Molaro <lupus@ximian.com>
14894 * object.c: cleaned up mono_runtime_invoke_array () and fixed handling
14895 of byref generic inst types (bug #81997).
14897 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
14899 * class.c: moved methods mono_method_can_access_field and mono_method_can_access_method from mini/mini.c
14900 * class.h: added declarations of mono_method_can_access_field() and mono_method_can_access_method()
14902 2007-07-02 Zoltan Varga <vargaz@gmail.com>
14904 * marshal.c (emit_marshal_string): Add support for unicode strings in
14905 MARSHAL_ACTION_MANAGED_CONV_RESULT. Fixes #81990.
14907 2007-07-02 Rodrigo Kumpera <rkumpera@novell.com>
14909 * verify.c: field load/store are now verified, missing only access checks now
14911 2007-06-28 Martin Baulig <martin@ximian.com>
14913 * mono-debug.c (mono_debug_debugger_version): New public variable.
14915 2007-06-24 Gert Driesen <drieseng@users.sourceforge.net>
14917 * locales.c: When constructing DateTimeFormat or NumberFormat for
14918 MonoCultureInfo, inherit readonly bit from MonoCultureInfo. The
14919 MonoCultureInfo contructed from the current locale is always
14920 read-only and has UseUserOverride set to true. All MonoCultureInfo
14921 instances returned for GetCultures have both IsReadOnly and
14922 UseUserOverride set to true. Fixes part of bug #81930.
14924 2007-06-22 Jonathan Chambers <joncham@gmail.com>
14926 * icall-def.h: Update System.__ComObject icalls
14927 * marshal.c: Avoid managed transition (and object creation)
14928 when looking up COM interface in RCW.
14929 * marshal.h: Ditto.
14931 Code is contributed under MIT/X11 license.
14933 2007-06-22 Zoltan Varga <vargaz@gmail.com>
14935 * marshal.c (mono_marshal_get_runtime_invoke): Cache in the method image for now
14936 to avoid crashes during assembly unloading.
14938 2007-06-22 Raja R Harinath <rharinath@novell.com>
14940 Fix MethodInfo.IsGenericMethodDefinition
14941 * reflection.c (mono_reflection_bind_generic_method_parameters):
14942 Rearrange code to ensure we always uses a generic method definition.
14943 * class.c (mono_class_inflate_generic_method_full): Set
14944 'generic_container' field only for generic method definitions.
14945 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition):
14946 Use presense of 'generic_container' field as indication of being a
14947 generic method definition.
14949 2007-06-21 Zoltan Varga <vargaz@gmail.com>
14951 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
14953 * object-internals.h: Reflect changes in the layout of the managed Delegate
14956 * object-internals.h reflection.c icall-def.h: Applied patch from Robert
14957 Jordan (robertj@gmx.net). Add a dtor to dynamic methods which frees up the
14958 runtime memory used by the dynamic method. Fixes #77146.
14960 2007-06-21 Dick Porter <dick@ximian.com>
14963 * file-io.c (convert_share): Cope with FileShare.Delete. Patch
14964 from Wojtek Krawczyk <krawczyk.wojciech@gazeta.pl>, fixes bug
14967 2007-06-21 Raja R Harinath <rharinath@novell.com>
14969 * reflection.c (method_encode_methodspec): Add a tripwire.
14970 * class.c (inflate_generic_type): The fully open generic type is
14971 not the same as the generic type definition.
14973 2007-06-21 Martin Baulig <martin@ximian.com>
14975 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 59.
14977 * mono-debug-debugger.h
14978 (MonoDebuggerBreakpointInfo): Removed.
14979 (mono_debugger_insert_breakpoint_full): Moved to ../mini/debug-mini.h.
14980 (mono_debugger_remove_breakpoint): Likewise.
14981 (mono_debugger_breakpoint_callback): Likewise.
14982 (mono_debugger_start_add_type): Renamed into mono_debugger_add_type().
14984 2007-06-21 Raja R Harinath <rharinath@novell.com>
14986 * metadata.c (mono_metadata_lookup_generic_class): The fully open
14987 generic type is not the same as the generic type definition.
14988 * class.c (mono_generic_class_get_class): Likewise.
14990 2007-06-20 Geoff Norton <gnorton@customerdna.com>
14992 * icall.c: The second argument to
14993 System.Reflection.MethodBase.GetMethodFromHandleInternalType
14994 is a MonoType not a MonoClass.
14996 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
14998 * verify.c: support for function pointers in the verifier
15000 2007-06-20 Rodrigo Kumpera <kumpera@gmail.com>
15002 * verify.c: unmanaged pointer verification checks (loading unmanaged pointers is unverifiable)
15004 Wed Jun 20 10:22:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
15006 * assembly.c: removed Mono.Data.SqliteClient from the list of
15007 forward-compatible assemblies as it breaks the ABI (bug #81899).
15009 2007-06-19 Raja R Harinath <rharinath@novell.com>
15011 * metadata.c (mono_metadata_lookup_generic_class): Protect cache
15012 lookup/update with the loader lock.
15013 * reflection.c (mono_class_bind_generic_parameters): No need to
15014 protect mono_metadata_lookup_* with the loader lock.
15015 * class.c (inflate_generic_type): Likewise.
15017 * metadata.c (ginst_in_image): Avoid mono_class_from_mono_type
15018 on a generic instantiated type.
15020 2007-06-18 Rodrigo Kumpera <kumpera@gmail.com>
15022 *verify.c: produce meanfull error messages on verification error
15023 *verify.c: fixed some cases of verification errors reported as validation errors
15024 *pedump.c: fixed the error name array, now it shows validation errors properly
15025 *verify.h: fixed the contant that should be used for verification errors
15027 Mon Jun 18 17:07:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
15029 * metadata.c, image.c, metadata-internals.h: part of the fixes needed
15030 for bug #77596, 81858 and 80743 (generics data structures on domain
15033 2007-06-15 Raja R Harinath <rharinath@novell.com>
15035 Avoid allocating 'MonoGenericContext' on the heap.
15036 * class-internals (_MonoMethodInflated::context): Make field
15037 inline, not a pointer.
15038 * loader.c (method_from_methodspec): Allocate 'new_context' on the
15039 stack. Use the context embedded within the inflated method as the
15040 hash key, rather than 'new_context'.
15041 * class.c (inflate_generic_context): Simplify. Return a struct
15042 rather than allocating on the heap.
15043 (mono_class_inflate_generic_method_full): Update to changes. Now,
15044 doesn't salt away a copy of the context -- simplifying the
15045 lifetime rules of a 'MonoGenericContext *'.
15046 (mono_method_get_context): Return pointer to embedded context.
15047 (setup_generic_array_ifaces): Allocate temporary context on stack.
15048 * reflection.c (inflate_mono_method): Likewise.
15049 (mono_reflection_bind_generic_method_parameters): Likewise.
15050 Use the context embedded within the inflated method as the hash key.
15052 Avoid a source of allocation of 'MonoGenericContext'.
15053 * class-internals.h (_MonoGenericClass::context): Combine 'inst'
15054 and 'cached_context' fields into embedded 'MonoGenericContext' field.
15055 * class.c: Update to changes.
15056 (mono_generic_class_get_context): Simplify drastically. Now just
15057 returns a pointer to the field.
15058 * metadata-internals.h (mono_metadata_generic_context_hash): Mark
15059 argument as a const pointer.
15060 (mono_metadata_generic_context_equal): Likewise.
15061 * metadata.c, loader.c, icall.c, reflection.c, verify.c:
15064 2007-06-14 Rodrigo Kumpera <kumpera@gmail.com>
15066 * verify.c improved the handling of brtrue/brfalse, factored out common code
15068 2007-06-14 Raja R Harinath <rharinath@novell.com>
15070 Kill MonoGenericMethod.
15071 * class-internals.h (MonoGenericContext::method_inst): Rename from
15072 'gmethod' and convert to a MonoGenericInst.
15073 (MonoGenericMethod): Remove.
15074 * metadata.h (MonoGenericMethod): Note that the name is obsolete.
15075 * loader.c (method_from_methodspec): Update to changes. Use a
15076 MonoGenericContext as the key to the hashtable.
15077 * metadata.c (mono_metadata_generic_context_equal): Rename from
15078 'mono_metadata_generic_method_equal' and take MonoGenericContext.
15079 (mono_metadata_generic_context_hash): Likewise from
15080 'mono_metadata_generic_method_hash'. Change hash function.
15081 (mono_metadata_load_generic_params): Update to changes.
15082 (mono_get_shared_generic_method): Remove.
15083 * metadata-internals.h (mono_get_shared_generic_method): Remove.
15084 * class.c (inflate_generic_type) [MONO_TYPE_MVAR]: Update to changes.
15085 (inflate_generic_context): Likewise.
15086 (mono_class_inflate_generic_method_full): Likewise.
15087 (setup_generic_array_ifaces): Likewise.
15088 (mono_class_create_from_typespec): Likewise.
15089 * reflection.c (encode_generic_method_sig): Take a MonoGenericContext.
15090 (method_encode_methodspec): Update callsite.
15091 (reflection_methodbuilder_to_mono_method): Update to changes.
15092 (mono_reflection_bind_generic_method_parameters): Likewise. Use a
15093 MonoGenericContext as the key to the hashtable.
15094 (inflate_mono_method): Update to changes.
15096 * class-internals.h (MonoGenericMethod::container): Remove.
15097 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
15099 Thu Jun 14 12:40:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
15101 * profiler-private.h, profiler.c, profiler.h: added API to profile
15104 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
15106 * verify.c: Fixed pointer type handling, some code and message formating and two invalid assigments
15108 2007-06-13 Rodrigo Kumpera <kumpera@gmail.com>
15110 * verify.c: method invocation is now validated, now we verify parameter types on stack.
15111 Fixed overflow and underflow not aborting the verification process.
15113 2007-06-13 Mark Probst <mark.probst@gmail.com>
15115 * class-internals.h (MonoStats): Added stats entries for dynamic
15118 2007-06-12 Zoltan Varga <vargaz@gmail.com>
15120 * loader.c (mono_free_method): Free header->locals and header->clauses.
15122 * marshal.c (mono_mb_create_method): Make a copy of the locals as well in the
15125 * threads.c (mono_thread_get_stack_bounds): Fix memory leak.
15127 * class.c (setup_interface_offsets): Allocate memory from the image mempool.
15129 2007-06-12 Raja R Harinath <rharinath@novell.com>
15131 * verify.c (TYPE_MAX): Set it to 8 to match the dimensions of all
15134 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
15136 *pedump.c (main): return error code 4 if assembly cannot be loaded instead of segfaulting
15138 2007-06-11 Raja R Harinath <harinath@gmail.com>
15140 MonoGenericMethod on a diet
15141 * class-internals.h (_MonoMethodInflated::reflection_info): Move
15143 (_MonoGenericMethod::reflection_info): ... from here.
15144 * icall.c (ves_icall_MonoMethod_GetGenericMethodDefinition):
15146 * reflection.c (inflate_mono_method): Likewise.
15147 (mono_reflection_bind_generic_method_parameters): Likewise.
15149 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
15151 *verify.c: all debu printf statements are now guarded by VERIFY_DEBUG
15152 *verify.c: factored long ldarg forms to share code with short forms
15154 2007-06-11 Rodrigo Kumpera <kumpera@gmail.com>
15156 *verify.c: fixed code formating factored some duplicate code
15157 into a new function
15159 *verify.h: fixed binary incompatibility introduced earlier
15161 *pedump.c: fixed formating
15163 2007-06-11 Raja R Harinath <harinath@gmail.com>
15165 Fix assertion when disassembling Mono.C5.dll
15166 * loader.c (method_from_methodspec): Avoid inflating a method
15167 twice with the same context. If the methodref is inflated, use
15168 the declaring method instead.
15170 * class.c (mono_class_from_generic_parameter): Fix case similar to
15171 bug #81830 handled below, but for method containers.
15173 2007-06-10 Raja R Harinath <harinath@gmail.com>
15175 * class.c (inflate_generic_type) [MONO_TYPE_CLASS]: Don't call
15176 get_shared_generic_class. Directly inflate the instance.
15177 [MONO_TYPE_GENERICINST]: Inline inflate_generic_class.
15178 (inflate_generic_class): Delete.
15179 (get_shared_generic_class): Delete. Move setting of
15180 'cached_class' and 'cached_context' ...
15181 * metadata.c (mono_metadata_lookup_generic_class): ... here.
15183 * metadata.c (mono_metadata_lookup_generic_class): Change
15184 signature to take the components of a MonoGenericClass rather than
15185 an allocated MonoGenericClass. Change semantics to be intern-like.
15186 * reflection.c (mono_class_bind_generic_parameters): Update to
15187 changes. Make locking region tighter.
15188 * class.c (inflate_generic_class): Update to changes.
15189 (get_shared_generic_class): Likewise.
15190 * metadata-internals.h: Likewise.
15192 * reflection.c (mono_class_bind_generic_parameters): Take and
15193 return a MonoClass*, not a MonoType*. Add 'is_dynamic' parameter.
15194 (mono_reflection_bind_generic_parameters): Use
15195 'mono_class_bind_generic_parameters' rather than duplicate the code.
15196 * class.c (mono_bounded_array_class_get): Update to changes.
15197 * object-internals.h: Likewise.
15199 * reflection.c (mono_class_bind_generic_parameters): Only support
15200 parameterizing generic type definitions. Remove support for other
15203 2007-06-08 Zoltan Varga <vargaz@gmail.com>
15205 * loader.c (mono_free_method): Free method->signature as well. Fixes #81832.
15207 * marshal.c (mono_marshal_get_managed_wrapper): Allocate the signature using malloc
15208 in the dynamic case.
15210 2007-06-08 Gert Driesen <drieseng@users.sourceforge.net>
15212 * threads.c: When cleaning up thread, reset the Background bit.
15215 2007-06-08 Jonathan Chambers <joncham@gmail.com>
15217 * metadata.c: Move variable declarations to top of scope.
15218 * verify.c: Move variable declarations to top of scope.
15220 Code is contributed under MIT/X11 license.
15222 2007-06-08 Raja R Harinath <rharinath@novell.com>
15224 * reflection.c (mono_class_bind_generic_parameters): Replace
15225 open-coded loop with mono_metadata_inflate_generic_inst.
15227 * class.c (get_shared_generic_class): Don't call
15228 mono_get_shared_generic_inst. Use the container's own
15231 * metadata.c (mono_metadata_load_generic_params): Move
15232 initialization of 'context' field here from ...
15233 * class.c (mono_class_create_from_typedef): ... here, and ...
15234 * loader.c (mono_get_method_from_token): ... here.
15236 * class.c (get_shared_generic_class): Rename from
15237 mono_get_shared_generic_class and make static.
15238 (mono_get_shared_generic_inst): Move to metadata.c.
15239 * loader.c (mono_get_shared_generic_method): Likewise.
15240 * class-internals.h, metadata-internals.h: Update to changes.
15243 * class.c (mono_class_from_generic_parameter): Don't assume a
15244 generic container owner exists. Generic containers from monodis
15247 2007-06-06 Rodrigo Kumpera <kumpera@gmail.com>
15249 * pedump.c: pedump exists with 2 if assembly is not verifiable and 3 if invalid
15250 * verify.h: new typedefs to returns the non-verifiable status
15251 * verify.c: initial implementation of generics, stack merging and object compatibility check
15253 2007-06-06 Mark Probst <mark.probst@gmail.com>
15255 * class.c, image.c, class-internals.h (MonoImage): class_cache is
15256 a MonoInternalHashTable again (fixed bug in internal hash table
15259 2007-06-06 Mark Probst <mark.probst@gmail.com>
15261 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
15262 MonoInternalHashTable again (fixed bug in internal hash table
15265 2007-06-06 Mark Probst <mark.probst@gmail.com>
15267 * class.c, image.c, class-internals.h, domain.c,
15268 domain-internals.h (MonoImage): Reverting MonoInternalHashTable
15269 changes. Have to figure out what makes them break the SWF
15272 2007-06-04 Mark Probst <mark.probst@gmail.com>
15274 * class.c, image.c, class-internals.h (MonoImage): class_cache is
15275 a MonoInternalHashTable now.
15277 2007-06-04 Mark Probst <mark.probst@gmail.com>
15279 * domain.c, domain-internals.h (MonoDomain): jit_code_hash is a
15280 MonoInternalHashTable now.
15282 2007-05-31 Zoltan Varga <vargaz@gmail.com>
15284 * domain-internals.h (MonoDomain): Add two new hash tables to store delegate
15287 * object-internals.h (_MonoDelegate): Reflect changes to managed object layout.
15289 * object.c (mono_delegate_ctor): Initialize invoke_impl field with an arch
15290 dependent trampoline.
15292 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
15294 * icall.c (ves_icall_System_Delegate_SetMulticastInvoke): New icall.
15296 2007-05-29 Robert Jordan <robertj@gmx.net>
15298 * marshal.[c|h]: add mono_win32_compat_* wrappers. Fixes #81754.
15300 2007-05-28 Zoltan Varga <vargaz@gmail.com>
15302 * icall.c (ves_icall_get_method_info): Handle loader errors. Fixes #81724.
15304 2007-05-25 Jonathan Chambers <joncham@gmail.com>
15306 * marshal.c: Fix interface lookup loops for
15307 cominterop_get_com_slot_for_method and
15308 cominterop_get_method_interface. Only need to lookup
15309 if type is a class, else use interface type method is on.
15311 Code is contributed under MIT/X11 license.
15313 2007-05-25 Sebastien Pouliot <sebastien@ximian.com>
15315 * reflection.c: HasSecurity can be present even if no specially
15316 encoded (CAS) attributes are available (e.g. SuppressUnmanagedCode
15317 SecurityAttribute). Fix CAS regression tests on buildbot.
15319 2007-05-24 Jonathan Chambers <joncham@gmail.com>
15321 * appdomain.c: Add configure checks for header files.
15322 * image.c: Add configure checks for header files.
15323 * file-io.c: Add configure checks for header files.
15324 * debug-mono-symfile.c: Add configure checks for header files.
15325 * threadpool.c: Add configure checks for header files.
15326 * console-io.c: Add configure checks for header files.
15327 * profiler.c: Add configure checks for header files.
15328 * rawbuffer.c: Add configure checks for header files.
15329 * icall.c: Add configure checks for header files.
15330 * rand.c: Add configure checks for header files.
15331 * socket-io.c: Add configure checks for header files.
15333 Code is contributed under MIT/X11 license.
15335 2007-05-24 Zoltan Varga <vargaz@gmail.com>
15337 * reflection.c (mono_custom_attrs_from_builders): Remove the
15338 assertion as it breaks the build.
15340 * reflection.c (mono_custom_attrs_from_builders): Add an assertion.
15342 * reflection.c (lookup_custom_attr): Make a copy here too.
15344 * image.c (mono_image_check_for_module_cctor): Avoid accessing metadata in
15347 * class.c (mono_class_init): Avoid accessing the metadata in dynamic
15350 * reflection.c (mono_custom_attrs_from_param): Make a copy of the dynamic attr
15353 2007-05-22 Zoltan Varga <vargaz@gmail.com>
15355 * reflection.c (encode_cattr_value): Fix yet another object cattr encoding issue.
15356 (load_cattr_value): Ditto.
15358 2007-05-20 Zoltan Varga <vargaz@gmail.com>
15360 * marshal.c (mono_marshal_get_delegate_invoke): Improve the generated IL a little.
15362 2007-05-19 Gert Driesen <drieseng@users.sourceforge.net>
15364 * threads.c: In "start_wrapper", set apartment_state to MTA if
15365 apartment_state is Unknown and we're running on 2.0 profile or
15367 * object.c: In "mono_runtime_exec_main", if STAThread is not applied
15368 to main method, then set apartment_state to Unknown on 1.0 profile,
15369 and MTA on 2.0 profile.
15371 2007-05-16 Jb Evain <jb@nurv.fr>
15373 * class-internals.h (MonoDefaults): Add an attribute_class and
15374 customattribute_data_class.
15375 * domain.c (mono_init_internal): Populate them.
15376 * reflection.c: Use them to remove duplicates. Make a vew
15377 MonoClass variables `static'.
15379 2007-05-15 Massimiliano Mantione <massi@ximian.com>
15381 * class-internals.h: Added "MonoVTable.interface_bitmap" as a next
15382 step in implementing IMT, so that all isinst checks now can go
15383 through the bitmap.
15384 This was needed because vtables for TransparentProxy need to look
15385 like the vtable of the "target" class, so they need to point to
15386 its interface bitmap directly.
15388 * object.c: inside "mono_class_create_runtime_vtable" and
15389 "mono_class_proxy_vtable", initialize "MonoVTable.interface_bitmap".
15391 2007-05-15 Atsushi Enomoto <atsushi@ximian.com>
15393 * object-internals.h
15394 culture-info.h : added territory field in MonoCulture and
15395 CultureInfoEntry foreach. Added lcid field in RegionInfoEntry.
15396 * locales.c : fill territory field above too.
15397 * culture-info-table.h : regenerated.
15399 2007-05-12 Zoltan Varga <vargaz@gmail.com>
15401 * class-internals.h (_MonoGenericContainer): Widen type_argc filed to 31 bits.
15404 2007-05-11 Jonathan Chambers <joncham@gmail.com>
15406 * object.c: Always initialize apartment, even if
15407 there is no custom attributes on entry point.
15409 Code is contributed under MIT/X11 license.
15411 2007-05-10 Jonathan Chambers <joncham@gmail.com>
15413 * marshal.c: LPTSTR == LPWSTR on Win32. Fixes #81370.
15414 * metadata.c: If no encoding is set, check for unicode
15417 Code is contributed under MIT/X11 license.
15419 2007-05-09 Jonathan Chambers <joncham@gmail.com>
15421 * threads.c: Handle if mono_thread_current returns NULL
15423 Code is contributed under MIT/X11 license.
15425 2007-05-09 Jonathan Chambers <joncham@gmail.com>
15427 * threads.c: Initialize Thread.AprtmentState and set on Thread.Start
15428 in start_wrapper. Added mono_thread_init_apartment_state and
15429 mono_thread_cleanup_apartment_state.
15430 * object.c: Initialize thread apartment state on main thread
15431 by checking for STAThreadAttribute on entry point.
15432 * object-internals.h: Add apartment_state field to MonoThread.
15433 * threads-types.h: Add unmanaged definition of
15434 System.Threading.ApartmentState, MonoThreadApartmentState.
15436 Code is contributed under MIT/X11 license.
15438 2007-05-08 Jonathan Chambers <joncham@gmail.com>
15440 * class.c: Fix windows build.
15441 * class-internals.h: Fix windows build.
15443 Code is contributed under MIT/X11 license.
15445 2007-05-08 Robert Jordan <robertj@gmx.net>
15447 * process.c (CreateProcess_internal):
15448 Pass CREATE_NO_WINDOW to CreateProcess when ProcessStartupInfo
15449 .CreateNoWindow was specified. Fixes #81496.
15451 2007-05-08 Massimiliano Mantione <massi@ximian.com>
15453 * class-internals.h: Removed "MonoClass.interface_offsets" as a first
15454 step in implementing IMT, replaced it with two compact arrays
15455 (interfaces_packed and interface_offsets_packed) and a bitmap that
15456 is used for isinst checks (interface_bitmap).
15458 * class.c: (compare_interface_ids): compare function to pass to
15459 bsearch when looking for an interface with a given id.
15460 (mono_class_interface_offset): reimplemented using bsearch on
15461 interfaces_packed, getting the offset from interface_offsets_packed.
15462 (print_implemented_interfaces): utility debugging function.
15463 (setup_interface_offsets): reworked to initialize interfaces_packed,
15464 interface_offsets_packed and interface_bitmap.
15466 * object.c: replaced all accesses to "MonoClass.interface_offsets"
15467 with uses of interfaces_packed and interface_offsets_packed.
15469 2007-05-08 Massimiliano Mantione <massi@ximian.com>
15471 * class-internals.h: Added MONO_CLASS_IMPLEMENTS_INTERFACE macro and
15472 mono_class_interface_offset prototype to wrap all accesses to
15473 "MonoClass.interface_offsets".
15475 * class.c: Implemented mono_class_interface_offset, and wrapped all
15476 accesses to "MonoClass.interface_offsets".
15478 * monodiet.c, object.c, marshal.c, icall.c: wrapped all accesses to
15479 "MonoClass.interface_offsets".
15481 Tue May 8 13:02:09 CEST 2007 Paolo Molaro <lupus@ximian.com>
15483 * icall.c, icall-def.h: implemented new GetFieldFromHandle and
15484 GetMethodFromHandle overloads (bug #78637).
15486 Tue May 8 12:22:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
15488 * assembly.c: parse ProcessorArchitecture in assembly name and ignore
15489 it for now (see mono-devel, from Marek Sieradzki <marek.sieradzki@gmail.com>).
15491 2007-05-01 Zoltan Varga <vargaz@gmail.com>
15493 * icall.c (custom_attrs_get_by_type): Handle loading errors gracefully. Fixes
15496 * reflection.c (mono_reflection_get_custom_attrs_by_type): Handle loading errors
15498 (mono_custom_attrs_from_index): Ditto.
15500 * icall.c (ves_icall_InternalInvoke): Allow calling ctors of abstract classes.
15503 2007-04-30 Zoltan Varga <vargaz@gmail.com>
15505 * metadata.c (mono_metadata_parse_type_full): Avoid an invalid free since the type
15506 is now allocated from a mempool.
15508 2007-04-28 Zoltan Varga <vargaz@gmail.com>
15510 * threads.c (build_wait_tids): Do not call mono_monitor_enter () here since the
15511 caller holds threads_lock, leading to deadlocks. Fixes #81476.
15513 2007-04-26 Zoltan Varga <vargaz@gmail.com>
15515 * loader.c (mono_loader_error_prepare_exception): Fix crash caused by calling
15516 mono_loader_clear_error () too late. Fixes #81463.
15518 2007-04-26 Atsushi Enomoto <atsushi@ximian.com>
15520 * culture-info-table.h : regenerated.
15522 2007-04-25 Zoltan Varga <vargaz@gmail.com>
15524 * appdomain.c (add_assemblies_to_domain): Fix crash when an assembly reference
15527 2007-04-25 Dick Porter <dick@ximian.com>
15529 * Makefile.am: Put the mingw enforced-optimisation back into the
15530 PLATFORM_WIN32 section.
15532 2007-04-24 Zoltan Varga <vargaz@gmail.com>
15534 * reflection.c (mono_image_load_module_dynamic): Fix crash introduced by previous
15537 * image.c (mono_image_load_module): New API function to load a module reference.
15539 * image.c (load_modules): Load modules lazily. Fixes #80812.
15541 * class.c (mono_class_from_typeref): Use mono_image_load_module.
15543 * reflection.c (mono_image_load_module_dynamic): Copy image->modules_loaded too.
15545 * object-internals.h reflection.c icall-def.h (mono_image_load_module): Rename this
15546 to mono_image_load_module_dynamic.
15548 2007-04-23 Jonathan Chambers <joncham@gmail.com>
15550 * marshal.c: Fix calling convention for CCW on non-windows
15551 platforms. STDCALL on windows, CDECL everywhere else to work
15552 with XPCOM and MainWin COM.
15554 Code is contributed under MIT/X11 license.
15556 2007-04-23 Martin Baulig <martin@ximian.com>
15561 (method_from_memberref): Added `gboolean *used_context' argument.
15562 (mono_get_method_from_token): Likewise.
15563 (mono_get_method_full): Don't insert the method in the cache when
15564 `used_context' is true.
15566 2007-04-23 Raja R Harinath <rharinath@novell.com>
15568 * monodiet.c (add_types_from_method): Fix "wrong type" warning.
15570 * reflection.c (mono_reflection_bind_generic_parameters): Don't
15571 create new MonoTypes for returned types.
15572 * class.c (mono_generic_class_get_class): Export mono-internal.
15573 * class-internals.h: Update to changes.
15575 Thu Apr 19 16:45:55 CEST 2007 Paolo Molaro <lupus@ximian.com>
15577 * threadpool.c, threadpool.h, icall-def.h: patch from
15578 Robert Jordan to implemnt ThreadPool.SetMaxThreads.
15580 2007-04-18 Zoltan Varga <vargaz@gmail.com>
15582 * threads.c (mono_thread_get_stack_bounds): Fix windows build.
15584 * threads.c (mono_thread_get_stack_bounds): Remove an assert which can be triggered.
15586 * threads.c (mono_thread_get_stack_bounds): New helper function.
15588 * threads.c (mono_thread_attach): Applied patch from horst.reiterer@fabasoft.com.
15589 Correctly compute stack bounds when attaching. Fixes #81394.
15591 Wed Apr 18 18:28:41 BST 2007 Paolo Molaro <lupus@ximian.com>
15593 * reflection.c: fix handling of doubles in custom attributes
15594 for the arm-fpa format (bug #81368).
15596 2007-04-18 Raja R Harinath <rharinath@novell.com>
15598 * reflection.c (assembly_add_win32_resources): Mildly relax an
15599 bounds check to let the end pointer point just past the end of the
15600 allocated buffer. (may fix #81384)
15602 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
15604 * culture-info-table.h : regenerated.
15606 2007-04-07 Zoltan Varga <vargaz@gmail.com>
15608 * threads.c (start_wrapper): Call push_appdomain_ref () earlier to fix races where
15609 the thread is aborted early.
15611 2007-04-05 Dick Porter <dick@ximian.com>
15613 * file-io.c (ves_icall_System_IO_MonoIO_GetFileSystemEntries): use
15614 FindFirstFile()/FindNextFile() to find entries. This lets the
15615 io-layer versions use MONO_IOMAP compatibility helpers. Fixes bug
15618 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the usage of
15620 ves_icall_System_IO_MonoIO_GetFileSystemEntries() has changed.
15622 2007-04-04 Martin Baulig <martin@ximian.com>
15625 (mono_method_desc_full_match): Add support for nested classes.
15627 2007-04-02 Zoltan Varga <vargaz@gmail.com>
15629 * marshal.c (cominterop_get_managed_wrapper_adjusted): Fix warnings.
15631 2007-04-01 Zoltan Varga <vargaz@gmail.com>
15633 * threads.c (abort_appdomain_thread): Avoid handle leakage if we are
15634 waiting for too many threads.
15636 2007-03-28 Sebastien Pouliot <sebastien@ximian.com>
15638 * environment.c: Fix return value check on uname so we can get the
15639 executing version on Solaris operating systems.
15641 2007-03-28 Jb Evain <jbevain@gmail.com>
15643 * class.c (mono_type_get_name_recurse): Complete the
15644 fix for the creation of assembly qualified names for
15645 pointer types. Fixes #81208.
15647 2007-03-27 Dick Porter <dick@ximian.com>
15649 * appdomain.c (MONO_CORLIB_VERSION): Increment, as the signature
15650 of ves_icall_System_Threading_Mutex_ReleaseMutex_internal() has
15654 (ves_icall_System_Threading_Mutex_ReleaseMutex_internal): Return
15655 the value of ReleaseMutex().
15657 2007-03-27 Dick Porter <dick@ximian.com>
15659 * socket-io.c (ipaddress_to_struct_in_addr): IPAddress is stored
15660 in little-endian order, not network endian, so must be converted
15661 to host endian here. Fixes bug 80593.
15663 2007-03-22 Jb Evain <jbevain@gmail.com>
15665 * class.c (mono_type_get_name_recurse): Fix the creation of assembly
15666 qualified names for pointer types. Fixes #81208.
15668 2007-03-21 Jonathan Chambers <joncham@gmail.com>
15670 * marshal.c: Add support for PreserveSigAttribute.
15672 Code is contributed under MIT/X11 license.
15674 2007-03-14 Zoltan Varga <vargaz@gmail.com>
15676 * process.c: Fix endianness issues. Fixes #81126.
15678 * reflection.c (mono_reflection_create_dynamic_method): Fix the last change so
15679 multiple circular calls made from the same DynamicMethod work. Fixes #81141.
15681 * image.c (mono_image_lookup_resource): Make this work on big-endian
15682 machines.Change API contract so the caller needs to free the return value.
15684 * process.c (process_get_fileversion): Adapt to mono_image_lookup_resource ()
15687 2007-03-14 Martin Baulig <martin@ximian.com>
15689 * debug-helpers.c (mono_type_get_desc): In `MONO_TYPE_ARRAY', use
15690 mono_type_get_desc() as well.
15692 2007-03-13 Jonathan Chambers <joncham@gmail.com>
15694 * icall.c: Fix environ access in VS.
15696 2007-03-13 Alp Toker <alp@atoker.com>
15698 * icall.c (ves_icall_MonoType_GetElementType): For enums, return null
15699 rather than the underlying type. Based on a patch by Ben Maurer. Fixes
15702 2007-03-12 Zoltan Varga <vargaz@gmail.com>
15704 * reflection.c (mono_reflection_create_dynamic_method): Add support for
15705 circular references among dynamic methods. Fixes #81091.
15707 * object-internals.h (MonoReflectionDynamicMethod): Add 'referenced_by' field.
15709 2007-03-09 Martin Baulig <martin@ximian.com>
15711 * reflection.c (encode_constant): Add support for MONO_TYPE_GENERICINST.
15713 2007-03-09 Jonathan Chambers <joncham@gmail.com>
15715 * appdomain.c: Fix shadow copy on Windows. Use g_snprintf instead
15716 of snprintf as it doesn't exist on Win32 (VS build); also for uniformity.
15718 Code is contributed under MIT/X11 license.
15720 2007-03-09 Gert Driesen <drieseng@users.souceforge.net>
15722 * loader.c: Reapply patch for bug #79424.
15724 2007-03-06 Zoltan Varga <vargaz@gmail.com>
15726 * metadata.c (mono_type_to_unmanaged): Only convert object to
15727 MARSHAL_CONV_SAFEHANDLE on the 2.0 profile.
15729 Tue Mar 6 15:39:48 CET 2007 Paolo Molaro <lupus@ximian.com>
15731 * class-internals.h, class.c, metadata.c, reflection.c: removed unused
15732 (and incorrectly set) is_reference field from MonoGenericInst.
15734 2007-03-06 Zoltan Varga <vargaz@gmail.com>
15736 * assembly.c (mono_assembly_load_from_full): Call mono_assemblies_unlock ()
15739 * icall.c (ves_icall_type_Equals): Rename this to ves_icall_System_Type_EqualsInternal.
15741 * icall-def.h: Rename Type:Equals to Type:EqualsInternal.
15743 2007-03-05 Miguel de Icaza <miguel@novell.com>
15745 * file-io.c (ves_icall_System_IO_MonoIO_Open): Use the new
15746 FileOptions.1 value to mean "temporary", map that to
15747 FILE_ATTRIBUTE_TEMPORARY and use that to signal 600 permissions.
15751 2007-03-03 Marek Habersack <mhabersack@novell.com>
15753 * appdomain.c: implement MS .Net style shadow copying. Copies of
15754 the assemblies are made in a subdirectory of the dynamic base
15755 directory, the assembly names are preserved.
15756 Copy .mdb and .config files along with the assemblies being shadowed.
15758 2007-02-28 Zoltan Varga <vargaz@gmail.com>
15760 * marshal.c (emit_object_to_ptr_conv): Emit valid IL for handling HandleRefs.
15761 (emit_marshal_handleref): Ditto.
15763 * profiler.c: Applied patch from Tor Lillqvist (tml@novell.com) to fix output
15764 on Visual C++. Fixes #80671.
15766 Wed Feb 28 16:53:40 CET 2007 Paolo Molaro <lupus@ximian.com>
15768 * boehm-gc.c, null-gc.c, object.h, object.c: sgen gc fixes
15769 for clone operations.
15771 2007-02-28 Zoltan Varga <vargaz@gmail.com>
15773 * marshal.c: Fix warnings.
15775 Fri Feb 23 15:06:57 CET 2007 Paolo Molaro <lupus@ximian.com>
15777 * loader.c: allow case-insensitive matching of the dll name
15778 in dllmap handling when prefixed with "i:".
15780 2007-02-20 Jonathan Chambers <joncham@gmail.com>
15782 * threads.c: Fix #ifdef for dummy_apc function for VS.
15784 Tue Feb 20 11:59:42 CET 2007 Paolo Molaro <lupus@ximian.com>
15786 * threads.c: don't throw in MemoryBarrier (), use lock/unlock.
15788 2007-02-19 Massimiliano Mantione <massi@ximian.com>
15789 * class.c (mono_class_setup_vtable_general): Fix bug 75903,
15790 giving precedence to the methods with a fully qualified name
15791 (InterfaceName.MethodName) when building the interface sections
15794 2007-02-16 Dick Porter <dick@ximian.com>
15796 * threadpool.c (append_job): Fix fast-path array handling, so it's
15797 less likely the array will grow exponentially when the load is
15800 Fri Feb 16 19:17:30 CET 2007 Paolo Molaro <lupus@ximian.com>
15802 * metadata-internals.h, loader.c: fix dllmap lookup order
15803 for non-function maps, too, and prepare for fallback code.
15805 2007-02-12 Robert Jordan <robertj@gmx.net>
15807 * marshal.c, marshal.h, icall-def.h: rename mono_marshal_realloc
15808 to ves_icall_System_Runtime_InteropServices_Marshal_ReAllocHGlobal
15809 and use GlobalReAlloc on WIN32 to be in sync with GlobalAlloc,
15810 GlobalFree. Fixes a part of bug #77075.
15812 Mon Feb 12 21:10:07 CET 2007 Paolo Molaro <lupus@ximian.com>
15814 * loader.c: implemented typedef parent in field memberref.
15816 2007-02-11 Jonathan Chambers <joncham@gmail.com>
15818 * marshal.c: Fix warnings and remember to call Release on
15821 Code is contributed under MIT/X11 license.
15823 2007-02-10 Miguel de Icaza <miguel@novell.com>
15825 * class-internals.h: Add MonoHandleRef definition, and
15826 handleref_class to mono_defaults.
15828 * metadata.c (mono_type_to_unmanaged): If we find HandleRefs in a
15829 structure, use new conversion MONO_MARSHAL_CONV_HANDLEREF.
15831 * marshal.c (emit_ptr_to_object_conv): Add support for HandleRefs
15832 (do nothing on this stage)
15833 (emit_object_to_ptr_conv): Extract the handle from the HandleRef.
15834 (emit_marshal_handleref): New method, used for argument handling
15837 2007-02-08 Jonathan Chambers <joncham@gmail.com>
15839 * class.c (mono_class_setup_parent): Lazily init com types.
15840 * domain.c (mono_init_internal, mono_init_com_types): Lazily
15842 * object.c (mono_remote_class_vtable): Lazily init com types.
15843 * class-internals.h: Add iunknown and idispatch to MonoDefaults.
15844 * object-internals.h: Add MonoComInteropProxy and MonoReflectionGuidAttribute.
15845 * domain-internals.h: Expose mono_init_com_types.
15846 * icall-def.h: Add icalls for ComInteropProxy, __ComObject, and Marshal.
15847 * marshal.c: Add mutex for cominterop use. Init locals for wrapper methods.
15848 Add support for COM Callable Wrapper marshalling.
15849 * marshal.h: Add icall definitions.
15850 * gc.c: Handle freeing of CCWs in finalizer code.
15852 Code is contributed under MIT/X11 license.
15854 Thu Feb 8 12:46:18 CET 2007 Paolo Molaro <lupus@ximian.com>
15856 * reflection.c: changed all the signature encoding code to use
15857 a variable-sized buffer.
15859 Wed Feb 7 20:37:23 CET 2007 Paolo Molaro <lupus@ximian.com>
15861 * marshal.c: locking fixes: never take the loader lock
15862 or other runtime locks when holding the marshal lock
15865 Wed Feb 7 18:49:10 CET 2007 Paolo Molaro <lupus@ximian.com>
15867 * marshal.c: make the delegate function pointer mapping
15868 work for the moving GC.
15870 Mon Jan 29 11:30:46 CET 2007 Paolo Molaro <lupus@ximian.com>
15872 * marshal.c: fix from Robert Jordan (robertj@gmx.net)
15875 Fri Jan 26 12:49:23 CET 2007 Paolo Molaro <lupus@ximian.com>
15877 * image.h, loader.c, metadata-internals.h: use mono-dl instead of
15880 Fri Jan 26 12:00:45 CET 2007 Paolo Molaro <lupus@ximian.com>
15882 * threadpool.c: made the code moving-GC safe.
15884 Thu Jan 25 20:31:41 CET 2007 Paolo Molaro <lupus@ximian.com>
15886 * assembly.c, boehm-gc.c, class-internals.h, class.c,
15887 debug-mono-symfile.c, domain.c, locales.c, marshal.c, metadata.c,
15888 monitor.c, mono-debug.c, mono-debug.h, object.c, profiler.c:
15890 * reflection.c: warning cleanup, some threading and moving GC fixes.
15892 Thu Jan 25 16:22:36 CET 2007 Paolo Molaro <lupus@ximian.com>
15894 * class.c, loader.c: create the needed Set/Get/Address array methods
15895 as well as the .ctors in mono_class_init (), fixes bug #80567.
15897 2007-01-24 Zoltan Varga <vargaz@gmail.com>
15899 * class.c (mono_class_layout_fields): When force-aligning a field, make sure
15900 we doesn't decrease its alignment. Should fix the sparc build.
15902 2007-01-24 Dick Porter <dick@ximian.com>
15905 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
15906 Create the returned object if we need to ignore an unsupported
15907 socket option. Fixes a segfault reported by Atsushi.
15909 Tue Jan 23 18:09:21 CET 2007 Paolo Molaro <lupus@ximian.com>
15911 * class.c, object.c: restrict GC-tracked fields to
15912 UIntPtr fields used inside corlib, so we provide better
15913 type info to the GC and also allow broken packing as in
15916 Mon Jan 22 11:24:27 CET 2007 Paolo Molaro <lupus@ximian.com>
15918 * sgen-gc.c: removed duplicated function.
15920 2007-01-19 Miguel de Icaza <miguel@novell.com>
15922 * socket-io.c (convert_sockopt_level_and_name): return -2 as a
15923 value that means that the value is not supported, but that we
15924 should not return a failure, but instead report this as a
15925 successful operation.
15927 2007-01-19 Raja R Harinath <rharinath@novell.com>
15929 Fix tests/bug79956.2.il
15930 * class.c (mono_type_get_underlying_type): Handle genericinst enums.
15931 (mono_generic_class_get_class): If the generic definition in an
15932 enum, copy over other fields related to it.
15934 Thu Jan 18 18:37:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15936 * metadata.h: fix MONO_TYPE_ISSTRUCT() to not consider
15937 genericinst enums (bug #79215).
15939 2007-01-17 Massimiliano Mantione <massi@ximian.com>
15940 * class.c: Fix bug 80307.
15942 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <lupus@ximian.com>
15944 * image.c: if the file table is not present, try to load
15945 all the modules, since we don't have info about them
15946 having or not metadata (bug #80517).
15947 * assembly.c: allow mono_assembly_load_references () to
15948 work for netmodules.
15950 Wed Jan 17 14:28:30 CET 2007 Paolo Molaro <lupus@ximian.com>
15952 * image.c, metadata-internals.h, object.c: execute module
15953 cctors when running on the 2 runtime if present (bug #80487).
15955 Tue Jan 16 15:32:53 CET 2007 Paolo Molaro <lupus@ximian.com>
15957 * icall.c: optimized InitializeArray() on bigendian.
15959 Tue Jan 16 13:18:51 CET 2007 Paolo Molaro <lupus@ximian.com>
15961 * icall.c: fix for the broken ARM FPA double format.
15963 Tue Jan 16 12:51:16 CET 2007 Paolo Molaro <lupus@ximian.com>
15965 * icall.c: handle endian issues for r4 and r8 types, too, in
15966 the InitializeArray() icall.
15968 2007-01-15 Miguel de Icaza <miguel@novell.com>
15970 * loader.c (mono_loader_error_prepare_exception): Clear the error
15971 once we have extracted the information from it, do this before we
15972 call into the JIT's class loading mechanisms.
15974 * object.c (mono_class_create_runtime_vtable): Do not clear the
15975 loader error before calling mono_class_get_exception_for_failure
15976 as the loader error is needed inside
15977 mono_class_get_exception_for_failure to throw the error (thinko).
15981 Mon Jan 15 10:27:31 CET 2007 Paolo Molaro <lupus@ximian.com>
15983 * reflection.c: align fields rva data so it's faster to load at
15986 2007-01-12 Raja R Harinath <rharinath@novell.com>
15988 Prepare to simplify GenericMethod handling.
15989 * class-internals.h (mono_method_get_context): New accessor function.
15990 * class.c, icall.c, loader.c, reflection.c, verify.c: Use accessor
15991 rather than directly accessing '->context' field.
15993 * class-internals.h (_MonoGenericParam.method): Move ...
15994 (_MonoGenericContainer): ... here. Add into union with klass field.
15995 * class.c, icall.c, loader.c, metadata.c, reflection.c:
15998 Fri Jan 12 11:58:52 CET 2007 Paolo Molaro <lupus@ximian.com>
16000 * Makefile.am, class-internals.h, debug-helpers.c: consolidate
16001 the wrapper type enum and reduce relocations.
16003 2007-01-12 Raja R Harinath <rharinath@novell.com>
16005 * reflection.c (inflate_mono_method): Reuse method instantiation
16006 from the generic method, if available.
16008 2007-01-11 Jonathan Chambers <joncham@gmail.com>
16010 * marshal.c (emit_marshal_variant): Fix conv_arg
16011 type in last commit, based on whether parameter is byref.
16013 2007-01-11 Jonathan Chambers <joncham@gmail.com>
16015 * marshal.c (emit_marshal_variant): Handle unmanaged->managed
16017 (mono_marshal_emit_managed_wrapper): Convert byref arguments of type
16018 MONO_TYPE_OBJECT back for VARIANT support.
16020 2007-01-11 Jonathan Chambers <joncham@gmail.com>
16022 * marshal.c, marshal.h, icall-def.h: Implement
16023 Marshal.ReAllocCoTaskMem.
16025 Thu Jan 11 19:00:03 CET 2007 Paolo Molaro <lupus@ximian.com>
16027 * marshal.c: memory retention fixes: use the proper
16028 image cache for runtime_invoke method lookups.
16030 Thu Jan 11 18:53:19 CET 2007 Paolo Molaro <lupus@ximian.com>
16032 * mempool.c: added code to help debug mempool allocations.
16034 2007-01-11 Dick Porter <dick@ximian.com>
16036 * socket-io.c (convert_sockopt_level_and_name): Add DontFragment
16037 support (experimenting with faking it with IP_MTU_DISCOVER for
16038 systems that don't have IP_DONTFRAGMENT.)
16039 (ves_icall_System_Net_Sockets_Socket_Disconnect_internal): New
16042 * icall-def.h: new System.Net.Sockets.Disconnect icall.
16044 * socket-io.h: Add new fields to MonoSocketAsyncResult
16045 corresponding to the new ones in Socket.cs.
16047 2007-01-11 Raja R Harinath <rharinath@novell.com>
16049 Fix IronPython regression mentioned in #80249
16050 * metadata.c (do_mono_metadata_parse_generic_class): Clear
16051 'cached_context' field, since it may have been initialized as a
16052 side-effect of metadata parsing.
16054 * class-internals.h (_MonoGenericClass.is_inflated): Remove.
16055 (_MonoGenericClass.cached_class): Move here and rename from lone
16056 remaining field of ...
16057 (_MonoInflatedGenericClass): ... this. Remove.
16058 * metadata.h, class.c, reflection.c, metadata.c, icall.c: Update
16061 Fix mcs/tests/test-128.cs regression.
16062 * reflection.c (encode_cattr_value) [MONO_TYPE_SZARRAY]: Revert
16063 2007-01-10 change below.
16064 [MONO_TYPE_OBJECT]: Recurse into array case.
16066 2007-01-11 Raja R Harinath <harinath@gmail.com>
16068 * class-internals.h (mono_get_inflated_generic_class): Remove.
16069 * class.c (mono_get_inflated_generic_class): Remove.
16070 (mono_generic_class_get_class): Rename from
16071 mono_class_create_generic.
16072 (mono_class_from_mono_type) [GENERICINST]: Use it.
16073 * reflection.c, metadata.c: Update to changes. Use
16074 'mono_class_from_mono_type'.
16076 Wed Jan 10 16:19:54 CET 2007 Paolo Molaro <lupus@ximian.com>
16078 * reflection.c: use passed type when encoding an array element
16079 in custom attributes (patch from David Mitchell, dmitchell@logos.com).
16081 2007-01-09 Robert Jordan <robertj@gmx.net>
16083 * marshal.c (mono_delegate_end_invoke): Add check for unpaired asyc
16084 result arguments (someDelegate.EndInvoke (unrelatedAres)).
16087 2007-01-09 Raja R Harinath <rharinath@novell.com>
16089 * class-internals.h (_MonoInflatedGenericClass.is_initialized): Remove.
16091 * object.c (set_value): Avoid aliasing between type->data.klass
16092 and type->data.generic_class.
16094 * class.c (mono_class_create_generic): Don't use 'is_initialized' field.
16096 2007-01-08 Raja R Harinath <rharinath@novell.com>
16098 * marshal.c (mono_marshal_get_runtime_invoke): Avoid aliasing
16099 between type->data.klass and type->data.generic_class.
16101 2007-01-08 Lluis Sanchez <lluis@ximian.com>
16103 * marshal.c: In MS.NET, StringBuilder objects are not copied by
16104 value in out parameters.
16106 2007-01-08 Raja R Harinath <rharinath@novell.com>
16108 Simplify invariant for MonoGenericClass::klass field.
16109 * class.c (mono_class_create_generic): Verify 'klass' is null.
16110 * metadata.c (do_mono_metadata_parse_generic_class): Don't
16111 initialize 'klass' field.
16113 2007-01-05 Raja R Harinath <rharinath@novell.com>
16115 Ongoing work to avoid redundant data and simplify invariants.
16116 * class-internals.h (_MonoGenericMethod.class_inst): Rename from
16117 'generic_class', and change type to a GenericInst.
16118 (_MonoGenericContext.class_inst): Likewise, rename from 'gclass'.
16119 * class.c, loader.c, metadata.c, reflection.c: Update to changes.
16121 2007-01-05 Atsushi Enomoto <atsushi@ximian.com>
16123 * class.c : skip io-layer under PLATFORM_WIN32.
16125 2007-01-03 Tor Lillqvist <tml@novell.com>
16127 Fix #80305: In a bundled executable, look in the bundled exe
16128 assembly to determine the runtime version. Add the possibility to
16129 bundle also the machine.config file.
16131 * assembly.c (mono_assembly_open_from_bundle): Make
16132 non-static. Allow being called even if we have no bundled
16133 assemblies, and return NULL right away in that case.
16135 * domain-internals.h: Declare mono_assembly_open_from_bundle()
16138 * domain.c (app_config_parse): Take an assembly exe file name as
16139 parameter instead of a config file name. Check for a bundled
16140 config file for that assembly by calling
16141 mono_config_string_for_assembly_file() (see below) before looking
16142 for one in the file system.
16143 (get_runtimes_from_exe): Corrsponding change to call of
16144 app_config_parse().
16145 (get_runtimes_from_exe): Check for bundled assembly exe file first
16146 by calling mono_assembly_open_from_bundle(). If no bundled
16147 assembly exe file is found, call mono_image_open() as before to
16148 look it up in the file system.
16150 * mono-config.c: Add variable bundled_machinec_onfig.
16151 (mono_config_string_for_assembly_file): New function.
16152 (mono_config_for_assembly): Move code snippet that looks for a
16153 bundled assembly .config file into the above new function. Call
16155 (mono_register_machine_config, mono_get_machine_config): New
16156 functions to set and retrieve
16158 * assembly.h: Declare mono_register_machine_config().
16160 * mono-config.h: Declare mono_get_machine_config() and
16161 mono_config_string_for_assembly_file().
16163 * icall.c: No declaration of environ necessary on Win32. It is
16164 declared (as a macro expanding to a function call) in stdlib.h.
16165 (ves_icall_System_Configuration_DefaultConfig_get_bundled_machine_config):
16166 New internal mono function. Returns the value of
16167 mono_get_machine_config() as a Mono string.
16169 * icall-def.h: Add get_bundled_machine_config().
16171 2007-01-04 Raja R Harinath <rharinath@novell.com>
16173 Remove redundant field
16174 * class-internals.h (_MonoGenericContext.container): Remove field.
16175 * loader.c (mono_method_get_signature_full): Don't parse a
16176 "container" for a signature parse when the signature is inflated
16178 (method_from_methodspec): Likewise, for a generic_inst.
16179 * class.c, metadata.c, reflection.c: Update to changes.
16181 2006-01-04 Raja R Harinath <rharinath@novell.com>
16183 * class-internals.h (_MonoGenericClass): Rename 'context' field to
16184 'cached_context', and change semantics -- it starts off NULL, and
16185 is initialized on demand.
16186 * class.c (mono_generic_class_get_context): New accessor to
16187 replace 'context' field accesses.
16188 (mono_class_get_context): New helper.
16189 (*): Update to changes.
16190 * icall.c, loader.c, metadata.c, reflection.c: Update to changes.
16192 2007-01-03 Miguel de Icaza <miguel@novell.com>
16194 * marshal.c (mono_string_to_byvalstr): Fix thinko, shorten len
16195 before the memcpy. Fixes Marshal2 regression.
16197 2007-01-02 Jb Evain <jbevain@gmail.com>
16199 * blob.h: add a MONO_TYPE_ENUM definition
16200 * reflection.c (load_cattr_value, create_custom_attr, create_custom_attr_data):
16201 fix the encoding of arrays of enums in custom attributes.
16205 2007-01-01 Miguel de Icaza <miguel@novell.com>
16207 * marshal.c (mono_string_to_byvalwstr): Fix this routine. The
16208 string is null terminated, but only cut the string short if it
16209 overflows the buffer.
16211 (mono_string_to_byvalstr): Also fix this routine. The code here
16212 was not properly terminating a string (it was only terminated
16213 because of the previous catch-all memset).
16215 I left the memset, because I do not know if applications expect
16216 the runtime to clear this region.
16220 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
16221 Clear the error before returning to unmanaged code to prevent the
16222 runtime from being confused later on (fixes 80420).
16223 (ves_icall_type_from_name): Always call mono_loader_clear_error
16224 after parsing a type that could have failed.
16225 (ves_icall_System_Reflection_Assembly_GetTypes): ditto.
16227 * loader.c (mono_loader_clear_error): Fix indentation.
16229 2006-12-28 Martin Baulig <martin@ximian.com>
16231 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 58.
16233 Fri Dec 22 20:04:57 CET 2006 Paolo Molaro <lupus@ximian.com>
16235 * reflection.c: patch from Rolf Bjarne Kvinge to fix
16236 getting a token for an EnumBuilder.
16238 Fri Dec 22 19:49:07 CET 2006 Paolo Molaro <lupus@ximian.com>
16240 * reflection.c: be more careful in case resource generation
16241 fails to create the data array.
16243 Fri Dec 22 18:17:40 CET 2006 Paolo Molaro <lupus@ximian.com>
16245 * sgen-gc.c: write barrier for clone and fix unregister handles.
16247 Fri Dec 22 18:15:33 CET 2006 Paolo Molaro <lupus@ximian.com>
16249 * reflection.c: some fixes needed in the generics code for the moving GC.
16251 2006-12-22 Robert Jordan <robertj@gmx.net>
16253 * icall.c (ves_icall_System_Array_SetValueImpl): Take enums into
16254 account. Fixes bug #80299.
16256 2006-12-21 Raja R Harinath <rharinath@novell.com>
16258 Fix WaitHandle usage in delegates.
16259 * object-internals.h (mono_wait_handle_get_HANDLE): Declare.
16260 * object.c (mono_wait_handle_new): Use the property set method to
16261 initialize the handle.
16262 (mono_wait_handle_get_handle): New.
16263 * threadpool.c (mono_async_invoke): Use it.
16264 * threads.c (ves_icall_System_Threading_WaitHandle_WaitAll_internal):
16266 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Likewise.
16268 2006-12-21 Jonathan Chambers <joncham@gmail.com>
16270 * marshal.c (emit_marshal): Call emit_marshal_variant and
16271 emit_marshal_com_interface when applicable.
16272 (emit_marshal_variant, emit_marshal_com_interface): Add
16273 methods for this case and remove if's from emit_marshal_object.
16275 Wed Dec 20 11:03:56 CET 2006 Paolo Molaro <lupus@ximian.com>
16277 * filewatcher.c: updated to use the mono-dl API instead of gmodule.
16279 2006-12-19 Jonathan Chambers <joncham@gmail.com>
16281 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocHGlobal,
16282 ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal): Use GlobalAlloc
16283 and GlobalFree on Windows. Remove FIXME.
16285 Tue Dec 19 16:18:16 CET 2006 Paolo Molaro <lupus@ximian.com>
16287 * mono-mlist.h, mono-mlist.c, Makefile.am: linked list
16288 implementation for managed objects.
16290 Tue Dec 19 14:28:03 CET 2006 Paolo Molaro <lupus@ximian.com>
16292 * object.c: implemented code to be used for checking
16293 that no reference field overlaps with non-references.
16295 Tue Dec 19 14:10:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16297 * threadpool.c: fix queue code to be compatible with the
16300 2006-12-18 Miguel de Icaza <miguel@novell.com>
16302 * marshal.c (emit_object_to_ptr_conv): Handle null safehandles
16303 in structures by throwing ArgumentNullException.
16305 (emit_marshal_safehandle): Also when they are null parameters.
16307 (emit_marshal_safehandle): Add support for ref
16308 SafeHandles parameters
16310 Mon Dec 18 19:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16312 * profiler.c: updated to use the mono-dl API instead of
16315 Mon Dec 18 19:02:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16317 * profiler.c: updated to use the mono-dl dynamic loading
16318 API instead of gmodule.
16320 Mon Dec 18 18:16:22 CET 2006 Paolo Molaro <lupus@ximian.com>
16322 * profiler.c: use readlink, older versions of glib don't have
16323 g_file_read_link ().
16325 Mon Dec 18 16:40:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16327 * profiler.c: try to detect the path to mono if libc fails to provide
16328 a useful name (bug #80286).
16330 2006-12-16 Raja R Harinath <rharinath@novell.com>
16333 * icall.c (ves_icall_Type_GetNestedType): If the type is a generic
16334 instance, use the generic type definition instead.
16335 (ves_icall_Type_GetNestedTypes): Likewise.
16336 * class.c (mono_class_create_generic): Always set the
16337 nested_classes of a generic instance to NULL, even if the generic
16338 type definition has nested types.
16340 2006-12-15 Jonathan Chambers <joncham@gmail.com>
16342 * marshal.c (mono_string_from_bstr): Revert previous Windows change
16345 2006-12-15 Miguel de Icaza <miguel@novell.com>
16347 * marshal.c (mono_string_from_bstr): Jon Chambers pointed out that
16348 my arguments were in the wrong order. I also fixed the Windows
16349 version which seems to have had the same issue.
16351 (mono_free_bstr): On Unix, this is g_free.
16352 (mono_string_from_bstr, mono_string_to_bstr): Implement bstr
16353 conversions (for the tests in corlib to pass).
16355 2006-12-14 Miguel de Icaza <miguel@novell.com>
16357 * marshal.c (emit_ptr_to_object_conv): For now, ignore
16358 MONO_MARSHAL_CONV_SAFEHANDLE on return values (we need to throw an
16359 exception if a ref SafeHandle in a struct has changed).
16361 (emit_struct_conv): Do not perform layout checks for classes
16362 derived from SafeHandle, as those are specially handled.
16364 (emit_object_to_ptr_conv): Add support for
16365 MONO_MARSHAL_CONV_SAFEHANDLE conversion.
16367 (emit_marshal_safehandle): Implement conversion of return values
16368 of safehandles (MARSHAL_ACTION_CONV_RESULT).
16370 * threads.c: WaitHandle now is compiled with two different handles
16371 "IntPtr os_handle" for 1.x and "SafeWaitHandle safe_wait_handle"
16374 (ves_icall_System_Threading_WaitHandle_WaitAll_internal)
16375 (ves_icall_System_Threading_WaitHandle_WaitAny_internal): Adjust
16376 these routines to cope with both kinds of fields.
16378 2006-12-12 Miguel de Icaza <miguel@novell.com>
16380 * metadata.c (mono_type_to_unmanaged): Handle the case where
16381 type->data.klass is a SafeHandle, and in that case, return the
16382 size of a pointer (MONO_NATIVE_INT) and set the conversion to be
16383 MONO_MARSHAL_CONV_SAFEHANDLE.
16385 2006-12-11 Miguel de Icaza <miguel@novell.com>
16387 * marshal.c (emit_marshal): Hook up to the MONO_TYPE_CLASS and
16388 MONO_TYPE_OBJECT cases and check for a SafeHandle here before
16389 calling emit_marshal_object.
16391 (emit_marshal_safehandle): Implement marshalling of
16392 SafeHandle parameters (no ref support yet).
16394 (MarshalAction): Document the defines as I implement
16395 them for SafeHandle.
16397 (emit_marshal_object): indentation police.
16399 * class-internals.h: Define MonoSafeHandle.
16400 Add safehandle_class to MonoDefaults type.
16402 * verify.c: Add System.Runtime.InteropServices.SafeHandle to the
16403 list of classes to check for fields.
16405 * domain.c (mono_init_internal): Add SafeHandle to the list of
16406 mono_defaults loaded.
16408 2006-12-15 Raja R Harinath <rharinath@novell.com>
16411 * reflection.c (mono_reflection_bind_generic_parameters): If the
16412 generic type definition is a type builder, ensure that it is fully
16413 initialized before instantiating it. Kill some dead code.
16415 Thu Dec 14 17:02:59 CET 2006 Paolo Molaro <lupus@ximian.com>
16417 * object.c: clear the loader_error () before loading
16418 more metadata stuff (bug #80258).
16420 Thu Dec 14 12:49:47 CET 2006 Paolo Molaro <lupus@ximian.com>
16422 * icall.c, icall-defs.h: type modifiers icalls for
16423 parameters and properties.
16425 Wed Dec 13 19:29:50 CET 2006 Paolo Molaro <lupus@ximian.com>
16427 * object.c, icall.c: fixed warnings.
16429 Mon Dec 11 11:03:10 CET 2006 Paolo Molaro <lupus@ximian.com>
16431 * marshal.c: fixed a couple of leaks and coding style in a few places.
16433 2006-12-08 Dick Porter <dick@ximian.com>
16435 * process.c: Cope with NULL ProcessStartInfo arguments on windows
16436 too. Patch from Jonathan Chambers <joncham@gmail.com>, fixes bug
16439 Thu Dec 7 15:20:31 CET 2006 Paolo Molaro <lupus@ximian.com>
16441 * process.c: ProcessStartInfo may have only filename set and
16442 arguments can be NULL.
16444 Tue Dec 5 19:19:34 CET 2006 Paolo Molaro <lupus@ximian.com>
16446 * icall.c: fix leak found by Robert Jordan.
16448 Tue Dec 5 17:53:10 CET 2006 Paolo Molaro <lupus@ximian.com>
16450 * marshal.c, marshal.h: generate managed method to access an element
16451 of a multi-dimensional array.
16453 2006-11-30 Paolo Molaro (lupus@ximian.com)
16455 * metadata.c, marshal.c: locking fixes when writing to image->mempool.
16457 Thu Nov 30 11:11:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16459 * icall.c: back out GetFields () fix until the serialization code is
16460 fixed to not depend on the incorrect behaviour.
16462 Wed Nov 29 22:01:46 CET 2006 Paolo Molaro <lupus@ximian.com>
16464 * profiler.c: provide defaults if none are set.
16466 Tue Nov 28 12:54:51 CET 2006 Paolo Molaro <lupus@ximian.com>
16468 * Makefile.am, attrdefs.h: new public header file with
16469 constants for attributes for use by embedders.
16471 Tue Nov 28 11:44:52 CET 2006 Paolo Molaro <lupus@ximian.com>
16473 * icall.c: GetFields () fix for bug #80064.
16475 Tue Nov 28 10:56:01 CET 2006 Paolo Molaro <lupus@ximian.com>
16477 * filewatcher.c, filewatcher.h, icall-def.h, icall.c, locales.c:
16478 removed long unused icalls.
16480 2006-11-27 Jonathan Chambers <joncham@gmail.com>
16483 (mono_marshal_emit_managed_wrapper): Level of indirection for
16484 mono_marshal_get_managed_wrapper so that a wrapper for a managed method
16485 can be generated without a delegate class.
16486 (mono_marshal_get_managed_wrapper): Move wrapper logic to mono_marshal_emit_managed_wrapper.
16488 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
16490 2006-11-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16492 * console-io.c: add the 'signal' call removed by mistake. Fixes bug
16495 Mon Nov 27 19:29:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16497 * boehm-gc.c, null-gc.c, sgen-gc.c, mono-gc.h, icall.c,
16498 icall-def.h: added icalls needed by System.GC.
16500 Thu Nov 23 20:01:12 CET 2006 Paolo Molaro <lupus@ximian.com>
16502 * loader.c: ensure the class in catch clauses is handled
16503 correctly for generics methods (fixes bug#79980).
16505 Thu Nov 23 17:31:58 CET 2006 Paolo Molaro <lupus@ximian.com>
16507 * monitor.h, monitor.c: added mono_locks_dump () function
16508 to help debug deadlocks involving managed locks.
16510 2006-11-13 Dick Porter <dick@ximian.com>
16512 * file-io.c (get_file_attributes): If the file is a symlink try
16513 and get the stat data for the target, but also add the
16514 FILE_ATTRIBUTE_REPARSE_POINT flag. This is an attempt to follow
16515 the specs for the windows symlink support, but will probably have
16516 to be reworked when I have test data from a vista machine. Fixes
16519 2006-11-13 Dick Porter <dick@ximian.com>
16521 * gc.c (mono_domain_finalize):
16522 * marshal.c (mono_delegate_begin_invoke):
16523 * threadpool.c (socket_io_init, mono_thread_pool_init)
16524 (mono_thread_pool_finish):
16525 * monitor.c (mono_monitor_try_enter_internal):
16526 * threads.c (mono_thread_resume, mono_thread_init)
16527 (mono_thread_suspend_all_other_threads)
16528 (mono_thread_execute_interruption):
16529 * appdomain.c (mono_domain_unload): Check for NULL error returns
16530 from CreateThread(), CreateEvent() and CreateSemaphore(). See bug
16533 2006-11-11 Miguel de Icaza <miguel@novell.com>
16536 (ves_icall_System_Diagnostics_Process_CreateProcess_internal):
16537 Only close the handle if the value of the handle is not
16538 INVALID_HANDLE_VALUE. This just makes the process a bit more
16541 Improvement for #75733, so that we do not run into this problem.
16544 * assembly.c (check_path_env, check_extra_gac_path_env): Do not
16545 include empty directories from MONO_PATH or MONO_GAC_PREFIX in our
16546 internal variables. Fixes #79462
16549 2006-11-09 Dick Porter <dick@ximian.com>
16551 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
16552 Use poll() not select(). Fixes bug 79397.
16554 2006-11-09 Raja R Harinath <rharinath@novell.com>
16557 * assembly.c (mono_assembly_load_from_full): Check that the given
16558 image has an assembly manifest.
16560 2006-11-09 Ankit Jain <jankit@novell.com>
16562 * tabledefs.h (ASSEMBLYREF_RETARGETABLE_FLAG):
16563 (ASSEMBLYREF_ENABLEJITCOMPILE_TRACKING_FLAG):
16564 (ASSEMBLYREF_DISABLEJITCOMPILE_OPTIMIZER_FLAG): Add AssemblyRef flags.
16566 2006-11-07 Dick Porter <dick@ximian.com>
16568 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
16569 Put the old resolver behaviour back for pre-2.0 profiles.
16571 Tue Nov 7 16:56:24 CET 2006 Paolo Molaro <lupus@ximian.com>
16573 * threadpool.c: precise GC and locking fixes.
16575 Tue Nov 7 11:02:42 CET 2006 Paolo Molaro <lupus@ximian.com>
16577 * class.c: don't load types that have an explicit unaligned
16578 managed reference. Provide better info in the TypeLoad exception.
16579 Part of the fix for bug #79744.
16580 * object.c: use the correct check for class type load issues.
16582 Mon Nov 6 17:07:43 CET 2006 Paolo Molaro <lupus@ximian.com>
16584 * class.c: enforce alignment of fields with managed references
16585 even when Pack=1 is forced by the user (bug #77788).
16587 2006-11-03 Dick Porter <dick@ximian.com>
16589 * socket-io.c (ves_icall_System_Net_Dns_GetHostByAddr_internal):
16590 If the address reverse lookup fails, return it as the hostname
16591 anyway. Fixes bug 79721.
16593 2006-11-03 Dick Porter <dick@ximian.com>
16595 * threads.c (ves_icall_System_Threading_Thread_SpinWait_internal):
16596 Fix build on Windows.
16598 2006-11-02 Dick Porter <dick@ximian.com>
16601 * object-internals.h:
16602 * exception.c (mono_get_exception_thread_interrupted):
16603 * threads.c: Implement Thread.Interrupt and Thread.SpinWait.
16606 * monitor.c (ves_icall_System_Threading_Monitor_Monitor_wait):
16607 Check for pending Thread.Interrupt.
16609 2006-10-27 Massimiliano Mantione <massi@ximian.com>
16610 * loader.c: Fixed bug 79684.
16612 2006-10-27 Dick Porter <dick@ximian.com>
16614 * file-io.c (get_file_attributes): Force symlinks to directories
16615 to be returned as a regular file. Fixes bug 79733.
16616 2006-10-26 Dick Porter <dick@ximian.com>
16618 * file-io.c (ves_icall_System_IO_MonoIO_Open): If we're calling
16619 CreateFile to open a directory then we need to set the
16620 FILE_FLAG_BACKUP_SEMANTICS flag. Fixes bug 75285.
16622 2006-10-23 Zoltan Varga <vargaz@gmail.com>
16624 * reflection.c (mono_method_get_object): Cache the MonoMethod class and its
16627 Mon Oct 23 03:06:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
16629 * sgengc.c: small cleanup of timer code.
16631 Mon Oct 23 02:49:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
16633 * sgen-gc.c: fix some warnings and start adding support for
16634 complete object removal on domain unload.
16636 2006-10-22 Gert Driesen <drieseng@users.sourceforge.net>
16638 * assembly.c: build_assembly_name should not consider a version
16639 number without build or revision number invalid. Fixes bug #79715.
16641 2006-10-18 Jonathan Chambers <joncham@gmail.com>
16643 * icall.c: Have ves_icall_System_Diagnostics_DefaultTraceListener_WriteWindowsDebugString
16644 call kernel32 function OutputDebugString directly.
16646 Signed-off-by: Jonathan Chambers <joncham@gmail.com>
16648 Tue Oct 17 16:59:59 CEST 2006 Paolo Molaro <lupus@ximian.com>
16650 * reflection.c: small cleanup, using a function to insert a MonoString
16651 in the string heap.
16653 Tue Oct 17 16:45:27 CEST 2006 Paolo Molaro <lupus@ximian.com>
16655 * reflection.c: moving GC fixes.
16657 Mon Oct 16 16:53:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
16659 * sgen-gc.c, gc-internal.h, gc.c: added API to collect and remove
16660 all the objects with finalizers belonging to an unloading appdomain.
16662 Mon Oct 16 15:08:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
16664 * sgen-gc.c: added ability to allocate even when the nursery is fully
16665 pinned and fixed a couple of bugs.
16667 2006-10-15 Zoltan Varga <vargaz@gmail.com>
16669 * threads.h: Revert the last change for now.
16671 * threads.h (mono_thread_get_pending_exception): Rename this to
16672 mono_thread_get_undeniable_exception ().
16674 2006-10-15 Gert Driesen <drieseng@users.sourceforge.net>
16676 * appdomain.c: Use mono_get_exception_bad_image_format2 to construct
16677 BadImageFormatException in ves_icall_System_Reflection_Assembly_LoadFrom
16678 when fname does not refer to valid assembly. This result in a more
16679 meaningful error message.
16680 * exception.c: added mono_get_exception_bad_image_format2 which
16681 constructs a BadImageFormatException using the ctor taking a custom
16682 message and the file name. Passing in a NULL msg results in a default
16684 * exception.h: define mono_get_exception_bad_image_format2 function.
16685 * icall.c: in InternalGetAssemblyName, throw BadImageFormatException
16686 when file name pointed to an invalid IL image. Use
16687 mono_get_exception_file_not_found2 to construct FileNotFoundException,
16688 as this results in a more meaningful error message.
16690 2006-10-15 Zoltan Varga <vargaz@gmail.com>
16692 * reflection.c (encode_named_val): Implement proper encoding of arrays. Fixes
16695 2006-10-12 Zoltan Varga <vargaz@gmail.com>
16697 * metadata.c (mono_type_size): Change the align parameter to guint32 for
16698 consistency with the other _size functions.
16699 (mono_type_stack_size): Ditto.
16701 * class.c object.c icall.c: Fix warnings caused by the above change.
16703 * class.c (mono_class_get_method_from_name_flags): Fix a typo.
16705 * image.c (load_metadata_ptrs): Reenable loading of modules with uncompressed metadata.
16707 * metadata.c class.c loader.c: Add proper support for uncompressed metadata.
16709 Wed Oct 11 17:27:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
16711 * console-io.h, filewatcher.h, locales.h, marshal.h, monitor.h,
16712 process.h, rand.h, rawbuffer.h, security-manager.h, security.h,
16713 socket-io.h, string-icalls.h, sysmath.h, threadpool-internals.h,
16714 threadpool.h, threads-types.h: mark more internal functions.
16716 2006-10-11 Dick Porter <dick@ximian.com>
16718 * socket-io.c (ves_icall_System_Net_Sockets_Socket_Poll_internal):
16719 Fix typo spotted by Robert Jordan in bug 79352 (though I can't
16720 reproduce the bug even before applying the fix.)
16722 Tue Oct 10 15:39:39 CEST 2006 Paolo Molaro <lupus@ximian.com>
16724 * reflection.c: allow retrieving attributes for arguments in generic
16725 methods (bug #79241).
16727 Tue Oct 10 11:45:50 CEST 2006 Paolo Molaro <lupus@ximian.com>
16729 * debug-mono-symfile.c: properly check fopen () result (found by
16732 Tue Oct 10 11:30:52 CEST 2006 Paolo Molaro <lupus@ximian.com>
16734 * reflection.c: make error message clearer and fixed two
16735 issuelets found by Coverity.
16737 2006-10-10 Zoltan Varga <vargaz@gmail.com>
16739 * object-internals.h: Remove duplicate definition of mono_method_get_signature_full ().
16741 Mon Oct 9 19:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
16743 * object-internals.h, gc-internal.h, profiler-private.h:
16744 mark internal functions.
16746 Mon Oct 9 19:28:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
16748 * reflection.c: put data in the text section.
16749 * icall.c: recognize more types in type_from_typename ().
16750 * process.c, marshal.c: added some GC FIXMEs.
16752 Mon Oct 9 19:27:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
16754 * loader.c: check for NULL before initializing.
16756 2006-10-09 Zoltan Varga <vargaz@gmail.com>
16758 * gc.c (finalizer_thread): Use a non-alertable wait here.
16760 * class.c loader.c metadata.c: Revert the mono_metadata_decode_table_... changes,
16761 until the correct solution is found.
16763 2006-10-06 Zoltan Varga <vargaz@gmail.com>
16765 * reflection.c (mono_module_get_object): Avoid an assert when operating on
16766 modules with no metadata. Fixes #79596.
16768 * image.c (load_metadata_ptrs): Put back the error message when
16769 the #- heap is encountered since the support is not complete yet.
16771 Fri Oct 6 16:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
16773 * gc.c: do not allow the user to SuppressFinalize () a
16774 delegate because it would leak the trampoline if present.
16776 2006-10-06 Zoltan Varga <vargaz@gmail.com>
16778 * class.c metadata.c row-indexes.h blob.h: Applied patch from Jb. Add support for the
16781 2006-10-05 Zoltan Varga <vargaz@gmail.com>
16783 * loader.c (mono_method_signature): Fix a use of MONO_TABLE_METHOD missed earlier.
16785 * metadata.c (mono_metadata_get_param_attrs): Ditto.
16787 * row-indexes.h: Add definitions for *Ptr tables.
16789 * metadata-internals.h (MonoImage): Add an 'uncompressed_metadata' flag.
16791 * metadata.c (mono_metadata_translate_token_index): New helper function to
16792 translate table indexes used in uncompressed metadata.
16793 (mono_metadata_decode_table_row): Ditto.
16794 (mono_metadata_decode_table_row_col): Ditto.
16796 * metadata.c: Add table schema for *Ptr tables.
16798 * class.c loader.c: Use the new helper function to access the affected metadata
16801 * image.c (load_metadata_ptrs): Allow assemblies with uncompressed metadata. Fixes
16804 2006-10-04 Zoltan Varga <vargaz@gmail.com>
16806 * marshal.c (emit_object_to_ptr_conv): Avoid using short branches around IL
16807 sequences which can be unbounded in size. Fixes #79583.
16809 2006-10-02 Zoltan Varga <vargaz@gmail.com>
16811 * object.c (mono_runtime_class_init): Handle a corner case in handling failure of
16812 static initialization.
16814 * domain-internals.h (MonoDomain): Add a 'type_init_exception_hash' field.
16816 * class-internals.h (MonoVTable): Add an 'init_failed' flag.
16818 * domain.c (mono_domain_free): Free up type_init_exception_hash.
16820 * object.c (mono_runtime_class_init): Implement correct semantics when a static
16821 ctor fails, i.e. throw the same exception on subsequent accesses.
16823 2006-09-0 Jonathan Chambers <joncham@gmail.com>
16825 * domain.c, class-internals.h: Added ComInteropProxy class to MonoDefaults.
16826 * marshal.c: Return correct unmanaged size for object when MarshalAs.Struct.
16827 Emit exception rather than crash in case of COM Callable Wrapper (not yet implemented).
16828 Handle marshalling of interfaces and VARIANTs contained in structs.
16830 Code is contributed under MIT/X11 license.
16832 2006-09-30 Zoltan Varga <vargaz@gmail.com>
16834 * marshal.c (emit_marshal_custom): Fix some corner cases. Fixes #79471.
16836 * marshal.c (mono_marshal_load_type_info): Allocate memory from the image
16839 2006-09-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16841 * console-io.c: ignore previous SIGINT handler.
16843 2006-09-27 Zoltan Varga <vargaz@gmail.com>
16845 * metadata.c class.c: Applied patch from Ricardo Fernandez Pascual
16846 (ricardo.fernandez@st.com). Add some new MonoClass and MonoType accessors. Fixes
16847 #79460, #79461, #79485.
16849 * class.c (mono_class_from_name_case): Fix incorrect comments. Fixes #79504.
16851 * marshal.c (mono_marshal_load_type_info): Fix a typo which caused an assert. Fixes
16854 2006-09-26 Zoltan Varga <vargaz@gmail.com>
16856 * marshal.c (mono_marshal_get_delegate_invoke): Tweak the IL a little so better code
16857 could be generated from it.
16859 Mon Sep 25 13:29:53 CEST 2006 Paolo Molaro <lupus@ximian.com>
16861 * rand.c: fix read loop to correctly handle EINTR.
16863 Mon Sep 25 11:33:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
16865 * Makefile.am, icall-def.h, icall.c, verify.c: changed the way
16866 internal calls are defined to keep methods closer to the declaring
16867 type and allow a significant reduction in runtime relocations and
16870 2006-09-21 Gert Driesen <drieseng@users.sourceforge.net>
16872 * appdomain.c: Pass NULL to mono_get_exception_file_not_found2 as
16873 exception message to have FileNotFoundException use the default
16874 assembly load error message. Fixes bug #79426.
16875 * exception.c: Support NULL msg in mono_get_exception_file_not_found2.
16877 2006-09-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16879 * threadpool.c: (start_thread_or_queue) use the root domain when
16880 creating the thread instead of the async object one.
16882 Thu Sep 21 19:30:04 CEST 2006 Paolo Molaro <lupus@ximian.com>
16884 * class.c, object.c, class-internals.h, reflection.c:
16885 for arrays, store element_size inside MonoClass (speedup
16886 for array object creation).
16888 Thu Sep 21 17:06:43 CEST 2006 Paolo Molaro <lupus@ximian.com>
16890 * icall.c: fixed CodeBase to use the file name and not the module
16893 Thu Sep 21 12:09:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
16895 * mono-debug.c, mono-debug.h: export find_method as
16896 mono_debug_find_method ().
16898 Wed Sep 20 19:59:06 CEST 2006 Paolo Molaro <lupus@ximian.com>
16900 * debug-helpers.c, class-internals.h: added a few functions useful
16901 when debugging under gdb.
16903 2006-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16905 * console-io.[ch]: trigger the ConsoleCancelEvent and retrieve
16906 characters that need special handling.
16908 Tue Sep 19 18:57:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
16910 * mono-config.c: make the os/cpu specification more flexible,
16911 allowing lists and negation.
16913 2006-09-18 Jonathan Chambers <joncham@gmail.com>
16915 * marshal.c: COM Interop fixes. Handle case where method->klass.
16916 is interface. Handle BSTR/MonoString when null. Use CDECL as
16917 calling convention on non-windows platforms. This is for
16918 compatibility with XPCOM and MainWin COM.
16920 Code is contributed under MIT/X11 license.
16923 2006-09-18 Zoltan Varga <vargaz@gmail.com>
16925 * marshal.c (mono_marshal_load_type_info): Handle concurrent and recursive calls
16926 correctly. Fixes #79217.
16928 * class-internals.h (MonoClass): Remove unused marshal_info_init_pending field.
16930 Mon Sep 18 16:59:54 CEST 2006 Paolo Molaro <lupus@ximian.com>
16932 * mono-config.c: allow both an os and cpu attribute for dllmap
16933 and dllentry elemnets to enable a single config file to be used
16934 for multiple architectures.
16936 2006-09-18 Gert Driesen <drieseng@users.sourceforge.net>
16938 * loader.c: MonoLoaderError was cleared too soon on load failure.
16941 Mon Sep 18 15:37:13 CEST 2006 Paolo Molaro <lupus@ximian.com>
16943 * icall.c: use the defining class vtable when accessing a
16944 static field, not a pobblibly derived class.
16946 2006-09-17 Zoltan Varga <vargaz@gmail.com>
16948 * icall.c string-icalls.c: Remove references to unicode.h.
16950 * unicode.h unicode.c Makefile.am: Remove these unused source files.
16952 * NOTES: Moved to ../../docs and renamed to thread-safety.txt.
16954 * marshal.c (mono_marshal_emit_native_wrapper): Add an 'image' argument,
16955 indicating the image where custom marshaller types should be looked up.
16956 (mono_ftnptr_to_delegate): Use the image of the delegate type to look up
16957 custom marshallers, instead of corlib. Fixes #79425.
16959 2006-09-14 Zoltan Varga <vargaz@gmail.com>
16961 * marshal.c (emit_marshal_object): Fix marshalling of blittable classes and null.
16963 2006-09-14 Jonathan Chambers <joncham@gmail.com>
16965 * environment.c (ves_icall_System_Environment_get_ProcessorCount):
16966 Implement Environment.ProcessorCount.
16968 * environment.h (ves_icall_System_Environment_get_ProcessorCount):
16969 Implement Environment.ProcessorCount.
16972 Add Environment.ProcessorCount icall.
16974 Patch by Jason McFall.
16976 2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16978 * assembly.c: don't append .exe/.dll when the filename already contains
16979 one of those extensions.
16981 2006-09-12 Martin Baulig <martin@ximian.com>
16983 * class.c (mono_bounded_array_class_get): Also add `IList<object>'
16984 to array interfaces.
16986 2006-09-11 Martin Baulig <martin@ximian.com>
16988 * reflection.c (mono_image_build_metadata): Create the
16989 MethodImpl's after emitting all types and methods, so we don't
16990 need another fixup pass for them.
16992 2006-09-11 Zoltan Varga <vargaz@gmail.com>
16994 * class.c (mono_class_from_name_case): Fix regression introduced by the last
16997 Mon Sep 11 12:57:15 CEST 2006 Paolo Molaro <lupus@ximian.com>
16999 * gc-internal.h, appdomain.c, gc.c: force-destroy GC handles on domain
17002 2006-09-10 Zoltan Varga <vargaz@gmail.com>
17004 * object.c (mono_method_return_message_restore): Avoid a crash if one of the out
17005 args is not set. Fixes #78926.
17007 2006-09-08 Zoltan Varga <vargaz@gmail.com>
17009 * class.c (mono_class_init): Init class->no_special_static_fields from the cached info.
17011 * image.c (load_class_names): Move this to class.c, and rename it to
17012 'mono_image_init_name_cache'.
17013 (load_modules): Fix a warning.
17015 * class.c icall.c image.c: Initialize image->name_cache lazily.
17017 * class-internals.h (MonoGetClassFromName): New hook function to find a class based
17018 on its name using information in the AOT file.
17020 * class.c (mono_class_from_name): Use the new hook function.
17022 2006-09-06 Zoltan Varga <vargaz@gmail.com>
17024 * reflection.c (mono_param_get_objects): Handle enum default parameter values
17027 * marshal.c (emit_marshal_object): Implement [In, Out] byval marshalling of classes.
17030 2006-09-06 Martin Baulig <martin@ximian.com>
17032 * icall.c (mono_lookup_internal_call): Small fix.
17034 2006-09-05 Raja R Harinath <rharinath@novell.com>
17036 * debug-mono-symfile.c (mono_debug_open_mono_symbols): Remove
17039 2006-09-04 Sebastien Pouliot <sebastien@ximian.com>
17041 * debug-mono-symfile.c: Fix *some* memory leaks that happens only
17042 when --debug is specified.
17044 2006-09-04 Zoltan Varga <vargaz@gmail.com>
17046 * class.c (setup_generic_array_ifaces): Fix a warning.
17048 2006-09-04 Miguel de Icaza <miguel@novell.com>
17050 * Temporarily remove the patch to assemly.c that checks the
17051 assembly versions as it breaks our gacutil.
17053 2006-09-03 Zoltan Varga <vargaz@gmail.com>
17055 * metadata.c (mono_metadata_parse_mh_full): Fix an invalid free.
17057 * assembly.c (mono_assembly_load_from_full): Avoid loading net 2.0 assemblies into
17060 * marshal.c (mono_string_builder_to_utf8): Fix marshalling of StringBuilders
17061 created using the default ctor. Fixes #79152.
17062 (mono_string_builder_to_utf16): Ditto.
17064 2006-09-01 Martin Baulig <martin@ximian.com>
17066 Fix handling of the generic array interfaces.
17068 * class-internals.h
17069 (MonoDefaults): Removed `generic_array_class' and added
17070 `generic_ilist' class.
17073 (mono_bounded_array_class_get): Add the new generic array interfaces.
17074 (setup_generic_array_ifaces): New static method; create vtable
17075 entries for each method in the generic array interfaces.
17078 (select_container): Allow "parent-less" generic methods.
17081 (mono_marshal_get_generic_array_helper): New public method.
17084 (ves_icall_System_Array_InternalArray_GetGenericValueImpl):
17085 Renamed into ves_icall_System_Array_GetGenericValueImpl() and
17086 moved the interncall into System.Array.
17088 2006-09-01 Raja R Harinath <rharinath@novell.com>
17090 A few more cases of avoiding work on types with ->byref set.
17091 Has the real fix for #79238
17092 * icall.c (is_generic_parameter): New helper.
17093 (ves_icall_Type_GetGenericParameterPosition): Use it.
17094 (ves_icall_Type_GetGenericParameterAttributes): Likewise.
17095 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
17096 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
17097 (ves_icall_Type_GetGenericTypeDefinition_impl): Return NULL on
17099 (ves_icall_Type_get_IsGenericTypeDefinition): Return FALSE on
17101 (ves_icall_Type_get_IsGenericInstance): Likewise.
17102 (ves_icall_Type_get_IsGenericType): Likewise.
17104 2006-09-01 Zoltan Varga <vargaz@gmail.com>
17106 * class.c (mono_class_setup_vtable_general): Share identical vtables with the parent
17109 * mempool.h (mono_mempool_get_allocated): New helper function.
17111 * object.c (mono_class_create_runtime_vtable): Fix problem introduced by last
17114 * mempool.c: Fix warnings and the calculation of stats.
17116 * object.c (mono_class_create_runtime_vtable): Fix the AOT optimization.
17118 * class.c (mono_class_setup_vtable): Update generic_vtable_count stat.
17120 * loader.c (mono_get_method_from_token): Update method_count stat.
17122 * class-internals.h (MonoStats): Add some stats.
17124 2006-08-31 Robert Jordan <robertj@gmx.net>
17126 * icall.c: Replace the PtrToStringAuto, StringToHGlobalAuto icalls
17127 with managed variants.
17128 All code is contributed under the MIT/X11 license.
17130 2006-08-31 Zoltan Varga <vargaz@gmail.com>
17132 * reflection.c (reflection_methodbuilder_to_mono_method): Set
17133 method->skip_visibility based up the skipVisibility parameter of DynamicMethods.
17135 * class-internals.h (MonoMethod): Add a 'skip_visibility' field.
17137 * marshal.c (mono_marshal_load_type_info): Revert the last change as it can't cope
17138 with cycles in classes.
17140 * icall.c (ves_icall_MonoType_get_Name): Add a '&' for byref types. Fixes #79110.
17142 * marshal.c (emit_marshal_array): Avoid crash when a parameter with type array is
17143 missing a [MarshalAs] directive. Fixes #79203.
17145 * marshal.c (mono_marshal_load_type_info): Fix a race in initializing
17146 klass->marshal_info. Fixes #79217.
17148 2006-08-30 Martin Baulig <martin@ximian.com>
17150 Committing a patch from Joachim Ante <joe@otee.dk>:
17151 Add support for binary data symbol stores.
17153 * debug-mono-symfile.c
17154 (mono_debug_open_mono_symbol_file): Renamed into
17155 mono_debug_open_mono_symbols() and added `raw_contents' and `size'
17159 (mono_debug_open_image): Added `raw_contents' and `size' args.
17160 (mono_debug_init_2_memory): New public function.
17162 Fri Aug 25 18:25:23 CEST 2006 Paolo Molaro <lupus@ximian.com>
17164 * icall.c: handle TypedReference in GetTypeCode (bug #79150).
17166 2006-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17168 * appdomain.c: implement support for ShadowCopyFiles.
17170 2006-08-22 Sebastien Pouliot <sebastien@ximian.com>
17172 * string-icalls.c: Add shortcut in ves_icall_System_String_ctor_charp
17173 when value is NULL (and should remove CID #51).
17175 2006-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17177 * image.c: moved 2 functions to ../utils.
17179 Tue Aug 22 15:53:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
17181 * gc.c: cope with the target object of a GC handle being NULL
17184 Tue Aug 22 11:10:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
17186 * class.c: recursively check parent's explicit implementations
17187 of interface methods (fixes bug #79125).
17189 2006-08-19 Miguel de Icaza <miguel@novell.com>
17191 * filewatcher.c: Avoid warnings when building, do not redefine
17192 constants that are defined.
17196 2006-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17198 * image.c: don't fail when the link points to an absolute path.
17200 2006-08-18 Sebastien Pouliot <sebastien@ximian.com>
17202 * decimal.c: Remove dead code (unrequired check) in mono_decimalIncr.
17205 2006-08-17 Miguel de Icaza <miguel@novell.com>
17207 * image.c (full_path): A new method used to obtain the actual path
17208 of an assembly even in the presence of symbolic links.
17210 This is necessary for the case where we are running a binary that
17211 has been GACed, but we are using the "published" path name
17212 ($prefix/mono/1.0/blah.exe) which happens to point to the real
17215 This was the source of the failure for the `xsp' command with the
17216 recent AppDomain changes, as far as the runtime was concerned,
17217 there were two different assemblies: $prefix/mono/1.0/blah.exe and
17218 $prefix/mono/gac/blah/version/blah.exe.
17220 (do_mono_image_open): use full path
17222 2006-08-17 Zoltan Varga <vargaz@gmail.com>
17224 * object.c (mono_class_create_runtime_vtable): Add a FIXME.
17226 2006-08-17 Sebastien Pouliot <sebastien@ximian.com>
17228 * marshal.c: Fix mono_marshal_check_domain_image if an invalid
17229 domain_id is supplied. Fix CID #241 and corlib's unit tests.
17231 2006-08-17 Zoltan Varga <vargaz@gmail.com>
17233 * class.c (mono_class_layout_fields): Set min_align to a bigger value for
17234 small structures. Fixes #78990.
17236 2006-08-17 Zoltan Varga <vargaz@gmail.com>
17238 * marshal.c (mono_marshal_get_xappdomain_invoke): Use the new helper functions here.
17240 * appdomain.c (ves_icall_System_AppDomain_createDomain): Fix a warning.
17242 2006-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17245 * marshal.c: don't load all the assemblies from a domain into newly
17246 created ones. The new domains might have different rules and load
17247 assemblies from different locations. Fixes bug #76757.
17249 Patch by Lluis. Conflicts resolved by Brian Crowell.
17251 2006-08-16 Alp Toker <alp@atoker.com>
17253 * socket-io.c: First half of the fix for #79084.
17254 Set sa_size to the length of the content, not that of the struct.
17255 Don't add NULL suffix to the content, this should be done in
17256 managed code if needed.
17258 2006-08-14 Raja R Harinath <rharinath@novell.com>
17261 * metadata.c (do_mono_metadata_parse_generic_class): Don't SEGV if
17262 mono_metadata_parse_type returns NULL.
17264 2006-08-13 Atsushi Enomoto <atsushi@ximian.com>
17266 * normalization-tables.h : new file for string normalization data.
17267 * locales.c, locales.h, icall.c :
17268 added load_normalization_resource() for string normalization,
17270 * Makefile.am : added normalization-tables.h to the sources.
17272 2006-08-13 Zoltan Varga <vargaz@gmail.com>
17274 * marshal.c: Add more helper functions to reduce code duplication and use them
17277 2006-08-12 Zoltan Varga <vargaz@gmail.com>
17279 * marshal.c: Fix non-x86 stdcall warnings.
17281 * marshal.c marshal.h: Add some helper functions to emit/patch branches, and use
17284 2006-08-11 Jonathan Chambers <joncham@gmail.com>
17286 * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
17287 type check on multi-dimensional arrays. Fixes #79000.
17289 2006-08-10 Jonathan Chambers <joncham@gmail.com>
17291 * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
17292 * object.c (mono_remote_class_vtable/mono_object_new_specific): Changed checks
17293 to use is_com_object instead of MONO_CLASS_IS_IMPORT() macro.
17294 * class-internals.h: add is_com_object to class structure.
17295 * marshal.c: Fixed marshalling for IDispatch and IUnknown, added
17296 null checks to COM object marshalling. Fix .ctor call on RCW.
17297 * icall.c: Added icall implementation for MonoType.IsCOMObjectImpl.
17299 All code is contributed under the MIT/X11 license.
17301 2006-08-09 Dick Porter <dick@ximian.com>
17303 * monitor.c (mono_monitor_cleanup): mono_monitor_cleanup() is
17304 racing mono_monitor_allocator_lock() somewhere, so don't delete
17305 the critical section for now. Found by running and exiting
17308 2006-08-10 Zoltan Varga <vargaz@gmail.com>
17310 * marshal.c (cominterop_get_native_wrapper): Fix a warning.
17311 (ves_icall_System_ComObject_FindInterface): Ditto.
17312 (ves_icall_System_ComObject_CacheInterface): Ditto.
17314 * metadata.c (do_mono_metadata_type_equal): Applied patch from Roberto Costa
17315 (roberto.costa@st.com). Add support for MONO_TYPE_FNPTR.
17317 2006-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17319 * threadpool.c: treat pipes from process asynchronous reads as sockets
17320 when reading from them, so we get select/poll or epoll to wait for
17323 2006-08-07 Sebastien Pouliot <sebatien@ximian.com>
17325 * loader.c: Fix a typo (CID #233) in the null check.
17327 2006-08-07 Zoltan Varga <vargaz@gmail.com>
17329 * appdomain.c (mono_domain_unload): Close the thread handle of the unload thread.
17330 Hopefully fixes #78949.
17332 * metadata.c (mono_metadata_parse_method_signature_full): Applied patch from
17333 Roberto Costa (roberto.costa@st.com). Handle vararg signatures without SENTINEL
17334 bytes. Fixes #78972.
17336 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17338 * filewatcher.c: we need to set errno here.
17340 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17342 * filewatcher.c: let Win32Exception get the error value.
17344 2006-08-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17346 * filewatcher.c: translate errno into win32 errors for Win32Exception
17347 to know what happened.
17349 2006-08-01 Zoltan Varga <vargaz@gmail.com>
17351 * threadpool.c: Fix more warnings.
17353 * assembly.c (search_loaded): Fix warnings.
17355 * threadpool.c (mono_thread_pool_finish): Fix warnings.
17356 (mono_async_invoke): Ditto.
17358 2006-07-28 Jonathan Chambers <joncham@gmail.com>
17360 * object.c (mono_remote_class_vtable): Need to create proxy vtable
17361 entries for __ComObject type in addition to ComImport types.
17362 * marshal.c: Added support for marshalling COM RCWs. Fixed warning
17365 All code is contributed under the MIT/X11 license.
17367 Fri Jul 28 19:04:34 CEST 2006 Paolo Molaro <lupus@ximian.com>
17369 * image.c: avoid tentative loading of modulerefs that contain
17370 no metadata (P/Invoke library names).
17372 2006-07-28 Dick Porter <dick@ximian.com>
17374 * loader.c (mono_loader_cleanup): mono_loader_cleanup() is racing
17375 mono_loader_lock() somewhere, so don't delete the critical section
17376 for now. Found by running and exiting monodevelop.
17378 2006-07-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17380 * filewatcher.c: define the inotify syscalls when we're building on
17381 linux and have sys/syscall.h. The build system might not have support
17382 for inotify but the target system might have it.
17384 2006-07-26 Miguel de Icaza <miguel@novell.com>
17386 * domain.c: Documentation updates.
17388 * loader.c (mono_free_method): Do not release the method
17389 information if we are being profiled, as profilers will use this
17390 information at shut down to present some data to the user.
17392 This is needed so that the profiler does not crash, as the
17393 profiler tends to keep MonoMethods around, and they might become
17394 invalid if we free these.
17396 (mono_get_method_constrained): Return the original CIL stream
17397 method as well, so verification can be performed against it.
17399 2006-07-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17401 * filewatcher.[ch]: support for inotify file system watcher.
17402 * icall.c: add new internal calls for the inotify file system watcher.
17404 2006-07-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17406 * threadpool.c: Windows also misbehaves on async. connects. Fixes bug
17409 2006-07-20 Dick Porter <dick@ximian.com>
17411 * file-io.c (ves_icall_System_IO_MonoIO_Seek): Fix signed/unsigned
17414 2006-07-20 Dick Porter <dick@ximian.com>
17416 * threads.c (start_wrapper): Do the thread cleanup while we still
17417 hold a reference to its object. Fixes bug 78123.
17419 2006-07-18 Kornél Pál <kornelpal@gmail.com>
17421 * class-internals.h: Added MONO_WRAPPER_MANAGED_TO_MANAGED wrapper type.
17422 * debug-helpers.c: Map MONO_WRAPPER_MANAGED_TO_MANAGED to
17423 "managed-to-managed".
17424 * icall.c: Redirect string constructors that take sbyte* to
17425 ves_icall_System_String_ctor_RedirectToCreateString.
17426 * marshal.c: Redirect ves_icall_System_String_ctor_RedirectToCreateString
17427 to CreateString () methods with matching signature.
17428 * reflection.c: Use original security informations for
17429 MONO_WRAPPER_MANAGED_TO_MANAGED.
17430 * security-manager.c: Use original security informations for
17431 MONO_WRAPPER_MANAGED_TO_MANAGED.
17432 * string-icalls.c: Added ves_icall_System_String_ctor_RedirectToCreateString
17433 that is a placeholder and only its address should be used.
17434 * string-icalls.h: Added ves_icall_System_String_ctor_RedirectToCreateString
17435 that is a placeholder and only its address should be used.
17437 2006-07-15 Jonathan Chambers <joncham@gmail.com>
17439 Begin implementing COM Interop.
17440 * appdomain.c: Increment corlib version.
17441 * class.c: Set ComImport classes' parent to __ComObject.
17442 * loader.c: Mark cominterop methods as such.
17443 * domain.c: Add __ComObject class to MonoDefaults structure.
17444 * image.c: Add 2 hashtables to the image for COM Interop related methods
17445 * metadata.c: Added mono_metadata_type_dup_mp to duplicate a type
17446 using the mempool allocator
17448 * metadata-internals.h: Add 2 hashtables to the image for COM Interop related methods
17449 * metadata.h: Added cominterop field to _MonoMethodSignature struct and
17450 declaration for mono_metadata_type_dup_mp.
17452 * debug-helpers.c: Added strings for two additional wrapper types
17453 * object.c: Create proxy objects for ComImport classes
17454 * class-internals.h: Define 2 new method wrapper types, COM Interop remoting target,
17455 and added __ComObject class to MonoDefaults structure.
17457 * object-internals.h: Finish MonoRealProxy definition, and add definition of
17458 MonoComInteropProxy and MonoComObject.
17460 * marshal.c: Added support for COM Interop
17461 (signature_cominterop): Converts managed signature to corresponding
17462 unmanaged COM signature.
17463 (cominterop_get_function_pointer): gets unmanaged function pointer via
17465 (cominterop_get_com_slot_for_method): returns vtable slot in COM interface of method
17466 (cominterop_get_method_interface): returns interface type that method is defined on
17467 (mono_mb_emit_cominterop_call): emits native call to function pointer
17469 (cominterop_get_native_wrapper_adjusted): actual wrapper around unmanaged COM call
17470 that matches signature of unmanaged function.
17471 (cominterop_get_native_wrapper): wrapper around adjusted method call.
17472 (cominterop_get_invoke): forwards call from proxy to __ComObject
17473 (ves_icall_System_Runtime_InteropServices_Marshal_AddRef): Implements Marshal.AddRef
17474 (ves_icall_System_Runtime_InteropServices_Marshal_QueryInterface): Implements Marshal.QueryInterface
17475 (ves_icall_System_Runtime_InteropServices_Marshal_Release): Implements Marshal.Release
17477 * marshal.h: Added Marshal icall declarations.
17478 * icall.c: Added __ComObject icalls. Need to store interfaces in unmanaged code
17479 so we can access them in finalizer
17481 2006-07-14 Dick Porter <dick@ximian.com>
17483 * object.c (mono_type_initialization_cleanup): Fix a race
17484 condition by temporarily commenting out the critical section
17487 2006-07-14 Zoltan Varga <vargaz@gmail.com>
17489 * reflection.c (create_custom_attr): Fix some warnings.
17490 (create_custom_attr_data): Ditto.
17491 (typebuilder_setup_properties): Save custom attrs for properties in dynamic
17492 types. Fixes #78855.
17494 2006-07-11 Zoltan Varga <vargaz@gmail.com>
17496 * class.c (mono_type_get_name_recurse): Fix the name of 1 dimensional non-szarrays.
17498 * reflection.c (mono_custom_attrs_free): Fix freeing of dynamic cattr info.
17500 2006-07-08 Zoltan Varga <vargaz@gmail.com>
17502 * reflection.c (resolve_object): Add support for DynamicMethod.
17504 * domain.c appdomain.c threads.c monitor.c object.c gc.c: Applied patch from
17505 Joachim Ante (joe@otee.dk). Fix some shutdown leaks.
17507 2006-07-06 Sebastien Pouliot <sebastien@ximian.com>
17509 * process.c: In ves_icall_System_Diagnostics_Process_GetModules_internal
17510 don't leak GPtrArray's pdata has we have no use (nor free) for it.
17512 2006-07-01 Zoltan Varga <vargaz@gmail.com>
17514 * marshal.c (mono_marshal_get_runtime_invoke): Fix passing of generic valuetypes.
17517 2006-06-30 Raja R Harinath <rharinath@novell.com>
17519 * icall.c (ves_icall_MonoMethod_get_base_definition): Simplify
17520 slightly: remove a shadow local variable.
17522 2006-06-29 Raja R Harinath <rharinath@novell.com>
17524 * icall.c (ves_icall_MonoMethod_get_base_definition): Return the
17525 definition that introduces the virtual function slot.
17526 Also fix Coverity #105.
17528 2006-06-29 Zoltan Varga <vargaz@gmail.com>
17530 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Fix support
17531 for dynamic assemblies. Fixes #78724.
17533 2006-06-28 Zoltan Varga <vargaz@gmail.com>
17535 * marshal.c (mono_string_to_byvalwstr): Fix this completely broken function.
17538 2006-06-21 Martin Baulig <martin@ximian.com>
17541 (method_encode_clauses): Don't assert on `ex_info->handlers' here;
17544 2006-06-21 Zoltan Varga <vargaz@gmail.com>
17546 * object.h (mono_array_setref): Cast value to (MonoObject*) to fix warnings.
17548 2006-06-20 Raja R Harinath <rharinath@novell.com>
17550 Make 'mono_class_get_full' only inflate TYPESPECs, not TYPEDEFs
17552 * class.c (mono_class_create_from_typespec): Add 'context' argument.
17553 Inflate result if necessary.
17554 (mono_class_get_full): Remove old version. Rename from
17555 'mono_class_get' and add 'context' argument. Pass it to
17556 ..._create_from_typespec.
17557 (mono_class_get): New. Simple wrapper to mono_class_get_full.
17558 (mono_ldtoken): Revert change below.
17560 2006-06-20 Martin Baulig <martin@ximian.com>
17562 * class.c (mono_ldtoken): Don't pass the generic context to
17563 mono_class_get_full() for MONO_TOKEN_TYPE_DEF/REF. Fixes #78053.
17565 2006-06-15 Zoltan Varga <vargaz@gmail.com>
17567 * marshal.c (mono_ftnptr_to_delegate): Avoid allocating signature from mempool
17568 and later freeing it. Fixes #78638.
17570 2006-06-15 Miguel de Icaza <miguel@novell.com>
17572 * icall.c (mono_class_get_throw): Revert over-zealous error
17573 throwing, the caller for mono_class_get_throw will cope with
17574 errors when classes are not properly initialized already.
17576 The code still copes with loader exceptions though.
17578 Fixes the regression in reftype1 and reftype3 from the CAS tests.
17580 2006-06-14 Miguel de Icaza <miguel@novell.com>
17582 Fixes the `make run1' version of RuntimeAbort (to be commited,
17583 source is in Bugzilla).
17585 * metadata.c (mono_metadata_interfaces_from_typedef_full): Return
17586 FALSE on class loading failure instead of returning true.
17588 * class.c (mono_class_create_from_typedef): It is possible for
17589 mono_metadata_interfaces_from_typedef_full to fail if a class is
17590 not found, cope with this.
17593 2006-06-14 Dick Porter <dick@ximian.com>
17596 * process.c: Fix a bunch of signed/unsigned warnings from gcc
17599 2006-06-12 Atsushi Enomoto <atsushi@ximian.com>
17601 * culture-info-table.h : oops, forgot to make it nsync with r61548.
17603 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
17605 * icall.c: Another fix for building mono in Visual Studio.
17607 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
17609 * marshal.c icall.c: Minor fixes for building mono in Visual Studio.
17611 2006-06-09 Martin Baulig <martin@ximian.com>
17613 * debug-mono-symfile.c: Put this back and really fix it this
17614 time. Sorry for all the trouble.
17616 2006-06-08 Zoltan Varga <vargaz@gmail.com>
17618 * icall.c (mono_class_get_throw): Fix a warning.
17619 (ves_icall_System_Reflection_Assembly_GetTypes): Allways throw
17620 ReflectionTypeLoadException if needed. Fixes #78606.
17622 * class.c (mono_class_setup_vtable_general): Handle loader errors a bit better.
17623 (mono_class_init): Ditto.
17625 * loader.c (mono_loader_set_error_assembly_load): Display a separate warning for
17626 ref_only exceptions.
17627 (mono_loader_clear_error): Make this work even if there is no error.
17629 2006-06-08 Jonathan Chambers <jonathan.chambers@ansys.com>
17631 * object-internals.h marshal.c marshal.h icall.c: Implement method
17632 Marshal.GetComSlotForMethodInfo using internal call.
17634 2006-06-07 Zoltan Varga <vargaz@gmail.com>
17636 * class-internals.h: Add a new kind of loader error LOADER_ERROR_ASSEMBLY plus
17637 a function for signalling it.
17639 * class.c (mono_class_from_typeref): Use the new kind of loader error when
17640 a referenced assembly is not found.
17642 * loader.c (mono_loader_error_prepare_exception): Add support for
17643 LOADER_ERROR_ASSEMBLY. Fix formatting.
17645 2006-06-05 Jonathan Chambers <jonathan.chambers@ansys.com>
17647 * domain.c appdomain.c class-internals.h marshal.c: Add support
17648 for VARIANT marshalling on windows and increment corlib version
17649 since Variant struct was added.
17651 2006-06-03 Miguel de Icaza <miguel@novell.com>
17653 * debug-mono-symfile.c: Revert Martin's previous patch which broke
17654 stack trace line information:
17656 (Martin) (mono_debug_symfile_lookup_location): Fix the algorithm:
17657 (Martin) when looking up B which is between A and C, return A not C.
17661 Thanks to Alexander Olk for tracking this down.
17663 2006-06-02 Zoltan Varga <vargaz@gmail.com>
17665 * marshal.c (mono_marshal_set_last_error_windows): Fix build.
17667 * marshal.c (mono_marshal_emit_native_wrapper): Call GetLastError () early and without a wrapper to
17668 avoid clobbering its value.
17669 (mono_string_to_lpstr): Fix a warning on windows.
17671 2006-05-31 Zoltan Varga <vargaz@gmail.com>
17673 * class-internals.h (MonoClass): Removed obsolete 'dummy' flag.
17675 * reflection.c loader.c: Removed references to 'dummy' flag.
17677 * loader.c (mono_loader_error_prepare_exception): Fix a warning.
17679 * threadpool.c: Make ASyncCall a copy of the managed MonoAsyncCall class so
17680 it gets GC tracking.
17682 * object-internals.h (MonoAsyncResult): Add an 'object_data' field which has
17685 * object.c (mono_async_result_new): Add an additional parameter 'object_data'.
17687 * marshal.c threadpool.c: Update callers of mono_async_result_new.
17689 * appdomain.c: Bump corlib version.
17691 2006-05-30 Zoltan Varga <vargaz@gmail.com>
17693 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
17694 CEE_STIND_REF when working with object references.
17696 2006-05-31 Zoltan Varga <vargaz@gmail.com>
17698 * class.c (mono_class_setup_fields): Call mono_class_init () for class->parent.
17701 2006-05-30 Miguel de Icaza <miguel@novell.com>
17703 * loader.c (method_from_memberref): Fix argument value for
17704 mono_loader_set_error_method_load (I was passing the MonoClass
17705 instead of the class name char *).
17707 2006-05-30 Zoltan Varga <vargaz@gmail.com>
17709 * marshal.c: Use mono_mb_emit_stloc in more places. Use CEE_LDIND_REF and
17710 CEE_STIND_REF when working with object references.
17712 2006-05-30 Martin Baulig <martin@ximian.com>
17714 * mono-debug.c (mono_debug_print_stack_frame): Reverted the
17715 mono_method_full_name() change and replace the ':' with a '.'
17718 2006-05-30 Martin Baulig <martin@ximian.com>
17720 * debug-mono-symfile.c
17721 (mono_debug_symfile_lookup_location): Fix the algorithm:
17722 when looking up B which is between A and C, return A not C.
17724 2006-05-29 Martin Baulig <martin@ximian.com>
17727 (MonoDebugMethodInfo): Make the typedef public.
17728 (MonoDebugSourceLocation): New public struct.
17731 (mono_debug_source_location_from_address): Removed.
17732 (mono_debug_source_location_from_il_offset): Removed.
17733 (mono_debug_il_offset_from_address): Removed.
17734 (mono_debug_address_from_il_offset): Removed.
17735 (mono_debug_lookup_method): New public function.
17736 (mono_debug_lookup_source_location): New public function; replaces
17737 the old mono_debug_source_location_from_*() functions; see the
17738 inline documentation.
17739 (mono_debug_free_source_location): New public function.
17740 (mono_debug_print_stack_frame): New public function; see the
17741 inline documentation.
17743 * debug-mono-symfile.c
17744 (mono_debug_find_source_location): Renamed into
17745 mono_debug_symfile_lookup_location(); only take a
17746 `MonoDebugMethodInfo *' and an `offset' argument; added inline
17748 (mono_debug_find_method): Renamed into
17749 mono_debug_symfile_lookup_method().
17751 2006-05-27 Zoltan Varga <vargaz@gmail.com>
17753 * assembly.c (mono_assembly_open_full): Dont overwrite the status
17754 returned by mono_image_open_full ().
17756 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Convert
17757 MONO_IMAGE_IMAGE_INVALID into a BadImageFormatException. Fixes
17760 * object.c (compute_class_bitmap): Use class->class_size for static fields. Fixes
17763 2006-05-27 Miguel de Icaza <miguel@novell.com>
17765 * class.c (mono_class_from_typeref): handle missing images
17766 earlier, deals with bug #78418. Refactor code;
17768 Fix a warning introduced in my previous commit (some stale code
17769 from before I revisited my patch).
17771 * class.c (mono_class_create_from_typedef): On failure, remove the
17772 class from the MonoImage->class_cache as the class is not
17773 initialized; Fixes the leak pointed out by Paolo.
17775 2006-05-25 Dick Porter <dick@ximian.com>
17777 * threads.c (mono_thread_cleanup): Build fix. Comment out the
17778 DeleteCriticalSections until I figure out which one may still be
17779 sometimes locked when mono_thread_cleanup is called.
17781 2006-05-24 Dick Porter <dick@ximian.com>
17783 * threads.c (mono_thread_cleanup): Move the threading cleanup out
17784 of mono_thread_manage and back into its own function, so it can be
17785 called after the finalizer thread has finished.
17787 * appdomain.c (mono_runtime_cleanup): Call mono_thread_cleanup
17789 2006-05-24 Zoltan Varga <vargaz@gmail.com>
17791 * assembly.c (mono_assembly_open_full): Fix typo introduced by a previous change.
17794 * marshal.c (emit_ptr_to_object_conv): Implement marshalling of byval arrays
17795 with non-blittable elements.
17796 (emit_object_to_ptr_conv): Ditto. Fixes #78492.
17798 2006-05-24 Martin Baulig <martin@ximian.com>
17800 * mono-debug-debugger.h (MonoDebuggerEvent): Added
17801 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE'.
17803 * mono-debug-debugger.c (mono_debugger_cleanup): Send a
17804 `MONO_DEBUGGER_EVENT_FINALIZE_MANAGED_CODE' and then set
17805 `mono_debugger_event_handler' to NULL.
17807 2006-05-24 Martin Baulig <martin@ximian.com>
17809 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 57.
17811 2006-05-24 Martin Baulig <martin@ximian.com>
17813 * mono-debug-debugger.h
17814 (mono_debugger_create_notification_function): Added
17815 `MonoCodeManager *' argument.
17817 Tue May 23 16:05:47 CEST 2006 Paolo Molaro <lupus@ximian.com>
17819 * boehm-gc.c, null-gc.c: fix compilation on 64 bit systems.
17821 Tue May 23 13:44:11 CEST 2006 Paolo Molaro <lupus@ximian.com>
17823 * Makefile.am, gc-internal.h, reflection.c: updates for the new GC.
17824 * sgen.-gc.c, sgen-gc.h: simple generational compacting GC
17827 Tue May 23 13:40:30 CEST 2006 Paolo Molaro <lupus@ximian.com>
17829 * icall.c: precise GC support: objects can't be stored in unmanaged
17830 memory anymore, even if they are kept alive by other references: since
17831 they can move the GC needs to be able to always find them.
17833 Tue May 23 12:57:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
17835 * object.c: precise GC support for static fields. Support
17836 for moving GCs: write barriers and pinned allocation for interned
17839 Tue May 23 12:41:44 CEST 2006 Paolo Molaro <lupus@ximian.com>
17841 * domain.c, domain-internals.h: precise GC support for the MonoDomain
17844 Tue May 23 12:38:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
17846 * class.c, gc.c: sgen and precise GC updates.
17848 Tue May 23 12:33:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
17850 * marshal.h, marshal.c: added write barrier wrapper and precise type
17853 Tue May 23 12:31:22 CEST 2006 Paolo Molaro <lupus@ximian.com>
17855 * object.h, null-gc.c, boehm-gc.c: more write barrier functions and
17858 Tue May 23 12:27:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
17860 * reflection.c: precise and sgen GC updates.
17862 Tue May 23 12:21:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
17864 * debug-helpers.c, class-internals.h: added write barrier wrapper type.
17866 2006-05-22 Zoltan Varga <vargaz@gmail.com>
17868 * threads.c (start_wrapper): Fix a missed guint32 tid declaration.
17870 2006-05-20 Zoltan Varga <vargaz@gmail.com>
17872 * reflection.c (encode_cattr_value): Fix yet another bug in the encoding of
17873 MONO_TYPE_OBJECT. Fixes #78462.
17875 2006-05-18 Zoltan Varga <vargaz@gmail.com>
17877 * marshal.c (emit_marshal_vtype): Add support for UnmanagedType.LPStruct
17878 and blittable types.
17880 2006-05-17 Miguel de Icaza <miguel@novell.com>
17882 * class.c (mono_class_get_exception_for_failure): Implement parts
17883 of a TODO: if the loader error is set (instead of the class
17884 error), we return a Loader exception that can be properly thrown
17887 This was exposed by some Winforms 2.0 code that I tried to run
17888 (Atsushi pointed me to it).
17890 2006-05-17 Zoltan Varga <vargaz@gmail.com>
17892 * marshal.c (mono_marshal_emit_native_wrapper): Make the marshalling code more
17893 uniform by moving stuff from this function to the proper emit_marshal_XXX functions.
17895 * marshal.c (emit_marshal_vtype): Add limited support for
17896 UnmanagedType.LPStruct. Fixes #78427.
17898 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure):
17899 Applied a patch from kangaroo to fix #77523.
17901 2006-05-17 Martin Baulig <martin@ximian.com>
17904 (debugger_thread_vtable): Moved into ../mini/debug-debugger.c.
17905 (debugger_thread_created): Removed.
17906 (debugger_thread_exited): Removed.
17908 2006-05-15 Zoltan Varga <vargaz@gmail.com>
17910 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
17912 * object-internals.h (MonoReflectionResource): Sync with managed version.
17914 2006-05-12 Wade Berrier <wberrier@novell.com>
17916 * threads.c: Define G_GSIZE_FORMAT for systems with glib < 2.6
17918 2006-05-12 Zoltan Varga <vargaz@gmail.com>
17920 * class.c (mono_fnptr_class_get): Set class->image to corlib for now, since other
17921 functions try to allocate from the image mempool.
17923 2006-05-12 Dick Porter <dick@ximian.com>
17925 * threads.c (mono_thread_attach): Fix usage of GetCurrentThread().
17927 2006-05-12 Lluis Sanchez <lluis@ximian.com>
17929 * object.c: The FieldGetter and FieldSetter methods require the full
17930 name of the class, not only the name. Fixes bug #78277.
17932 2006-05-11 Miguel de Icaza <miguel@novell.com>
17934 * loader.c (method_from_memberref): Do not pass the NULL klass to
17935 mono_loader_set_error_() methods. Pass the non-NULL value
17938 2006-05-11 Zoltan Varga <vargaz@gmail.com>
17940 * assembly.c (mono_assembly_load_from_full): Fix a bunch of warnings.
17941 (mono_assembly_close): Null out assembly->image->references after freeing it.
17943 * image.c (mono_image_close): Free image->references.
17945 * reflection.c (mono_image_basic_init): Fix a small memory leak.
17947 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
17949 * marshal.c: In function mono_mb_add_local don't use the mb pointer
17950 before checking if it's NULL (g_assert).
17952 2006-05-10 Martin Baulig <martin@ximian.com>
17954 * metadata.c (mono_type_size): Kill the g_assert() in MONO_TYPE_GENERICINST;
17955 I thought I already killed that two months ago, but now it somehow reappeared.
17957 2006-05-10 Martin Baulig <martin@ximian.com>
17959 * mono-debug.c (mono_debug_add_method): Allow instantiated generic methods.
17961 2006-05-10 Zoltan Varga <vargaz@gmail.com>
17963 * reflection.c: Allocate memory for dynamically created methods in the image
17966 2006-05-10 Sebastien Pouliot <sebastien@ximian.com>
17968 * appdomain.c: In ves_icall_System_AppDomain_[Get|Set]Data functions,
17969 don't use the ad pointer before checking if it's NULL (g_assert).
17971 2006-05-09 Zoltan Varga <vargaz@gmail.com>
17973 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Remove
17974 a redundant (and incorrect) addref. Hopefully fixes sn.exe on windows.
17976 * marshal.c: Allocate all signatures from mempools.
17978 * marshal.c: Allocate some more signatures from mempools.
17980 2006-05-09 Miguel de Icaza <miguel@novell.com>
17982 * object.c (mono_load_remote_field): The code used to provide a
17983 temporary variable for returning results if the user did not
17984 provide a result pointer. But our temporary variable was allocted
17987 Fix calling code to always pass a result area. Coverity ID 103.
17989 2006-05-06 Zoltan Varga <vargaz@gmail.com>
17991 * threads.c (ves_icall_System_Threading_Interlocked_Add_Int): Return the new
17992 value, not the old. Fixes #78312.
17993 (ves_icall_System_Threading_Interlocked_Add_Long): Ditto.
17995 * class.c (mono_bounded_array_class_get): Allocate data from the image mempool.
17996 (mono_ptr_class_get): Ditto. Also change the cache from a global one to a
17999 * assembly.c (mono_assembly_close): Free image->references.
18001 * assembly.c (mono_assembly_names_equal): Fix a warning.
18002 (mono_assemblies_cleanup): Cleanup more global data.
18004 * metadata-internals.h (MonoImage): Add 'ptr_cache'.
18006 * image.c (mono_image_close): Free up the contents of 'array_cache', free up
18007 ptr_cache and image->modules.
18009 * image.c (mono_image_init): Allocate array_cache lazily.
18011 2006-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18013 * assembly.c: use GetCurrentThreadId for the hash, as GetCurrentThread
18014 behavior was changed recently and has bad side effects.
18016 2006-05-05 Zoltan Varga <vargaz@gmail.com>
18018 * assembly.c (mono_assembly_open_full): Add a missing mono_image_close ().
18020 * assembly.c (mono_assembly_close): Remove a debug printf.
18022 * profiler.c (create_profiler): Use mono_aligned_addr_hash.
18024 * metadata-internals.h image.c assembly.c: Change the reference counting scheme
18025 to also allow for temporary references between mono_image_open ()/close ().
18027 * domain.c (get_runtimes_from_exe): Add a FIXME.
18029 2006-05-04 Zoltan Varga <vargaz@gmail.com>
18031 * marshal.c: Fix support for dynamic methods.
18033 * appdomain.c (mono_runtime_cleanup): Call mono_marshal_cleanup ().
18035 * marshal.c (mono_marshal_cleanup): New cleanup function.
18037 * marshal.c: Rewrite the wrapper code to allocate most of its memory from the
18040 * class.c (mono_class_init): Fix leaking class->nested_classes.
18042 * metadata-internals.h (MonoImage): Add a couple of new wrapper caches.
18044 * image.c (mono_image_init): Initialize the new cashes.
18046 * image.c (mono_image_close): Destroy the new cashes.
18048 * marshal.c: Get rid of most of the static caches in favor of per-image caches.
18050 * mempool.c (mono_mempool_strdup): New helper function.
18052 * class-internals.h: Add prototype for mono_loader_unlock ().
18054 * domain.c (mono_jit_info_table_find): Fix a warning.
18055 (mono_debugger_check_runtime_version): Ditto.
18057 * rawbuffer.h rawbuffer.c metadata-internals.h metadata.c class-internals.h
18058 class.c loader.c image.h image.c assembly.h assembly.c: Add init () and cleanup ()
18059 functions to these modules.
18061 * domain-internals.h domain (mono_cleanup): New internal method to cleanup most
18064 * marshal.c (mono_free_bstr): Fix a warning.
18066 * assembly.c (mono_assembly_open_full): Fix another small leak.
18068 * object.c: Fix some unload leaks in the remoting code.
18070 * object-internals.h object-internal.c (mono_string_to_utf8_mp): New helper
18073 * assembly.c (mono_assembly_close): Fix a leak when unloading dynamic assemblies.
18075 * reflection.c: Fix some unload leaks in dynamic assemblies.
18077 2006-05-02 Jonathan Chambers <jonathan.chambers@ansys.com>
18079 * marshal.c: Add BSTR support on Win32 (all changes under MIT X11)
18080 * marshal.h: Add BSTR support on Win32
18081 * icall.c: Add BSTR icalls
18082 * metadata.h: Add BSTR enums
18084 2006-04-28 Miguel de Icaza <miguel@novell.com>
18086 Work to catch the crash from #76795 and turn it into an
18087 exception. As I stubbed out pieces of the VisualBasic support,
18088 I found a number of places where the code was failing and I added
18089 checks to those places.
18091 * metadata.c (do_mono_metadata_parse_generic_class): Make this
18092 function return a status code. If we fail to parse the signature
18093 from mono_metadata_parse_generic_inst, return FALSE.
18095 * loader.c (mono_get_method_from_token): If we fail to load the
18096 method (mono_class_get) return NULL.
18098 * (method_from_memberref): Return NULL if we are unable to parse
18099 the method signature
18101 (mono_loader_error_prepare_exception): Since we now use the
18102 loader_error flag internally to stop processing, and obtaining
18103 exceptions that might be thrown will walk this code path the
18104 proper way of going from a MonoLoaderError into a
18105 MonoException was convoluted. This new routine encapsulates the
18106 process of turning the error into an exception and *clearing* the
18109 2006-04-27 Miguel de Icaza <miguel@novell.com>
18111 Work to catch the crashes from 75075 (cope in Assembly.GetTypes
18112 with missing assemblies), and to cope with:
18114 * Missing fieldref from a non-existing assembly.
18115 * Missing methodref from a non-existing assembly.
18117 The first batch of work to address *some* of the issues from 76661.
18119 * object.c (mono_class_create_runtime_vtable): If we fail to
18120 initialize the class raise the exception here.
18122 * metadata.c (mono_class_get_overrides_full): If any methods fail
18123 to load return the failure to the caller.
18125 * assembly.c: Use REFERENCE_MISSING instead of (gpointer) -1 for
18126 flagging assemblies that failed to load.
18128 Do not crash if we are unable to load the assembly.
18130 (mono_assembly_close): Do nothing with REFERENCE_MISSING
18133 * loader.c (mono_loader_set_error_type_load): Change the
18134 convention to always pass unallocated strings, so we make our own
18135 copies (I know our own code had duplicated strings before, but
18136 this keeps the normal conventions).
18137 (method_from_memberref): Call mono_loader_set_error_method_load
18138 for all possible failures of loading the class.
18139 Remove assert, turn into a loader error.
18141 (mono_loader_error_to_exception): Move this routine from mini
18142 (mini_loader_error_to_exception) there was no need to have that in
18145 * class.c (mono_class_from_typeref): If we were not able to load
18146 the assembly with mono_assembly_load_reference, call the
18147 mono_loader_set_error_type_load to register the problem.
18149 (mono_class_setup_fields): If we fail to load the type from
18150 mono_metadata_parse_type_full, call mono_class_set_failure and
18151 break from the loop.
18153 If class->exception_type is set, we do not layout the fields as
18154 that might crash the runtime, and instead return (from breaking
18155 from the previous loop).
18157 (mono_class_setup_vtable): This now returns a boolean indicating
18158 whether the table was properly setup. The decision is driven by
18159 mono_class_get_overrides_full which might run into non-existing
18162 (mono_class_init): Returns TRUE on success or FALSE if there was a
18163 problem in loading the type (incorrect assemblies, missing
18164 assemblies, methods, etc).
18166 When we call mono_class_setup_fields we also check for a potential
18167 error inside this call (either a class exception or a general
18170 (mono_class_create_from_typedef): If the parent fails to load
18171 (calling mono_class_get_full) return NULL.
18175 calls to mono_metadata_parse_type_full should be checked
18176 everywhere and set the mono_class_set_failure
18177 (MONO_EXCEPTION_TYPE_LOAD) if we are not able to get the type.
18179 The current patch checks the places where my manually constructed
18180 tests show the errors are showing up, but we should do it
18185 mono_class_init return values should be tested everywhere, like
18186 the previous case this is something that we should audit
18187 everywhere and not only on the cases exposed by the tests I
18190 2006-04-26 Miguel de Icaza <miguel@novell.com>
18192 * file-io.c (ves_icall_System_IO_MonoIO_Open): Remove `async'
18193 boolean parameter and instead pass the information on `options'
18194 parameter (FileOptions).
18196 * icall.c: Register the new signature for MonoIO.Open.
18198 * debug-helpers.c (dis_one): Trying to understand how coverity
18199 works. Fix Run 5, item 78.
18201 2006-04-26 Dick Porter <dick@ximian.com>
18203 * socket-io.c (hostent_to_IPHostEntry2): Explicitly check for NULL
18206 2006-04-25 Martin Baulig <martin@ximian.com>
18208 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 56.
18210 * threads.c (mono_thread_attach): Set `thread->stack_ptr' and call
18211 debugger_thread_created().
18212 (debugger_gc_push_all_stacks): Don't handle the main thread in any
18214 (mono_debugger_init_threads): Removed the `main_thread_stack' arg.
18215 (mono_debugger_finalize_threads): New function; undo the effects
18216 of mono_debugger_init_threads().
18217 (mono_debugger_create_all_threads): Removed.
18219 2006-04-24 Zoltan Varga <vargaz@gmail.com>
18221 * image.c (mono_image_close): Tidy up trace messages.
18223 * assembly.c (mono_assembly_close): Ditto.
18225 * assembly.c (mono_assembly_close): Clear out image->assembly so the image
18226 no longer references an already freed assembly. Fixes #78168.
18228 2006-04-21 Dick Porter <dick@ximian.com>
18230 * threads.c (mono_thread_detach): Fix reference counting when
18233 2006-04-21 Zoltan Varga <vargaz@gmail.com>
18235 * icall.c (ves_icall_System_Enum_ToObject): Improve exception messages. Fixes
18238 2006-04-19 Zoltan Varga <vargaz@gmail.com>
18240 * marshal.c (mono_type_to_ldind): New helper function moved here from mini.c
18241 (mono_type_to_stind): Ditto.
18243 * marshal.c: Use the new helper functions to simplify code.
18245 * image.c (mono_image_close): Add some code for help debug assembly unloading
18248 * metadata.c (mono_metadata_parse_type_full): Allocate MonoType's from the
18251 * assembly.c (mono_assembly_open_full): Invoke the load hook when the
18252 assembly was already loaded in another appdomain. Fixes #78083.
18254 2006-04-13 Zoltan Varga <vargaz@gmail.com>
18256 * assembly.c (mono_assembly_load_reference): Increase the refcount of the
18257 referenced assemblies.
18258 (mono_assembly_close): Decrease the refcount of the referenced assemblies.
18260 * domain.c (mono_domain_free): Add a trace message.
18262 * appdomain.c (add_assemblies_to_domain): Ditto.
18264 * metadata-internals.h: (_MonoAssembly): Modify the meaning of the ref_count
18267 2006-04-12 Zoltan Varga <vargaz@gmail.com>
18269 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): Fix image reference counting.
18271 2006-04-12 Martin Baulig <martin@ximian.com>
18273 * threads.c: Use `MONO_DEBUGGER_SUPPORTED' as the conditional, not
18274 `USE_INCLUDED_LIBGC'.
18276 2006-04-12 Zoltan Varga <vargaz@gmail.com>
18278 * image.c (canonicalize_path): Avoid calling strncpy on overlapping strings if
18279 the patch contains ../ and a small directory name later. Hopefully fixes
18282 2006-04-10 Martin Baulig <martin@ximian.com>
18284 Clean up the debugger's thread-handling code.
18286 The debugger's thread-handling code has been moved from
18287 ../mini/debug-debugger.c to threads.c. We now iterate directly
18288 over the `threads' hash, keep track of exiting threads and also
18289 use proper locking.
18291 We can now debug XSP and XSP based applications with the debugger.
18293 * object-internals.h (MonoThread): Added `gpointer end_stack'.
18296 (MonoThreadCallbacks): Removed; this was only used by the debugger.
18297 (mono_install_thread_callbacks): Likewise.
18299 * threads.c (mono_thread_callbacks): Removed.
18300 (debugger_thread_created, debugger_thread_exited): New static functions.
18301 (start_wrapper): Call debugger_thread_created().
18302 (thread_cleanup): Call debugger_thread_exited().
18303 (mono_gc_stop_world, mono_gc_start_world): Removed; this was never used.
18304 (mono_debugger_init_threads): New public function.
18305 (debugger_thread_vtable): Moved here from debug-debugger.c; we now
18306 iterate directly over the `threads' hash and also use proper locking.
18308 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped to 55.
18310 * mono-debug-debugger.h
18311 (MonoDebuggerEvent): Added MONO_DEBUGGER_EVENT_THREAD_EXITED.
18313 2006-04-10 Zoltan Varga <vargaz@gmail.com>
18315 * reflection.c (encode_cattr_value): Fix handling of parameter type=object,
18316 argument type=array. Fixes #78057.
18318 2006-04-10 Atsushi Enomoto <atsushi@ximian.com>
18320 * culture-info-table.h : regenerated. Fixed bug #69652.
18322 2006-04-07 Zoltan Varga <vargaz@gmail.com>
18324 * loader.c metadata.c: Reapply a variant r59116.
18326 * loader.c metadata.c: Revert r59116 to see if it fixes the breakage.
18328 * class.c (mono_class_setup_interface_offsets): New internal function.
18330 * reflection.c (ensure_runtime_vtable): Setup interface offsets for dynamic
18331 interfaces too. Fixes #77398.
18333 * reflection.c (encode_cattr_value): Add support for
18334 parameter type=object, argument type=array.
18335 (load_cattr_value): Ditto. Fixes #77916.
18337 * marshal.c (emit_object_to_ptr_conv): Add support for ARRAY_BYVALCHARARRAY.
18338 (emit_ptr_to_object_conv): Ditto. Fixes #77960.
18340 * metadata.c (mono_type_to_unmanaged): Use ARRAY_BYVALCHARARRAY when converting
18341 a byval char array and CharSet is Ansi.
18343 * metadata.h: Add new marshalling conversion ARRAY_BYVALCHARARRAY.
18345 2006-04-06 Zoltan Varga <vargaz@gmail.com>
18347 * metadata.c: Add some locking comments.
18349 * metadata.c (mono_metadata_signature_alloc): Allocate signatures in the image
18351 (mono_metadata_free_method_signature): Don't free the signature itself.
18353 * loader.c (mono_free_method): Don't free the signature in non-dynamic methods.
18355 * assembly.c (mono_assembly_open_full): Avoid the situation where two assemblies
18356 reference the same MonoImage.
18357 (mono_assembly_load_from_full): Add an assert.
18359 2006-04-05 Zoltan Varga <vargaz@gmail.com>
18361 * image.c (mono_image_close): Don't put the image we are about to free into the
18362 loaded_images_guid_hash.
18364 * marshal.c (mono_mb_emit_ptr): Refactor a common code sequence into this function
18365 to reduce code duplication.
18367 * marshal.c: Register the native functions called by this module as icalls, to
18368 somewhat centralize the creation of MonoMethodSignature's.
18370 * loader.c (mono_method_signature): Add a cache for method signatures.
18372 * metadata.c (mono_metadata_get_param_attrs): New helper function to return
18373 the parameter attributes of a method.
18374 (mono_metadata_parse_method_signature_full): Refactored the computation of
18375 parameter attributes into a separate function. Also avoid one allocation in
18378 * assembly.c (mono_assembly_close): Ditto.
18380 * image.c (mono_image_close): Log trace messages with INFO level.
18382 * metadata-internals.h (MonoImage): Add a new 'method_signature' cache.
18384 * image.c reflection.c: Correct reference counting of image modules.
18386 * metadata.c (mono_metadata_interfaces_from_typedef_full): Allocate the result
18387 of this function from the image mempool.
18389 (mono_metadata_parse_type_full): Remove the mode != MONO_PARSE_PARAM restriction
18390 to allow more cached types to be used.
18392 * mono-debug.c (mono_debug_add_method): Appled patch from
18393 David S. Miller <davem@sunset.davemloft.net>: Access
18394 minfo->lexical_blocks[] entry elements using read32().
18396 2006-04-04 Zoltan Varga <vargaz@gmail.com>
18398 * loader.c (mono_free_method): No longer free the method header for non-dynamic
18399 methods as it is allocated from the mempool.
18401 * metadata.c (mono_metadata_parse_mh_full): Allocate method headers from the
18404 * metadata-internals.h: Add comments describing the reference counting scheme
18405 used for MonoImage and MonoAssembly.
18407 * image.c assembly.c reflection.c: Rework reference counting of images and
18408 assemblies so they are freed when the runtime is shut down. Free some
18409 additional memory structures when an image is unloaded.
18411 2006-04-03 Zoltan Varga <vargaz@gmail.com>
18413 * class.c loader.c reflection.c: Allocate more data structures in
18416 2006-03-31 Miguel de Icaza <miguel@novell.com>
18419 (ves_icall_System_Environment_InternalSetEnvironmentVariable): Fix
18420 build on pre glib 2.4 systems.
18422 2006-03-31 Zoltan Varga <vargaz@gmail.com>
18424 * icall.c (ves_icall_System_Environment_InternalSetEnvironmentVariable): New icall.
18426 * icall.c: Fix some warnings.
18428 2006-03-29 Atsushi Enomoto <atsushi@ximian.com>
18430 * culture-info-table.h : regenerated.
18432 Wed Mar 29 18:24:42 CEST 2006 Paolo Molaro <lupus@ximian.com>
18434 * threads.c, object-internals.h, verify.c: changed the culture caching
18435 code to use a normal MonoArray for storage so the GC can keep track of
18436 them easily. Fixed bits of the cache logic, too and simplified the
18439 Wed Mar 29 17:18:16 CEST 2006 Paolo Molaro <lupus@ximian.com>
18441 * gc-internal.h, null-gc.c, boehm-gc.c, gc.c: enable the finalizer
18442 thread for non-Boehm GCs.
18444 Wed Mar 29 17:10:05 CEST 2006 Paolo Molaro <lupus@ximian.com>
18446 * domain.c, object.c, domain-internals.h: reduce the amount of memory
18447 needed to keep track of the data for static fields.
18449 2006-03-29 Raja R Harinath <rharinath@novell.com>
18452 * icall.c (ves_icall_Type_GetMethodsByName): Don't use vtable_size
18453 for interface classes. Use 'num_methods' instead.
18454 (ves_icall_Type_GetPropertiesByName): Likewise. Setup vtable
18455 before using '->vtable_size' field.
18457 Wed Mar 29 12:53:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
18459 * domain.c, object.c, domain-internals.h: proxy_vtable_hash
18460 doesn't contain managed pointers, so use a normal hashtable.
18462 Mon Mar 27 11:15:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
18464 * reflection.c, class-internals.h, domain.c: fixed handling of types
18465 used as values for objects in custom attributes (bug #77915):
18467 2006-03-24 Martin Baulig <martin@ximian.com>
18469 * class.c (mono_class_setup_fields): Added support for generic
18470 instances; fixes #77580.
18472 2006-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18474 * assembly.c: publickeytoken is case insensitive. Fixes bug #77898.
18476 2006-03-24 Dick Porter <dick@ximian.com>
18478 * file-io.c (get_file_attributes): More stat macro breakage.
18481 Fri Mar 24 15:26:00 CET 2006 Paolo Molaro <lupus@ximian.com>
18483 * profiler.c: added the file=filename option in the default profiler
18484 to output the profile data to filename.
18486 2006-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18488 * icall.c: CodeBase returns '/' instead of '\\' on windows. Fixes
18491 2006-03-22 Martin Baulig <martin@ximian.com>
18493 * reflection.c (fieldbuilder_to_mono_class_field): Don't store the
18494 allocated `MonoClassField *' in `fb->handle'.
18496 Tue Mar 21 17:19:37 CET 2006 Paolo Molaro <lupus@ximian.com>
18498 * class.c, image.c, metadata-internals.h: implemented new mechanism to
18499 allocate interface ID to save memory and allow better ID reuse on
18500 appdomain unload. setup_generic_vtable () removal from Martin.
18502 Tue Mar 21 15:54:30 CET 2006 Paolo Molaro <lupus@ximian.com>
18504 * object.h, appdomain.c, domain.c, exception.c, icall.c,
18505 locales.c, marshal.c, object.c, reflection.c, threadpool.c,
18506 threads.c: introduced MONO_OBJECT_SETREF() macro to be able to insert
18507 write barriers for reference stores with managed objects accessed with
18508 C structures in the runtime and in embedding programs.
18510 2006-03-20 Raja R Harinath <rharinath@novell.com>
18512 * icall.c (ves_icall_Type_GetInterfaces): Avoid using
18513 'interface_id' and 'max_interface_id' fields of MonoClasses
18514 representing open generic types.
18516 Fri Mar 17 18:06:06 CET 2006 Paolo Molaro <lupus@ximian.com>
18518 * object.h, object.c, icall.c: added functions to deal with
18519 storing valuetypes that contain references in managed objects.
18520 * reflection.c, string-icalls.c, threads.c, marshal.c: small
18521 fixes and comments around uses of mono_array_addr ().
18523 Thu Mar 16 17:16:45 CET 2006 Paolo Molaro <lupus@ximian.com>
18525 * object.h, icall.c, monitor.c: object.GetHashCode ()
18526 implementation that supports the moving garbage collector.
18528 Wed Mar 15 16:31:38 CET 2006 Paolo Molaro <lupus@ximian.com>
18530 * icall.c, threads-types.h, threads.c: implemented finalizer for
18531 LocalDataStoreSlot.
18533 2006-03-15 Zoltan Varga <vargaz@gmail.com>
18535 * metadata.c (mono_type_size): Add a fixme.
18536 (mono_type_stack_size): Ditto.
18538 * object-internals.h (MonoReflectionAssemblyBuilder): Added
18539 'type_forwarders' field.
18541 * tabledefs.h (TYPE_ATTRIBUTE_FORWARDER): Added new (undocumented) type
18542 attribute from net 2.0.
18544 * object.c (mono_vtable_get_static_field_data): Moved this to object.c
18547 * class.c (mono_class_setup_fields): Fix a warning.
18549 * class.c (mono_class_from_name): Add support for assemblyref entries
18550 in the EXPORTEDTYPE table.
18552 * reflection.c: Add support for handling type forwarders under net 2.0.
18554 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
18556 2006-03-14 Zoltan Varga <vargaz@gmail.com>
18558 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Avoid
18559 overwriting entries in ModuleBuild->types, also clean up the code
18560 a little. Fixes #77774.
18562 Tue Mar 14 20:21:18 CET 2006 Paolo Molaro <lupus@ximian.com>
18564 * domain.c, assembly.c, metadata-internals.h, class-internals.h:
18565 load friend assembly info when present.
18567 2006-03-14 Raja R Harinath <rharinath@novell.com>
18569 Fix crasher on gtest-158.cs.
18570 * metadata.c (mono_metadata_parse_type_full): Avoid canonicalizing
18571 the return value if the MonoClass we want is yet in an
18572 inconsistent state.
18573 * class.c (mono_class_create_from_typedef): Add an comment
18574 explaining an order dependency between mono_class_setup_parent and
18575 mono_class_setup_mono_type.
18577 Mon Mar 13 21:13:27 CET 2006 Paolo Molaro <lupus@ximian.com>
18579 * class.c: documentation updates and events bug fix.
18581 Mon Mar 13 17:28:07 CET 2006 Paolo Molaro <lupus@ximian.com>
18583 * class.c: some cleanup, locking fixes.
18585 Mon Mar 13 10:46:17 CET 2006 Paolo Molaro <lupus@ximian.com>
18587 * class.c: fix the generics code to setup nested
18588 type info to the instantiated type (bug #77770).
18590 Sun Mar 12 16:21:31 CET 2006 Paolo Molaro <lupus@ximian.com>
18592 * marshal.c: fixed a few type correctness issues.
18594 Sat Mar 11 20:14:44 CET 2006 Paolo Molaro <lupus@ximian.com>
18596 * loader.c: the Set/Get/Addrtess array methods should be public.
18598 2006-03-11 Zoltan Varga <vargaz@gmail.com>
18600 * icall.c (mono_register_jit_icall_wrapper): Fix a warning.
18602 * icall.c (mono_register_jit_icall_wrapper): Register the argument, not
18605 2006-03-10 Zoltan Varga <vargaz@gmail.com>
18607 * icall.c (mono_register_jit_icall): Allocate the structure using g_new0.
18609 * class-internals.h (MonoJitICallInfo): Add 'trampoline' field used by the JIT.
18611 * mempool.c (mono_mempool_alloc): Speed this up a bit.
18612 (mono_mempool_alloc0): Ditto.
18614 2006-03-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18617 (create_object_from_sockaddr): it was allocating 4 extra bytes
18618 for the AF_UNIX data. Fixes bug #77747.
18620 2006-03-09 Zoltan Varga <vargaz@gmail.com>
18622 * icall.c (ves_icall_System_MonoMethodInfo_get_retval_marshal): New icall.
18624 2006-03-09 Dick Porter <dick@ximian.com>
18626 * file-io.c (get_file_attributes): Use S_ISLNK not "& S_IFLNK".
18627 Fixes bug 76966 again.
18629 2006-03-07 Peter Dennis Bartok <pbartok@novell.com>
18631 * verify.c (dtfinfo_fields): Updated to match new (serializable) field
18633 * appdomain.c: Bumped corlib version to 48 (due to r57532)
18635 2006-03-07 Martin Baulig <martin@ximian.com>
18638 (mono_field_get_value_object): Add support for MONO_TYPE_GENERICINST.
18640 2006-03-07 Martin Baulig <martin@ximian.com>
18643 (mono_class_get_full): Don't inflate TYPEDEF entries; fixes the
18644 regression introduced in r56970; see gtest-252.cs.
18646 * loader.c (mono_get_method_constrained): Correctly handle generic
18647 methods; see gtest-253.cs.
18649 2006-03-04 Zoltan Varga <vargaz@gmail.com>
18651 * icall.c (ves_icall_type_Equals): Handle NULLs. Fixes #77700.
18653 2006-03-04 Martin Baulig <martin@ximian.com>
18655 * icall.c (ves_icall_MonoGenericClass_GetParentType): Dynamically
18656 compute the parent type at runtime, just like we're already doing
18660 (mono_reflection_bind_generic_parameters): Don't compute the
18661 parent type anymore.
18663 * class-internals.h (MonoDynamicGenericClass): Removed `parent'.
18665 2006-03-04 Martin Baulig <martin@ximian.com>
18667 * mono-debug-debugger.h
18668 (mono_debugger_create_notification_function): Allocate memory at
18669 runtime and return a pointer to it.
18671 2006-03-03 Zoltan Varga <vargaz@gmail.com>
18673 * assembly.c: Fix windows build.
18675 * assembly.c: Fix build.
18677 * assembly.c: Move the contents of os/{unix,win32}/util.c to this file.
18679 * gc_wrapper.h: Move the contents of os/gc_wrapper.h to this file.
18681 2006-03-03 Dick Porter <dick@ximian.com>
18684 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
18685 Check parameters before dereferencing them. Fixes Aaron's part of
18688 2006-03-03 Raja R Harinath <rharinath@novell.com>
18690 Fix performance regression.
18691 * loader.c (find_method_in_class): Add 'from_class' argument.
18692 Rename 'klass' argument to 'in_class'. The signature is compared
18693 against the method in 'in_class', and the corresponding method is
18694 returned from 'from_class'.
18695 (find_method): Walk both 'in_class' and 'from_class' in parallel.
18696 (method_from_memberref) [PARENT_TYPESPEC]: Use it to walk the
18697 type definition and generic instantiation in parallel.
18698 (mono_get_method_constrained): Update to changes.
18700 Thu Mar 2 12:27:41 CET 2006 Paolo Molaro <lupus@ximian.com>
18702 * threads.c: make sure the domain is correct, too when doing
18703 mono_thread_attach ().
18705 2006-03-01 Zoltan Varga <vargaz@gmail.com>
18707 * class.c (mono_class_create_from_typedef): Mark classes using CharSet.Auto as unicode on
18708 windows. Fixes #77683.
18710 Wed Mar 1 20:09:25 CET 2006 Paolo Molaro <lupus@ximian.com>
18712 * object.h, *: introduced specific way to set elements of an array
18713 of references to be used as write barrier. Still need to audit the
18714 uses of mono_array_addr.
18716 2006-03-01 Miguel de Icaza <miguel@novell.com>
18718 * object-internals.h: New field to cache the assmebly name, patch
18719 from Tambet Ingo (tambet@ximian.com)
18721 Wed Mar 1 19:13:30 CET 2006 Paolo Molaro <lupus@ximian.com>
18723 * decimal.h, class-internals.h, metadata-internals.h,
18724 file-io.h: mark a few function declarations as internal, to
18725 reduce the number of PLT entries.
18727 2006-02-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18729 * file-io.c: fix typo in warning message.
18731 Tue Feb 28 17:43:20 CET 2006 Paolo Molaro <lupus@ximian.com>
18733 * loader.c: on unix, lookup the "*A" version of a function
18734 if charset is auto as a second option before failing.
18736 2006-02-28 Raja R Harinath <rharinath@novell.com>
18738 * class.h (mono_class_inflate_generic_method): Revert to two
18740 * class-internals.h (MonoMethodInflated): Remove 'inflated' field.
18741 (mono_class_inflate_generic_method_full): Add.
18742 * class.c (mono_class_inflate_generic_method_full): Rename from
18743 'mono_class_inflate_generic_method'. Don't set 'inflated' field.
18744 (mono_class_inflate_generic_method): New. Wrapper around ..._full.
18745 * loader.c, reflection.c: Update to changes.
18747 Sat Feb 25 17:57:21 CET 2006 Paolo Molaro <lupus@ximian.com>
18749 * icall.c: const fixes and small improvements.
18751 2006-02-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18753 * threadpool.c: for asynchronous connect(), enable the same workaround
18754 for BSD 6 as for the Mac. Fixes bug #77637.
18756 2006-02-24 Zoltan Varga <vargaz@gmail.com>
18758 * marshal.c (mono_marshal_free_asany): Fix handling of blittable
18759 formatted classes. Fixes #77524.
18761 2006-02-24 Raja R Harinath <rharinath@novell.com>
18763 * class.c (inflate_generic_type): Add a couple more
18764 micro-optimizations.
18765 (inflate_generic_context): Don't use the 'gmethod' from
18767 (mono_class_inflate_generic_method): If the method has generic
18768 parameters, but the passed-in context doesn't have a 'gmethod',
18769 create one. Use the possibly simplified generic instantiation
18770 from the declaring class instead of the one passed in.
18772 2006-02-24 Raja R Harinath <harinath@gmail.com>
18774 Make generic method signature and method header handling lazy.
18775 * class.c (mono_class_inflate_generic_signature): Move to loader.c.
18776 (inflate_generic_header): Likewise.
18777 (mono_class_inflate_generic_method): Rewrite. Add a 'klass_hint'
18778 parameter to avoid inflating types.
18779 (mono_get_inflated_method): Empty out.
18780 * class.h (mono_class_inflate_generic_method): Update to changes.
18781 * loader.c (mono_get_method_from_token): Don't parse signature for
18782 generic methods, nor methods of generic classes.
18783 (mono_method_signature): Rename from 'mono_method_signature'.
18784 Inflate signature on demand.
18785 (mono_method_get_header): Inflate method header on demand.
18786 * reflection.c: Update to changes.
18788 2006-02-23 Raja R Harinath <rharinath@novell.com>
18790 * metadata.c (mono_metadata_inflate_generic_inst): If the
18791 instantiation is closed, don't bother expanding it in the new
18793 * class.c (inflate_generic_class): If the generic instantiation
18794 doesn't change after inflation, return the argument itself.
18795 (inflate_generic_type) [MONO_TYPE_MVAR, MONO_TYPE_VAR]:
18797 (inflate_generic_context): If neither the generic class nor the
18798 generic method instantiations change, return the original context.
18799 * reflection.c (mono_method_get_object): Do
18800 'mono_get_inflated_method' before accessing the ->klass field.
18801 (inflate_mono_method): Don't create a MonoGenericMethod unless
18803 (inflate_method): Don't pass a constructed type as the declaring
18804 type of a methodbuilder.
18806 Thu Feb 23 11:57:54 CET 2006 Paolo Molaro <lupus@ximian.com>
18808 * object.c: fix memory overwrite.
18810 2006-02-22 Dick Porter <dick@ximian.com>
18812 * threads.c: Don't use G_GNUC_PRETTY_FUNCTION in debug messages,
18813 it doesn't work any more.
18814 (mono_threads_request_thread_dump): Fix unused variable warnings.
18816 Wed Feb 22 15:08:44 CET 2006 Paolo Molaro <lupus@ximian.com>
18818 * metadata.h, metadata-internals.h, monodiet.c, debug-helpers.c,
18819 mono-debug.c, profiler.c: cleanup: move MonoMethodHeader out of
18820 the public header file.
18822 2006-02-21 Zoltan Varga <vargaz@gmail.com>
18824 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Fix writing past memory. Fixes #77613.
18826 Tue Feb 21 19:55:11 CET 2006 Paolo Molaro <lupus@ximian.com>
18828 * class-internals.h, object.c: reduce the size of MonoVTable
18829 and store the interface_offsets array at negative offsets.
18831 Tue Feb 21 19:53:26 CET 2006 Paolo Molaro <lupus@ximian.com>
18833 * metadata.c: tweak table descriptors data structures to reduce
18834 size and runtime relocations.
18836 Tue Feb 21 14:52:13 CET 2006 Paolo Molaro <lupus@ximian.com>
18838 * marshal.c: fix some types and opcodes to be type-safe
18839 in marshaling wrappers.
18841 2006-02-21 Ankit Jain <jankit@novell.com>
18843 * metadata.h (mono_metadata_decode_signed_value): Add declaration.
18845 2006-02-21 Raja R Harinath <rharinath@novell.com>
18847 * metadata.c (get_constraints): Relax debugging checks for monodis.
18849 2006-02-21 Ankit Jain <jankit@novell.com>
18851 * metadata.c (mono_metadata_load_generic_params): Move the code
18852 checking for ambiguous generic params from here to mono/dis/get.c
18853 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Remove.
18855 2006-02-21 Raja R Harinath <harinath@gmail.com>
18857 Fix assertion triggered when compiling nemerle.
18858 * class.c (mono_get_shared_generic_inst): Rename from
18859 get_shared_inst and make non-static.
18860 * loader.c (mono_get_shared_generic_method): New. Used to create
18861 the MonoGenericContext-equivalent of a MonoGenericContainer.
18862 (mono_get_method_from_token): Initialize the 'context' field of
18863 the created MonoGenericContainer.
18864 * reflection.c (reflection_methodbuilder_to_mono_method): Likewise.
18865 * metadata.c (get_constraints): Add sanity check.
18866 * class-internals.h: Add new internal methods.
18868 * reflection.c (verify_safe_for_managed_space): New sanity check.
18869 Currently checks that owner-less generic parameters aren't allowed
18871 (mono_type_get_object): Use it.
18872 * icall.c (ves_icall_MonoType_GetGenericArguments): Remove checks
18873 that are now in mono_type_get_object.
18874 (ves_icall_MonoMethod_GetGenericArguments): Likewise.
18876 2006-02-19 Raja R Harinath <harinath@gmail.com>
18878 * metadata.c (mono_type_create_from_typespec): Rename from
18879 mono_type_create_from_typespec_full. Remove MonoGenericContainer*
18880 argument and caching of types in the generic container.
18881 (unwrap_arrays, find_generic_param): Remove.
18882 * metadata-internals.h: Update.
18883 * class-internals.h (_MonoGenericContainer): Remove 'types' field.
18885 2006-02-18 Zoltan Varga <vargaz@gmail.com>
18887 * class.c (mono_class_get_exception_for_failure): Fix a warning.
18889 * marshal.c (mono_marshal_emit_native_wrapper): Handle FNPTR args and
18890 return values. Fixes #77581.
18892 * class.c (mono_fnptr_class_get): Switch name and name_space.
18894 * marshal.c (mono_marshal_asany): Fix marshalling of blittable formatted
18895 classes and add support for [In, Out] attributes.
18896 (mono_marshal_free_asany): Ditto. Fixes #77524.
18898 2006-02-18 Raja R Harinath <harinath@gmail.com>
18900 * class.c (mono_class_from_generic_parameter): Make more robust to
18901 incomplete MonoGenericContainers from monodis.
18903 Fri Feb 17 16:10:34 CET 2006 Paolo Molaro <lupus@ximian.com>
18905 * class-internals.h: added some more exception types.
18906 * class.c, metadata.c: added a few checks to handle missing
18909 2006-02-17 Raja R Harinath <rharinath@novell.com>
18911 Use owner-less generic-params some more.
18912 * class.c (my_mono_class_from_generic_parameter): Remove.
18913 (mono_class_from_generic_parameter): Handle null image,
18914 param->name and param->owner.
18915 (mono_class_from_mono_type): Update.
18916 (mono_class_create_from_typespec): Remove 'container' parameter.
18917 If that parameter is non-null, the result is always inflated by
18918 'mono_class_get_full' anyway.
18919 (mono_class_get): Rename from _mono_class_get. Remove 'container'
18921 (mono_class_get_full): Update.
18923 * class.c (inflate_generic_type) [GENERICINST]: If the generic
18924 instance is not open, don't bother inflating.
18925 (mono_class_setup_fields): Hoist some loop-invariants. Don't
18926 parse metadata for inflated classes.
18927 (_mono_class_get): Change GenericContext* parameter to
18929 (mono_class_create_from_typespec): Likewise. Simplify, and
18930 implement trivially. All the cases are handled in
18931 mono_class_from_mono_type. Don't inflate returned class.
18932 (mono_class_get_full): Delegate GENERICINST optimization to
18933 inflate_generic_type.
18934 (mono_ldtoken) [TOKEN_TYPE_SPEC]: Use mono_class_get_full() here too.
18936 2006-02-16 Dick Porter <dick@ximian.com>
18938 * socket-io.c (create_object_from_sockaddr): Fix typo.
18939 (create_sockaddr_from_object): Check array lengths before
18940 potentially accessing items off the end.
18941 (ves_icall_System_Net_Sockets_Socket_Receive_internal)
18942 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal)
18943 (ves_icall_System_Net_Sockets_Socket_Send_internal)
18944 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Fix buffer
18945 length checks to avoid wraparound overflows.
18946 (ves_icall_System_Net_Sockets_Socket_Select_internal): Check the
18947 contents of the array of sockets
18948 (hostent_to_IPHostEntry2)
18949 (addrinfo_to_IPHostEntry): IPv6 printed addresses can be 48 bytes.
18950 Check return value of inet_ntop ().
18951 (addrinfo_to_IPHostEntry): Fix typo
18953 2006-02-16 Raja R Harinath <rharinath@novell.com>
18955 Type metadata parsing doesn't use generic-instantiation information.
18956 * metadata.c (mono_metadata_parse_array_full): Change
18957 MonoGenericContext* parameter to MonoGenericContainer*.
18958 (mono_metadata_parse_type_full): Likewise.
18959 (mono_type_create_from_typespec_full): Likewise.
18960 (mono_metadata_parse_mh_full): Likewise.
18961 (mono_metadata_parse_generic_inst): Likewise.
18962 (do_mono_metadata_parse_generic_class): Likewise.
18963 (do_mono_metadata_parse_type): Likewise.
18964 * metadata-internals.h: Update to changes.
18965 * class.c (mono_class_find_enum_basetype): Likewise.
18966 (mono_class_setup_fields): Likewise.
18967 (mono_class_create_from_typespec): Likewise.
18968 * loader.c (method_from_methodspec): Likewise.
18969 (mono_get_method_from_token): Likewise.
18970 (mono_method_get_header): Likewise.
18972 Thu Feb 16 15:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
18974 * marshal.c: handle additional GENERICINST case (patch from
18975 Thong Nguyen <tum@veridicus.com>).
18976 Fix a few cases where LDIND_I/STIND_I was used for references.
18978 2006-02-16 Raja R Harinath <rharinath@novell.com>
18980 * reflection.c (mono_reflection_get_token): Remove unused variable.
18982 2006-02-16 Martin Baulig <martin@ximian.com>
18984 * reflection.c (mono_reflection_get_token): Add support for fields
18985 in instantiated generic types.
18988 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): Removed.
18990 2006-02-15 Martin Baulig <martin@ximian.com>
18993 (ves_icall_MonoMethod_get_HasGenericParameters): Removed.
18994 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): Removed.
18995 (ves_icall_MonoMethod_get_IsGenericMethod): New icall.
18996 (ves_icall_MonoMethod_get_IsGenericMethodDefinition): New icall.
18998 Wed Feb 15 16:19:24 CET 2006 Paolo Molaro <lupus@ximian.com>
19000 * class.c, metadata.c, metadata.h, object.c, icall.c,
19001 marshal.c: changed mono_type_get_underlying_type () to do
19002 the sensible thing and introduced mono_type_generic_inst_is_valuetype().
19003 Fixed handling of instantiated generic valuetypes (bug #75479).
19005 2006-02-15 Raja R Harinath <rharinath@novell.com>
19007 * metadata.c (mono_metadata_decode_signed_value): Simplify.
19008 Delegate to mono_metadata_decode_value, and work on the returned value.
19010 * icall.c (ves_icall_MonoType_GetGenericArguments):
19011 Add consistency check here too.
19013 2006-02-15 Ankit Jain <jankit@novell.com>
19015 * metadata.c (mono_metadata_decode_signed_value): Use gint* instead of
19018 2006-02-15 Ankit Jain <jankit@novell.com>
19020 * metadata.c (mono_metadata_decode_signed_value): New function to decode
19021 signed values, used only for representing lower bounds of arrays.
19022 (mono_metadata_parse_array_full): Use new
19023 mono_metadata_decode_signed_value to decode lower bounds.
19025 2006-02-14 Martin Baulig <martin@ximian.com>
19028 (mono_reflection_get_token): Support "MonoGenericMethod" and
19029 "MonoGenericCMethod" and allow generic instances / methods.
19031 2006-02-11 Zoltan Varga <vargaz@gmail.com>
19033 * console-io.c (ves_icall_System_ConsoleDriver_GetTtySize): New icall
19034 to obtain the terminal size using an ioctl.
19036 * object.c (mono_nullable_init): Revert this as nullable reference
19037 types are not valid.
19038 (mono_nullable_box): Ditto.
19040 2006-02-09 Dick Porter <dick@ximian.com>
19042 * threads.c (mono_thread_detach): Drop a reference to the thread
19045 2006-02-09 Zoltan Varga <vargaz@gmail.com>
19047 * object.c (mono_nullable_init): Handle nullable reference types.
19048 (mono_nullable_box): Ditto. Fixes #77446.
19050 2006-02-07 Martin Baulig <martin@ximian.com>
19052 * icall.c (ves_icall_MonoMethod_get_IsGenericMethodDefinition): Removed.
19054 2006-02-07 Ankit Jain <jankit@novell.com>
19056 * socket-io.h (MonoSocketFlags): New. Copy of System.Net.Sockets.SocketFlags
19057 * socket-io.c (convert_socketflags): New. Convert SocketFlags to native ones.
19058 (ves_icall_System_Net_Sockets_Socket_Receive_internal): Convert flags using convert_socketflags.
19059 (ves_icall_System_Net_Sockets_Socket_ReceiveFrom_internal): Likewise.
19060 (ves_icall_System_Net_Sockets_Socket_Send_internal): Likewise.
19061 (ves_icall_System_Net_Sockets_Socket_SendTo_internal): Likewise.
19063 2006-02-02 Zoltan Varga <vargaz@gmail.com>
19065 * class.c (mono_class_create_generic): Set type_token as well.
19067 * object.c (mono_runtime_invoke_array): Fix handling of byref vtypes to be
19068 compatible with MS.
19070 2006-02-02 Martin Baulig <martin@ximian.com>
19072 * threads.c, gc.c: Removed the `WITH_INCLUDED_LIBGC' section; it
19073 has never been used so far.
19075 2006-02-02 Martin Baulig <martin@ximian.com>
19077 * mono-debug-debugger.h: Changed comment at the top of this file;
19078 the header is not installed, but it's safe to #include it from
19081 * mono-debug.c: Don't #define _IN_THE_MONO_DEBUGGER.
19082 * mono-debug-debugger.c, debug-mono-symfile.c: Likewise.
19084 2006-02-02 Martin Baulig <martin@ximian.com>
19087 (MonoSymbolTable): Removed the `metadata_info' field.
19090 (mono_debug_init_1): Always set `mono_symbol_table->corlib'.
19092 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
19093 (mono_debugger_add_builtin_types): Removed.
19094 (MonoDebuggerInfo): Moved into ../mini/debug-debugger.h.
19095 (mono_debugger_create_notification_function): We now operate on a
19096 pre-allocated area; take a `gpointer' and return `void'.
19098 * mono-debug-debugger.c
19099 (MonoDebuggerMetadataInfo): Moved into ../mini/debug-debugger.h.
19100 (mono_debugger_add_builtin_types): Removed.
19102 2006-02-02 Martin Baulig <martin@ximian.com>
19104 * threads.c (mono_debugger_create_all_threads): New public method.
19106 Wed Feb 1 18:22:34 CET 2006 Paolo Molaro <lupus@ximian.com>
19108 * gc-internal.h, boehm-gc.c, null-gc.c: back out the patch, since it
19109 breaks on several platforms.
19111 2006-02-01 Sebastien Pouliot <sebastien@ximian.com>
19113 * assembly.c: the VS.NET build doesn't supply default values for
19114 MONO_ASSEMBLIES and MONO_CFG_DIR.
19116 2006-02-01 Zoltan Varga <vargaz@gmail.com>
19118 * gc-internal.h boehm-gc.c null-gc.c (mono_gc_unregister_thread): New
19121 * threads.c (mono_thread_detach): Call mono_gc_unregister_thread ().
19123 * loader.c (method_from_memberref): Fix a warning.
19125 * metadata.c (mono_metadata_load_generic_params): Fix a warning.
19127 * marshal.c (emit_struct_conv): Fix marshalling of embedded structs
19128 with explicit layout. Fixes #77433.
19130 2006-01-31 Zoltan Varga <vargaz@gmail.com>
19132 * icall.c (ves_icall_Type_GetInterfaceMapData): Make sure
19133 max_interface_id is initialized before using it. Fixes #77398.
19134 (ves_icall_Type_GetInterfaces): Ditto.
19136 2006-01-30 Raja R Harinath <rharinath@novell.com>
19138 * metadata.c (mono_metadata_parse_method_signature_full): Don't
19139 allocate memory for parameter attributes when parsing memberref
19141 * loader.c (mono_loader_set_error_method_load): Don't warn.
19142 (method_from_memberref): Ensure MissingMethodException gets thrown
19143 if method is not found. Make warning more informative.
19145 2006-01-29 Raja R Harinath <harinath@gmail.com>
19148 * icall.c (ves_icall_MonoType_get_IsGenericParameter): Don't
19149 return true if is byref.
19150 (ves_icall_TypeBuilder_get_IsGenericParameter): Likewise.
19151 (ves_icall_MonoType_get_DeclaringType): Return NULL on byref classes.
19152 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
19154 2006-01-27 Raja R Harinath <rharinath@novell.com>
19156 Fix tests/find-method.2.il
19157 * loader.c (find_method, find_method_in_class): Remove is_inflated
19158 argument. Revert 2006-01-18 change.
19159 (method_from_memberref) [MONO_MEMBERREF_PARENT_TYPESPEC]: If type
19160 is generic, search for method in its generic definition.
19161 * class.c (mono_class_setup_vtable_general): Print generic
19162 arguments of generic types in debugging printf.
19164 2006-01-26 Zoltan Varga <vargaz@gmail.com>
19166 * object-internals.h (MonoThread): Add 'thread_dump_requested' field.
19168 * threads.c (mono_threads_request_thread_dump): New helper function.
19170 2006-01-25 Raja R Harinath <rharinath@novell.com>
19172 * metadata.c (mono_type_create_from_typespec_full): Fix caching of types.
19174 2006-01-25 Ankit Jain <jankit@novell.com>
19176 * metadata-internals.h (mono_generic_params_with_ambiguous_names): Add declaration and
19177 move definition to ..
19178 * metadata.c (mono_generic_params_with_ambiguous_names): .. here.
19180 2006-01-25 Ankit Jain <jankit@novell.com>
19181 Raja R Harinath <rharinath@novell.com>
19183 * metadata-internals.h (mono_generic_params_with_ambiguous_names): New.
19184 * metadata.c (mono_metadata_load_generic_params): Fill mono_generic_params_with_ambiguous_names
19187 2006-01-25 Martin Baulig <martin@ximian.com>
19189 * mono-debug-debugger.h: Moved `MonoDebuggerManager' and
19190 `MonoDebuggerThread' into debug-debugger.c.
19192 Tue Jan 24 18:53:35 CET 2006 Paolo Molaro <lupus@ximian.com>
19194 * profiler.c: fix printing of data.
19196 2006-01-24 Atsushi Enomoto <atsushi@ximian.com>
19198 * object.c, marshal.c : Fixed runtime part of bug #77315. Reject
19199 invalid surrogate in UTF7/UTF8 bytes and don't return NULL.
19201 Tue Jan 24 09:56:16 CET 2006 Paolo Molaro <lupus@ximian.com>
19203 * object.c: fix deadlock related to string interning.
19205 2006-01-23 Martin Baulig <martin@ximian.com>
19207 * mono-debug-debugger.h (MonoDebuggerIOLayer): Removed.
19209 * mono-debug-debugger.c (mono_debugger_io_layer): Removed.
19211 2006-01-23 Martin Baulig <martin@ximian.com>
19213 * mono-debug.h: Moved the prototypes of some functions which are
19214 used by the JIT here from mono-debug-debugger.h.
19216 2006-01-21 Martin Baulig <martin@ximian.com>
19218 * Makefile.am: Don't install mono-debug-debugger.h.
19220 2006-01-21 Martin Baulig <martin@ximian.com>
19222 * mono-debug-debugger.h: Enforce the private status of this header
19223 file and removed unneccessary #include's in metadata/*.c and mini/*.c.
19224 Moved some stuff from mono-debugger-jit-wrapper.h here.
19226 2006-01-20 Raja R Harinath <rharinath@novell.com>
19228 * class.c (mono_class_from_typeref): Add a sanity test to help
19229 catch lack of assembly load/search hooks.
19231 2006-01-19 Zoltan Varga <vargaz@gmail.com>
19233 * marshal.c (emit_struct_conv): Relax the fields with same offset
19234 check even more. Fixes #77230.
19236 2006-01-18 Martin Baulig <martin@ximian.com>
19238 * loader.c (find_method_in_class): Added `gboolean is_inflated'
19239 argument; if false, we compare the uninstantiated signatures.
19240 (method_from_memberref): Compare the uninstantiated signatures;
19243 2006-01-18 Robert Jordan <robertj@gmx.net>
19245 * boehm-gc.c, null-gc.c (mono_gc_weak_link_remove):
19246 Clear the weak link. Fixes bug #77170.
19248 * gc.c (mono_gchandle_free):
19249 Reflect *-gc.c changes (tiny optimization).
19251 2006-01-18 Zoltan Varga <vargaz@gmail.com>
19253 * metadata.c (mono_metadata_signature_dup): Applied patch from
19254 Aras Pranckevicius (aras@otee.dk). Fix crash when compiled with MSVC.
19257 2006-01-17 Zoltan Varga <vargaz@gmail.com>
19259 * marshal.c (emit_struct_conv): Allow fields with the same offset when
19260 marshalling from native to managed code. Fixes #77230.
19262 2006-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19264 * threadpool.c: fix problem (Mac only) when more than one asynchronous
19265 connect. Fixes bug #77020.
19267 Mon Jan 16 19:20:43 CET 2006 Paolo Molaro <lupus@ximian.com>
19269 * class.c: fixed id assignement for nested interfaces (bug #77275).
19270 Added also better info for --print-vtable debugging.
19272 2006-01-12 Martin Baulig <martin@ximian.com>
19274 * icall.c (ves_icall_MonoGenericClass_GetInterfaces): Inflate the
19275 interfaces on-the-fly; fixes #76625.
19277 * class-internals.h
19278 (MonoDynamicGenericClass): Removed `ifaces' and `count_ifaces'; we
19279 don't need that anymore.
19281 2006-01-12 Miguel de Icaza <miguel@novell.com>
19284 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
19285 To avoid initing the nested_classes when not needed I turned the
19286 PeerCredData as a toplevel internal class, as it has to be shared
19289 Fixes the CASA issue.
19291 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
19293 * domain.c: Accessors for MonoJitInfo
19295 * profiler-private.h: Add jitinfo to the end jit hook
19297 * profiler.[ch]: Define new hooks, called after jitting which give
19298 the MonoJitInfo that was compiled
19300 2006-01-10 Martin Baulig <martin@ximian.com>
19302 * class.c (mono_class_setup_events): Add support for generic
19303 classes; fixes #76440.
19305 2006-01-06 Raja R Harinath <rharinath@novell.com>
19308 * icall.c (ves_icall_InternalInvoke): Use mono_get_inflated_method
19309 on passed-in method.
19311 2006-01-03 Zoltan Varga <vargaz@gmail.com>
19313 * object.c (mono_runtime_invoke_array): Add Nullable support.
19315 * icall.c (ves_icall_System_Activator_CreateInstanceInternal): Ditto.
19317 2006-01-03 Sebastien Pouliot <sebastien@ximian.com>
19319 * file-io.c: Don't consider sockets as directory and avoid an endless
19320 loop. Fix bug #76966.
19322 2006-01-03 Zoltan Varga <vargaz@gmail.com>
19324 * object.c (mono_nullable_init): New helper function.
19325 (mono_nullable_box): Ditto.
19327 * marshal.c (mono_marshal_get_runtime_invoke): Handle Nullables.
19329 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle Nullables.
19331 * icall.c (ves_icall_MonoField_GetValueInternal): Handle Nullables.
19333 2006-01-02 Zoltan Varga <vargaz@gmail.com>
19335 * class.c (mono_class_is_assignable_from): Make T assignable to
19338 2005-12-23 Sebastien Pouliot <sebastien@ximian.com>
19340 * appdomain.c: Bump corlib version to 46.
19341 * icalls.c: Renamed CurrentTimeZone to CurrentSystemTimeZone (for
19342 serialization purpose) and changed ves_icall_System_Reflection_
19343 Assembly_get_code_base signature to accept a boolean (to escape, or
19344 not, the assembly code base).
19346 2005-12-23 Dick Porter <dick@ximian.com>
19350 * threads.c: Added OpenMutex, OpenSemaphore and OpenEvent icalls.
19351 CreateEvent icall now returns "created" boolean parameter.
19353 2005-12-22 Zoltan Varga <vargaz@gmail.com>
19355 * marshal.c (mono_mb_emit_restore_result): Add generics support. Fixes
19358 * reflection.c (mono_custom_attrs_construct_by_type): Handle the case
19359 when attr_klass is an interface. Fixes #77045.
19361 2005-12-20 Zoltan Varga <vargaz@gmail.com>
19363 * marshal.c (emit_struct_conv): Fix previous patch.
19365 * marshal.c (emit_struct_conv): Add a check for fields with the same
19368 2005-12-20 Raja R Harinath <rharinath@novell.com>
19370 Fix regression in Mono.C5.
19371 * class.c (mono_class_create_generic): If 'klass' is an interface
19372 set up the interface offsets.
19373 (mono_class_is_assignable_from): Don't throw away generic arguments.
19375 2005-12-19 Raja R Harinath <rharinath@novell.com>
19377 * icall.c (ves_icall_System_MonoType_getFullName): Return NULL for
19380 2005-12-15 Raja R Harinath <rharinath@novell.com>
19382 * metadata.c (mono_metadata_parse_method_signature_full): Remove a
19384 (do_mono_metadata_parse_generic_class): Don't pass the current
19385 generic context when parsing the type being instantiated: it
19386 cannot use it, anyway.
19388 * loader.c (method_from_memberref): Don't inflate a signature if
19389 it doesn't contain any type parameters.
19391 2005-12-15 Zoltan Varga <vargaz@gmail.com>
19393 * class.c (mono_class_setup_vtable): Call mono_reflection_get_dynamic_overrides () to get the overrides in dynamic assemblies.
19395 2005-12-14 Martin Baulig <martin@ximian.com>
19398 (mono_type_get_name_recurse): Don't return null for type
19399 parameters and open generic classes.
19400 (mono_class_setup_methods): Don't exclude generic instances.
19401 (mono_get_unique_iid): Use different IDs for different
19402 instantiations of the same generic type.
19403 (mono_class_setup_vtable): Only use setup_generic_vtable() for
19404 open generic instances; create a normal vtable for closed generic
19406 (mono_class_setup_vtable_general): We're now also called for
19407 closed generic instances.
19410 (mono_reflection_bind_generic_parameters): Correctly use
19411 mono_metadata_lookup_generic_inst() everywhere.
19413 2005-12-14 Zoltan Varga <vargaz@gmail.com>
19415 * object.c (mono_class_create_runtime_vtable): Call
19416 mono_class_setup_vtable ().
19418 * reflection.c (mono_reflection_get_dynamic_overrides): New helper
19420 (ensure_runtime_vtable): Initialize the generic vtable lazily. Fixes
19423 * loader.c (mono_loader_set_error_type_load): Print the type load
19424 warnings to the console so they are more visible to the user.
19425 (mono_loader_set_error_method_load): Ditto.
19427 * reflection.c (ensure_runtime_vtable): Revert the last change as it
19430 * reflection.c (ensure_runtime_vtable): Fix build.
19432 * reflection.c (ensure_runtime_vtable): Disable an optimization which
19433 doesn't work in all cases.
19435 2005-12-13 Zoltan Varga <vargaz@gmail.com>
19437 * object.c (mono_array_new_full): Treat a single dimensional array
19438 with 0 lower bounds as an szarray. Fixes #76973.
19440 * reflection.c (custom_attr_visible): Really fix this.
19442 2005-12-12 Zoltan Varga <vargaz@gmail.com>
19444 * reflection.c (custom_attr_visible): Allow nested public attributes
19447 * class.c (mono_class_setup_vtable_general): Add missing != -1 to an
19450 2005-12-12 Raja R Harinath <harinath@gmail.com>
19452 * class.c (set_generic_param_owner): Delete.
19453 (mono_class_create_from_typedef): Don't set ->owner field of
19454 generic parameters to "param containers" of enclosing classes.
19455 * reflection.c (mono_reflection_initialize_generic_parameter):
19458 2005-12-11 Zoltan Varga <vargaz@gmail.com>
19460 * reflection.c (custom_attr_visible): Fix build.
19462 2005-12-10 Zoltan Varga <vargaz@gmail.com>
19464 * reflection.c (mono_custom_attrs_from_builders): Avoid returning
19465 private attributes.
19467 * reflection.c (reflection_methodbuilder_to_mono_method): Fix
19468 handling of null parameter defaults.
19470 2005-12-09 Raja R Harinath <rharinath@novell.com>
19472 * class.c (mono_class_from_generic_parameter): Don't set
19473 klass->generic_container.
19474 (my_mono_class_from_generic_parameter): Likewise.
19476 2005-12-07 Zoltan Varga <vargaz@gmail.com>
19478 * reflection.c (load_public_key): Fix a warning.
19479 (method_encode_code): Fix unaligned accesses.
19481 2005-12-07 Martin Baulig <martin@ximian.com>
19483 * object-internals.h (MonoReflectionGenericParam): Added `cattrs'.
19486 (write_generic_param_entry): Encode our custom attrs.
19488 * appdomain.c (MONO_CORLIB_VERSION): Bump to 45.
19490 2005-12-07 Martin Baulig <martin@ximian.com>
19492 * reflection.c (encode_new_constraint): Removed; we don't use the
19493 `NewConstraintAttribute' anymore.
19495 2005-12-06 Zoltan Varga <vargaz@gmail.com>
19497 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType): Do
19498 not fire a TypeResolve event when Assembly.GetType () is called.
19500 2005-12-05 Ben Maurer <bmaurer@ximian.com>
19502 Beginning of support for nullable types in the runtime. Parts of
19503 this patch are from Martin.
19505 * appdomain.c (MONO_CORLIB_VERSION): Bump
19507 * domain.c (mono_init_internal): get the nullable type
19509 * class.c (mono_class_is_nullable): New method
19510 (mono_class_get_nullable_param): New mehod
19511 (mono_class_create_generic): In types T? set cast_class to T
19513 * class-internals.h (MonoDefaults): new nullable default class
19514 (mono_class_get_nullable_param, mono_class_get_nullable_param):
19517 2005-12-05 Raja R Harinath <rharinath@novell.com>
19519 * metadata.c (select_container): New. Refactor code to select the
19520 appropriate GenericContainer given the type of generic parameter
19521 we are looking for.
19522 (mono_metadata_parse_generic_param): Take a MonoGenericContainer,
19523 not a MonoGenericContext. Use select_container. Update parameters.
19524 (do_mono_metadata_parse_type): Combine the code for MONO_TYPE_VAR
19525 and MONO_TYPE_MVAR.
19526 (unwrap_arrays): Remove duplicate tests.
19527 (find_generic_param): Rename from 'has_same_context'. Now walks a
19528 generic instantiated class to find any arguments that are generic
19530 (mono_type_create_from_typespec_full): Use find_generic_param to
19531 avoid evicting some generic instantiations from the typespec
19534 Mon Dec 5 15:07:42 GMT 2005 Paolo Molaro <lupus@ximian.com>
19536 * reflection.c: fixed writing of doubles on ARM FPA.
19538 2005-12-02 Robert Jordan <robertj@gmx.net>
19540 * icall.c: Fixed EventInfo.ReflectedType (#76829).
19542 2005-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19544 * filewatcher.c: try loading libgamin-1.so.0 before libfam, since at
19545 least on SUSE 10 they are not the same (on debian, they are just the
19548 2005-12-01 Raja R Harinath <rharinath@novell.com>
19550 * icall.c (ves_icall_MonoType_get_DeclaringType): Implement
19551 DeclaringType for VARs and MVARs.
19552 * class.c (set_generic_param_owner): Fix initialization of owner
19555 Wed Nov 30 15:48:22 CET 2005 Paolo Molaro <lupus@ximian.com>
19557 * icall.c: fixed Enum.ToObject() to correctly convert the values.
19559 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19561 * threadpool.c: workaround for a bug that shows up on the Mac:
19562 select()+connect() on a blocking socket is not like it should
19563 be, so we proceed to connect() in that case, wasting the I/O
19564 threadpool thread until connect succeedes. Fixes bug #75436.
19566 2005-11-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19568 * threadpool.c: fix typo when setting file descriptor states.
19570 2005-11-28 Raja R Harinath <rharinath@novell.com>
19572 * class-internals.h (MonoGenericContainer.is_signature): Remove.
19573 * metadata.c (mono_metadata_parse_method_signature_full): Don't
19574 create a temporary signature container.
19575 (mono_metadata_parse_generic_param): Update to changes.
19576 (mono_type_create_from_typespec_full): Update to changes.
19577 * loader.c (method_from_memberref): Don't use a
19578 MonoGenericContainer while parsing a memberref signature.
19579 (method_from_methodspec): Remove dead-store of the 'container'
19580 variable. It's overwritten before use.
19582 * metadata.c (mono_type_create_from_typespec_full): Make debugging
19584 (mono_metadata_parse_generic_param): Likewise.
19585 * loader.c (find_method_in_class): Does not need a
19586 MonoGenericContainer. Use 'mono_method_signature' rather than
19587 'mono_method_signature_full'.
19588 (find_method, mono_get_method_constrained, method_from_memberref):
19591 * metadata.c (mono_type_create_from_typespec_full): Ensure that
19592 owner-less generic-parameters are never evicted from the typespec
19595 * loader.c (method_from_memberref): Don't use the current context
19596 when parsing signatures.
19597 (method_from_methodspec, mono_get_method_from_token): Update to changes.
19599 * metadata.c (do_mono_metadata_parse_generic_class): Avoid
19600 side-effects in g_assert.
19601 * loader.c (mono_get_method_from_token): Resolve klass earlier so
19602 that we don't potentially lose information.
19604 2005-11-26 Dick Porter <dick@ximian.com>
19607 * threads.c: icalls to implement basic (ie, not named)
19608 System.Threading.Semaphore.
19610 2005-11-24 Dick Porter <dick@ximian.com>
19613 (ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal):
19614 Use GetProcessId() if it's available.
19616 2005-11-23 Zoltan Varga <vargaz@gmail.com>
19618 * icall.c threads-types.h threads.c: Add Exchange<T> icall.
19620 2005-11-23 Raja R Harinath <rharinath@novell.com>
19621 Ankit Jain <jankit@novell.com>
19623 * loader.c (mono_get_method_from_token): Initialize 'method' field
19624 of all generic parameters before parsing the signature. Remove
19625 code that "fixed"-up MVAR references.
19627 2005-11-23 Ankit Jain <jankit@novell.com>
19629 * metadata.c (mono_metadata_has_generic_params):
19630 (mono_metadata_load_generic_param_constraints):
19631 (mono_metadata_load_generic_params): Move duplicate code ...
19632 (mono_metadata_get_generic_param_row): ... here. Returns the
19633 first row-id in GenericParam table for a given owner (token).
19634 * metadata-internals.h (mono_metadata_get_generic_param_row): Add
19637 2005-11-23 Raja R Harinath <rharinath@novell.com>
19638 Ankit Jain <jankit@novell.com>
19640 * metadata.c (mono_metadata_class_equal): Pass signature_only when
19641 comparing VARs too.
19642 * icall.c (ves_icall_MonoType_get_DeclaringMethod): Look at
19643 type->data.generic_param only if the type is an MVAR.
19644 (ves_icall_MonoMethod_GetGenericArguments): Ensure that we don't
19645 leak owner-less VARs and MVARs into managed space.
19647 2005-11-21 Martin Baulig <martin@ximian.com>
19649 * class-internals.h
19650 (MonoMethod): Moved the `generic_container' here from
19651 `MonoMethodNormal' since we now also need it for
19652 `MonoMethodPInvoke';
19653 (MonoMethodNormal): Moved the `generic_container' to `MonoMethod'.
19654 (MonoMethodInflated): Replaced the `MonoMethodNormal nmethod' with
19655 an union containing both `MonoMethodNormal' and
19656 `MonoMethodPInvoke'.
19659 (mono_get_method_from_token): Allow implementing generic methods
19663 (ves_icall_System_Threading_Interlocked_CompareExchange_T): New
19666 2005-11-17 Dick Porter <dick@ximian.com>
19670 * process.c: Split the Process Start_internal icall into
19671 ShellExecuteEx_internal and CreateProcess_internal, which are
19672 called depending on whether UseShellExecute is true. Fixes bug
19675 * appdomain.c (MONO_CORLIB_VERSION): Incremented
19677 2005-11-17 Zoltan Varga <vargaz@gmail.com>
19679 * marshal.c (emit_ptr_to_object_conv): Get rid of the 'usize' and
19680 'msize' parameters, use the information in 'mspec' instead.
19681 (emit_object_to_ptr_conv): Ditto.
19683 * marshal.c (emit_struct_conv): Handle explicit layout structs with
19684 fields out of order. Fixes #76733.
19686 2005-11-17 Ankit Jain <jankit@novell.com>
19688 * metadata.c (mono_type_create_from_typespec_full): Remove unnecessary g_assert.
19690 2005-11-16 Atsushi Enomoto <atsushi@ximian.com>
19692 * icall.c : renamed MakeGenericMethod -> MakeGenericMethod_impl for
19695 2005-11-16 Zoltan Varga <vargaz@gmail.com>
19697 * object.c (mono_class_compute_gc_descriptor): Disable typed allocation
19698 for types with non-auto layout. Fixes #76717.
19700 2005-11-16 Ankit Jain <jankit@novell.com>
19702 * class.c (my_mono_class_from_generic_parameter): param->owner can be null.
19703 * metadata.c (mono_metadata_parse_generic_param): Create a dummy MonoGenericParam
19704 if generic_context is null.
19705 (mono_metadata_generic_param_equal): param->owner can be null.
19706 (mono_type_create_from_typespec_full): Don't cache the MonoType if param->owner is
19709 2005-11-16 Zoltan Varga <vargaz@gmail.com>
19711 * reflection.c (create_dynamic_mono_image): Set md_version_minor to
19714 2005-11-15 Martin Baulig <martin@ximian.com>
19716 * object.c (set_value): Use mono_class_from_mono_type() instead of
19717 the hack for generic instances; fixes #76136.
19719 2005-11-15 Zoltan Varga <vargaz@gmail.com>
19721 * metadata-internals.h (_MonoImage): Add 'md_version_major/minor'
19724 * image.c (load_metadata_ptrs): Initialize the new fields.
19726 * reflection.c (create_dynamic_mono_image): Ditto.
19728 * reflection.c (build_compressed_metadata): Use the new fields.
19730 * icall.c (ves_icall_System_Reflection_Module_get_MDStreamVersion): New
19733 * icall.c (mono_assembly_icalls): Remove obsolete get_MetadataToken
19736 2005-11-15 Ankit Jain <jankit@novell.com>
19737 Raja R Harinath <harinath@gmail.com>
19739 * class-internals.h (_MonoGenericContainer.types): New. Cache for MonoTypes.
19740 * metadata.c (mono_type_create_from_typespec_full): Use MonoType from the
19741 new per-generic_container cache if the cached MonoType's context matches
19742 the current context.
19743 (has_same_context): New. Check if the VARs or MVARs in a GENERIC_INST refer
19744 to the expected context.
19745 (unwrap_arrays): New. Get the element MonoType for an ARRAY/SZARRAY.
19747 2005-11-14 Carlos Alberto Cortez <calberto.cortez@gmail.com>
19749 * appdomain.c: Update MONO_CORLIB_VERSION to 42, since
19750 we changed the signature of an icall.
19751 * icall.c: Modify to mono_double_ParseImpl return true/false
19752 depending on the success, instead of throwing the exception. This will
19753 help us in Double.TryParse methods.
19755 2005-11-14 Zoltan Varga <vargaz@gmail.com>
19757 * marshal.c (emit_marshal_object): Throw an exception when
19758 marshalling 'object' instead of crashing. Fixes #76696.
19760 2005-11-11 Zoltan Varga <vargaz@gmail.com>
19762 * class-internals.h: Add prototype for mono_type_get_full_name ().
19764 2005-11-11 Dick Porter <dick@ximian.com>
19766 * threads.c (mono_thread_manage): Make sure the main thread has
19767 abandoned all its mutexes when cleaning up. Fixes bug 74680.
19769 2005-11-11 Zoltan Varga <vargaz@gmail.com>
19771 * loader.c (mono_loader_set_error_type_load): Log a warning to the
19772 console about the missing type.
19773 (mono_loader_set_error_method_load): Ditto.
19775 2005-11-09 Miguel de Icaza <miguel@novell.com>
19777 * mono-config.c (mono_get_config_dir): Set the system defaults if
19780 * assembly.c (mono_set_dirs): New API entry point to set the
19781 assembly and the config directory in one call
19783 2005-11-09 Zoltan Varga <vargaz@gmail.com>
19785 * marshal.c (mono_ftnptr_to_delegate): Throw a NotSupportedException if
19786 the ftnptr was created from a delegate in a domain other than the
19787 current domain. Fixes #75377.
19789 * exception.h exception.c: Add mono_get_exception_not_supported ().
19791 2005-11-08 Martin Baulig <martin@ximian.com>
19793 * mono-debug.h (MONO_DEBUGGER_VERSION): Bump to 53.
19795 2005-11-07 Sebastien Pouliot <sebastien@ximian.com>
19797 * security-manager.h: Added definitions to deal with strongname key
19798 pairs bigger (and smaller) than 1024 bits.
19799 * reflection.c: Remove hardcoded strongname size (128 bytes) and
19800 adjust wrt the public key length being used.
19802 2005-11-03 Atsushi Enomoto <atsushi@ximian.com>
19804 * marshal.c, icall.c : reverted sig->pinvoke changes which broke
19805 Windows build (r51396-51397).
19807 2005-11-03 Martin Baulig <martin@ximian.com>
19809 * class.c (mono_class_setup_vtable_general): Also add generic
19810 methods to the vtable; fixes #76581.
19812 2005-11-01 Miguel de Icaza <miguel@novell.com>
19814 * string-icalls.c (ves_icall_System_String_ctor_encoding): Make
19815 sure that we lookup GetString method from the System.Text.Encoding
19816 class, not the derived class or we get an empty method.
19818 Fixed class #76612.
19820 2005-10-25 Miguel de Icaza <miguel@novell.com>
19822 * assembly.c (mono_assemblies_init): Do not set the Mono root dir
19823 if it has been previously set (embedders).
19825 Make mono_set_rootdir available also on Unix.
19827 005-10-24 Robert Jordan <robertj@gmx.net>
19829 * assembly.c: fixed MONO_ASSEMBLIES to be NULL on cygwin as well.
19831 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
19833 * marshal.c icall.c: Clean up the usage of sig->pinvoke flag. Now
19834 only calls which are made to native code use this flag.
19836 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): Remove the check for FieldBuilders as it is now done in managed code.
19838 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
19840 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
19841 Add support for FieldBuilders.
19843 2005-10-29 Martin Baulig <martin@ximian.com>
19846 (mono_debug_using_mono_debugger): New public method; returns
19847 whether we're running inside the debugger.
19849 2005-10-27 Zoltan Varga <vargaz@gmail.com>
19851 * reflection.c (mono_reflection_get_custom_attrs_info): Add support
19852 for Method/Constructor/FieldBuilders.
19854 2005-10-26 Zoltan Varga <vargaz@gmail.com>
19856 * reflection.c (module_add_cattrs): Save custom attributes for global methods
19857 and fields as well.
19859 2005-10-26 Martin Baulig <martin@ximian.com>
19861 * mono-debug-debugger.c
19862 (MonoDebuggerMetadataInfo): Added `klass_parent_offset'.
19864 2005-10-24 Raja R Harinath <harinath@gmail.com>
19866 * icall.c (base64_to_byte_array): Don't pass an out-of-range
19867 integer to isspace.
19869 2005-10-21 Zoltan Varga <vargaz@gmail.com>
19871 * marshal.c (emit_marshal_vtype): Correctly handle [In,Out] modifiers
19872 when passing valuetypes byref. Fixes #76502.
19874 2005-10-19 Jackson Harper <jackson@ximian.com>
19876 * profiler.c: Don't put a . in front of types that are not in a
19879 2005-10-18 Zoltan Varga <vargaz@gmail.com>
19881 * icall.c (ves_icall_Type_GetField): Applied patch from Robert Jordan (robertj@gmx.net). Fixes #75515.
19883 2005-10-15 Zoltan Varga <vargaz@freemail.hu>
19885 * marshal.c: Add generics support to the ldfld/stfld wrappers. Fixes
19887 (mono_marshal_get_ldflda_wrapper): Fix a warning.
19889 2005-10-13 Carlos Alberto Cortez <calberto.cortez@gmail.com>
19891 * assembly.c metadata-internals.h icall.c: Define an additional
19892 parameter for mono_assembly_name_parse_full, so we can avoid creating
19893 S.R.AssemblyName.Version when no version info wasn't passed.
19895 2005-10-09 Miguel de Icaza <miguel@novell.com>
19897 * class.c (mono_type_get_full_name): Reimplement method that was
19900 * image.c: Some docs
19902 2005-10-10 Zoltan Varga <vargaz@gmail.com>
19904 * profiler.c (output_newobj_profile): Fix printing of Total memory
19907 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
19909 * profiler.c: Add support for allocations > 2GB. Fixes #74886.
19911 2005-10-08 Gert Driesen <drieseng@users.sourceforge.net>
19913 * threads.c: remove debug output.
19915 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
19917 * threads.c (mono_thread_manage): Fix crashes if more than 64
19918 threads need to be aborted. Hopefully fixes #75899.
19920 * assembly.c (mono_stringify_assembly_name): New helper function.
19922 * class.c: Use mono_stringify_assembly_name instead of the similar
19925 * assembly.h assembly.c: Add support for calling a postload search
19926 hook if an assembly cannot be loaded.
19928 * appdomain.c: Register new search hooks which call the AssemblyResolve
19929 events in AppDomain. Fixes #75231
19931 2005-10-07 Martin Baulig <martin@ximian.com>
19933 * mono-debug.c (mono_debug_add_method): Create a wrapper entry for
19934 methods without debug info.
19936 2005-10-07 Zoltan Varga <vargaz@gmail.com>
19938 * class-internals.h debug-helpers.c marshal.h marshal.c: Add ldflda
19941 2005-10-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19943 * file-io.c: now that we return symlinks, use lstat and, when the file
19944 is a symbolic link, stat, to get the file attributes. Also avoid the
19945 conversion to/from utf16/external.
19947 2005-10-06 Zoltan Varga <vargaz@gmail.com>
19949 * class.c (mono_class_layout_fields): Compute klass->has_references
19950 correctly if an embedded valuetype is not yet initialized. Fixes
19953 2005-10-04 Martin Baulig <martin@ximian.com>
19956 (mono_metadata_load_generic_param_constraints): New public
19957 function; splitted the constraints loading out from
19958 mono_metadata_load_generic_params().
19960 * class.c (mono_class_create_from_typedef): Call
19961 mono_metadata_load_generic_param_constraints() after setting up
19962 the type and creating our parent; fixes #75329.
19964 2005-10-04 Martin Baulig <martin@ximian.com>
19966 * icall.c (ves_icall_MonoGenericClass_GetParentType): Allow
19967 non-dynamic parent classes.
19969 2005-10-04 Atsushi Enomoto <atsushi@ximian.com>
19971 * file-io.c : win32 build fix (ETXTBSY seems not found).
19973 2005-10-04 Martin Baulig <martin@ximian.com>
19976 (mono_image_get_methodspec_token): Make the cache actually work;
19979 2005-10-04 Martin Baulig <martin@ximian.com>
19981 * class.c (mono_class_name_from_token): Removed the unneccessary
19982 `MonoGenericContext *' argument.
19984 2005-10-04 Martin Baulig <martin@ximian.com>
19987 (method_from_methodspec): Make the caching work again; fixes the
19988 performance regression from #76262.
19990 2005-10-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19994 * icall.c: replace FindFirst/FindNext/FindClose calls with a new
19995 GetFileSystemEntries that performs the same work but without going
19996 into io-layer, locking, etc.
19998 2005-09-30 Zoltan Varga <vargaz@gmail.com>
20000 * threads.c (ves_icall_System_Threading_Thread_Abort): Handle
20001 ThreadState_Stopped as well. Fixes #76047.
20003 2005-09-29 Martin Baulig <martin@ximian.com>
20006 (inflate_generic_context): If the new context has a `gmethod', set
20007 its `container' that that gmethod's `container'.
20010 (mono_metadata_parse_generic_param): Simplify things;
20011 `generic_container = generic_context->container;' is just fine.
20013 * loader.c (method_from_methodspec): Code cleanups.
20015 Wed Sep 28 17:06:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
20017 * decimal.c: fix warning (and let gcc generate correct
20018 code on ARM with optimizations).
20020 2005-09-28 Martin Baulig <martin@ximian.com>
20023 (method_from_memberref): Added `MonoGenericContext *class_context'
20024 argument; this is used when parsing a MONO_MEMBERREF_PARENT_TYPESPEC.
20025 (method_from_methodspec): If we're a memberref, use the enclosing
20026 context when parsing its parent. Fixes #76262; see gtest-206.cs.
20028 2005-09-28 Martin Baulig <martin@ximian.com>
20030 * object.c (mono_runtime_invoke_array): Added support for
20031 MONO_TYPE_GENERICINST; fixes #75917.
20033 2005-09-27 Martin Baulig <martin@ximian.com>
20035 * reflection.c (encode_type): For `MONO_TYPE_CLASS/VALUETYPE', use
20036 `k->byval_arg.type' to determine the actual type.
20038 * loader.c (method_from_methodspec): Removed some hacks.
20040 2005-09-27 Ben Maurer <bmaurer@ximian.com>
20042 * class-internals.h (mono_field_is_deleted): Do the test for
20043 rtspecialname before we check the actual name of the field. This
20044 prevents us from dereferencing a pointer into the string table,
20045 saving us from accessing a few pages
20047 * *.c: Replace the use of {Enter,Leave}CriticalSection with
20048 macros. This will allow a deadlock debugger to easily be plugged
20051 2005-09-27 Martin Baulig <martin@ximian.com>
20053 * loader.c (method_from_methodspec): Create a "signature"
20054 MonoGenericContainer and use mono_get_method_full(). Fixes #75584.
20056 2005-09-27 Martin Baulig <martin@ximian.com>
20059 (inflate_generic_class): Correctly set the new context's
20063 (find_method, find_method_in_class): Take a `MonoGenericContainer *'
20064 instead of a `MonoGenericContext *'.
20065 (mono_method_signature_full): Take a `MonoGenericContainer *'
20066 instead of a `MonoGenericContext *'.
20069 (mono_metadata_parse_signature_full): Take a `MonoGenericContainer *'
20070 instead of a `MonoGenericContext *'.
20071 (mono_metadata_parse_method_signature_full): Likewise.
20073 2005-09-26 Martin Baulig <martin@ximian.com>
20076 (mono_class_from_generic_parameter): Set `klass->generic_container'
20077 (mono_class_from_generic_parameter): Likewise.
20078 (mono_bounded_array_class_get): We inherit the generic container
20079 from the element class.
20082 (find_method, find_method_in_class): Take a `MonoGenericContext *'
20083 argument rather than computing it here.
20084 (method_from_memberref): Correctly set the generic context before
20085 parsing the signature. Fixes #75681.
20087 2005-09-26 Zoltan Varga <vargaz@gmail.com>
20089 * object.c (mono_class_has_special_static_fields): Fix warnings.
20091 2005-09-26 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20093 * assembly.c: Add parse_public_key function, to
20094 par the public keys. Also added mono_assembly_name_parse_full,
20095 to define it the parsed key should be freed or not.
20096 * icall.c: Added ves_icall_System_Reflection_AssemblyName_ParseName,
20097 to parse a long format assembly name.
20098 * metadata-internals.h: Keep mono_assembly_name_parse_full as
20099 private, since calling it to preserve the key requires
20100 freeing it manually.
20102 2005-09-26 Atsushi Enomoto <atsushi@ximian.com>
20104 * locales.c : removed HAVE_ICU part.
20106 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
20108 * object.c (mono_class_create_runtime_vtable): Avoid calling
20109 field_is_special_static if the klass has no special static fields.
20111 * class-internals.h (MonoClass): Add 'no_special_static_fields' flag.
20112 (MonoCachedClassInfo): Likewise.
20114 * object.c (mono_class_has_special_static_fields): New helper function.
20116 2005-09-23 Zoltan Varga <vargaz@gmail.com>
20118 * class.c (mono_class_create_from_typedef): Don't call
20119 interfaces_from_typedef_full for enums.
20120 (mono_class_create_from_typedef): Compute the base types of enums directly
20121 without calling mono_class_setup_fields ().
20122 (mono_class_find_enum_basetype): New helper function.
20124 * reflection.c (mono_image_build_metadata): Emit type names+namespaces at
20125 one place inside the string heap.
20127 Fri Sep 23 19:37:46 CEST 2005 Paolo Molaro <lupus@ximian.com>
20129 * class.c: locking fixes, code cleanups, some docs added.
20130 Allocate some data structures in the image mempool.
20132 2005-09-23 Zoltan Varga <vargaz@gmail.com>
20134 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
20137 Fri Sep 23 18:27:02 CEST 2005 Paolo Molaro <lupus@ximian.com>
20139 * class-internals.h, class.c, reflection.c: reduce memory taken by
20142 Fri Sep 23 17:56:21 CEST 2005 Paolo Molaro <lupus@ximian.com>
20144 * metadata.c, metadata.h, loader.h: documentation updates, code and
20147 2005-09-23 Zoltan Varga <vargaz@gmail.com>
20149 * rawbuffer.c: Remove unneccessary set_n_pagefaults () routine and update
20152 * rawbuffer.h rawbuffer.c: Add code and APIs to help determine the number of
20153 page faults caused by the runtime while reading metadata.
20155 2005-09-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20157 * socket-io.c: the field names were changed 3 months ago and no one
20158 realized until bug #76077 got filed!
20160 2005-09-20 Martin Baulig <martin@ximian.com>
20162 * icall.c (assembly_icalls): Removed some unused debugger icalls.
20164 2005-09-20 Martin Baulig <martin@ximian.com>
20166 * mono-debug.c (mono_debug_add_type): Ignore array types and don't
20167 write the rank into the class entry.
20169 2005-09-20 Martin Baulig <martin@ximian.com>
20171 * mono-debug-debugger.c (MonoDebuggerMetadataInfo): Added some stuff.
20173 2005-09-19 Zoltan Varga <vargaz@gmail.com>
20175 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20177 * icall.c (custom_attrs_defined_internal): New icall.
20179 * reflection.c (mono_reflection_get_custom_attrs_by_type): New helper
20181 (mono_custom_attrs_construct_by_type): New helper function.
20183 2005-09-17 Zoltan Varga <vargaz@freemail.hu>
20185 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): Null
20186 terminate the resulting string. Fixes #76123.
20188 2005-09-16 Martin Baulig <martin@ximian.com>
20191 (mono_debug_add_method): Ignore inflated methods for the moment.
20193 2005-09-14 Martin Baulig <martin@ximian.com>
20195 * debug-mono-symfile.h (MONO_SYMBOL_FILE_VERSION): Bump version to 39.
20197 2005-09-13 Zoltan Varga <vargaz@gmail.com>
20199 * metadata.c (mono_class_get_overrides_full): Modify signature to explicitly
20200 return a success/failure indication.
20201 (mono_metadata_interfaces_from_typedef_full): Ditto.
20202 (get_constraints): Ditto.
20204 2005-09-12 Zoltan Varga <vargaz@gmail.com>
20206 * marshal.c (emit_marshal_array): Fix handling of null arrays.
20208 * marshal.c (emit_marshal_array): Add support for returning string
20209 arrays from delegates. Fixes #76063.
20211 * marshal.c: Use the emit_ldloc/stloc macros where possible.
20213 2005-09-11 Zoltan Varga <vargaz@gmail.com>
20215 * threads.c (ves_icall_System_Threading_Thread_MemoryBarrier): New
20218 2005-09-09 Zoltan Varga <vargaz@gmail.com>
20220 * reflection.c icall.c: Fix after mono_get_exception_type_load
20223 * assembly.c (mono_assembly_get_assemblyref): New helper function.
20224 (mono_assembly_load_reference): Use the new helper.
20226 * class-internals.h (MonoLoaderError): New structure containing
20227 information about type loading errors.
20229 * class-internals.h loader.c: Add APIs to store per-thread loader
20232 * loader.c class.c: Set the loader error if needed.
20234 * exception.h exception.c: Add functions to throw MissingMethod/MissingFieldExceptions.
20236 Thu Sep 8 18:54:07 BST 2005 Paolo Molaro <lupus@ximian.com>
20238 * decimal.c: fixed to handle the broken ARM fp format.
20240 Wed Sep 7 22:17:58 BST 2005 Paolo Molaro <lupus@ximian.com>
20242 * icall.c: on ARM use the libc strtod(), since bsd_strtod() seems
20245 2005-09-06 Martin Baulig <martin@ximian.com>
20247 * domain.c (supported_runtimes): Added v2.0.50727.
20249 Tue Sep 6 11:40:24 CEST 2005 Paolo Molaro <lupus@ximian.com>
20251 * culture-info.h: reduce the size of some structures.
20253 2005-09-05 Martin Baulig <martin@ximian.com>
20255 Reflect latest API changes in the August CTP.
20258 ("Type.BindGenericParameters"): Renamed to "MakeGenericType".
20259 ("MonoType.HasGenericArguments"): Removed.
20260 ("MonoMethod.BindGenericParameters"): Renamed to
20261 "MakeGenericMethod".
20262 ("MethodBuilder.BindGenericParameters"): Renamed to
20263 "MakeGenericMethod".
20265 2005-09-05 Martin Baulig <martin@ximian.com>
20267 * mono-debug-debugger.c: Moved the debugger icalls into icall.c.
20269 2005-09-05 Martin Baulig <martin@ximian.com>
20271 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20273 * icall.c (ves_icall_Type_get_IsGenericType): Return true also if
20274 generic_container is non-NULL.
20276 2005-09-05 Martin Baulig <martin@ximian.com>
20278 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20280 * object.c (set_value): In MONO_TYPE_VALUETYPE, add generics support.
20282 2005-08-29 Michal Moskal <malekith@nemerle.org>
20284 * reflection.c (encode_locals,
20285 mono_reflection_sighelper_get_signature_local): Increase buffer sizes
20286 for large generic types.
20288 2005-09-05 Martin Baulig <martin@ximian.com>
20290 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20292 * class.c (mono_dup_array_type): New public method.
20293 (mono_metadata_signature_deep_dup): New public method.
20294 (dup_type): Correctly duplicate array and function types.
20296 2005-09-05 Martin Baulig <martin@ximian.com>
20298 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20300 * reflection.c (get_default_param_value_blobs): Handle generic types
20301 and generic methods.
20303 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
20305 * class.c: Fixed error reporting (method/class were inversed) for
20306 inheritance demands.
20307 * security-manager.c|h: Added the AppDomain when calling the managed
20308 System.Security.SecurityManager.InheritanceDemand method.
20310 2005-09-01 Raja R Harinath <rharinath@novell.com>
20312 * reflection.c (encode_marshal_blob): 'marshaltype' and
20313 'marshaltyperef' are alternate sources for the custom marshaler
20316 Wed Aug 31 17:39:54 CEST 2005 Paolo Molaro <lupus@ximian.com>
20318 * class.c: fix creation of array classes with rank == 1
20319 (patch by Ankit Jain <jankit@novell.com>).
20321 Wed Aug 31 17:35:19 CEST 2005 Paolo Molaro <lupus@ximian.com>
20323 * object.c: fix check for creating the bound data for arrays vs
20326 2005-08-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20328 * object.c: configuration file name is now based on the executable name,
20329 not the image name. Fixes bug #75931.
20331 2005-08-29 Zoltan Varga <vargaz@gmail.com>
20333 * marshal.c (emit_thread_interrupt_checkpoint_call): Load the
20334 flag using LDIND_U4 since it leads to smaller and faster code on ia64.
20336 2005-08-25 Zoltan Varga <vargaz@gmail.com>
20338 * rand.c: Use wincrypt.h instead of WinCrypt.h.
20340 2005-08-24 Ankit Jain <jankit@novell.com>
20341 Raja R Harinath <rharinath@novell.com>
20343 * class.c (mono_class_from_typeref): Don't call mono_class_init as we might've been
20344 called by it recursively.
20345 (mono_class_init): Remove special case in pending_init handling, since it's
20346 superseded by the fix to mono_class_from_typeref.
20348 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
20350 * threads.c (ves_icall_System_Threading_Thread_Thread_internal): Remove the
20351 BROKEN_THREAD_START stuff.
20353 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
20355 * class-internals.h object.c: Add a new kind of trampoline called a delegate
20358 * domain-internals.h domain.c: Add a has for delegate trampolines to MonoDomain.
20360 * object.c (mono_delegate_ctor): Replace the original function address with
20361 a delegate trampoline.
20363 2005-08-21 Gert Driesen <drieseng@users.sourceforge.net>
20365 * icall.c: add boolean argument to base64_to_byte_array and
20366 InternalFromBase64String to control whether a whitespace-only string
20367 is allowed (or should casue a FormatException to be thrown). We need
20368 this as the behavior has changed between MS.NET 1.x and 2.0, and we
20369 to match the MS behaviour in both profiles.
20370 * appdomain.c: Bump corlib version.
20372 2005-08-20 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20374 This patch implements a big portion of publisher policy
20375 support, used to bind assembly versions and redirect
20376 one assembly from version A to version B.
20379 New GSList loaded_assembly_bindings, for storing the cached
20381 (assembly_binding_maps_name): New static function for checking if a
20382 assembly binding information maps an assembly name.
20383 (mono_assembly_binding_info_free): New function for freeing
20384 assembly binding information resources.
20385 (get_publisher_policy_info): New static function for retrieving
20386 assembly binding information from a MonoImage.
20387 (compare_versions): New static function for comparing an assembly
20388 binding information data and the version of an assembly name.
20389 (check_policy_versions): New static function for checking if an
20390 assembly binding info mapping an assembly name is valid for it.
20391 (mono_assembly_load_publisher_policy): New static function for
20392 loading the 'policy.major.minor.MyAssembly' image for an assembly
20393 with an assembly name 'aname'.
20394 (mono_assembly_bind_version): New static function for updating
20395 assembly redirection.
20396 (mono_assembly_apply_binding): New static function for applying
20398 (search_binding_loaded): New static function for searching
20399 loaded assembly binding infos in the cache domain.
20400 (mono_assembly_load_full): Don't apply assembly binding for
20401 reflection only assemblies.
20403 * metadata-internals.h: Add MonoAssemblyBindingInfo,
20404 which contains information about assembly binding. Also
20405 declare signature for mono_config_parse_publisher_policy ()
20406 function, used to retrieve pub policy info.
20409 (publisher_policy_start): New static function used to parse publisher
20410 policy config files.
20411 (publisher_policy_parser): New static MonoParseHandler containing
20412 the functions used when parsing config files.
20413 (mono_config_parse_publisher_policy): New function for parsing
20414 publisher policy files.
20416 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
20418 * object.c (mono_delegate_ctor): Add support for IA64 function descriptors.
20420 * marshal.c (mono_delegate_free_ftnptr): Ditto.
20422 * object.c (mono_get_addr_from_ftnptr): New helper function.
20424 * object.h (mono_array_addr): Fix unaligned access warnings on IA64.
20426 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
20428 2005-08-19 Dick Porter <dick@ximian.com>
20430 * threads.c, threads.h, appdomain.c, appdomain.h,
20431 profiler-private.h, monitor.c, object.c, object-internals.h,
20432 profiler.c, mono-debug-debugger.h, profiler.h: Use a gsize to
20433 store the thread ID, so it can hold a 64 bit value if needed.
20435 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
20437 * reflection.c (mono_reflection_create_dynamic_method): Store the
20438 handle class into the method references as well so ldtoken works in
20441 * icall.c (ves_icall_MonoField_GetValueInternal): Add support for generic
20444 2005-08-19 Ankit Jain <jankit@novell.com>
20447 * marshal.c (mono_marshal_get_ptr_to_struct): Build method signature
20448 here rather than using the method signature of a arbitrary function
20449 named 'System.Runtime.InteropServices.Marshal::PtrToStructure' with
20451 Hack done with Harinath.
20453 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20455 * threadpool.c: disable printing stack traces when we get a exception
20456 in a threadpool thread. I need to do more testing to figure out which
20457 cases actually print this. Fixes bug #75828.
20459 2005-08-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20461 * icall.c: there might be ignored whitespace after the last '='. This
20462 fixes length computation and bug #75840.
20464 2005-08-18 Zoltan Varga <vargaz@freemail.hu>
20466 * assembly.c (mono_assembly_load_full): Consider .exe extension as
20467 well. Fixes #75809.
20469 * reflection.c (create_custom_attr): Fix unmanaged memory leak. Fixes
20472 * reflection.c (create_custom_attr_data): Ditto.
20474 2005-08-17 Atsushi Enomoto <atsushi@ximian.com>
20476 * locales.c, culture-info.h : removed RegionLCIDMap.
20477 * culture-info-tables.h : regenerated.
20479 2005-08-16 Martin Baulig <martin@ximian.com>
20481 * class.c (mono_type_get_name_recurse): Small fix.
20483 2005-08-16 Atsushi Enomoto <atsushi@ximian.com>
20485 * locales.c : indentation fixie.
20487 2005-08-15 Atsushi Enomoto <atsushi@ximian.com>
20489 * object-internals.h,
20493 icall.c : added RegionInfo table support.
20494 * culture-info-table.h : regenerated for region support.
20496 2005-08-14 Kamil Skalski <nazgul@nemerle.org>
20498 * reflection.c (resolve_object): handle all kinds of MonoMethod
20499 including generic ones
20501 2005-08-12 Ankit Jain <jankit@novell.com>
20503 * get.c (dis_stringify_variant_type): New. Stringify MonoMarshalVariant.
20504 (dis_stringify_marshal_spec): Add new case for MONO_NATIVE_SAFEARRAY.
20506 2005-09-12 Lluis Sanchez <lluis@ximian.com>
20508 * process.c: Don't close a thread handle when it's NULL. This is a
20509 workaround for bug #75733.
20511 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
20513 * marshal.c (mono_marshal_get_string_encoding): Fix handling of CharSet.Auto. Fixes #75769.
20515 2005-08-10 Zoltan Varga <vargaz@freemail.hu>
20517 * icall.c (ves_icall_Type_get_IsGenericType): New icall.
20519 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20521 * threadpool.c: if a work item in the thread pool has a callback that
20522 catches a exception, don't propagate it after invoking the callback.
20525 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
20527 * class.c (class_compute_field_layout): Rename this to mono_class_setup_fields.
20529 * class-internals.h (MonoCachedClassInfo): Add some new fields.
20531 * class.c (mono_class_init): Load field info lazily in the AOT case.
20533 * reflection.c (mono_image_load_module): Fix error checking. Fixes #75660.
20535 2005-08-03 Ankit Jain <jankit@novell.com>
20538 * loader.c (mono_method_signature_full): Use MONO_CALL_DEFAULT if
20539 PInvoke calling convention is 0.
20541 2005-08-02 Zoltan Varga <vargaz@freemail.hu>
20543 * socket-io.c (convert_sockopt_level_and_name): Applied patch from
20544 Julien Puydt (julien.puydt@laposte.net). Add check for IPV6_PKTINFO.
20546 Mon Aug 1 16:52:12 CEST 2005 Paolo Molaro <lupus@ximian.com>
20548 * gc-internal.h, threads.c, null-gc.c, boehm-gc.c: added interface
20549 to handle threads not started by the GC (patch by Michael Meeks
20550 <michael.meeks@novell.com>).
20552 2005-07-31 Kamil Skalski <nazgul@omega.pl>
20554 * reflection.c: Make buffer used in emitting types larger for some
20555 big generic types (patch by Michal Moskal).
20557 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
20559 * mono-debug.c: Fix some (not all) alignment problems.
20561 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20563 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw):
20564 Invoke mono_image_load_from_data_full passing the refonly
20568 (mono_assembly_open_from_bundle): Add the refonly argument,
20569 in order to pass it to other methods it calls to.
20570 (do_mono_assembly_open): Add the refonly argument, in order
20571 to pass it to other methods it calls to.
20572 (mono_assembly_open_full): Invoke do_mono_assembly_open passing
20573 the refonly parameter to it.
20575 * image.c: Add loaded_images_refonly_hash and
20576 loaded_images_refonly_guid_hash to cache the reflection
20577 only loaded images.
20578 (mono_images_init): Initialize the hash tables used for
20579 caching the reflection only images.
20580 (load_modules): Invoke mono_image_open_full passing the refonly
20581 parameter to load the modules the correct way.
20582 (build_guid_table): Add the refonly argument, to re-build the
20583 correct hash table.
20584 (do_mono_image_open): Added the refonly argument, in order to
20585 define it for the loaded image.
20586 (mono_image_loaded_full): New function, which receives an
20587 additional parameter to look for the image in the refonly or
20588 non-refonly section.
20589 (mono_image_loaded): Updated, using mono_image_loaded_full.
20590 (mono_image_loaded_by_guid_full): The same case that happens
20591 with mono_image_loaded_full.
20592 (mono_image_loaded_by_guid): Likewise.
20593 (register_image): Use the ref_only variable inside MonoImage
20594 to decide in which hash table store the current image.
20595 (mono_image_open_from_data_full): Rename
20596 mono_image_open_from_data to mono_image_open_from_data_full,
20597 adding the refonly argument, to define the ref_only variable
20599 (mono_image_open_from_data): Return
20600 mono_image_open_from_data_full.
20601 (mono_image_open_full): Rename mono_image_open to
20602 mono_image_open_full, receiving the new refonly argument,
20603 to pass it to inner methods.
20604 (mono_pe_file_open): Update this function, to open
20605 a MonoImage as a non-refonly image.
20606 (mono_image_close): Use the refonly variable inside
20607 MonoImage to remove the image from the correct caches.
20609 * image.h: Add the signatures of mono_image_open_full,
20610 mono_image_open_from_data_full, mono_image_loaded_full,
20611 mono_image_loaded_by_guid_full.
20613 * metadata-internals.h: Add the ref_only field to
20616 2005-07-29 Carlos Alberto Cortez <calberto.cortez@gmail.com>
20618 * icall.c (ves_icall_System_Reflection_GetReferencedAssemblies):
20619 Fix the last behavior, which used to load the assemblies and
20620 extract MonoReflectionAssemblyName information, instead of
20621 extract it from the metadata tables. Needed for Reflection
20624 2005-07-29 Martin Baulig <martin@ximian.com>
20626 * mono-debug-debugger.c
20627 (mono_debugger_lock, mono_debugger_unlock): g_assert() if we're
20631 (mono_debug_address_from_il_offset): Check whether we have
20632 debugging support before attempting to take the lock.
20633 (mono_debug_source_location_from_address): Likewise.
20634 (mono_debug_source_location_from_il_offset): Likewise.
20635 (mono_debug_il_offset_from_address): Likewise.
20636 (mono_debug_address_from_il_offset): Likewise.
20638 2005-07-29 Zoltan Varga <vargaz@freemail.hu>
20640 * class.c (mono_class_from_name_case): Add support for dynamic images.
20643 * object.c (mono_class_compute_gc_descriptor): Add a workaround
20646 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
20648 * reflection.c (mono_method_get_object): Fix warning.
20650 2005-07-28 Martin Baulig <martin@ximian.com>
20653 (mono_debug_add_wrapper): Also write the wrapper type.
20655 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
20657 * class-internals.h (MonoCachedClassInfo): Add has_nested_classes field.
20659 * class.c (mono_class_init): Avoid reading nested classes if the AOT
20660 data indicates the class has none.
20662 2005-07-26 Ben Maurer <bmaurer@ximian.com>
20664 * mono-debug.c, debug-mono-symfile.c: Replace the use of the
20665 loader lock with the debugger lock. Prevents deadlocks for beagle.
20667 Beagle can now run on an smp box for a weekend without any
20670 2005-07-26 Zoltan Varga <vargaz@freemail.hu>
20672 * class.c (mono_bounded_array_class_get): Avoid crash if eclass is
20673 in a module. Fixes #75629.
20675 2005-07-26 Martin Baulig <martin@ximian.com>
20677 * mono-debug.c (mono_debug_add_wrapper): New static method.
20678 (mono_debug_add_method): Call mono_debug_add_wrapper() if we're an
20679 interncall or a wrapper.
20681 * mono-debug.h (MonoDebugWrapperData): New public typedef.
20682 (MonoDebugDataItemType): Added `MONO_DEBUG_DATA_ITEM_WRAPPER'.
20683 (MONO_DEBUGGER_VERSION): Bump to 51.
20685 * mono-debug-debugger.c
20686 (mono_debugger_add_type): Removed this empty function.
20687 (mono_debugger_add_method): Likewise.
20689 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
20691 * icall.c (ves_icall_Type_GetMethodsByName): Call setup_vtable ()
20692 before accessing method->slot.
20694 2005-07-21 Jb Evain <jbevain@gmail.com>
20696 * reflection.c (method_encode_clauses/class): Handle filters clauses.
20699 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
20701 * marshal.c (emit_marshal_custom): Implement byref marshalling. Fixes
20704 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
20706 * image.h image.c: Add mono_image_get_guid () API function.
20708 2005-07-19 Ben Maurer <bmaurer@ximian.com>
20710 There were issues when multiple threads tried to load
20711 assemblies. A deadlock was created between assemblies_mutex and
20712 mono_domain_assemblies_lock. This fixes the issue by making the
20713 assembly ref counting be lock free. See bug 75586.
20715 * image.c (mono_image_close): The add ref function here was using
20716 Interlocked operations while the unref was using a mutex and a
20717 --. I don't think this was ever a bug that would be exposed in a
20718 non-pendantic way (ie, by an embedder doing a ref on one thread
20719 and an unref on another), but for the sake of correctness, this is
20722 * assembly.c (mono_assembly_addref): Use InterlockedIncrement
20723 (mono_assembly_load_reference): Call mono_assembly_addref rather
20724 than touching the refcount ourselves.
20725 (mono_assembly_close): Use InterlockedDecrement to unref the
20726 assembly. Don't acquire the lock unless it is actually needed.
20728 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
20730 * class.c (mono_class_layout_fields): Fix calculation of has_references
20733 2005-07-12 Martin Baulig <martin@ximian.com>
20735 Applying a patch from Michal Moskal <malekith@nemerle.org>.
20738 (mono_type_hash): Provide better hashing for generic instances.
20739 (mono_generic_inst_hash): Improve hashing.
20740 (mono_generic_class_hash): Likewise.
20742 * reflection.c (mymono_metadata_type_hash): Improve hashing for
20745 2005-07-12 Martin Baulig <martin@ximian.com>
20747 * reflection.c (mono_reflection_create_runtime_class): Remove the
20748 hack for generic type definitions and non-`Run' assemblies.
20749 (mono_reflection_bind_generic_parameters): Also use
20750 `klass->wastypebuilder' to check for TypeBuilders.
20752 2005-07-12 Zoltan Varga <vargaz@freemail.hu>
20754 * class.c (mono_class_layout_fields): Fix calculation of has_references
20757 * class.c (inflate_generic_class): Fix a leak.
20758 (mono_class_init): Fix calculation of gchimpl and has_finalize fields
20761 2005-07-11 Martin Baulig <martin@ximian.com>
20763 * icall.c (ves_icall_Type_BindGenericParameters): Don't crash here
20766 2005-07-11 Martin Baulig <martin@ximian.com>
20768 * loader.c (find_method): Also lookup in
20769 `mono_defaults.object_class' if we're an interfaces; fixes #75460.
20771 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
20773 * appdomain.c (mono_domain_unload): Don't free the error message
20774 before passing it to mono_get_exception_...
20776 * reflection.c (CACHE_OBJECT): Fix the race introduced by the previous patch.
20778 Thu Jul 7 19:59:31 CEST 2005 Paolo Molaro <lupus@ximian.com>
20780 * threads.c: try to better guess an available RT signal (bug #75387).
20782 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
20784 * reflection.c (CACHE_OBJECT): Don't hold the domain lock between CHECK_OBJECT
20787 2005-07-07 Martin Baulig <martin@ximian.com>
20789 * class.c (mono_type_get_name_full): Return NULL for
20790 MONO_TYPE_NAME_FORMAT_FULL_NAME if we have any generic parameters;
20793 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
20795 * threads.c (mono_threads_abort_appdomain_threads): Wait for threads to
20796 exit the appdomain as well being aborted.
20798 * threadpool.c: Create all threadpool threads inside the root appdomain, and
20799 change back to the root domain after calling managed code. This enables
20800 appdomains using threadpools to be unloaded.
20802 2005-07-07 Martin Baulig <martin@ximian.com>
20804 * class-internals.h
20805 (MonoInflatedGenericClass): Moved the `MonoType *parent' field
20806 into `MonoDynamicGenericClass' since we only need it for dynamic
20809 * reflection.c (mono_class_bind_generic_parameters): We don't need
20810 to compute the `parent' here.
20812 2005-07-07 Atsushi Enomoto <atsushi@ximian.com>
20814 * culture-info-table.h : regenerated.
20816 2005-07-06 Martin Baulig <martin@ximian.com>
20819 (ves_icall_FieldInfo_SetValueInternal): Add MONO_TYPE_GENERICINST.
20821 * object.c (set_value): Add MONO_TYPE_GENERICINST; fixes #75299.
20823 2005-07-06 Martin Baulig <martin@ximian.com>
20825 * metadata.c (mono_metadata_class_equal): Add MONO_TYPE_SZARRAY if
20826 we're doing a signature-only comparision; fixes #74945.
20828 2005-07-06 Martin Baulig <martin@ximian.com>
20830 * class-internals.h (MonoGenericClass): Moved some things out into
20831 a new `MonoInflatedGenericClass' type.
20832 (MonoInflatedGenericClass): New type; the `klass' of a
20833 `MonoGenericClass' is now computed lazyly in
20834 mono_get_inflated_generic_class().
20836 * class.c (mono_get_inflated_generic_class): New public function.
20837 (mono_class_inflate_generic_method): Removed the unused
20838 `MonoClass *' argument.
20839 (setup_generic_vtable): Don't call mono_get_inflated_method() on
20841 (mono_class_create_generic): Make this static and merge it with
20842 mono_class_create_generic_2(); we're now called automatically from
20843 mono_get_inflated_generic_class().
20845 * loader.c (mono_method_signature): Call
20846 mono_get_inflated_method() here.
20848 2005-07-06 Zoltan Varga <vargaz@freemail.hu>
20850 * object.c (mono_class_create_runtime_vtable): Allow MONO_TYPE_FNPTR as
20851 type of fields with RVA.
20853 * class.c (mono_class_from_generic_parameter): Avoid calling mono_class_init ()
20854 for this pseudo class.
20855 (my_mono_class_from_generic_parameter): Likewise.
20856 (mono_class_init): Allow interfaces to have cctors.
20858 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
20860 * domain-internals.h domain.c: Add functionality to create MonoJitInfo structures
20861 lazily for AOT methods.
20863 2005-07-05 Martin Baulig <martin@ximian.com>
20865 * loader.c (mono_lookup_pinvoke_call): g_ascii_strcasecmp()
20866 returns FALSE for a successful match, not TRUE.
20868 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
20870 * loader.c (mono_method_get_index): Optimize this a bit.
20872 2005-07-04 Martin Baulig <martin@ximian.com>
20875 (class_compute_field_layout): Move the check for generic type
20876 definitions into mono_class_layout_fields(). Fixes #74684.
20877 (mono_class_from_generic_parameter): Correctly compute
20878 `klass->parent'; fixes #75457.
20880 * reflection.c (register_assembly, register_module): Make sure
20881 `domain->rejobject_hash' is already created.
20883 2005-07-02 Martin Baulig <martin@ximian.com>
20885 * class-internals.h
20886 (MonoGenericClass): Move `count_ifaces' and `ifaces' into
20887 `MonoDynamicGenericClass'.
20889 2005-07-01 Lluis Sanchez <lluis@ximian.com>
20891 * icall.c: In ves_icall_InternalExecute() dont't assert if the value
20892 returned by a field getter is null, since null is a valid value.
20894 2005-07-01 Martin Baulig <martin@ximian.com>
20896 * reflection.c (mono_reflection_generic_class_initialize): Update
20897 the `dgclass->fields [i].parent' to the correct class.
20898 (mono_image_get_fieldref_token): Use the declaring type, not the
20901 2005-07-01 Martin Baulig <martin@ximian.com>
20903 * loader.c (find_method): Also look in the interfaces; fixes #75429.
20905 2005-06-30 Ben Maurer <bmaurer@ximian.com>
20907 * threads.c (thread_cleanup): assert that thread != NULL
20908 (wait_for_tids_or_state_change): We were using the wrong variable
20909 when accessing wait->threads. `i' was always out of the bounds of
20912 2005-06-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20914 * loader.c: map user32 and kernel32 to libMonoSupportW
20916 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
20918 * appdomain.c (unload_thread_main): Mark this as WINAPI.
20920 2005-06-28 Martin Baulig <martin@ximian.com>
20922 * loader.c (method_from_methodspec): Fix #75334.
20924 2005-06-28 Martin Baulig <martin@ximian.com>
20926 Fix #74953 - Arrays now implement the generic IList<T> interface
20927 on the 2.0 platform.
20929 * class-internals.h (MonoDefaults): Added `generic_array_class'.
20931 * reflection.c (mono_class_bind_generic_parameters): New public
20932 function; similar to mono_reflection_bind_generic_parameters(),
20933 but operates on a `MonoType *' and not on a `MonoReflectionType *'.
20935 * domain.c (mono_init_internal): Try to initialize.
20936 `mono_defaults.generic_array_class' here; this'll only succeed if
20937 we're using the 2.0 corlib.
20940 (ves_icall_System_Array_InternalArray_GetGenericValueImpl): Added
20941 interncall for "System.Array/InternalArray`1:GetGenericValueImpl".
20942 (mono_lookup_internal_call): Added support for nested classes.
20945 (mono_get_method_from_token): Set `result->signature->pinvoke' if
20946 we're an interncall and have generic arguments.
20949 (mono_class_inflate_generic_methods): Allow interncalls and PInvoke.
20950 (mono_bounded_array_class_get): If we're on the 2.0 corlib, use an
20951 instance of System.Array.InternalArray<T> for arrays, so they
20952 implement the generic IList<T> interface.
20954 2005-06-27 Zoltan Varga <vargaz@freemail.hu>
20956 * marshal.c (emit_marshal_string): Applied patch from Itamar Rogel
20957 (chastamar@yahoo.com). Fixes #75374.
20959 2005-06-27 Atsushi Enomoto <atsushi@ximian.com>
20961 * culture-info-table.h: regenerated.
20963 2005-06-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20965 * icall.c: handle spaces correctly for base64 strings.
20967 2005-06-26 Ben Maurer <bmaurer@ximian.com>
20969 * *.c: Kill some warnings.
20971 2005-06-23 Duncan Mak <duncan@novell.com>
20973 * socket-io.c (is_loopback): Cast 'ptr' to 'struct in6_addr *' so
20974 that this builds on Solaris 10 (x86).
20976 2005-06-23 Martin Baulig <martin@ximian.com>
20979 (mono_type_get_name_recurse): Don't use a duplicate '[', ']' for
20980 generic type definitions.
20982 2005-06-23 Martin Baulig <martin@ximian.com>
20986 * metadata.c (mono_class_get_overrides): Renamed to
20987 mono_class_get_overrides_full() and added a `MonoGenericContext *'.
20988 (method_from_method_def_or_ref): Added `MonoGenericContext *' and
20989 pass it to mono_get_method_full().
20991 2005-06-22 Ben Maurer <bmaurer@ximian.com>
20993 * reflection.c (mono_reflection_create_runtime_class): take the
20994 mono_domain_lock in this method. Prevents deadlocks
20996 2005-06-22 Martin Baulig <martin@ximian.com>
20998 * loader.c (method_from_methodspec): Fix #75330.
21000 2005-06-22 Martin Baulig <martin@ximian.com>
21002 * reflection.c (type_get_qualified_name): Use
21003 mono_type_get_name_full() with MONO_TYPE_NAME_FORMAT_REFLECTION.
21004 (_mono_reflection_get_type_from_info): Added `MonoImage *image'
21005 argument; use it if we don't have an assembly name.
21007 2005-06-22 Lluis Sanchez Gual <lluis@novell.com>
21009 * object.c: In mono_message_init, set "copy out" flag for in
21010 parameters with the [Out] flag.
21012 2005-06-21 Martin Baulig <martin@ximian.com>
21015 (mono_type_get_name_recurse): Correctly handle MONO_TYPE_SZARRAY
21018 2005-06-21 Martin Baulig <martin@ximian.com>
21020 * class.c (mono_class_init): Don't initialize `class->fields' for
21021 generic instances since they're initialized again in
21022 compute_field_layout().
21023 (compute_field_layout): Set the field's `generic_info' here; fix
21026 2005-06-21 Martin Baulig <martin@ximian.com>
21028 * class-internals.h
21029 (MonoGenericMethod): Added `MonoGenericClass *generic_class'.
21031 * metadata.c (mono_metadata_generic_method_equal): Also
21032 distinguish the `generic_class'; fixes #75334.
21034 2005-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21038 * domain-internals.h:
21039 * reflection.c: 'domain_assemblies' field is now protected by its own
21040 lock. Don't call into managed code to run the AssemblyLoad event if we
21041 now there are no registered delegates for it.
21043 2005-06-20 Martin Baulig <martin@ximian.com>
21045 * class.c (mono_class_is_assignable_from): Use a custom version of
21046 mono_class_has_parent() to make things work for generic instances;
21049 2005-06-20 Martin Baulig <martin@ximian.com>
21051 * loader.c (method_from_methodspec): Apply a patch from
21052 Kamil Skalski <nazgul@nemerle.org> to fix #75296.
21054 2005-06-20 Martin Baulig <martin@ximian.com>
21056 * class.c (mono_class_init): Reverted Zoltan's last change; it
21059 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
21061 * threads.c (wait_for_tids_or_state_change): Add missing locking.
21063 2005-06-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21065 * socket-io.c: fix the index in the socket array for writable/error
21066 sockets. Fixes bug #75306.
21068 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
21070 * class.c (mono_class_init): Allow interfaces to have static ctors.
21072 2005-06-17 Martin Baulig <martin@ximian.com>
21074 * loader.c (method_from_methodspec): Use `context->container' when
21075 parsing the `gmethod->inst'.
21077 2005-06-17 Martin Baulig <martin@ximian.com>
21079 * class.c (mono_type_get_name_recurse): Don't add the assembly
21080 name for type arguments.
21082 2005-06-15 Martin Baulig <martin@ximian.com>
21084 * reflection.c (mono_image_get_inflated_method_token): Encode
21085 correct klass; fixes #75260.
21087 2005-06-13 Michal Moskal <malekith@nemerle.org>
21089 * icall.c: Make GetCorrespondingMethod/Constructor take
21090 MonoReflectionMethod method not MonoMethod. Removed
21091 MonoType.GetCorrespondingField, and make
21092 MonoGenericType.GetCorrespondingField take name not
21095 2005-06-13 Michal Moskal <malekith@nemerle.org>
21097 * reflection.c (field_encode_signature, encode_locals):
21098 Make sizes of buffers for types larger (for big generic types).
21099 (create_generic_typespec,
21100 mono_reflection_sighelper_get_signature_local,
21101 mono_reflection_sighelper_get_signature_field):
21102 Add asserts for too small buffers.
21104 2005-06-15 Martin Baulig <martin@ximian.com>
21106 * icall.c (ves_icall_MonoGenericClass_GetParentType): Return NULL
21107 if our parent is not a dynamic type.
21109 2005-06-15 Martin Baulig <martin@ximian.com>
21111 * class-internals.h (MonoTypeNameFormat): New enum.
21114 (mono_class_get_name_full): Renamed to mono_type_get_name_full().
21115 (mono_type_get_full_name): Removed.
21116 (mono_type_get_name_full): Take a `MonoTypeNameFormat format'
21117 argument instead of the boolean's.
21119 * icall.c (ves_icall_System_MonoType_getFullName):
21120 Added `gboolean assembly_qualified'.
21123 (MonoTypeNameParse): Added `GPtrArray *type_arguments'.
21125 * reflection.c (mono_reflection_parse_type): Parse the new type
21128 2005-06-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21130 * icall.c: no need to convert from utf16 to utf8 and then back again
21131 after the call to GetLogicalDrives.
21133 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21135 * icall.c: frombase64. Fix problems exposed by new tests.
21137 2005-06-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21139 * icall.c: added internal calls for converting char [] and strings in
21140 base64 into byte [].
21142 2005-06-10 Martin Baulig <martin@ximian.com>
21144 * class.c (mono_class_create_generic_2): Read the nested classes
21145 from the metadata rather than from `gklass->nested_classes' since
21146 `gklass' might not be initialized yet.
21148 2005-06-09 Duncan Mak <duncan@novell.com>
21150 * *.h: Added G_BEGIN_DECLS and G_END_DECLS where appropriate to
21151 all public headers. Fixes #74919.
21153 2005-06-09 Lluis Sanchez Gual <lluis@novell.com>
21155 * domain.c: The key for proxy_vtable_hash is now a pointer
21156 array. Added new GHashFunc and GCompareFunc functions for this.
21158 * class.h: The list of interfaces in MonoRemoteClass is known in
21159 advance and can't grow (we create a new MonoRemoteClass if needed),
21160 so now the interface array can be allocated together with
21163 * object.c: Added a new method create_remote_class_key.
21164 Fixed mono_remote_class so it does not depend on
21165 mono_upgrade_remote_class.
21166 Removed extend_interface_array.
21167 Added new method clone_remote_class(), which makes a copy of a remote
21168 class and adds a new interface or class to it.
21169 mono_upgrade_remote_class() now creates a new remote class (or gets
21170 it from the cache) if an vtable upgrade is needed. In this way
21171 we make sure that other objects sharing the same remote class
21172 don't get the new vtable with unwanted interfaces.
21174 * object-internals.h:
21175 * object.h: Moved mono_upgrade_remote_class to object-internals.h.
21177 * marshal.c: Track changes in mono_upgrade_remote_class().
21179 2005-06-08 Kamil Skalski <nazgul@nemerle.org>
21180 * icall.c: Add runtime methods for obtaining members of inflated
21181 class, which were created from supplied non-inflated members. It
21182 is used in internal Get{Method,Constructor,Field} methods in
21185 2005-06-09 Martin Baulig <martin@ximian.com>
21188 (mono_reflection_bind_generic_method_parameters): Fix #75169.
21190 2005-06-08 Carlos Alberto Cortez <calberto.cortez@gmail.com>
21191 * reflection.c (mono_image_basic_init): Define
21192 Version in MonoDynamicAssembly.
21194 2005-06-08 Martin Baulig <martin@ximian.com>
21199 (mono_method_signature_full): New public method; takes a
21200 `MonoGenericContext *'.
21201 (find_method): Use mono_method_signature_full() and pass the
21202 klass'es context to it.
21204 * class.c (mono_class_is_inflated_method): Use
21205 mono_method_signature_full() and pass the context to it.
21207 Wed Jun 8 19:26:38 CEST 2005 Paolo Molaro <lupus@ximian.com>
21209 * object.c: add proper locking in mono_remote_class_vtable(),
21210 fixes possible memory corruption.
21212 2005-06-08 Michael Meeks <michael.meeks@novell.com>
21214 * marshal.c (mono_remoting_marshal_init): set
21215 initialized after initialization.
21217 2005-06-08 Atsushi Enomoto <atsushi@ximian.com>
21219 * locales.c : hush.
21221 2005-06-06 Michael Meeks <michael.meeks@novell.com>
21223 * object.c (extend_interface_array): fix really silly
21224 memory corrupting / comparison bug.
21226 2005-06-07 Carlos Alberto Cortez <calberto.cortez@gmail.com>
21228 * reflection.c: Functions added to support the creation
21229 of CustomAttributeData, which includes Attribute data
21230 used by ReflectionOnly methods.
21232 * reflection.h: mono_reflection_get_custom_attrs_data and
21233 mono_custom_attrs_data_construct added (functions exposed).
21235 * icall.c: Added mono_reflection_get_custom_attrs_data
21238 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
21240 * Makefile.am (libmonoruntime_la_SOURCES): Revert last change at
21243 2005-06-06 Zoltan Varga <vargaz@freemail.hu>
21245 * icall.c (ves_icall_Mono_Runtime_GetDisplayName): Fix warning.
21247 * reflection.c (reflection_methodbuilder_to_mono_method): Fix encoding of
21248 dynamic DllImportAttribute.
21250 * icall.c (ves_icall_MonoMethod_GetDllImportAttribute): Fix decoding of
21251 dynamic DllImportAttribute.
21253 * Makefile.am (libmonoruntimeinclude_HEADERS): Export tabledefs.h too.
21256 2005-06-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21258 * threads.c: avoid segfault when an unstarted thread is aborted.
21260 2005-06-05 Kornél Pál <kornelpal@hotmail.com>
21262 * icall.c: Added ves_icall_Mono_Runtime_GetDisplayName:
21263 Returns the name and version of the runtime for reporting.
21265 2005-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21267 * appdomain.c: bump corlib version.
21268 * object-internals.h: new field in MonoReflectionAssembly.
21270 2005-06-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21272 * object-internals.h: Carlos forgot to add this field.
21274 2005-06-03 Carlos Alberto Cortez <calberto.cortez@gmail.com>
21276 * icall.c: Added create_version to create instances
21277 of Version of MonoReflectionAssemblyName. This change helps
21278 the AssemblyName tests to keep running fine.
21280 2005-06-03 Lluis Sanchez Gual <lluis@novell.com>
21282 * object.c (mono_method_return_message_restore): A somehow less
21283 intrusive fix for #75138.
21285 2005-06-03 Raja R Harinath <rharinath@novell.com>
21287 * object.c (mono_method_return_message_restore): Fix computation
21288 of expected number of out args.
21290 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
21292 * reflection.c (mono_image_get_method_info): Fix the case when the
21295 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
21297 * object.c: Added missing null check in
21298 mono_method_return_message_restore.
21300 2005-06-02 Zoltan Varga <vargaz@freemail.hu>
21302 * reflection.c (mono_image_get_method_info): Handle the case when
21305 2005-06-02 Lluis Sanchez Gual <lluis@novell.com>
21307 * object.c: When creating the vtable for a proxy, take into account
21308 all inherited interfaces, not only the ones registered in
21309 iclass->interfaces. This fixs bug #74996.
21310 Also, in mono_method_return_message_restore, verify that the array
21311 of out args has the expected lengh.
21313 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21315 * socket-io.c: update the timeout in Poll when the call is interrupte.
21317 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21319 * socket-io.c: support abort/suspend in Select_internal after last
21322 2005-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21324 * threadpool.c: remove warning.
21326 2005-06-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21329 * socket-io.[ch]: Select_internal uses poll() now when available, thus
21330 removing the 1024 limit from select(). Runtime part of the fix for
21333 2005-05-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21335 * socket-io.c: when resolving the addresses for the same
21336 host returned by gethostname(), get the local IPs from the interface
21337 list. Loopback addresses are discarded if the are interfaces up with
21338 non-loopback ones. Fixes bug #63265.
21340 2005-05-27 Vladimir Vukicevic <vladimir@pobox.com>
21342 * appdomain.c, verify.c, object-internals.h, reflection.c:
21343 bumped corlib number to 36, and added new extra_flags field
21344 to ReflectionMethodBuilder and friends. Fixes #75060.
21346 Fri May 27 14:45:56 CEST 2005 Paolo Molaro <lupus@ximian.com>
21348 * gc.c: register a new weak link only if the object is non-null
21351 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
21353 * culture-info.h : short time pattern too.
21355 2005-05-26 Atsushi Enomoto <atsushi@ximian.com>
21357 * culture-info.h : expand long time pattern string length.
21359 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
21361 * culture-info-table.h : update (more French date format; #72788).
21363 2005-05-25 Zoltan Varga <vargaz@freemail.hu>
21365 * icall.c (ves_icall_InternalInvoke): Avoid type checks on this if
21366 the method is static. Fixes #75029.
21368 2005-05-25 Lluis Sanchez Gual <lluis@novell.com>
21370 * reflection.c: Update the table_idx field of method builders after
21371 saving the module, since it can change. This is a workaround for
21374 2005-05-25 Atsushi Enomoto <atsushi@ximian.com>
21376 * culture-info-table.h : update (additional French date format).
21378 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
21380 * icall.c (ves_icall_type_Equals): Revert last change.
21382 * icall.c (ves_icall_type_Equals): Turn the g_print into an assert.
21384 * icall.c (ves_icall_type_GetTypeCode): Rename the icall to GetTypeCodeInternal.
21386 2005-05-20 Sebastien Pouliot <sebastien@ximian.com>
21388 * class-internals.h: Added executioncontext_class field to
21389 MonoDefaults structure.
21390 * domain.c: Cache System.Threading.ExecutionContext class in
21392 * object.c: Capture the ExecutionContext for asynchroneous calls in
21393 mono_async_result_new.
21394 * object-internals.h: Added execution_context and original_context
21395 fields to MonoAsyncResult. Added execution_context to MonoThread.
21396 * security-manager.c|.h: Added mono_get_context_capture_method to
21397 return the capture method (if required by the security manager or by
21398 the framework version used).
21399 * threadpool.c: Apply capture (if present) ExecutionContext in
21400 mono_async_invoke and revert to original context after it completes.
21402 2005-05-19 Atsushi Enomoto <atsushi@ximian.com>
21404 * culture-info-table.h : updated (real hacky solution for zh-CHT).
21406 2005-05-18 Atsushi Enomoto <atsushi@ximian.com>
21408 * culture-info-table.h : zh-CHT related workaround.
21410 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
21412 * marshal.c (emit_marshal_custom): Add some error checking and call the
21413 methods in the ICustomMarshaler interface. Fixes #74875.
21415 * marshal.c (emit_marshal_array): Implement [Out] marshalling in
21416 native->managed wrappers.
21418 2005-05-12 Martin Baulig <martin@ximian.com>
21420 * mono-debug-debugger.cs (mono_debugger_lock/unlock): Always lock
21421 here and use the loader lock.
21423 * mono-debug.c: Properly lock when the debugger is not attached.
21424 (mono_debug_init): Release the initial lock if we're not running
21427 2005-05-12 Zoltan Varga <vargaz@freemail.hu>
21429 * marshal.c (emit_marshal_custom): Pass through NULL values without
21430 calling the custom marshalling routines.
21432 * marshal.c (emit_ptr_to_object_conv): Implement ftnptr->delegate
21433 conversion in structures. Fixes #74882.
21435 2005-05-12 Atsushi Enomoto <atsushi@ximian.com>
21437 * culture-info-table.h : zh-* cultures were missing.
21439 2005-05-12 Lluis Sanchez Gual <lluis@novell.com>
21441 * threads.c: Added a new event background_change_event which is signaled
21442 when a thread changes its background mode.
21443 Moved here several checks previously done in managed code. The checks
21444 require the thread lock, and using the thread lock in managed code
21445 can result in deadlocks.
21446 Merged Start_internal and Thread_internal into a single method. Now
21447 Thread_internal does all work of creating and starting a thread.
21448 Added icalls for setting and getting the state of the object. Moved from
21449 managed code to avoid locking there.
21450 Added wait_for_tids_or_state_change() which is called instad of
21451 wait_for_tids when waiting for non-backround threads to end. This method
21452 will return if one of the threads ends or the background_change_event
21454 * threadpool.c: use ves_icall_System_Threading_Thread_SetState() to set
21455 the background mode. This method signals the background_change_event
21458 * threads-types.h: Added icalls for ClrState, SetState and GetState, and
21459 removed Start_internal.
21461 2005-05-11 Martin Baulig <martin@ximian.com>
21463 * mono-debug.h (MonoSymbolTable, MonoDebugMethodAddress): Changed
21464 to order of some fields to get proper alignment on 64-bit machines.
21466 2005-05-11 Martin Baulig <martin@ximian.com>
21468 * mono-debug.c, mono-debug-debugger.c: Revert Paolo's locking
21469 changes as they're broken and completely fuck up the debugger.
21471 * mono-debug.c (mono_debug_add_method): Properly unlock on error.
21473 2005-05-10 Martin Baulig <martin@ximian.com>
21475 * reflection.c (mono_reflection_generic_class_initialize): Don't
21476 call mono_class_setup_parent() here.
21478 2005-05-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21480 * metadata/socket-io.c: on windows, getsockopt/setsockopt for
21481 send/receive timeout use an integer in milliseconds. We were using a
21484 2005-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21487 (internal_get_cultures): reserve the first slot of the array for the
21488 InvariantCulture, which will be filled in managed code.
21490 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
21492 * reflection.c (mono_image_fill_module_table): Initialize the
21493 GENERATION field as well.
21495 2005-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21497 * monitor.c: ignore calls to Monitor.Exit even if no one ever called
21498 Monitor.Enter on the object.
21500 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
21502 * threads.c: Enable the wait for running threads when exiting.
21503 * icall.c: Suspend all threads before exiting.
21505 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
21507 * assembly.c (mono_assembly_load_reference): Fix warning.
21509 2005-05-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21511 * threadpool.c: changed the default number of threads per cpu. From now
21512 on, the default will be 20 + (5 * number of cpus) instead of 50.
21514 2005-05-04 Zoltan Varga <vargaz@freemail.hu>
21516 * loader.c (mono_method_get_signature_full): Add locking here.
21518 2005-05-03 Lluis Sanchez Gual <lluis@novell.com>
21520 * appdomain.c: Moved methods for parsing and freeing assembly
21521 names to assembly.c.
21522 * assembly.c, domain-internals.h: Created public methods for parsing
21523 assembly names. Fixed mono_assembly_load_with_partial_name:
21524 it now finds the best match, taking into account the version,
21525 token and culture specified in the partial name. Also return
21526 the latest version if no version information is specified.
21528 Mon May 2 15:47:57 CEST 2005 Paolo Molaro <lupus@ximian.com>
21530 * threadpool.c: replace check for SocketAsyncCall class.
21532 2005-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21534 * threadpool-internals.h:
21535 * Makefile.am: added threadpool-internals.h
21537 * threadpool.c: call mono_unhandled_exception on exceptions not handled
21538 that happen in threadpool threads (tested on MS).
21539 (mono_thread_pool_remove_socket): new function that dispatch any pending
21540 AIO call on a socket that is closing. By now only epoll really needs it,
21541 as select/poll wake up when the socket closes.
21544 * socket-io.c: call mono_thread_pool_remove_socket in Close_internal.
21546 2005-05-01 Zoltan Varga <vargaz@freemail.hu>
21548 * marshal.c (mono_marshal_get_managed_wrapper): Handle changing the calling convention.
21550 2005-05-01 Lluis Sanchez Gual <lluis@novell.com>
21552 * gc.c: In mono_gc_cleanup(), wait for 2 seconds, not 2000 seconds.
21554 2005-04-30 Lluis Sanchez Gual <lluis@novell.com>
21556 * threads.c: In mono_thread_suspend_all_other_threads, if a thread
21557 has an abort request, convert it into a suspend request.
21559 2005-04-30 Ben Maurer <bmaurer@ximian.com>
21561 * marshal.c (mono_marshal_get_managed_wrapper): give a friendly
21562 warning for the usage of `UnmanagedFunctionPointerAttribute' which
21563 is not supported yet.
21565 2005-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21567 * image.c: register assemblies loaded from data (bundles) in the loaded
21568 assemblies hash. Fixes bug #74772.
21570 2005-04-29 Martin Baulig <martin@ximian.com>
21572 * class.c (mono_type_get_name_recurse): Update to the new naming
21573 schema from the latest .NET 2.x beta2.
21574 (mono_class_setup_vtable_general): If we're a generic instance,
21575 copy the vtable from our generic type definition and inflate all
21578 * loader.c (find_method): Update to the new naming schema from the
21579 latest .NET 2.x beta2.
21581 2005-04-29 Raja R Harinath <harinath@gmail.com>
21583 * class.c (mono_class_init): Add a mono_loader_unlock to the
21586 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
21588 * icall.c (ves_icall_System_Environment_Exit): Remove the
21589 suspend_all_other_threads () call for the time being, since it can hang.
21591 * threads.c (mono_thread_manage): Similarly, disable the waiting for
21592 the background threads to exit, since it can also hang.
21594 * class.c (mono_class_init): Applied patch from Ankit Jain
21595 (radical@gmail.com). Avoid pending init errors when a field refers
21596 to a nested class using a typeref. Fixes #74734.
21598 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal): Fix
21599 this for dynamic modules.
21601 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21603 * threads.c: don't wait for threads that are in the process of aborting
21604 or aborted. Set the 'shutting_down' flag before cleaning the threadpool
21605 and waiting for background threads to finish. This makes xsp and
21606 mod-mono-server exit without random length delays and/or hangs.
21608 2005-04-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21610 * icall.c: remove duplicate assignment from GetReferencedAssemblies.
21612 2005-04-25 Zoltan Varga <vargaz@freemail.hu>
21614 * class.c (mono_class_is_assignable_from): Call is_assignable_to for
21615 dynamic types to prevent infinite loops. Fixes #74727.
21617 * reflection.c (mono_reflection_call_is_assignable_from): Rename to
21618 ..._is_assignable_to.
21620 2005-04-25 Sebastien Pouliot <sebastien@ximian.com>
21622 * security.c: Fixed #74698 where sysconf returned -1 on FreeBSD.
21624 2005-04-25 Martin Baulig <martin@ximian.com>
21626 Upgrade to the latest .NET 2.x beta (Visual Studio 2005 Beta 2).
21629 (supported_runtimes): Change "v2.0.40607" -> "v2.0.50215".
21631 * row-indexes.h (MONO_GENERICPARAM_KIND): Removed.
21633 * reflection.c (build_compressed_metadata): Set metadata header
21636 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
21638 * sysmath.c (ves_icall_System_Math_Round2): Use modf to decompose the
21639 number into an integral and a decimal part. Fixes #70473.
21641 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): Ignore static fields. Fixes #74703.
21643 2005-04-23 Atsushi Enomoto <atsushi@ximian.com>
21645 * culture-info-table.h : reflected the latest locale-builder output.
21647 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21649 * threadpool.c: check for SuspendRequested too when deciding if
21650 mono_thread_interruption_checkpoint should be called.
21652 2005-04-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21654 * appdomain.[ch]: added function to set the shutting_down flag to TRUE.
21655 * threads.c: remove interruption_mutex and use Interlocked instead. When
21656 suspending all the threads, wait for all the suspended events at once.
21657 If we're shutting down and get an APC that is going to be queued,
21658 call mono_thread_execute_interruption immediately, as the thread might
21659 be sleeping on a pthread condition or mutex.
21661 * icall.c: call mono_runtime_set_shutting_down before suspending the
21664 Fixes bug #74693. And now xsp is happier when exiting.
21666 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
21668 * loader.c (mono_stack_walk): Fix #74690.
21670 2005-04-22 Martin Baulig <martin@ximian.com>
21672 * mono-debug.h (MonoDebugMethodJitInfo): Added
21673 `MonoDebugMethodJitInfo *jit'.
21675 * mono-debug.c (mono_debug_read_method): Cache the
21676 MonoDebugMethodJitInfo in `address->jit'.
21677 (mono_debug_free_method_jit_info): New public method.
21679 2005-04-22 Martin Baulig <martin@ximian.com>
21681 * class.c (mono_class_is_assignable_from): Disallow
21682 type parameter -> interface.
21684 2005-04-21 Dick Porter <dick@ximian.com>
21686 * threads.c (mono_thread_create): Turn an assertion into an error.
21688 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
21690 * threads.c object.c icall.c: Fix some gcc 4.0 warnings.
21692 * threads.c marshal.h marshal.c exceptions.h exceptions.c appdomain.c:
21693 Fix some gcc 4.0 warnings.
21695 Wed Apr 20 16:09:06 CEST 2005 Paolo Molaro <lupus@ximian.com>
21697 * file-io.c: fix alt dir separator char on unix systems
21698 and cleanup (fixes bug #71214).
21700 2005-04-19 Lluis Sanchez Gual <lluis@novell.com>
21702 * marshal.c: Use CALLVIRT instead of CALL when dispatching
21703 a call to a remote domain, since the method may be an
21704 interface method in the client domain. This fixes bug #74192.
21706 2005-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21708 * threadpool.c: recv/send are now performed before going back to managed
21709 code to save one transition.
21711 2005-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21713 * metadata/socket-io.c: fixed semantics in Socket.Blocking icall.
21715 * metadata/threadpool.c: removed hack to workaround the bug above.
21719 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
21721 * reflection.c reflection.h: Fix handling of parameter defaults in
21722 dynamic methods. Also fixes handling of parameter attributes.
21725 * mono-debug.c (mono_debug_close_image): Fix warning.
21727 2005-04-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21729 * socket-io.h: replaced old unused field with new 'blocking'.
21730 * threadpool.c: restore socket blocking state on windows(tm).
21732 2005-04-14 Sebastien Pouliot <sebastien@ximian.com>
21734 * icall.c: don't return the codebase in the AssemblyName[] returned by
21735 ves_icall_System_Reflection_Assembly_GetReferencedAssemblies.
21736 * object-internals.h: Removed FIXME (fields were presents) and fixed
21737 versioncompat declaration.
21739 2005-04-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21741 * threadpool.c: sometimes we get EBADF from epoll but the epollfd is
21742 not closed, so don't cleanup when it happens.
21744 2005-04-13 Chris Toshok <toshok@ximian.com>
21746 * mono-debug-debugger.h: change prototype for
21747 mono_debugger_lookup_type.
21749 * mono-debug-debugger.c (mono_debugger_lookup_type): reinstate
21750 this function, although it should probably be named
21751 mono_debugger_init_type.
21753 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21755 * threadpool.c: fix non-AIO case.
21757 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
21759 * profiler.c (mono_profiler_install_simple): Add a 'jit' option to
21760 the built-in profiler to measure just JIT compilation times.
21762 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21764 * threadpool.c: the epollfd might be closed by another thread at
21765 any time, so ignore EBADF at treat it as a "we're closing" sign.
21767 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21769 * threadpool.c: release the semaphores with a count equals to the number
21770 of working threads in both IO and regular pools. Fixed typo that messed
21771 up the count of IO pool threads. Don't initialize the pipe handles if
21774 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21776 * threadpool.c: some systems don't like a NULL when deleting the socket
21779 2005-04-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21781 * threadpool.c: fix semaphore allocation.
21783 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21785 * threadpool.c: added epoll() based implementation for asynchronous IO
21786 that is used instead of the default poll() when available.
21787 It can be disabled by setting MONO_DISABLE_AIO.
21789 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21791 * threadpool.c: windows needs 'closesocket' and instead of returning
21792 0 when the stream is closed while in select, it returns -1. Fixes bug
21795 2005-04-12 Zoltan Varga <vargaz@freemail.hu>
21797 * class.c (class_compute_field_layout): Fix the regression caused by
21800 2005-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21802 * threadpool.c: separate pool for socket async. IO.
21803 * threadpool.h: mono_max_worker_threads is not a global any more.
21805 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
21807 * class.c (class_compute_field_layout): Fix #74549.
21809 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21811 * threadpool.c: select() on windows doesn't allow pipe handles, soooo
21812 use 2 connected sockets instead.
21814 2005-04-08 Miguel de Icaza <miguel@novell.com>
21816 * mono-config.c: Add new entry point for mkbundle
21817 mono_config_parse_memory.
21819 2005-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21821 * threadpool.c: removed another unused function.
21823 2005-04-08 Ankit Jain <radical@corewars.org>
21825 * reflection.c (get_default_param_value_blobs): Add 'types'
21826 parameter to get the types encoded in the constant table.
21827 (mono_param_get_objects): Use the type from the constant table,
21828 not the type of the parameter, when creating default values.
21829 Handle null default values correctly.
21831 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21838 * socket-io.c: removed dead code for async IO.
21840 2005-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21842 * socket-io.h: 2 more fields in MonoSocketAsyncResult.
21844 * threadpool.c: intercept socket async. calls and pass them to a thread
21845 that is polling and dispatching the job items to the threadpool as
21846 socket become ready. Fixes bugs #71217, #71933.
21848 * icall.c: Removed AsyncReceive and AsyncSend. Speed up for copies
21849 between char and short/ushort arrays.
21851 * socket-io.c: remove dead code.
21853 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
21856 icall.c : removed InternalToUpper_Comp() and
21857 InternalToLower_Comp().
21859 2005-04-06 Atsushi Enomoto <atsushi@ximian.com>
21861 * char-conversions.h : The tables were incorrectly generated. Should
21862 be generated against invariant culture.
21864 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
21866 * object.c (mono_runtime_invoke_array): Fix return value when
21867 passing pre-created valuetype objects to ctors.
21869 * gc.c (mono_gchandle_is_in_domain): Applied patch from Jon Larimer
21870 (jlarimer@gmail.com). Avoid crashes when the wrapper object is null.
21873 2005-03-30 Sebastien Pouliot <sebastien@ximian.com>
21875 * domain.c: removed g_assert for runtimesecurityframe_class. This is
21876 only used with --security and hides the wrong corlib version error.
21878 2005-03-30 Joshua Tauberer <tauberer@for.net>
21880 * class.c: Changed mono_class_name_from_token so that types
21881 outside of a namespace don't have an initial period. Improved
21882 the g_warning message used in _mono_class_get when loading
21884 * assembly.c: In mono_assembly_load_reference, when an assembly
21885 can't be found, "No such file or directory" is misleading and
21886 unhelpful because a few paths were checked for the presence of
21887 the assembly. When that happens (ENOENT), display a nicer
21888 message indicating the directories that were searched. In all
21889 cases, the warning is made easier to read for non-hackers.
21891 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
21893 * assembly.c: Set MONO_ASSEMBLIES to NULL when compiling from a VS.NET
21895 * appdomain.h|domain.c: Removed inline from functions.
21896 * appdomain.c: Reduced warnings when compiling on windows.
21897 * icall.c: Fixed output_debug declaration to gunichar2*.
21898 * mono-config.c: Reduced warnings when compiling on windows.
21899 * rand.c: Added missing "windows.h". Added missing return value.
21900 * rawbuffer.c: Added missing winsock2.h for windows.
21901 * sysmath.h: Added mono-compiler.h header to allow/ease
21902 compilation with non-GCC compilers.
21903 * threads.c: Fixed declarations to compile with VS.NET C compiler.
21904 Removed cast warnings.
21906 Adapted from the work of J Lothian (for VC6).
21908 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
21910 * assembly.c (mono_assembly_load_corlib): Do not try loading corlib
21913 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
21915 * marshal.c (mono_marshal_get_managed_wrapper): Fix bogus assert on
21918 2005-03-27 Raja R Harinath <harinath@gmail.com>
21920 * Makefile.am (assembliesdir): Fix. If it is arch-dependent it
21921 has to be in $(exec_prefix). $(prefix) is for arch-independent
21922 stuff, and it would probably use $(prefix)/share rather than
21925 2005-03-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21927 * console-io.c: added 2 includes that might be missing.
21929 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
21931 * marshal.c (mono_marshal_get_managed_wrapper): Fix crashes in 2.0
21934 * reflection.c (create_custom_attr): Allocate the params array using
21935 alloca so it gets GC tracking.
21937 2005-03-23 Chris Toshok <toshok@ximian.com>
21939 * mono-debug-debugger.c (mono_debugger_runtime_invoke): comment
21942 2005-03-24 Raja R Harinath <rharinath@novell.com>
21944 * Makefile.am (assembly.lo, mono-config.lo): Rebuild when Makefile
21945 changes to pick up any changes in prefix, etc.
21947 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
21949 * marshal.c (mono_marshal_get_managed_wrapper): Remove fixme.
21951 * marshal.c (mono_marshal_get_managed_wrapper): Remove debugging output.
21952 * marshal.c (mono_marshal_get_managed_wrapper): Add support for the modopt(CallConvCdecl).
21954 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
21956 * class-internals.h object-internals.h class.c reflection.c: Extend the
21957 mono_lookup_dynamic_token () function to return the class of the
21960 * class.c (mono_ldtoken): Handle MEMBERREFS in the dynamic case as
21961 well. Fixes #73848.
21963 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
21965 * security-manager.c: Skip inheritance checks for intra-corlib
21966 class inheritance and method overrides. This skips a lot of checks
21967 and (anyway) permissions cannot work until corlib is loaded.
21969 2005-03-23 Martin Baulig <martin@ximian.com>
21971 * marshal.c (mono_marshal_get_stfld_wrapper): Add support for
21972 MONO_TYPE_GENERICINST.
21974 2005-03-23 Martin Baulig <martin@ximian.com>
21976 * metadata.c (mono_type_to_unmanaged): Add MONO_TYPE_GENERICINST.
21978 Tue Mar 22 16:57:01 CET 2005 Paolo Molaro <lupus@ximian.com>
21980 * class.c: added locking comments to some functions.
21981 Cache the interface offsets arrays (saves about 20 KB
21982 of runtime memory in a typical app).
21983 Reduce the time overhead in mono_class_setup_supertypes ().
21985 Tue Mar 22 16:35:57 CET 2005 Paolo Molaro <lupus@ximian.com>
21987 * icall.c: speedup and fix leaks in GetMethodsByName and
21988 GetPropertiesByName.
21990 Tue Mar 22 16:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
21992 * reflection.c: some locking fixes.
21994 Tue Mar 22 15:13:54 CET 2005 Paolo Molaro <lupus@ximian.com>
21996 * metadata.c: added missing break in case statement.
21998 2005-03-22 Zoltan Varga <vargaz@freemail.hu>
22000 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
22001 typedbyref return values. Fixes #73941.
22003 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
22005 * security-manager.c|h: Added demandunmanaged method and
22006 suppressunmanagedcodesecurity class to MonoSecurityManager.
22007 Renamed aptc class to allowpartiallytrustedcallers.
22009 2005-03-17 Martin Baulig <martin@ximian.com>
22011 * class.c (inflate_generic_type): Add MONO_TYPE_ARRAY.
22013 2005-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22015 * file-io.c: disabled file async. IO using aio_*. It uses the
22016 threadpool now. Workaround for bug #73718.
22018 Wed Mar 16 18:08:00 CET 2005 Paolo Molaro <lupus@ximian.com>
22020 * assembly.h, mono-config.c: added code to deal with bundled configs
22021 for bundled assemblies.
22023 Wed Mar 16 16:34:38 CET 2005 Paolo Molaro <lupus@ximian.com>
22025 * *.c, private.h: cleanup, removing old private.h header file.
22027 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
22029 * reflection.c (mono_image_get_method_info): Encode best_fit_mapping
22030 and throw_on_unmappable_char attributes.
22032 2005-03-13 Sebastien Pouliot <sebastien@ximian.com>
22034 * process.c: Fix buffer length in ves_icall_System_Diagnostics_Process
22035 _ProcessName_internal.
22037 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
22039 * object.c (mono_array_new_full): Fix aligning of array size. Fixes
22042 * icall.c threads.c threads-types.h: Remove slothash icalls as they
22043 are no longer used.
22045 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
22047 * object.c (compute_class_bitmap): Add support for generics. Fixes
22050 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
22052 * reflection.c (mono_reflection_create_runtime_class): Fix 2.0 build.
22054 2005-03-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22056 * filewatcher.c: commented out the code for windows watcher, as we don't
22057 use it (we use the managed implementation instead).
22059 2005-03-10 Zoltan Varga <vargaz@freemail.hu>
22061 * object-internals.h (MonoThread): Remove 'unused1' field.
22063 * appdomain.c: Bump corlib version.
22065 * marshal.c: Remove calls to Reset/RestoreDataStoreStatus ().
22067 * reflection.c (mono_reflection_create_runtime_class): Remove the
22068 AssemblyBuilder.Save optimization since it causes too many problems.
22070 2005-03-10 Sebastien Pouliot <sebastien@ximian.com>
22072 * exception.c|h: Added mono_get_exception_reflection_type_load to
22073 create a ReflectionTypeLoadException object.
22074 * icall.c: Updated ves_icall_System_Reflection_Assembly_InternalGetType
22075 to return NULL is a InheritanceDemand fails during reflection. Updated
22076 ves_icall_System_Reflection_Assembly_GetTypes to throw a
22077 ReflectionTypeLoadException if an InheritanceDemand fails during
22078 reflection. Added icall mapping for GetLinkDemandSecurity.
22079 * security-manager.c|h: Added ves_icall_System_Security_
22080 SecurityManager_GetLinkDemandSecurity internal call to return the
22081 class and methods permissions set for a LinkDemand. Removed unused
22082 fields in MonoSecurityManager.
22084 2005-03-10 Martin Baulig <martin@ximian.com>
22086 * class.c (mono_bounded_array_class_get): Initialize `eclass' if
22087 it's a generic instance.
22089 2005-03-09 Zoltan Varga <vargaz@freemail.hu>
22091 * reflection.c (mono_get_object_from_blob): Applied patch from
22092 Ankit Jain (radical@gmail.com). Fix enum default values. Fixes #73457.
22094 * class.c (mono_class_is_assignable_from): Another try at fixing
22095 #73469 without breaking anything.
22097 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
22099 * class.c: (mono_class_is_assignable_from): Revert the last changes
22100 since they don't work with generics.
22102 * class.c (mono_class_is_assignable_from): Fix build bustage.
22104 * class.c (mono_class_is_assignable_from): If oklass is dynamic, call
22105 the managed IsAssignableFrom method. Fixes #73469.
22107 * reflection.c (mono_reflection_call_is_assignable_from): New helper
22110 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
22112 * object.c (mono_load_remote_field_new): Fix returning uninitialized
22113 memory when the remoting callback does not sets the out arguments.
22116 * marshal.c (mono_delegate_free_ftnptr): Remove debug array checked in
22119 * string-icalls.c: Return String.Empty where needed. Fixes #73310.
22121 * object-internals.h (MonoStackFrame): Sync with managed object layout.
22123 * appdomain.c: Bump corlib version.
22125 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
22127 * gc-internal.h boehm-gc.c null-gc.c: Add mono_gc_is_gc_thread () API
22130 * threads.c (mono_thread_attach): Detect threads which are not started
22131 by the GC pthread wrappers.
22133 2005-03-03 Sebastien Pouliot <sebastien@ximian.com>
22135 * icall.c: Added new icall for RNG.
22136 * rand.c|h: Added new icall to open the RNG. This allows to share a
22137 single handle on Linux to access /dev/urandom and fix #73183.
22139 Thu Mar 3 17:53:17 CET 2005 Paolo Molaro <lupus@ximian.com>
22141 * object.c: setting the new vtable in a transparent proxy object must
22142 not change the GC descriptor.
22144 Thu Mar 3 12:11:46 CET 2005 Paolo Molaro <lupus@ximian.com>
22146 * object.c: fixed compilation without GCJ support.
22147 * reflection.c: for runtime-created types ensure klass->has_references
22148 is correct (bug #73215).
22150 2005-03-02 Martin Baulig <martin@ximian.com>
22152 * class.c (mono_class_is_assignable_from): Make this work if
22153 `oklass' is a generic instance; fixes #72831.
22155 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
22157 * marshal.c (mono_marshal_get_managed_wrapper): Fix handling of methods
22160 * marshal.c (emit_marshal_array): Emit native->managed marshalling of blittable arrays.
22162 * marshal.c: Reorganize native->managed marshalling code to also use
22163 the emit_marshal_... functions.
22165 Tue Mar 1 16:16:42 CET 2005 Paolo Molaro <lupus@ximian.com>
22167 * object.c: typed allocs have issues with bitmap sizes > 30,
22168 so check for max_set >= 30.
22170 2005-03-01 Zoltan Varga <vargaz@freemail.hu>
22172 * marshal.c (emit_marshal_array): Implement marshalling of arrays to
22173 managed code. Fixes #73012.
22175 * metadata.h (MonoMarshalSpec): Add elem_mult field.
22177 * metadata.c reflection.c: Load/Emit elem_mult as well.
22179 * metadata.h (MonoMarshalSpec): Add comment.
22181 * metadata.h: Add MONO_MARSHAL_CONV_LPTSTR_STR.
22183 * metadata.c (mono_metadata_parse_marshal_spec): Set param_num and
22184 num_elem to -1 if not given.
22186 * object-internals.h (MonoReflectionMarshal): Add has_size field.
22188 * reflection.c (encode_marshal_blob): Differentiate between 0 and not
22191 2005-03-01 Marek Safar <marek.safar@seznam.cz>
22193 * null-gc.c (mono_gc_free_fixed): Was not compilable.
22195 2005-02-28 Zoltan Varga <vargaz@freemail.hu>
22197 * reflection.c (encode_marshal_blob): Encode param_num field as well.
22199 * object-internals.h (MonoReflectionMarshal): Add param_num field.
22201 Mon Feb 28 11:59:42 CET 2005 Paolo Molaro <lupus@ximian.com>
22203 * object.c: generalized the reference bitmap creation
22204 and added hooks for the new GC.
22205 * class-internals.c: removed the gc_bitmap field from MonoClass.
22207 Sat Feb 26 16:06:59 CET 2005 Paolo Molaro <lupus@ximian.com>
22209 * domain.c: help the compiler to produce better code
22210 in mono_jit_info_table_find ().
22212 Fri Feb 25 16:50:14 CET 2005 Paolo Molaro <lupus@ximian.com>
22214 * object.c: make all allocations look typed.
22216 Fri Feb 25 16:18:59 CET 2005 Paolo Molaro <lupus@ximian.com>
22218 * socket-io.c: load Mono.Posix if it's not loaded already
22221 2005-02-24 Martin Baulig <martin@ximian.com>
22223 * class.c (dup_type): Correctly duplicate MONO_TYPE_PTR.
22224 * reflection.c (dup_type): Likewise.
22226 2005-02-24 Zoltan Varga <vargaz@freemail.hu>
22228 * gc.c (run_finalize): Set the domain for finalizing delegates as well.
22229 Thanks to Willibald Krenn and Scott Mohekey for tracking this down.
22231 Thu Feb 24 15:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
22233 * domain.c, threads.c, object-internals.h: make the critical thread
22234 local vars use the fast access mode (even when we're compiled in
22235 a lib). Provide accessors to be used by the jit during codegen.
22237 2005-02-24 Carlos Alberto Cortez <calberto.cortez@gmail.com>
22239 * appdomain.c: Changed hook functios behavior to include
22240 support for the reflection only assemblies. Some icalls were changed
22241 to support the mentioned assemblies too. Signatures of static methods
22242 try_assembly_resolve and real_load now have an additional parameter:
22245 * assembly.c: General changes to mono_assembly_ methods to support
22246 reflection only api. Functions mono_assembly_open, mono_assembly_load,
22247 mono_assembly_load_from and mono_assembly_loaded have got a '_full'
22248 suffix, to support an additional gbool parameter to specify whether
22249 the assembli is reflection only or not. Created some new hook functions
22250 to add support for reflection only assemblies. Signatures of static
22251 methods load_in_path, search_loaded, and mono_assembly_load_from_gac
22252 have now an additional parameter: refonly.
22254 * metadata-internals.h: MonoAssembly now has a gbool ref_only flag,
22255 indicating whether the assembly is reflection only or not.
22257 * exception.c: Add mono_get_exception_invalid_operation.
22259 * icall.c: Throw an InvalidOperationException when trying to invoke
22260 a property/method/event, or trying to set/get the value of a field.
22261 Also add an icall to retrieve the ref_only flag to the
22262 MonoReflectionAssembly.
22264 2005-02-23 Chris Toshok <toshok@ximian.com>
22266 Part of fix for #72827.
22267 * mono-debug.c (mono_debug_add_method): add lexical block data to
22268 the info we write. Kind of a hack at the moment - we copy the
22269 lexical block info from the MonoDebugMethodInfo to the
22270 MonoDebugMethodJitInfo here, before writing it.
22271 (mono_debug_read_method): read the lexical block info.
22273 * mono-debug.h (_MonoDebugMethodJitInfo): add lexical block slots.
22275 * debug-mono-symfile.h: add lexical block support.
22277 * debug-mono-symfile.c (mono_debug_find_method): add lexical block
22280 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
22282 * loader.c (mono_lookup_pinvoke_call): Fix warning.
22284 * object.c (mono_runtime_free_method): Call mono_free_method () and
22285 put the TODOs there.
22287 * loader.c (mono_free_method): Free up most memory allocated for
22290 Wed Feb 23 18:54:26 CET 2005 Paolo Molaro <lupus@ximian.com>
22292 * reflection.c: properly flag a Type argument to a
22293 named custom attr value (bug #72248).
22295 Wed Feb 23 18:32:35 CET 2005 Paolo Molaro <lupus@ximian.com>
22297 * reflection.c: reduce code duplication in named custom
22298 attribute encoding.
22300 Wed Feb 23 17:23:52 CET 2005 Paolo Molaro <lupus@ximian.com>
22302 * reflection.c: properly encode custom attrs of type object
22305 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
22307 * marshal.c (mono_delegate_free_ftnptr): Make this thread safe.
22309 Tue Feb 22 21:54:47 CET 2005 Paolo Molaro <lupus@ximian.com>
22311 * socket-io.c: load System.dll if it's not loaded already
22312 (bug #72850 and #70477).
22314 2005-02-21 Martin Baulig <martin@ximian.com>
22316 * marshal.c (mono_marshal_get_runtime_invoke): Add support for
22319 2005-02-21 Martin Baulig <martin@ximian.com>
22321 * reflection.c (mono_image_build_metadata): We also need to
22322 "fixup" the MethodImpl table after we computed the final method
22323 indices. Call fixup_methodimpl() to do that.
22324 (fixup_methodimpl): New private method.
22326 Mon Feb 21 16:17:14 CET 2005 Paolo Molaro <lupus@ximian.com>
22328 * assembly.c: special case mscorlib.dll (bug#72536),
22329 patch from Carlos Alberto Cortez.
22331 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
22333 * threads-types.h threads.c: Fix build bustage.
22335 * threads.c: Use a union for long<->double conversions.
22337 * threads-types.h threads.c icall.c: Implement the net 2.0 interlocked
22338 functions based on a patch by Luca Barbieri (luca.barbieri@gmail.com).
22340 * marshal.c (emit_thread_interrupt_checkpoint_call): Mark the bblock
22341 containing the checkpoint call with NOT_TAKEN.
22343 * marshal.c (mono_marshal_get_managed_wrapper): Emit interrupt
22344 checkpoint before pushing the arguments, so they won't have to be
22347 Sat Feb 19 15:19:46 CET 2005 Paolo Molaro <lupus@ximian.com>
22349 * domain.c, assembly.c, domain-internals.h: make some data
22350 const and relocation-free.
22352 Sat Feb 19 11:12:34 CET 2005 Paolo Molaro <lupus@ximian.com>
22354 * object.c, appdomain.c, class-internals.h: introduce the
22355 MonoClassRuntimeInfo structure to hold the info needed to
22356 use a class at runtime. Made mono_class_vtable() lock-free
22357 for all the appdomains.
22359 Sat Feb 19 11:11:12 CET 2005 Paolo Molaro <lupus@ximian.com>
22361 * metadata-internals.h, image.c: introduce a per-image mempool to
22362 be used for memory that has the same lifetime as the image.
22364 2005-02-18 Lluis Sanchez Gual <lluis@novell.com>
22366 * domain.c: In mono_init_internal(), instead of selecting the first
22367 runtime version supported by an executable, get a list of all
22368 supported versions and select the one for which an mscorlib exists
22369 (since even if the runtime supports a given version, it doesn't mean
22370 that the framework for that version is installed).
22371 Modified get_runtimes_from_exe to support this behavior.
22372 In supported_runtimes, added information about additional system
22375 * assembly.c: Added support for more than one system assembly version
22376 per runtime version. Updated the assembly list.
22377 In mono_assembly_remap_version, removed the initial version check,
22378 since we don't know to which version we need to compare until we
22379 get the version set on which the assembly is based.
22380 Moved the code for loading corlib into the new method
22381 mono_assembly_load_corlib(), so it can be used by the initialization
22384 * domain-internals.h: Updated data structures and added declaration
22385 for mono_assembly_load_corlib.
22387 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
22389 * reflection.c (resolve_object): Fix the creation of the signature in
22390 the SignatureHelper case.
22392 * assembly.c (mono_assembly_remap_version): Fix binary search.
22394 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
22396 * class.c: Added inheritance check when a method is overloaded (from a
22397 virtual method or when implementing an interface) and when a class is
22398 inherited. Added functions to set a failure for a class and to
22399 retreive the exception from a failure.
22400 * class-internals.h: Added fields to MonoClass to keep the exception
22401 information status for inheritance (or other exceptions) to be thrown
22402 later (i.e. not at load time).
22403 * object.c: Throw the inheritance SecurityException when a type is to
22404 be created with either class or method inheritance violations.
22405 * reflection.c|h: Fix when getting declsec from a class. Removed
22406 unrequired code for class. Improved sanity in parameter naming.
22407 * security-manager.c|h: Added functions to check for class and method
22410 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
22412 * reflection.c (mono_reflection_create_runtime_class): Set has_cctor
22413 and has_finalize in dynamic types as well.
22415 2005-02-17 Atsushi Enomoto <atsushi@ximian.com>
22417 * culture-info-table.h : fixed currency format for en-GB (and so on).
22419 Wed Feb 16 16:28:15 CET 2005 Paolo Molaro <lupus@ximian.com>
22421 * gc.c: ensure the GC handles never have 0 as a value.
22423 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
22425 * marshal.c (emit_marshal_ptr): Raise an exception if trying to pass
22426 a pointer to a struct to unmanaged code. Fixes #72625.
22428 2005-02-16 Martin Baulig <martin@ximian.com>
22430 * mono-debug.c (mono_debug_open_image): Ignore dynamic images.
22432 2005-02-16 Zoltan Varga <vargaz@freemail.hu>
22434 * marshal.c (emit_marshal_array): Only marshal unicode char arrays as [Out].
22436 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
22438 * loader.c (mono_lookup_pinvoke_call): Fix stdcall name mangling.
22440 * marshal.c (mono_ftnptr_to_delegate): If the delegate has the
22441 UnmanagedFunctionPointerAttribute, use it for determining calling convention
22444 * reflection.c (mono_custom_attrs_get_attr): New helper function.
22446 * object-internals.h: Add MonoReflectionUnmanagedFunctionPointerAttribute.
22448 Tue Feb 15 18:03:41 CET 2005 Paolo Molaro <lupus@ximian.com>
22450 * domain.c, appdomain.c, appdomain.h, object-internals.h, object.h:
22451 changes to make the current context a field in MonoThread.
22453 2005-02-15 Zoltan Varga <vargaz@freemail.hu>
22455 * marshal.c (mono_marshal_get_native_wrapper): Fix a crash caused by
22458 * marshal.c (mono_marshal_emit_native_wrapper): New helper function
22459 extracted from mono_marshal_get_native_wrapper.
22461 * marshal.c (mono_marshal_get_native_func_wrapper): New helper function
22462 to create wrappers around native functions.
22464 * marshal.c (mono_ftnptr_to_delegate): Add support for creating
22465 delegates for arbitrary function pointers. Fixes #71472.
22467 Tue Feb 15 11:01:09 CET 2005 Paolo Molaro <lupus@ximian.com>
22469 * threads.c: cleaned up the code a little.
22471 2005-02-15 Martin Baulig <martin@ximian.com>
22473 * mono-debug.h (MonoSymbolTable): Allow variable-length chunks in
22476 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Set to 32768; we may now
22477 allocate larger chunks if needed.
22479 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
22481 * threads.c (start_wrapper): Remove #ifdef PLATFORM_WIN32 probably left
22484 Mon Feb 14 16:48:24 CET 2005 Paolo Molaro <lupus@ximian.com>
22486 * domain.c: keep the domains in an array and ensure the domain ids
22487 are kept small, so they can be used as indexes to domain-specific data
22488 with a small memory overhead.
22490 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
22492 * icall.c: Handle byref types in Type icalls. Fixes #72544.
22494 Mon Feb 14 15:39:56 CET 2005 Paolo Molaro <lupus@ximian.com>
22496 * Makefile.am: remove libmetadata: we build just libmonoruntime now.
22498 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
22500 * tabledefs.h (MANIFEST_RESOURCE_VISIBILITY_MASK): Add flags for ManifestResource.
22502 * loader.c (mono_lookup_pinvoke_call): Correct the search order used for different CharSet
22505 * marshal.c (mono_marshal_get_string_encoding): CHAR_SET_AUTO means Unicode on windows.
22507 2005-02-12 Ben Maurer <bmaurer@ximian.com>
22509 * domain-internals.h: add the hashtable here.
22511 * class-internals.h: Remove `info' from MonoMethod
22513 * domain.c: Add a new hashtable, jit_trampoline_hash
22515 Fri Feb 11 17:11:20 CET 2005 Paolo Molaro <lupus@ximian.com>
22517 * object.c: don't set the value of static fields
22520 2005-02-11 Martin Baulig <martin@ximian.com>
22522 * mono-debug.c (DATA_TABLE_CHUNK_SIZE): Increase to 131072.
22523 (mono_debug_add_method): Silently ignore the method if it's too big.
22524 (mono_debug_add_type): Likewise.
22526 Fri Feb 11 16:22:10 CET 2005 Paolo Molaro <lupus@ximian.com>
22528 * threads.c, appdomain.c: remove #ifdefs from the code.
22530 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
22532 * metadata-internals.h: Added flags to MonoAssembly to cache the most
22533 common security informations. This allows us to stay in unmanaged code
22534 when doing LinkDemand and it's special cases (except for the first
22535 time for initialization). The flags a very much used with --security.
22536 * reflection.c|h: Added code to get declarative security attributes
22537 for LinkDemand and InheritanceDemand. This required to refactor the
22538 existing code for Demand.
22539 * security-manager.c|h: Added new method fields for the special cases
22542 2005-02-10 Martin Baulig <martin@ximian.com>
22544 * icall.c (ves_icall_MonoDebugger_MakeArrayType): New interncall.
22545 (ves_icall_MonoDebugger_GetTypeToken): New interncall.
22547 2005-02-10 Martin Baulig <martin@ximian.com>
22549 * mono-debug.c, mono-debug-debugger.c: Completely reworked the
22550 debugging code; this is almost a complete rewrite.
22552 * icall.c (ves_icall_MonoDebugger_GetMethodIndex): New interncall.
22554 Thu Feb 10 15:19:01 CET 2005 Paolo Molaro <lupus@ximian.com>
22556 * domain.c, object.h: expose mono_string_equal () and
22557 mono_string_hash ().
22558 * icall.c, string-icalls.c: remove the string.GetHashCode () icall,
22559 it's implemented in managed code.
22561 Thu Feb 10 15:03:46 CET 2005 Paolo Molaro <lupus@ximian.com>
22563 * icall.c, gc.c, gc-internal.h: make sure gchandles can't be used
22564 lo leak objects between appdomains.
22566 Thu Feb 10 14:25:00 CET 2005 Paolo Molaro <lupus@ximian.com>
22568 * assembly.c: old compilers compilation fix from
22569 robertj@gmx.net (Robert Jordan).
22571 2005-02-09 Ben Maurer <bmaurer@ximian.com>
22573 * class-internals.h: Little reminder for the future.
22575 * debug-helpers.c: Fix up wrapper_type_names
22577 Wed Feb 9 19:34:29 CET 2005 Paolo Molaro <lupus@ximian.com>
22579 * image.c, metadata-internals.h: when loading an image from a file,
22580 mmap all of it and use the same codepaths as when using a
22581 in-memory image: the code is simpler and we use less memory
22582 (both writable and readonly).
22584 Wed Feb 9 18:32:51 CET 2005 Paolo Molaro <lupus@ximian.com>
22586 * gc-internal.h, null-gc.c, boehm-gc.c: added functions to the GC
22587 API to alloc runtime data structures that need to be tracked by the
22588 GC and contain pointers.
22589 * appdomain.c, threads.c, object.c, gc.c: use the above changes to
22590 make the code more readable and eventually use a different GC.
22592 2005-02-09 Zoltan Varga <vargaz@freemail.hu>
22594 * marshal.c (emit_marshal_vtype): Don't do managed->native conversion
22597 2005-02-09 Lluis Sanchez Gual <lluis@novell.com>
22599 * object.c: In release_type_locks(), don't release the cctor lock
22600 if it has already been released. This fixes a crash in the
22603 Tue Feb 8 19:02:59 CET 2005 Paolo Molaro <lupus@ximian.com>
22605 * gc.c, marshal.c, icall.c: register a delegate for finalization
22606 only when the native function pointer has been allocated for it.
22608 Tue Feb 8 18:12:27 CET 2005 Paolo Molaro <lupus@ximian.com>
22610 * object.c: cleaned up some code, allocate objects that are
22611 pointer free with the atomic malloc variant. Allocate memory
22612 for static data from the mempool if it's pointer-free.
22613 Allocate the bounds array at the end of the array data, when needed.
22614 * object-internals.h, object.h: move a private function in a private
22616 * class.c: handle missing case in tracking references in fields.
22618 Tue Feb 8 18:04:51 CET 2005 Paolo Molaro <lupus@ximian.com>
22620 * class.c, class-internals.h: keep track if a type has
22621 reference fields in either the instance or static fields.
22623 2005-02-07 Lluis Sanchez Gual <lluis@novell.com>
22625 * domain.c, domain-internals.h: Moved RuntimeInfo to domain-internals.h,
22626 and renamed to MonoRuntimeInfo. Added fields to store the expected
22627 framework assembly version. Changed mono_get_framework_version and
22628 mono_get_runtime_version for a single mono_get_runtime_info method.
22630 * assembly.c: Added method to remap system assembly versions to the
22631 current executing runtime version. Removed old mapping code.
22632 Remap assembly versions in mono_assembly_load and mono_assembly_loaded.
22634 * icall.c, reflection.c: Track api changes.
22636 2005-02-06 Miguel de Icaza <miguel@novell.com>
22638 * loader.c (method_from_memberref): Improve error reporting,
22639 produce the class name instead of the typeref/typedef index.
22641 2005-02-07 Zoltan Varga <vargaz@freemail.hu>
22643 * marshal.c (mono_marshal_get_stfld_remote_wrapper): Fix wrapper type.
22645 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
22647 * loader.c (mono_lookup_pinvoke_call): Allow for combination of
22648 stdcall and charset name mangling. Reorganize the code and add
22649 some tracing stuff.
22651 2005-02-05 Ben Maurer <bmaurer@ximian.com>
22653 * monodiet.c: More iters!
22655 * marshal.c: Iter usage.
22657 * icall.c: Iter usage.
22659 * object.c: Use iters.
22661 * debug-helpers.c: More iters
22663 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
22665 * loader.c (mono_lookup_pinvoke_call): Add brute-force checking for mangled function names
22668 2005-02-05 Ben Maurer <bmaurer@ximian.com>
22670 * mono-debug-debugger.c: use iters
22672 * class.c, class-internals.h: mono_class_setup_events is static
22675 * All callers: use iters
22677 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
22679 * class.c string-icalls.c marshal.c reflection.c: Applied patch from
22680 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
22682 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
22684 * object.c (mono_class_proxy_vtable): Add missing _setup () calls.
22686 * marshal.h: Add prototypes for ldfld/stfld_remote.
22688 * appdomain.c (mono_domain_fire_assembly_load): Handle the case when
22689 this is called during startup.
22691 Fri Feb 4 20:27:58 CET 2005 Paolo Molaro <lupus@ximian.com>
22693 * appdomain.c, monitor.c, monitor.h, threads-types.h: made the
22694 MonoThreadsSync struct private in monitor.c. Changed the way
22695 MonoThreadsSync is allocated so it's faster and there is no
22696 need to keep track of it with a finalizer and it uses less memory.
22697 This also finally allows us to allocate mono objects as ptrfree when
22698 there are no reference fields.
22700 Fri Feb 4 20:24:03 CET 2005 Paolo Molaro <lupus@ximian.com>
22702 * gc.c, null-gc.c, boehm-gc.c, gc-internal.h: added functions to deal with
22703 disappearing link to the GC interface and use them to simplify
22704 the gchandles code.
22706 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
22708 * class-internals.h marshal.c: Add two new wrappers, ldfld_remote and
22709 stfld_remote which call mono_load/store_field_new. This allows methods
22710 calling ldfld/stfld wrappers to be AOTed.
22712 * console-io.c: Include sys/filio.h under solaris.
22714 * console-io.c: Include curses.h if needed correctly.
22716 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
22718 * icall.c (ves_icall_MonoMethod_get_base_definition): Initialize
22719 method->klass as well.
22721 * class-internals.h (MonoCachedClassInfo): Add 'finalize_image' field.
22723 * class.c (mono_class_init): Switch on lazy initialization of
22726 * class.c (mono_class_get_finalizer): Handle the case when the
22727 finalizer is inherited.
22729 2005-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22731 * console-io.c: <curses.h> is needed by term.h on solaris.
22733 2005-02-03 Ben Maurer <bmaurer@ximian.com>
22735 * icall.c, class-internals.h, monodiet.c, class.c: Remove
22736 mono_class_setup_properties where possible. Remove this ftn from
22737 the header file, and make it static.
22739 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
22741 * loader.c: Add missing setup_... call.
22743 * class.c: Add missing setup_... calls.
22745 * class.c (mono_class_init): Switch on lazy initialization of
22746 the generic vtable.
22748 * class.c (mono_class_init): Fix generics broken by the recent changes.
22750 * monodiet.c (handle_type): Add missing setup_... calls.
22752 * class.c: Back out garbage in previous patch.
22754 * class.c: Add missing setup_... calls.
22756 * class.c (mono_class_get_method_from_name_flags): Avoid calling
22757 mono_class_setup_methods () if possible.
22759 * class-internals.h (MonoClass): Add 'has_cctor' flag.
22761 * class-internals.h (MonoCachedClassInfo): New structure.
22763 * class.c: Initialize properties and events fields of MonoClass lazily.
22765 * class.c: Add infrastructure for lazily initializing the methods and
22766 vtable fields of MonoClass. Not yet used.
22768 * class.c (mono_class_get_finalizer): New helper function.
22770 * class.c: Add infrastructure for loading some class related data from
22773 * object.c: Add infrastructure for initializing the vtable from data
22776 * gc.c (run_finalize): Use mono_class_get_finalizer ().
22778 * class.c loader.c object.c icall.c gc.c reflection.c: Call the
22779 appropriate initialization function before accessing parts of the
22780 MonoClass structure.
22782 * marshal.c: Fix warnings.
22784 * marshal.c (emit_marshal_array): Add missing 'break'. Fixes #72169.
22786 * mono-debug-debugger.c (get_exception_message): Use
22787 mono_class_get_method_from_name_flags ().
22789 2005-02-02 Ben Maurer <bmaurer@ximian.com>
22791 * reflection.c, appdomain.c: Replace a few manual searches that
22792 Zoltan missed. (Paolo approved this part of my initial patch).
22794 Wed Feb 2 16:32:08 CET 2005 Paolo Molaro <lupus@ximian.com>
22796 * profiler.c: disable recording statistical events at report time.
22798 Wed Feb 2 14:14:00 CET 2005 Paolo Molaro <lupus@ximian.com>
22800 * icall.c: patch from Geoff Norton <gnorton@customerdna.com>
22801 to byteswap arrays of enum values, too (bug #72080).
22803 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
22805 * appdomain.c (set_domain_search_path): Allow this to be called if
22806 domain->setup is not yet set.
22808 * loader.c (mono_method_get_index): New helper function.
22810 * loader.c reflection.c: Use mono_method_get_index ().
22812 * class.c (mono_class_get_method_from_name_flags): New helper method.
22814 * debug-helpers.h debug-helpers.c (mono_find_method_by_name): Remove
22817 * class.c (mono_class_get_cctor): New helper method.
22819 * string-icalls.c object.c class.c marshal.c reflection.c: Use
22820 mono_class_get_method () to look up methods.
22822 2005-02-01 Miguel de Icaza <miguel@novell.com>
22824 * console-io.c: Fix the build, this should work on Windows.
22826 2005-01-31 Ben Maurer <bmaurer@ximian.com>
22828 * marshal.c (mono_marshal_xdomain_copy_out_value): cached_str must
22829 be set to null to keep things valid
22831 2005-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22833 * icall.c: added Console 2.0 icalls.
22834 * Makefile.am: added console-io.[ch]
22835 * console-io.[ch]: internal calls for Console 2.0 API.
22837 Mon Jan 31 19:01:29 CET 2005 Paolo Molaro <lupus@ximian.com>
22839 * class.c: make sure we consider all the interfaces
22840 when calculating max_interface_id (bug found by
22841 Jeroen Frijters running ikvm).
22843 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
22845 * icall.c (ves_icall_FieldInfo_SetValueInternal): Handle setting of
22846 valuetype fields to null.
22848 * object.c (set_value): Ditto. Fixes #71669.
22850 2005-01-31 Martin Baulig <martin@ximian.com>
22852 * metadata.c (mono_metadata_has_generic_params): New public
22853 function; checks whether something is a generic method.
22855 Sun Jan 30 20:19:48 CET 2005 Paolo Molaro <lupus@ximian.com>
22857 * appdomain.c: fix infinite recursion when adding assemblies.
22859 2005-01-30 Sebastien Pouliot <sebastien@ximian.com>
22861 * object.c: Fix small typo to return all items for Environment.
22862 GetCommandLineArgs.
22864 Sun Jan 30 16:49:01 CET 2005 Paolo Molaro <lupus@ximian.com>
22866 * domain.c, appdomain.c, assembly.c, image.c, domain-internals.h,
22867 reflection.c: more domain and assembly-unload related fixes
22868 and memory leaks plugs.
22870 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
22872 * 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.
22874 2005-01-29 Ben Maurer <bmaurer@ximian.com>
22876 * loader.c (mono_method_signature): Make this method lazy
22877 (mono_get_method_from_token): Don't computate the signature here.
22879 Doing this saves quite a bit of memory. I got 90 kb on starting up
22880 monodoc. It should also save some disk reads on startup.
22882 * *: MonoMethod->signature might be NULL now. You *MUST* use
22883 mono_method_signature.
22885 2005-01-29 Zoltan Varga <vargaz@freemail.hu>
22887 * object.c (mono_runtime_get_main_args): Return an array from the
22888 current domain here. Fixes #71938.
22890 Sat Jan 29 15:59:05 CET 2005 Paolo Molaro <lupus@ximian.com>
22892 * monitor.c: formatting changes to comply with the
22893 mono coding style and remove #ifdefs from the code.
22895 Sat Jan 29 15:18:54 CET 2005 Paolo Molaro <lupus@ximian.com>
22897 * metadata.c, private.h: remove some unneeded data
22898 and use a more compact representation for table schemas.
22900 Fri Jan 28 18:23:44 CET 2005 Paolo Molaro <lupus@ximian.com>
22902 * metadata.c, metadata-internals.h: add mono_aligned_addr_hash()
22903 to get a better distribution in hash tables.
22904 * *.c: use mono_aligned_addr_hash() where appropriate.
22905 * assembly.c: make var static.
22907 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
22909 * domain-internals.h: Put MonoJitInfo on a diet.
22911 * domain.c: Fix a warning.
22913 Wed Jan 26 22:20:46 CET 2005 Paolo Molaro <lupus@ximian.com>
22915 * gc.c: rework the gc handles code to reuse handles
22918 Wed Jan 26 17:34:09 CET 2005 Paolo Molaro <lupus@ximian.com>
22920 * domain.c: fixed long standing bug in mono_string_equal() which
22921 was brought to light with the ldstr changes.
22923 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
22925 * reflection.c: Remove warning by adding missing include for marshal.h
22927 Tue Jan 25 18:06:00 CET 2005 Paolo Molaro <lupus@ximian.com>
22929 * domain.c, object.c: change the ldstr_table to hold
22930 MonoString* as keys: makes the runtime isinterned lookup
22931 faster and simplifies memory management.
22933 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
22935 * icall.c: Renamed GetEnvironmentVariable so internal* so it was
22936 possible to add imperative security checks before calling the icall.
22937 * reflection.c: Return security attributes on the original MonoMethod
22938 (and not the wrapped one). This fix permissions on icalls.
22940 2005-01-25 Dick Porter <dick@ximian.com>
22942 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Make
22943 the check for mktime() support actually test the mktime() return
22944 value. "Fixes" bug 71682, though the output is still different to
22947 2005-01-25 Martin Baulig <martin@ximian.com>
22949 * class.c (mono_class_is_assignable_from): Make this work for
22952 2005-01-24 Ben Maurer <bmaurer@ximian.com>
22954 * marshal.c (mono_string_utf8_to_builder)
22955 (mono_string_builder_to_utf16): We might not have ownership of the
22956 string. In thise case, we need to create a new buffer.
22958 * object-internals.h (mono_stringbuilder_capacity): sb->str might
22959 be null, in which case, use the default capacity.
22961 Mon Jan 24 16:42:29 CET 2005 Paolo Molaro <lupus@ximian.com>
22963 * gc-internal.h, null-gc.c, profiler.c, boehm-gc.c: hook the
22964 GC events to the profiler.
22966 Mon Jan 24 15:59:54 CET 2005 Paolo Molaro <lupus@ximian.com>
22968 * gc.c: remove valgrind detection nonsense. Set GC_DONT_GC
22969 if you don't want the GC to run.
22971 Mon Jan 24 15:53:25 CET 2005 Paolo Molaro <lupus@ximian.com>
22973 * Makefile.am, gc.c, mono-gc.h, boehm-gc.c, null-gc.c, gc-internal.h:
22974 start providing a GC API and keeping different implementations in
22976 * profiler.h, profiler.c, profiler-private.h: provide the GC events API.
22978 2005-01-22 Ben Maurer <bmaurer@ximian.com>
22980 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Use
22981 mmap rather than allocating a huge buffer.
22982 (mono_debug_close_mono_symbol_file): Free the buffer allocated
22985 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
22987 * icall.c: Add new internal calls for SecurityManager.SecurityEnabled
22988 and CheckExecutionRights.
22989 * reflection.c|h: Keep the index of the declarative security to be
22990 used, instead of the pointer, when AOT compiler is used. Also add
22991 class initialization when requesting demands.
22992 * security-manager.c|h: Implement SecurityManager.SecurityEnabled and
22993 CheckExecutionRights. Both properties are now FALSE by default, and
22994 unmodifiable, unless the --security option is used.
22996 Fri Jan 21 15:29:27 CET 2005 Paolo Molaro <lupus@ximian.com>
22998 * domain.c, appdomain.c, assembly.c, image.c, metadata-internals.h,
22999 reflection.c: properly refcount images and assemblies, many leaks fixed.
23001 2005-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23003 * threadpool.c: increase the timeout for threads in the thread pool to
23004 10s. Fixes bug #67159.
23006 2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
23008 * class-internals.h: Sun's compiler insists on explicit
23009 signed on bit fields to handle then correctly.
23011 2005-01-19 Miguel de Icaza <miguel@ximian.com>
23013 * file-io.c (ves_icall_System_IO_MonoIO_get_InvalidPathChars):
23014 Make the size of the array fit only the number of invalid path
23015 chars that we have.
23017 * class.c (_mono_class_get): Improve the error reporting when a
23018 class referenced is not found, to assist debugging.
23020 Wed Jan 19 19:57:43 CET 2005 Paolo Molaro <lupus@ximian.com>
23022 * threads.c: fix off-by-one error.
23023 * domain.c: free data allocated in the domain.
23025 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
23027 * reflection.c (mono_method_body_get_object): Fill out exception info
23030 * object-internals.h: Add MonoReflectionExceptionHandlingClause
23033 2005-01-19 Martin Baulig <martin@ximian.com>
23035 * loader.c (mono_get_method_constrained): Make this work again.
23037 2005-01-19 Zoltan Varga <vargaz@freemail.hu>
23039 * object-internals.h (_MonoReflectionMethodBody): Make local_index a
23040 guint16 to match the managed side.
23042 * reflection.c (mono_reflection_body_get_object): Fill out local
23045 * reflection.c (mono_method_body_get_object): Fill out local_var_sig_token
23048 * object-internals.h (_MonoReflectionMethodBody): Rename 'sig_token' to
23049 'local_var_sig_token'.
23051 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
23053 * loader.c (mono_lookup_pinvoke_call): Revert the previous patch as it breaks
23056 * reflection.c (mono_method_body_get_object): Handle abstract and
23059 Mon Jan 17 19:22:39 CET 2005 Paolo Molaro <lupus@ximian.com>
23061 * marshal.c, loader.c, class-internals.h, reflection.c:
23062 store the emthod data for a wrapper in an array instead of a list.
23064 Mon Jan 17 18:48:53 CET 2005 Paolo Molaro <lupus@ximian.com>
23066 * marshal.c: change the code to allocate memory more
23067 conservatively for method wrappers.
23069 Mon Jan 17 18:03:30 CET 2005 Paolo Molaro <lupus@ximian.com>
23071 * class-internals.h, marshal.c: move the str_to_ptr and ptr_to_str
23072 fields from MonoClass to the marshal info structure where they belong.
23074 Mon Jan 17 16:14:46 CET 2005 Paolo Molaro <lupus@ximian.com>
23076 * class.c, object.c, class-internals.h, marshal.c: rearrange
23077 some fields and tweak some types to lower memory usage.
23079 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
23081 * threads.c (signal_thread_state_change): Handle the case when the
23082 target thread is the current thread.
23084 * marshal.c (mono_struct_delete_old): Do not free lpwstr fields.
23086 * marshal.c: Rename emit_ptr_to_str_conv and its pair to
23087 emit_ptr_to_object_conv.
23089 * marshal.c (emit_ptr_to_object_conv): Add support for lpwstr->str
23090 marshalling. Fixes #71352.
23092 Mon Jan 17 10:59:20 CET 2005 Paolo Molaro <lupus@ximian.com>
23094 * metadata.h, blob.h: move table enum to blob.h so it can be included
23096 * image.c, metadata.c, metadata-internals.h, pedump.c, reflection.c:
23097 cut the size of MonoImage/MonoDynamicImage.
23099 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
23101 * profiler.c (mono_profiler_install_simple): Fix default arguments.
23103 Sun Jan 16 12:25:22 CET 2005 Paolo Molaro <lupus@ximian.com>
23105 * reflection.c, reflection.h, icall.c: add a function to check
23106 if an attribute type is defined for a metadata object.
23108 2005-01-14 Lluis Sanchez Gual <lluis@novell.com>
23110 * object-internals.h: Added some needed fields from StringBuilder class.
23111 * marshal.c: Set the maxCapacity when creating a StringBuilder.
23113 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
23115 * icall.c (ves_icall_System_Environment_Exit): Suspend all managed
23116 threads before shutting down the runtime.
23118 * threads.c (mono_thread_suspend_all_other_threads): New helper function.
23120 Thu Jan 13 18:16:35 CET 2005 Paolo Molaro <lupus@ximian.com>
23122 * object-internal.h, threads.c: implement stacksize and
23123 parameterized thread start functionality (requires
23124 matching corlib). Marked broken code for later removal.
23126 2005-01-12 Martin Baulig <martin@ximian.com>
23128 * class-internals.h (MonoGenericClass): Moved the `initialized'
23129 flag to MonoDynamicGenericClass, removed `init_pending'.
23130 (MonoGenericInst): Added `is_reference' flag.
23132 2005-01-12 Zoltan Varga <vargaz@freemail.hu>
23134 * reflection.c (mono_image_create_pefile): Only set the pe_offset
23135 inside the MSDOS header. Fixes #71201.
23137 * gc.c (mono_gc_cleanup): Handle the case when this is called from the
23139 (mono_domain_finalize): Ditto.
23141 2005-01-12 Martin Baulig <martin@ximian.com>
23143 * class.c (mono_get_shared_generic_class): Use the cache for
23144 non-dynamic generic classes.
23146 * class-internals.h (mono_class_create_generic_2): Removed
23147 function prototype, this function is now static inside class.c.
23149 * class.c (mono_class_create_generic_2): Made this static, only
23150 call it from mono_class_init() and mono_class_setup_parent().
23151 (collect_implemented_interfaces_aux): Call mono_class_init() on
23152 the interfaces we collect.
23153 (mono_class_setup_vtable): Call mono_class_init (class->parent).
23155 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
23157 * threads.c (mono_thread_attach): Call DuplicateHandle on the thread handle on win32 to make
23158 it a real thread handle.
23160 * domain-internals.h: Move exvar_offset from MonoJitInfo to
23161 MonoJitExceptionInfo, since each catch clause needs its own variable.
23163 2005-01-11 Dick Porter <dick@ximian.com>
23165 * image.c (mono_pe_file_open): New variant on mono_image_open()
23166 that does not set up the CLI metadata; used for FileVersionInfo so
23167 it can get the data for windows binaries too.
23169 * process.c (process_read_string_block): Don't read off the end of
23170 the StringTable block.
23172 These both fix bug 70766.
23174 Tue Jan 11 15:26:00 CET 2005 Paolo Molaro <lupus@ximian.comt>
23176 * gc.c: set some fields to NULL at GC cleanup time.
23177 * threads.c: if we quit the main thread, call exit ().
23179 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
23181 * threads.c (interruption_request_apc): Decore APC callbacks with CALLBACK under win32.
23183 Mon Jan 10 18:47:28 CET 2005 Paolo Molaro <lupus@ximian.com>
23185 * threads.h, threads.c, object.c: added accessor and settor for
23186 main_thread. Handle it specially when exiting from it: wait
23187 for other foreground threads to exit.
23189 Mon Jan 10 12:06:18 CET 2005 Paolo Molaro <lupus@ximian.com>
23191 * process.c, verify.c: remove some bloat.
23193 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
23195 * loader.c (mono_lookup_pinvoke_call): If we found the function without name mangling, change
23196 the calling convention to cdecl under win32.
23198 2005-01-08 Ben Maurer <bmaurer@ximian.com>
23200 * object.c (mono_object_get_size): New function to get the size of
23201 an object instance.
23203 * profiler.c (simple_allocation): Use above.
23205 2005-01-08 Sebastien Pouliot <sebastien@ximian.com>
23207 * appdomain.c: Replaced ves_icall_System_AppDomain_getDomainByID by
23208 ves_icall_System_AppDomain_getRootDomain (as it's not required to
23209 get an appdomain by it's id and we can't assume the root's id is 0).
23210 * domain-internals.h: Change the function prototype to match.
23211 * icall.c: Change the icall table for AppDomain.
23213 2005-01-08 Miguel de Icaza <miguel@ximian.com>
23215 * locales.c (string_invariant_compare_char): Only compute
23216 GUnicodeTypes in the case where we need them. Test for ordinality
23217 first and return if so.
23222 * FIXME: here we must use the information from c1type and c2type
23223 * to find out the proper collation, even on the InvariantCulture, the
23224 * sorting is not done by computing the unicode values, but their
23225 * actual sort order.
23228 Sat Jan 8 19:03:26 CET 2005 Paolo Molaro <lupus@ximian.com>
23230 * loader.c: for P/Invoke methods, allow the "Internal" shared
23231 library name to refer to the calling process symbol namespace.
23233 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
23235 * Makefile.am: Add the security manager to the build.
23236 * security-manager.c|h: New. Initialization of the security manager.
23238 2005-01-07 Dick Porter <dick@ximian.com>
23241 * monitor.c: Update thread state during Monitor and WaitHandle
23242 waits. Fixes bug 71031.
23244 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
23246 * reflection.c (property_encode_signature): Correctly handle when the
23247 property has no methods.
23249 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
23251 * reflection.c (reflection_methodbuilder_to_mono_method): Remove debug stuff.
23253 * reflection.c (reflection_methodbuilder_from_method_builder): Copy
23254 fields from mb, not rmb. Fixes #71017.
23256 * marshal.c (emit_ptr_to_str_conv): Add support for
23257 ByValTStr -> string conversion. Fixes #71015.
23259 * appdomain.c (mono_domain_owns_vtable_slot): New helper function.
23261 * mempool.c (mono_mempool_contains_addr): New helper function.
23263 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
23265 * metadata.c (mono_metadata_compute_size): Fix size calculation of
23266 HasSematics encoded fields.
23268 * metadata.c (mono_type_to_unmanaged): Improve error message for
23269 invalid string marshalling.
23271 * metadata.c: Fix warnings.
23273 Wed Jan 5 16:17:27 CET 2005 Paolo Molaro <lupus@ximian.com>
23275 * profiler-private.h, profiler.c, profiler.h, gc.c: sample statistical
23278 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
23280 * domain.c object.c domain-internals.h: Revert part of r38077 since the
23281 keys to proxy_vtable_hash are GCd objects. Fixes running the class lib
23284 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
23286 * marshal.c: Use MONO_CLASSCONST instead of MONO_LDPTR in some places,
23287 so methods containing these can be AOTed.
23289 2005-01-03 Martin Baulig <martin@ximian.com>
23291 * loader.c (find_method): Removed the hack for generic instances.
23292 (method_from_memberref): If our parent is a generic instance, pass
23293 its generic type definition to find_method() and then inflate the
23295 (mono_get_method_constrained): Pass the generic type definition to
23296 find_method() and inflate the method later.
23298 * class-internals.h (MonoStats): Added `generic_class_count'.
23300 * icall.c (ves_icall_MonoGenericMethod_get_reflected_type):
23301 Renamed to ves_icall_MonoGenericMethod_get_ReflectedType().
23303 * reflection.c (mono_custom_attrs_from_params): Don't ignore
23304 generic type definitions.
23306 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
23308 * loader.c icall.c: Fix warnings.
23310 2004-12-29 Zoltan Varga <vargaz@freemail.hu>
23312 * marshal.c (mono_marshal_get_managed_wrapper): Fix returning of
23313 blittable types. Fixes #70864.
23315 2004-12-29 Martin Baulig <martin@ximian.com>
23318 (ves_icall_MonoGenericMethod_get_reflected_type): New interncall.
23320 * reflection.c (mono_method_get_object): Create a
23321 "System.Reflection.MonoGenericMethod" for inflated methods; don't
23322 call mono_get_inflated_method().
23324 * class-internals.h (MonoStats): Added `inflated_method_count_2'.
23326 2004-12-27 Martin Baulig <martin@ximian.com>
23328 * class-internals.h (MonoMethod): Added `is_inflated' flag.
23329 (MonoMethodInflated): Added `inflated' field.
23331 * class.c (mono_class_inflate_generic_method): Don't really
23332 inflate the method here; just set the `is_inflated' flag in the
23334 (mono_class_get_inflated_method): Actually inflate the method here
23335 if it's not already inflated; we use the MonoMethodInflated's new
23336 `inflated' field as a cache.
23338 2004-12-26 Martin Baulig <martin@ximian.com>
23341 (inflate_generic_class): Moved some code out of inflate_generic_type().
23342 (mono_class_inflate_generic_method): If we're already inflated,
23343 inflate the context and use the declaring method; ie. make sure
23344 the declaring method of an inflated method is always the generic
23346 (mono_class_create_from_typedef): Create
23347 `class->generic_container->context->gclass'.
23349 2004-12-24 Ben Maurer <bmaurer@ximian.com>
23351 * metadata-internals.h, marshal.c, reflection.c: More
23352 MonoGHashTable->GHashTable.
23354 * domain-internals.h, class.c: Change MonoGHashTable's into
23355 GHashTables for some cases where no gc stuff is used
23357 All users: update apis
23359 2004-12-23 Ben Maurer <bmaurer@ximian.com>
23361 * metadata.c (builtin_types): Make this `const'. Makes this get
23362 put into the shareable section.
23363 (mono_metadata_init): Casts to make gcc happy.
23365 2004-12-22 Zoltan Varga <vargaz@freemail.hu>
23367 * gc.c (mono_gc_init): Add a '\n' to the valgrind warning.
23369 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
23371 * icall.c: Added an internal call to retrieve the position and length
23372 of assembly-level declarative security attributes (RequestMinimum,
23373 RequestOptional and RequestRefuse). This is used by the Assembly class
23374 to re-create the corresponding permission sets.
23376 Tue Dec 21 14:50:31 CET 2004 Paolo Molaro <lupus@ximian.com>
23378 * marshal.c: fix the stelemref wrapper to be type correct
23381 2004-12-20 Ben Maurer <bmaurer@ximian.com>
23383 * icall.c (ves_icall_System_Object_GetHashCode): There was no need
23384 to do key & 0x7fffffff. Hashtable already does this. It just
23385 results in longer code.
23387 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
23389 * appdomain.c: Bump corlib version.
23390 * class-internals.h: Added RuntimeSecurityFrame to mono_defaults.
23391 * domain.c: Add RuntimeSecurityFrame to mono_defaults.
23392 * reflection.c|h: Add functions to get declarative security infos
23393 (blob position and length) for assemblies, classes and methods.
23395 Mon Dec 20 15:28:54 CET 2004 Paolo Molaro <lupus@ximian.com>
23397 * reflection.c: sort the constant table (bug #70693).
23399 Mon Dec 20 12:19:37 CET 2004 Paolo Molaro <lupus@ximian.com>
23401 * object-internals.h, threads.c, domain.c: add accessors for
23402 the MonoThread and MonoDomain tls keys.
23404 2004-12-18 Martin Baulig <martin@ximian.com>
23406 * class.c (inflate_generic_type): If we're inflating a generic
23407 instance, set `ngclass->context->container = context->container';
23408 ie. the container we inflated into.
23410 * metadata.c (mono_metadata_parse_generic_param): Reflect above
23411 inflate_generic_type() changes.
23413 2004-12-17 Martin Baulig <martin@ximian.com>
23415 * class-internals.h
23416 (MonoGenericClass): Replaced `MonoType *generic_type' with
23417 `MonoClass *generic_class'. Removed `dynamic_info'; if
23418 `is_dynamic' is true, we're a `MonoDynamicGenericClass'.
23419 (MonoDynamicGenericClass): Derive from `MonoGenericClass'.
23421 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
23423 * exception.c (mono_exception_from_token): New helper function.
23425 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
23427 * assembly.c (mono_assembly_load_with_partial_name): Call
23428 mono_assembly_loaded before invoking the preload hooks. Fixes
23431 * object-internals.h (MonoThread): Change culture_info and
23432 ui_culture_info into an array.
23434 * threads.c: Cache culture info objects from more than one appdomain.
23436 * threads.c threads-types.h icall.c: Add icalls for manipulating the
23437 current UI culture.
23439 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
23441 * threads.h threads.c appdomain.c: Clear the culture_info field of
23442 all threads during unloading if they point to an object in the dying
23445 2004-12-13 Ben Maurer <bmaurer@ximian.com>
23447 * culture-info.h (TextInfoEntry): New struct
23448 * object-internals.h: sync with managed
23449 * locales.c: fill the `text_info_data' field
23450 * culture-info-tables.h: update
23452 Mon Dec 13 18:10:50 CET 2004 Paolo Molaro <lupus@ximian.com>
23454 * Makefile.am, monodiet.c: add monodiet, an IL code garbage
23457 2004-12-12 Ben Maurer <bmaurer@ximian.com>
23459 * icall.c (ves_icall_ModuleBuilder_getToken): Check for null
23460 (ves_icall_ModuleBuilder_getMethodToken): Ditto
23462 2004-12-12 Martin Baulig <martin@ximian.com>
23464 * mono-debug-debugger.c (write_type): If we're an enum and the
23465 builtin types have already been initialized, call mono_class_init().
23467 2004-12-11 Martin Baulig <martin@ximian.com>
23469 * metadata.c (mono_metadata_load_generic_params): Added
23470 `MonoGenericContainer *parent_container' argument; automatically
23471 compute `container->is_method'; pass the correct owner to
23474 * reflection.c (compare_genericparam): Sort the GenericParam table
23475 according to increasing owners.
23477 Fri Dec 10 18:43:46 CET 2004 Paolo Molaro <lupus@ximian.com>
23479 * profiler.c: allow disabling the default profiler.
23481 Fri Dec 10 18:42:11 CET 2004 Paolo Molaro <lupus@ximian.com>
23483 * decimal.c, icall.c: allow disabling System.Decimal support.
23485 2004-12-09 Marek Safar <marek.safar@seznam.cz>
23487 * reflection.c: Add support for null attribute arguments.
23489 2004-12-09 Martin Baulig <martin@ximian.com>
23491 * metadata.h, loader.h: Use `idx' instead of `index' in parameter
23492 names to get rid of compiler warnings.
23494 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
23496 * marshal.c (mono_marshal_get_struct_to_ptr): Call
23497 mono_marshal_load_type_info (). Fixes #69625.
23498 (mono_marshal_get_ptr_to_struct): Likewise.
23500 2004-12-08 Martin Baulig <martin@ximian.com>
23502 * mono-debug.h: Bumped version number to 47.
23504 * mono-debug-debugger.c
23505 (mono_debugger_event_handler, mono_debugger_event): Take two
23506 guint64 arguments insteed of a gpointer and a guint32.
23508 2004-12-08 Martin Baulig <martin@ximian.com>
23510 * debug-mono-symfile.h
23511 (MonoDebugLineNumberEntry): Renamed `offset' to `il_offset' and
23512 `address' to `native_offset'.
23514 2004-12-08 Martin Baulig <martin@ximian.com>
23516 * class.c (mono_class_create_from_typespec): Only inflate if we
23517 either have `context->gclass' or `context->gmethod'.
23519 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
23521 * metadata-internals.h (MonoAssembly): Add 'corlib_internal' field.
23523 * object-internals.h (MonoReflectionAssemblyBuilder): Move 'corlib_internal' field from Assembly to AssemblyBuilder.
23525 * reflection.c (mono_image_basic_init): Initialize assembly->corlib_internal from the assembly builder.
23527 * reflection.c (mono_assembly_get_object): Remove the workaround put
23528 in for the release.
23530 * appdomain.c: Use the corlib_internal field from MonoAssembly.
23532 * appdomain.c: Bump corlib version.
23534 * reflection.c (mono_assembly_get_object): Add a workaround so __MetadataTypes won't
23535 be visible in other appdomains.
23537 2004-12-07 Ben Maurer <bmaurer@ximian.com>
23539 * threads.c: Interlocked inc and dec for longs were messed up,
23540 use a KISS based impl for this. Fixes 70234
23542 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
23544 * threads.c (ves_icall_System_Threading_Thread_GetCachedCurrentCulture): Make this lock-less.
23546 Tue Dec 7 10:47:09 CET 2004 Paolo Molaro <lupus@ximian.com>
23548 * icall.c: fix to follow policy not to allow struct
23549 arguments in icalls.
23551 2004-12-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23553 * process.c: make the patch that handles spaces in file paths work
23554 on mono/windows too.
23556 2004-12-06 Martin Baulig <martin@ximian.com>
23558 * class.c (mono_class_create_generic): Call
23559 mono_class_setup_supertypes() if we're dynamic.
23560 (mono_class_is_subclass_of): `g_assert (klass->idepth > 0)'.
23562 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
23564 * object-internals.h: Add new fields to MonoThread.
23566 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
23568 * icall.c threads-types.h threads.c: Add new icalls.
23570 * object-internals.h (MonoThread): Remove unused 'unmanaged' field.
23572 * object-internals.h (MonoReflectionAssembly): Sync object layout with
23575 * appdomain.c: Bump corlib version.
23577 * appdomain.c (ves_icall_System_AppDomain_GetAssemblies): Skip
23578 internal assemblies. Fixes #69181.
23580 2004-12-05 Martin Baulig <martin@ximian.com>
23582 * class.c (mono_class_inflate_generic_signature): Make this a
23583 no-op if `context' is NULL or we don't have any type parameters;
23584 also copy `sentinelpos'.
23586 2004-12-04 Zoltan Varga <vargaz@freemail.hu>
23588 * image.c: Add unbox_wrapper_cache.
23590 * class-internals.h debug-helpers.c: Add MONO_WRAPPER_UNBOX.
23592 * marshal.h marshal.c (mono_marshal_get_unbox_wrapper): New wrapper
23593 function generator.
23595 * object.c (mono_delegate_ctor): Call unbox wrapper if neccesary.
23598 * metadata-internals.h image.c: Add MonoImage->unbox_wrapper_cache.
23600 2004-12-04 Martin Baulig <martin@ximian.com>
23602 * loader.c (mono_method_get_signature_full): New public function;
23603 like mono_method_get_signature(), but with an additional
23604 `MonoGenericContext *' argument.
23606 * class.c (mono_class_inflate_generic_signature): Formerly known
23607 as inflate_generic_signature(); make this public.
23609 2004-12-04 Martin Baulig <martin@ximian.com>
23612 (mono_metadata_parse_type_full): Take a `MonoGenericContext *'
23613 instead of a `MonoGenericContainer *'.
23614 (mono_metadata_parse_array_full): Likewise.
23615 (mono_metadata_parse_signature_full): Likewise.
23616 (mono_metadata_parse_method_signature_full): Likewise.
23617 (mono_metadata_parse_generic_inst): Likewise.
23618 (mono_metadata_parse_generic_param): Likewise.
23619 (mono_metadata_parse_mh_full): Likewise.
23620 (mono_type_create_from_typespec_full): Likewise.
23622 2004-12-03 Martin Baulig <martin@ximian.com>
23624 * class-internals.h (MonoGenericContainer): Replaced the
23625 `MonoGenericContext * pointer with a `MonoGenericContext'
23626 structure and made it the first element.
23628 2004-12-03 Martin Baulig <martin@ximian.com>
23631 (inflate_generic_type): Set the `context->container' when creating
23632 a new MonoGenericContext.
23633 (mono_class_inflate_generic_method): Likewise.
23634 (mono_class_create_from_typespec): Just use `context->container'
23635 to get the container.
23637 * loader.c (method_from_methodspec): Set `context->parent' from
23638 `context->container' - and if that's a method container, use its
23639 parent. Also set the `context->container' when creating a new
23640 MonoGenericContext.
23641 (mono_get_method_from_token): Use just `context->container' to get
23644 * metadata.c (do_mono_metadata_parse_generic_class): Also set
23645 `gclass->context->container'.
23647 * reflection.c (do_mono_reflection_bind_generic_parameters): Set
23648 the `context->container' when creating a new MonoGenericContext.
23650 2004-12-03 Zoltan Varga <vargaz@freemail.hu>
23652 * reflection.c (compare_genericparam): Sort params with identical
23653 owner by their number. Fixes gen-111 on sparc.
23655 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
23657 * threadpool.c (async_invoke_thread): Call push/pop_appdomain_ref
23658 around the domain changes.
23660 * appdomain.c (mono_domain_unload): Handle the case when the thread
23661 calling Unload is itself being aborted during unloading. Fixes #70022.
23663 * appdomain.h: Add prototype for mono_install_runtime_cleanup.
23665 * marshal.c (emit_thread_interrupt_checkpoint_call): Call
23666 checkpoint_func as an icall so it gets a wrapper.
23667 (mono_marshal_get_xappdomain_invoke): Call push/pop_appdomain_ref ()
23668 in the cross-appdomain wrappers too.
23670 * threads.c (mono_thread_has_appdomain_ref): Make this public.
23672 * assembly.c (mono_assembly_open_from_bundle): Fix warning.
23674 * reflection.c: Fix some memory leaks.
23676 2004-12-02 Martin Baulig <martin@ximian.com>
23678 * metadata-internals.h (MonoImage): Removed `generic_class_cache'.
23680 * metadata.c (generic_class_cache): New static hashtable.
23681 (mono_metadata_lookup_generic_class): New public method.
23683 2004-12-02 Martin Baulig <martin@ximian.com>
23685 * class.c (mono_class_create_from_typedef): Call
23686 mono_class_setup_parent() and mono_class_create_mono_type() before
23687 parsing the interfaces.
23689 2004-12-02 Martin Baulig <martin@ximian.com>
23691 * metadata.c (generic_inst_cache): New static hashtable.
23692 (mono_metadata_lookup_generic_inst): New public function.
23693 (mono_metadata_inflate_generic_inst): New public function.
23694 (mono_metadata_parse_generic_inst): New public function.
23695 (do_mono_metadata_parse_generic_class): Use the new
23696 mono_metadata_parse_generic_inst() for parsing the `gclass->inst'
23697 since this'll also use the cache.
23699 * reflection.c (mono_reflection_bind_generic_method_parameters):
23700 Use mono_metadata_lookup_generic_inst() to use the new cache.
23702 * class.c (inflate_mono_type): Use
23703 mono_metadata_inflate_generic_inst() to inflate a generic
23704 instance; this'll also use the new cache.
23706 * loader.c (method_from_methodspec): Use
23707 mono_metadata_parse_generic_inst() and
23708 mono_metadata_inflate_generic_inst() rather than parsing it
23709 manually, so we can use the new cache.
23711 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
23713 * threads.c (wait_for_tids): Do not incorrectly free threads when
23714 the wait times out.
23716 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
23718 * icall.c (mono_ArgIterator_Setup) : Conditionally compile calculation of
23719 iter->args based on whether parameters are passed in registers (i.e.
23720 MONO_ARCH_REGPARMS is defined)
23722 2004-12-01 Zoltan Varga <vargaz@freemail.hu>
23724 * loader.c (mono_lookup_pinvoke_call): Use the remapped dll name in
23725 the exception message. Fixes #70070.
23726 (method_from_methodspec): Fix warnings.
23728 2004-12-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
23730 * process.c: (complete_path) return the path quoted
23732 2004-12-01 Martin Baulig <martin@ximian.com>
23734 * class-internals.h (MonoGenericInst): New structure.
23735 (MonoGenericClass): Replaced `type_argc', `type_argv' and
23736 `is_open' with `MonoGenericInst *inst'.
23737 (MonoGenericMethod): Replaced `mtype_argc', `mtype_argv' and
23738 `is_open' with `MonoGenericInst *inst'.
23740 2004-11-30 Martin Baulig <martin@ximian.com>
23742 Generics API cleanup: renamed MonoGenericInst -> MonoGenericClass.
23744 * metadata-internals.h (MonoImage): Renamed `generic_inst_cache'
23745 to `generic_class_cache'.
23748 (mono_generic_inst_hash): Renamed to mono_generic_class_hash().
23749 (mono_generic_inst_equal): Renamed to mono_generic_class_equal().
23750 (mono_generic_inst_is_valuetype): Renamed to
23751 mono_generic_class_is_valuetype().
23753 * class-internals.h
23754 (MonoGenericInst): Renamed to MonoGenericClass.
23755 (MonoDynamicGenericInst): Renamed to MonoDynamicGenericClass.
23756 (MonoClass): Renamed `generic_inst' to `generic_class'.
23757 (MonoGenericContext): Renamed `ginst' to `gclass'.
23759 * object-internals.h
23760 (MonoReflectionGenericInst): Renamed to MonoReflectionGenericClass.
23762 * reflection.c (mono_reflection_generic_inst_initialize): Renamed to
23763 mono_reflection_generic_class_initialize().
23765 * icall.c (icall_entries): "System.Reflection.MonoGenericInst" is
23766 now known as "System.Reflection.MonoGenericClass".
23767 (monogenericinst_icalls): Renamed to monogenericclass_icalls.
23769 2004-11-29 Sebastien Pouliot <sebastien@ximian.com>
23771 * class-internals.h: Added a flag field to MonoClass to cache the
23772 declarative security attributes actions associated with the class.
23773 * domain-internals.h: Added booleans to MonoJitInfo to cache the
23774 (class or method level) stack modifiers (Assert, Deny and PermitOnly)
23775 applicable to the JITted method.
23776 * reflection.c|h: Added functions to extract (as flags) which security
23777 actions are available (declaratively) for a method, class or assembly.
23778 * metadata.c|h: Added functions to search the declarative security
23779 table in the metadata.
23781 2004-11-29 Ben Maurer <bmaurer@ximian.com>
23783 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces):
23784 EXPORTEDTYPES are already in the class name cache, so there is no
23785 need to add extra code here to look at them. Just removes a bit of
23788 (ves_icall_System_Environment_get_TickCount): No need for #if
23789 WINDOWS. We already have the code in io-layer.
23791 2004-11-28 Martin Baulig <martin@ximian.com>
23794 (method_from_methodspec): Also inflate the `gmethod->mtype_argv'.
23797 2004-11-27 Miguel de Icaza <miguel@ximian.com>
23799 * assembly.c (do_mono_assembly_open): Instead of having a
23800 conditional WITH_BUNDLE, incorporate support for bundles here, by
23801 having a global `bundles' variable holding a pointer to the actual
23804 (mono_register_bundled_assemblies): New API call used by the
23807 See mkbundle.1 for details.
23809 2004-11-27 Martin Baulig <martin@ximian.com>
23811 * object.c (mono_class_vtable): Store the `MonoMethod *' itself in
23812 the vtable for generic methods.
23814 2004-11-26 Martin Baulig <martin@ximian.com>
23817 (mono_metadata_generic_method_hash): New public function.
23818 (mono_metadata_generic_method_equal): Likewise.
23820 * class-internals.h
23821 (MonoGenericContainer): Added `GHashTable *method_hash'.
23823 * reflection.c (ReflectionMethodBuilder): Added
23824 `MonoGenericContainer *generic_container'.
23825 (reflection_methodbuilder_to_mono_method): Don't create a new
23826 MonoGenericContainer each time we're called.
23827 (mono_reflection_bind_generic_method_parameters): Use
23828 `container->method_hash' to cache the results so we don't create a
23829 different method if we're called several times with the same
23832 * loader.c (method_from_methodspec): Use the new
23833 `container->method_hash' here, too.
23835 2004-11-26 Martin Baulig <martin@ximian.com>
23837 * class.c (inflate_generic_signature): Correctly compute
23838 `res->has_type_parameters'.
23839 (mono_class_vtable): Use the `has_type_parameters' flag to
23840 determine whether we're a generic method.
23842 * metadata.c (mono_metadata_parse_method_signature_full): Likewise.
23844 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
23846 * object.c (mono_runtime_run_main): Fix a small memory leak.
23848 2004-11-25 Martin Baulig <martin@ximian.com>
23850 * class.c (set_generic_param_owner): Fixed the loop.
23852 2004-11-25 Martin Baulig <martin@ximian.com>
23854 * object.c (mono_class_vtable): Don't create any JIT wrappers for
23857 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
23859 * reflection.c: Allow all kinds of whitespace, not just ' ' in type
23860 names. Fixes #69787.
23862 2004-11-24 Martin Baulig <martin@ximian.com>
23864 * class.c (mono_class_create_generic_2): If we don't have a
23865 `ginst->parent', inflate `gklass->parent' to get our parent.
23867 2004-11-24 Martin Baulig <martin@ximian.com>
23869 * reflection.c (compare_genericparam): Correctly sort the
23870 GenericParam table; fixes #69779.
23872 2004-11-23 Ben Maurer <bmaurer@ximian.com>
23874 * reflection.c: When writing a PE file, don't create a huge
23875 buffer in memory. Just write the arrays we have to the file.
23876 This reduces memory usage.
23878 * metadata-internals.h: MonoDynamicStream pefile is no longer used
23881 2004-11-17 Martin Baulig <martin@ximian.com>
23883 * class.c (mono_class_init): Don't setup `class->parent' for
23884 dynamic instances; moved this to mono_class_generic_2().
23885 (mono_class_create_generic): Also set `klass->inited' for dynamic
23887 (mono_class_create_generic_2): Don't do anything for dynamic
23888 generic instances. Set `klass->parent' here and also call
23889 mono_class_setup_parent() here.
23891 * reflection.c (do_mono_reflection_bind_generic_parameters): Added
23892 `MonoType *parent' argument; set `ginst->parent' before calling
23893 mono_class_create_generic_2(), so we set the correct parent.
23895 Thu Nov 18 17:10:32 CET 2004 Paolo Molaro <lupus@ximian.com>
23897 * reflection.c: allow getting attributes from ModuleBuilder
23900 2004-11-17 Martin Baulig <martin@ximian.com>
23902 * class.c (mono_class_create_from_typedef): If a type parameter is
23903 inherited from an outer class, set its owner to that class.
23905 2004-11-17 Atsushi Enomoto <atsushi@ximian.com>
23907 * reflection.c: (mono_image_create_pefile): Don't use NULL argument
23908 for (int*) written size. This fixes bug #69592.
23910 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
23912 * icall.c: Added IsAuthenticodePresnet internal call.
23913 * image.c|h: New function that check a MonoImage for an Authenticode
23914 signature in the certificate PE data directory.
23915 * security.c|h: New internal call to ask the runtime if an
23916 Authenticode signature seems referenced in the PE header.
23918 2004-11-15 Zoltan Varga <vargaz@freemail.hu>
23920 * icall.c (ves_icall_type_isprimitive): Native int is a primitive type.
23922 * reflection.c (mono_image_create_pefile): Free the assembly streams
23923 after writing out the assembly file.
23925 * object.c (mono_runtime_run_main): Fix small memory leak.
23927 * icall.c (ves_icall_Type_GetPropertiesByName): Add support for
23928 property access modifiers. Fixes #69389.
23930 Mon Nov 15 11:54:22 CET 2004 Paolo Molaro <lupus@ximian.com>
23932 * domain.c, object.c, object-internals.h, domain-internals.h,
23933 object.h, marshal.c: keep dynamic code info per domain.
23935 2004-11-15 Martin Baulig <martin@ximian.com>
23937 * class.c (mono_type_get_name_recurse): Put type arguments in
23938 `[',`]' instead of in `<','>'. Thanks to Atsushi for the patch,
23941 2004-11-15 Martin Baulig <martin@ximian.com>
23943 * class.c (mono_type_get_name_recurse): Added `include_ns' flag.
23944 (mono_class_setup_vtable): When computing `the_cname' for a
23945 generic instance, don't include the namespace since we'd otherwise
23948 2004-11-15 Martin Baulig <martin@ximian.com>
23950 * class.c (mono_class_create_generic): Changed return type to void.
23951 (mono_class_create_generic_2): New public function; setup
23952 `class->method', `class->field' and `class->interfaces' here
23953 instead of in mono_class_init().
23955 * class.h (mono_class_create_generic): Moved to class-internals.h.
23957 2004-11-14 Ben Maurer <bmaurer@ximian.com>
23959 * reflection.c (mono_image_create_pefile): take a file HANDLE.
23960 rather than writing to memory, write to this file. Right now,
23961 we are just writting into a buffer, and copying that. However
23962 we can avoid the buffer later.
23964 (mono_dynamic_stream_reset): new function
23966 * icall.c, object-internals.h: update for the above.
23968 2004-11-13 Ben Maurer <bmaurer@ximian.com>
23970 * reflection.c: Remove *_ATOMIC macros. We really shouldn't
23971 have been using gc'd memory. First it is slower, unlikely
23972 the comment in the source code said, secondly, it increases
23973 our footprint to do it in the gc.
23975 * icall.c (WriteToFile): rename of getDataChunk. Rewrite
23976 the method so that it does not have to copy to managed code.
23978 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
23980 * loader.c (mono_method_get_header): Fix build for older glibs which does not define G_LIKELY.
23982 2004-11-12 Martin Baulig <martin@localhost>
23984 * reflection.c (mono_image_create_token): Allow generic method
23985 definitions here, since they may appear in an `.override'; see
23986 gen-98/gen-99 for an example.
23988 2004-11-11 Zoltan Varga <vargaz@freemail.hu>
23990 * icall.c (ves_icall_Type_GetField): Support BFLAGS_IgnoreCase. Fixes
23993 * marshal.c (mono_string_to_ansibstr): Make g_error messages more
23996 2004-11-11 Martin Baulig <martin@ximian.com>
23998 * class.c (mono_class_setup_vtable): In an explicit interface
23999 implementation, the method name now includes the arity.
24001 2004-11-10 Zoltan Varga <vargaz@freemail.hu>
24003 * object.c (mono_array_full_copy): Fix warning.
24005 2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
24007 * appdomain.c: Removed look_for_method_by_name(). Use the new method
24008 mono_class_get_method_from_name() instead.
24010 * class-internals.h: Added two new types of wrappers.
24011 Added MonoRemotingTarget enum. Added new trampoline function type, which
24012 takes an additional MonoRemotingTarget value as parameter, so it is
24013 possible to request a trampoline for a specific target.
24015 * class.c: Added new mono_class_get_method_from_name() method.
24017 * class.h: In MonoRemoteClass, we can have now to vtables, one for
24018 general remoting sinks and one specific for cross domain calls.
24020 * debug-helpers.c: Added new wrapper names.
24022 * icall.c: Use the new method mono_remote_class_vtable() to get the vtable
24025 * image.c: Porperly delete value objects form the remoting invoke hashtable.
24027 * marshal.c: Added mono_marshal_get_xappdomain_invoke(), which together
24028 with several other methods (mono_marshal_get_xappdomain_dispatch,
24029 mono_marshal_get_xappdomain_target, mono_marshal_get_serialize_exception,
24030 and others) can generate a fast remoting wrapper for cross domain calls.
24031 More information can be found in docs/remoting.
24032 Other changes: Removed mono_find_method_by_name, and used
24033 mono_class_get_method_from_name instead.
24034 Remoting wrappers are now stored in a MonoRemotingMethods struct, which
24035 is stored in the remoting invoke hashtable.
24037 * marshal.h: published the new method for getting the xdomain wrapper,
24038 and also added a method for getting the adequate wrapper for a given
24041 * object-internals.h, object.c: Added a couple of methods for capying and
24043 Modified mono_install_remoting_trampoline, which takes the new remoting
24044 trampoline that has a remoting target as parameter.
24045 mono_class_proxy_vtable now also takes a remoting target as parameter, and
24046 will return the most suitable vtable for the target.
24047 Added mono_remote_class_vtable, which returns the vtable of a remote class
24048 (which can be the normal remoting vtable or the xdomain vtable).
24050 * threads.c: the xdomain invoke and dispatch wrappers must also be
24051 protected against interruptions.
24053 2004-11-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24055 * icall.c: use memmove in BlockCopyInternal when the source and
24056 destination arrays are the same.
24058 2004-11-09 Martin Baulig <martin@ximian.com>
24060 * class-internals.h (MonoGenericContainer): Removed `method' and
24061 `signature', replaced them with `is_method' and `is_signature'
24062 flags. Added `context'.
24064 * loader.c (method_from_methodspec): Take a `MonoGenericContext *'
24065 instead of a `MonoGenericContainer *'.
24067 * metadata.c (mono_metadata_generic_param_equal): Removed the hack
24068 for dynamic type parameters.
24069 (mono_metadata_load_generic_params): Setup `container->context'.
24071 * reflection.c (mono_reflection_setup_generic_class): Setup
24072 `tb->generic_container->context'.
24073 (do_mono_reflection_bind_generic_parameters): Use
24074 mono_class_inflate_generic_type() to correctly inflate types,
24075 rather than using our own hack just for MONO_TYPE_VAR.
24077 2004-11-09 Martin Baulig <martin@ximian.com>
24079 * class.c (mono_class_inflate_generic_method): Small fix; don't
24083 (ves_icall_MonoType_GetGenericArguments): Don't ignore `byref' types.
24084 (ves_icall_Type_get_IsGenericTypeDefinition): Likewise.
24085 (ves_icall_Type_GetGenericTypeDefinition_impl): Likewise.
24086 (ves_icall_Type_BindGenericParameters): Likewise.
24087 (ves_icall_Type_get_IsGenericInstance): Likewise.
24088 (ves_icall_Type_GetGenericParameterPosition): Likewise.
24089 (ves_icall_MonoType_get_HasGenericArguments): Likewise.
24090 (ves_icall_MonoType_get_IsGenericParameter): Likewise.
24091 (ves_icall_MonoType_get_DeclaringMethod): Likewise.
24093 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
24095 * assembly.c (mono_assembly_names_equal): Reenable the comparison of
24096 assembly versions and public key tokens. Fixes #69113.
24098 Tue Nov 9 17:34:05 CET 2004 Paolo Molaro <lupus@ximian.com>
24100 * metadata.c: fix bug introduced with the type cache changes
24103 Tue Nov 9 17:26:29 CET 2004 Paolo Molaro <lupus@ximian.com>
24105 * metadata.h, metadata.c, domain-internals.h, marshal.c: include
24106 the MonoClass pointer instead of the token in exception clauses.
24107 * reflection.c: updates for the above and make the code not depend
24108 on the structure of MonoExceptionClause.
24110 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
24112 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
24113 Add support for dynamic assemblies. Fixes #69114.
24115 * loader.c (mono_method_get_header): Handle icalls and pinvoke methods.
24117 2004-11-07 Ben Maurer <bmaurer@ximian.com>
24119 * class-internals.h (MonoMethod): Move addr to MonoMethodPInvoke
24120 since most only those methods use it. the code member of
24121 MonoMethodPInvoke was dead, so that can be removed too. Also,
24122 remove inline_count (again, not used), and move slot so that it
24123 can share bits with some other flags. This saves 8 bytes in the
24124 structure and gives us about 50 kb back for mcs helloworld.cs
24126 * *.[ch]: Do naming changes for the above.
24128 * loader.c (mono_method_get_header): Lazily init the header
24130 (mono_get_method_from_token): don't init the header here
24131 (mono_free_method): the header may never be allocated
24133 Overall, this saves 150 kb of unmanaged allocations
24134 for mcs helloworld.cs. That accounts for 10% of the unmanaged
24137 * loader.c, loader.h (mono_method_get_header): new accessor.
24139 * *.[ch]: use the above method. Prepares us to lazily load
24142 * *.[ch]: Clean up all the pesky warnings. gcc now only gives
24143 three warnings, which are actual bugs (see 69206).
24145 * class-internals.h (MonoMethod): Remove remoting_tramp. It is
24146 unused. Saves a cool 4 bytes / method.
24148 2004-11-06 Ben Maurer <bmaurer@ximian.com>
24150 * metadata.c (builtin_types): Add types for System.Object here.
24151 (mono_metadata_parse_type_full): Cache MonoType*'s that are
24152 for a class or valuetype from klass->this_arg or klass->byval_arg.
24154 On mcs for a hello world, this gets us down from 21836 MonoType's
24157 (mono_metadata_free_type): Account for the above change.
24159 2004-11-06 Zoltan Varga <vargaz@freemail.hu>
24161 * appdomain.c (ves_icall_System_AppDomain_GetData): Throw an
24162 exception instead of asserting if name is null.
24163 (ves_icall_System_AppDomain_GetData): Ditto.
24165 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
24167 (ves_icall_get_enum_info): Avoid crash when called on a non-finished
24170 * icall.c (ves_icall_System_Reflection_Assembly_GetEntryAssembly):
24171 Return NULL when the domain does not have entry_assembly set.
24173 * icall.c (ves_icall_System_Reflection_Assembly_GetFilesInternal):
24174 Add a 'resource_modules' argument.
24175 (ves_icall_type_GetTypeCode): Fix typecode of byref types.
24177 * reflection.c (mono_reflection_create_runtime_class): Move setting
24178 of wastypebuilder here, so mono_get_type_object () returns a MonoType
24181 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi): Return NULL here instead of an empty string to match MS behavior.
24182 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAnsi_len):
24183 Throw an ArgumentNullException if 'ptr' is null.
24185 * appdomain.c (mono_domain_assembly_search): Avoid matching dynamic
24186 assemblies here. Fixes #69020.
24188 2004-11-05 Geoff Norton <gnorton@customerdna.com>
24190 * reflection.c (build_compressed_metadata): Fix the previous patch for
24191 big endian systems. GUINT32_FROM_LE isn't needed on strlen and was overwriting
24194 2004-11-04 Zoltan Varga <vargaz@freemail.hu>
24196 * assembly.c (mono_assembly_names_equal): Allow a match if one of
24197 the cultures is false. Fixes #69090.
24199 * reflection.c (build_compressed_metadata): Fix invalid memory read
24200 detected by valgrind.
24202 * reflection.c (mono_reflection_get_type): Avoid triggering a
24203 TypeResolve multiple times for the same type. Fixes #65577.
24205 2004-11-04 Ben Maurer <bmaurer@ximian.com>
24207 * marshal.c: Avoid using ldftn to call managed functions. It is
24208 much slower than just a call.
24210 * reflection.c (mono_module_get_object): free the basename we
24211 allocate here from glib.
24213 * reflection.c (ensure_runtime_vtable): make sure to free
24214 overrides. Also, we were allocating an array of MonoMethod not an
24215 array of MonoMethod*.
24217 * marshal.c (mono_marshal_get_stelemref): do a mono_mb_free here.
24219 * image.c (mono_image_close): free image->guid here.
24221 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
24223 * reflection.c: Fix some spec conformance issues with the PE file
24224 structures so mcs compiled apps run on the Net 2.0 beta.
24226 2004-11-01 Zoltan Varga <vargaz@freemail.hu>
24228 * string-icalls.c (ves_icall_System_String_ctor_encoding):
24229 Implement this. Fixes #67264.
24231 * debug-helpers.h debug-helpers.c marshal.c: Move
24232 mono_find_method_by_name to debug-helpers.c.
24234 2004-10-31 Zoltan Varga <vargaz@freemail.hu>
24236 * object.c (mono_release_type_locks): type_initialization_hash is
24239 * reflection.c object.c object-internals.h: Fix warnings.
24241 * icall.c (ves_icall_Type_GetPropertiesByName): Handle properties
24242 without accessors. Fixes #61561.
24244 * appdomain.c (ves_icall_System_AppDomain_createDomain): Inherit
24245 application base from the root domain if not set. Fixes #65641.
24246 (mono_runtime_init): Fix warning.
24248 2004-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24250 * appdomain.c: call mono_thread_pool_init.
24251 * threadpool.[ch]: new mono_thread_pool_init that sets the max. number
24252 of worker threads based on the number of CPUs and the environment
24253 variable MONO_THREADS_PER_CPU if present. The defaults are 50 (25)
24254 for non-windows (windows) systems.
24256 2004-10-27 Chris Toshok <toshok@ximian.com>
24258 * mono-debug-debugger.c (write_class): don't call mono_class_init
24259 here, as even with the check for (!klass->init_pending), we get
24260 into a situation where we're hitting cycles in class
24261 initialization. Fixes #68816.
24263 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
24265 * image.c: Avoid overwriting values in the loaded_images_hash when an
24266 assembly is loaded multiple times. Fixes #61152.
24268 * assembly.c (mono_assembly_names_equal): Compare the cultures as well,
24269 so multiple satellite assemblies for the same name can be loaded.
24272 * mono_domain_assembly_preload: Actually return the loaded assembly,
24275 * icall.c (ves_icall_type_is_subtype_of): Fix this for byref types.
24276 (ves_icall_type_is_assignable_from): Ditto. Fixes #68582.
24278 * gc.c (finalize_domain_objects): Call GC_invoke_finalizers () so
24279 pending finalizers are not invoked after the appdomain has been
24280 unloaded. Fixes #67862.
24282 2004-10-22 Martin Baulig <martin@ximian.com>
24284 * mono-debug-debugger.c
24285 (mono_debugger_runtime_invoke): Don't box valuetypes.
24287 2004-10-22 Chris Toshok <toshok@ximian.com>
24289 * mono-debug-debugger.c (do_write_class): handle .cctors too, and
24290 don't hide private methods.
24292 2004-10-22 Sebastien Pouliot <sebastien@ximian.com>
24294 * icall.c: Allows the runtime to "share" (when known) the public key
24295 token of an assembly. This avoid the need to recalculate the token
24296 (from the public key) in managed code.
24298 2004-10-21 Chris Toshok <toshok@ximian.com>
24300 * debug-helpers.c (append_class_name): argh, revert last patch.
24302 2004-10-21 Chris Toshok <toshok@ximian.com>
24304 * debug-helpers.c (append_class_name): use '+' as the delimiter,
24305 not '/', so that it matches what the debugger uses to look up
24308 2004-10-21 Martin Baulig <martin@ximian.com>
24310 * mono-debug-debugger.c (mono_debugger_throw_exception): New
24311 public method; this is called each time an exception is thrown and
24312 allows the debugger to use exception catch points.
24314 2004-10-21 Martin Baulig <martin@ximian.com>
24316 * mono-debug-debugger.c (mono_debugger_handle_exception): Write
24317 the stack pointer and the exception object in some struct and pass
24318 that to the debugger.
24320 2004-10-21 Chris Toshok <toshok@ximian.com>
24322 * mono-debug-debugger.c (do_write_class): add instance/static
24323 event support. We don't expose "raise" or "other" yet.
24324 (event_is_static): new method.
24326 2004-10-20 Bernie Solomon <bernard@ugsolutions.com>
24328 * mono-debug-debugger.c
24329 (mono_debugger_handle_exception): Remove
24330 bogus return value for fussy compilers.
24332 2004-10-20 Martin Baulig <martin@ximian.com>
24334 * mono-debug-debugger.c
24335 (mono_debugger_unhandled_exception): Added `gpointer stack' argument.
24336 (mono_debugger_handled_exception): Likewise.
24338 2004-10-20 Martin Baulig <martin@ximian.com>
24340 * mono-debug-debugger.h (MonoDebuggerEvent): Added
24341 MONO_DEBUGGER_EVENT_EXCEPTION.
24343 * mono-debug-debugger.c (mono_debugger_handle_exception): New
24344 public function to send the debugger a notification for an
24345 exception and inform it about a catch/finally clause.
24347 2004-10-19 Zoltan Varga <vargaz@freemail.hu>
24349 * marshal.c, icall.c: Applied patch from Alexandre Rocha Lima e
24350 Marcondes (alexandremarcondes@psl-pr.softwarelivre.org). Really
24353 * icall.c (ves_icall_InternalExecute): Fix build for gcc-2.95.
24355 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
24357 * marshal.c (emit_marshal_object): Fix freeing of memory when a reference type is
24358 marshalled as [In,Out]. Fixes #58325.
24360 2004-10-14 Zoltan Varga <vargaz@freemail.hu>
24362 * reflection.c (mono_method_body_get_object): Implement some fields.
24364 2004-10-12 Martin Baulig <martin@ximian.com>
24366 * reflection.c (mono_reflection_bind_generic_parameters): Small
24367 fix, correctly retrieve our parent from a generic instance.
24369 2004-10-12 Martin Baulig <martin@ximian.com>
24371 * metadata.c (mono_metadata_generic_param_equal): We always have
24375 (mono_class_from_generic_parameter): We need to have an owner.
24376 (my_mono_class_from_generic_parameter): Likewise.
24378 * reflection.c (mono_reflection_setup_generic_class): Renamed to
24379 mono_reflection_create_generic_class() and added a new
24380 mono_reflection_setup_generic_class().
24381 (mono_reflection_initialize_generic_param): If we're a nested
24382 generic type and inherited from the containing class, set our
24383 owner to the outer class.
24385 2004-10-11 Zoltan Varga <vargaz@freemail.hu>
24387 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodBodyInternal): New icall.
24389 * reflection.c (mono_method_body_get_object): New function to create
24390 a MethodBody object.
24392 * object-internals.h object.h: Add MonoReflectionMethodBody structure.
24394 2004-10-11 Martin Baulig <martin@ximian.com>
24396 * metadata.c (_mono_metadata_type_equal): Renamed to
24397 do_mono_metadata_type_equal() and made static.
24399 2004-10-11 Martin Baulig <martin@ximian.com>
24401 * appdomain.c: Bump corlib version number to 28.
24403 2004-10-10 Martin Baulig <martin@ximian.com>
24405 * class-internals.h
24406 (MonoGenericInst): Added `MonoGenericContainer *container'.
24407 (MonoGenericMethod): Likewise.
24408 (MonoGenericContext): Likewise.
24409 (MonoGenericParam): Added `MonoGenericContainer *owner'.
24412 (do_mono_metadata_parse_type): Added a `MonoGenericContainer *' argument.
24413 (do_mono_metadata_parse_generic_inst): Likewise.
24414 (mono_metadata_parse_type_full): New public method. This is the actual
24415 mono_metadata_parse_type() implementation - with an additional
24416 `MonoGenericContainer *' argument.
24417 (mono_metadata_parse_array_full): Likewise.
24418 (mono_metadata_parse_signature_full): Likewise.
24419 (mono_metadata_parse_method_signature_full): Likewise.
24420 (mono_metadata_parse_mh_full): Likewise.
24421 (mono_type_create_from_typespec): Likewise.
24422 (mono_metadata_interfaces_from_typedef_full): New public method;
24423 this is similar to the other _full() methods, but we take a
24424 `MonoGenericContext *' since we have to pass it to mono_class_get_full().
24425 (mono_metadata_parse_generic_param): Take an additional
24426 `MonoGenericContainer *' argument and lookup the MonoGenericParam
24427 from that container.
24428 (mono_metadata_generic_param_equal): New static method to compare
24429 two type parameters.
24430 (_mono_metadata_type_equal): New static method; takes an
24431 additional `gboolean signature_only' argument - if true, we don't
24432 compare the owners of generic parameters.
24433 (mono_metadata_signature_equal): Call _mono_metadata_type_equal()
24434 with a TRUE argument - do a signature-only comparision.
24436 * loader.c: Use the new _full() methods and pass the
24437 MonoGenericContainer to them.
24439 * object-internals.h (MonoReflectionTypeBuilder): Added
24440 `MonoGenericContainer *generic_container' field.
24441 (MonoReflectionMethodBuilder): Likewise.
24443 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
24445 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): Special
24446 case initial images of dynamic assemblies.
24448 * reflection.c (mono_image_basic_init): Set 'initial_image' field.
24450 * metadata-internals.h (MonoDynamicImage): Add 'initial_image' field.
24452 * reflection.c (mono_reflection_event_builder_get_event_info): Fix
24453 length of event->other array.
24454 (typebuilder_setup_events): Ditto.
24456 * domain-internals.h (MonoDomain): Rename 'assemblies' hash table to
24457 'assembly_by_name' and add an 'assemblies' list.
24459 * assembly.h assembly.c: Add a new search hook for determining whenever
24460 an assembly is already loaded. Use this instead of searching in the
24461 loaded_assemblies list.
24463 * domain.c appdomain.c: Implement the new search hook so loaded
24464 assemblies are now scoped by appdomain. Fixes #67727.
24466 2004-10-07 Zoltan Varga <vargaz@freemail.hu>
24468 * threads.c (mono_thread_attach): Initialize synch_lock field so
24469 mono_thread_detach works again.
24471 * loader.c (mono_lookup_pinvoke_call): Try the dllname prefixed with
24472 'lib' too. Fixes #63130.
24474 2004-10-06 Jackson Harper <jackson@ximian.com>
24476 * culture-info-tables.h: regenerated.
24478 2004-10-06 Zoltan Varga <vargaz@freemail.hu>
24480 * icall.c (ves_icall_Type_GetInterfaces): Include interfaces
24481 implemented by other interfaces in the result. Fixes #65764.
24483 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
24484 Handle unloadable modules without crashing.
24486 * image.c (load_modules): Revert the previous patch since modules must
24487 have a fixed index inside the array.
24489 * image.c (load_modules): Don't include native modules in the modules
24492 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
24494 * reflection.h: Add param_defaults field.
24496 * reflection.c: Add support for parameter defaults in dynamic methods.
24499 * icall.c (ves_icall_MonoType_get_Namespace): Return NULL instead of
24500 an empty string when a type has no namespace. Fixes #64230.
24502 2004-10-04 Sebastien Pouliot <sebastien@ximian.com>
24504 * tabledefs.h: Added "internal" security actions to support non-CAS
24505 permissions NonCasDemand, NonCasLinkDemand and NonCasInheritance.
24506 Note: they do not seems to be used anymore in 2.0 (new metadata format)
24508 2004-10-04 Zoltan Varga <vargaz@freemail.hu>
24510 * icall.c (ves_icall_InternalInvoke): Throw an exception when calling
24511 constructor of abstract class. Fixes #61689.
24513 2004-10-04 Martin Baulig <martin@ximian.com>
24515 * class-internals.h (MonoGenericContainer): New type.
24516 (MonoMethodNormal): Replaced `MonoGenericParam *gen_params' with
24517 `MonoGenericContainer *generic_container'.
24518 (MonoClass): Replaced `gen_params' and `num_gen_params' with
24519 `MonoGenericContainer *generic_container'.
24521 * metadata.c (mono_metadata_load_generic_params): Return a
24522 `MonoGenericContainer *' instead of a `MonoGenericParam *';
24523 removed the `num' argument.
24525 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
24527 * icall.c (ves_icall_System_Reflection_Module_GetPEKind): Add support
24528 for dynamic images.
24530 * object-internals.h (MonoReflectionAssemblyBuilder): Add pe_kind and
24533 * metadata-internals.h (MonoDynamicImage): Add pe_kind and machine fields.
24535 * reflection.c: Save pe_kind and machine values into the generated
24538 * appdomain.c: Bump corlib version number.
24540 * object-internals.h: Reorganize layout of LocalBuilder.
24542 * class-internals.h class.c (mono_class_get_implemented_interfaces):
24543 New helper function.
24545 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Return the
24546 created MonoType for dynamic types. Fixes #66180.
24548 2004-10-02 Ben Maurer <bmaurer@ximian.com>
24550 * threadpool.c: the ares hashtable needs a critical section around it.
24551 this prevents some nasty segfaults
24553 2004-10-02 Massimiliano Mantione <massi@ximian.com>
24555 * process.c: Fixed alignments to 32 bits as casting to unsigned is unsafe
24556 on 64 bits platforms, patch by will@exomi.com (Ville-Pertti Keinonen), see
24559 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
24561 * object-internals.h (MonoReflectionTypeBuilder): Add 'created' field.
24563 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
24565 * image.c: Always canonicalize image file names, to avoid loading
24566 the same assembly twice when referenced using a relative path.
24568 2004-09-30 Zoltan Varga <vargaz@freemail.hu>
24570 * marshal.h marshal.c icall.c: Fix bugs in previous patch.
24572 * marshal.c marshal.h icall.c: Add GetDelegateForFunctionPointerInternal icall.
24574 * marshal.c: Fix warnings.
24576 2004-09-29 Geoff Norton <gnorton@customerdna.com>
24578 * marshal.c (mono_ftnptr_to_delegate): This method was improperly
24579 attempting to marshal the delegate_trampoline as the method_addr.
24580 This patch has a static hashtable of marshalled delegates so that
24581 we can map delegate_trampoline addresses back to delegates. This
24582 allows a delegate passed to managed code to be passed back into native
24585 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
24587 * icall.c: Add GetFunctionPointerForDelegateInternal icall.
24589 * reflection.c (method_encode_code): Align method headers properly.
24592 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
24594 * marshal.c: In the runtime invoke wrapper, reset the abort
24595 exception if it is cached. This avoids the automatic rethrowal of
24596 the exception after the catch of the wrapper. Also check for pending
24597 interruptions before calling the managed method. This is done using
24598 the new method emit_thread_force_interrupt_checkpoint, since the
24599 normal checkpoint method is ignored when running the invoke wrapper.
24600 * object.c: If the abort exception is rethrown, set the abort_exc
24601 field of the thread, so it will be rethrown aftere every catch.
24602 * threadpool.c: Only run an interruption checkpoint if what has been
24603 requested is a stop of the thread (aborts will be ignored).
24604 * threads.c: By default, a thread will now never be interrumped while
24605 running the runtime invoke wrapper (this ensures that runtime_invoke
24606 will always return to the caller if an exception pointer is provided).
24607 There is a new special method mono_thread_force_interruption_checkpoint()
24608 to force an interruption checkpoint even if running a protected
24609 wrapper, which is used by the same runtime invoke wrapper to do a check
24612 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
24614 * object.c, object-internals.h: Implemented mono_release_type_locks,
24615 which releases the cctor locks held by a thread.
24616 * threads.c, threads.h: In thread_cleanup, release cctor locks held
24617 by a thread. Added mono_thread_exit() method to be used to safely stop
24620 2004-09-28 Raja R Harinath <rharinath@novell.com>
24622 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
24623 Move null check before dereference. Avoid indexing beyond the end
24624 of the 'modules' array.
24626 2004-09-28 Raja R Harinath <rharinath@novell.com>
24628 * metadata-internals.h (MonoImage): Add module_count field.
24629 * image.c (load_modules): Set image->module_count.
24630 (mono_image_load_file_for_image): Use image->module_count.
24631 * reflection.c (mono_image_load_module): Append to image->modules array
24632 of dynamic assembly.
24633 (mono_module_get_object): Fix loop to actually increment index.
24634 Use image->module_count.
24635 * assembly.c (mono_assembly_load_references): Use image->module_count.
24636 * icall.c (ves_icall_System_Reflection_Assembly_GetModulesInternal):
24639 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
24641 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal):
24642 Avoid assert on generic types.
24644 2004-09-26 Zoltan Varga <vargaz@freemail.hu>
24646 * icall.c (ves_icall_System_Reflection_FieldInfo_GetUnmanagedMarshal): New icall.
24648 * reflection.c (mono_param_get_objects): Fill out MarshalAsImpl field.
24650 * reflection.c (mono_reflection_marshal_from_marshal_spec): New
24651 function to convert a MarshalSpec structure to its managed counterpart.
24653 * reflection.c: Fix warnings.
24655 * object-internals.h (MonoReflectionParameter): Add MarshalAsImpl
24658 * icall.c (mono_create_icall_signature): Fix build.
24660 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
24662 * icall.c: Add MakePointType icall.
24664 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage): Fix
24667 2004-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24669 * threadpool.c: reuse allocated slots in the queue.
24671 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
24673 * object-internals.h (MonoReflectionDllImportAttribute): New structure.
24675 * icall.c: Add new icalls for GetDllImportAttribute and GetFieldOffset.
24677 * reflection.h reflection.c (mono_reflection_get_custom_attrs): Revert
24680 * tabledefs.h: Add constants for pinvoke attributes BestFit and
24681 ThrowOnUnmappableChar.
24683 * icall.c (ves_icall_Type_GetPacking): New icall.
24685 2004-09-24 Martin Baulig <martin@ximian.com>
24687 * icall.c (ves_icall_Type_GetGenericParameterConstraints): New interncall.
24689 2004-09-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24692 (mono_domain_set): allow setting a domain that is being unloaded.
24693 (mono_domain_unload): invoke the DomainUnload callbacks in the domain
24696 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
24698 * icall.c reflection.h reflection.c: Add a 'pseudo_attrs' argument to
24699 the GetCustomAttributes icall.
24701 2004-09-23 Martin Baulig <martin@ximian.com>
24703 * object-internals.h (MonoReflectionGenericParam): Replaced
24704 'has_ctor_constraint', `has_reference_type' and `has_value_type'
24705 with `guint32 attrs'.
24707 2004-09-23 Martin Baulig <martin@ximian.com>
24709 * icall.c (ves_icall_Type_GetGenericParameterAttributes): New interncall.
24711 2004-09-23 Martin Baulig <martin@ximian.com>
24713 * object-internals.h (GenericParameterAttributes): New enum.
24715 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
24717 * object-internals.h (MonoEventInfo): Add 'other_methods' field.
24719 * class.c (init_events): Fill out event->other field.
24721 * class.c: Fix warnings.
24723 * icall.c (ves_icall_get_event_info): Fill out 'other_methods' field.
24725 Wed Sep 22 19:04:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
24727 * class-internals.h, icall.c, loader.c, loader.h: added a faster stack
24728 walk which doesn't supply the IL offset.
24730 2004-09-22 Martin Baulig <martin@ximian.com>
24732 * reflection.c (mono_reflection_setup_internal_class): If we're
24733 System.ValueType, System.Object or System.Enum, set
24734 `klass->instance_size' and create the vtable.
24735 (mono_reflection_create_internal_class): If we're an enum type,
24736 get the base class from our current corlib.
24738 2004-09-22 Zoltan Varga <vargaz@freemail.hu>
24740 * reflection.h (MonoResolveTokenError): New type.
24742 * icall.c (ves_icall_System_Reflection_Module_ResolveMemberToken): New
24745 * icall.c: Add an 'error' argument to the ResolveToken icalls.
24747 2004-09-22 Lluis Sanchez Gual <lluis@novell.com>
24749 * icall.c: Support ContextBoundObject proxies in ves_icall_InternalExecute.
24750 Support also calling constructors, but only for already allocated objects.
24752 2004-09-17 Geoff Norton <gnorton@customerdna.com>
24754 * reflection.c (type_get_qualified_name): If the klass is null
24755 return the typename to avoid a NullRefEx.
24756 (encode_cattr_value): Get the qualified name of the boxed type,
24757 not the underlying enumtype. Fixes #62984.
24759 2004-09-21 Zoltan Varga <vargaz@freemail.hu>
24761 * marshal.c: Fix problems with previous checkin.
24763 2004-09-21 <vargaz@freemail.hu>
24765 * marshal.h marshal.c icall.c: Add new icalls for Alloc/FreeHGlobal. Change the
24766 existing mono_marshal_alloc/free functions to use CoTaskMemAlloc/Free under windows.
24768 * marshal.c: Allocate marshaller memory using mono_marshal_alloc/free.
24770 2004-09-21 Geoff Norton <gnorton@customerdna.com>
24772 * icall.c (ves_icall_MonoType_GetElementType): GetElementType
24773 should only return a type for pointers, arrays, and passbyref types.
24776 2004-09-21 Martin Baulig <martin@ximian.com>
24778 * domain.c (mono_debugger_check_runtime_version): New public
24781 * icall.c (ves_icall_MonoDebugger_check_runtime_version): New icall.
24783 2004-09-20 Sebastien Pouliot <sebastien@ximian.com>
24785 * reflection.c: Added missing sort to the declarative security
24786 attributes table. MS implementation stops seeing the attributes if the
24787 token number regress in the table (as shown by ildasm and permview).
24789 2004-09-20 Zoltan Varga <vargaz@freemail.hu>
24791 * object-internals.h (MonoReflectionModule): Add 'token' field.
24793 * reflection.c (mono_reflection_get_token): Add support for Module
24795 (mono_module_get_object): Set 'token' field.
24796 (mono_module_file_get_object): Set 'token' field.
24798 * icall.c: Add new Assembly and Module icalls.
24800 * appdomain.c: Bump corlib version.
24802 2004-09-19 Zoltan Varga <vargaz@freemail.hu>
24804 * loader.h loader.c class.h class.c: Add helper functions for obtaining
24805 tokens of metadata objects.
24807 * reflection.h reflection.c (mono_reflection_get_token): New function
24808 to obtain the token of a metadata object.
24810 * icall.c: Add icalls for MetadataToken and ModuleHandle methods.
24812 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
24814 * loader.c (mono_lookup_pinvoke_call): Try the underscore prefixed name as well.
24816 * loader.c (mono_lookup_pinvoke_call): Add support for stdcall name mangling.
24818 2004-09-16 Sebastien Pouliot <sebastien@ximian.com>
24820 * appdomain.c: Bumped MONO_CORLIB_VERSION to 25.
24821 * object-internals.h: Added 3 MonoArray* members to MonoReflection
24822 AssemblyBuilder to access the permissions set in the class lib.
24823 * reflection.c: Added security attributes encoding step in
24824 mono_image_build_metadata.
24825 * tabledefs.h: Added new security actions defined in 2.0:
24826 LinkDemandChoice, InheritanceDemandChoice and DemandChoice.
24828 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
24830 * threads.c: Fixed SET_CURRENT_OBJECT macros, they were ignoring the
24833 2004-09-16 Lluis Sanchez Gual <lluis@novell.com>
24835 * locales.c: nullify the ICU_collator member of CompareInfo when it is
24836 finalized. There where random SIGSEVs at program termination, when
24837 an object being finalized was trying to do a string comparison and
24838 the current culture was already finalized.
24840 2004-09-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24842 * threads.c: call thread_cleanup before finishing the thread if we get
24845 2004-09-16 Zoltan Varga <vargaz@freemail.hu>
24847 * appdomain.c (ves_icall_System_AppDomain_createDomain): Load all
24848 assemblies from the parent. Fixes #65665.
24850 2004-09-15 Zoltan Varga <vargaz@freemail.hu>
24852 * metadata.c (mono_metadata_parse_type): Fix parsing of custom
24855 2004-09-14 Bernie Solomon <bernard@ugsolutions.com>
24857 * reflection.h: add prototype for mono_get_dbnull_object
24858 * reflection.c: add prototypes for get_default_param_value_blobs
24859 and mono_get_object_from_blob for fussier compilers
24861 2004-09-14 Lluis Sanchez Gual <lluis@novell.com>
24863 * object.c: Added a "done" flag to TypeInitializationLock. This avoids
24864 false deadlock checks in class initialization.
24866 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
24868 * image.c (mono_image_addref): Fix comment.
24870 * metadata.c (mono_metadata_parse_type): Avoid memory allocations if
24873 2004-09-12 Jambunathan K <kjambunathan@novell.com>
24875 * reflection.c (mono_param_get_objects): Modified to return
24876 ParameterInfo.DefaultValue object.
24878 (get_default_param_value_blobs):
24879 (mono_get_object_from_blob):
24880 (mono_get_dbnull_object): New helper routines.
24882 * object.c (mono_get_constant_value_from_blob): New helper routine
24883 carved out from get_default_field_value ()
24885 * object-internals.h (mono_get_constant_value_from_blob): Added
24886 function declaration.
24888 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
24890 * assembly.c assembly.h icall.c class.c appdomain.c: Lazily load
24891 referenced assemblies. Fixes #62135.
24893 * exception.h exception.c (mono_get_exception_file_not_found2): New
24896 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
24898 * class.h class.c: Add mono_type_get_underlying_type ().
24900 2004-09-09 Geoff Norton <gnorton@customerndna.com>
24902 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes):
24903 Fix GetTypes() to support dynamically created assemblies.
24905 2004-09-09 Zoltan Varga <vargaz@freemail.hu>
24907 * reflection.c (reflection_methodbuilder_to_mono_method): Remove TODO.
24909 * reflection.c (reflection_methodbuilder_to_mono_method): Fix bug in
24912 * reflection.h reflection.c loader.c: Allow dynamic construction of
24913 pinvoke methods. Fixes #65571.
24915 * reflection.c (mono_reflection_get_type): Revert previous change since
24916 it causes regressions.
24918 2004-09-08 Martin Baulig <martin@ximian.com>
24920 * class.c (class_compute_field_layout): Don't call
24921 mono_class_layout_fields() for open generic instances.
24923 2004-09-08 Bernie Solomon <bernard@ugsolutions.com>
24924 * threads.c appdomain.c: fix typo in GC macro
24926 2004-09-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
24928 * threads.c: don't call mono_thread_detach() in start_wrapper(),
24929 avoiding a possible hang in GetCurrentThreadId(0). Fixes bug #65379.
24931 2004-09-08 Zoltan Varga <vargaz@freemail.hu>
24933 * image.c (mono_image_close): Applied patch from
24934 vasantha.paulraj@honeywell.com (Vasantha selvi). Fix crash when an
24935 assembly is loaded multiple times from data.
24937 * image.c (mono_image_open): Fix warning.
24939 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
24941 * reflection.h reflection.c icall.c: Only call TypeResolve handlers
24942 once. Fixes #58334.
24944 * reflection.c (mono_reflection_create_runtime_class): Initialize
24945 klass->nested_classes. Fixes #61224.
24947 Tue Sep 7 14:35:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
24949 * threads.c: sched_yield() on exit, to allow threads to quit.
24951 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
24953 * object.c (mono_unhandled_exception): Remove leftover debug code.
24955 2004-09-07 Atsushi Enomoto <atsushi@ximian.com>
24957 * appdomain.c, threads.c : don't use GC_CreateThread when with-gc=none
24959 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
24961 * marshal.c (emit_marshal_array): Really null terminate string arrays.
24963 * marshal.c (emit_marshal_string): Fix freeing of unicode strings.
24965 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
24967 * marshal.c (emit_marshal_array): Null terminate string arrays.
24969 * marshal.c (raise_auto_layout_exception): Fix warning.
24971 * reflection.c (mono_param_get_objects): Initialize the default value
24972 with DBNull.Value, not null. Fixes #62123.
24974 2004-09-01 Miguel de Icaza <miguel@ximian.com>
24976 * marshal.c (mono_marshal_get_managed_wrapper): Remove FIXME and
24977 throw an exception with a cute explanation.
24979 2004-09-06 Dick Porter <dick@ximian.com>
24981 * process.c (ves_icall_System_Diagnostics_Process_Start_internal):
24982 Close the new process's thread handle, as we don't use it. The
24983 handle stays around forever otherwise.
24985 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
24987 * object.c (arith_overflow): Fix warning.
24989 * reflection.c (mono_image_get_methodref_token): Do not emit unmanaged
24990 calling conventions in method refs. Fixes #65352.
24992 * reflection.c: Fix warnings.
24994 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
24996 * icall.c: Add a new icall for Array.Clear
24998 2004-09-06 Ben Maurer <bmaurer@users.sourceforge.net>
25000 * object.c: When allocating an array, we have to throw
25001 an overflow exception if any of the lengths are < 0.
25003 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
25005 * marshal.h marshal.c: Free unmanaged memory allocated by managed code
25006 properly. Also move implementation of string array marshalling to
25007 managed code. Fixes #42316.
25009 2004-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25011 * assembly.c: provide more information when loading an assembly fails.
25013 2004-09-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25015 * filewatcher.c: don't expect the development fam package to be
25018 2004-09-03 Zoltan Varga <vargaz@freemail.hu>
25020 * marshal.c: Make a copy of the signature cookie since it will be
25021 freed by the caller.
25023 * marshal.c (mono_delegate_to_ftnptr): Fix bug in previous patch.
25025 * marshal.c (mono_delegate_to_ftnptr): Fix memory leaks.
25027 * metadata.c (mono_metadata_free_marshal_spec): New function to free
25030 * marshal.c: More refactoring.
25032 * marshal.c: Refactor the mono_marshal_get_native_wrapper function into
25035 2004-09-03 Lluis Sanchez Gual <lluis@novell.com>
25037 * object.c: In mono_message_invoke, fill the output parameter array after
25038 calling the managed method (it was done before the call). This fixes
25041 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
25043 * marshal.c (mono_marshal_alloc): Return a valid pointer on size 0
25046 2004-09-02 Martin Baulig <martin@ximian.com>
25048 * class.c (mono_class_instance_size): Don't allow generic type
25049 definitions or open generic instances.
25050 (mono_class_array_element_size): If we're a value type, call
25051 mono_class_instance_size() on the original class.
25053 * metadata.c (mono_type_size, mono_type_stack_size): Correctly
25054 handle generic instances.
25056 * mono-debug-debugger.c (write_type): Handle generic instances
25059 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
25061 * marshal.c (mono_marshal_alloc): Raise an OutOfMemory exception if
25062 the allocation request fails. Fixes #65089.
25064 * object.c (mono_runtime_free_method): Do not call mono_free_method.
25066 * object.c (mono_runtime_free_method): New function to free a dynamic
25069 * marshal.c (mono_delegate_free_ftnptr): New function to free the
25070 delegate trampoline.
25072 * marshal.c (mono_marshal_get_managed_wrapper): Mark managed wrapper
25073 with hasthis as dynamic,
25075 * icall.c (ves_icall_System_Delegate_FreeTrampoline): New icall.
25077 * domain.c (mono_jit_info_table_remove): New function to remove an
25078 entry from the jit info table.
25080 * class-internals.h (MonoMethod): Add 'dynamic' field.
25082 * loader.c: Fix warnings.
25084 2004-09-01 Martin Baulig <martin@ximian.com>
25086 * mono-debug.c, debug-mono-symfile.c: Use mono_loader_lock()
25087 instead of mono_debugger_lock() because the latter one is a no-op
25088 unless running in the debugger.
25090 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
25092 * class.c (class_compute_field_layout): Classes with auto-layout or
25093 reference fields are not blittable.
25095 2004-09-01 Dick Porter <dick@ximian.com>
25097 * icall.c (ves_icall_System_Reflection_Assembly_get_location): Use
25098 mono_image_get_filename() to get the assembly location.
25101 * metadata.h: Fix compile warnings
25103 2004-09-01 Zoltan Varga <vargaz@freemail.hu>
25105 * class.c (class_compute_field_layout): System.Object is blittable.
25107 * marshal.c (mono_marshal_get_native_wrapper): Pass blittable classes
25108 as in/out. Fixes #59909.
25110 2004-09-01 Martin Baulig <martin@ximian.com>
25112 * metadata.h (MONO_TYPE_ISREFERENCE): Call
25113 mono_metadata_generic_inst_is_valuetype() if we're a generic
25114 instance to check whether our underlying type is a reference type.
25116 2004-09-01 Martin Baulig <martin@ximian.com>
25118 * metadata.c (mono_type_size): If we're a generic instance, call
25119 mono_class_value_size() for value types.
25121 2004-08-31 Zoltan Varga <vargaz@freemail.hu>
25123 * marshal.c: Implement more custom marshalling functionality. Fixes
25126 Tue Aug 31 17:55:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
25128 * mono-debug.c, debug-mono-symfile.c: add some locking love.
25130 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
25132 * domain-internals.h domain.c: Add a per-domain jump trampoline hash.
25134 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): Rename to ...Internal.
25136 * icall.c: Fix some warnings.
25138 * threads.c (abort_appdomain_thread): Fix unref errors.
25139 (mono_thread_current): Fix THREAD_DEBUG define.
25141 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
25143 * metadata.h (MONO_TYPE_ISSTRUCT): Fix warning.
25145 * icall.c (ves_icall_System_Reflection_MethodBase_GetMethodFromHandle): New icall.
25147 2004-08-28 Zoltan Varga <vargaz@freemail.hu>
25149 * marshal.c (mono_marshal_get_native_wrapper): Add support for byref
25152 2004-08-28 Martin Baulig <martin@ximian.com>
25155 (mono_metadata_generic_inst_is_valuetype): New public function.
25157 * metadata.h (MONO_TYPE_ISSTRUCT): Call
25158 mono_metadata_generic_inst_is_valuetype() if we're a generic
25159 instance to check whether our underlying type is a valuetype.
25161 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
25163 * class.c (mono_ptr_class_get): Fix name of pointer classes. Fixes
25166 2004-08-25 Martin Baulig <martin@ximian.com>
25168 * loader.c (mono_get_method_from_token): Abstract methods can also
25169 be generic and thus have type parameters.
25171 * metadata-internals.h
25172 (MonoDynamicImage): Added `GPtrArray *gen_params'.
25174 * reflection.c (mono_image_get_generic_param_info): Don't create a
25175 metadata row, just add an entry to the `gen_params' array.
25176 (build_compressed_metadata): Sort the `gen_params' array and then
25177 actually create the metadata.
25179 2004-08-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25181 * threadpool.c: remove unneeded 'if' around mono_monitor_enter.
25183 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
25185 * debug-helpers.c: Handle MONO_TYPE_GENERICINST.
25187 2004-08-24 Martin Baulig <martin@ximian.com>
25189 * class.cs (mono_class_is_subclass_of): Like an interface, a
25190 generic instance also derives from System.Object.
25192 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
25194 * metadata.c (mono_metadata_parse_type): Alloc pinned, byref and
25195 custom modifiers to be in any order. Fixes #61990.
25197 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
25199 * object.c: Register mono_object_new_fast icall.
25201 * object.c (mono_class_get_allocation_ftn): Return to calling
25202 mono_object_new_fast, since it seems faster to compute the object
25203 size in unmanaged code than passing it as a parameter.
25205 * object.c (mono_class_get_allocation_ftn): Add marshalbyref case.
25207 * gc-internal.h gc.c: Add mono_gc_out_of_memory () function. Register
25208 this function with Boehm as the oom handler, so we don't have to check
25209 the result of GC_malloc.
25211 * object.c: Remove checks for oom.
25213 * object.h object.c (mono_class_get_allocation_ftn): New function to
25214 return the icall which can be used to allocate an instance of a given
25217 * object.c: Handle common allocation requests using GC_gcj_fast_malloc.
25219 * class-internals.h: Add 'enabled' field.
25221 2004-08-19 Zoltan Varga <vargaz@freemail.hu>
25223 * domain.c (mono_init_internal): Call MONO_GC_PRE_INIT ().
25225 2004-08-18 Jambunathan K <kjambunathan@novell.com>
25226 * tabledefs.h: Corretced PARAM_ATTRIBUTE_OPTIONAL to the right
25229 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
25231 * appdomain.c: use the Tls function for appdomain too,
25232 at Zoltan's request. Actually return in mono_context_get
25234 * appdomain.c, profiler.c, threads.c: use __thread
25236 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
25238 * appdomain.c threads.c: Call GC_CreateThread on windows.
25240 * Makefile.am (libmetadata_la_LIBADD): Avoid linking libmonoos into
25241 multiple libraries since this don't work on windows.
25243 2004-08-18 Martin Baulig <martin@ximian.com>
25245 * class-internals.h
25246 (MonoMethodNormal): Moved `MonoGenericParam *gen_params' here from
25249 * metadata.h (MonoMethodHeader): Moved the `gen_params' field to
25250 MonoMethodNormal since we also need it for abstract and interface
25254 (build_compressed_metadata): Sort the GenericParam table.
25255 (mono_image_create_token): Added `gboolean create_methodspec'
25256 argument; this is false when generating a MethodImpl token.
25257 (reflection_methodbuilder_to_mono_method): Abstract and interface
25258 methods may also have generic parameters.
25260 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
25262 * appdomain.c: thread local alloc
25264 2004-08-17 Martin Baulig <martin@ximian.com>
25266 * appdomain.c: Bumped MONO_CORLIB_VERSION to 24.
25269 (ves_icall_System_MonoType_getFullName): Added `gboolean full_name'
25272 * class.c (mono_type_get_full_name): New public function.
25273 (mono_type_get_name): Don't include the type arguments.
25275 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
25277 * Makefile.am: Build static versions of libmetadata and libmonoruntime
25278 for inclusion into the mono executable.
25280 2004-08-16 Martin Baulig <martin@ximian.com>
25282 * metadata.c (do_mono_metadata_parse_generic_inst): Store the
25283 MonoGenericInst, not the MonoType in the `generic_inst_cache'.
25285 2004-08-14 Martin Baulig <martin@ximian.com>
25287 * class.c (dup_type): Also copy the `byref' field.
25289 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
25291 * reflection.c (create_dynamic_mono_image): Revert the last change
25292 since it breaks bootstrap.
25294 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
25296 * reflection.c (create_dynamic_mono_image): Set ref_count to 1.
25298 * image.c (mono_image_close): Dynamic images are GC_MALLOCed, so do
25299 not free them with g_free.
25301 2004-08-11 Martin Baulig <martin@ximian.com>
25303 * reflection.c (mono_reflection_setup_internal_class): Also call
25304 mono_class_setup_mono_type() if we already have a `tb->type.type'.
25306 2004-08-09 Sebastien Pouliot <sebastien@ximian.com>
25308 * appdomain.c: Fix ves_icall_System_AppDomain_getDomainByID when
25309 called during default (first) AppDomain creation. Keep track of
25310 Evidence when loading assemblies.
25312 Mon Aug 9 14:41:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
25314 * opcodes.c, opcodes.h: reduce runtime relocations.
25316 Mon Aug 9 13:30:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
25318 * culture-info.h, locales.c: fixes and chages to sue the new
25319 optimized format of the locale data.
25320 * culture-info-tables.h: regenerated.
25322 2004-08-06 Geoff Norton <gnorton@customerdna.com>
25324 * filewatcher.c: If HAVE_KQUEUE return mode 3 to use the new kqueue watcher
25326 2004-08-05 Sebastien Pouliot <sebastien@ximian.com>
25328 * appdomain.c: Bumped MONO_CORLIB_VERSION to 23. Added new icall
25329 ves_icall_System_AppDomain_getDomainByID to get an AppDomain by Id.
25330 * domain-internals.h: icall declaration.
25331 * icall.c: icall registration.
25332 * object-internals.h: New fields in MonoAssembly for CAS.
25334 2004-08-05 Duncan Mak <duncan@ximian.com>
25336 * verify.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
25339 Thu Aug 5 17:11:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
25341 * reflection.c: fix to deal with object[] arrays in custom ctors
25344 2004-08-05 Martin Baulig <martin@ximian.com>
25346 * class.c (mono_class_array_element_size): Added support for
25347 generic instances and correctly handle "recursive" types.
25349 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
25351 * assembly.c: Fix warnings.
25353 2004-08-04 Martin Baulig <martin@ximian.com>
25356 (mono_type_get_name_recurse): Added `gboolean include_arity'
25357 argument specifying whether or not we should include the generic
25358 arity in the type name.
25359 (_mono_type_get_name): New static function.
25360 (mono_class_setup_vtable): If we're a generic instance, don't
25361 include the generic arity in the names of explicit method
25364 2004-08-03 Martin Baulig <martin@ximian.com>
25366 * class.c (mono_type_get_name_recurse): Enclose the generic type
25367 arguments in `<', '>'.
25369 Tue Aug 3 17:54:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
25371 * gc.c: make GC warning messages use the trace API, they are just
25372 noise to most of the users.
25374 2004-08-03 Martin Baulig <martin@ximian.com>
25376 * debug-mono-symfile.c (read_string): Correctly read the string.
25378 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
25380 * marshal.c (signature_dup_add_this): Fix bug in previous patch.
25382 * marshal.c (mono_marshal_get_icall_wrapper): Add support for vararg
25384 (mono_marshal_get_runtime_invoke): Correctly handle valuetype methods.
25386 2004-07-30 Martin Baulig <martin@ximian.com>
25388 * debug-mono-symfile.c, mono-debug.c, mono-debug-debugger.c:
25389 Reflect latest symbol writer changes.
25391 Fri Jul 30 16:49:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
25393 * object.c: always create an object if null is passed
25394 to Invoke() where a valuetype is expected.
25396 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
25398 * marshal.c (mono_marshal_init): make managed
25399 signatures match native ones better for 64bits.
25401 2004-07-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25403 * appdomain.c: hack to build correctly the private bin path on windows.
25406 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
25408 * assembly.c: Load mscorlib from the correct framework directory
25409 (mono/<version>/mscorlib.dll).
25410 * appdomain.h: Added prototypes for new functions.
25411 * internals.h: Added some prototypes.
25412 * domain.c: When initializing the runtime, get from the executable and
25413 the configuration files the runtime version that the app supports.
25414 Added support methods for reading app.exe.config. Added list of versions
25415 supported by the JIT. Added two new methods: mono_init_from_assembly,
25416 which initializes the runtime and determines the required version from
25417 the provided exe file, and mono_init_version, which initializes
25418 the runtime using the provided version.
25419 * icall.c: Get machine.config from version-specific directory.
25420 * reflection.c: When generating an image, embed the version number
25421 of the current runtime.
25423 2004-07-28 Dick Porter <dick@ximian.com>
25426 (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal): Check
25427 returned sockaddr size before creating the remote address object.
25428 Patch by Nick Vaughan (dev@6wardlaw.freeserve.co.uk), fixes bug
25431 2004-07-28 Dick Porter <dick@ximian.com>
25433 * locales.c (string_invariant_compare_char): Fix invariant char
25434 compares between upper and lower cases. Fixes bug 61458.
25436 2004-07-27 Ben Maurer <bmaurer@ximain.com>
25438 * marshal.c: actually cache stelem.ref wrappers.
25440 Tue Jul 27 16:56:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
25442 * class.c, image.c, loader.c, cil-coff.h: lazily mmap the image
25443 sections and remove the mono_cli_rva_map () function.
25445 Tue Jul 27 15:58:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
25447 * debug-mono-symfile.c: fix one more endianess issue, from a patch
25448 by Geoff Norton (<gnorton@customerdna.com>).
25450 Tue Jul 27 15:47:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
25452 * class.c: fix class loads for pointer types (typeof(int) !=
25455 2004-07-27 Martin Baulig <martin@ximian.com>
25457 * debug-mono-symfile.c (mono_debug_open_mono_symbol_file): Support
25458 reading the debugging information from an external ".mdb" file.
25460 2004-07-24 Martin Baulig <martin@ximian.com>
25462 * reflection.c (mono_image_get_type_info): Only write a class
25463 layout entry if we actually have a size or a packing size.
25465 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
25467 * reflection.c (type_get_fully_qualified_name):
25468 insert cast to get type checking of ?: with non-gcc compilers
25470 2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
25472 * rand.c: use g_getenv for both lookups of
25475 2004-07-17 Martin Baulig <martin@ximian.com>
25477 * reflection.c (mono_reflection_bind_generic_method_parameters):
25478 Set `gmethod->reflection_info'.
25480 2004-07-17 Martin Baulig <martin@ximian.com>
25482 * class.c (mono_class_create_from_typedef): Insert the newly
25483 created class into the hash table before computing the interfaces
25484 since we could be called recursively.
25486 2004-07-16 Ben Maurer <bmaurer@ximain.com>
25488 * marshal.[ch] (mono_marshal_get_stelemref): a new wrapper
25489 function to implement stelem.ref in managed code
25490 * class-internals.h, debug-helpers.c: a new wrapper type
25493 Wed Jul 14 19:26:05 CEST 2004 Paolo Molaro <lupus@ximian.com>
25495 * gc.c: allow GC handles to work even when no GC is compiled in.
25496 Fix part of bug #61134 (GetAddrOfPinnedObject).
25498 2004-07-13 Peter Williams <peter@newton.cx>
25500 * process.c (complete_path): Make sure we don't attempt to execute
25503 2004-07-12 Geoff Norton <gnorton@customerdna.com>
25505 * DateTime.cs: Patch for bug #61112. Our DateTime wasn't roundtripping over timezone
25506 boundaries properly. This patch checkes ToLocalTime() to see if we're tripping over a boundary
25507 and will add/subtract the hour if needed
25509 2004-07-12 Martin Baulig <martin@ximian.com>
25511 * reflection.c (mono_field_get_object): If we have
25512 `field->generic_info', take the attributes from
25513 `field->generic_info->generic_type'.
25515 2004-07-12 Martin Baulig <martin@ximian.com>
25517 * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
25518 This function must be called before initializing the runtime.
25519 (mono_debug_init_1): New function; call this after initializing
25520 the runtime, but before loading the assembly. It tells the
25521 debugger to load corlib and the builtin types.
25523 * mono-debug-debugger.c: Did some larger changes in the debugging
25524 code; support recursive class declarations, make sure we actually
25527 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25529 * debug-helpers.c: undo my previous patch and fixed the real issue in
25530 ../mini/exceptions-x86.c
25532 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25534 * debug-helpers.c: prevent SIGSEGV. It happened running xsp on monodoc
25535 when no HOME env. variable was set and a NullRef was thrown in a .cctor
25536 called from other .cctors.
25538 2004-07-09 Miguel de Icaza <miguel@ximian.com>
25540 * loader.c: Removed the mono_loader_wine_init hack now that we are
25541 doing a managed version of Windows.Forms.
25543 2004-07-09 Ben Maurer <bmaurer@ximian.com>
25545 * domain.c, gc.c, marshal.c, mono-debug-debugger.c,
25546 threadpool.c, threads.c: remove static data from rootset.
25548 2004-07-09 Dick Porter <dick@ximian.com>
25550 * locales.c (ves_icall_System_String_InternalReplace_Str_Comp):
25551 Don't do any more processing if the matched length was 0. It was
25552 increasing the size of the string before. Fixes bug 61167.
25554 2004-07-09 Dick Porter <dick@ximian.com>
25558 (ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal):
25559 Add support for SO_PEERCRED if its available.
25561 2004-07-09 Peter Bartok <pbartok@novell.com>
25562 * loader.c: winelib.exe.so error message is now only displayed if
25563 MONO_DEBUG is set. To help us avoid questions when people are trying
25564 out the new Managed.Windows.Forms.
25566 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
25568 * class-internals.h debug-helpers.c marshal.c: Add new wrapper types
25569 for isinst and castclass wrappers.
25571 * class-internals.h icall.c: Move registration and lookup of JIT icalls
25572 to libmetadata from the JIT, so they could be used by the marshalling
25573 code and the interpreter.
25575 * marshal.c: Register marshalling related JIT icalls here instead of
25576 in mini.c. Use CEE_MONO_ICALL instead of the family of
25577 CEE_MONO_PROC<x> opcodes to call marshalling functions.
25579 * metadata.h: Remove unneeded marshalling conversions.
25581 * opcodes.c: Update for new opcodes.
25583 2004-07-08 Martin Baulig <martin@ximian.com>
25585 * mono-debug.c: Check for `handle->symfile' being non-NULL everywhere.
25586 (mono_debug_get_domain_data): Make this function static.
25588 Wed Jul 7 12:32:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
25590 * gc.c, object.h: add nice GC handle API for embedders.
25592 2004-07-06 Ben Maurer <bmaurer@ximian.com>
25594 * reflection.c: more changes for the new api
25596 * object.c: When we reflect on a field w/ a constant value, it
25597 will not have a memory location, so we must access metadata. Also,
25598 allow easier reading of strings so that we can read them from
25601 * class.c (mono_class_layout_fields): no need for literal fields here.
25603 * class-internals.h: api changes for const fields
25605 * icall.c (ves_icall_get_enum_info): use new apis for const fields
25607 2004-07-06 Martin Baulig <martin@ximian.com>
25609 * mono-debug.h: Increment version number to 44.
25611 * mono-debug.c (mono_debug_add_wrapper): The second argument is
25612 now a gpointer, rewrote this whole method.
25614 * mono-debug-debugger.c (mono_debugger_add_wrapper): New
25615 function. Add information about the wrapper in a new "misc table".
25617 * mono-debug-debugger.h (MonoDebuggerSymbolTable): Added fields
25618 for the new misc table.
25620 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
25622 * metadata-internals.h image.c: Add a cache for helper signatures.
25624 * monosn.c: Applied patch from "grompf" (grompf@sublimeintervention.com). Fix compilation under OSX.
25626 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
25628 * marshal.c (mono_marshal_get_managed_wrapper): Handle returning
25629 delegates from a delegate. Fixes #61033.
25631 * marshal.c: Fix managed->native stringbuilder marshalling. Implement
25632 marshalling of stringbuilder arrays. Fixes #59900.
25634 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
25636 * icall.c: Add EnumBuilder:setup_enum_type icall.
25638 2004-06-30 Ben Maurer <bmaurer@ximian.com>
25640 * icall.c: Added a new icall for the property version of
25641 OffsetOfStringData.
25643 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
25645 * class-internals.h (MonoVTable): Make max_interface_id a guint32 so
25646 it has a constant size across platforms.
25648 * marshal.c (mono_delegate_end_invoke): Avoid crash when there is no
25651 2004-06-29 Martin Baulig <martin@ximian.com>
25653 * mono-debug.c (mono_debug_add_method): Protect the whole function
25654 in mono_debugger_lock(), not just parts of it.
25656 Fri Jun 25 21:36:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
25658 * reflection.c: make sure padding bytes in heaps are zeroed.
25660 2004-06-24 David Waite <mass@akuma.org>
25662 * appdomain.c, class.c, domain.c, file-io.c, gc.c, icall.c,
25663 image.c, loader.c, locales.c, marshal.c, metadata.c,
25664 mono-debug.[ch], object.c, reflection.c, security.c, socket-io.c,
25665 string-icalls.c, threads.c: change to C90-style comments from C99 /
25668 2004-06-24 Dick Porter <dick@ximian.com>
25671 (ves_icall_System_Threading_Mutex_CreateMutex_internal): Correctly
25672 return createdNew. Fixes bug 60412.
25675 * icall.c: Add createdNew parameter to CreateMutex icall
25677 Thu Jun 24 16:06:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
25679 * reflection.c, object-internals.h: save default value in params.
25681 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25683 * appdomain.c: for paths in PrivateBinPath that are absolute, there's
25684 no need to build a new path combining that with the application base.
25687 Wed Jun 23 18:36:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
25689 * reflection.c: fixed minor standard compliance issues.
25691 Wed Jun 23 17:59:29 CEST 2004 Paolo Molaro <lupus@ximian.com>
25693 * reflection.c: fixed issue with encoding some custom attributes
25694 (arrays in properties and fields, bug #60411).
25696 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25698 * reflection.c: fix start address when copying the public key token.
25700 2004-06-23 Martin Baulig <martin@ximian.com>
25702 * mono-debug-debugger.c (mono_debugger_unhandled_exception): Store
25703 the `exc' object in a static object to put it into the GC's root set.
25705 Wed Jun 23 15:37:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
25707 * reflection.c: make mono_reflection_setup_internal_class ()
25708 callable a second time to setup a new parent class.
25710 2004-06-23 Dick Porter <dick@ximian.com>
25712 * threads.c: Check for WAIT_IO_COMPLETION return values.
25714 2004-06-22 Sebastien Pouliot <sebastien@ximian.com>
25716 * appdomain.c: Removed the g_free on the public key token. Now copy
25717 the pk token string into the MonoAssemblyName buffer using g_strlcpy.
25718 * assembly.c: Added public key token string value when loading
25719 assemblies. Fix bug #60439.
25720 * icall.c: Added missing informations (like public key) in
25721 GetReferencedAssemblies. Fix #60519.
25722 * image.h: Changed definition for public key token from const char*
25723 public_tok_value to guchar public_key_token [17];
25724 * reflection.c: Updated for changes to public key token.
25726 2004-06-22 Lluis Sanchez Gual
25728 * icall.c: In ves_icall_InternalExecute, when setting a filed, also look
25729 for the field in base classes.
25731 Tue Jun 22 16:48:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
25733 * mono-debug.h, mono-debug-debugger.h, debug-mono-symfile.h:
25734 mark headers as not supported, they are installed only for use by the
25737 Tue Jun 22 16:32:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
25739 * *.c, *.h: avoid namespace pollution in public headers.
25741 2004-06-21 Martin Baulig <martin@ximian.com>
25743 * exception.c (mono_get_exception_security): It's in
25744 "System.Security", not in "System".
25746 * mono-debug-debugger.c (mono_debugger_add_builtin_types): Add all
25747 the exception classes.
25749 2004-06-21 Martin Baulig <martin@ximian.com>
25751 * mono-debug-debugger.c (mono_debugger_unhandled_exception):
25752 Protect the exception object from being finalized.
25754 2004-06-21 Martin Baulig <martin@ximian.com>
25756 * mono-debug-debugger.h (mono_debugger_unhandled_exception): New
25759 2004-06-21 Sebastien Pouliot <sebastien@ximian.com>
25761 * reflection.c: Load the assembly in mono_reflection_type_from_name,
25762 if it was not loaded before. Fix parts of #60439.
25764 Mon Jun 21 16:04:43 CEST 2004 Paolo Molaro <lupus@ximian.com>
25766 * marshal.c, icall.c, object.c, image.c: fix the runtime_invoke ()
25767 code that was broken since Ben's change: wrappers are now
25768 dependent on the method signature only again.
25770 2004-06-21 Martin Baulig <martin@ximian.com>
25772 * mono-debug-debugger.c (write_class): Cleaned this up a bit and
25773 added interface support.
25775 2004-06-21 Martin Baulig <martin@ximian.com>
25777 * class.c (mono_vtable_get_static_field_data): New public method.
25779 2004-06-20 Atsushi Enomoto <atsushi@ximian.com>
25781 * filewatcher.c : Windows build fix to be compliant with API changes.
25783 Sat Jun 19 19:04:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
25785 * class.h, class.c: more accessors.
25786 * metadata.h, metadata.c: prepare for hiding MonoType and
25787 MonoMethodSignature: people should use the accessors from now on
25788 outside of the tree.
25790 Sat Jun 19 17:56:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
25792 * *.c, *.h: more API cleanups.
25794 2004-06-18 Jackson Harper <jackson@ximian.com>
25796 * assembly.c: Trace loading assemblies.
25797 * loader.c: Trace loading native libraries.
25798 * mono-config.c: Trace loading config files.
25800 2004-06-18 Dick Porter <dick@ximian.com>
25802 * locales.c: Tell ICU the lengths of strings, it can cope with
25803 embedded \0 then. Fixes bug 59274, and doesn't break bug 55822.
25805 Fri Jun 18 11:59:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
25807 * image.c: swapped name/filename;
25809 2004-06-18 Martin Baulig <martin@ximian.com>
25811 * mono-debug-debugger.c (write_class): Write the parent class at
25812 the end of the header.
25814 Thu Jun 17 16:50:44 CEST 2004 Paolo Molaro <lupus@ximian.com>
25816 * *.c, *.h, Makefile.am: more API cleanups and bugfixes.
25818 2004-06-17 Raja R Harinath <rharinath@novell.com>
25820 * Makefile.am (PLATFORM_LIB): New. Possibly refer to ../os/libmonoos.la.
25821 (bundle_obj): New conditional define.
25822 (BUILT_SOURCES): Remove.
25823 ($(bundle_srcs)): Make parallel-make safe.
25824 (libmonoruntime_la_LIBADD): Make unconditional.
25825 (libmetadata_la_LIBADD): Make unconditional. Refer to $(bundle_obj).
25826 (libmetadata_la_SOURCES): Don't refer to $(bundle_srcs).
25828 2004-06-17 Atsushi Enomoto <atsushi@ximian.com>
25830 * culture-info-tables.h: It was inconsistent with the latest
25833 2004-06-17 Zoltan Varga <vargaz@freemail.hu>
25835 * assembly.c (mono_assembly_open): Fix crash when the assembly can't
25838 * threads.c (ves_icall_System_Threading_Thread_Resume): Fix compilation
25841 Wed Jun 16 18:23:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
25843 * threads.h, icall.c, object.c, threadpool.c, threads-types.h:
25844 cleaned up public header threads.h.
25846 Wed Jun 16 18:11:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
25848 * Makefile.am, *.c, *.h: more API cleanups.
25850 Wed Jun 16 14:33:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
25852 * Makefile.am: removed monosn from compilation.
25853 * appdomain.c, assembly.c, assembly.h, blob.h, class.c,
25854 debug-helpers.c, debug-mono-symfile.c, domain.c, icall.c,
25855 image.c, image.h, loader.c, marshal.c, metadata-internals.h,
25856 metadata.c, metadata.h, mono-config.c, mono-debug-debugger.c,
25857 mono-debug.c, object.c, opcodes.c, opcodes.h, pedump.c, process.c,
25858 reflection.c, reflection.h, verify.c: more API cleanups and fixes.
25860 2004-06-15 Jackson Harper <jackson@ximian.com>
25862 * assembly.c: Make locales lower case when searching the GAC for
25863 assemblies. gacutil will always make locales lowercase when
25864 installing so this effectively makes them case insensitive.
25866 2004-06-15 Lluis Sanchez Gual <lluis@ximian.com>
25868 * locales.c, threadpool.c: use mono_monitor_enter instead of mono_monitor_try_enter.
25869 * monitor.c: New method mono_monitor_try_enter_internal, which takes a new
25870 parameter which allows to choose whether the wait can be interrupted or
25871 not. Also added the method mono_monitor_enter(), which locks the monitor
25872 using an infinite wait and without allowing interruption.
25873 In the Monitor.Enter and Wait icalls, retry the lock if the wait is
25875 * object.h: Added new fields in MonoThread. suspend_event holds the event
25876 used to susped/resume the thread. synch_lock is the lock object to use for
25877 modifying the thread state.
25878 * threads.c: Use the new synch_lock object for locking, instead of "this",
25879 which can generate deadlocks.
25880 Moved thread state change in Thread.Sleep and Thread.Join from managed
25881 to unmanaged code. This avoids a deadlock when the thread was suspended
25882 just after acquiring the thread lock.
25883 In general, use mono_monitor_enter instead of mono_monitor_try_enter.
25884 Implemented Thread.Suspend using an event instead of ThreadSuspend,
25885 which is not fully implemented in the io-layer.
25886 * socket-io.c: Only try IPv6 DNS lookup if IPv4 fails.
25888 Tue Jun 15 18:34:21 CEST 2004 Paolo Molaro <lupus@ximian.com>
25890 * Makefile.am, monitor.h, object.h, threadpool.c, threadpool.h,
25891 threads-types.h: more API cleanups.
25893 Tue Jun 15 16:40:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
25895 * domain-internals.h, Makefile.am, appdomain.c, appdomain.h,
25896 domain.c, gc.c, icall.c, mono-debug.c, object.c, reflection.c,
25897 threadpool.c, threads.c: first pass at the exported API cleanup.
25899 Tue Jun 15 15:29:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
25901 * icall.c: fix signatures of some VolatileRead and VolatileWrite icalls.
25903 2004-06-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25905 * icall.c: added internalGetHome.
25907 2004-06-14 Dick Porter <dick@ximian.com>
25909 * file-io.c (ves_icall_System_IO_MonoIO_FindFirstFile): It was
25910 possible to return successfully when '.' or '..' were the only
25911 entries in a directory, but were skipped. The MonoIOStat was not
25912 filled in in that case. Now return ERROR_NO_MORE_FILES instead.
25915 Mon Jun 14 00:27:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
25917 * reflection.c: make binaries run on .Net 1.1 by default.
25919 Sun Jun 13 18:22:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
25921 * threadpool.c, threadpool.h: use the correct return type in SetMinThreads ().
25923 Sun Jun 13 16:44:39 CEST 2004 Paolo Molaro <lupus@ximian.com>
25925 * marshal.c: keep track of struct size with explicit layout
25928 2004-06-12 Martin Baulig <martin@ximian.com>
25930 * mono-debug-debugger.c: Comment out a debugging g_message().
25932 Sat Jun 12 14:15:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
25934 * reflection.c, reflection.h: do not free custom attrs that are cached.
25935 * icall.c: use braces to make code clearer.
25937 2004-06-11 Martin Baulig <martin@ximian.com>
25939 * class.h (MonoInflatedField): New type.
25940 (MonoClassField): Replaced `MonoType *generic_type' with
25941 `MonoInflatedField *generic_info'.
25944 (ves_icall_MonoField_Mono_GetGenericFieldDefinition): New icall.
25946 2004-06-11 Martin Baulig <martin@ximian.com>
25948 * reflection.c (mono_image_create_method_token): Correctly encode
25951 2004-06-11 Martin Baulig <martin@ximian.com>
25953 * metadata.c (mono_metadata_parse_method_signature): When parsing
25954 a MethodDef which has VarArgs, also set sentinelpos if we don't
25955 have any parameters.
25957 2004-06-11 Martin Baulig <martin@ximian.com>
25959 * verify.c (mono_method_verify): In CEE_CALL, use
25960 mono_method_get_signature() to get the method's signature, unless
25961 we're a PInvoke method.
25963 2004-06-10 Jackson Harper <jackson@ximian.com>
25965 * assembly.c: Use <path>/lib/mono/gac for the extra paths
25966 lookup. Rename MONO_GAC_PATH to MONO_GAC_PREFIX, this is a more
25967 logical name as the supplied path is just a prefix to the gac not
25968 the direct path to it.
25970 Thu Jun 10 20:10:16 CEST 2004 Paolo Molaro <lupus@ximian.com>
25972 * reflection.c: make the token for a created method match
25973 the token of the MethodBuilder it was created from
25974 (IKVM requires this behaviour now).
25976 Thu Jun 10 16:02:27 CEST 2004 Paolo Molaro <lupus@ximian.com>
25978 * image.c, image.h, appdomain.c, assembly.c, loader.c, metadata.c,
25979 reflection.c, socket-io.c: leak fixes.
25981 Wed Jun 9 18:23:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
25983 * icall.c: handle sentinel pos in vararg methods in position different
25986 2004-06-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
25988 * culture-info-tables.h: freshly generated.
25990 2004-06-09 Martin Baulig <martin@ximian.com>
25992 * loader.c (mono_get_method_constrained): Call `mono_class_init
25993 (constrained_class)'.
25995 2004-06-08 Gert Driesen <drieseng@users.sourceforge.net>
25997 * icall.c (ves_icall_MonoType_GetEvent): Handle events without
25998 any methods. Fixes #59629.
26000 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
26002 * culture-info-tables.h: reflecting locale-builder updates.
26004 2004-06-08 Dick Porter <dick@ximian.com>
26007 * locales.c: Fixed compile warnings, including a real bug in
26008 CompareInfo_internal_compare.
26010 2004-06-08 Dick Porter <dick@ximian.com>
26013 (ves_icall_System_Globalization_CompareInfo_internal_index):
26014 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
26015 Double-check the resuls of usearches, because ICU currently
26016 ignores most of the collator settings here. Fixes bug 59720.
26018 2004-06-08 Dick Porter <dick@ximian.com>
26021 (ves_icall_System_Globalization_CompareInfo_internal_index_char):
26022 Fix memory leak and segfault-causing typo. No idea how this one
26023 lasted so long without being noticed.
26025 2004-06-09 Zoltan Varga <vargaz@freemail.hu>
26027 * icall.c (ves_icall_Type_GetEvents_internal): Handle events without
26028 any methods. Fixes #59629.
26030 2004-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26033 (mono_assembly_load): search_loaded -> mono_assembly_loaded (we didn't
26034 own the critical section before). Removed dead code (that's done
26035 in the preload hook).
26037 (mono_assembly_load_with_partial_name): call the preload hook.
26039 2004-06-08 Martin Baulig <martin@ximian.com>
26041 * metadata.c (mono_metadata_signature_alloc): Default
26042 `sentinelpos' to -1.
26044 * reflection.c (mono_image_get_array_token): Likewise.
26046 2004-06-08 Martin Baulig <martin@ximian.com>
26048 * icall.c (ves_icall_ModuleBuilder_getMethodToken): New icall.
26050 * metadata.c (mono_metadata_parse_method_signature): When parsing
26051 a MethodDef which has VarArgs, set sentinelpos.
26053 * metadata.h (MonoMethodSignature): Make `sentinalpos' a signed
26054 `gint16' since we're using -1 for non-varargs methods.
26057 (ReflectionMethodBuilder): Added `MonoArray *opt_types'.
26058 (method_encode_signature): Added varargs support.
26059 (method_builder_encode_signature): Likewise.
26060 (mono_image_get_varargs_method_token): New static method.
26061 (mono_image_create_method_token): New public method; this is
26062 called via an icall instead of mono_image_create_token() when
26063 calling a varargs method.
26065 2004-06-08 Lluis Sanchez Gual <lluis@ximian.com>
26067 * locales.c: Fixed memory leak in Char.ToLower/ToUpper.
26069 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
26071 * culture-info-tables.h : Reflecting the latest locale-builder that
26072 fixed empty array representation ({} to {0}).
26074 2004-06-07 Jackson Harper <jackson@ximian.com>
26076 * assembly.c: It should be <MONO_GAC_PATH>/lib/mono/gac when
26077 looking up extra gac paths. This allows MONO_GAC_PATH to act
26078 exactly like a prefix.
26080 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
26082 * reflection.c (mono_reflection_type_from_name): Make a copy of the
26083 type name before modifying it. Fixes #59405.
26085 2004-06-08 Atsushi Enomoto <atsushi@ximian.com>
26087 * culture-info.h: added fields for "all datetime patterns".
26088 * locales.c: ( ves_icall_System_Globalization_CultureInfo
26089 _construct_datetime_format ()): fill xxx_patterns fields.
26090 * object.h: added fields for "all datetime patterns" to
26091 MonoDateTimeFormatInfo.
26092 * culture-info-tables.h: reflecting locale-builder updates.
26094 2004-06-08 Zoltan Varga <vargaz@freemail.hu>
26096 * icall.c (ves_icall_Type_GetEvents_internal): Handle the case when
26097 the event has no add and remove methods. Fixes #59629.
26099 2004-06-05 Sebastien Pouliot <sebastien@ximian.com>
26101 * object.c: Fixed possible integer overflow when allocating large
26104 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
26106 * culture-info-tables.h: reflecting locale-builder updates.
26108 2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
26110 * culture-info-tables.h: reflecting locale-builder updates.
26112 2004-06-03 Atsushi Enomoto <atsushi@ximian.com>
26114 * culture-info-tables.h: reflecting locale-builder updates.
26116 2004-06-03 Lluis Sanchez Gual <lluis@ximian.com>
26118 * threads.c: Made Thread.Sleep abortable.
26120 2004-06-02 Martin Baulig <martin@ximian.com>
26122 * mono-debug.h (MONO_DEBUGGER_VERSION): Bumped version to 41.
26124 * debug-mono-symfile.h: Bumped symbol file version number to 37.
26126 2004-05-31 Zoltan Varga <vargaz@freemail.hu>
26128 * marshal.c (mono_marshal_get_runtime_invoke): Fix CR/LFs.
26130 2004-05-30 Jackson Harper <jackson@ximian.com>
26132 * reflection.c: Do not hardcode assembly versions or public key
26133 tokens anymore. All of this except the corlib section was dead
26136 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
26138 * object.c (mono_runtime_invoke_array): Automatically create boxed
26139 objects for byref valuetypes if needed. Fixes #59300.
26141 * object.c (mono_method_return_message_restore): Handle
26142 MONO_TYPE_OBJECT as well.
26144 2004-05-28 Jackson Harper <jackson@ximian.com>
26146 * reflection.c: The modified type encoding was causing build
26147 problems. Reverted for now.
26149 2004-05-28 Jackson Harper <jackson@ximian.com>
26151 * reflection.c/h: Take an assembly ref so that we dont create
26152 fully qualified names when encoding types in the same assembly as
26153 the custom attribute being emitted.
26154 * appdomain.c: Increment version number.
26156 2004-05-26 Duncan Mak <duncan@ximian.com>
26159 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
26160 Set the full version number (major, minor, build, revision).
26162 2004-05-28 Vladimir Vukicevic <vladimir@pobox.com>
26164 * marshal.c (emit_struct_conv): increment src/dst after blit
26165 (mono_marshal_get_managed_wrapper,
26166 mono_marshal_get_native_wrapper): make sure we have marshalling
26167 info before marshalling params (info computation affects
26170 * class.c (class_compute_field_layout): correctly deal with
26172 (mono_class_layout_fields): Don't do gc_aware_layout for AUTO
26173 value types (as per what windows dows by default)
26174 (mono_class_setup_mono_type): System.ValueType is blittable
26175 (mono_ptr_class_get, mono_fnptr_class_get): Pointer classes are
26178 * marshal.c (mono_marshal_load_type_info): flag types as
26179 non-blittable if the native layout doesn't match the managed
26182 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26184 * appdomain.c: don't add stuff in the private search path that is
26185 above the application base. If application base is not set, there's
26186 no private search path.
26188 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
26190 * marshal.c (mono_marshal_get_managed_wrapper): Add proper support for
26191 byref struct arguments in native->managed marshalling.
26193 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
26195 * marshal.c (mono_marshal_get_runtime_invoke): correctly
26196 cache methods using signature (special case for methods
26197 that are value type or string class)
26199 * image.c (mono_image_close): clean up allocated GSList's
26200 in runtime_invoke_cache.
26202 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26204 * mono-config.c: set the correct path for mono_cfg_dir on windows when
26205 there's no MONO_CFG_DIR environment variable defined.
26207 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26209 * threads.c: windows version must be >= 0x0500 to include OpenThread.
26211 2004-05-28 Lluis Sanchez Gual <lluis@ximian.com>
26213 * threadpool.c: Really wait for 500ms after the async call, even if the wait
26215 * threads.c: In mono_thread_manage, call OpenThread to ref each handle
26216 before waiting for it, and call CloseHandle after the wait to unref it.
26217 This will make sure that handles are not disposed too early.
26219 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26224 ves_icall_System_AppDomainSetup_InitAppDomainSetup as it's not
26227 * object.c: se the application_base only for the domain that runs
26228 Main. Fixes bug #59216,
26230 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26233 * object.c: only the domain in which Main is run have
26234 SetupInformation.ConfigurationFile set, so moved a few lines from
26235 appdomain.c to object.c.
26237 2004-05-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26239 * appdomain.c: we tried to load [name].(dll|exe), but according
26240 to bug #57710, we must also try [culture]/[name].(dll|exe) and
26241 [culture]/[name]/[name](dll|exe). This patch fixes the bug.
26242 There's a test case attached to bug #58922.
26244 2004-05-27 Dick Porter <dick@ximian.com>
26247 * file-io.c: Implemented icalls for locking and unlocking regions
26249 (ves_icall_System_IO_MonoIO_FindNextFile): FindNextFile() returns
26250 FALSE on error (fixes both compiler warning and real bug.)
26252 2004-05-27 Atsushi Enomoto <atsushi@ximian.com>
26254 * culture-info-tables.h: reflecting locale-builder updates.
26256 (Added missing ChangeLog entry for 05/26)
26258 2004-05-27 Jackson Harper <jackson@ximian.com>
26260 * locales.c: Fix some cut and paste errors.
26262 2004-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26264 * mono-config.c: set the correct path for config. directory on windows.
26266 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
26268 * icall.c : Fixed ves_icall_System_DateTime_GetNow() to return utc
26271 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
26273 * marshal.c (mono_marshal_get_native_wrapper): Free strings returned
26274 from pinvoke functions.
26276 * marshal.c (mono_ftnptr_to_delegate): Implement this.
26278 2004-05-26 Atsushi Enomoto <atsushi@ximian.com>
26280 * culture-info-tables.h: reflecting locale-builder updates.
26282 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
26284 * profiler.c (simple_allocation): Skip icall wrapper methods. Fixes
26287 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
26289 * appdomain.cs: Bumped MONO_CORLIB_VERSION to 20.
26290 * icall.c: Modified icalls for RNG.
26291 * rand.c|h: Changed RNG interface to allow thread-safe usage under
26292 Windows (CryptoAPI).
26294 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
26296 * locales.c: Fix build.
26298 2004-05-25 Atsushi Enomoto <atsushi@ximian.com>
26300 * culture-info-tables.h: reflecting locale-builder updates.
26302 2004-05-25 Jackson Harper <jackson@ximian.com>
26304 * locales.c: When creating the current culture use the $LANGs
26305 specific culture. So DateTimeFormat and NumberFormat entries are created.
26307 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
26309 * string-icalls.{h,c} icalls.c: Add new icalls for Strcpy which take
26310 a char array as parameter.
26312 2004-05-24 Lluis Sanchez Gual <lluis@ximian.com>
26314 * image.c: In mono_image_open(), always use an absolute path name to
26315 look for already loaded images.
26317 2004-05-24 Sebastien Pouliot <sebastien@ximian.com>
26319 * icall.c: Added define for CSIDL_FLAG_CREATE (0x8000) in case it is
26320 missing in the windows build (like older cygwin include files).
26322 2004-05-23 Sebastien Pouliot <sebastien@ximian.com>
26324 * icall.c: Fixed check for possible integer overflow in Buffer_
26325 BlockCopy icall. Replaced comments style // by /* */.
26327 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
26329 * marshal.c (mono_ftnptr_to_delegate): Fix warning.
26331 * marshal.c (mono_marshal_get_proxy_cancast): Move thread interrupt
26332 check after MONO_VTADDR. Fixes pinvoke2.exe.
26334 * marshal.h marshal.c metadata.h: Add beginnings of support for
26335 ftnptr -> delegate marshalling.
26337 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
26339 * threads.c (ves_icall_System_Threading_Thread_ResetAbort): Fix compilation on gcc-2.95.
26340 * threads.c: Fix warnings.
26342 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
26344 * appdomain.c, gc.c: Make use of the new WaitForSingleObjectEx.
26345 * icall.c: Registered icalls for Suspend and Resume.
26346 * locales.c: Beware, mono_monitor_try_enter can now be interrupted by
26348 * monitor.c: Use WaitForSingleObjectEx. Added some interruption checkpoints.
26349 * mono-debug-debugger.c: Use WaitForSingleObjectEx et al.
26350 * process.c: Use WaitForSingleObjectEx.
26351 * threadpool.c: Use WaitForSingleObjectEx. Added some interruption
26353 * threads.c, threads.h: Make use of new Ex wait methods. Improved
26354 implementation of Thread.Abort and Thread.ResetAbort icalls. Added icalls
26355 for Suspend and Resume. Added new mono_thread_stop, used for stoping
26356 background threads. Added basic support for Abort in Windows.
26357 Start new threads using a managed delegate invoke wrapper. This wrapper
26358 has an interruption checkpoint that is needed since an interruption
26359 can be requested before the thread leaves the unmanaged code that starts
26361 * marshal.c: Added interruption checkpoint after every native call, and
26362 also before managed calls for wrappers called from unmanaged code to
26363 go into managed code.
26364 * object.h: Added new field in MonoThread to keep track of interruption
26367 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
26369 * marshal.c: Insert SAVE_LMF and RESTORE_LMF opcodes around native
26372 2004-05-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26379 * rand.c: getenv -> g_getenv (windows!)
26381 * process.c: complete_path is also used on non-windows platforms.
26383 2004-05-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26385 * icall.c: new signature for Process_Start.
26387 * process.[ch]: new signature for Process_Start. If we're on windows
26388 and UseShellExecute is false, we have to search for the program by
26389 ourselves if we don't get a full path.
26391 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
26393 * marshal.c (mono_marshal_get_native_wrapper): Fix up custom
26394 marshalling and call CleanUpNativeData if needed. Fixes #58646.
26396 2004-05-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26398 * socket-io.c: field value changed for Int32 from 'value' to 'm_value'.
26401 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26403 * process.c: use double quotes to quote program name and arguments on
26404 windows. Fixes bug #58575.
26406 2004-05-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26408 * file-io.c: don't return "." and ".." when using windows Find*File.
26410 2003-05-17 Patrik Torstensson <totte@hiddenpeaks.com>
26412 * marshal.c: Don't pass wrappers to message init because method
26413 addressed used to lookup metadata. part of remoting[2|3] fix.
26415 2004-05-15 Jackson Harper <jackson@ximian.com>
26417 * assembly.c: Remove user gac and implement MONO_GAC_PATH, this
26418 path is essentially the same as MONO_PATH except that it points to
26419 GACs instead of lib directories.
26420 * loader.h: The user gac is gone so we dont need function to
26422 * mono-config.c: user gac option is now gone.
26424 2004-05-15 Jackson Harper <jackson@ximian.com>
26426 * culture-info.h: Make defines more consistent, add calendar data
26427 to the culture info table.
26428 * culture-info-tables.h: Add basic calendar data. Basically
26429 everyone gets default gregorian until all the data is
26431 * locales.c: Use the new consistent defines. Set calendar data for
26432 culture info objects.
26433 * object.h: add a field for calendar data to CultureInfo
26435 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
26437 * image.c: image->runtime_invoke_cache is keyed on signatures now.
26438 * marshal.c (mono_mb_emit_calli): new helper to emit a CEE_CALLI with
26440 (mono_mb_emit_managed_call, mono_mb_emit_native_call): use the above.
26441 (mono_marshal_get_runtime_invoke): The runtime invoke method now takes
26442 an extra param that is the pointer of the method to invoke. The IL for
26443 the invoke method is no longer specific to the method, but to the
26444 signature of the method. Thus, we can share the same code for multiple
26445 methods. This reduces the number of methods that have to be compiled.
26447 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
26449 * icall.c (ves_icall_System_Reflection_Assembly_load_with_partial_name): Fix warning.
26451 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
26453 * icall.c: Optimize Buffer.BlockCopy.
26455 2004-05-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26457 * culture-info-tables.h: seems like Spanish and Portuguese cultures had
26458 DateTimeFormatInfo.YearMonthPattern like "MMMM' yyyy" (note the single
26459 quote). Changed them to "MMMM yyyy".
26461 2004-05-12 Miguel de Icaza <miguel@ximian.com>
26464 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_InternalGetBytes): Always close the file.
26466 2004-05-13 Zoltan Varga <vargaz@freemail.hu>
26468 * reflection.h: Updated after changes to managed structures.
26470 * appdomain.c: Bump corlib version.
26472 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26474 * Makefile.am: also add libmonoos to libmetadata. Fixes the build on
26477 2004-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26479 * Makefile.am: link to ../os/libmonoos.la on windows.
26482 -If MONO_DEBUG, warn about non-existing directories in
26484 -Added mono_assembly_getrootdir() that replaces MONO_ASSEMBLIES
26485 compile time variable.
26486 -Removed init_default_path and call mono_set_rootdir from
26487 libmonoos.a instead (windows only).
26489 * assembly.h: declare mono_assembly_getrootdir().
26492 * icall.c: use mono_assembly_getrootdir() instead of MONO_ASSEMBLIES.
26494 * loader.c: s/getenv/g_getenv/
26496 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
26498 * marshal.{h,c}: Add support for UnmanagedType.AsAny.
26500 * marshal.c: Use mono_metadata_signature_{alloc,dup} where appropriate.
26502 * metadata.h: Add new marshalling conversions.
26504 * metadata.h metadata.c (mono_metadata_signature_dup): New helper
26507 * reflection.c (mono_reflection_get_type): Lookup the type in all
26508 modules of a multi-module assembly. Fixes #58291.
26510 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
26512 * threads.c: Before aborting a background, set the StopRequested
26513 state. This avoids throwing the Abort exception.
26514 In mono_thread_manage, don't continue with the shutdown until all
26515 aborted threads have actually stopped.
26517 2004-05-10 Jackson Harper <jackson@ximian.com>
26519 * locales.c: Remove the modifier from culture names.
26521 2004-05-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26523 * Makefile.am: monosn is not installed any more. It has been deprecated
26526 2004-05-07 Jackson Harper <jackson@ximian.com>
26529 (ves_icall_System_Globalization_CultureInfo_internal_get_cultures):
26530 Fix array construction, add bailout if the length is 0.
26532 2004-05-07 Dick Porter <dick@ximian.com>
26534 * socket-io.c (addrinfo_to_IPHostEntry): Don't crash if the
26535 machine doesn't have a DNS entry. Patch by Urs Muff
26536 (umuff@quark.com), fixes bug 57928.
26538 2004-05-06 Jackson Harper <jackson@ximian.com>
26540 * reflection.c: Handle null PublicTokens properly. alloc mem for
26541 assembly names culture so we dont crash when freeing it.
26543 2004-05-06 Jackson Harper <jackson@ximian.com>
26545 * assembly.c: Check the usergac when loading with partial names.
26547 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
26549 * rand.c|h: Added new icall for (optionally) seeding the PRNG. This
26550 does nothing for now (not required for Linux/Windows) but the class
26551 library can call it (and a newer or modified runtime could need it).
26552 * icall.c: Registred icall.
26554 2004-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26556 * loader.c: prints a message on module loading error we set MONO_DEBUG
26557 environment variable.
26559 2004-05-05 Jackson Harper <jackson@ximian.com>
26561 * appdomain.c: Handle PublicKeyToken=null properly.
26563 2004-05-05 Sebastien Pouliot <sebastien@ximian.com>
26565 * environment.c|h: Added icall ves_icall_System_Environment_
26566 GetOSVersionString to get the current OS version as a string.
26567 * icall.c: Registred icall.
26569 2004-05-05 Lluis Sanchez Gual <lluis@ximian.com>
26571 * object.c: in mono_object_get_virtual_method(), take into account that
26572 non-virtual methods don't have a slot in the vtable. Check needed when
26573 the object is a proxy.
26575 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
26577 * marshal.h marshal.c icall.c: Applied patch from vladimir@pobox.com
26578 (Vladimir Vukicevic). Implement UnsafeAddrOfPinnedArrayElement.
26580 * object.c (mono_class_compute_gc_descriptor): Fix warning.
26582 * object.c (mono_runtime_invoke_array): Add an assert so null cannot be
26583 passed when a valuetype is expected.
26585 * object.c (mono_unhandled_exception): Only set the exit code if the
26586 exception happens in the main thread. Fixes thread5.exe.
26588 * appdomain.c (get_info_from_assembly_name): Fix infinite loop on
26589 invalid names. Fixes #58047.
26591 2004-05-03 Jackson Harper <jackson@ximian.com>
26593 * assembly.c: This line was committed accidently and is unneeded.
26595 2004-05-03 Jackson Harper <jackson@ximian.com>
26597 * icall.c: Add new icall for Assembly::LoadWithPartialName
26598 * assembly.c/.h: new function that probes the GAC to load partial
26599 assembly names by Paolo Molaro.
26601 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26603 * appdomain.c: use g_strncasecmp when looking for 'Culture=' et al.
26604 * reflection.c: use g_strncasecmp when looking for 'Culture=' et al.
26605 (type_get_fully_qualified_name): Added PublicKeyToken when building a
26608 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26610 * appdomain.c: fixed check for 'neutral' culture and removed warning.
26611 * reflection.c: fix bug when parsing a full type name and Version is not
26612 the last thing in the string.
26614 2004-05-03 Zoltan Varga <vargaz@freemail.hu>
26616 * appdomain.c (get_info_from_assembly_name): Strdup "" to prevent
26617 crashes when it is freed.
26619 2004-05-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26621 * assembly.c: print the compat warning to stderr.
26623 2004-05-01 Miguel de Icaza <miguel@ximian.com>
26625 * assembly.c (mono_assembly_load_references): Add a compatibility
26626 hack to run old applications that might be still referencing the
26627 3300-based assemblies, only do this for System.xxx.
26629 2004-05-01 Jackson Harper <jackson@ximian.com>
26631 * appdomain.c: If the culture is neutral we set it to "".
26633 2004-04-29 Jackson Harper <jackson@ximian.com>
26635 * locales.c: Add some missing MONO_ARCH_SAVE_REGS'.
26637 2004-04-29 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
26639 * string-icalls.c: added low overhead function for copying chars
26640 * icall.c: added needed icall for the above function
26642 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26644 * icall.c: fix return value of get_global_assembly_cache. Implemented
26645 Environment.GetLogicalDrives.
26647 2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
26649 * rand.c: try and talk to egd or prngd
26650 for random bytes if opening devices fail.
26652 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
26654 * marshal.c (mono_marshal_load_type_info): Calculate the minimum
26655 alignment for the type using the native alignment of its members
26656 instead of using klass->min_align.
26658 * metadata.c (mono_type_stack_size): Fix size of TYPEDBYREF.
26660 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26663 * socket-io.c: added check for sys/aio.h.
26665 2004-04-28 Dick Porter <dick@ximian.com>
26667 * threads.c: Don't abort a thread thats already aborting, when
26668 terminating everything.
26670 2004-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26672 * icall.c: added 2 new async calls for Socket.
26674 * socket-io.[ch]: fixed some warnings. Added support for asynchronous
26675 IO on *nix systems.
26677 * threadpool.c: removed unused variable.
26679 2004-04-27 Zoltan Varga <vargaz@freemail.hu>
26681 * marshal.c: Handle null properly in PtrToString* icalls. Fixes #57706.
26683 Tue Apr 27 15:55:17 CEST 2004 Paolo Molaro <lupus@ximian.com>
26685 * locales.c: put back string_invariant_tolower () and
26686 string_invariant_toupper ().
26688 2004-04-26 David Waite <mass@akuma.org>
26693 * unicode.h: remove comma from end of enumeration declarations
26695 2004-04-26 David Waite <mass@akuma.org>
26697 * debug-mono-symfile.h:
26700 * sysmath.c: Define 64 bit constants as long long types (i.e. 10ULL)
26703 2004-04-26 Jackson Harper <jackson@ximian.com>
26705 * appdomain.c: Increment version number.
26707 2004-04-26 Jackson Harper <jackson@ximian.com>
26709 * appdomain.c: Set assembly references public token value when
26710 PublicKeyToken is specified, not the hash_value. Free public token
26711 values when free assembly name data. Previously the public key
26712 token was hex decoded, however we are using hex encoded public key
26713 tokens, so this is not neccasary.
26714 * assembly.c: Lookup assemblies in the gac if their public token
26715 value is set. Add function to allow enabling user gac
26716 lookups. Specify whether or not the assembly was loaded from the
26717 GAC. Compare full assembly names when checking the cache for
26718 assemblies (Temporarily disabled see comment in code). Remove
26719 mscorlib -> corlib mapping cruft. Add trace-loading. When a user
26720 specifies trace-loader they get extra info to stdout on the
26721 loading of assemblies.
26722 * image.h: Add a field for an assembly references public token
26723 value to MonoAssemblyname. Add a field to MonoAssembly to specifiy
26724 whether an assembly has been loaded from the GAC.
26725 * image.c: Remove a corlib -> mscorlib name mapping.
26726 * loader.h: Add function to enable/disable the user gac.
26727 * mono-config.c: Check if the usergac is enabled in the config
26729 * icall.c: New icall to determine whether or not an assembly has
26730 been loaded from the GAC. Remove some mscorlib -> corlib mappings.
26731 * tabldefs.h: Add constant for assemblyref flag that specifies a
26732 full public key is used instead of a public token.
26733 * reflection.c: Remove mscorlib -> corlib mappings. Set
26734 PublicTokenValue instead of hash value. This value is a hex
26735 string so it does not need to be expanded.
26737 2004-04-26 Martin Baulig <martin@ximian.com>
26739 * mono-debug-debugger.c (mono_debugger_initialize): Set
26740 `mono_debugger_initialized' before calling mono_debug_lock().
26742 2004-04-42 Robert Shade <rshade@dvsconsulting.com>
26744 * icall.c: icalls for Char.ToUpper/ToLower are now hooked to
26745 InternalToUpper/InternalToLower.
26746 * locales.c: (ves_icall_System_{Char,String}_InternalTo{Upper,Lower}_Comp)
26747 removed invariant culture shortcut. This is now done in managed code.
26748 * locales.c: (string_invariant_toupper/tolower) removed.
26750 2004-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26752 * icall.c: added GetSupportsAsync for Socket (same as MonoIO).
26753 Added Poll internal call.
26755 * socket-io.[ch]: _wapi_socket == WSASocket. Added internal
26756 call for Poll. Select was too heavy for polling a single socket.
26758 * threadpool.[ch]: added mono_threadpool_cleanup.
26759 * threads.c: use it. Don't use Thread_Abort on windows.
26761 2004-04-23 Martin Baulig <martin@ximian.com>
26763 * mono-debug-debugger.c (mono_debugger_lookup_assembly): New function.
26765 2004-04-23 Sebastien Pouliot <sebastien@ximian.com>
26767 * icall.c: Registred new icalls for key pair protection and added an
26768 icall for Environment.GetFolderPath on Windows.
26769 * security.c|h: Added new icalls for key pair protection.
26771 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26773 * socket-io.c: don't display the non-supported family warning for known
26774 families. Now this is not displayed on windows when checking support
26777 2004-04-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26779 * class.c: don't display the layout warning for static fields.
26781 2004-04-21 Lluis Sanchez Gual <lluis@ximian.com>
26783 * icall.cs: Registered new icalls for Char.ToLower and Char.ToUpper.
26784 * locales.c, locales.h: Added new icalls for culture-specific
26785 Char.ToLower and Char.ToUpper.
26787 2004-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26789 * threads.c: the 2nd argument when aborting a thread is NULL now. Patch
26792 2004-04-20 Martin Baulig <martin@ximian.com>
26794 * mono-debug-debugger.c (mono_debugger_lookup_type): Make a copy
26795 of the type name before passing it to mono_reflection_type_from_name().
26797 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
26799 * marshal.c (mono_marshal_get_managed_wrapper): Handle different string
26800 encodings here. Fixes #56965.
26802 2004-04-18 Bernie Solomon <bernard@ugsolutions.com>
26804 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
26805 fix test on strstr result not that I can see anything that
26806 relies on the result.
26808 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
26810 * metadata.c (mono_type_to_unmanaged): Handle MONO_NATIVE_FUNC as well.
26813 * marshal.c (mono_marshal_get_string_encoding): New helper function.
26815 * marshal.c (mono_marshal_get_native_wrapper): Use the new helper
26816 function to determine which marshalling to use for strings. Fixes
26819 * marshal.c (mono_marshal_string_array_to_unicode): Fix warning.
26821 * reflection.c (encode_marshal_blob): Add support for LPARRAY.
26823 2004-04-15 Bernie Solomon <bernard@ugsolutions.com>
26825 * icall.c: #include mono-config.h
26827 2004-04-15 Jackson Harper <jackson@ximian.com>
26829 * culture-info-tables.h: Fix date formats for en-US culture.
26831 2004-04-15 Lluis Sanchez Gual <lluis@ximian.com>
26833 * icall.c: Registered icalls for ThreadPool.GetMinThreads and
26834 ThreadPool.SetMinThreads.
26835 * threadpool.c: Implemented ThreadPool.GetMinThreads and
26836 ThreadPool.SetMinThreads.
26838 Thu Apr 15 15:36:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
26840 * mono-config.c: also load the .config file in the directory
26841 where the assembly was found.
26843 Thu Apr 15 14:24:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
26845 * assembly.c: load per-assembly config files.
26846 * icall.c: decrapified code to get the config dir and moved to
26848 * image.h, loader.c, loader.h, mono-config.c, mono-config.h: allow
26849 per-assembly config files. When doing a dll map lookup give precedence
26850 to the per-assembly data.
26852 2004-04-14 Martin Baulig <martin@ximian.com>
26854 * mono-debug-debugger.h (MonoDebuggerEvent): Removed
26855 MONO_DEBUGGER_EVENT_TYPE_ADDED and MONO_DEBUGGER_EVENT_METHOD_ADDED
26856 and added MONO_DEBUGGER_EVENT_RELOAD_SYMTABS.
26858 * mono-debugger-debugger.c: While the debugger is locked, remember
26859 whether the symbol tables have changes and send one single
26860 MONO_DEBUGGER_EVENT_RELOAD_SYMTABS when releasing the lock.
26862 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
26864 * metadata.h: Add STRARRAY_STRWLPARRAY marshalling convention.
26866 * marshal.h marshal.c (mono_marshal_string_array_to_unicode): New
26869 * marshal.c (mono_marshal_get_native_wrapper): Take CharSet into
26870 account when marshalling string arrays. Fixes #56965.
26872 2004-04-13 Sebastien Pouliot <sebastien@ximian.com>
26874 * icall.c: Add new icalls mapping for security.
26875 * security.c|h: Add internal calls for WindowsIdentity,
26876 WindowsImpersonationContext and WindowsPrincipal.
26878 2004-04-13 Gert Driesen (drieseng@users.sourceforge.net)
26880 * class.c: Added comment to ensure the System.MonoDummy class
26881 is removed when no longer necessary
26883 2004-04-13 Miguel de Icaza <miguel@ximian.com>
26885 * appdomain.c: Pass arguments to the bootstraping exceptions to
26886 minimize JITed methods at boot
26888 * metadata.c (mono_exception_from_name_two_strings): Allow for the
26889 second string to be null.
26891 * icall.c (ves_icall_System_Text_Encoding_InternalCodePage):
26892 Change the protocol to minimize the JIT methods at startup. Now
26893 it Returns the internal codepage, if the value of "int_code_page"
26894 is 1 at entry, and we can not compute a suitable code page
26895 number, returns the code page as a string.
26897 2004-04-13 Jackson Harper <jackson@ximian.com>
26899 * culture-info-tables.h: Fix number of decimal digits for all
26902 2004-04-13 Jackson Harper <jackson@ximian.com>
26904 * icall.c: Clairfy out of sync error message. It is not always
26905 your corlib that is out of sync.
26907 2004-04-13 Zoltan Varga <vargaz@freemail.hu>
26909 * icall.c (ves_icall_Type_GetPropertiesByName): Avoid duplicate
26910 properties when only the set accessor is overriden. Fixes #55874.
26912 2004-04-09 Zoltan Varga <vargaz@freemail.hu>
26914 * assembly.c (mono_assembly_load_references): Make this thread safe.
26917 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
26919 * monosn.c: Add missing initialization calls.
26921 2004-04-08 Bernie Solomon <bernard@ugsolutions.com>
26924 ves_icall_System_Globalization_CultureInfo_construct_number_format
26925 Fix g_assert so it compiles on fussier compilers re int/ptr
26928 2004-04-08 Dick Porter <dick@ximian.com>
26931 * socket-io.c: Don't set SO_REUSEADDR on windows. Fixes bug
26932 53992. Also rearrange the code so that the internal calls return
26933 an error value and exceptions are thrown from managed code.
26935 * icall.c: Add type info to the socket icalls.
26937 2004-04-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
26939 * object.h: synchronize MonoCompareInfo with CompareInfo class. Someone
26942 2004-04-07 Martin Baulig <martin@ximian.com>
26944 * class.c (mono_class_from_generic_parameter): Don't default
26945 `klass->parent' to `mono_defaults.object_type'.
26947 2004-04-07 Martin Baulig <martin@ximian.com>
26949 * reflection.c (mono_reflection_initialize_generic_parameter): Set
26950 `param->pklass->reflection_info'.
26952 2004-04-07 Jackson Harper <jackson@ximian.com>
26954 * culture-info-tables.h: Fix date separator symbol.
26956 2004-04-07 Martin Baulig <martin@ximian.com>
26958 * icall.c (ves_icall_Type_GetGenericArguments): Moved this icall
26959 from System.Type to System.MonoType.
26961 2004-04-07 Martin Baulig <martin@ximian.com>
26964 (MonoReflectionGenericParam): Added `has_reference_type' and
26965 `has_value_type' fields.
26967 * reflection.c (mono_image_get_generic_param_info): Encode the
26968 correct flags if we have the `class' or `struct' constraint.
26970 2004-04-07 Martin Baulig <martin@ximian.com>
26973 (MonoReflectionGenericParam): Added `MonoBoolean has_ctor_constraint'.
26975 2004-04-07 Jackson Harper <jackson@ximian.com>
26977 * appdomain.c: Revert extra patches, just wanted to bump the
26980 2004-04-07 Jackson Harper <jackson@ximian.com>
26982 * Makefile.am: Add culture-info private headers.
26983 * icall.c: Add new icalls for contructing locales.
26984 * locales.c: Construct CultureInfo objects from lookup tables instead of using ICU.
26985 * locales.h: Declare new culture info construction methods.
26986 * object.h: Add new fields used to avoid the CultureMap to
26988 * culture-info.h: Definition of structs used in the culture info
26990 * culture-info-tables.h: Autogenerated tables that contain culture
26991 info data. This file was generated with the locale-builder tool.
26992 * appdomain.c: Incement corlib version number.
26994 2004-04-07 Bernie Solomon <bernard@ugsolutions.com>
26996 * appdomain.c: (mono_runtime_init) move mono_thread_init
26997 to before mono_object_new calls so critical sections
26998 are initialized before use.
27000 2004-04-07 Martin Baulig <martin@ximian.com>
27003 (ves_icall_TypeBuilder_define_generic_parameter): Removed.
27004 (ves_icall_MethodBuilder_define_generic_parameter): Removed.
27005 (ves_icall_MonoGenericParam_initialize): Removed.
27006 (monogenericparam_icalls): Removed.
27007 (generictypeparambuilder_icalls): Added new table for
27008 System.Reflection.Emit.GenericTypeParameterBuilder.
27011 (mono_reflection_define_generic_parameter): Removed.
27012 (mono_reflection_initialize_generic_parameter): This is now called
27013 from GenericTypeParameterBuilder's .ctor.
27015 2004-04-06 Martin Baulig <martin@ximian.com>
27017 * class.c (mono_class_init): Don't inflate nested classes in a
27019 (mono_type_get_name_recurse): Include the generic arguments for
27020 generic instances and generic type declarations.
27021 (inflate_generic_type): Correctly inflate MONO_TYPE_SZARRAY.
27022 (_mono_class_get_instantiation_name): Removed.
27023 (mono_class_create_generic): Always use `gklass->name' as our name.
27025 * class.h (MonoGenericInst): Removed `nested_in', and `nested'.
27027 * icall.c (ves_icall_MonoGenericInst_GetDeclaringType): Removed.
27028 (ves_icall_MonoGenericInst_GetNestedTypes): Removed.
27029 (ves_icall_MonoMethod_GetGenericParameters): Renamed to
27030 ves_icall_MonoMethod_GetGenericArguments() and correctly handle
27031 closed generic methods here.
27034 (mono_reflection_generic_inst_get_nested_types): Removed.
27035 (inflate_mono_method): Copy the generic parameters from the
27036 MonoMethodHeader into out MonoGenericMethod.
27038 2004-04-06 Martin Baulig <martin@ximian.com>
27041 (MONO_GENERICPARAM_DEPRECATED_CONSTRAINT): Removed.
27043 * metadata.c (GenericParamSchema): Removed "DeprecatedConstraint".
27045 * reflection.c (build_compressed_metadata): If we have any entries
27046 in the GenericParam, MethodSpec or GenericParamConstraint tables,
27047 set the header version to 1.1.
27049 2004-04-06 Martin Baulig <martin@ximian.com>
27051 * class.c (mono_class_init): If we're a generic instance,
27052 initialize our nested classes, too.
27053 (_mono_class_get_instantiation_name): Deal with the new `!%d'
27056 2004-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27058 * process.c: quote the argument passed to the shell on windows.
27060 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
27062 * threads.c (mono_alloc_special_static_data): Allow this to be
27063 called during startup.
27065 2004-04-02 Martin Baulig <martin@ximian.com>
27068 (ves_icall_MonoGenericInst_GetDeclaringType): New icall.
27070 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
27072 * icall.c: Fix build.
27074 2004-04-02 Sebastien Pouliot <sebastien@ximian.com>
27076 * Makefile.am: Added security.c|h.
27077 * icall.c: Added icall for get_UserName;
27078 * security.c: New file for security related icalls. Added function
27079 get_UserName for System.Environment (fix #56144).
27080 * security.h: New. Header file for security.c
27082 2004-04-02 Dick Porter <dick@ximian.com>
27084 * icall.c: Deleted the icalls that were obsoleted some time ago
27085 by the ICU string code, and which were mixed into the icall
27086 rearranging. Fixes bug 55969.
27089 * string-icalls.c: Deleted the code that those icalls reference.
27091 2004-04-01 Martin Baulig <martin@ximian.com>
27093 * metadata.h (MONO_CLASS_IS_INTERFACE): New macro.
27095 * class.c (mono_class_from_generic_parameter): Don't set
27096 TYPE_ATTRIBUTE_INTERFACE.
27097 (my_mono_class_from_generic_parameter): Likewise.
27099 2004-04-01 Martin Baulig <martin@ximian.com>
27101 * loader.c (find_method): Added an optional `MonoClass *ic'
27102 argument to search in a specific interface.
27103 (mono_get_method_constrained): New public function.
27105 2004-04-01 Martin Baulig <martin@ximian.com>
27107 * reflection.c (mono_image_get_generic_field_token): Use the
27108 `handleref' cache here.
27110 2004-04-01 Martin Baulig <martin@ximian.com>
27112 * reflection.h (MonoDynamicImage): Added `GHashTable *typespec'.
27114 * reflection.c (create_generic_typespec): Use the `typespec' hash
27115 here, not the `typeref' one.
27117 2004-04-01 Martin Baulig <martin@ximian.com>
27119 * class.c (mono_class_inflate_generic_type): Moved the
27120 functionality into a new static inflate_generic_type() which
27121 returns NULL if it didn't do anything. Only increment the
27122 `mono_stats.inflated_type_count' if we actually inflated
27124 (mono_class_get_full): Check the classes type to see whether we
27125 need to inflate it; also inflate MONO_TYPE_(M)VAR.
27127 2004-04-01 Jackson Harper <jackson@ximian.com>
27129 * reflection.c: Set culture for assembly references.
27131 2004-04-01 Ben Maurer <bmaurer@users.sourceforge.net>
27133 * reflection.[ch], icall.[ch], Fix support for pinning variables.
27135 2004-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27138 (do_mono_assembly_open): the critical section also covers
27139 mono_image_open and mono_image_open_from_data. Fixes bug #56327.
27141 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27144 (mono_manage_threads): abort the background threads when finishing.
27147 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27149 * gc.c: only close the done_event handle if there was no timeout.
27152 2004-03-30 Martin Baulig <martin@ximian.com>
27154 * icall.c (icall_entries): It's called "System.Activator", not
27155 "System.Activation".
27157 2004-03-30 Martin Baulig <martin@ximian.com>
27159 * class.c (mono_ldtoken): Added `MonoGenericContext *' argument.
27160 (mono_class_create_from_typespec): Likewise.
27162 2004-03-30 Martin Baulig <martin@ximian.com>
27164 * reflection.h (MonoReflectionGenericParam): Use MonoBoolean for
27165 `has_ctor_constraint' and `initialized'.
27167 2004-03-30 Martin Baulig <martin@ximian.com>
27169 * reflection.c (encode_new_constraint): New static function to add
27170 the constructor constraint attribute to a type parameter.
27171 (encode_constraints): Call encode_new_constraint() if necessary.
27174 (MonoReflectionGenericParam): Added `guint32 has_ctor_constraint'.
27176 * row-indexes.h: Added CUSTOM_ATTR_GENERICPAR.
27178 2004-03-29 Ben Maurer <bmaurer@users.sourceforge.net>
27180 * reflection.c, icall.c: add support for pinning variables.
27182 2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
27184 * marshal.c (mono_marshal_get_managed_wrapper):
27185 init bool local with zero rather than null.
27187 2004-03-29 Martin Baulig <martin@ximian.com>
27189 * icall.c (ves_icall_MonoMethod_get_HasGenericParameters): Show
27190 the "official" behavior here.
27191 (ves_icall_MonoMethod_get_Mono_IsInflatedMethod): New interncall.
27193 2004-03-29 Martin Baulig <martin@ximian.com>
27195 * icall.c: Reflect latest API changes.
27197 2004-03-29 Martin Baulig <martin@ximian.com>
27199 * loader.c (mono_get_method_from_token): Also call
27200 mono_metadata_load_generic_params () for abstract and interface
27201 methods; replace the type arguments in the method signature with
27202 the ones which are loaded from the metadata.
27204 2004-03-29 Lluis Sanchez Gual <lluis@ximian.com>
27206 * monitor.c: In mono_monitor_exit(), don't throw an exception if the owner
27207 of the lock is not the current thread. MS.NET don't do it, in spite of
27208 what the documentation says. See bug #56157.
27210 2004-03-28 Martin Baulig <martin@ximian.com>
27212 * class.c (mono_class_init): Don't call init_properties() and
27213 init_events() for generic instances; set `prop->parent' when
27214 inflating properties.
27216 * reflection.c (mono_generic_inst_get_object): Call
27217 `mono_class_init (ginst->klass)'.
27218 (mono_type_get_object): Only create a MonoGenericInst if your
27219 generic type is a TypeBuilder.
27220 (do_mono_reflection_bind_generic_parameters): Only set
27221 `ginst->is_dynamic' if our generic type is a TypeBuilder.
27223 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
27225 * appdomain.c (unload_thread_main): Do not clear proxy_vtable_hash.
27228 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27230 * icall.c: added Kill_internal icall.
27231 * process.[ch]: added Kill_internal icall.
27233 2004-03-25 Martin Baulig <martin@ximian.com>
27235 * class.h (MonoStats): Added `generic_instance_count',
27236 `inflated_method_count', `inflated_type_count' and
27237 `generics_metadata_size'.
27239 2004-03-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27241 * reflection.c: no warnings now.
27243 2004-03-25 Martin Baulig <martin@ximian.com>
27245 * class.c (mono_class_get_full): New public function; does a
27246 mono_class_get(), but also takes a `MonoGenericContext *'.
27248 * loader.c (mono_field_from_memberref): Renamed to
27249 `field_from_memberref', made static and added `MonoGenericContext *'
27251 (mono_field_from_token): Added `MonoGenericInst *' argument.
27252 (method_from_memberef): Likewise.
27253 (mono_get_method_from_token): Likewise.
27254 (mono_get_method_full): New public function; does a
27255 mono_get_method(), but also takes a `MonoGenericContext *'.
27257 * verify.c (mono_method_verify): Get the method's generic context
27258 and pass it to mono_field_from_token(), mono_get_method_full() and
27259 mono_class_get_full().
27261 2004-03-25 Martin Baulig <martin@ximian.com>
27263 * class.c (mono_class_inflate_generic_type): Take a
27264 `MonoGenericContext *' instead of a `MonoGenericInst *' and a
27265 `MonoGenericMethod *'.
27267 2004-03-25 Martin Baulig <martin@ximian.com>
27269 * loader.h (MonoMethodInflated): Store the MonoGenericContext
27270 instead of the MonoGenericMethod here.
27272 2004-03-25 Martin Baulig <martin@ximian.com>
27274 * class.h (MonoGenericInst): Added `MonoGenericContext *context';
27275 each time we create a new MonoGenericInst, we also create a new
27276 context which points back to us.
27278 * class.c (inflate_method): Use `ginst->context' instead of
27279 creating a new context.
27281 * loader.c (method_from_memberref): Use
27282 `klass->generic_inst->context' instead of creating a new context.
27284 2004-03-25 Martin Baulig <martin@ximian.com>
27286 * class.h (MonoGenericContext): New struct.
27287 (MonoGenericMethod): Removed `generic_inst'.
27289 * class.c (mono_class_inflate_generic_method): Take a
27290 `MonoGenericContext *' instead of a `MonoGenericMethod *'.
27292 2004-03-25 Martin Baulig <martin@ximian.com>
27294 * loader.h (MonoMethodInflated): New typedef.
27296 * metadata.h (MonoMethodSignature): Removed `gen_method', make
27297 `generic_param_count' consume just 30 bits, added `is_inflated'
27298 and `has_type_parameters' flags (one bit each).
27300 * class.c (mono_class_inflate_generic_method): Create a
27301 MonoMethodInflated instead of a MonoMethodNormal and set
27302 `is_inflated' in the method signature.
27304 * class.h (MonoGenericMethod): Removed `generic_method'.
27306 2004-03-25 Lluis Sanchez Gual <lluis@ximian.com>
27308 * image.c: Make sure the name of a MonoImage is always an absolute path.
27309 This fixes bug #54415.
27311 2004-03-24 Martin Baulig <martin@ximian.com>
27313 * class.c (mono_class_setup_vtable): If we're a generic instance,
27314 use our generic type's vtable size.
27316 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
27318 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Add
27319 MONO_NO_UNLOAD env var as a temporary workaround for unloading
27322 2004-03-23 Martin Baulig <martin@ximian.com>
27324 * class.h (MonoDynamicGenericInst): Added `int count_events' and
27325 `MonoEvent *events'.
27327 * icall.c (ves_icall_MonoGenericInst_GetEvents): New interncall.
27328 (typebuilder_icalls): Added "get_event_info"; calls
27329 mono_reflection_event_builder_get_event_info().
27331 * reflection.c (mono_reflection_generic_inst_initialize): Added
27332 `MonoArray *events'.
27333 (mono_reflection_event_builder_get_event_info): New function.
27335 2004-03-23 Bernie Solomon <bernard@ugsolutions.com>
27337 * object.h: add mono_type_initialization_init
27339 * object.c (mono_runtime_class_init):
27340 implement class constructor synchronization rules
27341 to cope with threading issues.
27342 add mono_type_initialization_init
27344 * appdomain.c (mono_runtime_init): call
27345 mono_type_initialization_init
27347 * class.h: removing initializing field from MonoVTable
27349 2004-03-23 Martin Baulig <martin@ximian.com>
27351 * class.c (my_mono_class_from_generic_parameter): Use
27352 `param->name' if it's not NULL.
27354 2004-03-22 Ben Maurer <bmaurer@users.sourceforge.net>
27356 * class.c: do not insert non-virtual methods in the vtable.
27357 * icall.c, mono-debug-debugger.c, object.c: if method->slot == -1,
27358 that means the method is non-virtual. This never would have
27361 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
27363 * profiler.c: Added lock for accessing coverage_hash.
27365 2004-03-22 Martin Baulig <martin@ximian.com>
27367 * icall.c (ves_icall_MethodInfo_get_IsGenericMethod): Use
27368 `method->method->signature->generic_param_count != 0' to make it
27369 work for interface methods.
27371 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27373 * process.c: quote the string passed to the shell using g_shell_quote.
27375 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27378 (mono_threads_manage): don't remove the finalizer thread and self
27379 from the threads hash table so that mono_thread_manage can be called
27382 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27384 * process.c: quote the arguments when UseShellExecute is true. Fixes
27387 2004-03-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27389 * threads.c: set mono_thread_detach as a cleanup routine for every
27390 thread. This way it's always executed upon thread termination, either
27391 aborted or finished normally. No more xsp hangs!
27393 2004-03-17 Martin Baulig <martin@ximian.com>
27395 * class.h (MonoGenericInst): Replaced the `GList *nested' with an
27396 `int count_nested' and a `MonoType **nested'.
27398 * reflection.c (mono_reflection_bind_generic_parameters): Moved
27399 most of the functionality into a new static
27400 do_mono_reflection_bind_generic_parameters() and don't take a
27401 `MonoType *nested_in' argument any more. Don't compute nested
27403 (mono_reflection_generic_inst_get_nested_types): New public method
27404 to get nested types.
27406 * class.c (mono_class_create_generic): Set `klass->nested_in' if
27407 we're a nested class.
27409 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): Call
27410 mono_reflection_generic_inst_get_nested_types() to compute the
27413 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
27415 * threads.c (ves_icall_System_Threading_Thread_Abort): Add a more
27416 descriptive error message under windows.
27418 2004-03-17 Martin Baulig <martin@ximian.com>
27420 * class.c (dup_type): Added `const MonoType *original' argument;
27421 copy the attrs from the original type.
27423 2004-03-17 Martin Baulig <martin@ximian.com>
27425 * metadata.c (do_mono_metadata_parse_generic_inst): Use the
27426 `m->generic_inst_cache' here.
27428 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
27430 * exception.h exception.c: Add stack_overflow_exception.
27432 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27435 (overlapped_callback): call SetEvent *after* invoking the callback.
27436 No need to call CloseHandle.
27438 2004-03-16 Martin Baulig <martin@ximian.com>
27440 * reflection.c (mono_image_get_fieldref_token): Take a
27441 `MonoReflectionField *' instead of a `MonoClassField *' and a
27442 `MonoClass *'; store the `MonoReflectionField *' in the hash.
27444 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27446 * appdomain.c: don't add the culture to the filename we're looking for
27447 if it's neutral or NULL. Fixes bug #53788. Removed redundant memset.
27449 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27451 * locales.c: don't ignore symbols when doing case insensitive compares.
27452 Thanks Dick! Fixes bug #54046.
27454 * threads.c: surround 'threads' usage with enter/leave in
27455 mono_thread_manage.
27457 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
27459 * marshal.c (mono_marshal_get_native_wrapper): Char arrays are
27460 implicitly marshalled as [Out]. Fixes #55450.
27462 (mono_marshal_get_runtime_invoke): Zero out the result if there is
27465 2004-03-16 Martin Baulig <martin@ximian.com>
27467 * class.c (mono_class_from_generic_parameter): Use the actual
27470 2004-03-16 Martin Baulig <martin@ximian.com>
27472 * reflection.c (type_get_signature_size): New static function.
27473 Compues the size of the type in a method signature.
27474 (method_get_signature_size): New static function; calls
27475 type_get_signature_size() to compute the actual size of the
27476 method's signature.
27477 (method_encode_signature): Use method_get_signature_size() to get
27478 the signature's size rather than using `nparams * 10'.
27480 2004-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27482 * file-io.h: define here WapiOverlapped on windows. I don't want the
27483 regular OVERLAPPED one.
27486 * threadpool.c: somehow, BindIoCompletionCallback is not found.
27487 Disabling AIO on windows.
27489 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27491 * marshal.c: Marshal.SizeOf throws an exception for AutoLayout. Fixes
27494 2004-03-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27496 * appdomain.c: upgraded corlib version.
27498 * file-io.c: implemented new icalls: GetSupportsAIO, BeginRead
27499 and BeginWrite. Allow opening files for asynchrnous operations.
27501 * file-io.h: new struct that maps FileStreamAsyncResult.
27502 * icall.c: added new icalls.
27503 * process.[ch]: support setting child process environment variables
27504 and use the SHELL or COMSPEC when UseShellExecute is true.
27506 * threadpool.[ch]: fixed warnings, moved ThreadPool icalls here. The
27507 callback for async. IO is here and also BindHandle.
27509 * threads.[ch]: added mono_thread_detach and removed ThreadPool icalls
27512 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
27514 * reflection.c (create_custom_attr): Allow len == 0.
27516 * object.c (mono_class_compute_gc_descriptor): Fix descriptor
27517 computation on big-endian machines.
27519 2004-03-13 Martin Baulig <martin@ximian.com>
27521 * class.h (MonoGenericInst): Added `int count_ifaces'.
27523 * iclass.c (ves_icall_MonoGenericInst_GetInterfaces): Use
27524 `ginst->count_ifaces' instead `klass->interface_count' since we
27525 may get called before the vtable is created.
27527 * loader.c (mono_method_get_param_names): If we're a generic
27528 instance, return and don't initialize the class.
27530 * reflection.c (mono_reflection_setup_generic_class): Don't call
27531 ensure_runtime_vtable().
27532 (mono_reflection_bind_generic_parameters): Set
27533 `ginst->count_ifaces'.
27535 2004-03-11 Jackson Harper <jackson@ximian.com>
27539 * unicode.h: Remove unused System.Char icalls.
27541 2004-03-11 Miguel de Icaza <miguel@ximian.com>
27543 * loader.c (mono_lookup_pinvoke_call): Call the Windows.Forms init
27544 code when we P/Invoke the first library in Windows.Forms, instead
27545 of when we first open the assembly.
27547 * assembly.c: Drop the lookup from here.
27549 2004-03-10 Martin Baulig <martin@ximian.com>
27551 * reflection.c (mono_reflection_get_custom_attrs): Use the correct
27552 class for properties, fields and events. Finally fixes #54945.
27554 2004-03-10 Martin Baulig <martin@ximian.com>
27556 * metadata.c (mono_metadata_class_equal): New static function;
27557 checks whether two generic instances or two generic parameters are
27559 (mono_metadata_type_equal): Use mono_metadata_class_equal() to
27562 2004-03-10 Martin Baulig <martin@ximian.com>
27564 * class.h (MonoGenericMethod): Added `gpointer reflection_info'.
27566 * reflection.c (inflate_mono_method): Added `MonoObject *obj'
27567 argument and write it into the `reflection_info' field.
27570 (ves_icall_MethodBase_GetGenericMethodDefinition): New interncall.
27571 (ves_icall_MethodBase_get_HasGenericParameters): New interncall.
27573 2004-03-09 Jackson Harper <jackson@ximian.com>
27575 * char-conversions.h: use 8 bits for numeric data its all we need
27576 * icall.c: numeric data is only 8 bits now.
27578 2004-03-09 Martin Baulig <martin@ximian.com>
27580 * class.h (MonoProperty, MonoEvent): Added `MonoClass *parent'.
27582 * class.c (init_properties, init_events): Initialize the new
27585 * reflection.c (typebuilder_setup_properties): Likewise.
27586 (typebuilder_setup_events): Likewise.
27588 * reflection.h (MonoEventInfo): Replaced `parent with
27589 `declaring_type' and `reflected_type'.
27591 * icall.c (ves_icall_get_property_info): Distinguish between
27592 declaring and reflected type.
27593 (ves_icall_get_event_info): Likewise.
27595 2004-03-09 Martin Baulig <martin@ximian.com>
27597 * icall.c (ves_icall_Type_GetTypeCode): Added MONO_TYPE_GENERICINST.
27598 (ves_icall_Type_GetField): Correctly set field->klass.
27600 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
27602 * loader.h: Fix warning.
27604 2004-03-08 Miguel de Icaza <miguel@ximian.com>
27606 * loader.c, loader.h (mono_loader_wine_init): Loads the Wine/Lib
27607 library routine if present. Notice that it will still continue
27608 executing even if its missing, for those working on the Gtk#
27609 edition of Windows.Forms.
27611 * assembly.c (do_mono_assembly_open): If loading the
27612 System.Windows.Forms call mono_loader_wini_init.
27614 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
27616 * class.h: Added MonoRemoteClass struct.
27617 * domain.c: Changed hash function for proxy_vtable_hash. It now uses a
27618 function for MonoStrings.
27619 * icall.c: In GetTransparentProxy, assign a MonoRemoteClass to the proxy.
27620 Added internal call for getting the proxy type.
27621 * marshal.c: Get the type of transparent proxies from its remote_class.
27622 Added methods that generate the IL for type checks and casts:
27623 mono_marshal_get_isinst, mono_marshal_get_castclass,
27624 mono_marshal_get_proxy_cancast.
27625 * marshal.h: Declaration of the previous new methods.
27626 * object.c: Added new moethods for creating and updating MonoRemoteClass
27627 instances: mono_remote_class, mono_upgrade_remote_class,
27628 * object.h: Added MonoRemoteClass reference in MonoTransparentProxy.
27629 * verify.c: FIx transparent_proxy_fields layout.
27630 * appdomain.c: Bump corlib version.
27632 2004-03-04 Jackson Harper <jackson@ximian.com>
27634 * icall.c: Add icall to access char conversion tables.
27635 * char-conversions.h: Character conversion tables.
27636 * Makefile.am: Add char-conversions.h private header file.
27638 2004-03-04 Zoltan Varga <vargaz@freemail.hu>
27640 * appdomain.c (unload_thread_main): Increase unloading timeout to
27641 10 sec as a temporary workaround for Nant problems.
27643 2004-02-29 Zoltan Varga <vargaz@freemail.hu>
27645 * gc.c: Add checks for GC_enable and GC_disable.
27647 * string-icalls.c locales.c: Applied patch from Jaroslaw Kowalski
27648 (jaak@zd.com.pl). Fix memory corruption in String.Replace
27651 2004-02-27 Martin Baulig <martin@ximian.com>
27653 * reflection.c (mono_reflection_bind_generic_parameters): Take a
27654 `MonoReflectionType *' instead of a `MonoType *'.
27656 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
27658 * gc.c (run_finalize): Avoid finalizing the object representing the
27660 (finalizer_thread): Fix warning.
27662 2004-02-25 Martin Baulig <martin@ximian.com>
27664 * class.c (_mono_class_get_instantiation_name): Added `int offset'
27665 argument for nested types.
27666 (mono_class_create_generic): Added support for nested generictypes.
27668 * class.h (MonoGenericInst): Added `MonoType *nested_in' and
27671 * icall.c (ves_icall_MonoGenericInst_GetNestedTypes): New icall.
27673 * reflection.c (method_encode_signature): Increase the minimum
27674 value of `size' from 10 to 11.
27675 (mono_reflection_bind_generic_parameters): Take `int type_argc'
27676 and `MonoType **types' arguments instead of the `MonoArray
27677 *types'; added `MonoType *nested_in'. Recursively instantiate
27680 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
27682 * appdomain.h (MonoDomain): Add preallocated null_reference_ex and
27683 stack_overflow_ex members which are used by exception handling.
27685 * appdomain.c (mono_runtime_init): Initialize the new members.
27687 * gc.c (mono_gc_enable): New helper function.
27688 * gc.c (mono_gc_disable): New helper function.
27690 2004-02-23 Martin Baulig <martin@ximian.com>
27692 * icall.c: I must have been really stupid - make it actually work
27695 2004-02-23 Martin Baulig <martin@ximian.com>
27697 * loader.c (method_from_memberref): Only inflate the method if
27698 it's in another klass.
27700 2004-02-23 Martin Baulig <martin@ximian.com>
27702 * class.c (mono_class_inflate_generic_type): Fixed two bugs.
27703 (mono_class_init): If we're a generic instance and an interface,
27704 compute `class->interface_id'; also create `class->interfaces'
27705 here and inflate them.
27707 * metadata.c (do_mono_metadata_parse_generic_inst): Compute
27709 (mono_type_stack_size): Fix for MONO_TYPE_GENERICINST.
27711 * reflection.c (mono_image_create_token): Allow "MonoGenericInst".
27713 2004-02-15 Miguel de Icaza <miguel@ximian.com>
27715 * reflection.c (method_encode_code): Improved the error message
27716 generated by the exception.
27718 2004-02-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27720 * icall.c: Martin did not do what he said in the ChangeLog for
27721 2004-02-18, but put back the changes for properties and events.
27722 Commenting those changes out again and adding comment to bug #54518.
27724 * process.c: removed warning.
27726 2004-02-20 Zoltan Varga <vargaz@freemail.hu>
27728 * marshal.c (emit_struct_conv): Print an error message instead of
27729 asserting when a type does not have the StructLayout attribute.
27731 2004-02-20 Martin Baulig <martin@ximian.com>
27733 * reflection.c (mono_type_get_object): Also use the cache for
27735 (mono_reflection_bind_generic_parameters): Always compute
27738 2004-02-20 Martin Baulig <martin@ximian.com>
27740 * class.h (MonoGenericMethod): Removed `klass'.
27742 * class.c (mono_class_inflate_generic_method): Added `MonoClass
27745 2004-02-20 Martin Baulig <martin@ximian.com>
27747 * reflection.c (method_encode_methodspec): Actually use the
27748 uninflated signature for the memberref.
27750 2004-02-20 Martin Baulig <martin@ximian.com>
27752 * class.h (MonoGenericMethod): Removed `declaring'.
27754 * class.c (mono_class_inflate_generic_method): If `gmethod->klass'
27755 is NULL, compute it here.
27757 2004-02-20 Martin Baulig <martin@ximian.com>
27759 * image.h (MonoImage): Added `GHashTable *generic_inst_cache'.
27761 * metadata.c (mono_metadata_generic_inst_hash): New method.
27762 (mono_metadata_generic_inst_equal): New method.
27764 * reflection.c (mono_reflection_bind_generic_parameters): Use the
27765 `klass->image->generic_inst_cache' cache to avoid creating
27766 duplicate MonoGenericInst's.
27768 * class.c (mono_class_inflate_generic_type): Use the cache.
27770 Thu Feb 19 19:39:09 CET 2004 Paolo Molaro <lupus@ximian.com>
27772 * object.c: fixed gc descriptor calculation for embedded valuetypes.
27774 2004-02-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27776 * icall.c: added Socket.WSAIoctl icall.
27778 * socket-io.[ch]: implemented
27779 ves_icall_System_Net_Sockets_Socket_WSAIoctl.
27781 2004-02-19 Atsushi Enomoto <atsushi@ximian.com>
27783 * icall.c: removed IsDigit, IsSeparator, IsWhiteSpace from char_icalls.
27785 2004-02-18 Urs C Muff <umuff@quark.com>
27787 * debug-mono-symfile.c, mono-debug-debugger.c, mono-debug.c: Make
27788 this work on PPC and other big-endian architectures.
27790 * debug-mono-symfile.h: Prepended the names of all the `guint32'
27791 fields with an underscore to make sure they're only accessed by
27792 the read32() macro.
27794 2004-02-18 Martin Baulig <martin@ximian.com>
27796 * icall.c: Put the klass->refclass changes back for methods and
27797 fields, but not for properties and events. We're currently not
27798 distinguishing between DeclaringType and ReflectedType for
27799 properties and events, that's what caused the regressions.
27801 2004-02-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27804 (mono_async_result_new): the handle can be NULL.
27806 * threadpool.c: Use an event instead of a semaphore, don't initialize
27807 it until needed. This saves quite a few semaphores from being created
27808 when using the threadpool.
27810 2004-02-18 Zoltan Varga <vargaz@freemail.hu>
27812 * object.c (mono_string_is_interned_lookup): Fix interning of long
27813 strings. Fixes #54473.
27815 * domain.c (ldstr_equal): Optimize if the two strings are equal.
27817 * icall.c: Revert the klass->refclass changes since they introduce
27818 regressions (bug #54518).
27820 2004-02-18 Martin Baulig <martin@ximian.com>
27822 * class.c (mono_class_init): If we're a generic instance and don't
27823 come from a TypeBuilder, inflate our members here.
27824 (mono_class_from_generic): Removed; just use `ginst->klass' instead.
27825 (mono_class_create_generic): New public method.
27826 (mono_class_initialize_generic): Removed.
27827 (get_instantiation_name): Renamed to
27828 _mono_class_get_instantiation_name() and made it public.
27830 2004-02-18 Martin Baulig <martin@ximian.com>
27832 * class.c (mono_class_inflate_generic_type): Clear the new
27833 instance's `nginst->klass' when inflating a generic instance.
27834 (mono_class_is_subclass_of): Added (basic) support for generic
27837 Tue Feb 17 21:40:16 CET 2004 Paolo Molaro <lupus@ximian.com>
27839 * appdomain.h, domain.c: use a MonoCodeManager instead of a
27840 MonoMempool to hold compiled native code.
27842 2004-02-17 Martin Baulig <martin@ximian.com>
27844 * class.h (MonoDynamicGenericInst): Added `count_properties' and
27847 * reflection.c (mono_reflection_generic_inst_initialize): Added
27848 `MonoArray *properties' argument.
27850 * icall.c (ves_icall_MonoGenericInst_GetProperties): New interncall.
27852 2004-02-17 Martin Baulig <martin@ximian.com>
27854 * icall.c (ves_icall_Type_GetFields): Renamed to
27855 ves_icall_Type_GetFields_internal() and added a
27856 `MonoReflectionType *rtype' argument; pass it to
27857 mono_field_get_object() to set the field's "reflected" type.
27858 (ves_icall_Type_GetConstructors): Likewise.
27859 (ves_icall_Type_GetEvents): Likewise.
27860 (ves_icall_Type_GetMethodsByName): Added `MonoReflectionType *rtype'
27861 argument; pass it to mono_method_get_object() to set the method's
27864 2004-02-17 Martin Baulig <martin@ximian.com>
27866 * class.h (MonoDynamicGenericInst): New type.
27867 (MonoGenericInst): Added `dynamic_info' and `is_dynamic' fields.
27869 * icall.c (ves_icall_MonoGenericInst_GetMethods): New interncall.
27870 (ves_icall_MonoGenericInst_GetConstructors): New interncall.
27871 (ves_icall_MonoGenericInst_GetFields): New interncall.
27873 * class.c (mono_class_from_generic): Don't call
27874 mono_class_initialize_generic() if this is a dynamic instance;
27875 ie. it's being created from a TypeBuilder.
27876 Use MONO_TYPE_GENERICINST for `class->this_arg.type' and
27877 `class->byval_arg.type'.
27879 * reflection.c (mono_reflection_inflate_method_or_ctor): Renamed
27880 to `inflate_method' and made static.
27881 (mono_reflection_inflate_field): Removed.
27882 (mono_reflection_generic_inst_initialize): New public method.
27884 * reflection.h (MonoReflectionGenericInst): Removed `methods',
27885 `ctors' and `fields'; added `initialized'.
27887 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
27889 * debug-helpers.c (mono_method_full_name): Fix output for empty
27892 2004-02-12 Martin Baulig <martin@ximian.com>
27894 * class.h (MonoClassField): Added `MonoType *generic_type'.
27896 * reflection.c (mono_image_get_fieldref_token): Added support for
27897 instantiated generic types.
27898 (field_encode_inflated_field): Removed.
27899 (mono_image_get_inflated_field_token): Removed.
27900 (mono_reflection_inflate_field): Return a `MonoReflectionField *'.
27902 * reflection.h (MonoReflectionInflatedField): Removed.
27904 2004-02-12 Martin Baulig <martin@ximian.com>
27906 * metadata.h (MonoMethodHeader, MonoMethodSignature): Moved the
27907 `gen_method' field from MonoMethodHeader to MonoMethodSignature.
27909 * reflection.c (mono_image_get_methodspec_token): Take a
27910 `MonoMethod *' instead of a `MonoReflectionInflatedMethod *'.
27911 (mono_image_create_token): Check whether we have a
27912 `method->signature->gen_method' and call
27913 mono_image_get_methodspec_token() if appropriate.
27914 (inflated_method_get_object): Removed.
27915 (mono_reflection_bind_generic_method_parameters): Return a
27916 `MonoReflectionMethod *', not a `MonoReflectionInflatedMethod *'.
27917 (mono_reflection_inflate_method_or_ctor): Likewise.
27919 * reflection.h (MonoReflectionInflatedMethod): Removed.
27921 2004-02-12 Zoltan Varga <vargaz@freemail.hu>
27923 * marshal.c (mono_marshal_get_native_wrapper): Implement proper support
27924 for custom valuetype marshalling.
27926 * icall.c (icall_entries): Diagnostic -> Diagnostics. Fixes #54261.
27928 2004-02-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
27930 * icall.c: fixed WSAGetLastError_internal name.
27932 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
27934 * threads.c (mono_thread_attach): Allow this to be called multiple
27935 times for a thread.
27937 * threads.c (build_wait_tids): Do not wait for ourselves.
27939 * threads.c (mono_thread_pop_appdomain_ref): Avoid crash if the
27940 appdomain list is empty.
27942 * marshal.c (mono_marshal_get_native_wrapper): Do not free the
27943 memory returned by mono_string_builder_to_utf16, since it points into
27944 managed memory. Thanks to Bernie Solomon for noticing this.
27946 * icall.c: Add AppDomainSetup icalls.
27948 * reflection.h (MonoReflectionMethodAux): Add 'param_cattr' field.
27950 * reflection.c (mono_custom_attrs_from_param): Add support for dynamic
27953 * reflection.c (reflection_methodbuilder_to_mono_method): Save
27954 custom attributes to the method_aux struct. Also fix array indexes etc.
27956 * loader.c (mono_method_get_param_names): Make dynamic case work again.
27958 Tue Feb 10 17:03:04 CET 2004 Paolo Molaro <lupus@ximian.com>
27960 * icall.c, loader.c: icall cleanup: we save quite a bit of memory
27961 (both static and runtime) and reduce startup time.
27963 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
27965 * marshal.c (mono_marshal_get_native_wrapper): Throw an exception on
27966 AsAny marshalling conversion instead of crashing.
27968 * marshal.c: Fix warnings.
27970 2004-02-09 Martin Baulig <martin@ximian.com>
27972 * class.h (MonoGenericMethod): Added `MonoMethod *declaring'.
27974 * reflection.h (MonoReflectionInflatedMethod): Removed the
27975 `declaring' field, it's now in the unmanaged MonoGenericMethod.
27977 * reflection.c (method_encode_methodspec): Removed the `method'
27978 argument; we get it from `gmethod->declaring'.
27979 (inflated_method_get_object): Removed the `declaring' argument.
27981 2004-02-09 Martin Baulig <martin@ximian.com>
27983 * class.h (MonoGenericMethod): New type.
27984 (MonoGenericInst): Remove `mtype_argc', `mtype_argv' and
27987 * metadata.h (MonoMethodHeader): Replaced the `geninst' field with
27988 a `MonoGenericMethod *gen_method' one.
27990 * class.c (mono_class_inflate_generic_type): Take an additional
27991 `MonoGenericMethod * argument. This is only non-NULL if we're
27992 inflating types for a generic method.
27993 (mono_class_inflate_generic_signature): Renamed to
27994 inflate_generic_signature() and made static; take a
27995 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
27996 (inflate_generic_header): Take a `MonoGenericMethod *' argument
27997 instead of a `MonoGenericInst *' one.
27998 (mono_class_inflate_generic_method): Likewise.
28000 * reflection.c (encode_generic_method_sig): Take a
28001 `MonoGenericMethod *' argument instead of a `MonoGenericInst *'.
28002 (method_encode_methodspec): Likewise.
28003 (inflated_method_get_object): Likewise.
28005 * reflection.h (MonoReflectionGenericInst): Replaced the `ginst'
28006 field with a `MonoGenericMethod *gmethod' one.
28008 2004-02-08 Bernie Solomon <bernard@ugsolutions.com>
28010 * class.h (mono_class_has_parent): add parens to expansion
28013 2004-02-08 Martin Baulig <martin@ximian.com>
28015 * image.h (MonoImage): Removed `generics_cache'.
28017 * class.c (mono_class_from_generic): Take a `MonoGenericInst *'
28018 instead of a `MonoType *' argument; removed the `inflate_methods'
28019 argument. Don't inflate methods here.
28021 * loader.c (find_method): If it's a generic instance, call
28022 mono_class_init() on the `sclass->generic_inst->generic_type'.
28024 * metadata.c (mono_type_size): Make this work on uninitialized
28025 generic instances; call it on the `ginst->generic_type's class.
28027 * reflection.c (mono_reflection_bind_generic_parameters): Call
28028 mono_class_from_generic() to create the `ginst->klass'.
28030 2004-02-08 Martin Baulig <martin@ximian.com>
28032 * class.h (MonoClass): Changed type of `generic_inst' from
28033 `MonoType *' to `MonoGenericInst *'.
28035 2004-02-08 Martin Baulig <martin@ximian.com>
28037 * icall.c (ves_icall_Type_BindGenericParameters): Just call
28038 mono_type_get_object(), this is now creating a `MonoGenericInst'
28039 for MONO_TYPE_GENERICINST.
28040 (ves_icall_MonoGenericInst_GetParentType): Likewise.
28041 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
28043 * reflection.c (mono_type_get_object): Return a `MonoGenericInst'
28044 instead instead of a `MonoType' for MONO_TYPE_GENERICINST.
28045 (inflated_method_get_object): Added `MonoClass *refclass' argument.
28046 (mono_reflection_inflate_method_or_ctor): Correctly set declaring
28047 and reflected type.
28049 * reflection.h (MonoReflectionInflatedMethod): Removed
28050 `declaring_type' and `reflected_type'.
28052 2004-02-08 Martin Baulig <martin@ximian.com>
28054 * class.h (MonoGenericInst): Added `MonoType *parent' and
28055 `MonoType **ifaces'.
28057 * reflection.h (MonoReflectionGenericInst): Removed `klass',
28058 `parent' and `interfaces'.
28060 * reflection.c (mono_reflection_bind_generic_parameters): Take a
28061 `MonoType *' argument and return a `MonoType *'.
28064 (ves_icall_MonoGenericInst_GetParentType): New interncall.
28065 (ves_icall_MonoGenericInst_GetInterfaces): Likewise.
28067 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
28069 * marshal.c (mono_marshal_get_native_wrapper): Add support for custom
28070 valuetype marshalling.
28072 2004-02-06 Martin Baulig <martin@ximian.com>
28075 (mono_class_from_generic_parameter): Added TYPE_ATTRIBUTE_PUBLIC.
28076 (my_mono_class_from_generic_parameter): Likewise.
28078 2004-02-06 Zoltan Varga <vargaz@freemail.hu>
28080 * debug-mono-symfile.c debug-mono-symfile.h mono-debug.c: Read the
28081 contents of the symbol files lazily.
28083 * object.h (MonoThread): Add 'name' and 'name_len' fields.
28085 * threads.h threads.c icall.c: New icalls for getting and setting the
28088 2004-02-05 Zoltan Varga <vargaz@freemail.hu>
28090 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRefByID):
28091 Raise an exception when the domain is not found.
28093 2004-02-03 Martin Baulig <martin@ximian.com>
28095 * reflection.c (mono_image_get_methodspec_token): Use the
28096 uninflated signature; fixes gen-33.
28098 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
28100 * gc.c threads.c: Make the finalizer thread a normal managed thread so
28101 the finalizer code can use thread functionality.
28103 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Fix check for
28104 the finalizer thread.
28106 * threads.c: Make some functions more robust.
28108 * loader.c (mono_lookup_pinvoke_call): Another attempt at fixing #22532.
28110 * metadata.h: Add new marshalling conventions.
28112 * marshal.c (mono_marshal_get_native_wrapper): Add support for unicode
28113 stringbuilder marshalling. Fixes #53700.
28115 * reflection.h (MonoReflectionTypeBuilder): Add 'permissions' field.
28117 * reflection.c (mono_image_get_type_info): Save declarative security
28120 * reflection.c (mono_image_get_field_info): Handle uninitialized
28121 unmanaged fields as well.
28123 * appdomain.c: Bump corlib version.
28125 2004-02-01 Martin Baulig <martin@ximian.com>
28127 * loader.c (method_from_methodspec): Use `ginst->mtype_argc/v' for
28128 method type arguments.
28130 2004-01-30 Duncan Mak <duncan@ximian.com>
28132 * marshal.h: Add prototype for
28133 "ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem"
28135 "ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem" to
28138 2004-01-30 Zoltan Varga <vargaz@freemail.hu>
28140 * marshal.c (ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMem): New icall.
28141 (ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem): New icall.
28143 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
28145 * marshal.c (mono_marshal_get_native_wrapper): Add support for
28146 custom marshalling of valuetypes.
28148 * marshal.c: Fix some warnings.
28150 2004-01-29 Martin Baulig <martin@ximian.com>
28152 * class.h (MonoGenericInst): Added `mtype_argc' and `mtype_argv'
28153 for generic method parameters.
28155 * reflection.c (method_encode_methodspec): Write the uninflated
28156 signature into the methodspec table.
28157 (mono_reflection_inflate_method_or_ctor): Ensure `res->declaring'
28158 is always the uninflated method.
28159 (reflection_methodbuilder_to_mono_method): Copy the generic
28160 parameters from the MethodBuilder into `header->gen_params'.
28162 2004-01-29 Zoltan Varga <vargaz@freemail.hu>
28164 * class.c (mono_class_from_generic_parameter): Fix warning.
28166 2004-01-27 Martin Baulig <martin@ximian.com>
28168 * class.c (mono_class_from_generic_parameter): Don't create
28169 `klass->methods' here.
28171 2004-01-26 Zoltan Varga <vargaz@freemail.hu>
28173 * loader.c (mono_lookup_pinvoke_call): Disable trimming of .dll
28174 extension since it does not work with libraries named lib<FOO>.dll.so.
28176 2004-01-25 Martin Baulig <martin@ximian.com>
28178 * class.c (mono_class_inflate_generic_type): Added support for
28179 MONO_TYPE_GENERICINST.
28181 * reflection.c (mono_reflection_inflate_method_or_ctor): Also
28182 inflate methods on open constructed types.
28184 2004-01-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28186 * object.c: fire ProcessExit event in the root AppDomain after running
28187 Main. Fixes bug #53299.
28189 Fri Jan 23 21:27:40 CET 2004 Paolo Molaro <lupus@ximian.com>
28191 * socket-io.c: include the new socket-wrappers.h header.
28192 Use the wrappers instead of the unix socket functions to make the code
28195 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
28197 * profiler.c (merge_methods): Fix merging of profile info. Fixes #53010.
28199 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
28202 2004-01-22 Zoltan Varga <vargaz@freemail.hu>
28204 * reflection.c (mono_image_create_pefile): Handle the case when the
28205 entry point is not a MethodBuilder.
28207 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
28208 field to ReflectionMethod since it is not allways a builder.
28210 * reflection.c (type_get_fully_qualified_name): New helper function to
28211 return the fully qualified name of a type.
28213 * reflection.c (encode_marshal_blob): Always emit the fully qualified
28214 type name for custom marshallers.
28216 * reflection.c (mono_marshal_spec_from_builder): Ditto.
28218 * class.c (mono_class_setup_vtable): If a parent class already
28219 implements an interface, use the implementing methods from that class.
28222 2004-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28224 * threadpool.c: just return instead of ExitThread to allow for thread
28227 2004-01-21 Zoltan Varga <vargaz@freemail.hu>
28229 * icall.c (ves_icall_System_Reflection_Module_Close): Prevent assertion
28230 when closing resource modules.
28232 * reflection.c (mono_image_create_pefile): Handle the case when the
28233 entry point is not a MethodBuilder.
28235 * reflection.h (MonoReflectionAssemblyBuilder): Change 'entry_point'
28236 field to ReflectionMethod since it is not allways a builder.
28238 2004-01-20 Bernie Solomon <bernard@ugsolutions.com>
28240 * marshal.c (mono_marshal_get_managed_wrapper):
28241 mono_marshal_alloc takes native int so CONV_I
28242 the arg for 64bits.
28244 2004-01-20 Zoltan Varga <vargaz@freemail.hu>
28246 * reflection.c (fixup_cattrs): New function to fixup the methoddef
28247 tokens in the cattr table. Fixes #53108.
28249 2004-01-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28251 * loader.c: don't trim ".dll" before looking up in the config file.
28252 Don't leak orig_scope. Reopened bug #22532 in the meanwhile.
28254 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
28256 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
28257 Return the module which contains the resource as well.
28258 (ves_icall_System_Reflection_Module_Close): New icall.
28260 * appdomain.c: Bump corlib version number.
28262 * image.c (mono_image_addref): New public function.
28264 * assembly.c: Call mono_image_addref.
28266 * reflection.c (mono_module_get_object): Increase reference count of
28269 * loader.c (mono_lookup_pinvoke_call): Strip .dll from library names.
28272 * exception.h exception.c loader.h loader.c icall.c marshal.h marshal.c:
28273 Applied patch from Bernie Solomon <bernard@ugsolutions.com>. Throw
28274 proper exceptions on DllImport problems.
28276 Mon Jan 19 17:50:27 CET 2004 Paolo Molaro <lupus@ximian.com>
28278 * class.c, metadata.c: eliminate CSIZE macro.
28280 2004-01-19 Lluis Sanchez Gual <lluis@ximian.com>
28282 * icall.c: Added ves_icall_type_IsInstanceOf internal call.
28283 * object.h: Added async_callback field in MonoAsyncResult.
28284 * marshal.c: In mono_delegate_begin_invoke, set the value of async_callback.
28285 * verify.c: Added async_callback in MonoAsyncResult layout.
28287 2004-01-17 Zoltan Varga <vargaz@freemail.hu>
28289 * reflection.c (mono_reflection_get_custom_attrs): Add support
28292 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
28294 * marshal.c (mono_string_builder_to_utf8): Fix stringbuilder
28296 (mono_marshal_method_from_wrapper): Add null pointer check.
28298 2004-01-16 Martin Baulig <martin@ximian.com>
28300 * debug-mono-symfile.h: Set version number to 36 and reflect
28301 latest symbol writer changes.
28303 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
28305 * class.c (mono_bounded_array_class_get): Set 'bounded' to FALSE for
28306 multi-dimensional arrays.
28307 (mono_class_is_assignable_from): Check vectors<->one dim. arrays.
28308 (mono_class_from_mono_type): Use bounded_array_class_get.
28310 * class.c (mono_bounded_array_class_get): New function which takes
28311 a 'bounded' bool argument to distinguish vectors from one dimensional
28314 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Call
28315 bounded_array_class_get if the array has bounds.
28317 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
28318 Search modules loaded using AssemblyBuilder:AddModule as well.
28320 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28322 * appdomain.c: increased corlib version.
28323 * filewatcher.c: removed g_print.
28325 (get_property_info): only allocate what is actually requested.
28326 (ves_icall_Type_GetInterfaces): free the bitset in case of early error.
28328 2004-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28330 * Makefile.am: added filewatcher.[ch]
28331 * filewatcher.[ch]: FileSystemWatcher runtime support.
28332 * icall.c: added new FSW icalls.
28334 Tue Jan 13 20:03:17 CET 2004 Paolo Molaro <lupus@ximian.com>
28336 * string-icalls.c: fix stringbuilder regression as suggested by
28337 Iain McCoy <iain@mccoy.id.au>.
28339 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
28341 * process.c (process_read_stringtable_block): Recognize '007f' as
28342 a language neutral stringtable block.
28344 2004-01-12 Patrik Torstensson
28346 * object.h (MonoStringBuilder) : Changed layout to support our
28347 new stringbuilder class.
28348 * marshal.c: Change marshalling to support the new layout of
28350 * appdomain.c: increased version number because new layout of
28353 2004-01-12 Zoltan Varga <vargaz@freemail.hu>
28355 * appdomain.c (ves_icall_System_AppDomain_LoadAssembly): Receive the
28356 assembly name as an string instead of an AssemblyName, since it is
28357 easier to extract info from it.
28359 * appdomain.c (mono_domain_assembly_preload): Look for assemblies in
28360 the culture subdirectories too. Fixes #52231.
28362 2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28364 * icall.c: renamed ves_icall_Type_GetMethods to GetMethodsByName.
28365 It takes 2 new parameters with an optional name for the method to look
28366 for and case ignoring info.
28368 * threadpool.c: removed unused variable.
28370 2004-01-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28372 * icall.c: renamed ves_icall_Type_GetProperties to GetPropertiesByName.
28373 It takes 2 new parameters with an optional name for the property to look
28374 for and case ignoring info.
28377 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
28379 * reflection.c: Applied patch from Benjamin Jemlich (pcgod@gmx.net).
28382 2004-01-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28385 * assembly.c: escape the uri before passing it to g_filename_from_uri.
28388 2004-01-07 Zoltan Varga <vargaz@freemail.hu>
28390 * reflection.c: Add support for more than one unmanaged resource.
28392 * icall.c (ves_icall_get_enum_info): Store the value of the enum fields
28393 in field->def_value, as done in all other cases.
28395 * reflection.c (mono_reflection_get_custom_attrs): Add support for
28398 * reflection.c (mono_reflection_create_runtime_class): Remove
28399 errorneous assignment to klass->element_class, since it is already
28400 done in mono_reflection_setup_internal_class.
28402 2004-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28404 * gc.c: added missing LeaveCriticalSection.
28405 * icall.c: indented a couple of lines.
28406 * threadpool.c: remove dangling LeaveCriticalSection. Don't wait forever
28407 if we call EndInvoke inside a callback. Fixes bug #52601.
28409 2004-01-07 Martin Baulig <martin@ximian.com>
28411 * mono-debug-debugger.h
28412 (MonoDebuggerIOLayer): Added `GetCurrentThreadID'.
28414 2004-01-06 Miguel de Icaza <miguel@ximian.com>
28416 * appdomain.c: Use messages in NotImplementedException.
28418 * exception.c (mono_get_exception_not_implemented): Now this takes
28419 a message argument.
28421 * marshal.c (emit_str_to_ptr_conv): g_warning and throw an
28422 exception instead of g_asserting an aborting when something is not
28425 Add some inline docs.
28427 2004-01-05 Zoltan Varga <vargaz@freemail.hu>
28429 * reflection.h: Update after changes to object layout.
28431 * reflection.c: Implement saving of unmanaged aka win32 resources.
28433 * appdomain.c: Bump version number.
28435 * appdomain.c (ves_icall_System_AppDomain_InternalSetDomainByID):
28436 Handle missing domains gracefully.
28438 2004-01-05 Atsushi Enomoto <atsushi@ximian.com>
28440 * file-io.c : On Windows, there are much more invalid_path_chars.
28442 Fri Jan 2 13:35:48 CET 2004 Paolo Molaro <lupus@ximian.com>
28444 * class.h, object.c: prepare for GetType () speedup.
28446 2003-12-24 Atsushi Enomoto <atsushi@ximian.com>
28448 * profiler.c: workaround for --profile null reference exception on
28449 cygwin. Patch by Patrik Torstensson.
28451 2003-12-22 Bernie Solomon <bernard@ugsolutions.com>
28453 * marshal.c: (ves_icall_System_Runtime_InteropServices_Marshal_Read/WriteXXX)
28454 make work for unaligned access.
28456 Mon Dec 22 18:37:02 CET 2003 Paolo Molaro <lupus@ximian.com>
28458 * class.c: small cleanup (class->fields [i] -> field).
28459 * image.c: check address of metadata is valid.
28461 2003-12-22 Zoltan Varga <vargaz@freemail.hu>
28463 * assembly.h assembly.c (mono_assembly_loaded): New public function to
28464 search the list of loaded assemblies.
28466 * reflection.c (mono_reflection_type_from_name): Use
28467 mono_assembly_loaded instead of mono_image_loaded.
28469 * reflection.c: Fix warnings.
28471 2003-12-20 Zoltan Varga <vargaz@freemail.hu>
28473 * image.h (MonoImage): Add a new 'dynamic' field to denote that the image
28474 is dynamic. This is needed since an assembly can contain both dynamic and
28475 non-dynamic images.
28477 * class.c loader.c metadata.c object.c: Use image->dynamic instead of
28480 * icall.c reflection.c: Add new AssemblyBuilder:AddModule icall.
28482 * reflection.h (MonoReflectionAssemblyBuilder): Add 'loaded_modules' field
28483 to store modules loaded using AddModule.
28485 * reflection.c (mono_image_fill_file_table): Generalize this so it works
28488 * reflection.c (mono_image_fill_export_table_from_class): New helper function.
28490 * reflection.c (mono_image_fill_export_table_from_module): New function to
28491 fill out the EXPORTEDTYPES table from a module.
28493 * reflection.c (mono_image_emit_manifest): Refactor manifest creation code
28494 into a separate function. Also handle loaded non-dynamic modules.
28496 * reflection.c (mono_image_basic_init): Fix memory allocation.
28498 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
28500 * assembly.c (mono_assembly_load_references): Make this public.
28502 2003-12-19 Martin Baulig <martin@ximian.com>
28504 * class.c (mono_class_initialize_generic): Made this static, take
28505 a `MonoGenericInst *' instead of a `MonoClass *'.
28506 (mono_class_from_generic): Call mono_class_initialize_generic()
28507 unless we're already initialized or being called from
28508 do_mono_metadata_parse_generic_inst().
28510 * class.h (MonoGenericInst): Added `initialized' and
28511 `init_pending' flags.
28513 * metadata.c (do_mono_metadata_parse_generic_inst): Don't call
28514 `mono_class_init (gklass)' or mono_class_initialize_generic()
28515 here; set `generic_inst->init_pending' while parsing the
28518 2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
28520 * locales.c: include string.h for memxxx prototypes
28522 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
28524 * icall.c (ves_icall_MonoField_GetValueInternal): Do not run the class
28525 constructor when accessing literal fields.
28527 2003-12-17 Zoltan Varga <vargaz@freemail.hu>
28529 * appdomain.c (MONO_CORLIB_VERSION): Bump corlib version.
28531 * reflection.c (assembly_add_resource_manifest): New function to fill
28532 the MANIFESTRESOURCE table.
28534 * reflection.c (mono_image_build_metadata): Emit MANIFESTRESOURCE table.
28536 * reflection.h: Update to changes in class layout.
28538 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted):
28539 Reenable call to mono_runtime_is_shutting_down ().
28541 * appdomain.c (mono_runtime_is_shutting_down): New helper function to
28542 determine if the runtime is shutting down.
28544 2003-12-16 Jackson Harper <jackson@ximian.com>
28546 * icall.c: comment out call to mono_runtime_is_shutting_down to
28549 2003-12-16 Zoltan Varga <vargaz@freemail.hu>
28551 * icall.c (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal): Add support for loading resources from modules.
28552 (ves_icall_System_Environment_get_HasShutdownStarted): New icall.
28554 2003-12-15 Bernie Solomon <bernard@ugsolutions.com>
28556 * reflection.c: move definition of swap_with_size
28557 to before its first call
28559 2003-12-15 Zoltan Varga <vargaz@freemail.hu>
28561 * appdomain.c (mono_runtime_is_shutting_down): New public function.
28563 * icall.c (ves_icall_System_Environment_get_HasShutdownStarted): New
28566 * object.c: Fix warnings.
28568 * icall.c (ves_icall_Type_Get...): Only consider inherited static
28569 members if FlattenHierarchy is set.
28571 * reflection.c (mono_image_add_decl_security): New function to emit
28572 declarative security.
28574 * reflection.h reflection.c: Add support for declarative security.
28576 * appdomain.c (MONO_CORLIB_VERSION): Bump version number.
28578 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
28580 appdomain.c (MONO_CORLIB_VERSION): Bump version number.
28582 * appdomain.c verify.c: Moved corlib version checking into its own
28583 function in appdomain.c since it needs to create vtables etc.
28585 2003-12-13 Patrik Torstensson <p@rxc.se>
28587 * marshal.c (mono_remoting_wrapper): Fix bug 48015, using TP as this
28588 instead of unwrapped server.
28590 2003-12-12 Zoltan Varga <vargaz@freemail.hu>
28592 * verify.c (check_corlib): Fix field index.
28594 2003-12-10 Zoltan Varga <vargaz@freemail.hu>
28596 * icall.c: Applied patch from Todd Berman (tbermann@gentoo.org). New
28599 2003-12-10 Bernie Solomon <bernard@ugsolutions.com>
28601 * process.c: (ves_icall_System_Diagnostics_Process_GetWorkingSet_internal
28602 ves_icall_System_Diagnostics_Process_SetWorkingSet_internal):
28603 cope with sizeof(size_t) != sizeof(guint32).
28605 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28607 * process.[ch]: the 'pid' field in MonoProcInfo stores GetLastError
28608 in case of failure.
28610 2003-12-10 Mark Crichton <crichton@gimp.org>
28612 * icall.c: removed the GetNonZeroBytes. We now handle this case
28615 * rand.c, rand.h: Same here. Also cleaned up the clode slightly.
28617 Tue Dec 9 15:36:18 CET 2003 Paolo Molaro <lupus@ximian.com>
28619 * class.h, class.c, icall.c, marshal.c, object.c: ignore fields
28622 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
28624 * verify.c (check_corlib): Handle the case when the version field is
28625 initialized by a static constructor.
28627 2003-12-08 Patrik Torstensson <p@rxc.se>
28629 * rand.c (InternalGetBytes): Implemented win32 version with cryptapi
28631 2003-12-08 Martin Baulig <martin@ximian.com>
28633 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Return
28634 a MonoReflectionGenericParameter, also take the parameter index
28635 and name as arguments.
28636 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
28637 (ves_icall_MonoGenericParam_initialize): New interncall.
28638 (ves_icall_Type_make_byref_type): New interncall.
28640 * reflection.h (MonoReflectionGenericParam): Derive from
28641 MonoReflectionType, not just from MonoObject. Added `refobj' and
28644 * reflection.c (mono_reflection_define_generic_parameter): Create
28645 and return a new MonoReflectionGenericParam; don't initialize the
28647 (mono_reflection_initialize_generic_parameter): New public method;
28648 initializes the constraints and creates the `param->pklass'.
28650 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
28652 * reflection.h reflection.c: Use the new fields 'num_types',
28653 'num_fields' and 'num_methods' to track the number of types etc.
28655 * verify.c (check_corlib): Check corlib version number.
28657 2003-12-07 Zoltan Varga <vargaz@freemail.hu>
28659 * marshal.c (mono_marshal_method_from_wrapper): Remove assert so this
28660 function works on all methods.
28662 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
28664 * domain.c, loader.h: Added IRemotingTypeInfo interface in MonoDefaults.
28665 * icall.c: in, ves_icall_Remoting_RealProxy_GetTransparentProxy set
28666 the custom_type_info flag of the transparent proxy.
28667 * object.c: Added method mono_object_isinst_mbyref for casting mbyref
28668 objects that supports IRemotingTypeInfo.
28669 * object.h: Added custom_type_info field in transparent proxy.
28671 2003-12-06 Martin Baulig <martin@ximian.com>
28673 * class.c (mono_class_create_from_generic): Removed.
28674 (mono_class_from_generic): Check `ginst->klass' before doing
28675 anything else. This is important to fully support "recursive"
28678 * metadata.c (do_mono_metadata_parse_generic_inst): Create an
28679 empty `generic_inst->klass' before doing anything else.
28681 2003-12-06 Dick Porter <dick@ximian.com>
28686 * locales.c: Use C structs to access class fields. Don't do a
28687 conversion between MonoString and UChar because both are
28688 platform-endian UTF-16. Compare now takes startindex and count
28689 parameters. Add a char overload for IndexOf. Speed up the
28690 invariant string IndexOf.
28692 2003-12-05 Zoltan Varga <vargaz@freemail.hu>
28694 * Makefile.am (monosn_LDADD): Fix parallel build.
28696 2003-12-04 Martin Baulig <martin@ximian.com>
28699 (ves_icall_type_GetTypeCode): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
28700 (ves_icall_Type_make_array_type): New interncall.
28702 2003-12-04 Martin Baulig <martin@ximian.com>
28704 * locales.c: also change it in the !HAVE_ICU case.
28706 2003-12-04 Dick Porter <dick@ximian.com>
28709 * locales.c: construct_compareinfo is now in CompareInfo, not
28712 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
28714 * image.c (mono_image_load_file_for_image): Cache loaded images in the
28715 image->files array.
28717 * image.c (load_class_name): Load class names from the EXPORTEDTYPES
28720 * assembly.c (mono_assembly_load_references): Only load references
28723 * class.c (mono_class_from_name): Avoid linear search of the
28724 EXPORTEDTYPE table.
28726 * loader.c (mono_field_from_token): Cache lookups of fieldrefs as well.
28728 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
28730 * image.h (MonoImage): Add 'field_cache' field.
28732 * loader.c (mono_field_from_token): Cache field lookups.
28734 * reflection.c (mono_module_get_object): Fix name property.
28736 * icall.c (ves_icall_get_enum_info): Update after changes to
28737 mono_metadata_get_constant_index ().
28739 * icall.c: Get rid of get_type_info icall, use a separate icall for
28740 each type property to avoid needless memory allocations. Fixes #51514.
28742 * metadata.c (mono_metadata_get_constant_index): Add a 'hint' parameter
28743 to avoid needless binary searches.
28745 * class.c (class_compute_field_layout): Move the initialization of
28746 field->def_value to mono_class_vtable ().
28748 * class.c (mono_class_layout_fields): Enable GC aware auto layout for
28751 * object.c (mono_object_allocate): Make it inline.
28753 * object.c (mono_object_allocate_spec): Make it inline.
28755 2003-12-02 Dick Porter <dick@ximian.com>
28757 * locales.c (create_NumberFormat): NumberFormatInfo construction.
28758 Patch by Mohammad DAMT (mdamt@cdl2000.com).
28760 2003-12-01 Dick Porter <dick@ximian.com>
28762 * threads.c: Fix signature and call in CreateMutex and
28765 2003-12-01 Dick Porter <dick@ximian.com>
28768 * locales.c: Implement string compares and searching
28770 * object.h: Add extra Thread field
28772 2003-11-30 Zoltan Varga <vargaz@freemail.hu>
28774 * reflection.c (fixup_method): Add support for MonoCMethod.
28776 2003-11-28 Zoltan Varga <vargaz@freemail.hu>
28778 * gc.c: Fix hangs and error messages when GC_DONT_GC is set.
28780 * reflection.c (assembly_name_to_aname): Allow extra characters in
28781 assembly names. Fixes #51468.
28783 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
28785 * exception.c (mono_exception_from_name_domain): New helper function.
28787 * appdomain.c (ves_icall_System_AppDomain_createDomain): Create the
28788 exception object in the correct domain.
28790 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix
28791 formatting + make a copy a the input data.
28793 * loader.c (mono_get_method_from_token): Methods which contain
28794 native code do not have entries in the ImplMap.
28796 (ves_icall_System_AppDomain_LoadAssemblyRaw): Fix exception throw.
28797 Thanks to Gonzalo for spotting this.
28799 * appdomain.c (ves_icall_System_AppDomain_LoadAssemblyRaw): Applied
28800 patch from ztashev@openlinksw.co.uk (Zdravko Tashev). New icall.
28802 * assembly.h (mono_assembly_load_from): Split the second part of
28803 assembly loading into a new public function.
28805 * exception.h (mono_get_exception_bad_image_format): New function.
28807 2003-11-24 Zoltan Varga <vargaz@freemail.hu>
28809 icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
28810 Enumerate all modules inside a dynamic assembly. Fixes #51293.
28812 * icall.c: Add new icall for creating dynamic methods.
28814 * loader.h debug-helpers.c: Add new wrapper type for dynamic methods.
28816 * reflection.h (MonoReflectionDynamicMethod): Fix type of bool fields.
28818 * reflection.c (mono_reflection_create_dynamic_method): New icall to
28819 create a dynamic method.
28821 * reflection.c (resolve_object): New helper function.
28823 * reflection.c: Generalize ReflectionMethodBuilder and the functions
28824 which manipulate it so they can also work on dynamic methods.
28826 * reflection.c (reflection_method_builder_to_mono_method): Avoid
28827 creating the MonoReflectionMethodAux structure if it is not needed.
28829 * reflection.h verify.c: Update after changes to object layout.
28831 * reflection.c (method_builder_encode_signature): Fix compilation on
28834 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
28836 * appdomain.h: Added support for context static fields. Added static_data
28837 field to MonoAppContext and renamed thread_static_fields to a more
28838 generic special_static_fields in MonoAppDomain, since it can now contain
28839 context static fields.
28840 * domain.c: Updated hashtable name.
28841 * object.c: Replaced field_is_thread_static() for a more generic
28842 field_is_special_static() which also checks for context static attribute.
28843 In mono_class_vtable(), added support for static context fields.
28844 * threads.c: Changed methods that manage thread static fields to more
28845 generic methods so they can be reused both for thread and context static
28847 * threads.h: Declared some new methods.
28849 2003-11-21 Zoltan Varga <vargaz@freemail.hu>
28851 * reflection.h: Update after changes to the managed types.
28853 * reflection.c (encode_custom_modifiers): New helper function.
28855 * reflection.c (method_encode_signature): Emit custom modifiers.
28857 * reflection.c (field_encode_signature): Emit custom modifiers.
28859 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
28861 * reflection.h (MonoReflectionAssemblyName): Applied patch from Laurent Morichetti (l_m@pacbell.net). Fix type of 'flags' field.
28863 * icall.c (ves_icall_System_ValueType_Equals): New optimized
28866 * icall.c (ves_icall_System_ValueType_InternalGetHashCode): New
28869 * object.c (mono_field_get_value_object): New function.
28871 * object.c appdomain.h appdomain.c: Make out_of_memory_ex domain
28874 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
28876 * appdomain.c (mono_runtime_get_out_of_memory_ex): New function to
28877 return a preallocated out-of-memory exception instance.
28879 * object.c (out_of_memory): Use the new function.
28881 * metadata.c (mono_metadata_parse_type): Handle the case when the byref
28882 flag is before the custom modifiers. Fixes #49802.
28884 2003-11-16 Martin Baulig <martin@ximian.com>
28886 * class.c (mono_class_is_open_constructed_type): Implemented the
28887 MONO_TYPE_GENERICINST case.
28889 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
28891 * assembly.c (mono_assembly_fill_assembly_name): New function to
28892 fill out the MonoAssemblyName structure.
28893 (mono_assembly_open): Use the new function.
28895 * icall.c (fill_reflection_assembly_name): New helper function.
28897 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Use the
28900 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetAssemblyName): New icall.
28902 2003-11-15 Martin Baulig <martin@ximian.com>
28904 * class.c (mono_class_is_open_constructed_type): New public
28905 function; checks whether a type is an open constructed type,
28906 ie. whether it still contains type parameters.
28907 (mono_class_inflate_generic_type): If we're a type parameter and
28908 the inflated type is also a MONO_TYPE_(M)VAR, return the original
28911 * class.h (MonoGenericInst): Added `guint32 is_open'.
28913 * loader.c (method_from_methodspec): Check whether we're an open
28914 or closed constructed type and set `ginst->is_open'.
28916 * reflection.c (mono_reflection_bind_generic_parameters): Check
28917 whether we're an open or closed constructed type and set
28919 (mono_reflection_inflate_method_or_ctor): Don't inflate methods
28920 from open constructed types.
28922 2003-11-15 Martin Baulig <martin@ximian.com>
28924 * reflection.c (mono_reflection_bind_generic_parameters): If we're
28925 a generic instance (instead of a generic type declaration) with
28926 unbound generic parameters, bind them to our actual types.
28928 2003-11-14 Martin Baulig <martin@ximian.com>
28930 * reflection.h (MonoReflectionGenericInst): Added `MonoArray *interfaces'.
28932 * reflection.c (mono_reflection_bind_generic_parameters): If we're
28933 an interface type, populate `res->interfaces' with instantiated
28934 versions of all the interfaces we inherit.
28936 2003-11-13 Aleksey Demakov <avd@openlinksw.com>
28938 * assembly.c (mono_assembly_load): Fixed problem finding mscorlib.dll
28939 when MONO_PATH is set but doesn't contain the install dir.
28941 2003-11-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
28944 (ves_icall_Type_GetInterfaces): don't return an interface twice when
28945 it's also implemented in base classes. Fixes bug #50927.
28947 2003-11-13 Zoltan Varga <vargaz@freemail.hu>
28949 * gc.c (ves_icall_System_GC_WaitForPendingFinalizers): Avoid deadlocks
28950 if this method is called from a finalizer. Fixes #50913.
28952 2003-11-12 Miguel de Icaza <miguel@ximian.com>
28954 * threads.c: Implement VolatileRead/VolatileWrite
28956 * icall.c: Add new icalls for VolatileRead/VolatileWrite
28958 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
28960 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Applied
28961 patch from Danilo Sagan (dsegan@gmx.net). Fix compilation under gcc
28964 * assembly.c (mono_assembly_open): Fix windows build. Applied patch
28965 from Peter Ross (pro@missioncriticalit.com).
28967 2003-11-12 Lluis Sanchez Gual <lluis@ximian.com>
28969 * icall.c: Added internal call for System.Environment::GetMachineConfigPath
28971 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
28973 * assembly.c (mono_assembly_load_references): Disable check because it
28974 triggers on older corlibs which lots of people have.
28976 2003-11-12 Jackson Harper <jackson@ximian.com>
28978 * assembly.c: Change corlib name to mscorlib. Add a temp. hack to
28979 load corlib.dll if mscorlib.dll is not found.
28980 * assembly.h: Remove corlib name define.
28983 * image.c: Change corlib name to mscorlib.
28985 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
28987 * debug-mono-symfile.c: Add patch from FreeBSD ports tree.
28989 2003-11-11 Miguel de Icaza <miguel@ximian.com>
28991 * appdomain.h: Added loader_optimization here to sync with the C#
28992 code, and add disallow_binding_redirects field.
28994 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
28996 * mono-debug.c (mono_debug_add_method): Ignore unknown modules.
28998 * reflection.c (mono_image_build_metadata): Fix crash on modules
29001 * reflection.h (MonoMethodInfo): Track changes to the managed structure.
29003 * icall.c (ves_icall_get_method_info): Return callingConvention as
29006 * icall.c (ves_icall_System_Reflection_Assembly_GetNamespaces): Add
29007 namespaces from the EXPORTEDTYPE table as well.
29009 * icall.c (ves_icall_System_Reflection_Assembly_GetTypes): Merge types
29010 from all modules inside the assembly.
29012 2003-11-11 Martin Baulig <martin@ximian.com>
29014 * reflection.c (mono_reflection_bind_generic_parameters): Make
29015 this work for interfaces.
29017 2003-11-11 Martin Baulig <martin@ximian.com>
29019 * mono-debug.c (mono_debug_add_type): Ignore unknown modules.
29021 2003-11-11 Martin Baulig <martin@ximian.com>
29023 * reflection.c (mono_reflection_inflate_method_or_ctor): Allow
29024 "MonoInflatedMethod" and "MonoInflatedCtor".
29026 2003-11-11 Zoltan Varga <vargaz@freemail.hu>
29028 * reflection.c (resolution_scope_from_image): Use the assembly table
29029 from the manifest module, since other modules don't have it.
29031 * debug-helpers.c (mono_type_full_name): New helper function.
29033 * image.h (MonoAssembly): Change 'dynamic' to a boolean.
29035 * image.c (mono_image_load_file_for_image): New public function which
29036 is a replacement for the load_file_for_image in class.c.
29038 * assembly.c (mono_assembly_load_module): A wrapper for the function
29039 above which does assembly association and reference loading too.
29041 * class.c (mono_class_from_name): Call mono_assembly_load_module.
29043 2003-11-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29045 * appdomain.c: not all of the attributes for the full assembly name
29046 are required and the order doesn't matter. Fixes bug #50787.
29048 2003-11-10 Dick Porter <dick@ximian.com>
29050 * locales.c: Use platform-endian UTF16
29052 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
29054 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
29056 2003-11-10 Martin Baulig <martin@ximian.com>
29059 (mono_metadata_load_generic_params): Make this actually work.
29061 * reflection.c (mono_reflection_bind_generic_parameters): If our
29062 parent is a generic instance, pass all the `types' to it, no
29063 matter whether it has the same number of type parameters or not.
29065 2003-11-10 Zoltan Varga <vargaz@freemail.hu>
29067 * reflection.c: Emit FILE and EXPORTEDTYPE tables.
29069 * assembly.c (mono_assembly_load_references): Move the image<->assembly
29070 assignment code to this function so it gets called recursively for all
29073 * image.c (load_modules): Remove the assembly assignment since it is
29074 now done by mono_assembly_load_references.
29076 * icall.c (ves_icall_System_Reflection_Assembly_InternalGetType):
29077 Add 'module' argument.
29078 (mono_module_get_types): New helper function.
29079 (ves_icall_System_Reflection_Module_InternalGetTypes): New icall.
29081 2003-11-08 Martin Baulig <martin@ximian.com>
29083 * class.c (mono_class_inflate_generic_method): Interface method
29084 don't have a header.
29086 * reflection.c (mono_image_get_methodspec_token): Take an
29087 additional `MonoGenericInst *' argument instead of reading it from
29088 the header; this is necessary to support interfaces.
29089 (mono_image_create_token): Pass the `MonoGenericInst *' from the
29090 MonoReflectionInflatedMethod to mono_image_get_methodspec_token().
29091 (inflated_method_get_object): Take an additional `MonoGenericInst *'
29094 * reflection.h (MonoReflectionInflatedMethod): Added
29095 `MonoGenericInst *ginst'.
29097 2003-11-07 Zoltan Varga <vargaz@freemail.hu>
29099 * gc.c (mono_domain_finalize): Fix compilation for no GC case.
29101 2003-11-06 Zoltan Varga <zovarga@ws-zovarga2>
29103 * appdomain.c (mono_domain_unload): Add a workaround for bug #27663.
29105 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
29108 (reflection_methodbuilder_from_method_builder):
29109 (reflection_methodbuilder_from_ctor_builder): New helper functions to
29110 initialize a ReflectionMethodBuilder structure.
29111 (mono_image_get_methodbuilder_token):
29112 (mono_image_get_ctorbuilder_token): New functions to emit memberref
29113 tokens which point to types in another module inside the same assembly.
29115 * reflection.c: Use the new helper functions.
29117 * reflection.c (mono_image_basic_init): Initialize basedir and culture.
29119 * icall.c loader.c reflection.c: Use ModuleBuilder->dynamic_image
29120 instead of AssemblyBuilder->dynamic_assembly in the appropriate places.
29122 * reflection.c (resolution_scope_from_image): Emit a moduleref if
29125 * reflection.c (mono_image_build_metadata): Emit metadata only for the
29126 current module. Emit the manifest only for the main module.
29128 * reflection.c (mono_image_create_token): Add assertion when a
29129 memberref needs to be created.
29131 * reflection.c reflection.h (MonoDynamicAssembly): Remove unused fields.
29133 * reflection.c (mono_reflection_get_custom_attrs_blob): Allocate a
29134 larger buffer for the custom attribute blob. Fixes #50637.
29136 2003-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29138 * threadpool.c: notify listener on async processing handles after
29139 invoking the async callback. Thanks to Zoltan.
29141 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
29143 * reflection.c (create_dynamic_mono_image): Call mono_image_init to
29144 avoid code duplication.
29146 * reflection.h (MonoDynamicImage): New type which is currently unused,
29147 but will be used through the ref.emit code in place of
29148 MonoDynamicAssembly.
29150 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
29153 * reflection.c (create_dynamic_mono_image): Rewrote so it now creates
29154 a MonoDynamicImage instead of just a MonoImage.
29156 * reflection.h reflection.c icall.c: Move nearly all AssemblyBuilder
29157 icalls to ModuleBuilder but keep their semantics, so they will work
29158 with moduleb->assemblyb. This will change later.
29160 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
29162 * reflection.h (MonoReflectionAssemblyBuilder): Track changes to the
29165 * reflection.c (mono_image_build_metadata): Avoid creation of a default
29166 main module, since it is now done by the managed code.
29168 2003-11-03 Martin Baulig <martin@ximian.com>
29170 * reflection.c (mono_reflection_inflate_method_or_ctor): Set
29171 `ginst->klass' here.
29172 (method_encode_methodspec): Don't use the `ginst->generic_method's
29173 klass if it's a generic instance, use `ginst->klass' in this case.
29175 2003-11-03 Martin Baulig <martin@ximian.com>
29177 * reflection.c (mono_image_get_generic_method_param_info):
29178 Removed, use mono_image_get_generic_param_info() instead.
29179 (mono_image_get_type_info): Write the GenericParam table before
29180 the Method table. This is neccessary because in the GenericParam
29181 table, type parameters of the class (ie. '!0' etc.) must come
29182 before the ones from its generic methods (ie. '!!0' etc).
29184 2003-11-03 Zoltan Varga <vargaz@freemail.hu>
29186 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill out AssemblyName->codebase. Fixes #50469.
29188 2003-11-02 Martin Baulig <martin@ximian.com>
29190 * reflection.c (create_generic_typespec): Take a
29191 `MonoReflectionTypeBuilder *' instead of a `MonoType *' and get
29192 the generic parameters from it.
29194 2003-11-02 Martin Baulig <martin@ximian.com>
29196 * reflection.c (fieldref_encode_signature): Take a `MonoType *'
29197 instead of a `MonoClassField *' since we just need the type.
29198 (create_generic_typespec): New static function. Creates a
29199 TypeSpec token for a generic type declaration.
29200 (mono_image_get_generic_field_token): New static function.
29201 (mono_image_create_token): If we're a FieldBuilder in a generic
29202 type declaration, call mono_image_get_generic_field_token() to get
29205 2003-11-02 Martin Baulig <martin@ximian.com>
29208 (MonoReflectionInflatedMethod, MonoReflectionInflatedField): Added
29209 `MonoReflectionGenericInst *declaring_type' and
29210 `MonoReflectionGenericInst *reflected_type' fields.
29212 * reflection.c (mono_reflection_inflate_method_or_ctor): Take a
29213 `MonoReflectionGenericInst *declaring_type' and a
29214 `MonoReflectionGenericInst *reflected_type' argument instead of a
29215 single `MonoReflectionGenericInst *type' one. Set
29216 `res->declaring_type' and `res->reflected_type' from them.
29217 (mono_reflection_inflate_field): Likewise.
29219 2003-11-02 Martin Baulig <martin@ximian.com>
29221 * class.c (mono_class_setup_vtable): Don't store generic methods
29224 2003-11-02 Martin Baulig <martin@ximian.com>
29226 * reflection.h (MonoReflectionGenericInst): Added
29227 `MonoReflectionType *declaring_type'.
29229 * reflection.c (mono_reflection_bind_generic_parameters): Use
29230 `if (tb->parent)' instead of `klass->parent'.
29232 2003-11-01 Zoltan Varga <vargaz@freemail.hu>
29234 * assembly.c (mono_assembly_open): Avoid crash if a module is loaded
29235 with an empty ASSEMBLY table.
29237 * reflection.c (mono_image_build_metadata): Avoid using the same loop
29238 variable in the inner and outer loops.
29240 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
29242 * metadata.h (mono_metadata_make_token): Put parentheses around macro
29245 * appdomain.h appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef): Fix signature.
29247 * appdomain.c appdomain.h icall.c: Get rid of the InvokeInDomain
29248 icalls. Instead, do everything in managed code. This is needed since
29249 it is hard to restore the original domain etc. in unmanaged code in the
29250 presence of undeniable exceptions.
29252 * appdomain.c (ves_icall_System_AppDomain_InternalPushDomainRef):
29253 New icalls to push and pop appdomain refs.
29255 2003-10-31 Martin Baulig <martin@ximian.com>
29257 * class.c (inflate_generic_type): Renamed to
29258 mono_class_inflate_generic_type() and made it public.
29260 * icall.c ("System.Reflection.MonoGenericInst::inflate_field"):
29263 * loader.c (mono_field_from_memberref): Also set the retklass for
29266 * fielder.c (mono_image_get_inflated_field_token): New static
29267 method; creates a metadata token for an inflated field.
29268 (mono_image_create_token, fixup_method): Added support for
29269 "MonoInflatedField".
29270 (fieldbuilder_to_mono_class_field): New static function.
29271 (mono_reflection_inflate_field): New public function.
29274 (MonoReflectionGenericInst): Added `MonoArray *fields'.
29275 (MonoReflectionInflatedField): New typedef.
29277 2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
29279 * socket-io.c (in6_addr ipaddress_to_struct_in6_addr): fix
29280 for Solaris and other platforms without s6_addr16
29282 2003-10-30 Martin Baulig <martin@ximian.com>
29284 * class.c (inflate_generic_type): Take just one `MonoGenericInst *'
29285 argument instead of two.
29286 (mono_class_inflate_generic_signature): Likewise.
29287 (inflate_generic_header): Likewise.
29288 (mono_class_inflate_generic_method): Likewise. In addition, if
29289 `ginst->klass' is set, it becomes the new `method->klass'.
29291 * class.h (MonoGenericInst): Removed the `gpointer mbuilder'
29294 * reflection.c (encode_generic_method_sig): Write a 0xa as the
29295 first byte. [FIXME]
29296 (method_encode_methodspec): If we have generic parameters, create
29297 a MethodSpec instead of a MethodRef.
29298 (fixup_method): Added support for "MonoInflatedMethod" and
29299 "MonoInflatedCtor".
29300 (mono_image_create_token): Added support for "MonoInflatedMethod"
29301 and "MonoInflatedCtor".
29302 (inflated_method_get_object): New static function; returns a
29303 managed "System.Reflection.MonoInflatedMethod" object.
29304 (mono_reflection_bind_generic_method_parameters): Return a
29305 `MonoReflectionInflatedMethod' instead of a `MonoReflectionMethod'.
29306 (mono_reflection_inflate_method_or_ctor): Likewise.
29307 (mono_image_get_generic_method_param_info): Initialize unused
29309 (mono_image_get_generic_param_info): Likewise.
29311 * reflection.h (MonoReflectionInflatedMethod): New public
29312 typedef. Corresponds to the managed "S.R.MonoInflatedMethod" and
29313 "S.R.MonoInflatedCtor" classes.
29315 * loader.c (method_from_memberref): If we're a TypeSpec and it
29316 resolves to a generic instance, inflate the method.
29318 2003-10-28 Dick Porter <dick@ximian.com>
29320 * object.c (mono_runtime_run_main): Convert command-line arguments
29321 into utf8, falling back to the user's locale encoding to do so.
29323 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
29325 * loader.c (mono_get_method_from_token): Avoid looking up the icalls
29328 * marshal.c (mono_marshal_get_native_wrapper): Lookup icalls here.
29330 * reflection.c (reflection_methodbuilder_to_mono_method): Avoid looking
29331 up icalls at method definition time. Partially fixes #33569.
29333 2003-10-25 Zoltan Varga <vargaz@freemail.hu>
29335 * marshal.c (mono_marshal_get_native_wrapper): Add support for [Out]
29336 marshalling of arrays. Fixes #50116.
29338 * appdomain.c (ves_icall_System_AppDomain_InternalIsFinalizingForUnload): New icall.
29340 * appdomain.c (unload_thread_main): Clear class->cached_vtable if it
29341 points to a vtable in the dying appdomain.
29343 * appdomain.c (mono_domain_unload): Move the notification of OnUnload
29344 listeners into unmanaged code inside the lock.
29346 * object.c (mono_class_vtable): Turn off typed allocation in non-root
29347 domains and add some comments.
29349 2003-10-25 Martin Baulig <martin@ximian.com>
29351 * class.h (MonoGenericInst): Added `MonoClass *klass' field.
29353 * image.h (MonoImage): Added `GHashTable *typespec_cache'.
29355 * metadata.c (mono_metadata_parse_generic_inst): Renamed to
29356 `do_mono_metadata_parse_generic_inst'; pass it the MonoType we're
29357 currently parsing. Create the generic class and store it in
29358 `generic_inst->klass' before parsing the type arguments. This is
29359 required to support "recursive" definitions; see mcs/tests/gen-23.cs
29361 (mono_type_create_from_typespec): Use a new `image->typespec_cache'
29362 to support recursive typespec entries.
29364 * class.c (mono_class_setup_parent): If our parent is a generic
29365 instance, we may get called before it has its name set.
29366 (mono_class_from_generic): Splitted into
29367 mono_class_create_from_generic() and mono_class_initialize_generic().
29369 2003-10-25 Martin Baulig <martin@ximian.com>
29371 * icall.c (ves_icall_Type_BindGenericParameters): Return a
29372 `MonoReflectionGenericInst *' instead of a `MonoReflectionType *'.
29373 ("System.Reflection.MonoGenericInst::inflate_method"): New interncall.
29374 ("System.Reflection.MonoGenericInst::inflate_ctor"): New interncall.
29376 * reflection.c (my_mono_class_from_mono_type): Added MONO_TYPE_GENERICINST.
29377 (create_typespec): Likewise.
29378 (mono_reflection_bind_generic_parameters): Return a
29379 `MonoReflectionGenericInst *' instead of a `MonoClass *'.
29380 (mono_reflection_inflate_method_or_ctor): New public function.
29382 * reflection.h (MonoReflectionGenericInst): New typedef.
29384 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
29386 * object.c (mono_class_proxy_vtable): Run the whole vtable construction
29387 inside the domain lock. Fixes #49993.
29389 * object.c (mono_class_vtable): When typed allocation is used,
29390 allocate vtables in the GC heap instead of in the mempool, since the
29391 vtables contain GC descriptors which are used by the collector even
29392 after the domain owning the mempool is unloaded.
29394 * domain.c (mono_domain_set): Rename to mono_domain_set_internal.
29396 * domain.c (mono_domain_unload): Rename to mono_domain_free to better
29397 reflect what it does. Also invalidate mempools instead of freeing
29398 them if a define is set.
29400 * appdomain.h (MonoAppDomainState): New enumeration to hold the state
29403 * appdomain.h (_MonoDomain): New field 'finalizable_object_hash' to
29404 hold the finalizable objects in this domain.
29406 * appdomain.h (_MonoDomain): New field 'state' to hold the state of the
29409 * appdomain.c (mono_domain_set): New function to set the current
29410 appdomain, but only if it is not being unloaded.
29412 * appdomain.c threads.c threadpool.c object.c: Avoid entering an
29413 appdomain which is being unloaded.
29415 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Prevent
29416 unloading of the root appdomain.
29418 * appdomain.c (ves_icall_System_AppDomain_InternalInvokeInDomain): New
29419 icall to execute a method in another appdomain. Intended as a
29420 replacement for InternalSetDomain, which can confuse the code
29421 generation in the JIT.
29423 * appdomain.c (mono_domain_is_unloading): New function to determine
29424 whenever an appdomain is unloading.
29426 * appdomain.c (mono_domain_unload): New function to correctly unload
29429 * assembly.c (mono_assembly_load_references): Check that an assembly
29430 does not references itself.
29432 * gc.c (mono_domain_finalize): Rewrote so instead of finalizing a
29433 domain manually, it asks the finalizer thread to do it, then waits for
29434 the result. Also added a timeout.
29436 * icall.c: Register the new icalls.
29438 * threads.h threads.c: Export the mono_gc_stop_world and
29439 mono_gc_start_world functions.
29441 * mempool.h mempool.c (mono_mempool_invalidate): New debugging
29442 function to fill out the mempool with 0x2a.
29444 2003-10-22 Zoltan Varga <vargaz@freemail.hu>
29446 * reflection.h (MonoReflectionMethodAux): New structure to store
29447 information which is rarely used, thus is not in the MonoMethod
29450 * reflection.h (MonoDynamicAssembly): New field 'method_aux_hash' to
29451 store the aux info.
29453 * reflection.c (mono_methodbuilder_to_mono_method): Store param names
29454 and marshalling info into the aux structure.
29456 * loader.c (mono_method_get_marshal_info): Retrieve the marshal info
29457 from the aux structure.
29459 * loader.c (mono_method_get_param_names): Retrieve the param names from
29462 2003-10-21 Zoltan Varga <vargaz@freemail.hu>
29464 * exception.h exception.c: Add AppDomainUnloadedException && fix
29467 2003-10-21 Dick Porter <dick@ximian.com>
29470 (ves_icall_System_Net_Sockets_Socket_Select_internal): Applied
29471 patch from Laramie Leavitt moving divide out of loop. (Bug 45381).
29473 2003-10-21 Martin Baulig <martin@ximian.com>
29475 * reflection.c (mono_reflection_bind_generic_parameters):
29476 `klass->parent' is NULL for interfaces.
29478 2003-10-21 Martin Baulig <martin@ximian.com>
29480 * reflection.c (create_typespec): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
29482 2003-10-20 Zoltan Varga <vargaz@freemail.hu>
29484 * exception.c (mono_exception_from_name_msg): New helper function for
29485 creating exceptions and initializing their message field.
29487 * exception.c: Simplify functions using the new helper.
29489 * exception.h exception.c (mono_get_exception_cannot_unload_appdomain):
29492 * object.h object.c: Remove G_GNUC_NORETURN from the signature of
29493 mono_raise_exception, since otherwise gcc doesn't generate the function
29494 epilog for raise_exception, confusing the stack unwinding in the JIT.
29497 * rawbuffer.c (mono_raw_buffer_load_mmap): Map mmap-ed memory with
29498 PROT_EXEC. This seems to prevent segmentation faults on Fedora Linux.
29501 2003-10-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29503 * icall.c: OutputDebugStringW expects 16-bit unicode characters, not
29506 2003-10-18 Lluis Sanchez Gual <lluis@ximian.com>
29508 * icall.c: Removed GetUninitializedObject method because
29509 AllocateUninitializedClassInstance does the same.
29511 2003-10-18 Martin Baulig <martin@ximian.com>
29513 * class.c (inflate_generic_signature): Renamed to
29514 mono_class_inflate_generic_signature() and made it public.
29515 (my_mono_class_from_generic_parameter): New static function; if we
29516 don't already have the generic parameter's MonoClass, create a
29517 very simple one which is just used internally in the runtime and
29518 not passed back to managed code.
29520 * class.h (MonoGenericInst): Added `gpointer mbuilder' field.
29522 * metadata.h (MonoMethodSignature): Moved the
29523 `MonoGenericParam *gen_params' to the MonoMethodHeader.
29524 (MonoMethodHeader): Moved the `MonoGenericParam *gen_params' here.
29526 * icall.c (ves_icall_MethodInfo_GetGenericArguments): Renamed to
29527 ves_icall_MonoMethod_GetGenericArguments(); this is now an
29528 interncall on the MonoMethod class, not on MethodInfo.
29529 (ves_icall_MethodInfo_BindGenericParameters): Removed, we're now
29530 calling mono_reflection_bind_generic_method_parameters() directly.
29532 * loader.c (mono_method_get_signature): If this is a MethodSpec;
29533 return the already computed `method->signature'.
29534 (method_from_methodspec): New static function to load a method
29535 from a MethodSpec entry.
29536 (mono_get_method_from_token): Call the new method_from_methodspec()
29537 for MethodSpec tokens.
29538 (mono_get_method_from_token): If we're a generic method, load the
29541 * reflection.c (mono_image_get_memberref_token): Allow
29542 MEMBERREF_PARENT_TYPEDEF here; this will be used in the MethodSpec
29544 (fixup_method): Added support for MONO_TABLE_METHODSPEC.
29545 (mono_image_create_token): First check whether it's a generic
29546 method (so we'd need to create a MethodSpec), then do the other
29548 (mono_reflection_bind_generic_method_parameters): Return a
29549 `MonoReflectionMethod *' instead of a `MonoMethod *'; we're now
29550 called directly from the interncall.
29552 2003-10-17 Zoltan Varga <vargaz@freemail.hu>
29554 * reflection.c (load_public_key): Move loading of the public key
29557 * image.h (MonoAssemblyName): Add public_key and hash_alg fields.
29559 * assembly.c (mono_assembly_open): Fill in public_key and hash_alg
29562 * icall.c (ves_icall_System_Reflection_Assembly_FillName): Fill in
29563 culture, hash_alg and public_key. Fixes #49555.
29565 2003-10-17 Martin Baulig <martin@ximian.com>
29567 * class.h (MonoGenericInst): Moved this declaration here and added
29568 `MonoMethod *generic_method'.
29571 (ves_icall_MethodInfo_GetGenericArguments): New interncall.
29572 (ves_icall_MethodInfo_BindGenericParameters): New interncall.
29574 * metadata.c (mono_metadata_type_equal): Two types of
29575 MONO_TYPE_VAR or MONO_TYPE_MVAR equals if they have the same
29576 index; ie. don't compare the address of the `MonoGenericParam'
29578 (mono_metadata_load_generic_params): Removed the `MonoMethod
29581 * metadata.h (MonoGenericInst): Moved declaration to class.h.
29582 (MonoMethodHeader): Added `MonoGenericInst *geninst'.
29584 * reflection.c (method_encode_signature): Encode the number of
29585 generic parameters.
29586 (encode_generic_method_sig): New static function.
29587 (method_encode_methodspec): New static function; creates an entry
29588 in the MethodSpec table for a generic method.
29589 (mono_image_get_methodspec_token): New static function.
29590 (mono_image_create_token): Call mono_image_get_methodspec_token()
29591 for generic methods.
29592 (mono_reflection_bind_generic_method_parameters): New public
29593 function. Instantiates a generic method.
29595 2003-10-16 Martin Baulig <martin@ximian.com>
29597 * metadata.h (MonoMethodSignature): Moved `MonoGenericParam
29598 *gen_params' here from MonoMethodHeader.
29600 * metadata.c (mono_metadata_parse_method_signature): If we have
29601 generic parameters, initialize `method->gen_params' and then set
29602 the correct `type->data.generic_param' in all the parameters.
29604 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
29606 * threads.c (mono_threads_get_default_stacksize): New function to
29607 return the default stacksize.
29609 * gc.c (mono_gc_cleanup): Use a separate event for waiting for the
29610 termination of the finalizer thread, since the previous method had
29611 race conditions. Fixes #49628.
29613 * gc.c (mono_gc_init): Use the same stacksize for the finalizer thread
29614 as for the other managed threads.
29616 2003-10-16 Martin Baulig <martin@ximian.com>
29618 * class.c (inflate_generic_signature): Copy `generic_param_count'
29621 * icall.c (ves_icall_MethodInfo_get_IsGenericMethodDefinition):
29624 * metadata.c (mono_metadata_parse_method_signature): Actually set
29625 the `method->generic_param_count' here.
29626 (mono_metadata_load_generic_params): Initialize `pklass' to NULL.
29628 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
29630 * object.h: Add a new field to TypedRef to simplify the implementation
29631 of the REFANY opcodes in the JIT.
29633 * icall.c: Make use of the new field.
29635 * metadata.c (mono_type_size): Compute the size of TYPEDBYREF types
29638 2003-10-15 Martin Baulig <martin@ximian.com>
29640 * class.c (mono_class_from_gen_param): Renamed to
29641 mono_class_from_generic_parameter() and moved most of the
29642 functionality from mono_reflection_define_generic_parameter()
29643 here; ie. we create a "real" class here.
29644 (mono_class_from_mono_type): Only allow MONO_TYPE_VAR and
29645 MONO_TYPE_MVAR if mono_class_from_generic_parameter() has
29646 previously been called.
29648 * class.h (MonoGenericParam): Moved the declaration of this struct
29649 here from metadata.h and added `MonoMethod *method'.
29651 * icall.c (ves_icall_MonoType_get_DeclaringMethod): New
29654 * loader.c (mono_get_method_from_token): If we have any generic
29655 parameters, call mono_metadata_load_generic_params() to read them
29656 from the MONO_TABLE_GENERICPAR.
29658 * metadata.c (mono_metadata_load_generic_params): Added
29659 `MonoMethod *method' argument which is used MONO_TYPE_MVAR.
29661 * metadata.h (MonoMethodSignature): Replaced
29662 `MonoGenericInst *geninst' with `guint16 generic_param_count'.
29663 (MonoMethodHeader): Added `MonoGenericParam *gen_params'.
29665 * reflection.c (mono_reflection_define_generic_parameter): Moved
29666 most of the functionality into the new
29667 mono_class_from_generic_parameter(); set the `method' field if
29668 we're a method parameter.
29670 2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
29672 * marshal.c (emit_struct_conv): if native size is 0
29675 2003-10-14 Martin Baulig <martin@ximian.com>
29677 * icall.c: The generics API has changed in the spec since it was
29678 added to System.Type; these modifications make it match the spec
29680 (ves_icall_Type_GetGenericParameters): Renamed to
29681 `ves_icall_Type_GetGenericArguments'.
29682 (ves_icall_Type_get_IsGenericTypeDefinition): New interncall.
29683 (ves_icall_MonoType_get_HasGenericParameteres): Renamed to
29684 `ves_icall_MonoType_get_HasGenericArguments'.
29685 (ves_icall_MonoType_get_IsUnboundGenericParameter): Renamed to
29686 `ves_icall_MonoType_get_IsGenericParameter'.
29687 (ves_icall_MonoType_get_HasUnboundGenericParameters): Removed;
29688 this is no interncall anymore.
29689 (ves_icall_TypeBuilder_get_IsUnboundGenericParameter): Renamed to
29690 `ves_icall_TypeBuilder_get_IsGenericParameter'.
29692 2003-10-14 Martin Baulig <martin@ximian.com>
29694 * reflection.c (mono_reflection_bind_generic_parameters): Also
29695 inflate generic methods if we're reading the class from IL.
29697 2003-10-13 Martin Baulig <martin@ximian.com>
29699 * reflection.c (mono_reflection_define_generic_parameter): This
29700 method isn't called directly from the icall anymore; take a
29701 `MonoReflectionAssemblyBuilder *' so we can use this for type and
29702 method generic parameters.
29703 (ReflectionMethodBuilder): Added `MonoArray *generic_param'.
29704 (method_builder_encode_signature): Encode generic parameters.
29705 (mono_image_get_method_info): Write generic params to the
29706 MONO_TABLE_GENERICPARAM table.
29708 * reflection.h (MonoReflectionMethodBuilder): Added
29709 `MonoArray *generic_params'.
29711 * metadata.h (MonoMethodSignature): Added `MonoGenericInst *geninst'.
29713 * icall.c (ves_icall_TypeBuilder_define_generic_parameter): Added
29714 wrapper for mono_reflection_define_generic_parameter().
29715 (ves_icall_MethodBuilder_define_generic_parameter): Likewise.
29717 2003-10-13 Zoltan Varga <vargaz@freemail.hu>
29719 * marshal.h: Add missing function to fix build.
29721 * marshal.c (mono_marshal_get_native_wrapper): Add support for
29722 the SetLastError pinvoke attribute.
29724 * marshal.c (mono_marshal_set_last_error): New helper function called
29725 by the generated code.
29727 * marshal.c (mono_mb_emit_branch): New helper function.
29729 * marshal.c (mono_mb_emit_exception): Added exception name parameter.
29731 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
29732 classes as parameters and return values of delegates. Fixes #29256.
29734 2003-10-12 Bernie Solomon <bernard@ugsolutions.com>
29736 * locales.c: use gint32 in non HAVE_ICU case
29738 2003-10-11 Martin Baulig <martin@ximian.com>
29740 * mono-debug.c (mono_debug_add_method): Added a workaround for
29743 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
29745 * marshal.c (mono_marshal_get_managed_wrapper): Under windows,
29746 delegates passed to native code must use the STDCALL calling
29747 convention. Fixes #35987.
29749 2003-10-10 Martin Baulig <martin@ximian.com>
29751 * class.c (inflate_generic_type): If we're inflating for a generic
29752 type instance (and not for a generic method), return
29753 MONO_TYPE_MVAR unchanged.
29755 2003-10-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29757 * string-icalls.c: Join ignores null strings in the source array.
29758 * threadpool.[ch]: export busy_worker_threads, not mono_worker_threads.
29759 * threads.c: GetAvailableTheads is slightly more accurate.
29761 2003-10-09 Bernie Solomon <bernard@ugsolutions.com>
29763 * threads.h threads.c : add mono_threads_set_default_stacksize
29764 and pass default to CreateThread calls.
29766 2003-10-09 Dick Porter <dick@ximian.com>
29770 * locales.c: Internal calls for constructing CultureInfo and
29771 related objects from libicu (if its available.)
29773 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
29775 * debug-helpers.c (wrapper_type_names): Add 'unknown' wrapper type.
29777 2003-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29779 * threadpool.c: added an argument to async_invoke_thread that is the
29780 item to process, pass the MonoAsyncResult to the thread start function
29781 when creating a new thread. This way we don't need to acquire any lock
29782 when we're creating a new thread. Readded a semaphore for faster
29783 response times (instead of that Sleep i added).
29785 2003-10-08 Bernie Solomon <bernard@ugsolutions.com>
29787 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
29788 get daylight change dates better on Windows, fix handling
29789 of platforms without tm_gmtoff.
29791 2003-10-06 Martin Baulig <martin@ximian.com>
29793 * class.c (inflate_generic_method): Renamed to
29794 mono_class_inflate_generic_method() and made public.
29795 (mono_class_init): Don't inflate the generic methods here.
29796 (mono_class_from_generic): Added `gboolean inflate_methods'
29797 argument. Inflate the methods here.
29799 * loader.c (mono_method_get_param_names): Ignore instances of
29800 generic types for the moment.
29802 * reflection.c (fixup_method): Added support for inflated methods.
29803 (mono_image_create_token): Use mono_image_get_methodref_token()
29804 for inflated methods.
29805 (mono_custom_attrs_from_param): Ignore instances of generic types
29807 (mono_reflection_bind_generic_parameters): New public function.
29808 Moved all the functionality from
29809 ves_icall_Type_BindGenericParameters() here and added support for
29811 (mono_reflection_define_generic_parameter): Initialize
29812 `klass->methods' here.
29814 * icall.c (ves_icall_Type_BindGenericParameters): Moved all the
29815 functionality into mono_reflection_define_generic_parameter().
29816 (ves_icall_Type_GetGenericTypeDefinition): If we're coming from a
29817 TypeBuilder, return that TypeBuilder.
29819 2003-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29821 * appdomain.c: removed mono_delegate_semaphore.
29824 (mono_thread_pool_add): moved hash table creation inside and the thread
29825 creation outside of the critical region.
29826 (mono_thread_pool_finish): removed obsolete code.
29827 (async_invoke_thread): don't use the semaphore. Use a plain Sleep and
29828 continue or exit the thread depending on the queue.
29830 2003-10-07 Bernie Solomon <bernard@ugsolutions.com>
29832 * metadata.c (mono_type_to_unmanaged): allow bools to marshal as I1
29833 marshal.c (emit_ptr_to_str_conv & mono_marshal_get_native_wrapper):
29834 handle more bool marshalling options
29836 2003-10-07 Zoltan Varga <vargaz@freemail.hu>
29838 * marshal.c (mono_marshal_get_native_wrapper): Fix marshalling of
29839 arrays of structs. Also add a more descriptive error message when
29840 a structure member is marshalled as LPArray.
29842 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
29844 * marshal.c (mono_marshal_get_native_wrapper): Add support for
29845 marshalling arrays of complex types. Fixes #29098. Also remove an
29846 usused and incomplete function.
29848 Mon Oct 6 15:38:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
29850 * gc.c: report heap_size - free_bytes as total memory allocated
29853 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
29855 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Finally
29856 fix timezone handling problems on Windows.
29858 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Avoid
29859 asserts when the year is outside the range handled by ms the functions.
29861 * class.c (setup_interface_offsets): If the class is an interface,
29862 fill out its interface_offsets slot.
29864 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29866 * threadpool.c: mark threadpool threads as background.
29868 2003-10-03 Bernie Solomon <bernard@ugsolutions.com>
29870 * decimal.c - define DECINLINE to nothing if not using GCC
29872 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
29874 * assembly.c: More refcount fixes.
29876 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29878 * string-icalls.c: if we're not trimming, return the same string.
29879 When not splitting, don't create a new string.
29881 2003-10-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29884 (mono_image_open): increment the ref_count inside the critical section.
29886 2003-10-02 Zoltan Varga <vargaz@freemail.hu>
29888 * image.c (mono_image_open): Fix reference counting bug.
29890 2003-09-30 Bernie Solomon <bernard@ugsolutions.com>
29892 * marshal.c (mono_marshal_type_size) struct alignment changed for
29893 64bit machines. (emit_ptr_to_str_conv) Fix bool conversions for
29894 64bits. Avoid leak in mono_marshal_get_native_wrapper when
29895 mono_lookup_pinvoke_call throws.
29897 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
29899 * reflection.c (mono_reflection_parse_type): Fix #49114.
29901 * file-io.c (ves_icall_System_IO_MonoIO_GetFileAttributes): Add
29902 temporary workaround for cygwin header problem.
29904 * object.c (mono_object_isinst): Synchronize this with the code
29905 generated by the JIT for casts.
29907 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
29909 * reflection.c (encode_type): Fix #38332.
29911 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
29913 * marshal.c (mono_marshal_method_from_wrapper): New function to return
29914 the original method from the wrapper method.
29916 2003-09-25 Martin Baulig <martin@ximian.com>
29918 * icall.c (ves_icall_Type_IsGenericTypeDefinition): Removed this
29919 interncall since it was identical to `Type.GetGenericTypeDefinition()'.
29920 (ves_icall_Type_get_IsGenericInstance): New interncall.
29922 2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
29924 * object.c: fix cast warning in big endian code.
29926 2003-09-19 Jackson Harper <jackson@latitudegeo.com>
29928 * icall.c: Timezone patch from Zoltan Varga (vargaz@freemail.hu)
29930 2003-09-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
29932 * assembly.c: don't call check_env from mono_assembly_load. It's
29933 already done once in mono_assemblies_init and may cause headaches when
29934 multiple threads are loading assemblies.
29936 2003-09-19 Martin Baulig <martin@ximian.com>
29938 * reflection.c (mono_reflection_define_generic_parameter): Don't
29939 allocate `klass->methods', set `klass->flags' to
29940 TYPE_ATTRIBUTE_INTERFACE, not TYPE_ATTRIBUTE_ABSTRACT.
29942 2003-09-18 Martin Baulig <martin@ximian.com>
29944 * class.c (mono_class_init): Don't create `class->methods' if it's
29945 already initialized.
29947 * metadata.c (mono_metadata_load_generic_params): Make this
29950 * reflection.c (mono_reflection_define_generic_parameter): Set
29951 parent class and interfaces from the constraints.
29953 * reflection.h (MonoReflectionGenericParam): Added `guint32 flags'
29954 to keep this struct in sync with the declaration in TypeBuilder.cs.
29956 2003-09-17 Martin Baulig <martin@ximian.com>
29958 * metadata.h (MonoType): Replaced the data's `int type_param'
29959 field with `MonoGenericParam *generic_param'.
29960 (MonoGenericParam): Added `MonoClass *klass'.
29962 * class.c (mono_class_from_gen_param): Removed the
29963 `MonoImage *image' and `int type_num' arguments.
29965 * metadata.c (mono_metadata_parse_generic_param): New static
29966 method; creates a MonoGenericParam which just contains the index.
29967 (do_mono_metadata_parse_type): Call
29968 mono_metadata_parse_generic_param() for MONO_TYPE_VAR and
29971 * reflection.c (mono_image_typedef_or_ref): Generic type
29972 parameters may be in the same assembly, but never use a typedef
29974 (mono_reflection_define_generic_parameter): We're now creating a
29975 "real" class for the type parameter; it's now safe to call
29976 mono_class_from_mono_type() on the class'es type, it'll do the
29979 2003-09-16 Martin Baulig <martin@ximian.com>
29981 * mono-debug-debugger.c (allocate_symbol_file_entry): Initialize
29982 `symfile->range_entry_size' and `symfile->class_entry_size' here;
29983 the `symfile' data structure must be fully initialized before it
29984 gets added to the table.
29986 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
29988 * icall.c (ves_icall_Type_IsArrayImpl): Added MONO_ARCH_SAVE_REGS.
29990 * appdomain.h domain.c (MonoDomain): Added new hashtable to store the
29991 class init trampolines.
29993 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
29995 * profiler.c (mono_profiler_load): Added '-time' and '-alloc' options
29996 to the built-in profiler to turn off time and allocation profiling
29999 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
30001 * profiler.c (mono_profiler_coverage_alloc): Use NULL instead of
30004 * debug-helpers.c (mono_method_full_name): Print the wrapper type
30005 in human readable form.
30007 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
30009 * reflection.c icall.c: Fixed warnings.
30011 * image.c (load_class_names): Use a temporary hash table to hold the
30012 namespaces in order to avoid doing many string comparisons.
30014 * image.h: Fix typo.
30016 * image.c class.c rawbuffer.c reflection.c threads.c verify.c domain.c:
30017 Pass NULL instead of g_direct_equal to the GHashTable constructor
30018 since the NULL case is short-circuited inside g_hash_table_lookup,
30019 leading to better performance.
30021 * metadata.c (mono_metadata_custom_attrs_from_index): New function to
30022 obtain the first custom attribute for a given index. Depends on the
30023 CustomAttribute table being sorted by the parent field.
30025 * reflection.c (mono_custom_attrs_from_index): Use the new function
30026 for better performance.
30028 2003-09-07 Martin Baulig <martin@ximian.com>
30030 * class.c (mono_class_init): If we're a generic instance, inflate
30031 all our methods instead of loading them from the image.
30032 (mono_class_from_generic): Set `class->methods = gklass->methods'.
30034 2003-09-07 Martin Baulig <martin@ximian.com>
30036 * mono-debug-debugger.c: Added support for constructors.
30038 2003-09-06 Martin Baulig <martin@ximian.com>
30040 * icall.c (ves_icall_TypeBuilder_get_IsUnboundGenericParameter):
30043 * reflection.c (mono_reflection_setup_generic_class): Call
30044 ensure_runtime_vtable() to create the vtable.
30046 2003-09-05 Martin Baulig <martin@ximian.com>
30048 * class.c (mono_class_array_element_size): Added MONO_TYPE_VAR and
30051 2003-09-04 Martin Baulig <martin@ximian.com>
30053 * reflection.c (mono_reflection_define_generic_parameter): Generic
30054 parameters start with zero.
30056 2003-09-04 Martin Baulig <martin@ximian.com>
30058 * metadata.c (mono_type_size): Added MONO_TYPE_VAR and MONO_TYPE_MVAR.
30060 * reflection.h (MonoReflectionGenericParam): New typedef.
30061 (MonoReflectionTypeBuilder): Added `generic_params' fields to get
30062 the generic parameters from the managed TypeBuilder.
30064 * reflection.c (mono_reflection_define_generic_parameter): New function.
30065 (mono_reflection_create_runtime_class): Encode generic parameters.
30066 (mono_reflection_setup_generic_class): New function; this is
30067 called after adding adding all generic params to the TypeBuilder.
30068 (encode_type): Added MONO_TYPE_VAR.
30070 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
30072 * class.h class.c (mono_class_needs_cctor_run): Moved this method
30075 * assembly.h assembly.c: Moved the AOT loading code into an assembly
30078 2003-09-03 Zoltan Varga <vargaz@freemail.hu>
30080 * reflection.h reflection.c class.h class.c: Delete duplicate
30081 definition of mono_type_get_name () from reflection.c and export the
30084 * class.c: Class loading fixes from Bernie Solomon
30085 (bernard@ugsolutions.com).
30087 * reflection.c: Endianness fixes from Bernie Solomon
30088 (bernard@ugsolutions.com).
30090 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
30092 * assembly.h assembly.c: Define a file format version for AOT
30095 * assembly.c (mono_assembly_open): Fix leaking of MonoImage-s.
30097 * appdomain.h (MonoJitInfo): New field to determine whenever the
30098 code is domain neutral.
30100 2003-08-31 Miguel de Icaza <miguel@ximian.com>
30102 * marshal.c (emit_struct_conv): Add MONO_TYPE_CHAR
30104 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
30106 * icall.c (ves_icall_System_Web_Util_ICalls_get_machine_install_dir):
30107 (ves_icall_System_Configuration_DefaultConfig_get_machine_config_path):
30108 Avoid caching the result since strings must be domain specific. Fixes
30111 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
30113 * marshal.c (mono_marshal_init): Make this callable multiple times
30114 since it is hard to find a correct place to call it.
30116 * object.c (mono_runtime_class_init): Execute static constructors in
30117 the correct appdomain.
30119 * image.c (build_guid_table): Handle the case when multiple images have
30122 2003-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30124 * icall.c: added a couple of icalls for System.Web.
30126 2003-08-28 Martin Baulig <martin@ximian.com>
30128 * icall.c (ves_icall_Type_BindGenericParameters): Use
30129 `klass->generic_inst' instead of `&klass->byval_arg' in the
30130 mono_type_get_object() call. The returned type must be
30131 MONO_TYPE_GENERICINST and not MONO_TYPE_CLASS.
30133 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
30137 * object.c (mono_class_proxy_vtable): Make it thread safe.
30139 * pedump.c: Fix warning.
30141 * object.c appdomain.h: Get rid of metadata_section.
30142 It is no longer needed and it was causing deadlocks with domain->lock.
30144 * appdomain.c (add_assemblies_to_domain): Make it thread safe.
30146 2003-08-26 Martin Baulig <martin@ximian.com>
30148 * pedump.c (main): Don't call mono_image_close() if `verify_pe'.
30150 2003-08-26 Martin Baulig <martin@ximian.com>
30152 * pedump.c (main): Call mono_metadata_init(),
30153 mono_raw_buffer_init(), mono_images_init(), mono_assemblies_init()
30154 and mono_loader_init().
30156 2003-08-26 Zoltan Varga <vargaz@freemail.hu>
30158 * loader.h: Add missing include to fix build.
30160 * image.h: mono_image_load_references is no more.
30162 * assembly.c: Reworked assembly loading to make it really thread safe.
30163 After these changes, the assembly returned by mono_assembly_open is
30164 fully initialized, i.e. all its references assemblies are loaded.
30166 * assembly.c (mono_image_load_references): Renamed to
30167 mono_assembly_load_references, and made private, since clients no
30168 longer need to call it.
30170 * class.c: Removed calls to mono_assembly_load_references, since it was
30171 a source of deadlocks.
30173 * loader.h loader.c class.h class.c: Protect data structures using a
30174 new lock, the loader lock.
30176 * class.c (mono_class_setup_vtable): Create temporary hash tables and
30177 GPtrArrays only when needed.
30179 * class.c (mono_class_layout_fields): Ignore the dummy field inserted
30180 into empty structures by mcs. Fixes pinvoke7.cs.
30182 * domain.c (mono_init): Call a new initialization function.
30184 * appdomain.c (mono_runtime_init): Call the new initializer function
30185 of the marshal module.
30187 * marshal.c (mono_marshal_load_type_info): Ignore the dummy field
30188 inserted into empty structures by mcs. Fixes pinvoke7.cs.
30190 * marshal.h marshal.c: Added locks around the wrapper caches to make
30191 this module thread safe.
30193 * icall.c (ves_icall_InternalInvoke): Method wrappers doesn't require a
30194 this argument. Fixes pinvoke1.exe.
30196 2003-08-25 Lluis Sanchez <lluis@ximian.com>
30198 * object.h: Added call_type field to MonoMethodMessage and the corresponding
30199 enumeration of values. Removed fields to store remote call output values in
30200 MonoAsyncResult. Not needed any more.
30201 * object.c: Initialize call_type and async_result fields in mono_message_init.
30202 * marshal.c: mono_delegate_begin_invoke(): for proxies, set call_type before
30203 dispatching the message.
30204 mono_delegate_end_invoke (): delegate to the proxy the work of waiting for the
30205 async call to finish. To do it use a message with EndInvoke call type.
30207 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
30209 * loader.h loader.c (mono_method_hash_marhal_info): New function which
30210 determines whenever a method has marshalling info.
30212 2003-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30214 * assembly.c: fix the build on windows.
30216 2003-08-22 Lluis Sanchez <lluis@ximian.com>
30218 * object.cs: Fixed bug #47785.
30220 2003-08-22 Jackson Harper <jackson@latitudegeo.com>
30222 * string-icalls.c (StringReplace): If their are no occurances of
30223 the old string found return a reference to the supplied
30224 string. This saves some memory and matches MS behavoir.
30226 2003-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30228 * socket-io.c: fixed compilation for systems that define AF_INET6
30229 and don't define SOL_IP/SOL_IPV6.
30231 2003-08-21 Zoltan Varga <vargaz@freemail.hu>
30233 * object.c (mono_object_isinst): Fix casts to TransparentProxy in
30234 the interpreter. Patch by Bernie Solomon (bernard@ugsolutions.com).
30236 * rawbuffer.c rawbuffer.h: Make this module thread safe.
30238 * domain.c: Make this module thread safe.
30240 * domain.c (mono_init): Call new initialization function.
30242 * icall.c (ves_icall_System_Array_SetValueImpl): Check types for
30243 reference types too. Fixes #38812.
30245 * image.c (mono_image_init): Fixed warnings.
30247 * class.c (mono_class_from_typeref): Handle assembly load failure
30250 * appdomain.c (add_assemblies_to_domain): Handle the case when
30251 the references of an assembly are not yet loaded.
30253 * metadata.c image.c assembly.c: Moved initialization of global
30254 variables to a separate function called at startup since lazy
30255 initialization of these variables is not thread safe.
30257 * image.c assembly.c: Made this module thread safe by adding locks in
30258 the appropriate places.
30260 * domain.c (mono_init): Call the new initialization functions of the
30263 2003-08-20 Lluis Sanchez Gual <lluis@ximian.com>
30265 * marshal.c: mono_delegate_begin_invoke(): If the target is a proxy,
30266 make a direct call. It is proxy's work to make the call asynchronous.
30267 mono_delegate_end_invoke(): If the targe is a proxy, just collect
30269 * object.cs: mono_method_call_message_new(): read AsyncResult and
30270 state object from parameters list, if this info is requested.
30271 * object.h: Added fields to store remote call output values in
30272 MonoAsyncResult. Added AsyncResult field in MonoMethodMessage.
30274 Wed Aug 20 12:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
30276 * object.h: add needed fields to MonoThread.
30277 * threads.c, threads.h: allow registering a function to cleanup data
30278 allocated per thread by the JIT.
30280 Tue Aug 19 18:22:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
30282 * loader.h: portability fix by Bernie Solomon
30283 * <bernard@ugsolutions.com>.
30285 2003-08-16 Zoltan Varga <vargaz@freemail.hu>
30287 * reflection.h reflection.c (mono_param_get_objects): Changed this to
30288 return a MonoArray. This simplifies the code and also ensures that
30289 the cache allways contains an object reference as a value.
30291 * icall.c (ves_icall_get_parameter_info): Simplified using the new
30294 2003-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30296 * socket-io.c: patch by Bernie Solomon <bernard@ugsolutions.com> that
30297 fixes a problem with byte ordering when getting the address family for
30300 2003-08-15 Zoltan Varga <vargaz@freemail.hu>
30302 * .cvsignore: Added monosn.
30304 * reflection.h reflection.c loader.c: Added support for parameter
30305 marshalling to dynamically created types. Fixes #47295.
30307 Fri Aug 15 11:42:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
30309 * rand.c: remove useless warnings.
30311 Wed Aug 13 15:49:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
30313 * class.c: implemented ldtoken for methods and fieldrefs.
30315 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30317 * threadpool.c: when mono_async_invoke was called, no one took care of
30318 monitoring the queue. So if the method invoked took some time and we
30319 got new async invoke requests after 500 ms (the thread created waited
30320 that long in WaitForSingleObject), the new async invoke was not called
30321 until the previous one finished.
30323 This is fixed now. Thanks to Totte for helping with it.
30325 2003-08-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30327 * threadpool.c: set threadpool_thread to TRUE. Patch by totte.
30329 2003-08-11 Martin Baulig <martin@ximian.com>
30331 * mono-debug-debugger.c (mono_debugger_lookup_type): New function.
30333 2003-08-06 Martin Baulig <martin@ximian.com>
30335 * mono-debug-debugger.c: Added support for static fields,
30336 properties and methods.
30338 2003-08-06 Martin Baulig <martin@ximian.com>
30340 * mono-debug-debugger.c: Don't store the MonoString's vtable to
30341 make this work for applications with multiple application domains.
30343 2003-08-04 Martin Baulig <martin@ximian.com>
30345 * mono-debug-debugger.c: Completely reworked the type support; the
30346 most important thing is that we're now just using one single
30347 `MonoType' instance per type.
30349 Sat Aug 2 13:05:27 BST 2003 Malte Hildingson <malte@amy.udd.htu.se>
30351 * mono-endian.h, mono-endian.c, icall.c: Added icall
30352 ves_icall_System_Double_AssertEndianity to assert double word endianity
30353 on ARM (FPA). The icall uses a macro defined in mono-endian.h.
30355 Fri Aug 1 16:51:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
30357 * class.c, class.h, reflection.c, metadata.c, icall.c: more generics
30358 support, icalls and fixes.
30360 2003-07-31 Miguel de Icaza <miguel@ximian.com>
30362 * unicode.c (ves_icall_System_Char_IsPunctuation): The set of
30363 classes that are a punctuation character in .NET is not the same a
30366 Tue Jul 29 18:07:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
30368 * socket-io.c: ipv6 portability fixes from Felix Ortga (guile@lared.es).
30370 2003-07-29 Miguel de Icaza <miguel@ximian.com>
30372 * icall.c: Add new MemCopy internalcall.
30373 (ves_icall_System_Reflection_Assembly_GetManifestResourceInternal):
30374 Simplified code; It is not necessary to handle all the cases here,
30375 as the C# code takes care of it. Only handle the case of the name
30376 resource embedded into the assembly.
30378 Changed signature to return the data pointer and the size of the
30381 2003-07-26 Miguel de Icaza <miguel@ximian.com>
30383 * reflection.c (mono_image_get_method_info): Allow for 0x40 to be
30384 encoded. (Partition II.22.1.7: PInvokeAttribute:SupportsLastErr).
30386 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
30388 * socket-io.c: ignore EINTR error in select.
30390 Tue Jul 29 15:25:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
30392 * class.h, class.c: removed unused subclasses field in MonoClass.
30394 2003-07-29 Lluis Sanchez Gual <lluis@ximian.com>
30396 * icall.c: improve fix of get_base_definition(). If the parent class
30397 doesn't have the mehod, look at the parent of the parent.
30398 * object.c: mono_message_init(): use the attribute PARAM_ATTRIBUTE_OUT
30399 to check if a parameter is an in or out parameter
30400 (PARAM_ATTRIBUTE_IN is not set by default).
30401 mono_method_return_message_restore(): Use mono_class_value_size to
30402 get the size of a value type. mono_type_stack_size (parameterType)
30403 does not return the correct value if parameterType is byRef.
30404 mono_load_remote_field(), mono_load_remote_field_new(),
30405 mono_store_remote_field(), mono_store_remote_field_new():
30406 raise exception if the remote call returns an exception.
30408 2003-07-28 Martin Baulig <martin@ximian.com>
30410 * mono-debug-debugger.c (mono_debugger_runtime_invoke): New
30411 method. This is a wrapper around mono_runtime_invoke() which
30412 boxes the instance object if neccessary.
30414 Fri Jul 25 19:14:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
30416 * class.c, class.h, image.c, image.h, loader.c, metadata.c,
30417 metadata.h, row-indexes.h, verify.c: first cut of generics support.
30419 Thu Jul 24 11:34:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
30421 * icall.c: disable mcs bug workaround.
30423 2003-07-21 Miguel de Icaza <miguel@ximian.com>
30425 * object.c (mono_runtime_class_init): Take the metadata_section
30426 mutex before obtaining the domain mutex.
30428 * appdomain.h: Added definition of metadata_section mutex here.
30430 * object.c: define metadata_mutex here.
30432 2003-07-24 Ravi Pratap <ravi@ximian.com>
30434 * icall.c: Remove the FIXED_MCS_45127 workarounds - this has been
30437 2003-07-24 Lluis Sanchez Gual <lluis@ximian.com>
30439 * reflection.c: Fix bug #46669
30441 2003-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30446 * object.h: fill in the type name for TypeLoadException.
30448 2003-07-23 Ravi Pratap <ravi@ximian.com>
30450 * class.c: Fixes from Paolo in response to bug #45415 (Subclass
30451 relationship between TypeBuilders while compiling corlib) and bug
30452 45993 (Array types returned from the runtime while compiling
30453 corlib were from the loaded corlib).
30455 2003-07-22 Martin Baulig <martin@ximian.com>
30457 * mono-debug-debugger.c: Reworked the type support a bit more;
30458 distinguish between types and classes.
30460 Tue Jul 22 15:48:50 CEST 2003 Paolo Molaro <lupus@ximian.com>
30462 * icall.c: add IsArrayImpl icall.
30464 2003-07-22 Zoltan Varga <vargaz@freemail.hu>
30466 * class.c (mono_class_layout_fields): Fix gc aware auto layout by
30467 initializing real_size only once. Also fix bug #46602.
30469 2003-07-21 Jerome Laban <jlaban@wanadoo.fr>
30471 * object.c: Renamed mono_metadata_section to metadata_section.
30473 2003-07-21 Lluis Sanchez Gual <lluis@ximian.com>
30475 * icall.c: in MS.NET ves_icall_Type_GetInterfaces returns an
30476 empty array if the type is an array. Fixed.
30477 ves_icall_MonoMethod_get_base_definition: if the base method
30478 is abstract, get the MethodInfo from the list of methods of
30480 * reflection.c: ParameterInfo.PositionImpl should be zero-based
30481 and it was 1-based. Fixed in mono_param_get_objects.
30483 2003-07-20 Martin Baulig <martin@ximian.com>
30485 * mono-debug.h: Set version number to 31.
30486 (mono_debug_init): Added `MonoDomain *' argument.
30488 * mono-debug-debugger.c: Reworked the type support; explicitly
30489 tell the debugger about builtin types; pass the `klass' address to
30492 2003-07-20 Jackson Harper <jackson@latitudegeo.com>
30494 * image.c: Allow new metadata tables to be loaded without a
30495 warning. Also update the warning message to give the new constant value.
30497 Fri Jul 18 13:12:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
30499 * class.c, class.h, debug-helpers.c, icall.c, image.c, marshal.c,
30500 metadata.c, metadata.h, mono-debug-debugger.c, object.c, reflection.c:
30501 array type representation changes.
30503 Fri Jul 18 11:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
30505 * icall.c, appdomain.h, appdomain.c: support full runtime shutdown
30506 on Environment.Exit () call.
30508 Thu Jul 17 17:21:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
30510 * icall.c, reflection.h, reflection.c, verify.c: cleanups,
30511 requires a matching corlib.
30513 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
30515 * Changelog: My editor decided to add a CR to each line. Sorry about that.
30516 Committed again without the CRs.
30518 2003-07-17 Lluis Sanchez Gual <lluis@ximian.com>
30520 * socket-io.c: Get system_assembly using mono_image_loaded(), instead
30521 getting it from the "this" socket instance. Did not work
30522 if the socket is a subclass of Socket.
30523 Also fixed bug #35371.
30525 Thu Jul 17 13:39:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
30527 * metadata.c: fixed size for TypedByRef.
30528 * loader.c: when searching for a method, consider the vararg amrker.
30529 * unicode.c, decimal.c: constify some arrays.
30531 2003-07-15 Dick Porter <dick@ximian.com>
30533 * socket-io.c: Fixed compilation for gcc < 3.2.
30535 Fixed compilation for machines that don't have AF_INET6 (thanks to
30536 Bernie Solomon <bernard@ugsolutions.com> for that part.)
30538 Fixed compile warnings.
30540 Fixed formatting and line endings.
30542 2003-07-14 Jerome Laban <jlaban@wanadoo.fr>
30545 * socket-io.c: Added IPv6 support.
30547 2003-07-13 Zoltan Varga <vargaz@freemail.hu>
30549 * class.c (mono_class_is_assignable_from): New function to implement
30550 the is_assignable_from logic. Used by mono_object_isinst,
30551 Type::IsAssignableFrom () and the interpreter.
30553 * class.c (mono_class_is_subclass_of): Make all classes a subclass of
30554 Object, even interfaces.
30556 * object.c (mono_object_isinst): Implement in terms of
30557 is_assignable_from.
30559 * icall.c (ves_icall_type_is_assignable_from): New icall.
30561 2003-07-11 Zoltan Varga <vargaz@freemail.hu>
30563 * domain.c (foreach_domain): fix compiler warning.
30565 2003-07-11 Dietmar Maurer <dietmar@ximian.com>
30567 * image.c (load_metadata_ptrs): use g_strndup because strndup is
30568 not available on all plattforms
30570 2003-07-10 Zoltan Varga <vargaz@freemail.hu>
30572 * image.h image.c: Store the metadata version string in MonoImage.
30573 * icall.c: New icall to retrieve the image version.
30574 * reflection.c (create_dynamic_image): Fill in the image version field
30575 * reflection.c (build_compressed_metadata): Use the image version
30576 from the image structure.
30578 2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30580 * appdomain.c: modified comment.
30581 * gc.c: finalizer_thread can call finalizers even when finished == TRUE.
30582 That will be its last iteration when mono_gc_cleanup is called from
30583 mono_runtime_cleanup and before the domain is unloaded.
30587 2003-07-04 Dietmar Maurer <dietmar@ximian.com>
30589 * marshal.c (mono_marshal_get_native_wrapper): fixes for [out]
30592 Thu Jul 3 17:22:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
30594 * object.c, file-io.c, metadata.c, mono-endian.h, reflection.c,
30595 rawbuffer.c: more 64 bit and picky (or old) compiler fixes from
30596 Bernie Solomon <bernard@ugsolutions.com>.
30598 Thu Jul 3 17:17:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
30600 * object.c, object.h: provide mono_object_new_fast() for faster
30601 allocation in some special cases.
30603 Wed Jul 2 13:21:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
30605 * object.h, reflection.h, verify.c: fixes for some 64bit issues,
30606 mostly from a patch by Laramie Leavitt <lar@leavitt.us>.
30608 Tue Jul 1 21:24:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
30610 * threadpool.c: fix leaks.
30612 2003-07-01 Dick Porter <dick@ximian.com>
30614 * threadpool.c (mono_async_invoke): Use mono_g_hash_table_remove when
30615 using MonoGHashTables. Fixes threadpool bug posted to list.
30617 Tue Jul 1 11:45:40 CEST 2003 Paolo Molaro <lupus@ximian.com>
30619 * image.h, image.c: added support to load an assembly from a byte array.
30620 * Makefile.am, assembly.c, make-bundle.pl, sample-bundle: added
30621 assembly bundle support.
30623 2003-06-27 Dietmar Maurer <dietmar@ximian.com>
30625 * threadpool.c (mono_thread_pool_add): keep a reference to the
30626 AsyncResult to prevent GC
30628 Thu Jun 26 12:13:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
30630 * class.c: leak fix.
30632 2003-06-25 Dick Porter <dick@ximian.com>
30634 * threadpool.c (mono_thread_pool_add): Don't set up a finaliser
30635 for the async object, the WaitHandle object will close the handle.
30638 Wed Jun 25 18:12:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
30640 * class.c: in mono_array_class_get (), lookup from the hash with the
30641 same type we insert: this works around a bug in
30642 mono_metadata_type_hash() with SZARRAY and fixes a leak reported by
30643 lluis. The real fix will have to wait for after the release.
30645 Wed Jun 25 13:14:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
30647 * icall.c: fix memory leak when getting type members.
30649 Mon Jun 23 16:12:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
30651 * reflection.c: added more pubtoken special cases.
30653 Mon Jun 23 15:29:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
30655 * class.c: handle field offset correctly when class size
30656 is set (bug# 45182, partially from a patch by jlaban@wanadoo.Fr (Jerome Laban)).
30658 2003-06-20 Martin Baulig <martin@ximian.com>
30660 * mono-debug-debugger.h (MonoDebuggerSymbolFile): Added `MonoImage
30663 2003-06-20 Martin Baulig <martin@ximian.com>
30665 * image.h, mono-debug-debugger.h: Fixed compiler warnings.
30667 2003-06-20 Martin Baulig <martin@ximian.com>
30669 * mono-debug.h (MONO_DEBUG_VAR_ADDRESS_MODE_STACK): Removed. We
30670 just distinguish between variables in registers and variables at
30671 an offset relative to a register.
30673 2003-06-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30675 * icall.c: #ifdef out latest changes until mcs is fixed.
30677 Thu Jun 19 11:03:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
30679 * icall.c: return members in metadata order.
30681 Wed Jun 18 15:26:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
30683 * icall.c: avoid infinite loop in GetTimeZoneData.
30685 Wed Jun 18 12:47:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
30687 * icall.c: added Marshal.Prelink/All icalls.
30689 Wed Jun 18 12:17:48 CEST 2003 Paolo Molaro <lupus@ximian.com>
30691 * object.c, object.h: fix warnings and do some overflow checking
30692 when creating arrays.
30694 2003-06-17 Dick Porter <dick@ximian.com>
30697 * file-io.c: File attributes need to be tweaked slightly when
30698 passed from the managed to the w32 world.
30700 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
30701 * profiler.h profiler-private.h profiler.c: Rework last patch
30702 based on suggestion by Paolo.
30704 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
30706 * profiler.h profiler-private.h profiler.c: Added infrastructure for
30707 instruction level coverage data collection.
30708 * profiler.h profiler.c (: Added new callback function which can be
30709 used by the profiler to limit which functions should have coverage
30711 * profiler.c (mono_profiler_load): Call g_module_build_path to
30712 generate the file name of the profiler library.
30714 Mon Jun 16 18:11:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
30716 * profiler.c, profiler.h, profiler-private.h: added basic block
30717 coverage profiling API.
30719 2003-06-15 Zoltan Varga <vargaz@freemail.hu>
30721 * reflection.c (mono_reflection_create_runtime_class): Add support
30722 for events in dynamically generated code.
30724 * gc.c: Start GCHandle indexes from 1, since 0 means the handle is
30727 Sat Jun 14 19:01:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
30729 * icall.c: when getting timezone info, return reasonable values if we
30730 can't get the actual data.
30732 2003-06-14 Dick Porter <dick@ximian.com>
30734 * threads.c (start_wrapper): Remove the reference to the thread
30735 object in the TLS data, so the thread object can be finalized.
30736 This won't be reached if the thread threw an uncaught exception,
30737 so those thread handles will stay referenced :-( (This is due to
30738 missing support for scanning thread-specific data in the Boehm GC
30739 - the io-layer keeps a GC-visible hash of pointers to TLS data.)
30741 Sat Jun 14 13:16:17 CEST 2003 Paolo Molaro <lupus@ximian.com>
30743 * reflection.c: ensure streams and tables are first allocated with
30744 ALLOC_ATOMIC (GC_realloc uses plain GC_malloc otherwise).
30746 Sat Jun 14 13:13:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
30748 * icall.c: fixed GetElementType for byrefs (bug# 44792).
30750 2003-06-13 Zoltan Varga <vargaz@freemail.hu>
30752 * reflection.c (mono_reflection_create_runtime_class): Add support for
30753 properties to dynamically created classes.
30754 * reflection.c: Fix a few places where non-MonoObjects were inserted
30755 into the tokens hashtable.
30757 Fri Jun 13 19:10:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
30759 * object.c: some support to handle out of memory exceptions.
30761 2003-06-12 Dietmar Maurer <dietmar@ximian.com>
30763 * marshal.c (mono_marshal_get_native_wrapper): support reference
30766 Wed Jun 11 18:32:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
30768 * object.h, object.c: more portability stuff from Bernie Solomon.
30769 Unexport mono_object_allocate(). Added mono_object_unbox ().
30770 Set exitcode when an unhandled exception is thrown.
30772 2003-06-11 Dietmar Maurer <dietmar@ximian.com>
30774 * marshal.c (mono_marshal_get_native_wrapper): use custom
30775 marshaler for return types.
30777 2003-06-10 Dick Porter <dick@ximian.com>
30779 * socket-io.c: Don't assume that one of struct ip_mreqn or struct
30780 ip_mreq is available
30782 Tue Jun 10 17:35:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
30784 * debug-mono-symfile.c, marshal.c, metadata.c, monitor.c,
30785 mono-debug-debugger.c, mono-debug.c, process.c: portability fixes
30786 by Bernie Solomon <bernard@ugsolutions.com>.
30788 2003-06-10 Zoltan Varga <vargaz@freemail.hu>
30790 * gc.c (mono_gc_init): Avoid error message on shutdown when
30791 GC_DONT_GC=1 is used.
30793 * icall.c (ves_icall_System_Reflection_Module_GetGuidInternal):
30794 New icall to return the GUID of a module.
30796 Mon Jun 9 19:33:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
30798 * class.c: ensure instance size always includes the parent's size
30799 even whem class size is set explicitly (fixes bug#44294).
30801 Thu Jun 5 19:51:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
30803 * profiler.h, profiler.c: made the simple profiler thread-safe,
30804 get more accurate timing info. Allow the loading of an
30805 externally-developed profiler module.
30807 2003-06-05 Dietmar Maurer <dietmar@ximian.com>
30809 * marshal.c (mono_marshal_get_native_wrapper): improved
30810 class/byref arguments.
30811 (mono_marshal_get_native_wrapper): better string marshaling support.
30813 Wed Jun 4 18:01:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
30815 * class.c: ensure .pack and .size are handled correctly and
30816 simplified layout of static fields.
30818 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
30821 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): fix for bug 42934
30823 * loader.c (mono_lookup_pinvoke_call): look for modules in the
30824 current directory (fix bug 44008)
30826 2003-06-03 Dietmar Maurer <dietmar@ximian.com>
30828 * marshal.c (mono_marshal_get_native_wrapper): started support for
30830 (mono_delegate_to_ftnptr): consider marshalling specifications
30832 Tue Jun 3 11:17:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
30834 * reflection.c, reflection.h: emit custom marshal info.
30836 2003-06-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30838 * object.c: free the GError.
30839 * icall.c: added CloseEvent_internal.
30841 (ves_icall_System_Threading_Events_CloseEvent_internal): new internal
30844 2003-06-01 Zoltan Varga <vargaz@freemail.hu>
30846 * loader.c (mono_method_get_signature): Add support for dynamic
30849 Sat May 31 15:22:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
30851 * reflection.c: fixed bug #43905.
30853 Fri May 30 12:56:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
30855 * class.c, domain.c, icall.c, metadata.h, object.h: support for
30856 handling TypedReference and ArgIterator.
30857 * loader.c, loader.h: added function to get signature at call site.
30859 Thu May 29 11:34:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
30861 * metadata.c, metadata.h, private.h, tokentype.h, loader.c: make more
30862 data readonly. Buglets and warning fixes. Some MethodSpec support.
30864 Tue May 27 16:34:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
30866 * class.h, class.c, object.c: remove relative numbering support.
30868 2003-05-26 Miguel de Icaza <miguel@ximian.com>
30870 * marshal.c (mono_marshal_get_native_wrapper): For now, do not
30871 free the string, until we get a chance to fix Gtk#
30873 2003-05-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30875 * marshal.c: revert last patch.
30877 Mon May 26 20:21:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
30879 * icall.c: updates for new mono_class_vtable() not calling
30880 the type constructor anymore.
30882 Mon May 26 12:10:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
30884 * object.h, object.c: separate vtable creation from type
30885 initialization. Make running the .cctor thread safe.
30887 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
30889 * marshal.c (mono_marshal_get_native_wrapper): free string return values.
30891 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
30893 * loader.c (mono_get_method): consider calling convention
30895 2003-05-21 Zoltan Varga <vargaz@freemail.hu>
30897 * icall.c (ves_icall_System_Reflection_Module_GetGlobalType): New icall
30898 to return the invisible global type for a module.
30900 * reflection.c (mono_image_build_metadata): Emit global fields too.
30902 2003-05-20 Peter Williams <peterw@ximian.com>
30904 * loader.c (mono_lookup_internal_call): Add a few newlines.
30906 2003-05-20 Zoltan Varga <vargaz@freemail.hu>
30908 * reflection.c (mono_reflection_lookup_dynamic_token): Intern dynamic
30911 * appdomain.c (set_domain_search_path): Recalculate search path when
30912 AppDomainSetup.PrivateBinPath changes.
30914 * object.c (mono_class_compute_gc_descriptor): It turns out some
30915 parts of the class libs (like System.Thread) holds pointers to
30916 GC_MALLOC()-d memory in IntPtrs, which is wrong. The workaround is
30917 to treat native int a pointer type here.
30919 Tue May 20 17:18:16 CEST 2003 Paolo Molaro <lupus@ximian.com>
30921 * appdomain.h, domain.c: add hashtable for jump target resolution.
30923 2003-05-19 Zoltan Varga <vargaz@freemail.hu>
30925 * reflection.h reflection.c icall.c: Added new icalls
30926 GetManifestResourceInfoInternal, GetModulesInternal and support
30929 2003-05-16 Dick Porter <dick@ximian.com>
30933 * file-io.c: Implement System.IO.MonoIO::GetTempPath
30935 2003-05-14 Lluis Sanchez Gual <lluis@ideary.com>
30937 * object.c: mono_store_remote_field: little fix to previous patch.
30939 Wed May 14 18:10:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
30941 * class.c: add constructors to array classes.
30942 * icall.c: special case array construction for InternalInvoke (),
30944 2003-05-14 Zoltan Varga <vargaz@freemail.hu>
30946 * class.h class.c reflection.c object.c: Added support for field
30947 defaults in dynamically generated classes.
30949 Wed May 14 13:35:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
30951 * reflection.c: properly encode charset for ddlimport.
30953 Wed May 14 11:14:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
30955 * threads.c: allow compiling without GC.
30957 Tue May 13 16:41:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
30959 * appdomain.h, object.c, object.h, threads.c, threads.h: added
30960 handling of thread static data.
30962 Tue May 13 16:36:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
30964 * reflection.h, reflection.c: added mono_custom_attrs_free ().
30966 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
30968 * class.c (mono_array_class_get): always set the serializable flags
30969 (mono_array_class_get): always set the SEALED attribute for array types
30971 2003-05-12 Dietmar Maurer <dietmar@ximian.com>
30973 * loader.c (mono_lookup_pinvoke_call): consider Ansi/Unicode
30974 attributes (fix for bug 42021).
30976 2003-05-12 Dick Porter <dick@ximian.com>
30978 * gc.c: Don't run finalizers when the finalizer thread is
30979 finishing up, because the default domain has already been
30982 2003-05-11 Miguel de Icaza <miguel@ximian.com>
30984 * string-icalls.c (ves_icall_System_String_ctor_chara_int_int): if
30985 value is null, we should throw an exception. This is slightly
30986 different than the other conventions used for the constructor.
30988 2003-05-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30990 * socket-io.c: fixed windows build.
30992 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
30994 * socket-io.c: patch by Jerome Laban that fixes bug #42393.
30996 2003-05-10 Zoltan Varga <vargaz@freemail.hu>
30998 * object.c (mono_string_new_wrapper): Compatibility fix for MS
31001 2003-05-09 Zoltan Varga <vargaz@freemail.hu>
31003 * class.c (mono_class_layout_fields): Add experimental GC aware
31004 auto layout facility. Requires class library changes to work correctly.
31006 (mono_class_setup_vtable): Avoid overriding explicit interface
31007 method implementations. Fixes iface3.exe test.
31009 * object.c (mono_class_compute_gc_descriptor): Type I can't hold an
31011 (mono_array_new_specific): Add MONO_ARCH_SAVE_REGS.
31012 (mono_string_new_wrapper): Add MONO_ARCH_SAVE_REGS.
31014 * metadata.h: Add new type classification macro which determines
31015 whenever the type holds an object reference.
31017 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
31019 * marshal.c (mono_marshal_get_native_wrapper): cleanups
31021 2003-05-07 Zoltan Varga <vargaz@freemail.hu>
31023 * gc.c (finalizer_thread): Work around a GC bug.
31025 2003-05-07 Dietmar Maurer <dietmar@ximian.com>
31027 * marshal.c (emit_struct_conv): allow unions
31029 * class.c (class_compute_field_layout): added patches from Jerome Laban <jlaban@wanadoo.fr>
31031 2003-05-06 Dietmar Maurer <dietmar@ximian.com>
31033 * marshal.c (mono_marshal_get_native_wrapper): free strings after pinvoke
31035 2003-05-06 Martin Baulig <martin@ximian.com>
31037 * mono-debug-debugger.h: #include <mono/io-layer/io-layer.h>.
31039 2003-05-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31042 (Select_internal): allow NULLs, don't create arrays if not needed.
31043 Coupled with Socket.cs changes.
31046 (mono_thread_pool_add): use GC_MALLOC to allocate the ASyncCall and
31047 register a finalizer for it that will close the semaphore handle. This
31048 fixes the leak and make Lupus' test run with > 4080 loops.
31050 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
31052 * marshal.c (mono_marshal_get_struct_to_ptr): added fixes from
31053 Jerome Laban (bug #42287)
31055 2003-05-02 Martin Baulig <martin@ximian.com>
31057 * debug-mono-symfile.h
31058 (MonoSymbolFile): Moved declaration into mono-debug.h.
31059 (MonoDebugMethodJitInfo): Likewise.
31060 (mono_debug_open_mono_symbol_file): Take the MonoDebugHandle as
31062 (_mono_debug_address_from_il_offset): Take a
31063 MonoDebugMethodJitInfo instead of a MonoDebugMethodInfo.
31066 (MonoDebugDomainData): New struct.
31067 (mono_debug_get_domain_data): New function.
31068 (mono_debug_add_method): Take an additional `MonoDomain *'
31070 (mono_debug_source_location_from_address): Likewise.
31071 (mono_debug_il_offset_from_address): Likewise.
31072 (mono_debug_address_from_il_offset): Likewise.
31074 Thu May 1 19:40:37 CEST 2003 Paolo Molaro <lupus@ximian.com>
31076 * reflection.c: one more check for null type in custom attrs.
31078 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31080 * reflection.c: avoid warning (comparison is always false due to limited
31081 range of data type).
31083 2003-05-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31085 * icall.c: throw an exception in Type.GetField if the argument 'name'
31088 Wed Apr 30 10:53:09 CEST 2003 Paolo Molaro <lupus@ximian.com>
31090 * reflection.c: fixed handling of enums in named arguments to custom
31091 attributes (bug #42123).
31093 Tue Apr 29 19:15:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
31095 * reflection.c: use the right array element type and handle
31096 a null for a Type argument, too.
31098 Tue Apr 29 15:46:00 CEST 2003 Paolo Molaro <lupus@ximian.com>
31100 * reflection.c: handle arrays as arguments to custom attributes.
31102 Tue Apr 29 11:43:01 CEST 2003 Paolo Molaro <lupus@ximian.com>
31104 * reflection.c: handle a string value in a custom attr
31105 ctor that takes an object.
31107 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
31109 * marshal.c (mono_mb_emit_restore_result): support MONO_TYPE_PTR
31112 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
31114 * icall.c (ves_icall_Type_GetNestedType): Fixed warnings.
31116 2003-04-27 Martin Baulig <martin@ximian.com>
31118 * mono-debug-debugger.h (MonoDebuggerEvent): Renamed
31119 MONO_DEBUGGER_EVENT_BREAKPOINT_TRAMPOLINE to
31120 MONO_DEBUGGER_EVENT_BREAKPOINT.
31121 (mono_breakpoint_trampoline_code): Removed.
31122 (mono_debugger_event_handler): The last argument is now a
31124 (mono_debugger_insert_breakpoint_full): Removed the
31125 `use_trampoline' argument.
31126 (mono_debugger_method_has_breakpoint): Likewise.
31127 (mono_debugger_trampoline_breakpoint_callback): Renamed to
31128 mono_debugger_breakpoint_callback(); take the method and
31129 breakpoint number as arguments.
31131 Sat Apr 26 19:25:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
31133 * metadata.c: fix off by one when loading parameters attributes.
31135 2003-04-24 Martin Baulig <martin@ximian.com>
31137 * mono-debug-debugger.c (mono_debugger_io_layer): Put this back.
31139 2003-04-24 Martin Baulig <martin@ximian.com>
31141 * mono-debug-debugger.c: Moved all code which interacts with the
31142 Mono Debugger here.
31144 * debug-mono-symfile.c: This code now just deals with the symbol
31145 file itself, the debugger code is now in mono-debug-debugger.c.
31147 2003-04-23 Martin Baulig <martin@ximian.com>
31149 * mono-debug.c (mono_debug_source_location_from_il_offset):
31150 New method; like mono_debug_source_location_from_address(), but
31151 takes an IL offset instead of a machine address.
31153 2003-04-23 Martin Baulig <martin@ximian.com>
31155 * debug-mono-symfile.h (MonoDebugLineNumberEntry): Removed the
31156 `line' field; this is now computed by the debugger.
31158 2003-04-23 Martin Baulig <martin@ximian.com>
31160 * mono-debug.[ch]: New files. This is the new debugging interface.
31162 * mono-debug-debugger.[ch]: New files. Moved all code which
31163 interacts with the Mono Debugger here.
31165 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
31167 * domain.c (mono_init): initialize mono_defaults.monitor_class
31169 2003-04-21 Miguel de Icaza <miguel@ximian.com>
31171 * reflection.c (method_encode_code): Add a spicy exception to help
31172 future compiler authors.
31174 2003-04-21 Martin Baulig <martin@ximian.com>
31177 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
31178 Make this work with relative pathnames; g_filename_to_uri() needs
31179 an absolute filename.
31181 2003-04-18 Zoltan Varga <vargaz@freemail.hu>
31183 * icall.c: Track name changes in Object and ValueType.
31185 2003-04-18 Dietmar Maurer <dietmar@ximian.com>
31187 * metadata.c (mono_type_stack_size): size should be a multiple of
31190 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31193 (internal_domain_finalize): moved into mono_domain_finalize. No need
31194 to create another thread because the finalizers will be run in the
31197 (ves_icall_System_GC_WaitForPendingFinalizers): implemented.
31198 (finalizer_notify): if shutting down, wait 2 seconds for the finalizers
31199 to be run (MS does this too).
31201 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
31203 * object.c (mono_class_compute_gc_descriptor): Update comment.
31205 * loader.h marshal.h marshal.c: Added synchronized method wrappers.
31207 * image.h: Add synchronized wrapper cache.
31209 * image.c (do_mono_image_open): Initialize cache.
31211 * reflection.c (create_dynamic_mono_image): Initialize cache.
31213 2003-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31215 * icall.c: patch by Jerome Laban <jlaban@wanadoo.fr> that fixes
31216 ves_icall_System_Buffer_ByteLengthInternal.
31218 Tue Apr 15 13:56:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
31220 * reflection.c: setup klass->nested_in earlier. Allow
31221 a dash in the assembly name.
31223 2003-04-15 Dietmar Maurer <dietmar@ximian.com>
31225 * metadata.c (mono_type_to_unmanaged): dont access
31226 type->data.klass for MONO_TYPE_OBJECT
31227 (mono_type_to_unmanaged): consider System.Delegate class
31229 Tue Apr 15 11:16:05 CEST 2003 Paolo Molaro <lupus@ximian.com>
31231 * class.c: just setup supertypes in the proper place instead of
31232 initializing the full element class for arrays.
31234 Tue Apr 15 11:03:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
31236 * class.c: ensure the element class of arrays is initialized.
31237 Setup the supertype info for array classes, too.
31239 2003-04-14 Miguel de Icaza <miguel@ximian.com>
31241 * icall.c (ves_icall_Type_GetNestedType): Add new internal call.
31243 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31245 * Makefile.am: re-added -m option when running cygpath. This way,
31246 MONO_ASSEMBLIES and MONO_CFG_DIR will contain '/' as directory
31248 * mono-config.c: same codepath for locating mono config file for WIN32
31250 * assembly.c: if mono_assembly_setrootdir is called, don't override
31253 2003-04-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31255 * Makefile.am: patch by Urs Muff <umuff@quark.com> that fixes
31256 MONO_ASSEMBLIES variable.
31258 Fri Apr 11 12:44:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
31260 * icall.c: added Assembly::GetNamespaces() icall.
31262 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31264 * reflection.c: fix from Jaak <jaak@zd.com.pl>.
31266 2003-04-10 Lluis Sanchez Gual <lluis@ideary.com>
31268 * appdomain.c,appdomain.h,icall.c: Added internal method that returns the process guid
31269 * object.c: fixed bug in the construction of vtable for proxies
31271 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
31273 * object.c (mono_array_new): Mark mono_array_new as an icall.
31275 2003-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31277 * class.c: fixed test for public method when overriding interfaces.
31280 Wed Apr 9 15:19:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
31282 * appdomain.h, domain.c: added mono_domain_foreach() to
31283 be able to access the currently loaded appdomains.
31284 * object.c: make string interning work across sppdomains.
31285 Mark some functions for use as icalls.
31287 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
31289 * class.c reflection.c: Fix memory leaks reported by ccmalloc.
31291 * reflection.h reflection.c: Allocate long living data using
31292 GC_MALLOC_ATOMIC so the collector does not need to scan it.
31294 * reflection.c: Double the allocation size in streams instead of
31295 increasing it, to prevent unneccesary copying on large assemblies.
31297 * reflection.c (mono_reflection_create_runtime_class): Avoid vtable
31298 creation if the assembly does not have the Run flag set.
31300 Tue Apr 8 11:19:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
31302 * class.h: avoid the C++ keywords in header files (Jerome Laban
31303 spotted and fixed this).
31305 2003-04-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31308 (mono_unhandled_exception): fill in the arguments for the
31309 UnhandledException event. Only trigger that event for the default
31310 domain (as MS does).
31312 2003-04-04 Zoltan Varga <vargaz@freemail.hu>
31314 * object.c: Improve typed allocation stuff based on suggestions from
31315 Paolo. Also turn it on if the GC library supports it.
31317 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
31319 * object.c object.h class.h: Added experimental typed allocation
31320 facility using the interfaces in gc_gcj.h.
31322 * os/gc_wrapper.h: Added new include files.
31324 2003-04-03 Martin Baulig <martin@ximian.com>
31326 All the following changes are conditional to `WITH_INCLUDED_LIBGC'
31327 which is not yet enabled by default.
31329 * gc.c (mono_gc_init): Set the gc_thread_vtable to our thread
31331 (mono_gc_lock, mono_gc_unlock): New static functions.
31333 * threads.c (mono_gc_stop_world, mono_gc_start_world): New public
31334 functions; stop/start the world for the garbage collector. This
31335 is using the windows API; we need to complete the SuspendThread()/
31336 ResumeThread() implementation in the io-layer to make this work on Unix.
31337 (mono_gc_push_all_stacks): New public function; tells the garbage
31338 collector about the stack pointers from all managed threads.
31340 2003-04-03 Martin Baulig <martin@ximian.com>
31342 * object.h (MonoThread): Added `gpointer stack_ptr'.
31344 * threads.c (start_wrapper): Save the stack pointer in `stack_ptr'.
31346 2003-04-03 Martin Baulig <martin@ximian.com>
31348 * Makefile.am: It's called `cygpath -w', not `cygpath -m'.
31350 2003-04-03 Zoltan Varga <vargaz@freemail.hu>
31352 * reflection.c (typebuilder_setup_fields): Initialize field.first and
31355 2003-04-02 Miguel de Icaza <miguel@ximian.com>
31357 * loader.c (mono_lookup_internal_call): Report the corlib that is
31360 2003-03-05 Aleksey Demakov <avd@openlinksw.com>
31362 * icall.c (ves_icall_type_GetTypeCode): fixed check for
31363 System.DBNull (it's class not valuetype).
31365 Wed Apr 2 18:37:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
31367 * reflection.c: set table_idx in MonoReflectionArrayMethod object even
31368 if the array method was already assigned a token (fixes bug#40646).
31370 2003-04-02 Zoltan Varga <vargaz@freemail.hu>
31372 * reflection.c (mono_reflection_get_type): Attempt type resolve even
31373 if no assembly is given.
31375 2003-04-01 Miguel de Icaza <miguel@ximian.com>
31377 * metadata.h: Added the new tables.
31379 * row-indexes.h: Added definitions for new tables.
31381 * metadata.c: Add schemas for new tables, and add support for
31382 computing the sizes of them.
31384 * class.c: Update for handling the new type cases.
31386 2003-04-01 Dietmar Maurer <dietmar@ximian.com>
31388 * metadata.h (MONO_TYPE_IS_VOID): new macro
31390 2003-03-31 Martin Baulig <martin@ximian.com>
31392 * threads.h (MonoThreadCallbacks): Added `thread_created'.
31394 * threads.c (mono_thread_new_init): Call `thread_created' in the
31395 mono_thread_callbacks.
31397 2003-03-31 Lluis Sanchez Gual <lluis@ideary.com>
31399 * loader.h: added marshalbyrefobject_class to mono_defaults
31400 * domain.c: added initialization of mono_defaults.marshalbyrefobject_class
31401 * icall.c: ves_icall_InternalExecute: fixed bug in field setter and in the
31402 generation of output parameters.
31403 ves_icall_Remoting_RealProxy_GetTransparentProxy: added support for interfaces.
31404 * marshal.c: mono_remoting_wrapper(): avoided call through proxy when the type is
31405 contextbound and the target object belongs to the context of the caller.
31406 * object.h: added context and unwrapped_server variables in MonoRealProxy.
31407 * object.c: Implemented support for interfaces and abstract classes
31408 in mono_class_proxy_vtable. Fixed several methods to avoid unneeded calls through
31409 proxy. Fixed problem when dealing with output parameters in mono_runtime_invoke_array.
31411 2003-03-30 Zoltan Varga <vargaz@freemail.hu>
31413 * class.h class.c (mono_class_is_subclass_of): New function.
31415 * icall.c (ves_icall_System_Array_FastCopy): Added optimized copy
31416 routines for most common case (calls from ArrayList::ToArray).
31418 * icall.c (ves_icall_System_Environment_Exit): Call profiler shutdown
31419 routine so programs which call Environment::Exit() can be profiled.
31421 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
31422 Added MONO_ARCH_SAVE_REGS.
31424 * icall.c (ves_icall_type_is_subtype_of): Use new function.
31426 2003-03-29 Miguel de Icaza <miguel@ximian.com>
31428 * blob.h: Add a couple of new MonoType types definitions.
31430 * tabledefs.h: Add a couple of new call convs.
31432 2003-03-27 Zoltan Varga <vargaz@freemail.h>
31434 * reflection.h (MonoReflectionDynamicAssembly): track changes in
31435 the layout of the class.
31437 * reflection.c (alloc_table): double the size on overflow to avoid
31438 unnecessary copying.
31440 * reflection.h reflection.c: If AssemblyBuilderAccess is Run, then
31441 avoid filling out metadata tables and blobs. Also set mb->ilgen to
31442 null so it can be garbage collected.
31444 2003-03-27 Zoltan Varga <vargaz@freemail.hu>
31446 * reflection.c (mono_reflection_get_type): Return the resolved type
31447 only if it is in the assembly we searched.
31449 * reflection.c (ensure_runtime_vtable): Initialize method slots.
31451 * class.c (mono_class_setup_vtable): Set the slot of the overriding
31454 2003-03-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31457 (set_domain_search_path): allow 'file://blah'. It's an invalid URI,
31458 the right one is 'file:///blah', but MS allows it.
31460 (mono_assembly_open): allow 'file://blah'
31462 Fixes bug #40306. Thanks to Mitko Iliev (imitko@openlinksw.co.uk).
31464 2003-03-26 Aleksey Demakov <avd@openlinksw.com>
31466 * socket-io.c: fixes bug #40310.
31468 2003-03-25 Zoltan Varga <vargaz@freemail.hu>
31470 * reflection.c (mono_reflection_parse_type): handle deeply nested
31473 * reflection.c (mono_image_create_token): Use unique token values
31474 since they will be put into a hash table.
31476 * class.c (mono_class_setup_vtable): If a method occurs in more than
31477 one place in the vtable, and it gets overriden, then change the
31478 other occurances too.
31480 * marshal.c (mono_marshal_get_managed_wrapper): Added support for
31481 object as return type.
31483 2003-03-22 Pedro Mart?nez Juli? <yoros@wanadoo.es>
31485 * icall.c: Deleted "ToString" implementation for double and float
31486 because they are full implemented in managed code.
31488 Wed Mar 19 18:05:57 CET 2003 Paolo Molaro <lupus@ximian.com>
31490 * reflection.c, reflection.h: implemented and exported functions
31491 to retrieve info about custom attributes.
31493 2003-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31495 * appdomain.c: moved Uri handling to assembly.c
31496 * assembly.c: use g_filename_from_uri (). This makes assembly.LoadFrom
31497 work when using a file Uri in *nix and windows.
31499 * icall.c: fixed Assembly.CodeBase to return a valid Uri. The same for
31500 GetReferencedAssemblies.
31502 2003-03-18 Dick Porter <dick@ximian.com>
31504 * icall.c: Rename a couple of internal calls
31506 * threads.c: Set the thread state to Stopped when a thread exits.
31509 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
31511 * icall.c (ves_icall_System_Reflection_FieldInfo_internal_from_handle):
31514 * object.c (mono_class_vtable): fix warning.
31516 2003-03-17 Zoltan Varga <vargaz@freemail.hu>
31518 * icall.c (ves_icall_type_is_subtype_of): Avoid vtable creation.
31520 * reflection.c (mono_blob_entry_hash): Avoid reading uninitialized
31522 (method_encode_clauses): Create exception info structures in the right
31524 (mono_reflection_setup_internal_class): Initialize supertypes field.
31526 * class.c object.c: Handle interfaces which implement other interfaces
31529 * class.h class.c: Move the supertypes array initialization code into
31530 a separate function so it can be used for dynamic types too. Also call
31531 it earlier, in mono_class_init(), since it can be used before the
31532 type is initialized.
31534 2003-03-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31538 * icall.c: make MONO_ASSEMBLIES and MONO_CFG_DIR work on windows.
31543 * object.c: remove warnings.
31545 2003-03-13 Martin Baulig <martin@ximian.com>
31547 * debug-mono-symfile.h (MonoSymbolFileLexicalBlockEntry): New type.
31548 (MonoDebugLexicalBlockEntry): New types.
31550 * debug-mono-symfile.c
31551 (_mono_debug_address_from_il_offset): Moved here from ../jit/debug.c.
31553 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31555 * process.c: ret can be any non-zero value accroding to MS doc.
31557 2003-03-07 Miguel de Icaza <miguel@ximian.com>
31559 * class.c (mono_marshal_load_type_info): Fix buglet: Noticed when
31560 fixing a warning for a miss-used prototype, would have cause
31561 random memory corruption.
31563 2003-03-07 Martin Baulig <martin@ximian.com>
31565 * marshal.c (mono_marshal_free_array): That "TESTFREE %p" was
31566 getting really annoying ....
31568 2003-03-07 Zoltan Varga <vargaz@freemail.hu>
31570 * reflection.c (fixup_method): added support for array methods.
31572 Tue Mar 4 18:03:27 CET 2003 Paolo Molaro <lupus@ximian.com>
31574 * socket-io.c: handle case when AF_INET6 and AF_IPX are not defined
31575 (pointed out by Michael Adams).
31577 2003-03-04 Dick Porter <dick@ximian.com>
31579 * icall.c: Temporarily reverted the Double and Single ToString()
31580 change, because it broke nunit.
31582 Tue Mar 4 12:40:58 CET 2003 Paolo Molaro <lupus@ximian.com>
31584 * object.h, threads.h: make include files compatible with C++
31585 (patch by Jerome Laban <jlaban@wanadoo.fr>).
31587 2003-03-04 Pedro Mart?nez Juli? <yoros@wanadoo.es>
31589 * icall.c: Erased ToString helper functions for Double and Single.
31590 Now, that implementations ar all in managed code (Double and Single
31593 2003-03-03 Lluis Sanchez Gual <lluis@ideary.com>
31595 * appdomain.c: Added method for initializing the default context of
31596 a domain. Added internal call for getting the default context.
31597 * appdomain.h: Added context variable in MonoDomain struct.
31598 * domain.c: mono_domain_set also sets the default context of the domain
31599 * icall.c: Mapped internal method InternalGetDefaultContext.
31600 * object.c: mono_object_get_virtual_method returns always a remoting
31601 wrapper if the object is a transparent proxy.
31602 mono_runtime_invoke_array: when creating an object by calling the
31603 constructor, if the created object is a proxy, then the constructor should
31604 be called using the a remoting wrapper.
31606 2003-03-03 Dick Porter <dick@ximian.com>
31608 * socket-io.c (create_sockaddr_from_object): Rename sockaddr_un
31609 variable so it compiles on solaris. Problem spotted by
31610 Christopher Taylor <ct@cs.clemson.edu>
31612 2003-03-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31615 (get_info_from_assembly_name): don't leak value.
31618 (ves_icall_System_Reflection_Assembly_GetFilesInternal): initialize
31621 Sat Mar 1 15:32:56 CET 2003 Paolo Molaro <lupus@ximian.com>
31623 * assembly.c: export mono_image_load_references ().
31624 * class.c: handle function pointers. mono_class_from_name() now
31625 supports nested type names directly.
31627 2003-02-28 Zoltan Varga <vargaz@freemail.hu>
31629 * reflection.h reflection.c: Encode already created dynamic methods
31630 and fields correctly as a DEF instead of a REF.
31632 * reflection.c: Get rid of the force_ref argument to
31633 mono_image_typedef_or_ref since it was wrong in the first place.
31635 * string-icalls.c: add error checking to string constructors according
31638 * reflection.c: Emit types in the order their TypeBuilders were
31639 created. Previously, a new table index was assigned to each type before
31640 the tables were emitted. This was wrong because the signature blob
31641 might already refer to a type by its original table index.
31643 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
31645 * metadata.c (mono_metadata_nesting_typedef): fix bug in previous
31648 2003-02-27 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31650 * Makefile.am: make assemblies dir have \ instead of / on windows.
31652 2003-02-27 Zoltan Varga <vargaz@freemail.hu>
31654 * metadata.c metadata.h (mono_metadata_nesting_typedef): changed to
31655 iterate over the NESTEDCLASS table using a linear search since the
31656 table is not guaranteed to be sorted by the secondary key.
31658 * class.c (mono_class_create_from_typedef): fixed up call to
31659 mono_metadata_nesting_typedef.
31661 2003-02-27 Dietmar Maurer <dietmar@ximian.com>
31663 * marshal.c (mono_string_to_byvalstr): clear the memory as
31664 suggested by Jerome Laban <jlaban@wanadoo.fr>
31666 2003-02-26 Dick Porter <dick@ximian.com>
31668 * process.c: Cope with padding in .rsrc blocks
31670 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
31672 * metadata.h: reverted the filter_len change, it breaks reflection
31674 2003-02-26 Dietmar Maurer <dietmar@ximian.com>
31676 * metadata.h: added a new field to store the filter_len
31679 Tue Feb 25 10:56:16 CET 2003 Paolo Molaro <lupus@ximian.com>
31681 * reflection.c: handle custom attributes for types and members
31682 created with Reflection.Emit (bug#38422).
31684 2003-02-22 Zoltan Varga <vargaz@freemail.hu>
31686 * reflection.c: define RTSpecialName automatically for constructors for
31687 compatibility with MS.NET.
31689 * reflection.c (mono_reflection_create_runtime_class): initialize
31690 nested_in field of dynamically created classes.
31692 2003-02-22 Martin Baulig <martin@ximian.com>
31694 * debug-mono-symfile.h: Incremented version number.
31696 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
31698 * object.h icall.c process.c: fix warnings.
31700 2003-02-21 Zoltan Varga <vargaz@freemail.hu>
31702 * appdomain.h appdomain.c:
31703 (mono_domain_try_type_resolve): split the
31704 name_or_tb argument into a name and a tb argument.
31705 (mono_domain_has_type_resolve): new function to check whenever the
31706 application has registered a TypeResolve event handler.
31708 * icall.c reflection.h reflection.c: move the type resolve logic into
31709 mono_reflection_get_type () so it will be invoked when
31710 Assembly::GetType () is called.
31713 (mono_reflection_get_type): renamed to get_type_internal.
31714 (mono_reflection_get_type): fixed type name generation so it works
31715 for nested types too.
31716 (mono_reflection_get_type): call has_type_resolve () to avoid the
31717 costly type name generation if there is no resolve event handler.
31719 Fri Feb 21 11:36:57 CET 2003 Paolo Molaro <lupus@ximian.com>
31721 * class.c, image.c: load exported types from file references.
31723 2003-02-19 Lluis Sanchez Gual <lluis@ideary.com>
31725 * appdomain.h: Added in MonoDomain a couple of MonoMethod* variables
31726 used to cache the managed methods used to create proxies and make
31727 remote invocation of methods.
31728 * class.h: Added in MonoVTable a flag to indicate that a class needs
31729 to be remotely created.
31730 * object.c: Modified the method mono_class_vtable(). It now initializes
31731 the remote flag of the vtable. Modified mono_object_new_specific(),
31732 so now it checks the remote flag.
31733 * icall.c: Added a couple of internal methods, one for enabling instance
31734 creation interception for a type, and one for creating objects bypassing
31737 2003-02-18 Martin Baulig <martin@ximian.com>
31739 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethodToken):
31740 New interncall to get a method's metadata token.
31742 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethodToken"):
31743 New interncall for the debugger.
31745 2003-02-18 Dietmar Maurer <dietmar@ximian.com>
31747 * class.c (mono_class_setup_vtable): allocate supertype array
31749 2003-02-18 Martin Baulig <martin@ximian.com>
31751 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Added `has_this'.
31753 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31756 (assembly_name_to_aname): jump over unknown properties (i've found
31757 something like: 'type, assembly, version=xxx, custom=null, public...',
31758 so now will ignore custom=null and still get the rest of the values).
31760 2003-02-17 Dick Porter <dick@ximian.com>
31762 * threads.c: Have Thread.Start() wait for a semaphore to signal
31763 that the thread has set up all its local data. This fixes bug
31764 34323, where Abort() raced the new thread's TLS data.
31766 Also removes the handle_store() call from start_wrapper, because
31767 threads are now always created suspended and there is no longer a
31768 race between the parent and child threads to store the info.
31770 Mon Feb 17 13:13:31 CET 2003 Paolo Molaro <lupus@ximian.com>
31772 * image.c: explain the #- heap issue in a message, hopefully
31773 avoiding FAQs on mono-list.
31775 2003-02-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31778 (GetEntryAssembly): if the domain has not invoked
31779 AppDomain.ExecuteAssembly yet, return the assembly of the default
31782 2003-02-16 Zoltan Varga <vargaz@freemail.hu>
31784 * class.c (mono_ldtoken): make it work in dynamic assemblies.
31786 Sun Feb 16 13:10:06 CET 2003 Paolo Molaro <lupus@ximian.com>
31788 * metadata.c, reflection.c: simple speedup to type hash
31791 Sat Feb 15 15:15:03 CET 2003 Paolo Molaro <lupus@ximian.com>
31793 * image.c, image.h, class.c, assembly.c: move module loading
31794 to MonoImage. When loading metadata, consider alignemnet from
31795 the start of metadata, not from the metadata address in memory.
31797 2003-02-13 Zoltan Varga <vargaz@freemail.hu>
31799 * reflection.c (mono_reflection_get_custom_attrs): Added support for
31800 AssemblyBuilder objects. Factored out custom attribute creation into
31801 a separate function.
31802 (create_custom_attr): new function to create custom attributes.
31804 2003-02-12 Miguel de Icaza <miguel@ximian.com>
31806 * Makefile.am: Got tired of typing the full pathname to pedump.
31807 Until there is another option, am installing this.
31809 2003-02-12 Dietmar Maurer <dietmar@ximian.com>
31811 * class.c (class_compute_field_layout): always set field->parent
31812 (mono_ldtoken): use mono_defaults.fieldhandle_class;
31814 2003-02-11 Dick Porter <dick@ximian.com>
31817 * monitor.c: Rewrote Monitor, making lock much faster and
31818 Pulse/Wait work as specified. Also uses much fewer handles, and only
31819 creates them as needed.
31821 * exception.c: Added SynchronizationLockException
31823 * threads.c: Deleted old Monitor implementation. The new one is
31826 Mon Feb 10 17:54:10 CET 2003 Paolo Molaro <lupus@ximian.com>
31828 * class.c: handled TypedReference type code. Set the correct size for
31829 class data. Setup interface_offsets for interface classes, too.
31831 2003-02-09 Martin Baulig <martin@ximian.com>
31833 * debug-mono-symfile.h: Reflect latest symbol writer changes.
31835 Sun Feb 9 18:37:01 CET 2003 Paolo Molaro <lupus@ximian.com>
31837 * loader.c: implemented MEMBERREF_PARENT_TYPEDEF.
31838 * metadata.c, reflection.c: missing MONO_TYPE_TYPEDBYREF handling.
31839 * object.c: fixed mono_object_get_virtual_method () for interfaces.
31840 * verify.c: check for code that runs after the end of the method.
31842 2003-02-08 Pedro Mart?nez Juli? <yoros@wanadoo.es>
31844 * icall.c: Added "System.Math::Floor", "System.Math::Round" and
31845 "System.Math::Round2".
31846 * sysmath.h: Added Floor, Round and Round2 definitions.
31847 * sysmath.c: Modified certain functions that were not 100% compliant
31848 with MS.NET (math precision) and added the implementation of Floor,
31851 2003-02-07 Martin Baulig <martin@ximian.com>
31853 * debug-mono-symfile.c (mono_debug_symfile_add_method): Ignore interncalls.
31855 2003-02-07 Martin Baulig <martin@ximian.com>
31857 * debug-mono-symfile.c: Reflected latest symwriter changes.
31858 (mono_debug_create_mono_symbol_file): Removed.
31859 (mono_debug_open_mono_symbol_file): Take an argument which
31860 specifies whether to create a dynamic symbol file.
31862 2003-02-07 Dietmar Maurer <dietmar@ximian.com>
31864 * class.c (mono_class_from_mono_type): added MONO_TYPE_TYPEDBYREF
31866 2003-02-05 Martin Baulig <martin@ximian.com>
31868 * reflection.c (mono_image_build_metadata): Make this public,
31869 protect it against being called multiple times, don't create
31870 resources and don't build the compressed metadata here.
31871 (mono_image_create_pefile): Do this here.
31874 ("System.Reflection.Emit.AssemblyBuilder::build_metadata"): Added.
31876 2003-02-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31878 * socket-io.c: fixed bug #36322.
31880 2003-02-06 Piers Haken <piersh@friskit.com>
31884 * debug-mono-symfile.c:
31890 * socket-io.c: warning cleanups
31892 2003-02-06 Dietmar Maurer <dietmar@ximian.com>
31894 * marshal.c (mono_marshal_get_remoting_invoke_with_check): new
31895 function. works like remoting invoke, but does a check for the Proxy first.
31897 2003-02-05 Miguel de Icaza <miguel@ximian.com>
31899 * appdomain.c (ves_icall_System_AppDomain_InternalUnload): Make it compiler.
31901 2003-02-05 Dietmar Maurer <dietmar@ximian.com>
31903 * marshal.c (mono_marshal_get_native_wrapper): only allocate an
31905 (mono_marshal_get_ldfld_wrapper): only generate necessary ldfld wrappers.
31906 (mono_marshal_get_stfld_wrapper): only generate necessary stfld wrappers.
31908 * object.c (mono_store_remote_field_new): used by the new jit
31909 instead of mono_store_remote_field
31910 (mono_load_remote_field_new): used by the new jit
31911 instead of mono_load_remote_field
31913 2003-02-05 Patrik Torstensson
31915 * appdomain.c: changed unload to take the domain id instead
31918 * icall.c: changed icall for AppDomain.Unload to AppDomain.InternalUnload
31921 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31923 * appdomain.c: don't look for assemblies in ApplicationBase if
31924 PrivateBinPathProbe is set.
31926 2003-02-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31928 * object.c: make the first argument in main_args contain the absolute
31929 path to the assembly. Fixes bug #37511.
31931 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31933 * icall.c: get correct UTC offset for countries not using daylight
31934 time saving. Fixes bug #30030.
31936 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31938 * socket-io.c: support AF_UNIX and use the same layout as MS (bytes 0
31939 and 1 are the family).
31941 2003-02-04 Dietmar Maurer <dietmar@ximian.com>
31943 * icall.c (ves_icall_InternalExecute): removed wrong assertion
31945 * marshal.c (mono_marshal_get_remoting_invoke): generate valid IL
31947 2003-02-04 Zoltan Varga <vargaz@freemail.hu>
31949 * reflection.c: added support for SignatureHelper tokens, which is
31950 needed by the Calli opcode.
31952 * reflection.h: track changes to SignatureHelper class.
31954 * metadata.c (mono_metadata_parse_signature): handle dynamic tokens.
31956 2003-02-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31958 * appdomain.c: fixed loading assemblies from PrivateBinPath.
31960 2003-02-03 Patrik Torstensson
31961 * appdomain.[c|h], domain.c :
31962 - Added support for getting a domain via domain id
31963 - Support for setting and getting domain from System.AppDomain
31964 (used in cross appdomain channel)
31965 - Added support for get/set for a MonoAppContext on a thread
31966 (Context class in System.Runtime.Remoting.Contexts),
31967 - Removed hack in Get/SetData and ExecuteAssembly.
31969 * icall.c : renamed GetTransparantProxy to InternalGetTransparantProxy to allow
31970 the managed world to get control when a proxy is created.
31972 * icall.c (ves_icall_InternalExecute) : bug fix, must return empty array
31974 2003-02-03 Miguel de Icaza <miguel@ximian.com>
31977 (ves_icall_System_Reflection_Assembly_GetReferencedAssemblies):
31978 Populate the codebase field as well.
31980 2003-02-02 Martin Baulig <martin@ximian.com>
31982 * debug-mono-symfile.c
31983 (MonoSymbolFileMethodAddress): Added `wrapper_address' field.
31984 (mono_debug_symfile_add_method): Allow interncalls.
31986 2003-01-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
31988 * icall.c: throw parse exception if strtod fails or the string is empty.
31990 Fri Jan 31 16:09:48 CET 2003 Paolo Molaro <lupus@ximian.com>
31992 * marshal.c: handle object type separately from defined
31995 Fri Jan 31 16:01:20 CET 2003 Paolo Molaro <lupus@ximian.com>
31997 * marshal.c: handle NATIVE_LPSTR for strings when it's
31998 explicitly specified.
32000 Fri Jan 31 11:51:43 CET 2003 Paolo Molaro <lupus@ximian.com>
32002 * reflection.c, reflection.h, icall.c: setup the reflection
32003 handle cache for ModuleBuilders and AssemblyBuilders.
32005 2003-01-30 Dietmar Maurer <dietmar@ximian.com>
32007 * reflection.c (reflection_methodbuilder_to_mono_method): set
32010 2003-01-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32012 * icall.c: implemented ves_icall_MonoMethod_get_base_definition.
32014 2003-01-29 Dick Porter <dick@ximian.com>
32016 * threads.c: No need for the fake_thread kludge now that Thread
32017 doesn't run a class constructor
32019 2003-01-29 Dick Porter <dick@ximian.com>
32021 * threads.c: Use g_direct_hash instead of the rather bogus
32024 2003-01-29 Dietmar Maurer <dietmar@ximian.com>
32026 * marshal.c (mono_marshal_get_native_wrapper): add check for null
32027 (fix pinvoke12.exe)
32028 (mono_marshal_get_struct_to_ptr): generate valid IL code
32029 (mono_marshal_get_ptr_to_struct): generate valid IL code
32030 (*): correctly set sig->pinvoke, we need to memdup the signature
32033 Tue Jan 28 22:57:57 CET 2003 Paolo Molaro <lupus@ximian.com>
32035 * marshal.c, marshal.h: use larger integers in mono_mb_emit_add_to_local()
32036 to avoid overflows (bug spotted and fixed by Jerome Laban <jlaban@wanadoo.fr>).
32038 Tue Jan 28 18:55:19 CET 2003 Paolo Molaro <lupus@ximian.com>
32040 * profiler.c: provide more callers information.
32042 2003-01-28 Dietmar Maurer <dietmar@ximian.com>
32044 * marshal.c (mono_marshal_get_managed_wrapper): generate valid IL code
32046 * appdomain.h:added fix from Patrik: _MonoAppDomain is a MBR object
32048 * marshal.c (mono_marshal_get_native_wrapper): generate valid IL code
32050 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32052 * icall.c: (ves_icall_System_CurrentTimeZone_GetTimeZoneData): raise an
32053 exception instead of going into an infinite loop on dates which it
32056 * string-icalls.c (ves_icall_System_String_get_Chars): raise
32057 out-of-range exception if needed.
32059 * class.c (mono_class_setup_vtable): allow a virtual method to provide
32060 an implementation for an interface method and to override an inherited
32061 method at the same time.
32062 Imagine a scenario when a virtual method is used to override a
32063 virtual abstract method in a parent class, and this same method
32064 provides an implementation for an method inherited from an interface.
32065 In this case, the interface resolution code will set im->slot, which
32066 means that the virtual method override pass will skip this method
32067 which means a pointer to the abstract method inherited from the parent
32068 will remain in the vtable of this non-abstract class.
32070 * class.c: (mono_class_setup_vtable): continue search for a real
32071 method if only an abstract method is found.
32073 Mon Jan 27 17:12:19 CET 2003 Paolo Molaro <lupus@ximian.com>
32075 * reflection.c: add size to encoding for ByValStr and ByValArray
32076 marshal blob (from "Jerome Laban" <jlaban@wanadoo.fr>).
32078 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32080 * class.c (mono_class_setup_vtable): pass the override info as an
32083 * class.c (mono_class_setup_vtable): set the slot of overriding methods
32086 * reflection.c (ensure_runtime_vtable); add support for method
32089 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32091 * reflection.c (resolution_scope_from_image): Hack to work to work with
32092 dynamic assemblies.
32094 * reflection.c (mono_image_typedef_or_ref): renamed to ..._aux and
32095 added a 'force_ref' argument to force this function to allways return
32096 a TypeRef. This is needed by mono_image_get_memberref_token ().
32098 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32100 * reflection.c (mono_image_get_type_info): interfaces really don't have
32103 * reflection.c (mono_image_basic_init): fill out missing fields of
32106 * reflection.c (mono_image_basic_init): Invoke assembly load hooks for
32107 dynamic assemblies. This is required so dynamic assemblies show up in
32108 AppDomain.GetAssemblies (), emit an AssembyLoadEvent, gets searched by
32109 Type::GetType() etc. This is consistent with MS behaviour.
32111 * image.c image.h reflection.c: add newly created classes to the name
32112 cache so mono_class_get () will find them.
32114 2003-01-27 Zoltan Varga <vargaz@freemail.hu>
32116 First part of changes to get IKVM.NET running under mono.
32118 * appdomain.h, appdomain.c: added new function
32119 mono_domain_try_type_resolve() which will emit TypeResolve events.
32120 This function will call AppDomain::DoTypeResolve to do the actual work.
32122 * class.h, class.c, loader.c, object.c, reflection.h, reflection.c:
32123 moved existing code dealing with dynamic tokens to a new function
32124 called mono_reflection_lookup_dynamic_token (). This function will
32125 raise TypeResolve events when appropriate. Since reflection.c is not
32126 part of libmetadata, a new hook function called
32127 mono_lookup_dynamic_token() is added to class.c which will call this.
32129 * assembly.h assembly.c: make the invoke_load_hook function public,
32130 so it can be called for dynamic assemblies.
32132 * icall.c (ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor): skip interfaces since they do not have initializers.
32134 * icall.c (ves_icall_type_from_name): emit a TypeResolve event if the
32137 * reflection.c reflection.h: change MonoDynamicAssembly.tokens to a
32138 MonoGHashTable, since it contains pointers to objects which the GC
32141 * assembly.c (search_loaded): remove unused variable.
32143 Mon Jan 27 12:18:45 CET 2003 Paolo Molaro <lupus@ximian.com>
32145 * object.c: fixed issue exposed by gcc-generated IL programs
32146 that use RVA data for pointers.
32148 2003-01-25 Martin Baulig <martin@ximian.com>
32150 * threads.c (start_wrapper): Moved the initialization of
32151 `start_func' above the mono_new_thread_init() call to which we
32152 pass it as argument.
32154 2003-01-24 Martin Baulig <martin@ximian.com>
32156 * threads.h (MonoThreadCallbacks): Pass the thread ID instead of
32157 the MonoThread pointer.
32159 2003-01-21 Miguel de Icaza <miguel@ximian.com>
32161 * icall.c: Rename `PowImpl' to Pow.
32163 2003-01-23 Dick Porter <dick@ximian.com>
32165 * threads.c (start_wrapper): Create a Thread object if needed, so
32166 the Main() thread can do the class initialisation in a subthread
32167 that has been set up to allow managed code execution.
32169 Pass the thread ID instead of the MonoThread pointer to the thread
32170 start and attach callbacks. This change is required, because the
32171 jit thread start callback must be called _before_ the Thread
32172 object can be created.
32174 (mono_thread_init): Removed much object creation code that is no
32175 longer needed. No managed code is called from here now.
32177 * object.c (mono_runtime_exec_managed_code): Create a subthread
32178 for Main, and call back to the runtime to use it.
32179 Set the exit code when Main exits.
32181 * gc.c: Make sure domain finalisation happens in a subthread.
32182 Re-enable threaded GC, fixing bug 31333 (again).
32184 * environment.c: System.Environment internall calls (so far just
32185 ExitCode is here, the others are still in icall.c)
32187 * appdomain.c (mono_runtime_cleanup): All threads running managed
32188 code should have finished before mono_runtime_cleanup() is
32189 reached, so no need to clean up threads.
32191 2003-01-22 Martin Baulig <martin@ximian.com>
32193 * appdomain.h (MonoThreadStartCB): Added `MonoThread *thread' and
32194 `gpointer func' arguments.
32195 (MonoThreadAttachCB): New typedef; like the old MonoThreadStartCB,
32196 but added `MonoThread *thread' argument.
32197 (mono_runtime_init): The last argument is now a MonoThreadAttachCB.
32199 * threads.c (mono_new_thread_init): Added `gpointer func' argument
32200 and pass it to the mono_thread_start_cb callback.
32201 (mono_install_thread_callbacks): New public function to install a
32202 set of callbacks which are set by the debugger.
32203 (mono_thread_init): The last argument is now a MonoThreadAttachCB.
32205 2003-01-22 Martin Baulig <martin@ximian.com>
32207 * Makefile.am: Install debug-mono-symfile.h.
32209 2003-01-21 Aleksey Demakov <avd@openlinksw.com>
32211 * marshal.c: fixed copy_from_managed and copy_to_unmanaged for 0 length.
32213 2003-01-21 Dietmar Maurer <dietmar@ximian.com>
32215 * added the following fix from Jackson Harper <jackson@latitudegeo.com>
32216 * class.c (mono_ptr_class_get): correctly set access levels of pointers
32217 (mono_array_class_get): correctly set access levels of arrays
32219 2003-01-20 Patrik Torstensson
32220 * image.h (MonoAssemblyName): changed major, minor, build, revision
32221 from signed to unsigned.
32223 2003-01-20 sean kasun <skasun@azstarnet.com>
32225 * reflection.c (load_cattr_value): Now this handles
32226 MONO_TYPE_SZARRAY. Fixes bug #35629
32228 2003-01-20 Miguel de Icaza <miguel@ximian.com>
32230 * marshal.c (emit_struct_conv): Handle MONO_TYPE_PTR as an
32233 2003-01-18 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32235 * decimal.c: fixed bug #26056.
32237 2003-01-17 Martin Baulig <martin@ximian.com>
32239 * gc.c: Raise an ExecutionEngineException instead of using g_error().
32241 2003-01-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32244 (mono_get_exception_type_initialization): new function.
32246 * object.c: throw a TypeInitializationException when an exception is
32247 thrown invoking the class constructor.
32249 2003-01-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32251 * reflection.c: fixed attribute reading.
32253 2003-01-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32256 (ves_icall_type_from_name): make it work as MS. Ie, if no assembly name
32257 provided, look for the type in the calling assembly and then in
32258 mscorlib; if the assembly name is provided, only try that one.
32260 Tue Jan 14 14:52:52 CET 2003 Paolo Molaro <lupus@ximian.com>
32262 * object.c: register the vtable before there is a chance it's
32263 queried again recursively.
32265 2003-01-13 Duncan Mak <duncan@ximian.com>
32267 * Makefile.am (libmonoruntime_la_SOURCES): Change gc.h to
32270 2003-01-12 Patrik Torstensson <totte@race-x-change.com>
32272 * string-icall.[c|h], icall.c: Added support for CompareOrdinal mode
32274 2003-01-11 Martin Baulig <martin@ximian.com>
32276 * debug-mono-symfile.h (MONO_SYMBOL_FILE_DYNAMIC_VERSION): Incremented
32277 this to 20 for the release.
32279 2003-01-10 Dietmar Maurer <dietmar@ximian.com>
32281 * marshal.c (emit_struct_conv): added support for EXPLICIT_LAYOUT
32283 * loader.c (mono_method_get_marshal_info): bug fix
32285 * marshal.c (mono_marshal_get_ptr_to_struct): don't convert
32286 structures with explicit layout
32288 Fri Jan 10 15:58:09 CET 2003 Paolo Molaro <lupus@ximian.com>
32290 * profiler.c: made the output more readable (and sorted).
32291 Added caller information for the allocation profiler.
32293 2003-01-09 Sebastien Pouliot <spouliot@videotron.ca>
32295 * icall.c, rand.c, rand.h: Prepended RNG functions with Internal.
32297 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32299 * icall.c: added ves_icall_System_Activator_CreateInstanceInternal. Used
32300 to get value types.
32302 Thu Jan 9 19:43:11 CET 2003 Paolo Molaro <lupus@ximian.com>
32304 * object.c, profiler.h, profiler.c, profiler-private.h:
32305 Added object allocation profiler.
32307 Thu Jan 9 16:17:00 CET 2003 Paolo Molaro <lupus@ximian.com>
32309 * reflection.h, reflection.c: handle global methods.
32310 Compress blob entries.
32312 Thu Jan 9 15:54:53 CET 2003 Paolo Molaro <lupus@ximian.com>
32314 * marshal.c: fix compilation.
32316 2003-01-09 Dietmar Maurer <dietmar@ximian.com>
32318 * loader.c (mono_method_get_marshal_info): impl.
32320 * metadata.c (mono_metadata_field_info): use mono_metadata_get_marshal_info
32322 2003-01-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32324 * icall.c: applied fix from Zoltan Varga that fixes Type.IsPrimitive
32325 for reference types.
32327 Wed Jan 8 20:11:46 CET 2003 Paolo Molaro <lupus@ximian.com>
32329 * loader.c: fixed off by one error in loaded parameter names.
32331 2003-01-08 Dietmar Maurer <dietmar@ximian.com>
32333 * marshal.c (mono_marshal_get_icall_wrapper): like
32334 mono_marshal_get_native_wrapper, but simpler and use a MonoMethodSignature
32335 instead of a MonoMethod.
32337 2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32339 * decimal.c: fixed bug #36537.
32341 Mon Jan 6 19:37:59 CET 2003 Paolo Molaro <lupus@ximian.com>
32343 * marshal.c: throw a missing method exception if a
32344 P/Invoke method is not found.
32346 Sun Jan 5 11:57:09 CET 2003 Paolo Molaro <lupus@ximian.com>
32348 * icall.c: allow a null this for constructors.
32350 Sat Jan 4 18:28:42 CET 2003 Paolo Molaro <lupus@ximian.com>
32352 * icall.c: raise the proper exceptions if the arguments to the
32353 internal Invoke are incorrect.
32355 2003-01-03 Dietmar Maurer <dietmar@ximian.com>
32357 * marshal.c (mono_marshal_get_ptr_to_struct): code cleanups
32359 2003-01-03 Martin Baulig <martin@ximian.com>
32361 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
32363 2002-12-31 Martin Baulig <martin@ximian.com>
32365 * debug-mono-symfile.c: Completely rewrote the type section.
32366 Instead of using individual malloc()ed fields, we use one big
32367 continuous memory area and offsets into this area.
32368 See the comments in the source code for details.
32370 2002-12-30 Martin Baulig <martin@ximian.com>
32372 * debug-mono-symfile.h (MonoDebugTypeInfo): Renamed to MonoDebugClassInfo.
32374 2002-12-30 Martin Baulig <martin@ximian.com>
32376 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Include the
32377 line number table in this data blob instead of using an external
32380 2002-12-28 Martin Baulig <martin@ximian.com>
32382 * debug-mono-symfile.h: Increment MONO_SYMBOL_FILE_DYNAMIC_VERSION.
32384 2002-12-22 Rachel Hestilow <hestilow@ximian.com>
32386 * marshal.c (mono_marshal_get_runtime_invoke): Support MONO_TYPE_CHAR
32387 as a boxed return type.
32389 2002-12-21 Miguel de Icaza <miguel@ximian.com>
32392 (ves_icall_System_AppDomainSetup_InitAppDomainSetup): Use
32393 g_build_filename to properly get separators on the filename created.
32395 * object.h: Small change, introduce MonoMarshalByRefObject to
32396 track the layout of that structure in the C# universe as we make
32399 Thu Dec 19 16:23:19 CET 2002 Paolo Molaro <lupus@ximian.com>
32401 * object.c: removed assert to allow static fields on interfaces.
32402 * loader.c: a TypeSpec may be used for any type, not just arrays.
32404 Thu Dec 19 14:19:42 CET 2002 Paolo Molaro <lupus@ximian.com>
32406 * class.c, class.h: added mono_class_array_element_size ().
32407 Ignore static methods in interfaces.
32409 2002-12-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32411 * threads.c: fixed the build under cygwin.
32413 Wed Dec 18 18:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
32415 * reflection.c: handle nullref constants. Allocate keys for
32416 reflection handles with the GC.
32418 Wed Dec 18 11:34:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32420 * threads.c, threads.h: added mono_thread_get_abort_signal()
32421 to get a suitable signal for thread abort.
32423 Wed Dec 18 11:26:18 CET 2002 Paolo Molaro <lupus@ximian.com>
32425 * metadata.c: fix handling of ExportedType table.
32427 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32429 * icall.c: added WriteWindowsDebugString internal call.
32431 2002-12-15 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32433 * reflection.h: added fields to match C# implementation.
32435 2002-12-14 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32437 * icall.c: patch from Jaroslaw Kowalski to fix Environment.MachineName.
32439 2002-12-12 Juli Mallett <jmallett@FreeBSD.org>
32441 * gc.h, gc-internal.h: Rename header for GC internal calls to
32442 gc-internal.h from gc.h as to not clash with Boehm GC having its
32443 header installed as <gc.h> in outside include paths.
32444 * appdomain.c, gc.c, icall.c, object.c: Account for aforementioned.
32445 * threads.c: If SIGRTMIN is not defined, fall back to SIGUSR1.
32447 2002-12-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32449 * icall.c: assign minor, build and revision in FillName.
32451 2002-12-11 Zoltan Varga <vargaz@freemail.hu>
32453 * image.h reflection.h reflection.c class.h class.c loader.c object.c:
32454 Added support for running code generated by Reflection.Emit.
32456 2002-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32458 * appdomain.c: check for NULL argument in LoadFrom.
32460 2002-12-10 Dick Porter <dick@ximian.com>
32462 * threads.c: WaitHandle fixes from Tum <tum@veridicus.com>
32464 2002-12-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32466 * appdomain.c: fix buglet when building exe file name. Handle full
32467 assembly name (needed after latest changes to AssemblyName).
32469 (mono_image_close): free some hashtables.
32471 2002-12-05 Dietmar Maurer <dietmar@ximian.com>
32473 * threads.c (ves_icall_System_Threading_Thread_Abort): we use SIGRTMIN
32474 instead of SIGUSR1, because SIGUSR1 is used by the pthread implementation
32475 on some systems (redhat 7.3)
32477 Thu Dec 5 16:13:40 CET 2002 Paolo Molaro <lupus@ximian.com>
32479 * threads.c: delete the critical section of a sync block,
32480 spotted and fixed by tum@veridicus.com (Thong (Tum) Nguyen).
32482 Thu Dec 5 12:52:52 CET 2002 Paolo Molaro <lupus@ximian.com>
32484 * pedump.c, cil-coff.h, monosn.c: add strong name cli header flag.
32486 2002-12-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32488 * appdomain.[ch]: handle the assembly preload event to try loading the
32489 assemblies using the paths we have in the current domain.
32491 * assembly.[ch]: created an assembly preload hook that is called to try
32492 loading the assembly by other means that the ones provided here.
32494 * domain.c: initialize the domain search path.
32496 From now on, assemblies (TODO: except corlib and System) are loaded
32497 according to these rules when using mono_assembly_load ():
32499 1. It tries to load the assembly from the ApplicationBase
32500 of the current domain appending .dll and .exe (TODO: have to
32501 try loading from name/name.dll and name/name.exe).
32503 2. It tries the search path specified in PrivateBinPath for the
32504 current domain (if any).
32506 3. Previous behavior.
32508 Wed Dec 4 16:02:25 CET 2002 Paolo Molaro <lupus@ximian.com>
32510 * icall.c: implemented GetInterfaceMap() related icall.
32511 * domain.c, loader.h: load MethodInfo in mono_defaults.
32513 Wed Dec 4 11:02:30 CET 2002 Paolo Molaro <lupus@ximian.com>
32515 * gc.c: disable the finalizer thread for now, untill all the issues
32516 with it are resolved.
32518 Wed Dec 4 10:44:01 CET 2002 Paolo Molaro <lupus@ximian.com>
32520 * string-icalls.c: handle embedded nulls in string ctor when the
32521 length is specified.
32523 Tue Dec 3 19:29:20 CET 2002 Paolo Molaro <lupus@ximian.com>
32525 * class.c: look for explicit interface implementation in parent
32528 2002-12-03 Dietmar Maurer <dietmar@ximian.com>
32530 * gc.c (run_finalize): dont run the finalizer (strange behaviour on rh7.3)
32532 Tue Dec 3 12:40:06 CET 2002 Paolo Molaro <lupus@ximian.com>
32534 * gc.c: protect handles with a critical section.
32536 2002-12-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32539 (ves_icall_type_from_name): it now has throwOnError and ignoreCase
32540 parameters. If no assembly specified, try getting the type from all
32541 the assemblies in the current domain, else, load the assembly and get
32544 2002-11-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32546 * marshal.c: applied patch from Aleksey Demakov that fixes
32547 ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringUni.
32549 2002-11-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32551 * icall.c: fixed get_location.
32553 2002-11-28 Dietmar Maurer <dietmar@ximian.com>
32555 * icall.c: moved MONO_ARCH_SAVE_REGS to the end of the
32556 declarations to make it work with older gcc.
32558 * loader.c (mono_get_method): set signature->pinvoke for native calls
32560 2002-11-20 Dick Porter <dick@ximian.com>
32562 * threads.c (mono_thread_init): Set the main thread's handle
32564 Tue Nov 19 14:15:34 CET 2002 Paolo Molaro <lupus@ximian.com>
32566 * gc.c: allow compilation without GC support. Changed to match the
32569 Mon Nov 18 18:41:51 CET 2002 Paolo Molaro <lupus@ximian.com>
32571 * gc.c: don't start the finalizer thread if the env var GC_DONT_GC is set.
32573 Mon Nov 18 16:35:22 CET 2002 Paolo Molaro <lupus@ximian.com>
32575 * reflection.c: set a public key token on the core assemblies.
32577 2002-11-18 Dick Porter <dick@ximian.com>
32579 * threads.c: Split out some thread initialisation so that other
32580 files can set the start callback function.
32582 * gc.c: Run finalisers in a separate thread, to avoid stack
32583 overflow. Fixes bug 31333.
32585 * appdomain.c: Set up GC finalisation thread.
32589 * domain.c: Use gc.h macros for GC_malloc
32591 2002-11-15 Dick Porter <dick@ximian.com>
32595 * appdomain.c: Removed mono_runtime_init_with_attach(),
32596 mono_thread_create_arg(), and mono_thread_init_with_attach(), by
32597 merging the extra parameter with the existing function. Removed
32598 unneeded code in mono_thread_attach().
32600 2002-11-14 Dietmar Maurer <dietmar@ximian.com>
32602 * image.c (mono_image_loaded_by_guid): a method to get loaded
32604 (load_metadata_ptrs): we store the guid as string.
32606 2002-11-11 Dietmar Maurer <dietmar@ximian.com>
32608 * assembly.c (mono_assembly_open): check the guid of aot compiled lib.
32610 * metadata.c (mono_guid_to_string): imported method form Zoltan
32611 Varga (slightly modified)
32613 * assembly.c (mono_assembly_open): load precompiled code
32615 * loader.h (MonoMethod): we store the method token for use in the
32618 2002-11-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32620 * appdomain.c: insert the loaded assemblies in the domain->assemblies in
32621 the hook function called when an assembly is loaded.
32623 * domain.c: Modified file.
32624 (mono_domain_assembly_load): removed hash table insertion of assemblies.
32628 2002-11-07 Miguel de Icaza <miguel@ximian.com>
32630 * reflection.c: Map PEFileKind to the value expected by the WinNT
32633 2002-11-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32635 * rand.c: use /dev/urandom. If it fails to open, use the previous one.
32636 Read until the buffer is filled completely.
32638 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32640 * icall.c: implemented MonoType.InternalGetEvent ().
32642 2002-11-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32644 * appdomain.c: implemented InitAppDomainSetup. Delayed
32645 AppDomain.SetupInformation until mono_runtime_exec_main, where we get
32646 the entry_assembly.
32648 * assembly.c: base_dir is now an absolute path ending with
32651 * icall.c: modified get_location according to the above changes.
32653 * object.c: init AppDomain.SetupInformation for the default domain after
32654 we have the entry assembly.
32656 * domain.c: when unloading a domain, setup = NULL.
32658 2002-11-04 Dietmar Maurer <dietmar@ximian.com>
32660 * marshal.c (emit_ptr_to_str_conv): try to fix bug 29548
32662 Sun Nov 3 15:39:28 CET 2002 Paolo Molaro <lupus@ximian.com>
32664 * object.h, object.c: introduced mono_object_get_virtual_method ()
32665 to lookup the method invoked on an object when a callvirt is done on
32667 * icall.c: make MethodInfo::Invoke() always do a virtual call.
32669 2002-11-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32671 * appdomain.c: invoke AssemblyLoad and AsemblyResolve events in the
32672 current domain when loaded an assembly and failed to load it.
32674 * icall.c: changed ...Assembly_GetType to Assembly_InternalGetType.
32676 2002-10-31 Dick Porter <dick@ximian.com>
32680 * file-io.c: Return the error status in a parameter, as the
32681 GetLastError() value has long since been blown away if we try and
32682 look it up in a subsequent internal call invocation. Delete the
32683 GetLastError() internal call, because it's useless.
32685 2002-10-31 Dietmar Maurer <dietmar@ximian.com>
32687 * class.[ch]: added cast_class to fix bug 29517
32689 Wed Oct 30 19:37:32 CET 2002 Paolo Molaro <lupus@ximian.com>
32691 * marshal.c: create valid IL code in the filter clause:
32692 the new JIT is less forgiving:-)
32694 2002-10-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32696 * icall.c: removed get_property internal call.
32698 2002-10-25 Zoltan Varga <vargaz@freemail.hu>
32700 * appdomain.h domain.c: Added an ID to appdomains.
32702 * threads.c threads.h icall.c: Implement icall
32703 Thread:GetDomainID(), and remove unused icall
32704 CurrentThreadDomain_internal.
32706 2002-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32708 * icall.c: Don't recurse through the base types in GetConstructor.
32711 Thu Oct 24 16:56:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
32713 * mempool.h, mempool.c: added mono_mempool_empty() and
32714 mono_mempool_stats().
32716 2002-10-23 Dick Porter <dick@ximian.com>
32720 * icall.c: Added MonoIO.GetFileType internal call
32722 2002-10-17 Dick Porter <dick@ximian.com>
32724 * appdomain.c (mono_runtime_cleanup): Don't signal the async
32725 delegate semaphore before waiting for all threads to finish,
32726 because new threads can also call async delegates. Fixes bug
32729 * threadpool.c (async_invoke_thread): Only wait for 500ms instead
32730 of 3 seconds, in case another async job is queued. (This part is
32731 needed because the bug fix reintroduced the 3s exit lag.) This
32732 makes the mono_runtime_shutdown flag superfluous.
32734 Thu Oct 17 13:11:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
32736 * reflection.c: include ehader size in method section headers.
32737 Really check for suplicated modules entries.
32739 2002-10-17 Martin Baulig <martin@gnome.org>
32741 * debug-mono-symfile.c: Added back support for locals.
32743 2002-10-14 Martin Baulig <martin@gnome.org>
32745 * debug-mono-symfile.c: Added MONO_TYPE_I, MONO_TYPE_U and
32748 2002-10-14 Martin Baulig <martin@gnome.org>
32750 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetType): Use
32751 mono_class_get() instead of looking in the class cache.
32753 2002-10-13 Martin Baulig <martin@gnome.org>
32755 * debug-mono-symfile.c: Set version number to 28, include the
32756 signature in method names.
32758 2002-10-13 Martin Baulig <martin@gnome.org>
32760 * debug-mono-symfile.h: Set version number to 27.
32762 2002-10-11 Martin Baulig <martin@gnome.org>
32764 * gc.c: Don't register/unregister NULL pointers as disappearing links.
32766 Thu Oct 10 14:56:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
32768 * metadata.c, metadata.h: added helper function to allocate signatures.
32770 2002-10-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32772 * icall.c: added internal call to get the location of machine.config.
32774 2002-10-08 Martin Baulig <martin@gnome.org>
32776 * debug-mono-symfile.c: Ignore classes with a pending init for the
32779 2002-10-03 Dick Porter <dick@ximian.com>
32781 * threads.c: Freebsd pthread_t is a pointer
32783 2002-10-03 Dick Porter <dick@ximian.com>
32785 * socket-io.c: Implemented GetHostName_internal
32787 2002-10-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32790 (mono_config_parse_file): don't leak the text.
32792 2002-10-02 Martin Baulig <martin@gnome.org>
32794 * debug-mono-symfile.c: Added support for methods.
32796 2002-10-01 Martin Baulig <martin@gnome.org>
32798 * debug-mono-symfile.c: Don't emit methods and line numbers for
32799 the dynamic symbol file, just write the type table. We can easily
32800 have an external helper program which creates a symbol file for an
32803 2002-10-01 Dick Porter <dick@ximian.com>
32805 * threads.c (ves_icall_System_Threading_Thread_Start_internal):
32806 Only add the handle to the cleanup array when we're about to
32807 launch the thread. Bug 31425 deadlocked when the test was run on
32810 2002-10-01 Martin Baulig <martin@gnome.org>
32812 * debug-mono-symfile.c: Added support for properties.
32814 Fri Sep 27 18:55:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
32816 * reflection.c: unaligned store fix from Mark Crichton
32817 <crichton@gimp.org>.
32819 2002-09-27 Martin Baulig <martin@gnome.org>
32821 * icall.c ("System.Reflection.Assembly::GetReferencedAssemblies"):
32824 Fri Sep 27 15:38:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
32826 * assembly.h, assembly.c: use a sane API to hook into the assembly
32827 loading process instead of a useless special-purpouse hack
32828 (ngen needs a hook, too, for example).
32830 2002-09-27 Dick Porter <dick@ximian.com>
32832 * threads.c (mono_thread_init): Call GetCurrentProcess() so
32833 io-layer can set up some process handle info. Not needed on w32,
32834 but doesn't hurt either.
32836 * process.c: Pass the program name in the second parameter to
32837 CreateProcess, so the path is searched. Include the working
32838 directory. Implemented process name, process enumeration, and some
32839 process detail internal calls.
32841 * icall.c: Added internal calls for process lookup, and some
32844 2002-09-26 Martin Baulig <martin@gnome.org>
32846 * assembly.c (mono_install_open_assembly_hook): New global
32847 function to install a function to be invoked each time a new
32848 assembly is loaded.
32849 (mono_assembly_open): Run this callback function if set.
32851 * debug-mono-symfile.c: Put back line numbers for the dynamic
32852 symbol file and also record the .il file as source file. This
32853 allows us to install the temporary symbol file as `file.dbg' just
32854 like a compiler-generated one.
32856 2002-09-26 Nick Zigarovich <nick@chemlab.org>
32858 * Corrected typo in gc.c (BOHEM vs BOEHM).
32860 2002-09-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
32862 * icall.c: fixed bug #31235 by copying a few lines from GetMethods to
32863 GetProperties. Also avoid calling g_slist_length in GetProperties and
32866 Wed Sep 25 22:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
32868 * reflection.c: avoid unaligned stores (bug spotted by
32869 Mark Crichton <crichton@gimp.org>).
32871 2002-09-25 Martin Baulig <martin@gnome.org>
32873 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Use pointers
32874 instead of guint64 for addresses and added prologue/epilogue info.
32876 2002-09-25 Martin Baulig <martin@gnome.org>
32878 * debug-mono-symfile.h (MonoDebugLineNumberEntry): New type to
32879 store line number info. For the dynamic symbol file, we only need
32880 to provide the JIT generated dynamic line number info for the dynamic
32883 2002-09-25 Martin Baulig <martin@gnome.org>
32885 * debug-mono-symfile.h: Incremented version number.
32887 2002-09-24 Martin Baulig <martin@gnome.org>
32889 * class.c (mono_debugger_class_init_func): New global function
32891 (mono_class_init): If mono_debugger_class_init_func is non-NULL,
32894 * debug-mono-symfile.c (mono_debug_symfile_add_type): New
32895 function. This is called via the mono_debugger_class_init_func
32896 hook to add all types to the dynamic type table.
32897 (ves_icall_MonoDebugger_GetType): New interncall to get a class
32898 from its metadata token.
32900 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetType"):
32901 New interncall for the debugger.
32903 2002-09-24 Nick Drochak <ndrochak@gol.com>
32905 * icall.c (ves_icall_System_Enum_ToObject): validate the type parameter
32906 before using it in case it is null.
32908 Tue Sep 24 13:24:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
32910 * metadata.c: allow custom modifiers in local var signatures
32911 (bug spotted by Zoltan Varga).
32913 Tue Sep 24 12:12:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
32915 * class.c: deal with the <Module> class that may have a NULL vtable.
32916 Eliminate warnings.
32918 Tue Sep 24 11:28:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
32920 * image.c, image.h: more strong name helpers.
32921 * monosn.c: more work: convert pem keys to cryptoapi format.
32923 Tue Sep 24 11:27:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
32925 * string-icalls.c: speedup IndexOf.
32927 Tue Sep 24 11:17:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
32929 * icall.c: updates from Zoltan.2.Varga@nokia.com.
32931 Tue Sep 24 11:09:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
32933 * icall.c: cleanup: use mono_object_domain ().
32935 2002-09-23 Martin Baulig <martin@gnome.org>
32937 * debug-mono-symfile.c: Improved type support.
32939 2002-09-22 Martin Baulig <martin@gnome.org>
32941 * debug-mono-symfile.c: Added support for reference types and strings.
32943 2002-09-22 Martin Baulig <martin@gnome.org>
32945 * debug-mono-symfile.c: Started to work on the type table.
32947 2002-09-21 Martin Baulig <martin@gnome.org>
32949 * debug-mono-symfile.c: Largely reworked the symbol table format.
32950 The symbol table is now incrementally updated each time a new
32951 method is added. We're now also using our own magic and version
32952 so that you don't need to recompile all your classes if the
32953 dynamic table changes.
32954 (mono_debug_update_mono_symbol_file): Removed.
32955 (mono_debug_symfile_add_method): New function to add a method.
32957 2002-09-21 Martin Baulig <martin@gnome.org>
32960 ("System.Reflection.Assembly::MonoDebugger_GetLocalTypeFromSignature"):
32963 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetLocalTypeFromSignature):
32964 New interncall to get a method from its metadata token.
32966 2002-09-21 Martin Baulig <martin@gnome.org>
32968 * debug-mono-symfile.c: Create type table.
32970 2002-09-20 Martin Baulig <martin@gnome.org>
32972 * debug-mono-symfile.c: Reflect latest Mono.CSharp.Debugger changes.
32974 2002-09-20 Martin Baulig <martin@gnome.org>
32976 * debug-mono-symfile.c: Provide information about params and locals.
32978 2002-09-20 Martin Baulig <martin@gnome.org>
32980 * icall.c ("System.Reflection.Assembly::MonoDebugger_GetMethod"):
32983 * debug-mono-symfile.c (ves_icall_MonoDebugger_GetMethod): New
32984 interncall to get a method from its metadata token.
32986 2002-09-20 Martin Baulig <martin@gnome.org>
32988 * debug-mono-symfile.c: Added a few checks for method->header
32989 being non-NULL. This should never happen, but for the moment
32990 let's use a g_warning() rather than a g_assert().
32992 2002-09-19 Mark Crichton <crichton@gimp.org>
32994 * gc.c: ves_icall_System_GCHandle_FreeHandle made a call to libgc
32995 even if support for it isn't present. Added an #ifdef to fix this.
32997 * socket-io.c: Added checks back for Solaris support.
32999 2002-09-19 Martin Baulig <martin@gnome.org>
33001 * debug-mono-symfile.c (read_string, write_string): Reflect latest
33002 changes in the symbol file format.
33004 2002-09-18 Martin Baulig <martin@gnome.org>
33006 * debug-mono-symfile.c: Set version number to 21.
33008 2002-09-18 Dick Porter <dick@ximian.com>
33010 * threads.c (mon_new): Use the GC_MALLOC macro to hide differences
33011 on netbsd. Fixes bug 30051.
33013 2002-09-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33016 (set_version_from_string): little fix.
33018 Mon Sep 16 18:57:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
33020 * monosn.c, Makefile.am: added strong name utility.
33021 * reflection.h, reflection.c: implemented delayed signing,
33022 locale, version and hash id assembly attributes.
33024 Mon Sep 16 18:51:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
33026 * loader.c, metadata.c: load param attributes in signatures.
33028 2002-09-16 Martin Baulig <martin@gnome.org>
33030 * debug-mono-symfile.c: Added string table with all method names.
33032 2002-09-14 Martin Baulig <martin@gnome.org>
33034 * debug-mono-symfile.h (MonoSymbolFile): Added method range table for
33035 fast method lookup.
33037 Fri Sep 13 16:04:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
33039 * reflection.c: record the public key token of referenced assemblies.
33041 Fri Sep 13 15:41:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
33043 * image.c, image.h: added functions to get the strong name and the
33044 public key of an assembly.
33045 * pedump.c: use them.
33047 2002-09-12 Dietmar Maurer <dietmar@ximian.com>
33049 * marshal.c (emit_str_to_ptr_conv): support marshalling of delegates.
33051 2002-09-12 Miguel de Icaza <miguel@ximian.com>
33053 * marshal.c (mono_marshal_get_managed_wrapper): Added
33056 2002-09-11 Martin Baulig <martin@gnome.org>
33058 * gc.c: Call GC_unregister_disappearing_link() on all links when
33059 finalizing them, this is necessary to aviod a crash in boehm's
33062 Wed Sep 11 17:06:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
33064 * gc.c: handle GetTarget for finalized objects spotted and fixed by
33067 Wed Sep 11 15:27:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
33069 * icall.c: implemented MonoType::Module.
33070 * reflection.c, reflection.h: mono_module_get_object () from
33071 Tomi Pakarinen <tomi.pakarinen@welho.com>.
33073 Wed Sep 11 12:53:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
33075 * icall.c: ignore overridden methods in GetMethods ().
33076 Fix for FieldInfo::SetValue().
33077 * object.c: handle float/double in runtime invoke.
33079 Tue Sep 10 15:51:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
33081 * object.c: allow a constructor to be called again on an object.
33083 Tue Sep 10 11:58:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
33085 * class.h, class.c: move field layout code to it's own function and
33086 export it. Get an interface id earlier. Move fields in MonoClass
33087 so they are more cache friendly and align the bitfields.
33088 * loader.c: temporary handle get_param_names() for a runtime method.
33089 * reflection.c, reflection.h: more code to handle runtime creation of
33092 2002-09-09 Martin Baulig <martin@gnome.org>
33094 * marshal.c (mono_marshal_get_native_wrapper): We need to use a special
33095 signature with the pinvoke field being set for the actual call.
33097 Sat Sep 7 10:12:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
33099 * icall.c: removed some unused icalls. Start of map of glib charsets
33100 to corlib names. Implemented RuntimeMethod::GetFunctionPointer ().
33102 Fri Sep 6 16:08:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
33104 * debug-helpers.c: break infinite loop (found and fixed by
33105 Holger Arnold <harnold@gmx.de>).
33107 Thu Sep 5 18:50:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
33109 * icall.c: target may be null in create_delegate.
33111 Thu Sep 5 17:42:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
33113 * marshal.c: handle a boolean return type.
33115 Thu Sep 5 13:09:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
33117 * gc.c: put HIDE_POINTER/REVEAL_POINTER only here.
33119 Wed Sep 4 19:23:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
33121 * gc.c: fix weakreferences.
33123 Wed Sep 4 13:59:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
33125 * icall.c: added icall to get default codepage.
33127 2002-09-03 Dick Porter <dick@ximian.com>
33130 * threads.c: Use MonoThread instead of MonoObject where
33133 Store running thread objects in a hash table, so that we have all
33134 the info to hand when waiting for them to finish
33135 (means we don't need OpenThread() any more, so mingw builds should
33136 be fully functional again.)
33139 * object.h: Added thread ID to MonoThread
33141 2002-09-03 Martin Baulig <martin@gnome.org>
33143 * icall.c (System.Reflection.Assembly::get_location): New interncall.
33145 2002-09-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33147 * icall.c: fixed leak in get_temp_path. Thanks lupus.
33149 2002-09-03 Martin Baulig <martin@gnome.org>
33151 * debug-helpers.c (mono_disasm_code_one): Added `const guchar **endp'
33152 argument to store the end address of the disassembled instruction.
33154 * debug-mono-symfile.h (MonoDebugMethodInfo, MonoDebugVarInfo): Moved
33155 here from debug-symfile.h.
33156 (MonoDebugMethodJitInfo): Moved all fields which are filled out by the
33157 JIT into this struct.
33158 (MonoSymbolFile): Added `char *image_file' field.
33159 (MonoDebugGetMethodFunc): Removed.
33160 (mono_debug_update_mono_symbol_file): Removed the hash table argument.
33161 (mono_debug_create_mono_symbol_file): Removed the `source_file' argument.
33162 (mono_debug_find_method): New method.
33164 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): Always
33165 create a full symbol file.
33166 (mono_debug_update_mono_symbol_file): Don't distinguish between dynamic
33167 and static symbol files.
33168 (mono_debug_find_method): The symbol file keeps an internal method hash,
33169 call this to get a MonoDebugMethodInfo from a MonoMethod.
33171 * debug-symfile.[ch]: Removed.
33173 2002-08-29 Miguel de Icaza <miguel@ximian.com>
33175 * image.c (do_mono_image_open): Remove linker version check.
33177 2002-08-29 Dietmar Maurer <dietmar@ximian.com>
33179 * marshal.c (mono_marshal_get_managed_wrapper): don't cache
33180 wrappers for instance methods.
33182 2002-08-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33184 * icall.c: added ves_icall_System_IO_Path_get_temp_path.
33186 2002-08-28 Dick Porter <dick@ximian.com>
33188 * Makefile.am: Export HOST_CC for w32 builds
33190 Tue Aug 27 18:34:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
33192 * file-io.c process.c: MonoString are null terminated, no
33193 need for mono_string_to_utf16() anymore.
33195 Tue Aug 27 17:51:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
33197 * icall.c, unicode.h, unicode.c: removed unused iconv stuff.
33199 Tue Aug 27 16:38:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
33201 * icall.c, reflection.h: speedup System.MonoType.
33203 Tue Aug 27 16:37:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
33205 * reflection.c: allow null as the value of a string argument in
33206 custom attributes constructors.
33208 2002-08-27 Martin Baulig <martin@gnome.org>
33210 * debug-mono-symfile.h (MonoSymbolFileMethodAddress): Removed the
33211 `trampoline_address' field.
33213 2002-08-27 Dietmar Maurer <dietmar@ximian.com>
33215 * marshal.c (mono_marshal_get_native_wrapper): removed wrong null
33216 check (fixes bug #29486)
33218 2002-08-27 Martin Baulig <martin@gnome.org>
33220 * debug-mono-symfile.c: Changed the file format in a way that allows us
33221 open it read-only and to use a specially malloced area for all the
33222 dynamic data. We can now also generate a symbol file on-the-fly if we're
33223 debugging IL code and there is no MCS generated symbol file for it.
33225 Mon Aug 26 16:47:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
33227 * object.c: added a define for a good string and array
33228 creation speedup (not enabled by default because we need to deal with
33231 2002-08-26 Martin Baulig <martin@gnome.org>
33233 * debug-mono-symfile.c (mono_debug_create_mono_symbol_file): New
33234 function to create a dynamic symbol file. This is used by the
33235 debugger to create a symbol file for IL code on-the-fly.
33237 2002-08-26 Martin Baulig <martin@gnome.org>
33239 * loader.c (mono_lookup_pinvoke_call): Include the error message
33240 from g_module_error() in the error message.
33242 2002-08-24 Martin Baulig <martin@gnome.org>
33244 * debug-mono-symfile.c (mono_debug_update_mono_symbol_file): New
33245 function to update the symbol file. The symbol file is mmap()ed
33246 writable, but private. This allows us to install the symbol file
33247 together with the assembly.
33249 2002-08-24 Martin Baulig <martin@gnome.org>
33251 * debug-mono-symfile.[ch]: New files. Similar to debug-symfile.[ch]
33252 but they can read the new symbol file format which mcs is now creating.
33254 * debug-symfile.c (mono_debug_find_source_location): Moved to
33255 debug-mono-symfile.c; this is now operating on the new symbol file.
33257 2002-08-23 Martin Baulig <martin@gnome.org>
33259 * debug-helpers.c (mono_method_desc_from_method): New function to get
33260 a MonoMethodDesc from a MonoMethod.
33262 Fri Aug 23 15:54:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
33264 * object.c: fixes assertion failure caused by multiple ExecuteAssembly
33265 calls for same domain (patch by Tomi Pakarinen <Tomi.Pakarinen@iki.fi>).
33267 Fri Aug 23 12:14:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
33269 * string-icalls.[ch]: make helper methods static.
33271 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33273 * icall.c: re-applied patch to GetValueInternal. Also added R4 and R8
33274 types to it and to SetValueInternal.
33276 * object.c: Moved handle_enum label to its proper place. This was the
33279 This time i compiled mcs and gtk-sharp and they both work.
33281 2002-08-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33283 * icall.c: reverted partially my previous patch until
33284 object.c:set_value handles enums correcly.
33286 2002-08-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33289 (ves_icall_MonoField_GetValue): changed to use mono_field_get_value.
33290 (ves_icall_System_Environment_get_MachineName): removed warning when
33291 compiling under cygwin.
33293 Thu Aug 22 18:49:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
33295 * object.c: fixed field_get_value() for reference types.
33297 2002-08-22 Dick Porter <dick@ximian.com>
33299 * socket-io.c (ves_icall_System_Net_Sockets_Socket_RecvFrom_internal):
33300 Don't free a buffer while it's still needed. Patch from Jonathan
33301 Liger <Jonathan.liger@wanadoo.fr>
33303 2002-08-21 Miguel de Icaza <miguel@ximian.com>
33305 * icall.c (ves_icall_System_Environment_get_Platform): Add new
33308 2002-08-21 Dietmar Maurer <dietmar@ximian.com>
33310 * icall.c (ves_icall_get_method_info): s/MonoMethod/MonoReflectionMethod/
33311 (ves_icall_get_parameter_info): s/MonoMethod/MonoReflectionMethod/
33313 * marshal.c (mono_marshal_get_remoting_invoke): save lmf, because
33314 we call unmanaged code which throws exceptions.
33316 Wed Aug 21 12:56:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
33318 * appdomain.h: added per-domain entry_assembly.
33319 * appdomain.c: ensure mono_runtime_exec_main () gets non-null
33321 * icall.c: Assembly::GetEntryAssembly icall.
33322 * object.c: set domain->entry_assembly in mono_runtime_exec_main().
33323 Changes above from a patch by Tomi Pakarinen <tomi.pakarinen@welho.com>.
33325 Tue Aug 20 15:42:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
33327 * appdomain.h, gc.c: added mono_domain_finalize ().
33329 2002-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33332 (mono_print_unhandled_exception): changed g_warning by g_printerr
33333 because g_log has a 1024 characters limit (yeah, i got a big stack
33334 trace). Don't print exception name, that should be in ToString
33337 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33339 * icall.c: added ves_icall_FieldInfo_SetValueInternal.
33340 * object.c: added missing MONO_TYPE_ARRAY in mono_runtime_invoke_array.
33342 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33345 (mono_print_unhandled_exception): after previous commit, i realized
33346 that MS calls ToString on the exception. I changed this function to
33347 do that. This way we get stack_trace for free.
33349 2002-08-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33352 (mono_print_unhandled_exception): invoke Message property instead of
33353 getting 'message' field from Exception. Don't allocate memory for
33354 'trace' and 'message' if not needed.
33356 2002-08-18 Dick Porter <dick@ximian.com>
33358 * unicode.c: Fix asserts to match Encoder.cs checks
33360 Fri Aug 16 21:42:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
33362 * marshal.c: fix unaligned store issue and a few wrong
33363 opcode argument types.
33365 2002-08-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33367 * icall.c: added GetUninitializedObjectInternal internal call.
33369 2002-08-16 Dietmar Maurer <dietmar@ximian.com>
33371 * appdomain.c (mono_runtime_invoke_in_domain): transfer Exception
33372 to the right domain.
33374 2002-08-14 Dietmar Maurer <dietmar@ximian.com>
33376 * marshal.c (mono_marshal_get_runtime_invoke): unbox value types
33378 * class.c (class_compute_field_layout): set blittable to false for Strings
33380 * appdomain.c (mono_domain_transfer_object): added support for ISerializable
33382 Wed Aug 14 17:26:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
33384 * appdomain.h, reflection.c, icall.c, object.c, reflection.h:
33385 first chunk of code to create types at runtime. Code to
33386 handle ReflectedType/DeclaringType. Make reflection handles
33389 Wed Aug 14 17:24:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
33391 * class.c: set correct name in arrays.
33393 2002-08-13 Dietmar Maurer <dietmar@ximian.com>
33395 * appdomain.c (mono_domain_transfer_object): make it work with
33396 valuetypes. bug fixes.
33398 2002-08-12 Dick Porter <dick@ximian.com>
33400 * object.h: Rename some parameters to avoid c++ keywords (Patch
33401 from Joseph Wenninger <kde@jowenn.at>)
33403 Thu Aug 8 13:04:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
33405 * icall.c: added icall to implement Assembly.GetFile*.
33407 Thu Aug 8 10:18:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
33409 * reflection.h, reflection.c: code to embed managed resources.
33411 Tue Aug 6 17:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
33413 * class.c: move all the type size stuff into
33414 class_compute_field_layout().
33416 Tue Aug 6 11:20:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
33418 * class.c: ensure enums have always the correct instance size.
33419 * unicode.c: remove wrong assert.
33421 Mon Aug 5 19:30:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
33423 * assembly.c: fix mem corruption issue.
33424 * image.h, image.c: added mono_image_get_resource () to access
33426 * icall.c: implemented Assembly.EntryPoint property and some
33427 Managed Resources related internalcalls.
33430 Mon Aug 5 18:18:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
33432 * image.c, image.h: impemented mono_image_get_entry_point ().
33433 * appdomain.c: use mono_image_get_entry_point.
33435 Mon Aug 5 13:08:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
33437 * reflection.c: support the object type argument when loading
33440 2002-08-05 Dietmar Maurer <dietmar@ximian.com>
33442 * marshal.c (mono_marshal_get_managed_wrapper): add suppport for
33443 String as return type.
33445 Fri Aug 2 21:15:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
33447 * reflection.c: fix encoding of named args for custom attrs to match
33448 the ms implementation. Read them back when instantiating custom
33451 2002-08-02 Radek Doulik <rodo@ximian.com>
33453 * marshal.c (mono_mb_add_data): convert ret value to LE, suggested
33454 by Dietmar as quick fix
33455 (mono_marshal_get_delegate_begin_invoke): use sig->param_count +
33456 16 as stack size, used on more places as quick fix before Dietmar
33457 will fix it properly
33459 Fri Aug 2 17:48:17 CEST 2002 Paolo Molaro <lupus@ximian.com>
33461 * object.h, object.c: added accessors for fields and properties.
33463 Fri Aug 2 17:45:15 CEST 2002 Paolo Molaro <lupus@ximian.com>
33465 * class.c, class.h: made mono_class_get_field_from_name ()
33466 loop on parent types.
33467 Added mono_class_get_property_from_name ().
33469 Fri Aug 2 11:40:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
33471 * class.c, class.h: move the code to setup the type vtable in its own
33472 function so that it can be reused also for types created at runtime.
33473 Eliminate the "class" identifier from the header file.
33474 * reflection.c: setup the vtable for enums so that we can create
33475 objects for use in SetConstant ().
33477 2002-08-02 Dietmar Maurer <dietmar@ximian.com>
33479 * marshal.c (mono_delegate_to_ftnptr): pass delegate->target
33480 instead of the delegate itself as this pointer (bug #28383)
33482 2002-08-01 Dietmar Maurer <dietmar@ximian.com>
33484 * marshal.c (mono_marshal_get_managed_wrapper): added return type
33487 Wed Jul 31 16:49:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
33489 * loader.c: don't set the pinvoke bit on icalls.
33491 2002-07-31 Dietmar Maurer <dietmar@ximian.com>
33493 * debug-helpers.c (mono_method_full_name): only print a number to
33494 indicate wrapper type (so that the output is more readable in traces).
33496 2002-07-30 Dietmar Maurer <dietmar@ximian.com>
33498 * class.c (mono_class_init): include method override patch from Paolo
33500 Tue Jul 30 15:20:08 CEST 2002 Paolo Molaro <lupus@ximian.com>
33502 * icall.c: fixed GetTypeCode().
33504 2002-07-29 Dietmar Maurer <dietmar@ximian.com>
33506 * threads.c (ves_icall_System_Threading_Thread_Thread_internal):
33507 use real delegate invoke function to make it work with multicast
33508 delegates (fix bug# 28291).
33510 Fri Jul 26 11:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
33512 * object.c: load constant strings.
33514 Fri Jul 26 11:36:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
33516 * reflection.c: no magic numbers.
33517 * tabledefs.h: security action enum.
33519 Fri Jul 26 11:22:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
33521 * assembly.c: fix possible memory corruption.
33523 Thu Jul 25 13:58:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
33525 * reflection.h, reflection.c: added support for linking resources.
33526 * verify.c: check we have an updated corlib.
33528 2002-07-25 Dietmar Maurer <dietmar@ximian.com>
33530 * marshal.c (mono_marshal_get_native_wrapper): correctly marshal
33532 (mono_marshal_string_array): null terminate unmanaged string arrays.
33533 (mono_marshal_get_managed_wrapper): print warning for arrays (not implemented)
33535 Wed Jul 24 13:32:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
33537 * icall.c: Type.GetType () can now return also types from the
33540 Wed Jul 24 13:04:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
33542 * loader.h, loader.c: stack walking support.
33543 * icall.c: implemented GetCurrentMethod, GetExecutingAssembly,
33544 GetCallingAssembly.
33546 2002-07-24 Dietmar Maurer <dietmar@ximian.com>
33548 * marshal.c: added optimisations for blittable types
33550 * class.c (mono_array_class_get): do not set blittable attribute on arrays
33551 (mono_class_setup_mono_type): set blittable attribute for single
33554 * marshal.c (mono_string_utf8_to_builder): impl.
33555 (mono_string_builder_to_utf8): impl.
33556 (mono_marshal_get_native_wrapper): impl. StringBuilder marshaling
33558 2002-07-23 Dietmar Maurer <dietmar@ximian.com>
33560 * marshal.c (mono_marshal_get_native_wrapper): impl. byref types
33561 (mono_marshal_get_managed_wrapper): impl. byref types
33563 2002-07-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33566 (search_method): don't display debug message.
33568 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
33570 * metadata.c (mono_type_stack_size): removed temporary fix for new gcc
33572 Mon Jul 22 18:17:05 CEST 2002 Paolo Molaro <lupus@ximian.com>
33574 * appdomain.c: set the missing filename when throwing exception.
33576 2002-07-22 Dietmar Maurer <dietmar@ximian.com>
33578 * metadata.c (mono_type_size): code cleanup
33579 (mono_type_stack_size): removed some test code
33581 2002-07-21 Miguel de Icaza <miguel@ximian.com>
33583 * appdomain.c (ves_icall_System_Reflection_Assembly_LoadFrom): Use
33584 mono_get_exception_file_not_found now.
33586 * exception.c (mono_exception_from_name_two_strings): New version
33587 that will call a constructor with two string arguments.
33588 (mono_get_exception_file_not_found): New helper routine, used to
33589 report file-not-found errors.
33591 2002-07-20 Dick Porter <dick@ximian.com>
33594 * process.c: Pass file handles to CreateProcess
33598 * file-io.c: Implemented CreatePipe
33600 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
33602 * metadata.c (mono_get_param_info): set alignment for value types
33604 Fri Jul 19 18:58:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
33606 * appdomain.h, domain.c, threads-types.h: don't include config.h in headers.
33607 Constify mono_domain_assembly_open().
33608 * loader.c: handle null namespace in icalls.
33610 2002-07-19 Dietmar Maurer <dietmar@ximian.com>
33612 * marshal.c (emit_ptr_to_str_conv): marshal object as structs
33613 (emit_str_to_ptr_conv): marshal object as structs
33615 * metadata.c (mono_type_to_unmanaged): marshal object as structs
33617 * marshal.c (mono_marshal_get_runtime_invoke): support value types
33619 2002-07-18 Dietmar Maurer <dietmar@ximian.com>
33621 * marshal.c (mono_marshal_get_runtime_invoke): use exception filters
33622 (mono_marshal_get_native_wrapper): we an now return value types
33624 Wed Jul 17 18:21:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
33626 * verify.c: more checks implemented.
33628 2002-07-17 Dietmar Maurer <dietmar@ximian.com>
33630 * marshal.c (mono_delegate_to_ftnptr): invoke the right method
33632 (mono_marshal_get_native_wrapper): allow byref arguments
33633 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringXXX):
33634 impl. PtrToStringXXX methods
33635 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type): impl.
33636 (ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf): impl.
33637 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi): impl.
33638 (ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalUni): impl.
33639 (ves_icall_System_Runtime_InteropServices_Marshal_DestroyStructure): impl.
33641 Tue Jul 16 19:00:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
33643 * reflection.c: fix buglet in parsing an assembly name.
33645 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
33647 * marshal.c (emit_ptr_to_str_conv): first impl.
33649 Tue Jul 16 12:39:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
33651 * object.c, class.h: cache the vtable in the class as suggested by
33652 vargaz@freemail.hu (Zoltan Varga).
33654 Tue Jul 16 11:27:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
33656 * class.h, loader.c: added mono_field_from_token().
33657 * verify.c: first cut of type checking code.
33659 2002-07-16 Dietmar Maurer <dietmar@ximian.com>
33661 * marshal.c (mono_marshal_get_native_wrapper): support valuetypes
33663 2002-07-15 Dietmar Maurer <dietmar@ximian.com>
33665 * marshal.c (mono_marshal_get_native_wrapper): handle enum types
33667 (mono_marshal_get_remoting_invoke): impl.
33668 (mono_delegate_begin_invoke): impl.
33669 (mono_mb_emit_save_args): impl.
33670 (mono_delegate_end_invoke): impl.
33671 (mono_marshal_get_delegate_begin_invoke):
33672 (mono_marshal_get_delegate_end_invoke):
33673 (mono_marshal_get_delegate_invoke): generate a special name for
33674 those methods (including the signature) and associate them whith
33675 the delegate class.
33677 2002-07-13 Gonzalo Paniagua Javier <gonzalo@gnome-db.org>
33680 (mono_reflection_type_from_name): now it has a MonoImage parameter
33681 which is used as the default image to search the type in. If the image
33682 is NULL or getting the type from it fails, it defaults to corlib.
33684 * icall.c: changed 1 call to mono_reflection_type_from_name to match
33687 Sat Jul 13 19:32:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
33689 * reflection.c: update the parameter table index.
33691 Sat Jul 13 17:34:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
33693 * domain.c: don't include the mark byte in the string hash.
33695 Sat Jul 13 15:06:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
33697 * icall.cs: icall for Type.GetTypeCode ().
33698 * verify: a couple of fixes and disabled local initialization checks.
33700 2002-07-12 Dietmar Maurer <dietmar@ximian.com>
33702 * marshal.c: better debugging support (DEBUG_RUNTIME_CODE)
33704 * debug-helpers.c (mono_method_full_name): print the type of the
33707 * metadata.c (mono_signature_hash): a hash function for signatures
33708 (mono_signature_hash): better hash algorithm
33710 * marshal.c (mono_marshal_get_delegate_invoke): cache methods by signature
33712 * debug-helpers.c (mono_method_full_name): this can now generate
33713 method names with signatures
33715 * marshal.c (mono_marshal_get_managed_wrapper): bug fix: unmanaged
33716 method dont have this pointers.
33718 Fri Jul 12 11:35:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
33720 * reflection.c: fixup typebuilder tokens.
33721 * image.c: fix buglet.
33722 * marshal.h: remove whitespace.
33723 * metadata.h, metadata.c: reinstate code that was removed.
33724 * verify.c: handle catch directives and fix another couple of bugs.
33726 2002-07-11 Dietmar Maurer <dietmar@ximian.com>
33728 * marshal.c (mono_marshal_get_native_wrapper): support BOOLEAN
33729 (mono_marshal_get_native_wrapper): make it comp. with the old code
33730 (mono_marshal_get_native_wrapper): support boolean
33731 (mono_marshal_get_managed_wrapper): support more types
33733 2002-06-25 Dietmar Maurer <dietmar@ximian.com>
33735 * class.c (class_compute_field_layout): compute class->blittable attribute.
33737 2002-07-09 Dick Porter <dick@ximian.com>
33739 * threads.c: Make the thread cleaning up cope with threads that
33742 2002-07-08 Radek Doulik <rodo@ximian.com>
33744 * reflection.c (method_encode_code): use non-translated values to
33745 compute finally_start, this fixes exception handling on ppc, yay!
33747 * decimal.h (struct signscale): fix endianess
33749 2002-07-07 Radek Doulik <rodo@ximian.com>
33751 * reflection.c: swap box_val and not val
33753 Mon Jul 8 15:18:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
33755 * reflection.c, reflection.h: handle full assembly info in type name.
33756 Handle Type arguments when loading custom attributes.
33757 * icall.c: updated to use new mono_reflection_type_from_name () method.
33759 2002-07-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33762 (method_from_memberref): also print assembly name when method not found.
33764 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33767 (ves_icall_TypeGetProperties): fixed bug #27473.
33769 2002-07-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
33771 * reflection.c: display image name and token when cannot find the
33772 .ctor for an attribute.
33774 2002-07-05 Martin Baulig <martin@gnome.org>
33776 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
33778 2002-07-04 Dick Porter <dick@ximian.com>
33780 * threads.c (mono_thread_cleanup): Nasty kludge to get this to
33781 compile on mingw. This will cause mingw builds to not wait for
33782 subthreads to terminate after the main thread does. I've lodged a
33783 bug with the mingw developers for them to wrap OpenThread().
33785 2002-07-03 Dick Porter <dick@ximian.com>
33787 * threads.c: Store thread IDs instead of handles, because
33788 GetCurrentThread() returns a pseudohandle and therefore stores
33789 useless values. mono_thread_cleanup() continues checking the
33790 array of threads until it is empty, to cope with subthreads
33791 spawning new threads after the main thread has finished.
33795 * profiler-private.h: Pass the thread ID to thread profiler
33796 functions, instead of a handle
33798 Wed Jul 3 17:43:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
33800 * verify.c: fixes to make it more usable.
33801 * pedump.c: added --verify code to verify IL code in an assembly.
33803 Tue Jul 2 20:40:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
33805 * reflection.c: turn errors into warnings to allow compiling corlib.
33807 Tue Jul 2 19:33:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
33809 * reflection.c: add special cases to compile corlib.
33811 Mon Jul 1 18:00:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
33813 * reflection.c: handle properties with only a set method.
33815 Mon Jul 1 17:11:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
33817 * opcodes.h: add enum with opcodes in opval order.
33819 2002-07-01 Dick Porter <dick@ximian.com>
33822 * object.c (mono_runtime_run_main): Removed unneeded argument
33824 2002-06-28 Martin Baulig <martin@gnome.org>
33826 * debug-symfile.c: Reflect latest MonoDwarfFileWriter changes.
33828 2002-06-27 Dick Porter <dick@ximian.com>
33830 * threads.c: Store the handle in both the parent thread and in the
33831 subthread, to minimise the time between starting a new thread and
33834 2002-06-26 Dick Porter <dick@ximian.com>
33836 * appdomain.c (mono_runtime_cleanup): Close the socket library
33837 after all the threads have finished, not before
33839 2002-06-26 Martin Baulig <martin@gnome.org>
33841 * debug-symfile.c (mono_debug_find_source_location): Added
33842 `guint32 *line_number' argument. If it's not NULL, store the line number
33843 there and return the file name without the line number.
33845 2002-06-25 Dick Porter <dick@ximian.com>
33849 * process.c: Process forking and other support functions
33851 2002-06-25 Dick Porter <dick@ximian.com>
33853 * image.c (do_mono_image_open): Set ref_count to 1, so that bad
33854 things dont happen when the image is closed.
33855 (mono_image_lookup_resource): Walk the resource section looking
33856 for a particular entry
33858 * cil-coff.h: PE resource section decoding
33860 2002-06-25 Dick Porter <dick@ximian.com>
33864 (mono_assembly_foreach): Accessor functions to walk the list of
33866 (mono_assembly_set_main):
33867 (mono_assembly_get_main): Process methods need to know which
33868 assembly is the "main" one
33870 * object.c (mono_runtime_run_main): Record the main assembly
33872 * debug-helpers.c: Fix typo
33874 2002-06-24 Dietmar Maurer <dietmar@ximian.com>
33876 * icall.c (ves_icall_System_Runtime_InteropServices_Marshal_copy_to_unmanaged): impl.
33877 (ves_icall_System_Runtime_InteropServices_Marshal_copy_from_unmanaged): impl.
33879 Sat Jun 22 11:37:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
33881 * icall.c: fix off-by-one in Assembly.GetTypes() reported by bob@karr.ath.cx.
33883 2002-06-21 Miguel de Icaza <miguel@ximian.com>
33885 * image.c (do_mono_image_open): Initialize reference count,
33886 otherwise we leak the MonoImage.
33888 Fri Jun 21 19:16:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
33890 * reflection.c: small tweak to handle self-hosting.
33892 Thu Jun 20 23:28:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
33894 * reflection.c: fix type name parse code.
33896 Thu Jun 20 19:24:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
33898 * reflection.c: break out of the loop.
33899 * image.c: special case corlib.
33901 Thu Jun 20 16:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
33903 * reflection.c: add all the custom attrs at the end to ensure the
33904 ctors have been properly initialized when the attributes are defined
33905 in the current assembly.
33907 Thu Jun 20 13:46:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
33909 * reflection.c: handle correctly multiple-nested types.
33911 Thu Jun 20 11:49:00 CEST 2002 Paolo Molaro <lupus@ximian.com>
33913 * row-indexes.h: fix typos.
33914 * reflection.c: adjust for typos and fix method_def_or_ref
33915 encoding in MethodImpl table.
33917 Wed Jun 19 21:57:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
33919 * reflection.c: fix entry point patching (thanks Serge!).
33921 2002-06-18 Dietmar Maurer <dietmar@ximian.com>
33923 * verify.c: add check for System.Exception
33925 Mon Jun 17 20:23:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
33927 * image.c, class.c: minifix for code just c&p'ed.
33928 * reflection.c: warning fix.
33929 * object.h, loader.h, domain.c: load also StringBuilder.
33931 Mon Jun 17 17:29:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
33933 * marshal.h, marshal.c: some support code to handle complex marshaling.
33935 Mon Jun 17 16:32:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
33937 * class.h, class.c, reflection.c: handle ignorecase in GetType ().
33938 Better signatures with vtable error dump.
33940 Mon Jun 17 16:13:35 CEST 2002 Paolo Molaro <lupus@ximian.com>
33942 * reflection.c, reflection.h, icall.c: fixes for multiple-nested types.
33944 2002-06-17 Dietmar Maurer <dietmar@ximian.com>
33946 * icall.c (ves_icall_Type_GetField): impl.
33948 Mon Jun 17 16:08:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
33950 * metadata.h, metadata.c: added mono_metadata_get_marshal_info()
33951 to retrieve a marshal description blob for a field or param.
33953 Mon Jun 17 14:57:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
33955 * reflection.h, reflection.c: change order of nested type emission
33956 to avoid table corruption. The NestedTypes table is sorted.
33957 * icall.c: change order of GetConstructor results to workaround mcs bug.
33959 Fri Jun 14 16:24:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
33961 * reflection.h, reflection.c: handle field and param marshal
33964 Wed Jun 12 16:30:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
33966 * icall.c, marshal.c marshal.h: more Marshal class implementation.
33968 Tue Jun 11 17:29:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
33970 * reflection.c: fix call convention.
33972 Tue Jun 11 16:52:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
33974 * reflection.h, reflection.c: mono_image_get_memberref_token()
33975 takes a type instead of a class, now. Added
33976 mono_image_get_array_token() to create tokens for the special
33977 multi-dim array methods.
33979 Tue Jun 11 13:21:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
33981 * assembly.c: handle modules (no assembly table). Split
33982 loading references in its own function.
33983 * class.c: handle moduleref resolution scope.
33984 * image.c, image.h: cache module name in image.
33986 2002-06-07 Martin Baulig <martin@gnome.org>
33988 * reflection.c (mono_image_get_type_info): Only add a class layout entry
33989 if we actually have a `tb->class_size' (ie. it's not UnspecifiedTypeSize).
33991 Fri Jun 7 22:07:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
33993 * icall.c: more signature fixes that used uint instead of int.
33995 Fri Jun 7 20:41:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
33997 * reflection.c: fixed signature of field refs.
33999 Fri Jun 7 19:41:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34001 * class.c, reflection.c: handle typerefs of nested types
34002 (both on read and when writing files).
34004 Fri Jun 7 17:46:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
34006 * icall.c: fix method signatures that tried to workaround the previous
34009 Fri Jun 7 17:36:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
34011 * debug-helpers.c: fix typo.
34013 Fri Jun 7 17:00:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
34015 * cil-coff.h, icall.c, image.c, reflection.c, reflection.h:
34016 rewrote the PE/COFF writing code (our programs are understood by the
34019 Tue Jun 4 18:10:47 CEST 2002 Paolo Molaro <lupus@ximian.com>
34021 * gc.c, gc.h, icall.c: weakreference support.
34023 Tue Jun 4 16:06:19 CEST 2002 Paolo Molaro <lupus@ximian.com>
34025 * Makefile.am, mono-config.c: use $(sysconfdir).
34027 Mon Jun 3 13:13:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
34029 * icall.c: changed default precision of Double.ToString() to 15.
34030 Fixed memory leak. Unified with Single.ToString.
34032 Sat Jun 1 14:26:45 CEST 2002 Paolo Molaro <lupus@ximian.com>
34034 * sysmath.c: workaround systems missing NAN and/or HUGE_VAL.
34036 Sat Jun 1 13:46:54 CEST 2002 Paolo Molaro <lupus@ximian.com>
34038 * pedump.c, appdomain.c, appdomain.h, assembly.c, domain.c,
34039 gc.c, icall.c, image.c, mono-config.c, reflection.c: killed
34040 warnings and compilation fixes from Dennis Haney (davh@davh.dk)
34043 Fri May 31 16:58:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34045 * debug-symfile.c, sysmath.c: yet more compilation fixes.
34047 Fri May 31 16:35:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34049 * reflection.c, socket-io.c: more compilation fixes.
34051 Fri May 31 15:58:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
34053 * appdomain.c, class.c, class.h, debug-symfile.c, decimal.c,
34054 domain.c, loader.c, object.c, object.h, reflection.c, string-icalls.h,
34055 unicode.c: warning and compiler compatibility fixes.
34057 Fri May 31 15:36:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
34059 * class.h, metadata.c: fixed warnings/compilation errors.
34061 Fri May 31 13:08:25 CEST 2002 Paolo Molaro <lupus@ximian.com>
34063 * Makefile.am, mono-config.c, mono-config.h: configuration file
34065 * loader.c, loader.h: make Dll mapping configurable at runtime in the
34066 config file. Export methods to insert and lookup mappings.
34068 Fri May 31 12:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
34070 * reflection.c: handle types and boxed objects in custom attr
34073 2002-05-30 Martin Baulig <martin@gnome.org>
34076 (ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token): Removed.
34078 Thu May 30 14:15:02 CEST 2002 Paolo Molaro <lupus@ximian.com>
34080 * metadata.c, metadata.h: added mono_metadata_implmap_from_method()
34081 to lookup the implmap row for a P/Invoke method.
34082 * loader.c: added mono_lookup_pinvoke_call(): we only lookup a
34083 P/Invoke method from the runtime on an as needed basis.
34085 2002-05-28 Dietmar Maurer <dietmar@ximian.com>
34087 * metadata.c (mono_metadata_parse_signature): impl.
34089 Tue May 28 16:02:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34091 * class.c: handle .pack directive.
34093 Tue May 28 11:04:46 CEST 2002 Paolo Molaro <lupus@ximian.com>
34095 * object.c: initialize static fields with RVA data.
34097 2002-05-25 Martin Baulig <martin@gnome.org>
34100 (ves_icall_Debugger_DwarfFileWriter_get_type_token): Removed.
34102 2002-05-24 Martin Baulig <martin@gnome.org>
34105 (ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig): Removed.
34106 (ves_icall_Debugger_MonoSymbolWriter_method_from_token): Renamed to
34107 `ves_icall_Debugger_MonoSymbolWriter_method_builder_from_token'.
34109 Thu May 23 18:44:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
34111 * object.c: special case string ctros in invoke.
34112 * gc.c: silly whitespace changes.
34114 2002-05-23 Dietmar Maurer <dietmar@ximian.com>
34116 * threadpool.[ch]: impl. a threadpool that can
34117 be used by mint and mono.
34119 2002-05-22 Martin Baulig <martin@gnome.org>
34121 * debug-symfile.c (ves_icall_Debugger_MonoSymbolWriter_method_from_token):
34122 The first argument is now a `MonoReflectionModuleBuilder *', the return
34123 value is a `MonoReflectionModuleBuilder *'. Use the AssemblyBuilder's
34124 `methods' field to get the method builder. The `token' argument is the
34127 * unicode.c (iconv_get_length, iconv_convert): Silently ignore all
34128 invalid characters instead of g_assert_not_reached()ing. This seems
34129 to be the behaviour of mscorlib.
34131 2002-05-22 Dietmar Maurer <dietmar@ximian.com>
34133 * object.c (mono_runtime_invoke_array): applied patch from Rachel
34134 Hestilow to fix bug #25104
34136 2002-05-21 Martin Baulig <martin@gnome.org>
34138 * debug-symfile.c (mono_debug_find_source_location): New function.
34139 Looks up an IL offset in the line number table and returns the source
34140 location as a string.
34142 2002-05-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34145 (mono_double_ToStringImpl): changed %f by %g until we have something
34148 2002-05-21 Nick Drochak <ndrochak@gol.com>
34150 * icall.c : Use different name for Math.Pow's icall. Needed to check
34151 parameters first in C#.
34153 Mon May 20 17:36:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34155 * icall.c, reflection.h: added icall to get info about an event.
34157 2002-05-20 Radek Doulik <rodo@ximian.com>
34159 * object.c (mono_value_box): don't use memcpy for boxing on BIG
34161 (mono_value_box): don't use memcpy for small sizes on
34162 architectures with unaligned access
34164 2002-05-20 Martin Baulig <martin@gnome.org>
34166 * reflection.c (mono_reflection_setup_internal_class): Don't crash
34167 if `tb->parent == NULL'.
34168 (mono_reflection_create_internal_class): New function. This is
34169 called from TypeBuilder.CreateType() and sets `klass->enum_basetype'
34172 * icall.c ("System.Reflection.Emit.TypeBuilder::create_internal_class"):
34175 2002-05-19 Martin Baulig <martin@gnome.org>
34177 * unicode.c (ves_icall_iconv_get_bytes): Actually use the `charCount'
34178 argument to get the length, don't default to the array length.
34180 2002-05-18 Miguel de Icaza <miguel@ximian.com>
34182 * assembly.c (mono_assembly_setrootdir): New function used to
34183 override the MONO_ASSEMBLIES directory.
34185 Fri May 17 20:39:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
34187 * icall.c: ValueType_GetHashCode() initialize local var.
34189 Thu May 16 17:20:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
34191 * reflection.c: sort custom attributes table.
34193 Thu May 16 16:08:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
34195 * reflection.c: support named args in custom attributes (write support).
34197 Thu May 16 13:04:59 CEST 2002 Paolo Molaro <lupus@ximian.com>
34199 * reflection.c: fix finally position calculation.
34201 2002-05-15 Radek Doulik <rodo@ximian.com>
34203 * reflection.c: fixed endianess at many places
34205 * icall.c (ves_icall_InitializeArray): comment out debug msg
34207 2002-05-15 Dietmar Maurer <dietmar@ximian.com>
34209 * object.c (mono_unhandled_exception): new function to handle
34210 unhandled exceptions.
34211 (mono_unhandled_exception): call the UnhandledException event.
34212 (mono_runtime_delegate_invoke): impl.
34214 Wed May 15 15:59:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
34216 * metadata.h, metadata.c, class.c: mono_metadata_field_info ()
34217 returns the RVA, not the direct pointer to the data. Handle the case
34218 when the class size is fixed.
34220 Tue May 14 16:59:44 CEST 2002 Paolo Molaro <lupus@ximian.com>
34222 * reflection.c: fix some endianess issues.
34224 2002-05-14 Dietmar Maurer <dietmar@ximian.com>
34226 * object.c (mono_runtime_invoke): is now able to catch exceptions.
34228 * threads.c (mono_thread_init): added a callback which is invoked
34231 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
34233 * icall.c: make GetHashCode return non-negative values.
34235 2002-05-14 Dan Lewis <dihlewis@yahoo.co.uk>
34237 * object.c, icall.c, gc.c: revert to address-based hashcode.
34239 2002-05-13 Miguel de Icaza <miguel@ximian.com>
34241 * icall.c (mono_double_ParseImpl): Added ParseImpl method.
34243 Mon May 13 16:40:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34245 * icall.c, class.c: special case <Module>.
34247 2002-05-13 Dan Lewis <dihlewis@yahoo.co.uk>
34249 * icall.c: fix bug in GetNow().
34251 2002-05-11 Dietmar Maurer <dietmar@ximian.com>
34253 * object.c (mono_runtime_class_init): make sure that we call all
34254 static class constructors.
34256 Fri May 10 18:14:51 CEST 2002 Paolo Molaro <lupus@ximian.com>
34258 * reflection.c: sort methodsemantics table.
34260 Fri May 10 16:31:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
34262 * reflection.h, reflection.c: honour init locals setting.
34264 Thu May 9 18:50:00 EDT 2002 Daniel Morgan <danmorg@sc.rr.com>
34266 * icall.c: copied Double ToStringImpl for Single ToStringImpl
34268 Wed May 8 12:28:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
34270 * reflection.c: support ContructorBuilders in attribute blob creation.
34272 Wed May 8 12:06:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34274 * reflection.c: some changes to build a binary that can be run
34275 directly in windows.
34277 Mon May 6 13:10:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
34279 * loader.c: print a big message when an icall can't be found.
34281 2002-05-06 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34283 * string-icalls.c: fix bug 24248.
34285 Sat May 4 14:03:21 CEST 2002 Paolo Molaro <lupus@ximian.com>
34287 * appdomain.c, appdomain.h, assembly.c, assembly.h, image.h,
34288 icall.c, reflection.h: separate assembly loading by pathname and by
34289 assembly name. Use the MONO_PATH env var to search for assemblies.
34291 Thu May 2 17:56:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
34293 * assembly.c, image.h: add some support for assemblies
34294 with multiple modules.
34295 * class.c, class.h: export mono_class_from_typeref().
34296 * loader.c: remove duplicated code and use mono_class_from_typeref(),
34299 Thu May 2 15:51:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
34301 * unicode.c: Char.IsNumber doesn't include hex digits as the ms
34302 documentation says (the ECMA one is correct).
34304 2002-05-02 Dick Porter <dick@ximian.com>
34306 * threads.c: Use GC_debug_register_finalizer with GC_debug_malloc.
34307 Don't name the synchronisation mutex.
34309 2002-04-30 Jeffrey Stedfast <fejj@ximian.com>
34312 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetBytes):
34313 Make the prototypes match.
34314 (ves_icall_System_Security_Cryptography_RNGCryptoServiceProvider_GetNonZeroBytes):
34318 (ves_icall_System_CurrentTimeZone_GetTimeZoneData): Fixed for
34319 systems that use 'timezone' rather than tm.tm_gmtoff. Also, not
34320 all systems have tm.tm_zone, so use strftime() with %Z to print
34321 the timezone abreviation into a temp string.
34323 * object.c (mono_ldstr): Fixed to use mono_string_chars() macro
34324 rather than mono_array_addr() on a MonoString on Big Endian
34327 2002-04-30 Dietmar Maurer <dietmar@ximian.com>
34329 * string-icalls.c (ves_icall_System_String_InternalReplace_Str):
34332 2002-04-30 Dick Porter <dick@ximian.com>
34334 * socket-io.c: Cope with SOCKET being an integer rather than a
34337 * threads.c: Added Thread_free_internal, to deal with thread
34338 handle cleanup. Moved calls to handle_store() and handle_remove()
34339 to start_wrapper(), so each can only be called once. Allocate
34340 synchronisation blocks with GC_malloc(), and use GC finalisation
34341 to close the handles.
34343 * icall.c: added System.Threading.Thread::Thread_free_internal
34345 Mon Apr 29 15:33:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
34347 * icall.c: support Environment.Exit, CommandLineArgs().
34349 Mon Apr 29 15:15:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
34351 * object.c, object.h: added mono_runtime_run_main () and
34352 mono_runtime_get_main_args () for use in System.Environment.
34354 Mon Apr 29 13:45:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
34356 * gc.c: fix thinko, enable actual finalization since the jit is now
34359 Mon Apr 29 12:47:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34361 * gc.c, object.c: take into account that an object may be offset wrt the address
34362 returned by GC_malloc().
34364 Mon Apr 29 12:14:39 CEST 2002 Paolo Molaro <lupus@ximian.com>
34366 * image.c: handle files without entries in the assembly table (modules).
34368 2002-04-28 Patrik Torstensson <patrik.torstensson@intel.com>
34370 * reflection.c (mono_reflection_setup_internal_class): remove g_assert_not_reached() to allow
34371 mcs selfhosting again (build breaker) and did move the check to class instead. parent is
34372 allowed to be null when it's System.Object class setup.
34374 2002-04-27 Martin Baulig <martin@gnome.org>
34376 * reflection.c (mono_reflection_setup_internal_class): g_assert_not_reached()
34377 if `tb->parent == NULL' rather than crashing.
34379 2002-04-28 Nick Drochak <ndrochak@gol.com>
34381 * sysmath.c (ves_icall_System_Math_Asin): Fix copy-paste error. Was
34382 calling acos() where asin() should have been called.
34384 2002-04-26 Martin Baulig <martin@gnome.org>
34386 * assembly.c (default_assembly_name_resolver): Use G_FILE_TEST_IS_REGULAR
34387 instead of G_FILE_TEST_EXISTS - if you're in mcs/class/corlib/System/Test,
34388 there's a subdirectory called `System', but we don't want to read that
34389 subdirectory as an assembly.
34391 2002-04-25 Martin Baulig <martin@gnome.org>
34393 * debug-symfile.c: Reflect latest MonoString changes.
34395 Thu Apr 25 16:38:01 CEST 2002 Paolo Molaro <lupus@ximian.com>
34397 * rand.c, rand.h: instance method icalls need to have an explicit
34398 this pointer as first argument in the C implementation.
34400 2002-04-25 Nick Drochak <ndrochak@gol.com>
34402 * icall.c: Fix typo in map for GetNonZeroBytes
34404 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
34406 * string-icalls.c : String does now passes unit tests without any
34407 errors, the following changes has been made:
34409 Implemented replace methods.
34410 Renaming of methods to (try) follow the standard.
34411 Fixed compare ordinal
34412 Made all memory allocated directly to function instead of via icall function.
34413 Small performance fix in is_in_array function
34415 (2002-04-23) Changes from Duncan Mak <duncan@ximian.com>
34417 c (mono_string_Internal_ctor_charp_int_int):
34418 (mono_string_Internal_ctor_sbytep_int_int): Removed check for
34419 sindex < 0, throw ArgumentOutOfRangeException instead of
34420 ArgumentNullException.
34422 Added new check for length == 0, however
34423 I need to make it return String.Empty from the C code.
34425 (mono_string_Internal_ctor_sbytep): Use mono_string_new, and let
34426 that calculate the length for us here.
34428 (mono_string_Internal_ctor_sbytep_int_int): Replaced
34429 mono_string_new_utf16 with mono_string_new, since value is utf8.
34431 Wed Apr 24 18:43:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34433 * object.c: register the object for finalization if needed.
34434 Allocate one more char in the string for the terminating 0 char.
34436 Wed Apr 24 18:22:27 CEST 2002 Paolo Molaro <lupus@ximian.com>
34438 * class.c, class.h, image.c: check if a type implemenst a destructor.
34439 Use the proper key for array class lookups.
34440 * icall.c: register the icalls in the System.GC class.
34441 * gc.c, gc.h: GC-related functions and icalls.
34443 2002-04-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34447 * unicode.c: free some strings gotten from mono_string_to_utf8 and
34448 changed a couple of free () by g_free ().
34450 * decimal.c: one-liner in the comments for decimal2string ().
34452 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
34454 * object.c (mono_runtime_invoke_array) : Bug because of my incompetence.
34456 2002-04-24 Patrik Torstensson <patrik.torstensson@labs2.com>
34458 * reflection.c (mono_reflection_get_custom_attrs) : fixed image bug (crash)
34459 * object.c (mono_runtime_invoke_array) : handle null in params
34461 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
34463 * string-icalls.c: fixed bug in split (one off bug)
34465 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
34467 * string-icalls.c: fixed bug in remove and lastindexofany, add equals icall.
34468 * icalls.c: added String::Equals as internal method
34470 2002-04-23 Patrik Torstensson <patrik.torstensson@labs2.com>
34472 * threads.c: fixed bug in the double interlocked functions
34474 2002-04-22 Patrik Torstensson <patrik.torstensson@labs2.com>
34476 * threads.c: implemented all of the new interlocked icalls.
34477 * string-icalls.c: fix a bug in insert.
34478 * icalls.c: added the icalls for interlocked, removed old string functions.
34480 Mon Apr 22 19:44:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
34482 * loader.c: fix off-by-one error when reading argument names.
34484 Mon Apr 22 19:28:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34486 * profiler.c: win32 counter implementation (untested).
34487 * icall.cs: win32 GetNow() and GetTimeZoneData() implementations
34488 (the latter needs testing and more complete impl. from win32 folks).
34490 2002-04-21 Dan Lewis <dihlewis@yahoo.co.uk>
34492 * object.c: mono_array_new_full workaround mono_array_class_get
34495 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
34497 * string-icalls.c (mono_string_InternalRemove): Fixed overwrite bug.
34498 * object.h (mono_string_chars): Changed casting type.
34500 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
34502 * string-icalls.c: Fixed trim method, added the constructors done by Duncan, fixed
34503 method signatures to use gunichar2 instead of gint16.
34505 2002-04-20 Dan Lewis <dihlewis@yahoo.co.uk>
34507 * object.h, object.c: domain-specific versions of mono_object_new and
34510 2002-04-20 Dietmar Maurer <dietmar@ximian.com>
34512 * object.c: changed String layout
34514 * string-icalls.c (mono_string_Internal_ctor_chara): added
34515 internal string constructors.
34517 Sat Apr 20 13:33:07 CEST 2002 Paolo Molaro <lupus@ximian.com>
34519 * threads.c: pass 'this' to the thread start routine.
34521 2002-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34523 * string-icalls.c: fix IndexOf and LastIndexOf. Now
34524 InternalCompareStr don't call twice mono_string_cmp_char for the last
34525 character. Improved performance in mono_string_cmp_char.
34527 Fri Apr 19 19:26:28 CEST 2002 Paolo Molaro <lupus@ximian.com>
34529 * Makefile.am, appdomain.c, class.c, object.c: split runtime-depended
34530 code into its own library: libmonoruntime.
34532 2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
34534 * object.h, object.c: changed array format so that szarrays do not
34535 require a bounds structure.
34536 * icall.c, appdomain.c: support for new szarray format.
34538 Fri Apr 19 18:04:34 CEST 2002 Paolo Molaro <lupus@ximian.com>
34540 * metadata.c: compare also the retuns type when comparing signatures:
34541 we didn't do this as an optimization since really overloaded methods
34542 must differ also in the arguments, but this doesn't work with
34543 low-level IL code (or when using explicit conversion operators: see
34544 bug#23498 for an example).
34546 Fri Apr 19 16:14:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
34548 * loader.c: SZARRAY types can be saved as TYPESPEC, too.
34550 Thu Apr 18 17:15:09 CEST 2002 Paolo Molaro <lupus@ximian.com>
34552 * icall.c: make MonoType::GetElementType its own icall.
34554 Thu Apr 18 16:41:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
34556 * icall.c: remove MonoMethod_get_Name().
34557 * reflection.c, reflection.h, verify: cache the method name in the MonoMethod
34560 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
34562 * string-icalls.c: optimized a few methods.
34564 2002-04-17 Patrik Torstensson <patrik.torstensson@labs2.com>
34566 * icall.c: added all new string internal calls
34567 * string-icalls.c: added, new string internal call implementation.
34568 * object.c: added mono_string_new_size for allocating a string a size
34570 2002-04-17 Dietmar Maurer <dietmar@ximian.com>
34572 * object.c (mono_object_isinst): use the same code as in the
34573 optimized x86 version.
34575 Wed Apr 17 14:14:36 CEST 2002 Paolo Molaro <lupus@ximian.com>
34577 * profiler.c: TSC-based timer code (faster and more accurate).
34578 Not hooked up in configure, yet (set USE_X86TSC to 1).
34580 Wed Apr 17 12:33:10 CEST 2002 Paolo Molaro <lupus@ximian.com>
34582 * profiler.c, profiler.h: track time spent compiling methods.
34583 * threads.c: track thread creation/destruction.
34585 Tue Apr 16 20:08:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
34587 * profiler.c, profiler.h, profiler-private.h: profiling interface
34588 and sample implementation. Moved here so that it can be used also by
34591 Tue Apr 16 12:58:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
34593 * reflection.c, reflection.h: keep types and other handles separate in
34594 the hash tables for referred tokens. Add guid for modules.
34596 Mon Apr 15 11:37:33 CEST 2002 Paolo Molaro <lupus@ximian.com>
34598 * assembly.c: fix bugs found with valgrind.
34599 * metadata.h, metadata.c: added mono_metadata_guid_heap().
34601 2002-04-14 Patrik Torstensson <patrik.torstensson@labs2.com>
34603 * threads: added icall support for getting current domain for
34606 2002-04-13 Martin Baulig <martin@gnome.org>
34608 * debug-symfile.h (MonoDebugLocalInfo): Renamed to MonoDebugVarInfo.
34609 (MonoDebugVarInfo): Added `index' field for register based addresses.
34610 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 9.
34611 (MonoDebugMethodInfo): Replaced `guint32 *param_offsets' with
34612 `MonoDebugVarInfo *params' and `guint32 this_offset' with
34613 `MonoDebugVarInfo *this_var'.
34615 * debug-symfile.c (relocate_variable): New static function to write
34616 a location description for a local variable or method parameter.
34618 2002-04-12 Martin Baulig <martin@gnome.org>
34620 * debug-symfile.h (MonoDebugLocalInfo): New type. This contains the
34621 stack offset and begin/end scope address of a local variable.
34622 (MonoDebugMethodInfo): Replaced `guint32 *local_offsets' with
34623 'MonoDebugLocalInfo *locals', added `prologue_end' and `epilogue_begin'.
34624 (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 8.
34626 * debug-symfile.c (MRT_variable_start_scope, MRT_variable_end_scope):
34627 Added new relocation types for start/end scope of a local variable.
34629 Fri Apr 12 18:30:29 CEST 2002 Paolo Molaro <lupus@ximian.com>
34631 * object.h: add mono_object_domain() macro.
34632 * reflection.c: handle typespecs.
34633 * icall.c: MonoMethod::get_Name() implementation.
34635 Thu Apr 11 12:29Ni:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34637 * icall.c: String::GetHashCode() icall implementation.
34639 Wed Apr 10 21:16:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34641 * icall.c: String::IndexOfAny icall.
34642 * object.c, object.h: make array->max_length more useful.
34643 Intrduced mono_object_class() and mono_string_length() macros.
34645 2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
34647 * unicode.c (ves_icall_System_Char_IsNumber): use g_unichar_isxdigit
34648 instead of g_unichar_isdigit.
34650 2002-04-11 Nick Drochak <ndrochak@gol.com>
34652 * icall.c: Implement a simple Double.ToString().
34654 Tue Apr 9 21:31:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
34656 * appdomain.h: only io-layer.h is supposed to be included.
34657 * icall.c: explicitly import environ. Fix warning.
34659 2002-04-10 Nick Drochak <ndrochak@gol.com>
34661 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData) :
34662 return true even if it's not Daylight Savings time.
34663 Only return false for the case where the function isn't
34664 implemented for a plaform (read Windows).
34666 Tue Apr 9 13:05:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
34668 * appdomain.h, appdomain.c, class.c, object.c: protect MonoDomain
34671 2002-04-09 Dietmar Maurer <dietmar@ximian.com>
34673 * mempool.c (mono_mempool_alloc): only use g_malloc when
34674 absolutely necessary.
34676 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
34678 * mempool.c (MEM_ALIGN): hardcode MEM_ALIGN to 8
34680 * class.c (mono_class_vtable): use domain mempool to allocate vtable
34681 (mono_class_proxy_vtable): use domain mempool
34683 Mon Apr 8 17:17:04 CEST 2002 Paolo Molaro <lupus@ximian.com>
34685 * appdomain.h, appdomain.c: split initialization that requires the
34686 execution engine support into mono_runtime_init().
34688 2002-04-08 Dietmar Maurer <dietmar@ximian.com>
34690 * class.c (mono_class_init): don't include vtable inside MonoClass
34691 to save some memory, gather some statistics.
34692 (mono_class_vtable): use g_malloc instead of GC_malloc when possible
34694 Sat Apr 6 20:07:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
34696 * icall.c: internalcall implementation for ValueType.Equals().
34698 2002-04-06 Dietmar Maurer <dietmar@ximian.com>
34700 * object.c (mono_message_init): moved
34701 (mono_runtime_exec_main): new arch. independent impl.
34702 (mono_runtime_invoke_array): new method - like
34703 mono_runtime_invoke, but you can pass an array of objects.
34704 (mono_remoting_invoke): new arch. independent impl.
34705 (mono_message_invoke): new arch. independent impl.
34706 (mono_runtime_class_init): new arch. independent impl.
34707 (mono_runtime_object_init): new arch. independent impl.
34709 Fri Apr 5 18:29:14 CEST 2002 Paolo Molaro <lupus@ximian.com>
34711 * metadata.c, object.c, reflection.c: documented the exported
34714 Fri Apr 5 15:42:31 CEST 2002 Paolo Molaro <lupus@ximian.com>
34716 * icall.c: simpler code to pass the assembly builder data to corlib.
34717 Implement GetNestedTypes() internalcall.
34719 Thu Apr 4 21:46:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
34721 * class.c: warn if a type can't be loaded.
34723 2002-04-04 Dietmar Maurer <dietmar@ximian.com>
34725 * image.h: typedef MonoImageOpenStatus
34726 * types.h: removed unused file
34728 2002-04-04 Dan Lewis <dihlewis@yahoo.co.uk>
34730 * icall.c: Enum_ToObject accepts enum value arguments.
34732 Thu Apr 4 11:35:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
34734 * class.c: move initialization of properties, events and nested
34735 classes, so that they happen for interfaces, too.
34737 Wed Apr 3 20:03:32 CEST 2002 Paolo Molaro <lupus@ximian.com>
34739 * icall.c: cleanup some ugly casts in Array_SetValue*.
34741 Wed Apr 3 19:49:53 CEST 2002 Paolo Molaro <lupus@ximian.com>
34743 * icall.c: the values array fro enums is of the correct type, now.
34744 Implement (correctly) getFullName instead of assQualifiedName for
34746 * reflection.h, reflection.c: added mono_type_get_name ().
34748 Wed Apr 3 17:56:22 CEST 2002 Paolo Molaro <lupus@ximian.com>
34750 * assembly.c, image.h: for each MonoImage, record from wich assembly
34752 * reflection.h, icall.c: added System_Reflection_Assembly_GetTypes().
34753 Make Type.Assembly work.
34755 2002-04-03 Dietmar Maurer <dietmar@ximian.com>
34757 * debug-symfile.h: use char* instead of gpointer to avoid
34760 * appdomain.c (mono_jit_info_table_find): use char* instead of gpointer
34762 * icall.c (ves_icall_InternalExecute): impl. FielSetter
34763 (ves_icall_System_Array_SetValueImpl): removed strange MonoArray cast
34765 2002-03-30 Dietmar Maurer <dietmar@ximian.com>
34767 * icall.c (mono_message_init): impl. (code cleanup)
34768 (ves_icall_InternalExecute): impl. FieldGetter
34770 * class.c (mono_class_init): added exerimental EXT_VTABLE_HACK, if
34771 defined we call all (non-static)methods through the vtable.
34773 Fri Mar 29 18:09:08 CET 2002 Paolo Molaro <lupus@ximian.com>
34775 * class.c: it seems GC_debug_malloc() makes the Boehm GC call the
34776 finalizer even though the memory is still referenced (and the chunk of
34777 memory is not freed).
34779 Fri Mar 29 17:43:04 CET 2002 Paolo Molaro <lupus@ximian.com>
34781 * assembly.c: fix brokeness.
34783 Fri Mar 29 16:09:54 CET 2002 Paolo Molaro <lupus@ximian.com>
34785 * class.c: kill some warnings. Check explicit interface method
34786 implementation also without considering the namespace.
34787 Load also literal strings in static class data.
34789 2002-03-29 Miguel de Icaza <miguel@ximian.com>
34791 * assembly.c (default_assembly_name_resolver): Kill memory leak.
34792 (default_assembly_name_resolver): Make the resolver take the
34793 "base" directory where the assembly was originally defined, so we
34794 can load DLLs that are in the same directory as the assembly that
34795 is being referenced.
34797 2002-03-28 Dick Porter <dick@ximian.com>
34803 * unicode.c: Warning cleanups
34805 Thu Mar 28 18:06:14 CET 2002 Paolo Molaro <lupus@ximian.com>
34807 * object.h, reflection.h: use the correct type instead of MonoObject.
34809 2002-03-28 Martin Baulig <martin@gnome.org>
34811 * debug-symfile.c (mono_debug_class_get): Don't look in referenced assemblies.
34812 (mono_debug_update_symbol_file): Initialize classes if necessary.
34814 Thu Mar 28 15:58:43 CET 2002 Paolo Molaro <lupus@ximian.com>
34816 * assembly.c, debug-helpers.c, image.c, image.h, metadata.c, pedump.c,
34817 rawbuffer.c, reflection.c, verify.c: mare warning cleanups.
34819 Thu Mar 28 15:20:39 CET 2002 Paolo Molaro <lupus@ximian.com>
34821 * assembly.h: fix function prototype.
34822 * metadata.h, metadata.c, object.h, private.h: get rid of warnings.
34823 * mono-endian.h: use const cast.
34825 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
34827 * icall.c (ves_icall_MonoMethodMessage_InitMessage): moved from message.c
34829 Thu Mar 28 12:32:00 CET 2002 Paolo Molaro <lupus@ximian.com>
34831 * loader.c: don't assert when a typeref can't be loaded, give
34832 a chance to the runtime to trow an exception instead.
34833 * loader.h: fix warning.
34835 2002-03-28 Dietmar Maurer <dietmar@ximian.com>
34837 * class.c (mono_class_proxy_vtable): added proxy support
34839 2002-03-27 Dan Lewis <dihlewis@yahoo.co.uk>
34841 * icall.c: removed last of PAL calls, added System.Environment
34842 * file-io.h, file-io.c: MonoIO implementation
34843 * object.h, object.c: mono_string_to_utf16() now returns gunichar2*
34845 Tue Mar 26 19:56:10 CET 2002 Paolo Molaro <lupus@ximian.com>
34847 * appdomain.c: do not use the byte marker in ldstr table lookup.
34848 * debug-helpers.c: allow two ':' to separate class and method name.
34849 * object.c: allocate arrays bounds with the GC, too.
34850 * verify: add a few more checks.
34852 Tue Mar 26 18:45:46 CET 2002 Paolo Molaro <lupus@ximian.com>
34854 * reflection.c: output also literal strings. Allocate parameter data
34855 with GC_malloc() (thanks, Martin, for catching this!).
34857 2002-03-26 Martin Baulig <martin@gnome.org>
34859 * debug-symfile.h (MonoDebugMethodInfo): Added `this_offset', don't
34860 include the `this' offset in the `param_offsets'.
34862 2002-03-25 Martin Baulig <martin@gnome.org>
34864 * debug-symfile.c (mono_debug_update_symbol_file): Use a new
34865 mono_debug_get_class() function to get the classes. Added new
34866 relocation types for arrays and strings.
34867 (mono_debug_get_class): New static function to search in all
34868 referenced assemblies for a metadata token.
34870 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 7.
34872 Mon Mar 25 13:08:18 CET 2002 Paolo Molaro <lupus@ximian.com>
34874 * reflection.h, reflection.c: use a gc-safe hash for hash tables that
34875 hold gc-allocated objects. Make the string heap a stream like the
34876 others. Removed duplicated code when writing stream info.
34877 Added asserts to catch possible buffer overflows. Set the sorted map
34878 for tables that need sorting. Added some documentation.
34880 Mon Mar 25 13:04:56 CET 2002 Paolo Molaro <lupus@ximian.com>
34882 * appdomain.h, appdomain.c, class.c, object.c: use a GC-safe hash table
34883 for interned strings and vtables.
34885 2002-03-24 Martin Baulig <martin@gnome.org>
34887 * icall.c (ves_icall_Type_GetFields): Reverse the list before storing
34888 it in the array since it was created with g_slist_prepend().
34890 2002-03-24 Martin Baulig <martin@gnome.org>
34892 * debug-symfile.c (mono_debug_local_type_from_signature): Renamed
34893 to ves_icall_Debugger_MonoSymbolWriter_get_local_type_from_sig().
34894 (mono_debug_method_from_token): Renamed to
34895 ves_icall_Debugger_MonoSymbolWriter_method_from_token().
34896 (ves_icall_Debugger_DwarfFileWriter_get_type_token): New interncall.
34898 * debug-symfile.c (MRT_type_sizeof, MRT_type_field_offset): New
34901 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 6.
34903 2002-03-24 Martin Baulig <martin@gnome.org>
34905 * debug-symfile.c (mono_debug_local_type_from_signature): New func.
34906 (mono_debug_method_from_token): New func.
34908 * icall.c (Mono.CSharp.Debugger.MonoSymbolWriter::get_local_type_from_sig):
34909 New interncall, calls mono_debug_local_type_from_signature().
34910 (Mono.CSharp.Debugger.MonoSymbolWriter::get_method): New interncall,
34911 calls mono_debug_method_from_token().
34913 2002-03-23 Martin Baulig <martin@gnome.org>
34915 * unicode.c (ves_icall_iconv_get_char_count): The `count' argument
34916 specifies the number of bytes to be converted, not the array size.
34917 Return the number of chars, not the number of bytes.
34918 (ves_icall_iconv_get_chars): The `byteCount' argument
34919 specifies the number of bytes to be converted, not the array size.
34921 2002-03-23 Martin Baulig <martin@gnome.org>
34923 * reflection.h (MonoReflectionSigHelper): New type.
34925 * reflection.c (mono_reflection_sighelper_get_signature_local),
34926 (mono_reflection_sighelper_get_signature_local): New functions.
34928 * icall.c (System.Reflection.Emit.SignatureHelper::get_signature_local),
34929 (System.Reflection.Emit.SignatureHelper::get_signature_field): New
34932 2002-03-23 Martin Baulig <martin@gnome.org>
34934 * rawbuffer.c (mono_raw_buffer_load_mmap): Use MAP_SHARED when
34935 is_writeable is set.
34936 (mono_raw_buffer_update): New function to write the modified map
34939 * debug-symfile.h (MonoDebugSymbolFile): Added `raw_contents_size'.
34941 * debug-symfile.c (mono_debug_update_symbol_file): Call
34942 mono_raw_buffer_update() when done writing.
34944 2002-03-23 Martin Baulig <martin@gnome.org>
34946 * debug-symfile.h (MONO_DEBUG_SYMBOL_FILE_VERSION): Increased to 5.
34948 * debug-symfile.c: Added support for arguments and local variables.
34950 2002-03-23 Dick Porter <dick@ximian.com>
34952 * debug-symfile.c: Remove extraneous 'include <elf.h>' that wasn't
34953 protected by ifdefs, hence breaking the w32 build.
34955 Thu Mar 21 17:35:01 CET 2002 Paolo Molaro <lupus@ximian.com>
34957 * object.c: implement is_interned() the right way.
34959 2002-03-21 Martin Baulig <martin@gnome.org>
34961 * debug-symfile.[ch]: New files to handle debugging information
34962 files. There's also support to dynamically update these symbol
34963 files to include machine dependent information.
34965 2002-03-20 Dietmar Maurer <dietmar@ximian.com>
34967 * threads.c (mono_thread_create): new function to create thread
34970 2002-03-20 Martin Baulig <martin@gnome.org>
34972 * icall.c (ves_icall_InternalInvoke): Create a new object if the
34973 method is a constructor.
34974 (icall_map): Added "System.Reflection.MonoCMethod::InternalInvoke",
34975 points to ves_icall_InternalInvoke().
34977 2002-03-20 Dan Lewis <dihlewis@yahoo.co.uk>
34979 * file-io.c: Flush shouldn't throw exceptions.
34981 2002-03-19 Dan Lewis <dihlewis@yahoo.co.uk>
34983 * file-io.c: FileStream flush support; FileSetLength now
34984 restores file pointer.
34986 Tue Mar 19 18:17:21 CET 2002 Paolo Molaro <lupus@ximian.com>
34988 * class.c: set image for pointer classes.
34990 2002/03/19 Nick Drochak <ndrochak@gol.com>
34992 * sysmath.c: Forgot one.
34994 2002-03-18 Miguel de Icaza <miguel@ximian.com>
34996 * sysmath.c: Avoid redefining existing names.
34998 2002-03-18 Dan Lewis <dihlewis@yahoo.co.uk>
35000 * sysmath.c, sysmath.h, icall.c, Makefile.am: math routines now
35001 handled by runtime as icall rather than dllimport from libm.so
35002 * file-io.c, file-io.h: fixed handle argument type.
35004 2002-03-18 Dick Porter <dick@ximian.com>
35006 * reflection.c (mono_image_get_type_info): rename interface to
35007 iface, because of "#define interface struct" on windows.
35009 Sat Mar 16 19:18:38 CET 2002 Paolo Molaro <lupus@ximian.com>
35011 * class.c, class.h: rename and export mono_ptr_class_get().
35012 * metadata.c: support MONO_TYPE_ARRAY in MonoType compare.
35013 * reflection.c, reflection.h, icall.c: better/saner type name
35014 parsing and MonoType creation. Handle MONO_TYPE_ARRAY in
35017 2002-03-14 Dietmar Maurer <dietmar@ximian.com>
35019 * class.c (mono_class_init): removed hardcoded GHC_SLOT
35021 * icall.c (ves_icall_InternalInvoke): impl.
35023 Wed Mar 13 00:27:30 CET 2002 Paolo Molaro <lupus@ximian.com>
35025 * reflection.c: output the interface map table, too.
35027 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
35029 * class.c (class_compute_field_layout): separate computation of
35030 static field layout
35032 2002-03-12 Dan Lewis <dihlewis@yahoo.co.uk>
35034 * icall.c: added System.Buffer support.
35035 * file-io.c: moved file icalls from PAL to FileStream.
35037 2002-03-12 Dietmar Maurer <dietmar@ximian.com>
35039 * icall.c (ves_icall_System_Object_GetHashCode): impl.
35041 2002-03-11 Dietmar Maurer <dietmar@ximian.com>
35043 * icall.c (ves_icall_System_ValueType_GetHashCode): impl.
35045 Mon Mar 11 14:45:42 CET 2002 Paolo Molaro <lupus@ximian.com>
35047 * verify.c, verify.h: moved here the corlib/runtime consistency checks.
35049 Mon Mar 11 11:12:23 CET 2002 Paolo Molaro <lupus@ximian.com>
35051 * debug-helpers.{c,h}: moved here from monograph some useful functions
35052 to locate a method by name/signature in a class or image. Included
35053 also a small and flexible IL disassembler.
35055 Fri Mar 8 16:29:29 CET 2002 Paolo Molaro <lupus@ximian.com>
35057 * reflection.c: fixup tokens in methods with small header size, too.
35059 2002-03-08 Dietmar Maurer <dietmar@ximian.com>
35061 * object.c (mono_string_to_utf8): remove assert(!error), instead
35064 Thu Mar 7 18:55:15 CET 2002 Paolo Molaro <lupus@ximian.com>
35066 * icall.c: update to the new mono_Array_class_get interface.
35068 Thu Mar 7 17:23:26 CET 2002 Paolo Molaro <lupus@ximian.com>
35070 * appdomain.c, object.c: Boehm-GC enable.
35071 * icall.c: make get_data_chunk() support split data requests.
35072 Ensure a class is initialized in more cases. Return only the first
35073 property found in GetProperties() or the compiler gets confused.
35074 Implemented GetEvents(). Temporary fix to GetType(), needs rewriting.
35075 * reflection.h, reflection.c: add fixup mechanism for field and method
35076 tokens. Initialize assembly->typeref in a single place. Output
35077 properties after events. Support custom attributes for events, too.
35078 Typo fix for paramter custom attrs.
35080 2002-03-07 Martin Baulig <martin@gnome.org>
35082 * icall.c (ves_icall_System_Array_FastCopy): Small fix.
35084 2002-03-07 Dietmar Maurer <dietmar@ximian.com>
35086 * class.c (mono_array_class_get): fix. for multi. dim. arrays
35088 2002-03-06 Martin Baulig <martin@gnome.org>
35090 * icall.c (ves_icall_System_Array_CreateInstanceImpl): Make this work with
35091 non-zero lower bounds. See testcases #F10-#F13.
35093 2002-03-05 Martin Baulig <martin@gnome.org>
35095 * exception.c (mono_get_exception_argument_out_of_range): New exception.
35097 * icall.c (ves_icall_System_Array_GetValue): Moved actual implementation to
35098 ves_icall_System_Array_GetValue(), only calculate the absolute array position
35100 (ves_icall_System_Array_SetValue): Likewise.
35101 (ves_icall_System_Array_GetValueImpl): New interncall. Takes an array position
35102 as argument and does the actual work. This function is used when copying a
35103 multi-dimensional array.
35104 (ves_icall_System_Array_SetValueImpl): Almost completely rewrote this. It can
35105 now do all the widening conversions of value types.
35106 (ves_icall_System_Array_CreateInstanceImpl): Implemented.
35108 Tue Mar 5 18:14:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35110 * class.c: remove some magic numbers and use the smbolic names,
35111 instead. Added init_events() to load event info at class init time.
35112 * metadata.h, metadata.c: added mono_metadata_events_from_typedef()
35113 and mono_metadata_methods_from_event().
35114 * reflection.h, reflection.c: added support for writing out the evnets
35115 related information.
35117 Mon Mar 4 20:32:43 CET 2002 Paolo Molaro <lupus@ximian.com>
35119 * reflection.h, icall.c: use a different method (GetInterfaces)
35120 to gather interface info and add isbyref, isprimitive and
35121 ispointer to the ves_icall_get_type_info() return value.
35123 Mon Mar 4 11:22:26 CET 2002 Paolo Molaro <lupus@ximian.com>
35125 * class.h: stared adding support for events.
35126 * icall.c: split find_members implementation. Added debug icall to get
35127 the address of an object.
35128 * reflection.c: handle TypeBuilders in mono_type_get_object().
35130 2002-03-01 Martin Baulig <martin@gnome.org>
35132 * icall.c (ves_icall_System_Array_GetLength): This must throw an
35133 ArgumentOutOfRangeException(), not an ArgumentException().
35134 (ves_icall_System_Array_GetLowerBound): Likewise.
35135 (ves_icall_System_Array_GetValue): Improved argument checking.
35136 (ves_icall_System_Array_SetValue): Improved argument checking.
35138 2002-03-01 Martin Baulig <martin@gnome.org>
35140 * icall.c (ves_icall_System_Array_GetValue): Raise an exception when
35141 called with invalid arguments rather than just dying with g_assert().
35142 (ves_icall_System_Array_SetValue): Likewise.
35143 (ves_icall_System_Array_CreateInstanceImpl): Don't g_assert_not_reached(),
35144 raise a NotImplementedException instead.
35145 (ves_icall_System_Array_GetLength): Added argument checking.
35146 (ves_icall_System_Array_GetLowerBound): Added argument checking.
35148 2002-03-01 Dietmar Maurer <dietmar@ximian.com>
35150 * object.h (mono_assert): new macros mono_assert and
35151 mono_assert_not_reached
35153 2002-02-28 Martin Baulig <martin@gnome.org>
35155 * icall.c: Rename "System::String::Intern" to "System::String::_Intern"
35156 and "System::String::IsInterned" to "System::String::_IsInterned".
35158 Thu Feb 28 19:19:35 CET 2002 Paolo Molaro <lupus@ximian.com>
35160 * icall.c: remove hacks for typebuilder. Added icall to create a
35161 modified type from a tybebuilder.
35162 * reflection.c: removed hacks for TypeBuilder. Create also a MonoImage
35163 in mono_image_basic_init (). Added mono_reflection_setup_internal_class ()
35164 to create a backing MonoClass for a TypeBuilder.
35166 Thu Feb 28 15:35:51 CET 2002 Paolo Molaro <lupus@ximian.com>
35168 * class.c, class.h: more refactoring of class init.
35169 Export mono_class_setup_mono_type() and mono_class_setup_parent().
35171 Thu Feb 28 12:33:41 CET 2002 Paolo Molaro <lupus@ximian.com>
35173 * marshal.c, marshal.h: start of marshaling interface.
35175 Wed Feb 27 22:15:17 CET 2002 Paolo Molaro <lupus@ximian.com>
35177 * icall.c: fix order in assembly qualified name icall.
35179 Wed Feb 27 18:45:03 CET 2002 Paolo Molaro <lupus@ximian.com>
35181 * class.c: do not free str, since we store it in the hash table.
35182 * reflection.h: add label field to MonoILExceptionInfo.
35183 * reflection.c: handle references to more than one assembly. Handle
35184 case when there isn't a module created in the assembly.
35186 Wed Feb 27 12:35:10 CET 2002 Paolo Molaro <lupus@ximian.com>
35188 * class.c: Fix typo. Start refactoring of class init code.
35190 Wed Feb 27 12:23:00 CET 2002 Paolo Molaro <lupus@ximian.com>
35192 * appdomain.c: exit with 1 on error.
35193 * class.c: we already have the name in MonoClassField.
35194 * image.c, image.h, metadata.c, pedump.c: use directly a pointer in
35195 MonoStreamHeader instead of an offset of image->raw_metadata.
35197 2002-02-26 Miguel de Icaza <miguel@ximian.com>
35199 * appdomain.c (mono_init): Be even more descriptive about the error.
35201 Tue Feb 26 16:18:07 CET 2002 Paolo Molaro <lupus@ximian.com>
35203 * appdomain.c: give the user an informative message when corlib can't
35206 2002-02-26 Martin Baulig <martin@gnome.org>
35208 * icall.c (ves_icall_System_CurrentTimeZone_GetTimeZoneData):
35209 New icall to get the time zone data.
35211 Mon Feb 25 15:51:51 CET 2002 Paolo Molaro <lupus@ximian.com>
35213 * reflection.c: set virtual and raw size of section correctly.
35214 * threads.c: transfer domain information to newly created threads.
35216 Fri Feb 22 18:55:57 CET 2002 Paolo Molaro <lupus@ximian.com>
35218 * class.c: when instancing a class in a domain, load the default
35219 vaules for static fields from the constant table. Fix System.Enum to
35221 * icall.c: implement Object::GetType() internalcall. Implemented
35222 MonoField::GetValue() internalcall. Avoid SEGV in search_method().
35223 Fixed checking of binding flags in find_members().
35224 * metadata.c, metadata.h: introduce mono_metadata_type_hash().
35225 * reflection.c: handle enumerations when writing to the constant
35226 table. Use a different object cache for types.
35229 2002-02-22 Dietmar Maurer <dietmar@ximian.com>
35231 * object.c (mono_object_isinst): fix for arrays
35233 * icall.c (ves_icall_type_is_subtype_of): fix for 2 interfaces
35235 Thu Feb 21 21:00:13 CET 2002 Paolo Molaro <lupus@ximian.com>
35237 * object.c: don't use mprotect () and fix intern pool hash table
35238 lookup for big endian systems.
35240 Thu Feb 21 19:30:29 CET 2002 Paolo Molaro <lupus@ximian.com>
35242 * icall.c: change type_is_subtype_of () signature.
35244 2002-02-21 Mark Crichton <crichton@gimp.org>
35246 * rand.c, rand.h: Added random number generator for
35247 System.Security.Cryptography classes.
35249 * exception.c, exception.h: Added mono_get_exception_not_implemeted.
35251 * icall.c: Added System.Security.Cryptography calls.
35253 Thu Feb 21 16:45:34 CET 2002 Paolo Molaro <lupus@ximian.com>
35255 * class.c, icall.c, metadata.c: better support for pointer types.
35256 Create a class for them as suggested by dietmar. Fix TYPE_ARRAY class.
35257 * reflection.c: Add support for getting custom attrs for properties
35258 and simplify some code.
35260 Wed Feb 20 22:20:29 CET 2002 Paolo Molaro <lupus@ximian.com>
35262 * icall.c: change getToken () and add custom attribute GetBlob()helper
35264 * reflection.h: add custom attrs array to the reflection builder structures.
35265 * reflection.c: encode and emit custom attributes for all the relevant
35266 reflection objects. Cache fieldref and methodref tokens. Change
35267 mono_image_create_token() interface to take a MonoDynamicAssembly.
35268 More complete custom attributes decoder. Load custom attributes for
35269 Assembly, Field, Method and Constructor objects, too. Make the
35270 returned array an Attribute[] one, not object[]. Added
35271 mono_reflection_get_custom_attrs_blob() to encode the arguments of a
35272 custom attribute constructor.
35274 2002-02-20 Dick Porter <dick@ximian.com>
35278 * socket-io.c: Windows portability fixes (sometimes just ifdeffing
35279 problem code out for now).
35281 2002-02-19 Radek Doulik <rodo@ximian.com>
35283 * object.c (mono_ldstr): use hash table to avoid multiple swapping
35285 Tue Feb 19 20:23:11 CET 2002 Paolo Molaro <lupus@ximian.com>
35287 * icall.c: register the GetCustomAttributes method.
35288 * object.c, object.h: add mono_string_new_len ().
35289 * reflection.h, reflection.c: added mono_runtime_invoke(),
35290 mono_install_runtime_invoke(). Added
35291 mono_reflection_get_custom_attrs () to load custom attributes and
35292 create the attribute objects.
35294 2002-02-19 Dick Porter <dick@ximian.com>
35295 * threads-dummy-types.c:
35296 * threads-dummy-types.h:
35299 * threads-pthread-types.c:
35300 * threads-pthread-types.h:
35301 * threads-pthread.c:
35302 * threads-pthread.h: Deleted obsolete files
35304 2002-02-19 Dietmar Maurer <dietmar@ximian.com>
35306 * class.c (mono_class_vtable): runtime init the class when we
35307 allocate static class data.
35309 * icall.c (ves_icall_System_Array_SetValue): check for null values.
35311 * appdomain.c (mono_domain_transfer_object): impl. hack for Arrays
35312 and String - but we will need generic marshalling support in the
35314 (mono_init): set the domain name in a ms compatible way
35316 * object.c (mono_string_new_utf16): bug fix: use char[] instead of
35319 2002-02-18 Dietmar Maurer <dietmar@ximian.com>
35321 * object.c (mono_array_clone): use alloca() instead of g_malloc
35324 * appdomain.c (mono_domain_unload): impl.
35326 Mon Feb 18 15:52:20 CET 2002 Paolo Molaro <lupus@ximian.com>
35328 * appdomain.c, object.c: fix intern pool implementation.
35329 * class.c: fix alignment code.
35331 2002-02-16 Radek Doulik <rodo@ximian.com>
35333 * icall.c (ves_icall_System_Enum_ToObject): in case of big endian
35334 and s2 > s1, just copy lower bytes to be compatible with little
35335 endian (i.e. 64bit value & 0xffffffff --> 32bit value)
35336 (ves_icall_System_Enum_ToObject): and likewise for s1 > s2
35338 * unicode.c (ves_icall_iconv_new_encoder): decide on big_endian,
35339 force big_endian to be 1 for big endian machines
35340 (ves_icall_iconv_new_decoder): ditto
35342 2002-02-16 Jeffrey Stedfast <fejj@ximian.com>
35344 * socket-io.c (convert_sockopt_level_and_name): If the system
35345 doesn't define SOL_IP or SOL_TCP, get them by hand using
35346 getprotobyname() and caching the values (because this could be a
35348 (ves_icall_System_Net_Sockets_Socket_SetSocketOption_internal):
35349 Use the appropriate struct when the system does support it. Ie,
35350 not all systems have struct ip_mreqn so use struct ip_mreq when
35353 Fri Feb 15 18:15:44 CET 2002 Paolo Molaro <lupus@ximian.com>
35355 * reflection.c: handle finally clauses.
35357 Fri Feb 15 15:06:33 CET 2002 Paolo Molaro <lupus@ximian.com>
35359 * socket-io.c: use g_snprintf() instead of snprintf.
35361 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
35363 * reflection.c (mono_param_get_objects): Cast second argument to
35364 mono_method_get_param_names to a const char** to silence the
35367 * appdomain.c (mono_domain_assembly_open): Put parens around the
35368 truth statement in the for-loop.
35370 * unicode.c (iconv_convert): Got rid of a compiler warning about
35371 int i being unused when the system has a new iconv.
35372 (iconv_get_length): Same.
35374 * image.c (load_class_names): Cast the second argument to
35375 g_hash_table_insert() to char* to hush compiler warnings about the
35377 (mono_image_open): Same here.
35379 * socket-io.c: Don't conditionally include sys/filio.h or
35380 sys/sockio.h here anymore since we now get them from
35381 io-layer/io-layer.h
35382 (inet_pton): If the system doesn't support inet_aton, implement
35383 using inet_addr and also #define INADDR_NONE if it isn't defined
35386 Thu Feb 14 19:01:06 CET 2002 Paolo Molaro <lupus@ximian.com>
35388 * metadata.c, metadata.h: added function to get packing and size info
35390 * reflection.h, reflection.c: handle field RVA data. Save info about
35391 the table layout if needed. Assign typedef indexes to all the types
35392 before dumping the info about them to avoid forward reference problems.
35394 2002-02-14 Dietmar Maurer <dietmar@ximian.com>
35396 * socket-io.c (convert_sockopt_level_and_name): ifdef
35397 SO_ACCEPTCONN because it is not defined on my system (old debian)
35399 Thu Feb 14 11:49:30 CET 2002 Paolo Molaro <lupus@ximian.com>
35401 * opcode.c: use stddef.h to get NULL.
35403 2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
35405 * socket-io.c: conditionally include sys/filio.h and sys/sockio.h
35406 for FIONBIO, FIONREAD and SIOCATMARK.
35407 (ves_icall_System_Net_Dns_GetHostByAddr_internal): SunOS doesn't
35408 define INADDR_NONE and besides, inet_addr() is deprecated and
35409 should not be used. Use inet_pton() instead - it also has the
35410 added bonus that it can easily handle IPv6 addresses as well.
35411 (inet_pton): Implement using inet_aton() ifndef HAVE_INET_PTON.
35413 Wed Feb 13 23:00:21 CET 2002 Paolo Molaro <lupus@ximian.com>
35415 * decimal.c: remove _MSC_VER conditional.
35417 2002-02-13 Dick Porter <dick@ximian.com>
35420 * icall.c: Internal calls for Blocking, Select, Shutdown,
35421 GetSocketOption and SetSocketOption
35423 Wed Feb 13 19:20:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35425 * assembly.cs: better resolver: use it instead of some kludgy
35428 Wed Feb 13 18:25:55 CET 2002 Paolo Molaro <lupus@ximian.com>
35430 * reflection.c: the best way to speed-up the compiler is to avoid
35433 2002-02-13 Dietmar Maurer <dietmar@ximian.com>
35435 * class.c (mono_class_vtable): changed the object layout
35436 (obj->vtable->class).
35437 (mono_class_create_from_typespec): consider MONO_TYPE_PTR
35439 Tue Feb 12 20:06:01 CET 2002 Paolo Molaro <lupus@ximian.com>
35441 * assembly.c: look for assemblies in the assembly dir, too.
35443 Tue Feb 12 14:03:42 CET 2002 Paolo Molaro <lupus@ximian.com>
35445 * class.c: fix thinko in mono_class_from_type().
35447 Mon Feb 11 19:43:51 CET 2002 Paolo Molaro <lupus@ximian.com>
35449 * exception.h, exception.c: added TypeLoadException.
35450 * object.h, object.c: added mono_array_clone ().
35451 * icall.c: handle throwOnError in AssemblyGetType().
35452 Added Array.Clone().
35453 * opcode.h, opcode.c: use a single value for the opcode val.
35454 Compile fix for non-gcc compilers.
35456 Fri Feb 8 12:26:37 CET 2002 Paolo Molaro <lupus@ximian.com>
35458 * opcodes.c, opcodes.h: export interesting info about opcodes.
35460 2002-02-05 Dietmar Maurer <dietmar@ximian.com>
35462 * object.h (MONO_CHECK_ARG, MONO_CHECK_ARG_NULL): new macro for
35465 * class.c (class_compute_field_layout): set element_class for enums
35466 (mono_class_create_from_typedef): set element_class for normal classes
35468 * icall.c (ves_icall_System_Enum_get_value): impl.
35470 * class.c (mono_class_create_from_typedef): do not set valuetype
35471 flag for System.ValueType and System.Enum
35473 2002-02-04 Dietmar Maurer <dietmar@ximian.com>
35475 * unicode.c (iconv_convert): fix big endian problem.
35477 Fri Feb 1 16:13:20 CET 2002 Paolo Molaro <lupus@ximian.com>
35479 * class.c: add asserts if we are ever going to scribble over memory.
35480 * socket-io.c: not all systems have AF_IRDA defined.
35482 2002-01-31 Dietmar Maurer <dietmar@ximian.com>
35484 * class.c (class_compute_field_layout): do not consider static
35485 fields to compute alignment
35487 2002-01-25 Dietmar Maurer <dietmar@ximian.com>
35489 * appdomain.c (mono_appdomain_get): impl.
35490 (ves_icall_System_AppDomain_ExecuteAssembly): impl.
35492 Thu Jan 24 12:59:23 CET 2002 Paolo Molaro <lupus@ximian.com>
35494 * icall.c: ignore "file://" prefix when loading an assembly.
35496 2002-01-23 Dick Porter <dick@ximian.com>
35500 * Makefile.am: Added socket support
35502 2002-01-23 Miguel de Icaza <miguel@ximian.com>
35504 * icall.c (ves_icall_appdomain_get_default_assemblies): put this
35505 code back. This should return the assemblies that are loaded by
35506 the runtime on behalf of an application domain.
35508 The current implementation is still broken, it just returns every
35509 assembly loaded, but until we get real applications domain this
35512 2002-01-23 Dietmar Maurer <dietmar@ximian.com>
35514 * icall.c (ves_icall_appdomain_get_cur_domain): runtime_init the
35517 2002-01-23 Miguel de Icaza <miguel@ximian.com>
35519 * icall.c (ves_icall_appdomain_get_cur_domain): Cache the value of
35520 the mono_class_from_name lookup.
35521 (ves_icall_get_parameter_info): ditto.
35522 (ves_icall_appdomain_get_assemblies, add_assembly): Implement new internal
35524 (ves_icall_System_Reflection_Assembly_get_code_base): Another new call.
35526 Tue Jan 22 22:43:47 CET 2002 Paolo Molaro <lupus@ximian.com>
35528 * class.c: load also nested classes on class init.
35529 System.ValueType instance methods gets passed boxed
35530 values, unless methods in derived classed that get a pointer to the
35532 * icall.c: use better name parsing code in GetType().
35533 * image.c, image.h: add mono_image_loaded ().
35534 * metadata.c, metadata.h: add mono_metadata_nesting_typedef ().
35535 * reflection.c, reflection.h: added mono_reflection_parse_type().
35537 2002-01-22 Veronica De Santis <veron78@interfree.it>
35539 * icall.c : Added mapping of internal calls for Manual and Auto reset events
35540 * threads.c : Added the implementation of internal calls for events
35541 * threads.h : Added prototypes of internal calls for events
35543 2002-01-21 Radek Doulik <rodo@ximian.com>
35545 * icall.c (ves_icall_InitializeArray): swap bytes on big endians
35547 2002-01-21 Dietmar Maurer <dietmar@ximian.com>
35549 * class.c (mono_class_init): set min_align to 1 (instead of 0)
35550 (mono_class_value_size): use min_align
35552 2002-01-20 Dick Porter <dick@ximian.com>
35555 * threads.c: Replaced all instances of WapiHandle * with HANDLE,
35556 so it compiles on w32.
35558 2002-01-17 Dietmar Maurer <dietmar@ximian.com>
35560 * metadata.c (mono_type_stack_size): impl.
35562 * class.c (mono_class_get_field): impl. memberref token
35564 2002-01-16 Veronica De Santis <veron78@@interfree.it>
35566 * icall.h : Added the internal calls mapping for CreateMutex_internal
35567 and ReleaseMutex_internal.
35568 * threads.h : Added the prototype of mutexes internal calls.
35569 * threads.c : Added the implementations of mutexes internal calls.
35571 Tue Jan 15 22:47:57 CET 2002 Paolo Molaro <lupus@ximian.com>
35573 * metaparse.h: removed unused file.
35574 * reflection.c, reflection.h: added stream_data_align () function
35575 to align data in streams and keep stream aligned. Add support for
35576 exception support in method headers.
35578 Tue Jan 15 19:42:50 CET 2002 Paolo Molaro <lupus@ximian.com>
35580 * unicode.c: make iconv_convert () return the number of bytess written
35581 in the output buffer.
35583 2002-01-15 Dick Porter <dick@ximian.com>
35584 * threads.c: Make the runtime's idea of infinite timeouts coincide
35585 with the class library's
35587 Fix a particularly egregious bug in mono_thread_cleanup(). That
35588 code was so utterly bogus it must have been written on a Monday.
35590 Mon Jan 14 17:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
35592 * reflection.h: add subtypes field to TypeBuilder.
35593 * reflection.c: encode constants for literal fields.
35594 Handle subtypes. Fix user string token (and add a zero byte)
35597 2002-01-14 Dietmar Maurer <dietmar@ximian.com>
35599 * class.c (mono_class_init): bug fix: assign slot numbers for
35602 Fri Jan 11 18:54:42 CET 2002 Paolo Molaro <lupus@ximian.com>
35604 * reflection.c: don't try to output a code RVA for abstract methods.
35605 Small fixes for method header format. Output parameter info to the
35606 ParamDef table. Save method overriding info to MethodImpl table.
35607 Fix property support. Allow typedef.extends to be a type in the
35609 * verify.c: fix off-by-one error.
35611 Thu Jan 10 19:36:27 CET 2002 Paolo Molaro <lupus@ximian.com>
35613 * class.c: fix mono_class_from_mono_type () for szarray types.
35614 Remove unused cache check in mono_class_from_type_spec().
35615 * icall.c: *type_from_name () functions handle simple arrays and byref.
35616 * reflection.c: handle byref and szarray types. Handle methods without
35617 body (gets P/Invoke compilation working). Handle types and fields in
35619 * reflection.h: add rank to MonoTypeInfo.
35621 2002-01-10 Dick Porter <dick@ximian.com>
35623 * threads.c: Implemented WaitAll(), WaitAny() and WaitOne()
35626 Wed Jan 9 19:27:13 CET 2002 Paolo Molaro <lupus@ximian.com>
35628 * icall.c: initialize class in type_from_handle ().
35629 Loop also in parent classes for get_method ().
35630 * reflection.c: properly encode class and valuetype types.
35631 Start on encoding TypeBuilder types. Handle fieldrefs.
35632 Use correct length when registering a user string.
35633 Handle ConstructorBuilder and MonoMethod in get_token ().
35634 Make mono_type_get_object () aware of cached types.
35635 * object.c: back out change to mono_string_new ().
35637 Tue Jan 8 22:47:44 EST 2002 Matt Kimball <matt@kimball.net>
35638 * object.c: mono_string_new should return a NULL when the string
35639 passed in is NULL -- not try to deference it.
35641 Sat Jan 5 15:48:04 CET 2002 Paolo Molaro <lupus@ximian.com>
35643 * icall.c: hack to make IsSubType work for TypeBuilders.
35644 * reflection.c: emit constructors before methods.
35645 Retrieve param names in mono_param_get_objects().
35647 2002/01/05 Nick Drochak <ndrochak@gol.com>
35649 * Makefile.am: fix list of headers and sources so automake 1.5
35650 doesn't complain. Removed \# at end of list.
35652 Thu Jan 3 23:17:17 CET 2002 Paolo Molaro <lupus@ximian.com>
35654 * reflection.c: get token for a method ref. Set return type of
35655 constructor to void.
35656 * loader.c: debug message.
35657 * class.c: typo fix.
35659 Mon Dec 24 17:18:10 CET 2001 Paolo Molaro <lupus@ximian.com>
35661 * icall.c: fix array init with rank > 1. FindMembers
35662 loops in parent class as well.
35663 * image.c: do not insert nested types in name cache.
35664 * reflection.c: warning fix.
35665 * reflection.h: add override method (for interface impl).
35667 Mon Dec 24 16:16:56 CET 2001 Paolo Molaro <lupus@ximian.com>
35669 * metadata.c: fix customattr decoding.
35671 2001-12-21 Miguel de Icaza <miguel@ximian.com>
35673 * rawbuffer.cs: Added native Win32 implementation, avoids using
35674 mmap on Cygwin. This patch is from Dan Lewis (dihlewis@yahoo.co.uk)
35676 Thu Dec 20 20:11:26 CET 2001 Paolo Molaro <lupus@ximian.com>
35678 * class.c: make the low-level routines handle the cache.
35680 Thu Dec 20 15:20:35 CET 2001 Paolo Molaro <lupus@ximian.com>
35682 * image.c: fopen (file, "rb") ("David Dawkins" <david@dawkins.st>).
35684 Tue Dec 18 18:50:00 CET 2001 Paolo Molaro <lupus@ximian.com>
35686 * class.c: fix mono_array_element_size() for objects.
35687 * class.h, class.c: add properties to MonoClass and load them
35689 * icall.c: check with isinst() when assigning a value to an array
35690 instead of requiring the classes to match exactly.
35691 Implemented icall for System.Type::GetType().
35692 Implemented icalls to get ParameterInfo, ProprtyInfo and info about
35693 enums. Handle bindingflags when looking for methods and fields.
35694 * metadata.h, metadata.c: implemented mono_metadata_properties_from_typedef()
35695 and mono_metadata_methods_from_property().
35696 * reflection.h, reflection.c: added structures for propreties,
35697 parameters and enums. Implemented mono_property_get_object() and
35698 mono_param_get_objects().
35700 2001-12-18 Dick Porter <dick@ximian.com>
35702 * file-io.c: Use mono_string_to_utf16() instead of
35703 mono_string_chars()
35705 * object.c: Added mono_string_to_utf16(), which copies the non
35706 NULL-terminated MonoString into a new double-null-terminated
35709 2001-12-17 Dietmar Maurer <dietmar@ximian.com>
35711 * icall.c (ves_icall_System_DateTime_GetNow): added EPOCH adjustment
35713 2001-12-16 Dietmar Maurer <dietmar@ximian.com>
35715 * file-io.c: raise exceptions if handle is invalid.
35717 Thu Dec 13 20:27:08 CET 2001 Paolo Molaro <lupus@ximian.com>
35719 * assembly.c: yet another check for mscorlib.
35720 * class.c, class.h: load nesting info for classes.
35721 * icall.c: many new functions to support the Reflection classes.
35722 * metadata.c, metadata.h: mono_metadata_nested_in_typedef() added.
35723 * reflection.h, reflection.c: mono_image_create_token(),
35724 mono_assembly_get_object(), mono_type_get_object(),
35725 mono_method_get_object(), mono_field_get_object(): methods to return
35726 objects that parallel the C representation of assemblies, types,
35729 2001-12-11 Dick Porter <dick@ximian.com>
35732 * file-io.c: Internal calls for file IO.
35734 Thu Dec 6 16:21:30 CET 2001 Paolo Molaro <lupus@ximian.com>
35736 * tabledefs.h: missing FileAttributes.
35737 * verify.h, verify.c: use is_valid_string () to simplify and check for
35738 valid strings more correctly. Fix warnings and speeling.
35739 Check more tables: Filed, File, ModuleRef, StandAloneSig.
35740 Check code: branches, maxstack, method calls.
35742 2001-12-04 Dietmar Maurer <dietmar@ximian.com>
35744 * object.c (mono_object_allocate): removed static, so that the jit
35745 can allocate value types.
35747 * icall.c (ves_icall_System_DateTime_GetNow): impl.
35749 Mon Dec 3 17:02:01 CET 2001 Paolo Molaro <lupus@ximian.com>
35751 * class.c: init enum types right away and register the
35752 token->MonoClass map in mono_class_create_from_typedef ().
35753 * verify.h, verify.c: first cut of the verifier.
35754 * pedump.c: add --verify switch to verify metadata tables.
35755 * tabledefs.h: add some missing enums.
35757 2001-11-30 Dietmar Maurer <dietmar@ximian.com>
35759 * class.c (mono_install_runtime_class_init): impl.
35760 (mono_class_init): renamed mono_class_metadata_init to
35761 mono_class_init, also removed the metadata_inited flag
35763 * object.c (mono_object_isinst): use faster algorithm
35765 2001-11-30 Radek Doulik <rodo@ximian.com>
35767 * mono-endian.h: reverted last change
35768 added function prototypes
35770 * Makefile.am (libmetadata_a_SOURCES): reverted my last change and
35771 add mono-endian.c back
35773 * mono-endian.c: returned back, as Paolo pointed out, it's needed
35774 for unaligned access, I've mistaked it with endianess. I am
35776 (mono_read16): fix reverted endianess
35777 (mono_read64): ditto
35778 (mono_read32): ditto
35780 2001-11-30 Dick Porter <dick@ximian.com>
35782 * exception.c: Implement mono_exception_from_name()
35784 Fri Nov 30 12:01:02 CET 2001 Paolo Molaro <lupus@ximian.com>
35786 * metadata.h, metadata.c: remove params_size and locals_size and their
35787 calculation from the metadata code: they are only usefult to the
35790 2001-11-29 Radek Doulik <rodo@ximian.com>
35792 * object.c (mono_ldstr): swap bytes here, it's probably not the
35793 best place, but works for me now, I'll redo it once I know mono
35794 better, also note that I add PROT_WRITE and don't reset back, also
35795 note that it's only affects big endians, so x86 should be OK
35797 * mono-endian.h (read16): use just glib macros for both endians
35799 * mono-endian.c: removed as glib macros are used in in
35800 mono-endian.h so we don't need to care about endianess for read
35801 macros as glib does that for us already
35803 Thu Nov 29 18:20:58 CET 2001 Paolo Molaro <lupus@ximian.com>
35805 * class.h, class.h: take minimum alignment into consideration so
35806 that the fields of a class remain aligned also when in an array.
35808 Tue Nov 27 16:39:01 CET 2001 Paolo Molaro <lupus@ximian.com>
35810 * loader.h, loader.c: add mono_method_get_param_names().
35811 * class.c: 0-init class fields.
35813 2001-11-26 Dick Porter <dick@ximian.com>
35817 * threads.c: New file that handles System.Threading on all platforms
35820 * object.h: Remove the synchronisation struct from MonoObject,
35821 replace it with a pointer that gets initialised on demand
35823 * Makefile.am: Replace all the system-specific threading code with
35824 a single file that uses the new wrapper library
35826 Mon Nov 19 11:37:14 CET 2001 Paolo Molaro <lupus@ximian.com>
35828 * class.c, class.h: add mono_install_trampoline() so that the runtime
35829 can register a function to create a trampoline: removes the ugly
35830 requirement that a runtime needed to export arch_create_jit_trampoline.
35831 * object.h, object.c: added mono_install_handler() so that the runtime
35832 can install an handler for exceptions generated in C code (with
35833 mono_raise_exception()). Added C struct for System.Delegate.
35834 * pedump.c: removed arch_create_jit_trampoline.
35835 * reflection.c: some cleanups to allow registering user strings and
35836 later getting a token for methodrefs and fieldrefs before the assembly
35838 * row-indexes.h: updates and fixes from the new ECMA specs.
35840 Thu Nov 15 17:44:49 CET 2001 Paolo Molaro <lupus@ximian.com>
35842 * class.h, class.c: add enum_basetype field to MonoClass.
35843 * metadata.h, metadata.c: add mono_metadata_get_constant_index()
35844 to get index in the constant table reated to a field, param or
35846 * reflection.h, reflection.c: handle constructors. Set public-key and
35847 version number of the built assembly to 0.
35848 * row-indexes.h: update from new ECMA spec.
35850 Wed Nov 14 19:26:06 CET 2001 Paolo Molaro <lupus@ximian.com>
35852 * class.h, class.c: add a max_interface_id to MonoClass.
35853 * icall.c: rename my_mono_new_object() to my_mono_new_mono_type()
35854 since it's used to do that. Added mono_type_type_from_obj().
35855 Make GetType() return NULL instead of segfaulting if the type was not
35856 found. Handle simple arrays in assQualifiedName.
35857 * object.h: add a struct to represent an Exception.
35858 * reflection.c: output call convention in method signature.
35859 Add code to support P/Invoke methods and fixed offsets for fields.
35861 Mon Nov 12 12:41:32 CET 2001 Paolo Molaro <lupus@ximian.com>
35863 * decimal.c, decimal.h: mono_double2decimal() get the sign bit from
35865 * icall.c: use mono_array_addr instead of array->vector: fixes the
35866 reflection image writing.
35867 * reflection.c: init call convention byte to 0 in method signature.
35868 Encode the property signature. Don't output property-related methods
35869 twice. Really process the properties for a type (don't cast a field to
35870 a property, my mom always told me that).
35871 Fix 64 bit issues in pointer alignment in a different and more
35874 2001-11-10 Sean MacIsaac <macisaac@ximian.com>
35876 * loader.h: Removed type class from MonoDefaults, added monotype
35878 * loader.c: Loaded MonoType, removed loading of Type
35880 * icall.c (my_mono_new_object): Now returns a System.MonoType,
35881 and fills in System.Type._impl with a RuntimeTypeHandle rather
35882 than the actual MonoClass *
35884 (ves_icall_type_from_handle): change from type_class to
35887 (ves_icall_System_Runtime_InteropServices_Marshal_ReadIntPtr):
35890 (ves_icall_System_Runtime_InteropServices_Marshal_PtrToStringAuto):
35893 (ves_icall_System_Reflection_Assembly_LoadFrom): implemented
35895 (ves_icall_System_Reflection_Assembly_GetType): implemented
35897 (ves_icall_System_MonoType_assQualifiedName): implemented
35899 (ves_icall_System_PAL_OpSys_GetCurrentDirecotry): implemented
35901 2001-11-09 Miguel de Icaza <miguel@ximian.com>
35903 * assembly.c (mono_assembly_open): Implement a cache for the
35906 (mono_assembly_close): only destroy the assembly when the last
35909 2001-11-09 Dick Porter <dick@ximian.com>
35911 * Makefile.am (pedump_LDADD): Don't need THREAD_LIBS any more
35913 2001-11-09 Dietmar Maurer <dietmar@ximian.com>
35915 * class.c (mono_class_metadata_init): bug fix: compute the right slot
35917 Fri Nov 9 15:48:02 CET 2001 Paolo Molaro <lupus@ximian.com>
35919 * icall.c, decimal.h, decimal.c: integrated decimal internalcalls
35920 from Martin Weindel.
35921 * object.h: add mono_string_chars ().
35923 2001-11-07 Miguel de Icaza <miguel@ximian.com>
35925 * reflection.c (build_compressed_metadata): Eliminates warnings
35926 and uses 64-bit clean code.
35928 * metadata.c (mono_type_hash): Change signature to eliminate warnings.
35929 (mono_type_equal): Change signature to eliminate warnings.
35931 Wed Nov 7 15:40:01 CET 2001 Paolo Molaro <lupus@ximian.com>
35933 * icall.c, loader.c: remove the internalcall array constructors.
35934 Changes to match the new MonoArray structure.
35935 * object.h, object.c: an array object doesn't allocate an extra
35936 vector. Add mono_array_new_full () to create jagged arrays easily.
35938 Mon Nov 5 19:51:06 CET 2001 Paolo Molaro <lupus@ximian.com>
35940 * metadata.h, metadata.c: add mono_metadata_field_info () to
35941 retreive all the info about a field from vairous tables.
35942 * icall.c: implement S.Runtime.CServices::InitializeArray () icall.
35943 * class.h, class.c: augment MonoClassField with more info.
35944 Implemented mono_ldtoken for fields. Implemented ExplicitLayout
35945 policy and load a field's RVA if needed.
35947 2001-11-05 Dietmar Maurer <dietmar@ximian.com>
35949 * class.c (mono_class_metadata_init): create a trampoline for all
35950 virtual functions instead of actually compiling them.
35952 Fri Nov 2 19:37:51 CET 2001 Paolo Molaro <lupus@ximian.com>
35954 * class.h, class.c: include name in MonoClassField.
35955 * class.c: fix fundamental type of System.Object and System.String.
35956 Set the right fundamental type for SZARRAY, too. Handle TypeSpec
35958 * icall.c: remove internalcalls for the Reflection stuff that is now
35960 * loader.c: mono_field_from_memberref () implementation.
35961 * mono-endian.c: thinko (s/struct/union/g).
35962 * object.c, object.h: make the mono_string_* prototypes actually use
35963 MonoString instead of MonoObject.
35964 * reflection.c, reflection.h: updates for changes in the reflection
35965 code in corlib: we use C structures that map to the actual C# classes.
35966 Handle SZARRAYs when encoding types. Handle locals in methods. Use a
35967 fat method header if needed and use the info from the ILGenerator for
35968 methods. Handle fields in types. Misc fixes.
35970 2001-10-17 Dietmar Maurer <dietmar@ximian.com>
35972 * class.c (mono_class_metadata_init): bug fix: always allocate
35973 space for static class data
35975 2001-10-25 Dietmar Maurer <dietmar@ximian.com>
35977 * class.c (mono_compute_relative_numbering): use relative
35978 numbering to support fast runtime type checks.
35980 2001-10-17 Sean MacIsaac <macisaac@ximian.com>
35982 * class.c (mono_class_create_from_typeref): added debugging output
35983 to print class name when MonoDummy is returned instead of real class
35985 2001-10-15 Dietmar Maurer <dietmar@ximian.com>
35987 * class.c (mono_class_metadata_init): interface offset table now
35988 contains pointers into the vtable - this is more efficient for the jit
35990 2001-10-12 Dietmar Maurer <dietmar@ximian.com>
35992 * class.c (mono_class_metadata_init): use a temporary vtable (the
35993 old algorithm only worked for the interpreter, but not for the jit)
35995 2001-10-11 Dietmar Maurer <dietmar@ximian.com>
35997 * loader.c (method_from_memberref): use mono_class_get to get the
35998 class of an array instead of using System.Array directly.
35999 (mono_get_method): also add MEMBERREF methods to the method cache
36000 which usefull for arrays.
36002 2001-10-10 Dietmar Maurer <dietmar@ximian.com>
36004 * pedump.c (arch_compile_method): added to compute vtable entry
36006 * metadata.c (mono_metadata_interfaces_from_typedef): also return the
36007 number of interfaces.
36009 * class.h: merged MonoArrayClass into MonoClass
36011 * class.c (mono_class_create_from_typedef): compute the vtable size and
36012 allocate space to include the vtable inside MonoClass
36013 (mono_class_metadata_init): initialize the vtable
36015 Mon Oct 8 16:12:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
36017 * metadata.c, metadata.h: use MonoArrayType to describe the shape of an array.
36018 Guard against calling bsearch with a NULL pointer (pointed out by Laurent Rioux, smoux).
36019 * image.c: endian fixes by Laurent Rioux.
36020 * object.h, object.c: rename MonoStringObject to MonoString and
36021 MonoArrayObject to MonoArray. Change some function names to conform to
36022 the style mono_<object>_<action>. mono_string_new_utf16 () takes a
36023 guint16* as first argument, so don't use char*.
36024 Provide macros to do the interesting things on arrays in a portable way.
36025 * threads-pthread.c: updates for the API changes and #include <sched.h>
36026 (required for sched_yield()).
36027 * icall.c: updates for the API changes above.
36028 * Makefile.am, mono-endian.c. mono-endian.h: include unaligned read routines for
36029 platforms that need them.
36031 Mon Oct 8 10:43:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
36033 * class.c: set the correct type for all the fundamental
36034 type when loading the class.
36036 2001-10-05 Dick Porter <dick@ximian.com>
36038 * threads-pthread.c (pthread_mutex_timedlock): Simple
36039 compatibility version for C libraries that lack this call.
36041 Thu Oct 4 19:10:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
36043 * class.c: MonoTypes stored in MonoClass are stored as
36044 fundamental MonoTypes when the class represents a
36045 fundamental type (System.Int32, ...).
36046 The TypeHandle return by ldtoken is a MonoType*.
36047 * icall.c: ves_icall_get_data_chunk () write out all the
36048 PE/COFF stuff. Implement ves_icall_define_method (),
36049 ves_icall_set_method_body (), ves_icall_type_from_handle ().
36050 * image.c: properly skip unknown streams.
36051 * loader.h, loader.c: add type_class to mono_defaults.
36052 * metadata.c, metadata.h: export compute_size () as
36053 mono_metadata_compute_size () with a better interface.
36054 Typo and C&P fixes.
36055 * pedump.c: don't try to print the entry point RVA if there is no entry point.
36056 * reflection.c, reflection.h: many cleanups, fixes, output method
36057 signatures and headers, typedef and typeref info, compress the metadata
36058 tables, output all the heap streams, cli header etc.
36059 * row-indexes.h: typo fixes.
36061 2001-10-04 Dick Porter <dick@ximian.com>
36063 * object.h: Add a synchronisation mutex struct to MonoObject
36065 * object.c (mono_new_object): Initialise the object
36066 synchronisation mutexes
36068 * icall.c: System.Threading.Monitor internal calls
36070 * threads-pthread.h:
36071 * threads-pthread.c: System.Threading.Monitor internal calls
36073 * threads-types.h: New file, includes the system-specific thread
36076 * threads-pthread-types.h:
36077 * threads-pthread-types.c: New files, handle pthread-specific
36078 synchronisation types
36080 * threads-dummy-types.h:
36081 * threads-dummy-types.c: New files of dummy support for
36082 thread-specific types
36086 * pedump.c: include mono-endian.h not endian.h
36088 * Makefile.am: More threads files.
36089 Name mono-endian.h not endian.h
36091 Tue Oct 2 20:33:48 CEST 2001 Paolo Molaro <lupus@ximian.com>
36093 * Makefile.am, reflection.h, reflection.c: move here the reflection related
36094 stuff and implement a few more bits.
36095 * icall.c: a field needs to be dereferenced twice. Do not use the same
36096 name for two variables in the same scope.
36097 * image.c, image.h: cleanups.
36099 2001-10-02 Dietmar Maurer <dietmar@ximian.com>
36101 * class.c (mono_class_metadata_init): bug fix: compute the right size
36103 Mon Oct 1 20:43:57 CEST 2001 Paolo Molaro <lupus@ximian.com>
36105 * icall.c: implemented some of the Reflection internalcalls.
36106 * image.c, image.h: start writing out the PE/COFF image.
36107 * metadata.h, metadata.c: implement mono_metadata_encode_value ()
36108 that does the reverse than decode_blob_size ().
36109 * object.c: use mono_metadata_encode_value (). Move here
36110 temporary implementation of mono_string_to_utf8 ().
36111 * rawbuffer.c: make malloc_map static.
36113 Fri Sep 28 19:26:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
36115 * metadata.c: fix type comparison for arrays.
36116 * loader.h, loader.c: half-assed fix to get more tests work in cygwin.
36117 Added a couple of new classes to monodefaults.
36118 * icall.c: added a couple of Reflection-related internalcalls.
36119 * class.h, class.c: implemented mono_ldtoken () for RuntimeTypeHandles.
36120 Added a byval_arg MonoType to MonoClass.
36122 2001-09-28 Dick Porter <dick@ximian.com>
36125 * threads-pthread.h:
36126 * threads-pthread.c: Implemented internal calls for
36127 LocalDataStoreSlot operations. Applied mutexes around all shared
36128 data. Reworked the thread creation and Start() operations to
36129 avoid a race condition.
36132 * threads-dummy.c: Dummy calls for the LocalDataStoreSlot operations
36134 Thu Sep 27 21:45:55 CEST 2001 Paolo Molaro <lupus@ximian.com>
36136 * rawbuffer.c: disable mmap on cygwin since it seems to be broken there.
36138 Thu Sep 27 19:52:11 CEST 2001 Paolo Molaro <lupus@ximian.com>
36140 * class.c, loader.c: warn and return NULL instead of erroring out.
36141 * icall.c: added System.AppDomain::getCurDomain().
36142 * loader.c: we don't need to lookup the typedef again for p/invoke calls.
36144 2001-09-25 Dick Porter <dick@ximian.com>
36146 * threads-pthread.h:
36147 * threads-pthread.c: Implemented timed thread joining and added
36148 System.Threading.Thread::Join_internal internal call
36150 * icall.c: Added System.Threading.Thread::Join_internal internal call
36153 * threads-dummy.c: Dummy calls for System.Thread.Thread::Join_internal
36155 Mon Sep 24 18:56:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
36157 * object.c, object.h: added mono_ldstr (), mono_string_is_interned () and
36158 mono_string_intern () to implement the semantics of the ldstr opcode
36159 and the interning of System.Strings.
36160 * icall.c: provide hooks to make String::IsIntern and String::Intern
36163 2001-09-23 Dick Porter <dick@ximian.com>
36166 * threads-dummy.h: New files of dummy threading routines
36168 * Makefile.am (THREAD_SOURCE): Arrange to compile different thread
36169 support code based on system specifics
36171 Rename PTHREAD_LIBS to THREAD_LIBS
36173 2001-09-23 Dick Porter <dick@ximian.com>
36175 * threads-pthread.c: Implement the System.Threading.Thread::Sleep,
36176 Schedule (called when asked to Sleep for 0 ms) and CurrentThread
36178 (mono_thread_init): Set up a Thread object instance to return when
36179 the main thread calls Thread.CurrentThread
36180 (mono_thread_cleanup): Wait for all subthreads to exit
36182 * icall.c: New internal calls for System.Threading.Thread::Sleep
36183 (including Schedule) and CurrentThread
36185 * threads.h: New file, to insulate thread-specific stuff from the
36188 2001-09-21 Dick Porter <dick@ximian.com>
36190 * threads-pthread.h:
36191 * threads-pthread.c: New file, for handling pthreads-style
36192 threading support. Start() now starts a new thread and executes
36193 the ThreadStart delegate instance.
36195 * icall.c: Added the internalcall for
36196 System.Threading.Thread::Start_internal
36198 * Makefile.am: Added new files, and PTHREADS_LIBS to the link line
36200 Thu Sep 20 19:37:39 CEST 2001 Paolo Molaro <lupus@ximian.com>
36202 * loader.c: work around the different signatures for delegates
36203 constructors csc generates in compiled code vs the ones compiled in mscorlib.
36205 Tue Sep 18 13:16:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
36207 * class.h, class.c: add mono_class_get_field_from_name ().
36208 * *: Fix C comments and other ANSI C issues.
36210 Mon Sep 10 20:21:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
36212 * endian.h, assembly.c: fix some endianness issues.
36214 Fri Sep 7 18:40:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
36216 * loader.h, load.c: add delegate_class to mono_defaults.
36217 Handle runtime provided methods in mono_get_method ().
36219 2001-08-29 Dietmar Maurer <dietmar@ximian.com>
36221 * loader.c (mono_get_method): use pinvoke for internal call
36223 * icall.c: use pinvoke for internal call
36225 * loader.c (method_from_memberref): set the method name
36227 Wed Aug 29 12:43:41 CEST 2001 Paolo Molaro <lupus@ximian.com>
36229 * metadata.c: help the compiler generate better code for
36230 mono_class_from_mono_type ().
36232 2001-08-28 Dietmar Maurer <dietmar@ximian.com>
36234 * class.c (mono_class_metadata_init): delayed computing of the
36235 class size to mono_class_metadata_init ()
36237 Tue Aug 28 15:47:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
36239 * class.c, class.h: add an interfaces member to MonoClass.
36240 * image.c, image.h: add assembly_name field to MonoImage
36241 from the assembly table.
36242 * metadata.c, metadata.h: add mono_metadata_interfaces_from_typedef ().
36244 Mon Aug 27 20:12:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
36246 * class.c: Handle Array in mono_class_from_mono_type ().
36247 * metadata.c, pedump.c: some endian fixes.
36249 Mon Aug 27 15:23:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
36251 * class.c, loader.c, loader.h: More types handled in mono_class_from_mono_type ().
36252 * metadata.c: fix small problem introduced with the latest commit.
36254 Mon Aug 27 12:17:17 CEST 2001 Paolo Molaro <lupus@ximian.com>
36256 * loader.c, metadata.c, metadata.h: Export mono_metadata_type_equal().
36257 We don't need a MonoMetadata pointer anymore to compare signatures in
36258 mono_metadata_signature_equal (), update callers.
36259 Reduced memory usage an number of allocations for MonoMethodHeader and
36260 MonoMethodSignature.
36262 Sun Aug 26 23:03:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
36264 * metadata.c: added compare for szarray.
36266 Sun Aug 26 11:34:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
36268 * class.h, class.c, loader.h, loader.c: export mono_class_from_mono_type ()
36269 and add a couple more types to it and mono_defaults. Give an hint on
36270 classes that need implementing in our corlib and are referenced
36273 Sat Aug 25 12:52:54 CEST 2001 Paolo Molaro <lupus@ximian.com>
36275 * class.h, class.c: keep track if a class is also an Enum.
36276 * loader.c: Implement a couple more types for use in libffi
36277 marshalling. Gives better diagnostics when failing to dlopen
36278 a library. Set method->klass for P/Invoke methods, too.
36280 Fri Aug 24 19:30:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
36282 * class.c, class.h: add a MonoType this_arg to MonoClass that
36283 represents a pointer to an object of the class' type that
36284 can be used by the interpreter and later the type cache.
36285 Add best guess alignment info for valuetype objects.
36287 Fri Aug 24 15:50:31 CEST 2001 Paolo Molaro <lupus@ximian.com>
36289 * metadata.h, metadata.c, class.h, class.c: squeezed MonoParam
36290 into MonoType: one less level of indirection and allocation and
36291 simplifies quite a bit of code. Added cache for MonoTypes that are
36292 used frequently, so that we don't need to allocate them all the time.
36294 2001-08-24 Dietmar Maurer <dietmar@ximian.com>
36296 * class.c (mono_class_create_from_typedef): System.Enum is also a
36297 value type, although it does not derive from System.ValueType
36298 (maybe a bug in the ms compiler?)
36300 * metadata.c (mono_type_size): return the right size for value types
36302 * loader.c (mono_get_method): only initialize method header if not abstract
36304 * class.c (mono_class_from_mono_type): use mono_default values.
36306 2001-08-23 Dietmar Maurer <dietmar@ximian.com>
36308 * *: use MonoClass pointers instead of <type_tokens>
36310 * class.h: new flag: metadata_inited.
36312 * class.c (mono_class_metadata_init): impl.
36313 (mono_class_instance_size): impl.
36314 (mono_class_data_size): impl.
36316 Wed Aug 22 16:27:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
36318 * metadata.c, loader.h, loader.c, image.h, image.c, class.h, class.c:
36319 MonoClass now has the name and name_space fields.
36320 MonoMethod has a pointer to its MonoClass, instead of MonoImage.
36321 mono_get_method () takes and optional MonoClass as argument.
36322 Removed mono_typedef_from_name() and added mono_class_token_from_name()
36323 instead that takes advantage of a map from class names to typedef
36324 tokens in MonoImage.
36326 Tue Aug 21 18:54:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
36328 * metadata.c: zero is not a valid alignment boundary.
36329 Merge MONO_TYPE_VOID in default decoding code.
36331 2001-08-21 Dietmar Maurer <dietmar@ximian.com>
36333 * image.h: merged MonoMetadata into MonoImage
36335 * class.h: cleanup of MonoArrayClass, use a MonoClass pointer to
36336 identify the type of elements.
36338 Mon Aug 20 19:39:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
36340 * blob.h: fix MONO_TYPE_TYPEDBYREF value.
36341 * cil-coff.h: split MonoMSDOSHeader and add size info.
36342 * image.c: add some consistency checks.
36343 * metadata.c: fix row size computation: one programmer
36344 error and one LAMESPEC. Handle MONO_TYPE_TYPEDBYREF.
36345 add explanation for the locator routine.
36346 Fix decoding of size in method header.
36348 2001-08-20 Miguel de Icaza <miguel@ximian.com>
36350 * assembly.c (g_concat_dir_and_file): Use _S for string concat.
36351 (g_concat_dir_and_file): Bring g_concat_dir_and_file
36352 function from gnome-libs. This uses the right path separator
36353 based on the OS, and also works around a bug in some systems where
36354 a double slash is not allowed.
36355 (default_assembly_name_resolver): Use g_concat_dir_and_file
36356 (mono_assembly_open): ditto.
36358 2001-08-20 Dietmar Maurer <dietmar@ximian.com>
36360 * metadata.c (mono_metadata_signature_equal): impl.
36362 * *: void is now a realy MonoType (instead of using NULL)
36364 * metadata.c (do_mono_metadata_parse_type): use
36365 mono_metadata_parse_type to parse void value.
36367 Sat Aug 18 12:51:28 CEST 2001 Paolo Molaro <lupus@ximian.com>
36369 * metadata.c, metadata.h: in the signature and method header store
36370 only the space required for holding the loca vars and incoming arguments.
36372 2001-08-15 Dietmar Maurer <dietmar@ximian.com>
36374 * metadata.c (do_mono_metadata_parse_type): treat void like any
36375 other type (instead of assigning NULL);
36377 2001-08-14 Dietmar Maurer <dietmar@ximian.com>
36379 * metadata.c (mono_metadata_parse_mh): fixxed pinned/byref value
36381 2001-08-09 Dietmar Maurer <dietmar@ximian.com>
36383 * image.c (do_mono_image_open): added a cache for arrays.
36385 Sat Aug 4 12:46:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
36387 * metadata.h, metadata.c: add mono_metadata_decode_row_col () to
36388 decode a single column from a row in a metadata table and changes
36389 to take advantage of it in the typedef locator (gives a nice speed up).
36390 Store offset info for function params.
36392 2001-08-02 Dietmar Maurer <dietmar@ximian.com>
36394 * image.h (MONO_IMAGE_IS_CORLIB): removed
36396 Wed Aug 1 22:54:08 CEST 2001 Paolo Molaro <lupus@ximian.com>
36398 * assembly.c: how could mono_assembly_close () had ever worked?
36399 * metadata.c, metadata.h: provide offset info for local vars.
36400 Implement mono_type_size () to take care of alignment as well
36401 as size (it was mono_field_type_size in cli/class.c before).
36403 2001-08-01 Dietmar Maurer <dietmar@ximian.com>
36405 * image.h (MONO_IMAGE_IS_CORLIB): new macro to check root image
36407 * assembly.h (CORLIB_NAME): set to corlib.dll
36409 * assembly.c (mono_assembly_open): replaced strcmp() with !strcmp()
36411 Tue Jul 31 17:54:02 CEST 2001 Paolo Molaro <lupus@ximian.com>
36413 * metadata.h, metadata.c, Makefile.am, private.h, assembly.c, blob.h,
36414 cil-coff.h, image.c, image.h, pedump.c, rawbuffer.c, rawbuffer.h, row-indexes.h,
36415 tokentype.h: massive namespace cleanup.
36417 Mon Jul 30 20:11:01 CEST 2001 Paolo Molaro <lupus@ximian.com>
36419 * metadata.h, metadata.c: decode exception clauses when parsing method header.
36421 2001-07-27 Dietmar Maurer <dietmar@ximian.com>
36423 * metadata.c (mono_metadata_free_type): added check for type !=
36424 NULL (void) before calling mono_metadata_free_type()
36426 Thu Jul 26 19:11:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
36428 * metadata.h, row_indexes.h: added header with enumerations to use
36429 to index in the columns from tables in metadata and to decode coded
36430 tokens: we should start using this instead of embedding magic numbers
36433 Thu Jul 26 13:03:27 CEST 2001 Paolo Molaro <lupus@ximian.com>
36435 * assembly.c, cil-coff.h, image.c, image.h, pedump.c, typedef.c:
36436 Move metadata_t info from cli_image_info_t to MonoImage, where
36437 it's easily accessible. Changed all the uses accordingly.
36438 Added the method and class caches to MonoImage.
36439 * metadata.c, metadata.h: Changed mono_metadata_decode_blob_size ()
36440 and mono_metadata_decode_value () signature to be more consistent
36441 with the other parse functions (and simplify code). Taken advantage
36442 of zero-length array allocation with GCC. Removed reduntant (and
36443 wrong) MonoFieldType struct and use MonoParam instead. Changed
36444 mono_metadata_parse_field_type () to use common code for parsing.
36445 Added mono_metadata_typedef_from_field () and
36446 mono_metadata_typedef_from_method () to lookup a typedef index from a
36447 field or method token.
36448 Pack the MonoRetType structure more tightly (fits in 8 bytes now).
36450 2001-07-23 Miguel de Icaza <miguel@ximian.com>
36452 * metadata.c (mono_metadata_parse_field_type): Implement.
36453 (do_mono_metadata_parse_type): Split engine from
36454 mono_metadata_parse_type, so that we can create smaller structures
36455 for things that just have one pointer to the MonoType (look at
36458 2001-07-20 Miguel de Icaza <miguel@ximian.com>
36460 * metadata.c (mono_metadata_parse_mh): Correct the implementation,
36461 as Jan Gray found out, it is incorrect.
36463 2001-07-18 Miguel de Icaza <miguel@ximian.com>
36465 * assembly.c: Implement asssembly loading. This loads an image
36466 and loads all the referenced assemblies. Come to think of it, we
36467 could always do lazy loading of the assemblies.
36469 * image.c (mono_image_open): Keep loaded images in a hashtable.
36471 * image.h (MonoImage): Add reference count.
36473 2001-07-17 Miguel de Icaza <miguel@ximian.com>
36475 * assembly.c (mono_assembly_open): Keep track of the file name in
36476 case the assembly has no ASSEMBLY table.
36478 * metadata.h: Fixed Paolo's quick hack. Put the documnentation
36481 Sun Jul 15 19:39:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
36483 * metadata.c, metadata.h: decode local vars in method header
36484 parse function. Change callers accordingly.
36486 Sun Jul 15 17:40:47 CEST 2001 Paolo Molaro <lupus@ximian.com>
36488 * metadata.h, cil-coff.h: protect against multiple inclusion.
36489 Added some new structures to hold information decoded from metadata:
36490 MonoType, MonoParam, MonoArray, MonoMethod, MonoMethodSignature
36491 and relevant decoding/free functions.
36492 * metadata.c: implement decoding functions. Add warning for out of bounds
36493 index in mono_metadata_locate(). Implement mono_get_method () to retreive
36494 all the info about a method signature and invocation. Remove check on
36495 uninitialized local var in parse_mh() and fix memory leak.
36497 2001-07-12 Miguel de Icaza <miguel@ximian.com>
36499 * metadata.h: More macros.
36501 * tokentype.h: New file.
36503 Fri Jul 6 11:30:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
36505 * assembly.c: added a consistency check and initialize
36506 some structures with g_new0().
36507 * metadata.c: fixed a couple more bugs in table size computation
36508 and add other checks for out-of bound access to metadata.
36510 Thu Jul 5 22:34:21 CEST 2001 Paolo Molaro <lupus@ximian.com>
36512 * metatada.c: fix bugs computing table sizes. Spew a
36513 warning when index in string heap is out of bounds.
36515 2001-07-04 Miguel de Icaza <miguel@ximian.com>
36517 * metadata.h: Add a couple of macros to manipulate tokens.
36519 Tue Jul 3 18:33:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
36521 * assembly.c: g_free(ii->cli_sections) (and avoid double free of
36522 cli_section_tables).
36524 2001-07-01 Miguel de Icaza <miguel@ximian.com>
36526 * metadata.c (mono_metadata_user_string): New function, provides
36527 access to the UserString heap.
36529 2001-06-27 Miguel de Icaza <miguel@ximian.com>
36531 * metadata.c: Add inline documentation.
36533 2001-06-26 Miguel de Icaza <miguel@ximian.com>
36535 * propertyattr.h, paramattr.h, methodsem.h, methodattr.h: New
36538 2001-06-22 Miguel de Icaza <miguel@ximian.com>
36540 * typeattr.h: New file, TypeAttribute flags.
36542 2001-06-21 Miguel de Icaza <miguel@ximian.com>
36544 * mono/metadata/assembly.c (mono_assembly_ensure_section_idx,
36545 mono_assembly_ensure_section): Section loading code.
36546 (load_section_tables): Load the sections.
36548 * mono/metadata/metadata.c (mono_metadata_locate_token,
36549 mono_metadata_locate): Functions to locate the information
36550 definition given a token or a table and an index.
36551 (mono_metadata_compute_table_bases): New.
36552 (compute_size): New function to compute the sizes of the various
36555 * mono/metadata/metadata.h: Finish listing the different index
36558 * mono/metadata/pedump.c: Improve to dump new information.
36560 2001-06-19 Miguel de Icaza <miguel@ximian.com>
36562 * mono/metadata/metadata.c: Entered all the tables matching
36565 * mono/metadata/assembly.c (load_metadata_ptrs): Fix for Beta2